| layouts/_default/baseof.html | ●●●●● patch | view | raw | blame | history | |
| layouts/partials/nav.html | ●●●●● patch | view | raw | blame | history | |
| layouts/shortcodes/picture.html | ●●●●● patch | view | raw | blame | history |
layouts/_default/baseof.html
@@ -1,5 +1,5 @@ <!doctype html> <html lang="{{ .Site.Language.Lang }}"{{ with .Site.Params.darkmode }} class="dim"{{ end }}> <html lang="{{ .Site.Language.Lang }}"{{ with .Site.Params.enableDarkmode }} class="dim"{{ end }}> <head> {{- partial "head" . }} </head> layouts/partials/nav.html
@@ -1,13 +1,13 @@ <nav class="wrap nav"> <a href="{{ .Site.BaseURL }}" class="nav_brand"> <picture> {{- $logos := .Site.Params.logo }} {{- $normalPath := absURL (printf "images/%s" $logos.lightMode) }} {{- $litPath := absURL (printf "images/%s" $logos.lightMode) }} {{- $darkPath := absURL (printf "images/%s" $logos.darkMode) }} <picture data-lit="{{ $litPath }}" data-dark="{{ $darkPath }}"> {{ with .Site.Params.darkmode }} <source srcset = '{{ $darkPath }}' media="(prefers-color-scheme: dark)"> {{ end }} <img srcset = '{{ $normalPath }}' alt = '{{ .Site.Title }} Logo'> <img srcset = '{{ $litPath }}' alt = '{{ .Site.Title }} Logo'> </picture> <label class="nav_toggle">Menu</label> </a> layouts/shortcodes/picture.html
@@ -1,9 +1,9 @@ {{- $normal := .Get 0 }} {{- $dark := .Get 1 }} {{- $alt := .Get 2 }} {{- $normalPath := absURL (printf "images/%s" $normal) }} {{- $litPath := absURL (printf "images/%s" $normal) }} {{- $darkPath := absURL (printf "images/%s" $dark) }} <picture class="nav_logo"> <picture class="nav_logo" data-lit="{{ $litPath }}" data-dark="{{ $darkPath }}"> <source srcset="{{ $darkPath }}" media="(prefers-color-scheme: dark)"> <img srcset="{{ $normalPath }}" alt="{{ $alt }}"> <img srcset="{{ $litPath }}" alt="{{ $alt }}"> </picture>