diff options
author | Andinus <andinus@nand.sh> | 2022-06-10 23:13:14 +0530 |
---|---|---|
committer | Andinus <andinus@nand.sh> | 2022-06-10 23:16:27 +0530 |
commit | bef200b4669f058ce43ec9c0a3583de7fac558e3 (patch) | |
tree | 0b25b603e5ba3f46c2c8396cfcf036923771471e /templates/gallery.crotmp | |
parent | 3a443f9380478ab30a2ba7dc173f5e6de880de03 (diff) | |
download | crater-bef200b4669f058ce43ec9c0a3583de7fac558e3.tar.gz |
Add alt tags to images, fix flash of unstyled content
- FOUC: On firefox, maybe the '@import' rule caused this. Also tried out lightGallery.js for lightbox, it doesn't work with text & anyways, it's buggy with bricks.js & you have to request license key.
Diffstat (limited to 'templates/gallery.crotmp')
-rw-r--r-- | templates/gallery.crotmp | 36 |
1 files changed, 15 insertions, 21 deletions
diff --git a/templates/gallery.crotmp b/templates/gallery.crotmp index 25c55ea..6afef0a 100644 --- a/templates/gallery.crotmp +++ b/templates/gallery.crotmp @@ -1,24 +1,18 @@ <:use 'templates/base.crotmp'> -<|page(.title)> -<div id="gallery"> - <@gallery : $i> - - <?{ $i.<type> eq 'img' }> - <img src="<$i.<src>>" loading="lazy"> - </?> - - <?{ $i.<type> eq 'text' }> - <div class="text"> - <$i.<text>> + <|page(.title)> + <div id="gallery"> + <@gallery : $i> + <?{ $i.<type> eq 'img' }> + <img alt="<$i.<alt>>" src="<$i.<src>>" loading="lazy"> + </?> + <?{ $i.<type> eq 'text' }> + <div class="text"><$i.<text>></div> + </?> + <?{ $i.<type> eq 'heading' }> + <h1 class="heading"><$i.<text>></h1> + </?> + </@> </div> - </?> - - <?{ $i.<type> eq 'heading' }> - <h1 class="heading"><$i.<text>></h1> - </?> - - </@> -</div> -<script type="text/javascript" src="/resources/js/bricks.js"></script> -<script type="text/javascript" src="/resources/js/gallery.js"></script> + <script type="text/javascript" src="/resources/js/bricks.js"></script> + <script type="text/javascript" src="/resources/js/gallery.js"></script> </|> |