| layouts/_default/term.html | ●●●●● patch | view | raw | blame | history | |
| layouts/blog/list.html | ●●●●● patch | view | raw | blame | history | |
| layouts/partials/head/liteyoutube.html | ●●●●● patch | view | raw | blame | history | |
| layouts/partials/nav.html | ●●●●● patch | view | raw | blame | history | |
| layouts/partials/opengraph.html | ●●●●● patch | view | raw | blame | history |
layouts/_default/term.html
@@ -1,18 +1,18 @@ {{ define "main" }} {{- $pages := .Data.Pages }} {{ .Data.Terms }} {{- .Data.Terms }} <div class="wrap pt-2 mt-2"> {{- $paginator := .Paginate $pages -}} {{- $size := $paginator.PageSize }} {{- $scratch := newScratch }} {{- range $index, $value := $paginator.Pages }} {{ if isset .Params "image" }} {{ $scratch.Set "image" .Params.image }} {{ else }} {{ $scratch.Set "image" "thumbnail.svg" }} {{ end }} {{ $image := $scratch.Get "image" }} {{ $bg := (absURL (printf "images/%s" $image)) }} {{- if isset .Params "image" }} {{- $scratch.Set "image" .Params.image }} {{- else }} {{- $scratch.Set "image" "thumbnail.svg" }} {{- end }} {{- $image := $scratch.Get "image" }} {{- $bg := (absURL (printf "images/%s" $image)) }} {{- if in $image "https://" }} {{- $bg = $image }} {{- end }} @@ -32,4 +32,5 @@ {{- if and (eq $index (add $size -1)) (gt $size 1) }}</div>{{ end }} {{- end }} </div> {{ end }} </div> {{- end -}} layouts/blog/list.html
@@ -5,15 +5,15 @@ {{- $size := $paginator.PageSize }} {{- $scratch := newScratch }} {{- range $index, $value := $paginator.Pages }} {{ if isset .Params "image" }} {{ $scratch.Set "image" .Params.image }} {{ else }} {{ $scratch.Set "image" "thumbnail.svg" }} {{ end }} {{ $image := $scratch.Get "image" }} {{ $bg := $image }} {{- if isset .Params "image" }} {{- $scratch.Set "image" .Params.image }} {{- else }} {{- $scratch.Set "image" "thumbnail.svg" }} {{- end }} {{- $image := $scratch.Get "image" }} {{- $bg := $image }} {{- if ne (in $image "images") true }} {{ $bg = (absURL (printf "images/%s" $image)) }} {{- $bg = (absURL (printf "images/%s" $image)) }} {{- end }} {{- if in $image "https://" }} {{- $bg = $image }} @@ -34,6 +34,7 @@ {{- if and (eq $index (add $size -1)) (gt $size 1) }}</div>{{ end }} {{- end }} </div> </div> <!-- <a href='{{ absURL (printf "post/%s" "") }}' class=post_nav> <span class=post_next>View Archive <svg class="icon icon_scale"> @@ -41,4 +42,4 @@ </svg> </span> </a> --> {{ end }} {{- end }} layouts/partials/head/liteyoutube.html
@@ -1,24 +1,24 @@ {{ $baseurl := absURL "" }} {{ $includeLiteYT := false }} {{- $baseurl := absURL "" }} {{- $includeLiteYT := false }} <!-- begin search for liteyoutube shortcode. code borrowed from erichc Nov 2020 https://discourse.gohugo.io/t/automagically-loading-suitable-scripts-in-head/29429/8 --> {{ if .IsNode }} {{ range .Pages }} {{ range .Pages }} {{- if .IsNode }} {{- range .Pages }} {{- range .Pages }} <!-- another recursion because of the "/posts/xyz" structure; does work with category lists --> {{ $rawsummary := split .RawContent "<!--more-->" }} {{- $rawsummary := split .RawContent "<!--more-->" }} <!-- prepare for checking only the part of the article that will show up on the list page --> {{ if (findRE "liteyoutube" (index $rawsummary 0)) }} {{ $includeLiteYT = true }} {{ end }} {{ end }} {{ end }} {{ end }} {{ if (.HasShortcode "liteyoutube") }} {{ $includeLiteYT = true }} {{ end }} {{ if $includeLiteYT }} {{ $styles := printf "%s/css/lite-yt-embed.css" $baseurl }} {{ $scripts := printf "%s/js/lite-yt-embed.js" $baseurl }} <link rel="stylesheet" href={{ $styles }}> {{- if (findRE "liteyoutube" (index $rawsummary 0)) }} {{- $includeLiteYT = true }} {{- end }} {{- end }} {{- end }} {{- end }} {{- if (.HasShortcode "liteyoutube") }} {{- $includeLiteYT = true }} {{- end }} {{- if $includeLiteYT }} {{- $styles := printf "%s/css/lite-yt-embed.css" $baseurl }} {{- $scripts := printf "%s/js/lite-yt-embed.js" $baseurl }} <link rel=stylesheet href={{ $styles }}> <script src={{ $scripts }}></script> {{ end }} {{- end -}} layouts/partials/nav.html
@@ -8,7 +8,7 @@ <img src="{{ $litPath }}" alt="{{ site.Title }} Logo"> </picture> <div class="nav_toggle toggle" title='{{ T "site_menu" }}'> {{ partial "sprite" (dict "icon" "harmburger") }} {{- partial "sprite" (dict "icon" "harmburger") }} </div> </a> <ul class="nav_body"> @@ -29,20 +29,20 @@ <a class="nav-link{{if $active }} active{{end}}" href="{{ $url }}"><span{{if $active }} class="active"{{end}}>{{ T .Identifier | default .Name }}</span></a> </li> {{- end }} {{ $repo := $config.source }} {{ with $config.source }} {{- $repo := $config.source }} {{- with $config.source }} <li class="nav-item nav_repo"> <a class="nav-link" href="{{ .url }}" target="_blank"> {{ if .iconLight }} {{- if .iconLight }} {{- $litPath := absURL .iconLight }} {{- $darkPath := absURL .iconDark }} <picture data-lit="{{ $litPath }}" data-dark="{{ $darkPath }}"> <img src="{{ $litPath }}" alt="{{ .name }} Repo"> </picture> {{ else }}{{ .name }}{{ end }} {{- else }}{{ .name }}{{ end }} </a> </li> {{ end }} {{- end }} <li class="nav-item">{{ partial "mode" . }}</li> </ul> </nav> layouts/partials/opengraph.html
@@ -3,4 +3,4 @@ {{- template "_internal/twitter_cards.html" . -}} {{- if hugo.IsProduction }} {{- template "_internal/google_analytics.html" . }} {{- end }} {{- end -}}