aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/shortcodes/imgur-video.html
diff options
context:
space:
mode:
Diffstat (limited to 'themes/default/layouts/shortcodes/imgur-video.html')
-rw-r--r--themes/default/layouts/shortcodes/imgur-video.html20
1 files changed, 20 insertions, 0 deletions
diff --git a/themes/default/layouts/shortcodes/imgur-video.html b/themes/default/layouts/shortcodes/imgur-video.html
new file mode 100644
index 0000000..e6fabdd
--- /dev/null
+++ b/themes/default/layouts/shortcodes/imgur-video.html
@@ -0,0 +1,20 @@
+{{- $id := default "uVrh84e" (.Get "id" | default (.Get 0)) -}}
+{{- $title := default "Imgur Gif" (.Get "title" | default (.Get 1)) -}}
+
+<imgur-video>
+ <blockquote
+ class="imgur-embed-pub"
+ lang="en"
+ data-id="{{ $id }}"
+ data-context="false">
+ <a href="//imgur.com/{{ $id }}"></a>
+ </blockquote>
+ <script async src="//s.imgur.com/min/embed.js" charset="utf-8"></script>
+ <noscript>
+ <a href="//imgur.com/{{ $id }}">imgur.com/{{ $id }}</a>
+ </noscript>
+ <figcaption>
+ {{ $title | markdownify }}:
+ {{ print "[Link](https://imgur.com/" $id ")" | markdownify }}
+ </figcaption>
+</imgur-video>