From 7f2deacd64ee2e4cb5d4850a99ff298c0353017d Mon Sep 17 00:00:00 2001 From: Volpeon Date: Sun, 12 Jun 2022 12:07:29 +0200 Subject: Fixed list, updated fonts, fixed source wrapping --- Makefile | 4 ++++ assets/fonts/iosevka-term-ss09-bold.ttf | Bin 1297592 -> 1352488 bytes assets/fonts/iosevka-term-ss09-regular.ttf | Bin 1304140 -> 1362256 bytes scripts/metadata_filter.lua | 7 ++++--- templates/partials/gallery_card.html | 2 +- templates/partials/small_gallery_card.html | 2 +- 6 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 52adc1d..e8ece08 100644 --- a/Makefile +++ b/Makefile @@ -58,6 +58,7 @@ subpages = $(patsubst content/%.md,.cache/meta/%.json, \ pandoc \ -f markdown-citations \ -t html5 \ + --wrap preserve \ --no-highlight \ --template scripts/metadata_tpl.json \ --metadata namespace="$(NAMESPACE)" \ @@ -68,6 +69,7 @@ subpages = $(patsubst content/%.md,.cache/meta/%.json, \ pandoc \ -f markdown-citations \ -t html5 \ + --wrap preserve \ --lua-filter scripts/metadata_filter.lua \ --lua-filter scripts/subpages.lua \ $(GLOBAL_METADATA) \ @@ -87,6 +89,7 @@ out/%.html: content/%.md .cache/meta/%.json $(CONTENT_TEMPLATES_SRC) metadata/*. pandoc \ -f markdown-citations \ -t html5 \ + --wrap preserve \ --no-highlight \ --template templates/base.html \ --lua-filter scripts/metadata_filter.lua \ @@ -104,6 +107,7 @@ out/%.xml: content/%.md .cache/meta/%.json $(FEED_TEMPLATES_SRC) metadata/*.yaml pandoc \ -f markdown-citations \ -t html5 \ + --wrap preserve \ --no-highlight \ --template templates/feed.xml \ --lua-filter scripts/metadata_filter.lua \ diff --git a/assets/fonts/iosevka-term-ss09-bold.ttf b/assets/fonts/iosevka-term-ss09-bold.ttf index 35cad9d..f3ec04e 100644 Binary files a/assets/fonts/iosevka-term-ss09-bold.ttf and b/assets/fonts/iosevka-term-ss09-bold.ttf differ diff --git a/assets/fonts/iosevka-term-ss09-regular.ttf b/assets/fonts/iosevka-term-ss09-regular.ttf index 7ad5cd4..c44424d 100644 Binary files a/assets/fonts/iosevka-term-ss09-regular.ttf and b/assets/fonts/iosevka-term-ss09-regular.ttf differ diff --git a/scripts/metadata_filter.lua b/scripts/metadata_filter.lua index 314f2b0..cb060fa 100644 --- a/scripts/metadata_filter.lua +++ b/scripts/metadata_filter.lua @@ -185,10 +185,11 @@ function d1_page_to_list_item(meta, p) } end -function d2_page_to_list_item(meta, cat, p) +function d2_page_to_list_item(meta, cat, p, set_cat_title) return { title = p.title, subtitle = p.subtitle, + category = set_cat_title and cat.title, date = p.date, position = p.position, url = p.url, @@ -229,7 +230,7 @@ function generate_list(meta) return meta.pages.all :map(function(cat) local allItems = ((cat.pages and cat.pages.all) or pandoc.List()) - :map(function(p) return d2_page_to_list_item(meta, cat, p) end) + :map(function(p) return d2_page_to_list_item(meta, cat, p, false) end) return cat_to_list_cat(cat, allItems) end) @@ -241,7 +242,7 @@ function generate_list(meta) :map(function(cat) local allItems = (cat.pages and cat.pages.all or pandoc.List()):flatMap(function(c) if c.pages then - return c.pages.all:map(function(p) return d2_page_to_list_item(cat, c, p) end) + return c.pages.all:map(function(p) return d2_page_to_list_item(cat, c, p, true) end) else return pandoc.List({ d1_page_to_list_item(cat, c) }) end diff --git a/templates/partials/gallery_card.html b/templates/partials/gallery_card.html index 81c7745..c0925fc 100644 --- a/templates/partials/gallery_card.html +++ b/templates/partials/gallery_card.html @@ -1,6 +1,6 @@ $if(it.url)$ $if(it.thumbnail)$ - +