aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/shortcodes/tweet.html
diff options
context:
space:
mode:
Diffstat (limited to 'themes/default/layouts/shortcodes/tweet.html')
-rw-r--r--themes/default/layouts/shortcodes/tweet.html18
1 files changed, 18 insertions, 0 deletions
diff --git a/themes/default/layouts/shortcodes/tweet.html b/themes/default/layouts/shortcodes/tweet.html
new file mode 100644
index 0000000..b4adfba
--- /dev/null
+++ b/themes/default/layouts/shortcodes/tweet.html
@@ -0,0 +1,18 @@
+{{- $user := default "jack" (.Get "user" | default (.Get 0)) -}}
+{{- $status := default "20" (.Get "status" | default (.Get 1)) -}}
+{{- $caption := default "Twitter Tweet" (.Get "caption" | default (.Get 2)) -}}
+
+<twitter-tweet>
+ <blockquote class="twitter-tweet">
+ <a href="https://twitter.com/{{ $user }}/status/{{ $status }}">
+ https://twitter.com/{{ $user }}/status/{{ $status }}
+ </a>
+ </blockquote>
+ <script
+ async
+ src="https://platform.twitter.com/widgets.js"
+ charset="utf-8">
+ </script>
+</twitter-tweet>
+
+<figcaption>{{ $caption }}</figcaption>