template installiert

This commit is contained in:
2026-10-17 08:45:08 +02:00
parent ec2da90945
commit 7532843b67
378 changed files with 13317 additions and 8 deletions
+1
View File
@@ -0,0 +1 @@
<div style="clear: both;"></div>
+22
View File
@@ -0,0 +1,22 @@
{{- $user := "" -}}
{{- $id := "" -}}
{{- $file := "" -}}
{{- if .IsNamedParams -}}
{{- $user = .Get "user" -}}
{{- $id = .Get "id" -}}
{{- $file = .Get "file" -}}
{{- else -}}
{{- $user = .Get 0 -}}
{{- $id = .Get 1 -}}
{{- if ge (len .Params) 3 -}}
{{- $file = .Get 2 -}}
{{- end -}}
{{- end -}}
{{- if or (not $user) (not $id) -}}
{{- errorf "The gist shortcode requires a GitHub user and gist ID in %q" .Page.File.Path -}}
{{- end -}}
{{- $src := printf "https://gist.github.com/%s/%s.js" $user $id -}}
{{- with $file -}}
{{- $src = printf "%s?file=%s" $src (. | urlquery) -}}
{{- end -}}
<script src="{{ $src | safeURL }}"></script>
+11
View File
@@ -0,0 +1,11 @@
{{- $src := .Get "src" -}}
{{- with $.Page.Resources.GetMatch $src -}}
{{- partial "responsive-image.html" (dict
"image" .
"alt" ($.Get "alt")
"widths" (slice 711 1422 2133)
"sizes" "(min-width: 711px) 711px, 100vw"
) -}}
{{- else -}}
{{- errorf "The image shortcode could not find page resource %q in %q" $src $.Page.File.Path -}}
{{- end -}}
+1
View File
@@ -0,0 +1 @@
{{.Inner}}
+34
View File
@@ -0,0 +1,34 @@
{{- $src := .Get "src" -}}
{{- $displayWidth := 711 -}}
{{- with .Get "width" -}}
{{- $displayWidth = int (trim . "px") -}}
{{- end -}}
{{- $class := "small-img" -}}
{{- $pictureClass := "small-pic" -}}
{{- with .Get "smartfloat" -}}
{{- if or (eq . "left") (eq . "right") -}}
{{- $pictureClass = printf "%s smartfloat-%s" $pictureClass . -}}
{{- end -}}
{{- end -}}
{{- if eq (.Get "clear") "true" -}}
{{- $pictureClass = printf "%s clear" $pictureClass -}}
{{- end -}}
{{- $style := "" -}}
{{- $sizes := "(min-width: 711px) 711px, 100vw" -}}
{{- with .Get "width" -}}
{{- $style = printf "width: %s;" . -}}
{{- $sizes = . -}}
{{- end -}}
{{- with $.Page.Resources.GetMatch $src -}}
{{- partial "responsive-image.html" (dict
"image" .
"pictureClass" $pictureClass
"class" $class
"alt" ($.Get "alt")
"style" $style
"widths" (slice $displayWidth (mul $displayWidth 2) (mul $displayWidth 3))
"sizes" $sizes
) -}}
{{- else -}}
{{- errorf "The smallimg shortcode could not find page resource %q in %q" $src $.Page.File.Path -}}
{{- end -}}