Editing code with my formatting
This commit is contained in:
parent
caae7b85b7
commit
aa2d0606ce
9 changed files with 503 additions and 283 deletions
|
@ -1,31 +1,32 @@
|
|||
{{/* variables for enabling/disabling various features */}}
|
||||
{{ $darkEnabled := true }}
|
||||
{{/* variables for enabling/disabling various features */}}
|
||||
{{ $darkEnabled := true }}
|
||||
{{ $lightEnabled := true }}
|
||||
{{ if site.Params.features.theme.enable }}
|
||||
{{ $darkEnabled = site.Params.features.theme.services.dark | default true }}
|
||||
{{ $lightEnabled = site.Params.features.theme.services.light | default true }}
|
||||
{{ $darkEnabled = site.Params.features.theme.services.dark | default true }}
|
||||
{{ $lightEnabled = site.Params.features.theme.services.light | default true }}
|
||||
{{ end }}
|
||||
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="themeSelector" role="button"
|
||||
data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<img id="navbar-theme-icon-svg" class="theme-icon" src="{{ "icons/moon-svgrepo-com.svg" | relURL }}" width=20 alt="Dark Theme">
|
||||
</a>
|
||||
<div id="themeMenu" class="dropdown-menu dropdown-menu-icons-only" aria-labelledby="themeSelector">
|
||||
{{ if $lightEnabled }}
|
||||
<a class="dropdown-item nav-link" href="#" data-scheme="light">
|
||||
<img class="theme-icon" src="{{ "icons/sun-svgrepo-com.svg" | relURL }}" width=20 alt="Light Theme">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="themeSelector" role="button" data-bs-toggle="dropdown"
|
||||
aria-haspopup="true" aria-expanded="false">
|
||||
<img id="navbar-theme-icon-svg" class="theme-icon" src="{{ " icons/moon-svgrepo-com.svg" | relURL }}" width=20
|
||||
alt="Dark Theme">
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ if $darkEnabled }}
|
||||
<a class="dropdown-item nav-link" href="#" data-scheme="dark">
|
||||
<img class="theme-icon" src="{{ "icons/moon-svgrepo-com.svg" | relURL }}" width=20 alt="Dark Theme">
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ if and $lightEnabled $darkEnabled }}
|
||||
<a class="dropdown-item nav-link" href="#" data-scheme="system">
|
||||
<img class="theme-icon" src="{{ "icons/computer-svgrepo-com.svg" | relURL }}" width=20 alt="System Theme">
|
||||
</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</li>
|
||||
<div id="themeMenu" class="dropdown-menu dropdown-menu-icons-only" aria-labelledby="themeSelector">
|
||||
{{ if $lightEnabled }}
|
||||
<a class="dropdown-item nav-link" href="#" data-scheme="light">
|
||||
<img class="theme-icon" src="{{ " icons/sun-svgrepo-com.svg" | relURL }}" width=20 alt="Light Theme">
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ if $darkEnabled }}
|
||||
<a class="dropdown-item nav-link" href="#" data-scheme="dark">
|
||||
<img class="theme-icon" src="{{ " icons/moon-svgrepo-com.svg" | relURL }}" width=20 alt="Dark Theme">
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ if and $lightEnabled $darkEnabled }}
|
||||
<a class="dropdown-item nav-link" href="#" data-scheme="system">
|
||||
<img class="theme-icon" src="{{ " icons/computer-svgrepo-com.svg" | relURL }}" width=20 alt="System Theme">
|
||||
</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</li>
|
Loading…
Add table
Add a link
Reference in a new issue