summary refs log tree commit diff stats
path: root/templates
diff options
context:
space:
mode:
authorAndinus <andinus@nand.sh>2022-06-11 13:59:33 +0530
committerAndinus <andinus@nand.sh>2022-06-11 14:03:34 +0530
commitf156f380d4de118e31036e80144154bdcb664ed6 (patch)
tree5373a1aff0699774aafa7979c4c5584669187eb1 /templates
parent89c60aee5a602ed5bfd73a9d5bcbbf9945aac44f (diff)
downloadcrater-f156f380d4de118e31036e80144154bdcb664ed6.tar.gz
Display gallery title, fix authentication, show directories
- Earlier non-authenticated users could access the images too.
- Serve original image if thumbnail doesn't exist.
- Show directories in gallery.
- Remove lazy loading attribute.
Diffstat (limited to 'templates')
-rw-r--r--templates/gallery.crotmp8
1 files changed, 7 insertions, 1 deletions
diff --git a/templates/gallery.crotmp b/templates/gallery.crotmp
index 6aead73..253339e 100644
--- a/templates/gallery.crotmp
+++ b/templates/gallery.crotmp
@@ -1,5 +1,8 @@
 <:use 'templates/base.crotmp'>
   <|page(.title)>
+    <noscript>
+      <div class="alert" role="alert">JavaScript required.</div>
+    </noscript>
     <div id="loading">
       <label for="loading-progress">Loading Images:</label>
       <progress id="loading-progress" max="100" value="0"></progress>
@@ -10,8 +13,11 @@
     </div>
     <div id="gallery">
       <@gallery : $i>
+        <?{ $i.<type> eq 'directory' }>
+        <div class="directory"><$i.<text>></div>
+        </?>
         <?{ $i.<type> eq 'img' }>
-        <img alt="<$i.<alt>>" src="<$i.<src>>" loading="lazy">
+        <img alt="<$i.<alt>>" src="/resources/img/<$i.<src>>">
         </?>
         <?{ $i.<type> eq 'text' }>
         <div class="text"><$i.<text>></div>