From 82f559c17da9ca638ff12e481ea8afeb512b89c7 Mon Sep 17 00:00:00 2001
From: Dominik George <dominik.george@teckids.org>
Date: Sun, 21 Nov 2021 12:05:32 +0100
Subject: [PATCH] Add support for marking image alignment in alt

---
 pelican_theme_teckids/static/css/style.css | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/pelican_theme_teckids/static/css/style.css b/pelican_theme_teckids/static/css/style.css
index ad0a216..f9475b1 100644
--- a/pelican_theme_teckids/static/css/style.css
+++ b/pelican_theme_teckids/static/css/style.css
@@ -206,3 +206,24 @@ time.icon span {
 img, svg {
     max-width: 100%;
 }
+
+/* Allow image alignment with arrow i nalt attribute.
+ * Thanks to https://stackoverflow.com/a/39614958/3035850
+*/
+img[alt$=">"] {
+    float: right;
+    max-height: 20em;
+    margin: 0 0 2em 2em;
+}
+img[alt$="<"] {
+    float: left;
+    max-height: 20em;
+    margin: 0 2em 2em 0;
+}
+img[alt$="><"] {
+    display: block;
+    max-width: 100%;
+    height: auto;
+    margin: auto;
+    float: none!important;
+}
-- 
GitLab