From 3d42f67820abbf65fd2beefd4291e7d92a26bc43 Mon Sep 17 00:00:00 2001 From: Gorri <60433201+gorrig@users.noreply.github.com> Date: Fri, 13 Jan 2023 19:35:32 +0100 Subject: [PATCH] Add files via upload --- layouts/shortcodes/figure.html | 29 +++++++ layouts/shortcodes/gallery.html | 41 ++++++++++ layouts/shortcodes/load-photoswipe-theme.html | 75 +++++++++++++++++++ layouts/shortcodes/load-photoswipe.html | 71 ++++++++++++++++++ 4 files changed, 216 insertions(+) create mode 100644 layouts/shortcodes/figure.html create mode 100644 layouts/shortcodes/gallery.html create mode 100644 layouts/shortcodes/load-photoswipe-theme.html create mode 100644 layouts/shortcodes/load-photoswipe.html diff --git a/layouts/shortcodes/figure.html b/layouts/shortcodes/figure.html new file mode 100644 index 0000000..3676c68 --- /dev/null +++ b/layouts/shortcodes/figure.html @@ -0,0 +1,29 @@ + + +{{- if not ($.Page.Scratch.Get "figurecount") }}{{ end }} +{{- $.Page.Scratch.Add "figurecount" 1 -}} + +{{- $thumb := .Get "src" | default (printf "%s." (.Get "thumb") | replace (.Get "link") ".") }} +
+
+
+ +
+ {{ with .Get "link" | default (.Get "src") }}{{ end }} + {{- if or (or (.Get "title") (.Get "caption")) (.Get "attr")}} +
+ {{- with .Get "title" }}

{{.}}

{{ end }} + {{- if or (.Get "caption") (.Get "attr")}} +

+ {{- .Get "caption" -}} + {{- with .Get "attrlink"}}{{ .Get "attr" }}{{ else }}{{ .Get "attr"}}{{ end -}} +

+ {{- end }} +
+ {{- end }} +
+
diff --git a/layouts/shortcodes/gallery.html b/layouts/shortcodes/gallery.html new file mode 100644 index 0000000..6c644b9 --- /dev/null +++ b/layouts/shortcodes/gallery.html @@ -0,0 +1,41 @@ + + +{{- if not ($.Page.Scratch.Get "figurecount") }}{{ end }} +{{- $.Page.Scratch.Add "figurecount" 1 }} +{{ $baseURL := .Site.BaseURL }} + diff --git a/layouts/shortcodes/load-photoswipe-theme.html b/layouts/shortcodes/load-photoswipe-theme.html new file mode 100644 index 0000000..a3340fe --- /dev/null +++ b/layouts/shortcodes/load-photoswipe-theme.html @@ -0,0 +1,75 @@ + + + +{{ if not ($.Page.Scratch.Get "photoswipeloaded") }} + {{ $.Page.Scratch.Set "photoswipeloaded" 1 }} + + + + + + + + + + + +{{ end }} \ No newline at end of file diff --git a/layouts/shortcodes/load-photoswipe.html b/layouts/shortcodes/load-photoswipe.html new file mode 100644 index 0000000..06b4249 --- /dev/null +++ b/layouts/shortcodes/load-photoswipe.html @@ -0,0 +1,71 @@ + + + +{{ if not ($.Page.Scratch.Get "photoswipeloaded") }} + {{ $.Page.Scratch.Set "photoswipeloaded" 1 }} + + + + + + + + + + + + + +{{ end }} \ No newline at end of file