Fix breadcrumbs and vertical nav menus
authorNick Downing <nick@ndcode.org>
Tue, 11 Jan 2022 05:28:41 +0000 (16:28 +1100)
committerNick Downing <nick@ndcode.org>
Tue, 11 Jan 2022 06:58:02 +0000 (17:58 +1100)
breadcrumbs.jst
css/bootstrap/_custom.scss
css/bootstrap/_nav.scss
css/bootstrap/_variables.scss
index.html.jst
my_account/index.html.jst

index 424e9d1..7ae21c9 100644 (file)
@@ -15,11 +15,11 @@ return async (env, _out) => {
   // present components as breadcrumbs, except last one as text
   h2 {
     for (let i = 0; i < components.length - 1; ++i) {
-      a.text-h4(
+      a.h4(
         href=`${pathname.slice(0, components[i].index)}/index.html`
       ) {`${components[i].name}`}
       ' '
-      span.text-h5 {'>'}
+      span.h5 {'>'}
       ' '
     }
     `${components[components.length - 1].name}`
index 8fb1728..73f430c 100644 (file)
@@ -3,31 +3,6 @@
 $footer-link-color: darken(theme-color("success"), 10%);
 $footer-link-hover-color: darken($footer-link-color, 10%);
 
-// use these for heading-sized text when you don't want extra spacing
-//.text-h1 {
-//  font-size: $font-size-h1;
-//}
-//
-//.text-h2 {
-//  font-size: $font-size-h2;
-//}
-//
-//.text-h3 {
-//  font-size: $font-size-h3;
-//}
-//
-//.text-h4 {
-//  font-size: $font-size-h4;
-//}
-//
-//.text-h5 {
-//  font-size: $font-size-h5;
-//}
-//
-//.text-h6 {
-//  font-size: $font-size-h6;
-//}
-
 // apply this to svg, see _svg/icon_search.svg
 .svg-icon {
   display: inline-block;
@@ -41,7 +16,7 @@ $footer-link-hover-color: darken($footer-link-color, 10%);
 }
 
 // use this to display the pi symbol without horrible blocky look in Sans
-.text-serif {
+.serif {
   font-family: $font-family-serif;
 }
 
index fad684e..82a3ec0 100644 (file)
@@ -18,6 +18,7 @@
 
   @include hover-focus() {
     text-decoration: none;
+    background: $nav-link-hover-bg; // Nick
   }
 
   // Disabled state lightens text
index a337f45..745187c 100644 (file)
@@ -697,6 +697,7 @@ $zindex-tooltip:                    1070 !default;
 $nav-link-padding-y:                .5rem !default;
 $nav-link-padding-x:                1rem !default;
 $nav-link-disabled-color:           $gray-600 !default;
+$nav-link-hover-bg:                 $gray-200 !default; // Nick
 
 $nav-tabs-border-color:             $gray-300 !default;
 $nav-tabs-border-width:             $border-width !default;
index a19c10b..118c236 100644 (file)
@@ -21,37 +21,37 @@ return async env => {
         i {'[Actually don\'t because it\'s still under construction]'}
       }
 
-      ul.nav.nav-stacked {
-        li {
-          a {
+      ul.nav.flex-column {
+        li.nav-item {
+          a.nav-link {
             table.icon-and-text {
               tr {
                 td {
                   _out.push(icon_pitree)
                 }
                 td {
-                  span.text-h1 {
-                    span.text-serif {'π'}
+                  span.h1 {
+                    span.serif {'π'}
                     'tree'
                   }
                   br {}
-                  span.text-h3 {'the source code analysis and transformation framework'}
+                  span.h3 {'the source code analysis and transformation framework'}
                 }
               }
             }
           }
         }
-        li {
-          a {
+        li.nav-item {
+          a.nav-link {
             table.icon-and-text {
               tr {
                 td {
                   _out.push(icon_jst)
                 }
                 td {
-                  span.text-h1{'JST'}
+                  span.h1{'JST'}
                   br {}
-                  span.text-h3{'the web development framework with JavaScript Templates'}
+                  span.h3{'the web development framework with JavaScript Templates'}
                 }
               }
             }
index 234367b..42331ee 100644 (file)
@@ -307,20 +307,20 @@ return async env => {
         // signed out
         p {'For account maintenance, please click on one of the options below.'}
 
-        ul.nav.nav-stacked {
+        ul.nav.flex-column {
           let entries = menu.entries
           for (let i = 0; i < entries.length; ++i) {
             let entry = entries[i]
             if (Object.prototype.hasOwnProperty.call(entry, 'icon'))
-              li {
-                a(href=`${entry.dir}/index.html`) {
+              li.nav-item {
+                a.nav-link(href=`${entry.dir}/index.html`) {
                   table.icon-and-text {
                     tr {
                       td {
                         _out.push(await env.site.get_min_svg(entry.icon))
                       }
                       td {
-                        span.text-h2{`${entry.name}`}
+                        span.h2{`${entry.name}`}
                       }
                     }
                   }