ADD rel-tag to socials, ADD scrolleventlistener, ADD totop-button, ADD scroll progress bar

This commit is contained in:
Hoernschen 2024-01-08 10:23:35 +01:00
parent 553285c04b
commit a25ea40300
Signed by: hoernschen
GPG key ID: 37591FAF4E6D3462
9 changed files with 105 additions and 17 deletions

View file

@ -3,4 +3,7 @@ type: string - default: link
text: string (optional)
url: string
-->
<a href="{{ .url }}"><i class="{{ if .type }} icon-{{ .type }} {{ else }} icon-link {{ end }}"></i>{{ if .text }} {{ .text }}{{ end }}</a>
<a href="{{ .url }}" rel="{{ .rel }}">
<i class="{{ if .type }} icon-{{ .type }} {{ else }} icon-link {{ end }}"></i>
{{ if .text }} {{ .text }}{{ end }}
</a>

View file

@ -3,8 +3,25 @@ type: string - default
url: string
alt: string
-->
{{ $avatar := "avatar"}}
<img class="{{if eq .type $avatar}} avatar {{end}}" alt="{{ .alt }}" src="{{ .url }}">
<picture>
<source
type="image/avif"
src="{{ .url }}.avif"
/>
<source
type="image/webp"
src="{{ .url }}.webp"
/>
<img
class="{{if eq .type $avatar}} avatar {{end}}"
alt="{{ .alt }}"
src="{{ .url }}"
loading="lazy"
decoding="async"
>
</picture>
{{/* https://www.brycewray.com/posts/2023/05/better-code-image-processing-hugo-render-hook-edition/ */}}