Przeglądaj źródła

feat(menu): option to hide day/night chooser

In params.toml, head to `main_menu` options and set `show_day_night=false` to hide the day/night chooser and theme automatically according to the user's day/night preference for their device.
George Cushen 4 lat temu
rodzic
commit
73d157ece0
1 zmienionych plików z 2 dodań i 1 usunięć
  1. 2 1
      wowchemy/layouts/partials/navbar.html

+ 2 - 1
wowchemy/layouts/partials/navbar.html

@@ -145,7 +145,8 @@
       </li>
       {{ end }}
 
-      {{ if site.Params.day_night }}
+      {{ $show_day_night := site.Params.main_menu.show_day_night | default true }}
+      {{ if and site.Params.day_night $show_day_night }}
       <li class="nav-item dropdown theme-dropdown">
         <a href="#" class="nav-link js-theme-selector" data-toggle="dropdown" aria-haspopup="true">
           <i class="fas fa-palette" aria-hidden="true"></i>