mirror of
https://github.com/gcushen/hugo-academic.git
synced 2025-07-26 19:15:16 +02:00
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.
This commit is contained in:
parent
7455541b48
commit
73d157ece0
1 changed files with 2 additions and 1 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue