summaryrefslogtreecommitdiffstats
path: root/filters
diff options
context:
space:
mode:
authorVolpeon <git@volpeon.ink>2021-11-19 20:39:55 +0100
committerVolpeon <git@volpeon.ink>2021-11-19 20:39:55 +0100
commit670696ff6e7c91d6d92951d2da47d7d4c85ee1d3 (patch)
treedd018124053c3b29be66e7300b928b966459578b /filters
parentAdded print style (diff)
downloadvolpeon.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.lua11
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 @@
1function 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
11end