Răsfoiți Sursa

Merge branch 'main' of ssh://github.com/OliveTin/OliveTin

jamesread 1 an în urmă
părinte
comite
86e876a9c9
2 a modificat fișierele cu 22 adăugiri și 0 ștergeri
  1. 11 0
      webui.dev/js/marshaller.js
  2. 11 0
      webui.dev/style.css

+ 11 - 0
webui.dev/js/marshaller.js

@@ -493,6 +493,17 @@ function showSectionView (selected) {
     }
   }
 
+  const current = window.registeredPaths.get(window.currentPath)
+
+  for (const navLink of document.querySelector('nav').querySelectorAll('a')) {
+    console.log(navLink.title, current.section)
+    if (navLink.title === current.section) {
+      navLink.classList.add('selected')
+    } else {
+      navLink.classList.remove('selected')
+    }
+  }
+
   rebuildH1BreadcrumbNavigation(selected)
 
   pushNewNavigationPath(window.currentPath)

+ 11 - 0
webui.dev/style.css

@@ -65,6 +65,7 @@ nav ul li a {
   padding: 0.5em 1em;
   user-select: none;
   text-decoration: none;
+  font-size: small;
 }
 
 a:focus {
@@ -77,6 +78,14 @@ nav ul li a:hover {
   background-color: #efefef;
   color: black;
   cursor: pointer;
+  border: 0;
+  outline: 0;
+}
+
+nav ul li a.selected {
+  background-color: #c4cdd4;
+  color: black;
+  outline: 0;
 }
 
 #sidebar-toggler-button {
@@ -489,6 +498,8 @@ span.annotation-value {
 
 .box-shadow {
   box-shadow: 0 0 5px 0 #444;
+  background-color: #fff;
+  text-align: left;
 }
 
 .box-shadow p {