diff options
Diffstat (limited to 'layouts/partials/body-top.html')
-rw-r--r-- | layouts/partials/body-top.html | 38 |
1 files changed, 12 insertions, 26 deletions
diff --git a/layouts/partials/body-top.html b/layouts/partials/body-top.html index fa854a6..a5c8cfe 100644 --- a/layouts/partials/body-top.html +++ b/layouts/partials/body-top.html @@ -15,8 +15,8 @@ <h1>{{ .Site.Params.tagline }}<span class="cursor">|</span></h1> {{- end }} <noscript> - <span class="icon icon-attention icon-2x" style="color:red"></span> - <h2>{{ i18n "noJsMsg" }}</h2> + <h2>{{ partial "icon" "warning" }}</h2> + <h2>{{ i18n "noJsMsg" }}</h2> </noscript> </div> </header> @@ -25,29 +25,15 @@ <nav class="row middle-xs center-xs {{ if not .IsHome -}} nav-fixed nav-shadow {{- end }}"> <div class="col-xs-6 col-sm-1 logo" style="{{ if not .IsHome }}visibility: visible;{{- end }}"> <a href="{{ "#" | relLangURL }}"> - {{ $scratch := newScratch }} - {{ $imgSize := default "96x" .Site.Params.Image.NavLogo.resize }} - {{ $resizeOptions := default "q90 Gaussian" .Site.Params.Image.NavLogo.resizeOptions }} - {{ with (resources.Get .Site.Params.logoSmall) -}} - {{ $img := (slice (.Resize (printf "%s %s" $imgSize $resizeOptions))) | resources.Concat (printf "navlogo%s" (path.Ext .)) }} - {{ $scratch.Set "img" $img.Permalink }} - {{ $scratch.Set "imgW" .Width }} - {{ $scratch.Set "imgH" .Height }} - {{- else -}} - {{ $scratch.Set "img" .Site.Params.logoSmall }} - {{- end }} - <img - {{ if .Site.Params.Feat.useLazySizes }} - data-src="{{ $scratch.Get "img" }}" - class="lazyload" - {{ else }} - src="{{ $scratch.Get "img" }}" - loading="lazy" - {{ end }} - alt="Home" - {{ with $scratch.Get "imgH" -}} height="{{ . }}" {{- end }} - {{ with $scratch.Get "imgW" }} width="{{ . }}" {{ end }} - > + {{ partial "lazyimg" (dict + "img" (resources.Get .Site.Params.logoSmall) + "maxsize" (default "96x" site.Params.Image.NavLogo.resize) + "lqipsize" (default "16x" site.Params.Image.NavLogo.resize) + "resizeoptions" (default "q92 Gaussian" site.Params.Image.NavLogo.resizeOptions) + "alt" "Home" + "renderer" "webp" + "noscript" false + ) }} </a> </div> {{ range .Site.Menus.main }} @@ -57,7 +43,7 @@ {{ end }} <div class="col-xs-6 col-sm-1 nav-toggle" style="{{ if not .IsHome -}} visibility: visible; {{- end }}"> <a href="" class="nav-icon" onclick="return false"> - <i class="icon icon-2x icon-menu"></i> + {{ partial "icon" "menu" }} </a> </div> </nav> |