2023-09-02 15:06:32 +02:00
|
|
|
(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
|
2023-09-02 16:18:25 +02:00
|
|
|
card (name "Card" link "" image nil image-html nil)
|
2023-09-02 15:06:32 +02:00
|
|
|
"Card"
|
|
|
|
(cl-case backend
|
|
|
|
((html templated-html)
|
|
|
|
(concat
|
|
|
|
"<a class=\"card-link\" href=\"" link "\">"
|
|
|
|
" <div class=\"card-entry\">"
|
2023-09-02 16:18:25 +02:00
|
|
|
(if image
|
|
|
|
(concat "<img src=\"" image "\" class=\"card-icon\"/>")
|
|
|
|
(concat "<div class=\"card-icon\">" image-html "</div>"))
|
2023-09-02 15:06:32 +02:00
|
|
|
" <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)
|