From e9a69b140a9aa44223c40d56aa738479131600fd Mon Sep 17 00:00:00 2001 From: Volpeon Date: Thu, 11 Nov 2021 13:34:13 +0100 Subject: Fixes --- Makefile | 2 +- assets/css/scopes/_headlines.scss | 12 ------------ scripts/metadata_filter.lua | 7 +++---- templates/layouts/page.html | 2 +- 4 files changed, 5 insertions(+), 18 deletions(-) diff --git a/Makefile b/Makefile index 651401a..1cf364e 100644 --- a/Makefile +++ b/Makefile @@ -53,7 +53,7 @@ subpages = $(patsubst content/%.md,.cache/meta/%.json, \ mkdir -p $(@D) $(eval PAGES_FILES = $(filter .cache/meta/%.json,$^)) $(eval NAMESPACE = $(call namespace,$@,.cache/meta)) - $(if $(PAGES_FILES),jq -s --arg namespace "$(NAMESPACE)" -f scripts/subpages.jq $(PAGES_FILES) > "$@.pages",touch "$@.pages") + $(if $(PAGES_FILES),jq -s --arg namespace "$(NAMESPACE)" -f scripts/subpages.jq $(PAGES_FILES) > "$@.pages",echo "{}" > "$@.pages") pandoc \ -f markdown-citations \ -t html5 \ diff --git a/assets/css/scopes/_headlines.scss b/assets/css/scopes/_headlines.scss index c525af6..6e035b6 100644 --- a/assets/css/scopes/_headlines.scss +++ b/assets/css/scopes/_headlines.scss @@ -67,18 +67,6 @@ ); } - @include modifier('body') { - @include element('title-inner') { - background-image: linear-gradient( - to top, - transparent .15em, - #{prop(--colors --emph --body-bg)} .15em, - #{prop(--colors --emph --body-bg)} .6em, - transparent .6em - ); - } - } - @include element('link') { display: none; margin: -.5rem 0; diff --git a/scripts/metadata_filter.lua b/scripts/metadata_filter.lua index 3bea687..daad940 100644 --- a/scripts/metadata_filter.lua +++ b/scripts/metadata_filter.lua @@ -89,18 +89,17 @@ end function prep_menu(active_id, main_menu) local active_item = nil + local items = pandoc.List() for i = 1, #main_menu do local item = main_menu[i] local active = pandoc.utils.stringify(item.id) == active_id item.active = active if active then active_item = item end + if not item.hidden or item.active then items:insert(item) end end - return { - items = main_menu:filter(function(item) return not item.hidden or item.active end), - active = active_item, - } + return { items = items, active = active_item } end function process_pages(global, pages_by_id) diff --git a/templates/layouts/page.html b/templates/layouts/page.html index 0f795ea..e406d99 100644 --- a/templates/layouts/page.html +++ b/templates/layouts/page.html @@ -1,5 +1,5 @@
-