diff options
| author | Volpeon <git@volpeon.ink> | 2022-06-16 22:51:12 +0200 |
|---|---|---|
| committer | Volpeon <git@volpeon.ink> | 2022-06-16 22:51:12 +0200 |
| commit | 8c0706051eb7529429a7782de54af793ad6f0946 (patch) | |
| tree | 66050ddb000d39b681e1cd5a8428159c18f2af66 /filters | |
| parent | Fix metadata (diff) | |
| download | volpeon.ink-8c0706051eb7529429a7782de54af793ad6f0946.tar.gz volpeon.ink-8c0706051eb7529429a7782de54af793ad6f0946.tar.bz2 volpeon.ink-8c0706051eb7529429a7782de54af793ad6f0946.zip | |
Added alert component, added image description post from fedi
Diffstat (limited to 'filters')
| -rw-r--r-- | filters/macros.lua | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/filters/macros.lua b/filters/macros.lua index 36cc459..ca0b487 100644 --- a/filters/macros.lua +++ b/filters/macros.lua | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | function note(el) | 1 | function alert(el) |
| 2 | el.classes = pandoc.List() | 2 | el.classes = pandoc.List() |
| 3 | el.classes:insert("c-note") | 3 | el.classes:insert("o-alert") |
| 4 | el.classes:insert("o-alert--primary") | ||
| 5 | el.classes:insert("s-alerts__alert") | ||
| 4 | return el | 6 | return el |
| 5 | end | 7 | end |
| 6 | 8 | ||
| @@ -18,8 +20,8 @@ function figure(el) | |||
| 18 | end | 20 | end |
| 19 | 21 | ||
| 20 | function Div(el) | 22 | function Div(el) |
| 21 | if el.classes:includes("note") then | 23 | if el.classes:includes("alert") then |
| 22 | el = note(el) | 24 | el = alert(el) |
| 23 | elseif el.classes:includes("figure") then | 25 | elseif el.classes:includes("figure") then |
| 24 | el = figure(el) | 26 | el = figure(el) |
| 25 | end | 27 | end |
