add tella theme

This commit is contained in:
2023-08-07 10:59:23 +02:00
parent 35bc0c2cac
commit e203dc7597
107 changed files with 4495 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
{{ $name := .Get "src" }}
{{ $extention := .Get "ext" | default "jpg" }}
{{ $alt := .Get "alt" }}
{{ $width := .Get "width" | default "auto" }}
{{ $minipath := printf "/posts/%s/%s.%s" .Page.File.ContentBaseName $name $extention }}
{{ $path := printf "content%s.webp" $minipath }}
{{- if (fileExists $path) -}}
<picture>
<source type="image/webp" srcset="{{ $minipath }}.webp">
<img src="{{ $minipath }}" />
</picture>
{{- else -}}
<img src="{{ $minipath }}" />
{{- end -}}