mirror of
https://git.sr.ht/~magic_rb/website
synced 2024-11-25 09:36:14 +01:00
38 lines
941 B
EmacsLisp
38 lines
941 B
EmacsLisp
|
(require 'org-special-block-extras)
|
||
|
|
||
|
(org-defblock note
|
||
|
(title)
|
||
|
"Test"
|
||
|
(format
|
||
|
(pcase backend
|
||
|
(`html "<details class=\"note\">
|
||
|
<summary>
|
||
|
<i class=\"fa-regular fa-comment\"></i>
|
||
|
%s
|
||
|
</summary>
|
||
|
%s
|
||
|
</details>"))
|
||
|
title contents))
|
||
|
|
||
|
(org-defblock
|
||
|
card (name "Card" link "" image "")
|
||
|
"Card"
|
||
|
(cl-case backend
|
||
|
((html templated-html)
|
||
|
(concat
|
||
|
"<a class=\"card-link\" href=\"" link "\">"
|
||
|
" <div class=\"card-entry\">"
|
||
|
" <img src=\"" image "\" class=\"card-icon\"/>"
|
||
|
" <div class=\"card-separator\"></div>"
|
||
|
" <div class=\"card-body\">"
|
||
|
" <h4 class=\"card-heading\">" name "</h4>"
|
||
|
" <p class=\"card-content\">"
|
||
|
" " contents
|
||
|
" </p>"
|
||
|
" </div>"
|
||
|
" </div>"
|
||
|
"</a>"))
|
||
|
(t "ERROR")))
|
||
|
|
||
|
(provide 'extra-blocks)
|