Hi guys,
Sorry for always asking this type of questions, but how i can set this type of Warning in my wiki?
Thank you in advance!
Hi guys,
Sorry for always asking this type of questions, but how i can set this type of Warning in my wiki?
Thank you in advance!
In a tiddler tagged $:/tags/Macro include this definition (extracted macro elements from tw-com):
\whitespace trim
\procedure .infoBox(text:"", title, icon:"$:/core/images/info-button", class, iconSize:"1.4rem")
\function _f.tipClass() [[doc-icon-block]] [<class>!is[blank]then<class>] +[join[ ]]
<div class=<<_f.tipClass>>>
<%if [<title>!is[blank]] %><div>''<<title>>''</div><%endif%>
<div class="doc-block-icon"><$transclude $tiddler=<<icon>> size=<<iconSize>>/></div>
<<text>>
</div>
\end
\procedure .warning(_:"", title:"Warning", icon:"$:/core/images/warning", class:"doc-warning", iconSize:"22pt")
<$macrocall $name=".infoBox" text=<<_>> title=<<title>> icon=<<icon>> class=<<class>> iconSize=<<iconSize>>/>
\end
\end
You can customize the style however you like, but this is roughly what’s there at tw-com (tagged $:/tags/Stylesheet):
.doc-icon-block.doc-warning {
border-left: 4px solid #881122;
padding-left:2em;
background: #88112211;
}
Then, when you want to invoke it, invoke it like this:
<<.warning "This API is not yet fully standardized hence this method of saving is somewhat experimental.">>
There are other solutions to this kind of problem. One such solution is @Mohammad’s Shiraz Callouts Subplugin