diff options
author | Volpeon <git@volpeon.ink> | 2021-11-19 20:39:55 +0100 |
---|---|---|
committer | Volpeon <git@volpeon.ink> | 2021-11-19 20:39:55 +0100 |
commit | 670696ff6e7c91d6d92951d2da47d7d4c85ee1d3 (patch) | |
tree | dd018124053c3b29be66e7300b928b966459578b /filters | |
parent | Added print style (diff) | |
download | volpeon.ink-670696ff6e7c91d6d92951d2da47d7d4c85ee1d3.tar.gz volpeon.ink-670696ff6e7c91d6d92951d2da47d7d4c85ee1d3.tar.bz2 volpeon.ink-670696ff6e7c91d6d92951d2da47d7d4c85ee1d3.zip |
Added text ellipsis to cards, added macro to use icons in content
Diffstat (limited to 'filters')
-rw-r--r-- | filters/icons.lua | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/filters/icons.lua b/filters/icons.lua new file mode 100644 index 0000000..3800e5d --- /dev/null +++ b/filters/icons.lua | |||
@@ -0,0 +1,11 @@ | |||
1 | function Str(el) | ||
2 | local icon = el.text:match('^:(.*):$') | ||
3 | |||
4 | if icon then | ||
5 | return pandoc.RawInline('html', | ||
6 | '<svg class="o-icon o-icon--inline" width="1em" height="1em"><use href="/symbols.svg#' .. icon .. | ||
7 | '"></use></svg>') | ||
8 | end | ||
9 | |||
10 | return el | ||
11 | end | ||