Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/AlexFinn/simple-a.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/shortcodes/fig.html')
-rw-r--r--layouts/shortcodes/fig.html18
1 files changed, 18 insertions, 0 deletions
diff --git a/layouts/shortcodes/fig.html b/layouts/shortcodes/fig.html
new file mode 100644
index 0000000..54d1794
--- /dev/null
+++ b/layouts/shortcodes/fig.html
@@ -0,0 +1,18 @@
+<!-- image -->
+<figure {{ with .Get "class" }}class="{{.}}"{{ end }}>
+ {{ with .Get "link"}}<a href="{{.}}">{{ end }}
+ <img src="{{ .Get "src" }}" {{ if or (.Get "alt") (.Get "caption") }}alt="{{ with .Get "alt"}}{{.}}{{else}}{{ .Get "caption" }}{{ end }}"{{ end }} />
+ {{ if .Get "link"}}</a>{{ end }}
+ {{ if or (or (.Get "title") (.Get "caption")) (.Get "attr")}}
+ <figcaption>{{ if isset .Params "title" }}
+ {{ .Get "title" }}{{ end }}
+ {{ if or (.Get "caption") (.Get "attr")}}<p>
+ {{ .Get "caption" }}
+ {{ with .Get "attrlink"}}<a href="{{.}}"> {{ end }}
+ {{ .Get "attr" }}
+ {{ if .Get "attrlink"}}</a> {{ end }}
+ </p> {{ end }}
+ </figcaption>
+ {{ end }}
+</figure>
+<!-- image --> \ No newline at end of file