diff options
author | Volpeon <git@volpeon.ink> | 2020-12-29 12:24:04 +0100 |
---|---|---|
committer | Volpeon <git@volpeon.ink> | 2020-12-29 12:24:04 +0100 |
commit | 381297c95c7446182e90e459cd0257a8fc86b4cf (patch) | |
tree | 5a330a18ea60d983bc6f05976295a316a8ad7a24 /filters/element_classes.lua | |
parent | Handle blog entry categories (diff) | |
download | volpeon.ink-381297c95c7446182e90e459cd0257a8fc86b4cf.tar.gz volpeon.ink-381297c95c7446182e90e459cd0257a8fc86b4cf.tar.bz2 volpeon.ink-381297c95c7446182e90e459cd0257a8fc86b4cf.zip |
Improved CSS classes for page content, added proper ref list macro, build scripts load and watch Pandoc filters automatically
Diffstat (limited to 'filters/element_classes.lua')
-rw-r--r-- | filters/element_classes.lua | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/filters/element_classes.lua b/filters/element_classes.lua new file mode 100644 index 0000000..643ff75 --- /dev/null +++ b/filters/element_classes.lua | |||
@@ -0,0 +1,15 @@ | |||
1 | function CodeBlock(el) | ||
2 | el.attributes.class = 'c-page__prefixed c-page__prefixed--pre' | ||
3 | return el | ||
4 | end | ||
5 | |||
6 | function Header(el) | ||
7 | if el.level == 1 then | ||
8 | el.attributes.class = 'c-page__prefixed c-page__prefixed--h1' | ||
9 | elseif el.level == 2 then | ||
10 | el.attributes.class = 'c-page__prefixed c-page__prefixed--h2' | ||
11 | elseif el.level == 3 then | ||
12 | el.attributes.class = 'c-page__prefixed c-page__prefixed--h3' | ||
13 | end | ||
14 | return el | ||
15 | end | ||