From 402b0cf8956db4671bd7022902f95fe6622f9915 Mon Sep 17 00:00:00 2001 From: poire-z Date: Fri, 21 Jan 2022 18:35:22 +0100 Subject: [PATCH] Wikipedia: tweak EPUB css and footnote styletweaks EPUB: have pages with footnotes marked as non-linear so they can be hidden with "Hide non-linear flows". In-page footnotes: keep the footnote number near the left margin (a recent crengine renders them near the text by default). --- frontend/ui/data/css_tweaks.lua | 2 ++ frontend/ui/wikipedia.lua | 2 ++ 2 files changed, 4 insertions(+) diff --git a/frontend/ui/data/css_tweaks.lua b/frontend/ui/data/css_tweaks.lua index 09a362cc5..9c5612b38 100644 --- a/frontend/ui/data/css_tweaks.lua +++ b/frontend/ui/data/css_tweaks.lua @@ -834,6 +834,7 @@ This only works with footnotes that have specific attributes set by the publishe css = [[ ol.references > li { -cr-hint: footnote-inpage; + list-style-position: -cr-outside; margin: 0 !important; } /* hide backlinks */ @@ -848,6 +849,7 @@ ol.references > li > .mw-cite-backlink { display: none; } css = [[ ol.references > li { -cr-hint: footnote-inpage; + list-style-position: -cr-outside; margin: 0 !important; font-size: 0.8rem !important; } diff --git a/frontend/ui/wikipedia.lua b/frontend/ui/wikipedia.lua index 698fda999..a5e565dc7 100644 --- a/frontend/ui/wikipedia.lua +++ b/frontend/ui/wikipedia.lua @@ -956,6 +956,8 @@ body { } ol.references { list-style-type: inherit; + /* Allow hiding these pages as their content is available as footnotes */ + -cr-hint: non-linear; } /* Show a box around image thumbnails */