From 26c099aa807d8e67944f72be04a325f37da305d5 Mon Sep 17 00:00:00 2001
From: Volpeon <git@volpeon.ink>
Date: Sat, 18 Jun 2022 00:04:21 +0200
Subject: Added page type for art pieces

---
 templates/base.html                     | 30 ++-------------
 templates/feed_entry.xml                | 12 +++++-
 templates/layouts/categorized_list.html |  2 +-
 templates/layouts/exhibit.html          | 66 +++++++++++++++++++++++++++++++++
 templates/layouts/list.html             |  2 +-
 templates/layouts/page.html             | 34 +++++++++++++++--
 templates/layouts/redirect.html         |  4 +-
 templates/partials/gallery_card.html    |  8 ++--
 templates/partials/grid_card.html       |  8 ++--
 templates/partials/list_card.html       | 12 +++---
 10 files changed, 130 insertions(+), 48 deletions(-)
 create mode 100644 templates/layouts/exhibit.html

(limited to 'templates')

diff --git a/templates/base.html b/templates/base.html
index cfc40a4..4ffd690 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -52,7 +52,7 @@
     <link rel="stylesheet" href="/style.css?$style_hash$" />
 </head>
 
-<body itemscope itemtype="https://schema.org/WebPage">
+<body itemscope itemtype="https://schema.org/WebPage" class="t-no-js">
     <nav class="c-header" label="Mainmenu">
         <a class="c-header__item c-header__item--icon" href="/" title="$site.title$" itemprop="isPartOf" itemscope itemtype="https://schema.org/WebSite" itemid="$site.url$">
             <svg class="c-header__icon" width="1em" height="1em" aria-label="Logo">
@@ -74,6 +74,8 @@ ${layouts/categorized_list()}
 ${layouts/list()}
     $elseif(layout.is_redirect)$
 ${layouts/redirect()}
+    $elseif(layout.is_exhibit)$
+${layouts/exhibit()}
     $else$
 ${layouts/page()}
     $endif$
@@ -85,32 +87,6 @@ ${layouts/page()}
         </div>
     </footer>
 
-    <div class="o-backdrop js-lightbox u-d-none t-dark">
-        <div class="o-lightbox">
-            <button class="o-lightbox__close-btn o-action-button o-action-button--quiet o-action-button--round">
-                <svg class="l-media__block o-icon" width="1em" height="1em" aria-hidden="true">
-                    <use href="/icons.svg#x"></use>
-                </svg>
-            </button>
-
-            <img class="o-lightbox__img" />
-
-            <button class="o-lightbox__prev-btn o-action-button o-action-button--quiet o-action-button--round">
-                <svg class="l-media__block o-icon" width="1em" height="1em" aria-hidden="true">
-                    <use href="/icons.svg#chevron-left"></use>
-                </svg>
-            </button>
-
-            <button class="o-lightbox__next-btn o-action-button o-action-button--quiet o-action-button--round">
-                <svg class="l-media__block o-icon" width="1em" height="1em" aria-hidden="true">
-                    <use href="/icons.svg#chevron-right"></use>
-                </svg>
-            </button>
-
-            <footer class="o-lightbox__footer"></footer>
-        </div>
-    </div>
-
     <script src="/main.js"></script>
     <!--script src="/snow.js"></script-->
 </body>
diff --git a/templates/feed_entry.xml b/templates/feed_entry.xml
index 03d6569..a71b579 100644
--- a/templates/feed_entry.xml
+++ b/templates/feed_entry.xml
@@ -22,4 +22,14 @@ $else$
         </author>
     $endfor$
 $endif$
-<content type="html"><![CDATA[$it.content$]]></content>
+<content type="html"><![CDATA[
+    $it.content$
+
+    $if(it.layout.is_exhibit)$
+        $for(it.images)$
+            <figure>
+                <img src="$it$" />
+            </figure>
+        $endfor$
+    $endif$
+]]></content>
diff --git a/templates/layouts/categorized_list.html b/templates/layouts/categorized_list.html
index 206c566..1a1048a 100644
--- a/templates/layouts/categorized_list.html
+++ b/templates/layouts/categorized_list.html
@@ -1,5 +1,5 @@
 <main
-    class="l-container l-container--pad-x l-container--pad-y l-container--narrow-125 h-feed"
+    class="c-main l-container l-container--pad-x l-container--pad-y l-container--narrow-125 h-feed"
     itemprop="mainPart"
     itemscope
     itemtype="https://schema.org/DataFeed"
diff --git a/templates/layouts/exhibit.html b/templates/layouts/exhibit.html
new file mode 100644
index 0000000..091859a
--- /dev/null
+++ b/templates/layouts/exhibit.html
@@ -0,0 +1,66 @@
+<main
+    itemprop="hasPart"
+    itemscope
+    itemtype="https://schema.org/$schema_type$"
+    itemid="$url.full$"
+>
+    <article class="h-entry">
+        <section class="c-exhibit js-lightbox">
+            <div class="c-exhibit__content o-lightbox">
+                <img class="o-lightbox__img" />
+            
+                <button class="o-lightbox__prev-btn o-action-button o-action-button--quiet o-action-button--round">
+                    <svg class="l-media__block o-icon" width="1em" height="1em" aria-hidden="true">
+                        <use href="/icons.svg#chevron-left"></use>
+                    </svg>
+                </button>
+            
+                <button class="o-lightbox__next-btn o-action-button o-action-button--quiet o-action-button--round">
+                    <svg class="l-media__block o-icon" width="1em" height="1em" aria-hidden="true">
+                        <use href="/icons.svg#chevron-right"></use>
+                    </svg>
+                </button>
+            
+                <footer class="o-lightbox__footer"></footer>
+            </div>            
+
+            <footer class="c-exhibit__footer">
+                <div class="l-container l-container--pad-x l-container--narrow-125">
+                    <div class="l-media l-media--200 u-pl-0 u-pr-0">
+                        <div class="l-media__block l-media__block--main">
+                            $if(date)$
+                                <small class="u-d-block u-d-none@sm-hi">
+                                    <time datetime="$date.yyyy_mm_dd$" class="dt-updated" itemprop="dateCreated">
+                                        $date.short$
+                                    </time>
+                                </small>
+                            $endif$
+                            <strong class="u-d-block u-elp" itemprop="name headline">$title$</strong>
+                        </div>
+                        $if(date)$
+                            <small class="l-media__block u-d-none@sm-lo">
+                                <time datetime="$date.yyyy_mm_dd$" itemprop="dateCreated">
+                                    $date.short$
+                                </time>
+                            </small>
+                        $endif$
+                    </div>
+                </div>
+            </footer>
+        </section>
+
+        <div class="l-container l-container--pad-x l-container--pad-y l-container--narrow-125 u-pt-400">
+            <div class="s-body s-colored-links s-headings s-blockquotes s-code s-lists s-tables s-alerts e-content" itemprop="articleBody">
+$body$
+
+                $for(images)$
+                    <figure class="c-figure js-lightbox__image u-d-none@js">
+                        <img src="$it$" />
+                    </figure>
+                $endfor$
+            </div>
+        </div>
+    </article>
+</main>
+
+<script src="/lightbox.js"></script>
diff --git a/templates/layouts/list.html b/templates/layouts/list.html
index 66a08fd..508ff4c 100644
--- a/templates/layouts/list.html
+++ b/templates/layouts/list.html
@@ -1,5 +1,5 @@
 <main
-    class="l-container l-container--pad-x l-container--pad-y l-container--narrow-125 h-feed"
+    class="c-main l-container l-container--pad-x l-container--pad-y l-container--narrow-125 h-feed"
     itemprop="mainPart"
     itemscope
     itemtype="https://schema.org/DataFeed"
diff --git a/templates/layouts/page.html b/templates/layouts/page.html
index f65a1cf..4058748 100644
--- a/templates/layouts/page.html
+++ b/templates/layouts/page.html
@@ -1,5 +1,5 @@
 <main
-    class="l-container l-container--pad-x l-container--pad-y l-container--narrow-125"
+    class="c-main l-container l-container--pad-x l-container--pad-y l-container--narrow-125"
     itemprop="hasPart"
     itemscope
     itemtype="https://schema.org/$schema_type$"
@@ -7,9 +7,9 @@
 >
     <article class="h-entry">
         $if(date)$
-            <div class="o-badge s-body__meta u-mb-125 dt-updated">
+            <time datetime="$date.yyyy_mm_dd$" class="o-badge s-body__meta u-mb-125 dt-updated" itemprop="dateCreated">
                 $date.long$
-            </div>
+            </time>
         $endif$
 
         <h1 class="o-heading o-heading--xxl u-mt-0 p-name" itemprop="name headline">
@@ -35,4 +35,32 @@ $body$
             </footer>
         $endif$
     </article>
+
+    <div class="o-backdrop js-lightbox js-lightbox--closeable u-d-none t-dark">
+        <div class="o-lightbox">
+            <button class="o-lightbox__close-btn o-action-button o-action-button--quiet o-action-button--round">
+                <svg class="l-media__block o-icon" width="1em" height="1em" aria-hidden="true">
+                    <use href="/icons.svg#x"></use>
+                </svg>
+            </button>
+        
+            <img class="o-lightbox__img" />
+        
+            <button class="o-lightbox__prev-btn o-action-button o-action-button--quiet o-action-button--round">
+                <svg class="l-media__block o-icon" width="1em" height="1em" aria-hidden="true">
+                    <use href="/icons.svg#chevron-left"></use>
+                </svg>
+            </button>
+        
+            <button class="o-lightbox__next-btn o-action-button o-action-button--quiet o-action-button--round">
+                <svg class="l-media__block o-icon" width="1em" height="1em" aria-hidden="true">
+                    <use href="/icons.svg#chevron-right"></use>
+                </svg>
+            </button>
+        
+            <footer class="o-lightbox__footer"></footer>
+        </div>        
+    </div>
 </main>
+
+<script src="/lightbox.js"></script>
diff --git a/templates/layouts/redirect.html b/templates/layouts/redirect.html
index 9f78dec..6684bd2 100644
--- a/templates/layouts/redirect.html
+++ b/templates/layouts/redirect.html
@@ -1,4 +1,4 @@
-<article class="l-container l-container--pad-x l-container--pad-y l-container--narrow s-body s-colored-links s-headlines">
+<main class="c-main l-container l-container--pad-x l-container--pad-y l-container--narrow s-body s-colored-links s-headlines">
     <h1 class="u-mt-0"><span class="s-headlines__title-inner">$title$</span></h1>
     <p>This page should redirect you to <a href="$url.full$">$url.full$</a> in 3 seconds.</p>
-</article>
+</main>
diff --git a/templates/partials/gallery_card.html b/templates/partials/gallery_card.html
index deffb3f..6692888 100644
--- a/templates/partials/gallery_card.html
+++ b/templates/partials/gallery_card.html
@@ -37,11 +37,11 @@ $if(it.thumbnail)$
                 <small class="u-d-block u-elp">$it.category$</small>
                 <strong class="u-d-block u-elp">$it.title$</strong>
             $elseif(it.date)$
-                <time datetime="$it.date.yyyy_mm_dd$" itemprop="dateCreated">
-                    <small>
+                <small class="u-d-block">
+                    <time datetime="$it.date.yyyy_mm_dd$" itemprop="dateCreated">
                         $it.date.long$
-                    </small>
-                </time>
+                    </time>
+                </small>
                 <strong class="u-d-block u-elp">$it.title$</strong>
             $else$
                 <span class="p-name" itemprop="name headline">
diff --git a/templates/partials/grid_card.html b/templates/partials/grid_card.html
index 9af9415..003e59f 100644
--- a/templates/partials/grid_card.html
+++ b/templates/partials/grid_card.html
@@ -24,11 +24,11 @@ $if(it.url)$
                 <small class="u-d-block u-elp">$it.category$</small>
                 <strong class="u-d-block u-elp">$it.title$</strong>
             $elseif(it.date)$
-                <time datetime="$it.date.yyyy_mm_dd$" itemprop="dateCreated">
-                    <small>
+                <small class="u-d-block">
+                    <time datetime="$it.date.yyyy_mm_dd$" itemprop="dateCreated">
                         $it.date.long$
-                    </small>
-                </time>
+                    </time>
+                </small>
                 <strong class="u-d-block u-elp">$it.title$</strong>
             $else$
                 <span class="p-name" itemprop="name headline">
diff --git a/templates/partials/list_card.html b/templates/partials/list_card.html
index 6cf0e67..dc9111e 100644
--- a/templates/partials/list_card.html
+++ b/templates/partials/list_card.html
@@ -24,7 +24,9 @@ $if(it.url)$
                 <small class="u-d-block">$it.category$</small>
                 <strong class="u-d-block">$it.title$</strong>
             $elseif(it.date)$
-                <time datetime="$it.date.yyyy_mm_dd$" class="u-d-block"><small>$it.date.long$</small></time>
+                <small>
+                    <time datetime="$it.date.yyyy_mm_dd$">$it.date.long$</time>
+                </small>
                 <strong class="u-d-block">$it.title$</strong>
             $else$
                 <span class="p-name" itemprop="name headline">
@@ -44,11 +46,11 @@ $if(it.url)$
                 $it.category$
             </small>
         $elseif(it.date)$
-            <time datetime="$it.date.yyyy_mm_dd$" class="l-media__block u-d-none@sm-lo" itemprop="dateCreated">
-                <small>
+            <small class="l-media__block u-d-none@sm-lo">
+                <time datetime="$it.date.yyyy_mm_dd$" itemprop="dateCreated">
                     $it.date.short$
-                </small>
-            </time>
+                </time>
+            </small>
         $endif$
         $if(it.post_icon)$
             <svg class="l-media__block o-icon" width="1em" height="1em" aria-hidden="true">
-- 
cgit v1.2.3-70-g09d2