diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/base.html | 27 | ||||
-rw-r--r-- | templates/layouts/dated_list.html (renamed from templates/list.html) | 4 | ||||
-rw-r--r-- | templates/layouts/index.html | 44 | ||||
-rw-r--r-- | templates/layouts/page.html | 12 | ||||
-rw-r--r-- | templates/page.html | 1 | ||||
-rw-r--r-- | templates/partials/pageHeader.html | 17 | ||||
-rw-r--r-- | templates/partials/pageHeaderSm.html | 10 |
7 files changed, 63 insertions, 52 deletions
diff --git a/templates/base.html b/templates/base.html index b4a2953..da3dec9 100644 --- a/templates/base.html +++ b/templates/base.html | |||
@@ -45,33 +45,14 @@ | |||
45 | <main class="c-page s-page l-container l-container--content l-container--pad-v"> | 45 | <main class="c-page s-page l-container l-container--content l-container--pad-v"> |
46 | <div class="c-page__content"> | 46 | <div class="c-page__content"> |
47 | $if(section.is_index)$ | 47 | $if(section.is_index)$ |
48 | <header class="c-page-header u-hidden@sm-down" role="presentation"> | 48 | ${layouts/index()} |
49 | ${partials/pageHeader()} | 49 | $elseif(layout.is_dated_list)$ |
50 | </header> | 50 | ${layouts/dated_list()} |
51 | |||
52 | ${page()} | ||
53 | $elseif(pages)$ | ||
54 | ${list()} | ||
55 | $else$ | 51 | $else$ |
56 | ${page()} | 52 | ${layouts/page()} |
57 | $endif$ | 53 | $endif$ |
58 | </div> | 54 | </div> |
59 | </main> | 55 | </main> |
60 | |||
61 | $if(section.is_index)$ | ||
62 | <template id="header-sm"> | ||
63 | ${partials/pageHeaderSm()} | ||
64 | </template> | ||
65 | |||
66 | <script> | ||
67 | var headerEl = document.querySelector(".c-page-header"); | ||
68 | var headerTemplateEl = document.getElementById("header-sm"); | ||
69 | var headerSmEl = headerTemplateEl.content.cloneNode("true"); | ||
70 | |||
71 | headerEl.classList.remove("u-hidden@sm-down"); | ||
72 | headerEl.appendChild(headerSmEl); | ||
73 | </script> | ||
74 | $endif$ | ||
75 | </body> | 56 | </body> |
76 | 57 | ||
77 | </html> | 58 | </html> |
diff --git a/templates/list.html b/templates/layouts/dated_list.html index d74681c..0a279f0 100644 --- a/templates/list.html +++ b/templates/layouts/dated_list.html | |||
@@ -1,3 +1,5 @@ | |||
1 | <h1 class="c-page__prefixed c-page__prefixed--h1">$title$</h1> | ||
2 | |||
1 | $body$ | 3 | $body$ |
2 | 4 | ||
3 | $if(categories)$ | 5 | $if(categories)$ |
@@ -12,7 +14,7 @@ $for(pages.by_year)$ | |||
12 | <ul> | 14 | <ul> |
13 | $for(it.value)$ | 15 | $for(it.value)$ |
14 | <li class="c-page__prefixed c-page__prefixed--ref"> | 16 | <li class="c-page__prefixed c-page__prefixed--ref"> |
15 | <a href="$it.url.rel$">$it.category/uppercase$ $it.date.yyyy_mm_dd$ - $it.title$</a> | 17 | <a href="$it.url.rel$">$it.category.id/uppercase$ $it.date.yyyy_mm_dd$ - $it.title$</a> |
16 | </li> | 18 | </li> |
17 | $endfor$ | 19 | $endfor$ |
18 | </ul> | 20 | </ul> |
diff --git a/templates/layouts/index.html b/templates/layouts/index.html new file mode 100644 index 0000000..144d1ed --- /dev/null +++ b/templates/layouts/index.html | |||
@@ -0,0 +1,44 @@ | |||
1 | <header class="c-hero u-hidden@sm-down" role="presentation"> | ||
2 | $-- ' | ' ' ' ' ' | | | ' ' | ||
3 | $-- | ' ' ' //\_ ' | ' . | ' ' | ||
4 | $-- .| ' ____,...,______..,_~`` -`.., ' | ' | ' ' | ||
5 | $-- | _,~´"' , . ,~--´ ' _| | . |~~.__ ' ' | ||
6 | $-- | | ,-" _.-|~/ |..,____,) ,/,,"' '_( | ' |) ) ' ' | ||
7 | $-- '| \__,~"´ /:) / |:\ \ ,~( ) . | | ) `, ' _,--. | ||
8 | $-- ___\___.___:____(:/\_-,______\:.\_-,____.__\_.\______.__:___\__.___)_.___,/_____ | ||
9 | $-- ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ | ||
10 | |||
11 | <pre class="c-hero__pre c-page__prefixed c-page__prefixed--pre u-mt0 u-hidden@sm-down"> | ||
12 | ' | ' ' ' ' ' | | | ' ' | ||
13 | | ' ' ' <strong>//\_</strong> ' | ' . | ' ' | ||
14 | .| ' <strong>____,...,______..,_~`` -`..,</strong> ' | ' | ' ' | ||
15 | | <strong>_,~´"' , . ,~--´</strong> ' _| | . |~~.__ ' ' | ||
16 | | | <strong>,-" _.-|~/ |..,____,) ,/,,"'</strong> '_( | ' |) ) ' ' | ||
17 | '| <strong>\__,~"´ /:) / |:\ \</strong> ,~( ) . | | ) `, ' _,--. | ||
18 | \ . : <strong>(:/\_-, \:.\_-,</strong> . \ .\ . : \ . ) . ' ,/ </pre> | ||
19 | |||
20 | </header> | ||
21 | |||
22 | $body$ | ||
23 | |||
24 | <template id="header-sm"> | ||
25 | $-- .| //\__ ' .' | . | ' . ' | ||
26 | $-- | _.~-"""-----~`` ,-´ ' ' |' | ' ' | ||
27 | $-- '| .´ ,~'\ ).,__,)/,," ' . ' | | | ' .' | ||
28 | $-- |_ `~´ (/\\, (/\\, _' '_ _| ' |_ _' '_ | ||
29 | |||
30 | <pre class="c-hero__pre c-page__prefixed c-page__prefixed--pre u-mt0 $if(section.is_index)$u-hidden@sm-up$endif$"> | ||
31 | .| <strong> //\__</strong> ' .' | . | ' . ' | ||
32 | | <strong> _.~-"""-----~`` ,-´</strong> ' ' |' | ' ' | ||
33 | '| <strong>.´ ,~'\ ).,__,)/,," </strong> ' . ' | | | ' .' | ||
34 | |_ <strong>`~´ (/\\, (/\\, </strong> _' '_ _| ' |_ _' '_</pre> | ||
35 | </template> | ||
36 | |||
37 | <script> | ||
38 | var headerEl = document.querySelector(".c-hero"); | ||
39 | var headerTemplateEl = document.getElementById("header-sm"); | ||
40 | var headerSmEl = headerTemplateEl.content.cloneNode("true"); | ||
41 | |||
42 | headerEl.classList.remove("u-hidden@sm-down"); | ||
43 | headerEl.appendChild(headerSmEl); | ||
44 | </script> | ||
diff --git a/templates/layouts/page.html b/templates/layouts/page.html new file mode 100644 index 0000000..332a846 --- /dev/null +++ b/templates/layouts/page.html | |||
@@ -0,0 +1,12 @@ | |||
1 | <header class="c-page__header"> | ||
2 | <h1 class="c-page__prefixed c-page__prefixed--h1 c-page__header__title">$title$</h1> | ||
3 | $if(date)$ | ||
4 | <h2 class="c-page__header__meta">$date.yyyy_mm_dd$$if(category)$ in $category.name$$endif$</h2> | ||
5 | $elseif(category)$ | ||
6 | <h2 class="c-page__header__meta">in $category.name$</h2> | ||
7 | $endif$ | ||
8 | </header> | ||
9 | |||
10 | <section> | ||
11 | $body$ | ||
12 | </section> | ||
diff --git a/templates/page.html b/templates/page.html deleted file mode 100644 index 36d66c2..0000000 --- a/templates/page.html +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | $body$ | ||
diff --git a/templates/partials/pageHeader.html b/templates/partials/pageHeader.html deleted file mode 100644 index 95e55f7..0000000 --- a/templates/partials/pageHeader.html +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | $-- ' | ' ' ' ' ' | | | ' ' | ||
2 | $-- | ' ' ' //\_ ' | ' . | ' ' | ||
3 | $-- .| ' ____,...,______..,_~`` -`.., ' | ' | ' ' | ||
4 | $-- | _,~´"' , . ,~--´ ' _| | . |~~.__ ' ' | ||
5 | $-- | | ,-" _.-|~/ |..,____,) ,/,,"' '_( | ' |) ) ' ' | ||
6 | $-- '| \__,~"´ /:) / |:\ \ ,~( ) . | | ) `, ' _,--. | ||
7 | $-- ___\___.___:____(:/\_-,______\:.\_-,____.__\_.\______.__:___\__.___)_.___,/_____ | ||
8 | $-- ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ | ||
9 | |||
10 | <pre class="c-page-header__pre c-page__prefixed c-page__prefixed--pre u-mt0 u-hidden@sm-down"> | ||
11 | ' | ' ' ' ' ' | | | ' ' | ||
12 | | ' ' ' <strong>//\_</strong> ' | ' . | ' ' | ||
13 | .| ' <strong>____,...,______..,_~`` -`..,</strong> ' | ' | ' ' | ||
14 | | <strong>_,~´"' , . ,~--´</strong> ' _| | . |~~.__ ' ' | ||
15 | | | <strong>,-" _.-|~/ |..,____,) ,/,,"'</strong> '_( | ' |) ) ' ' | ||
16 | '| <strong>\__,~"´ /:) / |:\ \</strong> ,~( ) . | | ) `, ' _,--. | ||
17 | \ . : <strong>(:/\_-, \:.\_-,</strong> . \ .\ . : \ . ) . ' ,/ </pre> | ||
diff --git a/templates/partials/pageHeaderSm.html b/templates/partials/pageHeaderSm.html deleted file mode 100644 index 92359fa..0000000 --- a/templates/partials/pageHeaderSm.html +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | $-- .| //\__ ' .' | . | ' . ' | ||
2 | $-- | _.~-"""-----~`` ,-´ ' ' |' | ' ' | ||
3 | $-- '| .´ ,~'\ ).,__,)/,," ' . ' | | | ' .' | ||
4 | $-- |_ `~´ (/\\, (/\\, _' '_ _| ' |_ _' '_ | ||
5 | |||
6 | <pre class="c-page-header__pre c-page__prefixed c-page__prefixed--pre u-mt0 $if(section.is_index)$u-hidden@sm-up$endif$"> | ||
7 | .| <strong> //\__</strong> ' .' | . | ' . ' | ||
8 | | <strong> _.~-"""-----~`` ,-´</strong> ' ' |' | ' ' | ||
9 | '| <strong>.´ ,~'\ ).,__,)/,," </strong> ' . ' | | | ' .' | ||
10 | |_ <strong>`~´ (/\\, (/\\, </strong> _' '_ _| ' |_ _' '_</pre> | ||