浏览代码

fix: theme's menu_text_active stopped working

Fix #1430
George Cushen 5 年之前
父节点
当前提交
d7749fdaa8
共有 2 个文件被更改,包括 6 次插入2 次删除
  1. 5 1
      assets/scss/academic/_nav.scss
  2. 1 1
      layouts/partials/navbar.html

+ 5 - 1
assets/scss/academic/_nav.scss

@@ -42,6 +42,7 @@
 
       &.active {
         font-weight: bold !important;
+        color: $sta-menu-text-active !important;
       }
     }
   }
@@ -50,8 +51,11 @@
     font-size: #{$sta-font-size-small}px;
   }
 
-  .dropdown-item.active {
+  // Note: dedicated `i18n-active` class to prevent ScrollSpy removing `active` class from language chooser.
+  .dropdown-item.active,
+  .i18n-active {
     font-weight: bold;
+    color: $sta-menu-text-active !important;
   }
 
 }

+ 1 - 1
layouts/partials/navbar.html

@@ -121,7 +121,7 @@
           <i class="fas fa-globe mr-1" aria-hidden="true"></i><span class="d-none d-lg-inline">{{ index site.Data.i18n.languages .Lang }}</span>
         </a>
         <div class="dropdown-menu">
-          <div class="dropdown-item active font-weight-bold">
+          <div class="dropdown-item i18n-active font-weight-bold">
             <span>{{ index site.Data.i18n.languages .Lang }}</span>
           </div>
           {{ range .Translations }}