aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValentin Popov <info@valentineus.link>2018-04-25 00:56:34 +0300
committerValentin Popov <info@valentineus.link>2018-04-25 00:56:34 +0300
commit023d6ce03d89b37b5bdbf628f66b0c72e348c23a (patch)
treed030898ed537c0a8aadfc6b5768f40c330df1580
parentb69ef27a48c4d2d296e722cb3025d87f528c448a (diff)
downloadpopov.link-023d6ce03d89b37b5bdbf628f66b0c72e348c23a.tar.xz
popov.link-023d6ce03d89b37b5bdbf628f66b0c72e348c23a.zip
Code snippets for inserting images
Signed-off-by: Valentin Popov <info@valentineus.link>
-rw-r--r--_includes/image.html11
1 files changed, 11 insertions, 0 deletions
diff --git a/_includes/image.html b/_includes/image.html
new file mode 100644
index 0000000..d6be65c
--- /dev/null
+++ b/_includes/image.html
@@ -0,0 +1,11 @@
+{% assign alternative = include.alt | strip_newlines | strip_html | strip | normalize_whitespace | smartify | downcase | capitalize %}
+{% assign identifier = include.id | strip_newlines | strip_html | strip | normalize_whitespace | slugify %}
+{% assign source = include.src | strip_newlines | strip_html | strip | normalize_whitespace | relative_url | uri_escape %}
+
+<a href="#{{ identifier }}">
+ <img alt="{{ alternative }}" src="{{ source }}" />
+</a>
+
+<a href="#" class="fullscreen" id="{{ identifier }}">
+ <img alt="{{ alternative }}" src="{{ source }}" />
+</a>