فهرست منبع

Rename .current (stylesheet) to .active

soyjavi 13 سال پیش
والد
کامیت
a9e1f2b029

+ 5 - 3
kitchen-sink/app/asides/features.html

@@ -13,24 +13,26 @@
                     <strong>Meet the framework</strong>
                 </a>
             </li>
-            <li class="current">
+            <li class="active">
                 <a href="#second-article" data-router="article">
                     <strong>Meet the framework</strong>
+                    <div class="tag right">important</div>
                 </a>
             </li>
 
             <!-- Layout & Navigation -->
             <li>
                 <a href="#layout" data-router="section">
-                    <div class="tag secondary right">5</div>
                     <strong>Layout</strong>
+                    <div class="tag right">5</div>
                 </a>
             </li>
 
             <!-- List -->
             <li>
-                <a href="#list" data-router="section" data-count="22">
+                <a href="#list" data-router="section">
                     <strong>Lists</strong>
+                    <div class="tag right">22</div>
                 </a>
             </li>
 

+ 1 - 1
kitchen-sink/app/asides/right.html

@@ -1,6 +1,6 @@
 <aside id="right" class="right small">
     <nav>
-        <a href="#aside-example" data-router="article" class="current" data-icon="clock"></a>
+        <a href="#aside-example" data-router="article" class="active" data-icon="clock"></a>
         <a href="#aside-example" data-router="article" data-icon="user" data-count="14"></a>
         <a href="#aside-example" data-router="article" data-icon="pushpin"></a>
     </nav>

+ 1 - 1
kitchen-sink/app/sections/data-attribute.html

@@ -5,7 +5,7 @@
         </nav>
     </header>
 
-    <article id="data-attributes" class="current list scroll indented">
+    <article id="data-attributes" class="active list scroll indented">
         <ul>
             <li data-icon="user">
                 <strong>data-icon</strong>

+ 1 - 1
kitchen-sink/app/sections/icon.html

@@ -6,7 +6,7 @@
     </header>
 
     <nav class="groupbar">
-        <a href="#icons-default" data-router="article" data-label="Normal" data-count="72" class="current"></a>
+        <a href="#icons-default" data-router="article" data-label="Normal" data-count="72" class="active"></a>
         <a href="#icons-brands" data-router="article" data-label="Brands" data-count="37" ></a>
     </nav>
 

+ 2 - 2
kitchen-sink/app/sections/layout.html

@@ -9,7 +9,7 @@
     </header>
 
     <nav class="groupbar">
-        <a href="#layout-art1" data-router="article" class="current" data-label="Profile"></a>
+        <a href="#layout-art1" data-router="article" class="active" data-label="Profile"></a>
         <a href="#layout-art2" data-router="article" data-label="Inbox" data-count="19"></a>
         <a href="#layout-art3" data-router="article" data-label="Map"></a>
         <a href="#layout-art4" data-router="article" data-label="Settings"></a>
@@ -17,7 +17,7 @@
 
     <footer>
         <nav>
-            <a href="#layout-art1" data-router="article" class="current" data-icon="home"></a>
+            <a href="#layout-art1" data-router="article" class="active" data-icon="home"></a>
             <a href="#layout-art2" data-router="article" data-icon="inbox" data-count="80"></a>
             <a href="#layout-art3" data-router="article" data-icon="compass"></a>
             <a href="#layout-art4" data-router="article" data-icon="settings"></a>

+ 1 - 1
kitchen-sink/app/sections/list.html

@@ -6,7 +6,7 @@
     </header>
 
     <nav class="groupbar">
-        <a href="#list-normal" data-router="article" class="current" data-icon="checkmark" data-label="Normal"></a>
+        <a href="#list-normal" data-router="article" class="active" data-icon="checkmark" data-label="Normal"></a>
         <a href="#list-indented" data-router="article" data-label="Indented"></a>
     </nav>
 

+ 1 - 1
kitchen-sink/index.html

@@ -94,7 +94,7 @@
                     </small>
                 </li>
                 <li class="feature">
-                    <div class="right  ">15:49</div>
+                    <div class="right ">15:49</div>
                     <strong class="text normal">Enrique Amodeo Rubio</strong>
                     <small class="text small">[madridJS] [JOB] Front Developer Position</small>
                     <small>

+ 0 - 1
src/Lungo.Constants.js

@@ -25,7 +25,6 @@ Lungo.Constants = {
         ASIDE: 'aside',
         SHOW: 'show',
         HIDE: 'hide',
-        CURRENT: 'current',
         RIGHT: 'right',
         LEFT: 'left',
         HORIZONTAL: 'horizontal',

+ 3 - 3
src/boot/Lungo.Boot.Section.js

@@ -34,7 +34,7 @@ Lungo.Boot.Section = (function(lng, undefined) {
         lng.Element.Cache.article = first_section.children(ELEMENT.ARTICLE).first();
 
         var first_section_id = '#' + first_section.attr(ATTRIBUTE.ID);
-        first_section.addClass(CLASS.CURRENT);
+        first_section.addClass(CLASS.ACTIVE);
         lng.Router.History.add(first_section_id);
     };
 
@@ -51,7 +51,7 @@ Lungo.Boot.Section = (function(lng, undefined) {
         var aside = null;
         for (var i = 0, len = lng.Element.Cache.asides.length; i < len; i++) {
             aside = lng.dom(lng.Element.Cache.asides[i]);
-            aside.children(ELEMENT.ARTICLE).addClass(CLASS.CURRENT);
+            aside.children(ELEMENT.ARTICLE).addClass(CLASS.ACTIVE);
         }
     };
 
@@ -59,7 +59,7 @@ Lungo.Boot.Section = (function(lng, undefined) {
         var section = lng.dom(lng.Element.Cache.sections[section_index]);
 
         var first_article = section.children(ELEMENT.ARTICLE).first();
-        first_article.addClass(CLASS.CURRENT);
+        first_article.addClass(CLASS.ACTIVE);
 
         var first_article_id = first_article.attr(ATTRIBUTE.ID);
         if (first_article_id) lng.View.Article.switchReferenceItems(first_article_id, section);

+ 3 - 3
src/router/Lungo.Router.js

@@ -41,7 +41,7 @@ Lungo.Router = (function(lng, undefined) {
                 current.removeClass(CLASS.SHOW).addClass(CLASS.HIDE);
                 target.addClass(CLASS.SHOW);
                 lng.Element.Cache.section = target;
-                lng.Element.Cache.article = target.find(ELEMENT.ARTICLE + '.' + CLASS.CURRENT);
+                lng.Element.Cache.article = target.find(ELEMENT.ARTICLE + '.' + CLASS.ACTIVE);
 
                 lng.Router.History.add(section_id);
                 _sectionTriggers(current, target);
@@ -71,8 +71,8 @@ Lungo.Router = (function(lng, undefined) {
                     current = lng.Element.Cache.section.children(ELEMENT.ARTICLE);
                 }
 
-                current.removeClass(CLASS.CURRENT).trigger(TRIGGER.UNLOAD);
-                target.addClass(CLASS.CURRENT).trigger(TRIGGER.LOAD);
+                current.removeClass(CLASS.ACTIVE).trigger(TRIGGER.UNLOAD);
+                target.addClass(CLASS.ACTIVE).trigger(TRIGGER.LOAD);
 
                 lng.Element.Cache.article = target;
 

+ 1 - 1
src/stylesheets/Lungo.layout.article.styl

@@ -20,7 +20,7 @@ article
   visibility: hidden
   z-index: 0
 
-  &.current, &:first-child
+  &.active, &:first-child
     visibility: visible
     display: block
     z-index: 1

+ 6 - 6
src/stylesheets/Lungo.theme.default.styl

@@ -96,26 +96,26 @@ nav
       & a:active
         background: THEME_dark
 
-  section > &.groupbar > a.current
+  section > &.groupbar > a.active
     box-shadow inset 0 -3px 0 THEME
 
   section > footer > & > a, &.groupbar > a
     color: NAV_LINK
-    &.current
+    &.active
       color: NAV_LINK_ACTIVE
 
   section > footer > & > a
     box-shadow 1px 0 0 DARK_dark
-    &.current
+    &.active
       color:  NAV_LINK_ACTIVE
       background-color: DARK_dark
       box-shadow inset 0 3px 0 THEME
 
   aside &
     & a
-      &.current .icon
+      &.active .icon
         color: white
-      &:not(.current) .icon
+      &:not(.active) .icon
         color: NAV_LINK
     &.box
       &:not(.right) a
@@ -165,7 +165,7 @@ nav
       border-top: solid 1px  DARK
     &:not(:last-child)
       border-bottom: solid 1px DARKEST
-    &.current
+    &.active
       background: THEME
       border-color: transparent
       & strong, & small, & .icon

+ 1 - 1
src/stylesheets/Lungo.widgets.loading.styl

@@ -105,7 +105,7 @@
       background-color: rgba(255,255,255,0.15)
 
 
-section.show, section.current, .notification
+section.show, section.active, .notification
   & .loading
     -webkit-animation: rotatingLoader .5s  infinite linear
     moz-animation:  rotatingLoader .5s  infinite linear

+ 1 - 1
src/stylesheets/css/Lungo.layout.article.css

@@ -16,7 +16,7 @@ article {
   visibility: hidden;
   z-index: 0;
 }
-article.current,
+article.active,
 article:first-child {
   visibility: visible;
   display: block;

+ 10 - 10
src/stylesheets/css/Lungo.theme.default.css

@@ -95,7 +95,7 @@ section > header > nav.box.right a {
 section > header > nav.box a:active {
   background: #007db5;
 }
-section > nav.groupbar > a.current {
+section > nav.groupbar > a.active {
   -webkit-box-shadow: inset 0 -3px 0 #0093d5;
   -moz-box-shadow: inset 0 -3px 0 #0093d5;
   box-shadow: inset 0 -3px 0 #0093d5;
@@ -104,8 +104,8 @@ section > footer > nav > a,
 nav.groupbar > a {
   color: #888;
 }
-section > footer > nav > a.current,
-nav.groupbar > a.current {
+section > footer > nav > a.active,
+nav.groupbar > a.active {
   color: #fff;
 }
 section > footer > nav > a {
@@ -113,17 +113,17 @@ section > footer > nav > a {
   -moz-box-shadow: 1px 0 0 #1d1d1d;
   box-shadow: 1px 0 0 #1d1d1d;
 }
-section > footer > nav > a.current {
+section > footer > nav > a.active {
   color: #fff;
   background-color: #1d1d1d;
   -webkit-box-shadow: inset 0 3px 0 #0093d5;
   -moz-box-shadow: inset 0 3px 0 #0093d5;
   box-shadow: inset 0 3px 0 #0093d5;
 }
-aside nav a.current .icon {
+aside nav a.active .icon {
   color: #fff;
 }
-aside nav a:not(.current) .icon {
+aside nav a:not(.active) .icon {
   color: #888;
 }
 aside nav.box:not(.right) a {
@@ -232,13 +232,13 @@ aside .list li:not(:first-child) {
 aside .list li:not(:last-child) {
   border-bottom: solid 1px #141414;
 }
-aside .list li.current {
+aside .list li.active {
   background: #0093d5;
   border-color: transparent;
 }
-aside .list li.current strong,
-aside .list li.current small,
-aside .list li.current .icon {
+aside .list li.active strong,
+aside .list li.active small,
+aside .list li.active .icon {
   color: #fff;
 }
 aside .list li strong {

+ 1 - 1
src/stylesheets/css/Lungo.widgets.loading.css

@@ -148,7 +148,7 @@
   background-color: rgba(255,255,255,0.15);
 }
 section.show .loading,
-section.current .loading,
+section.active .loading,
 .notification .loading {
   -webkit-animation: rotatingLoader 0.5s infinite linear;
   moz-animation: rotatingLoader 0.5s infinite linear;

+ 5 - 5
src/view/Lungo.View.Article.js

@@ -18,7 +18,7 @@ Lungo.View.Article = (function(lng, undefined) {
         NAVIGATION_ITEM: 'a[href][data-router="article"]',
         REFERENCE_LINK: ' a[href][data-article]',
         TITLE_OF_ARTICLE: 'header .title, footer .title',
-        ASIDE_REFERENCE_LIST: 'li a.current, li.current'
+        ASIDE_REFERENCE_LIST: 'li a.active, li.active'
     };
 
     /**
@@ -33,16 +33,16 @@ Lungo.View.Article = (function(lng, undefined) {
     };
 
     var switchNavItems = function(article_id) {
-        lng.Element.Cache.section.find(SELECTORS.NAVIGATION_ITEM).removeClass(CLASS.CURRENT);
+        lng.Element.Cache.section.find(SELECTORS.NAVIGATION_ITEM).removeClass(CLASS.ACTIVE);
 
         var active_nav_items = 'a[href="' + article_id + '"][data-router="article"]';
-        lng.Element.Cache.section.find(active_nav_items).addClass(CLASS.CURRENT);
+        lng.Element.Cache.section.find(active_nav_items).addClass(CLASS.ACTIVE);
 
         if (lng.Element.Cache.aside) {
             aside = lng.Element.Cache.aside;
 
-            aside.find(SELECTORS.ASIDE_REFERENCE_LIST).removeClass(CLASS.CURRENT);
-            aside.find(active_nav_items).addClass(CLASS.CURRENT).parent().addClass(CLASS.CURRENT);
+            aside.find(SELECTORS.ASIDE_REFERENCE_LIST).removeClass(CLASS.ACTIVE);
+            aside.find(active_nav_items).addClass(CLASS.ACTIVE).parent().addClass(CLASS.ACTIVE);
         }
     };