summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVolpeon <git@volpeon.ink>2021-11-21 09:40:35 +0100
committerVolpeon <git@volpeon.ink>2021-11-21 09:40:35 +0100
commit23207344301bd7f9c63190d2c39bd0352b4b1d8a (patch)
tree6aaeb410a8f1049009babf5cb38f215675ca5c2c
parentImproved list structure again (diff)
downloadvolpeon.ink-23207344301bd7f9c63190d2c39bd0352b4b1d8a.tar.gz
volpeon.ink-23207344301bd7f9c63190d2c39bd0352b4b1d8a.tar.bz2
volpeon.ink-23207344301bd7f9c63190d2c39bd0352b4b1d8a.zip
Clwanup
-rw-r--r--assets/css/_vars.scss4
-rw-r--r--scripts/metadata_filter.lua11
-rw-r--r--templates/base.html2
3 files changed, 8 insertions, 9 deletions
diff --git a/assets/css/_vars.scss b/assets/css/_vars.scss
index 9e1b661..cf4af60 100644
--- a/assets/css/_vars.scss
+++ b/assets/css/_vars.scss
@@ -1,5 +1,5 @@
1$breakpoints: ( 1$breakpoints: (
2 lg: 1360px, 2 lg: 1340px,
3 md: 900px, 3 md: 900px,
4 sm: 600px, 4 sm: 600px,
5 xs: 400px, 5 xs: 400px,
@@ -22,7 +22,7 @@ $font-fam--large: 'Garet', $font-fam--text;
22$font-fam--mono: 'Iosevka Term SS09', 'IBM Plex Mono', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', Courier, monospace; 22$font-fam--mono: 'Iosevka Term SS09', 'IBM Plex Mono', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', Courier, monospace;
23$font-size: 16px; 23$font-size: 16px;
24$line-height: 1.7; 24$line-height: 1.7;
25$content--width: 46rem; 25$content--width: 44rem;
26 26
27@include iro-execute { 27@include iro-execute {
28 $gray0: hsl(220, 5%, 4%); 28 $gray0: hsl(220, 5%, 4%);
diff --git a/scripts/metadata_filter.lua b/scripts/metadata_filter.lua
index 9125696..26d2423 100644
--- a/scripts/metadata_filter.lua
+++ b/scripts/metadata_filter.lua
@@ -108,14 +108,14 @@ function prep_menu(active_id, main_menu)
108 return { items = items, active = active_item } 108 return { items = items, active = active_item }
109end 109end
110 110
111function process_pages(global, parent, order, pages_by_id) 111function process_pages(global, order, pages_by_id)
112 if not pages_by_id then return nil end 112 if not pages_by_id then return nil end
113 113
114 local pages_all = pandoc.List() 114 local pages_all = pandoc.List()
115 local pages_date_desc = pandoc.List() 115 local pages_date_desc = pandoc.List()
116 116
117 for _, page in pairs(pages_by_id) do 117 for _, page in pairs(pages_by_id) do
118 local p = process(global, parent, page) 118 local p = process(global, page)
119 if not p.unlisted then 119 if not p.unlisted then
120 pages_all:insert(p) 120 pages_all:insert(p)
121 if p.date then pages_date_desc:insert(p) end 121 if p.date then pages_date_desc:insert(p) end
@@ -284,7 +284,7 @@ function generate_list(meta)
284 end 284 end
285end 285end
286 286
287function process(global, parent, meta) 287function process(global, meta)
288 meta.namespace = resolve_namespace(meta.namespace) 288 meta.namespace = resolve_namespace(meta.namespace)
289 meta.file_out = pandoc.utils.stringify(meta.file_out):gsub("^out", "") 289 meta.file_out = pandoc.utils.stringify(meta.file_out):gsub("^out", "")
290 meta.redirect = meta.url and true 290 meta.redirect = meta.url and true
@@ -318,8 +318,7 @@ function process(global, parent, meta)
318 meta.menus.main = prep_menu(meta.namespace.root.id, meta.menus.main) 318 meta.menus.main = prep_menu(meta.namespace.root.id, meta.menus.main)
319 end 319 end
320 320
321 meta.pages = 321 meta.pages = process_pages(global, meta.list_order, meta.pages)
322 process_pages(global, { parent = parent, meta = meta }, meta.list_order, meta.pages)
323 meta.depth = (meta.pages and find_depth(meta.pages.all)) or "0" 322 meta.depth = (meta.pages and find_depth(meta.pages.all)) or "0"
324 meta.layout = prep_layout(meta.layout or (meta.redirect and "redirect") or 323 meta.layout = prep_layout(meta.layout or (meta.redirect and "redirect") or
325 resolve_layout(meta.depth)) 324 resolve_layout(meta.depth))
@@ -346,5 +345,5 @@ end
346function Meta(meta) 345function Meta(meta)
347 meta.site.url = pandoc.utils.stringify(meta.site.url):gsub("/$", "") 346 meta.site.url = pandoc.utils.stringify(meta.site.url):gsub("/$", "")
348 347
349 return process(meta, nil, meta) 348 return process(meta, meta)
350end 349end
diff --git a/templates/base.html b/templates/base.html
index 13cce16..11a1b3d 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -60,7 +60,7 @@
60 $endif$ 60 $endif$
61 $endfor$ 61 $endfor$
62 </nav> 62 </nav>
63 63
64 <main> 64 <main>
65 <div class="l-container l-container--pad-x l-container--pad-y l-container--content"> 65 <div class="l-container l-container--pad-x l-container--pad-y l-container--content">
66 $if(layout.is_categorized_list)$ 66 $if(layout.is_categorized_list)$