mirror of
https://gitlab.com/octtspacc/OcttKB
synced 2025-06-06 00:29:12 +02:00
OcttKB Cross-Repo Sync (HTML to Raw)
This commit is contained in:
39
Wiki-OcttKB/tiddlers/System/$__Macros_Footnotes.tid
Normal file
39
Wiki-OcttKB/tiddlers/System/$__Macros_Footnotes.tid
Normal file
@ -0,0 +1,39 @@
|
||||
created: 20230215225211565
|
||||
creator: Octt
|
||||
modified: 20230215230528887
|
||||
modifier: Octt
|
||||
tags: $:/tags/Macro
|
||||
title: $:/Macros/Footnotes
|
||||
|
||||
<!--
|
||||
Note: The most of the code in this macro (DetailsFootnotes) is copied from [[$:/plugins/kookma/refnotes/macros/showfnotes]]
|
||||
-->
|
||||
\define DetailsFootnotes(filter:"[<currentTiddler>]", title:"Empty" class:"fnote-list DetailsFootnotes", emptyMessage:"")
|
||||
<$vars leftDelimiter="<<fnote ">
|
||||
<$list filter="[subfilter<__filter__>search:text:literal<leftDelimiter>limit[1]]" variable=null emptyMessage=<<__emptyMessage__>> ><!-- check to see if there is any footnote -->
|
||||
<details class="tw-details">
|
||||
<summary>
|
||||
<$reveal tag="div" type="nomatch" default="Empty" text=<<__title__>> >
|
||||
<span>$title$</span>
|
||||
</$reveal>
|
||||
</summary>
|
||||
<ol class="$class$">
|
||||
<$list filter=<<__filter__>> >
|
||||
<$macrocall $name="find"
|
||||
text={{!!text}}
|
||||
begin="<<fnote "
|
||||
end=">>"
|
||||
output="output-fnote"
|
||||
/>
|
||||
</$list>
|
||||
</ol>
|
||||
</details>
|
||||
</$list>
|
||||
</$vars>
|
||||
\end
|
||||
|
||||
\define output-fnote(p)
|
||||
<$vars output=$p$>
|
||||
<li><<output>></li>
|
||||
</$vars>
|
||||
\end
|
Reference in New Issue
Block a user