mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-08-06 05:43:51 +00:00
Docs Macros: Add new <<.tiddler-fields>> macro
This commit is contained in:
parent
9e28356047
commit
edcba4ee16
@ -1,7 +1,8 @@
|
|||||||
created: 20150110182600000
|
created: 20150110182600000
|
||||||
modified: 20150228082845000
|
modified: 20211206080809651
|
||||||
title: Documentation Macros
|
|
||||||
tags: [[Improving TiddlyWiki Documentation]]
|
tags: [[Improving TiddlyWiki Documentation]]
|
||||||
|
title: Documentation Macros
|
||||||
|
type: text/vnd.tiddlywiki
|
||||||
|
|
||||||
The following macros are used throughout ~TiddlyWiki's documentation. Their names start with a dot to keep them out of the way of names that a user might try experimenting with.
|
The following macros are used throughout ~TiddlyWiki's documentation. Their names start with a dot to keep them out of the way of names that a user might try experimenting with.
|
||||||
|
|
||||||
@ -13,6 +14,7 @@ The following macros are used throughout ~TiddlyWiki's documentation. Their name
|
|||||||
|.place |a placeholder for the user to fill in |<<.place tagname>> |
|
|.place |a placeholder for the user to fill in |<<.place tagname>> |
|
||||||
|.strong |major emphasis within a tiddler |<<.strong Important!>> |
|
|.strong |major emphasis within a tiddler |<<.strong Important!>> |
|
||||||
|.word |a mention of an ordinary word or phrase |<<.word "hello world">> |
|
|.word |a mention of an ordinary word or phrase |<<.word "hello world">> |
|
||||||
|
|.icon |an icon, sized to match the surrounding text |<<.icon "$:/core/images/globe">> |
|
||||||
|
|
||||||
!Advice
|
!Advice
|
||||||
|
|
||||||
@ -36,6 +38,8 @@ The following macros are used throughout ~TiddlyWiki's documentation. Their name
|
|||||||
|.wid |a widget name |<<.wid list>> |
|
|.wid |a widget name |<<.wid list>> |
|
||||||
|.attr |an attribute name |<<.attr filter>> |
|
|.attr |an attribute name |<<.attr filter>> |
|
||||||
|.param |a macro parameter name |<<.param text>> |
|
|.param |a macro parameter name |<<.param text>> |
|
||||||
|
|.tiddler-fields |a list of tiddler fields |<<.tiddler-fields "Monday">> |
|
||||||
|
|
||||||
|
|
||||||
!Links
|
!Links
|
||||||
|
|
||||||
|
@ -130,4 +130,21 @@ This is an example tiddler. See [[Table-of-Contents Macros (Examples)]].
|
|||||||
\define .link-badge-renamed(link,colour:#b4b995) <<.link-badge "renamed" """$link$""" """$colour$""">>
|
\define .link-badge-renamed(link,colour:#b4b995) <<.link-badge "renamed" """$link$""" """$colour$""">>
|
||||||
\define .link-badge-updated(link,colour:#91ba66) <<.link-badge "updated" """$link$""" """$colour$""">>
|
\define .link-badge-updated(link,colour:#91ba66) <<.link-badge "updated" """$link$""" """$colour$""">>
|
||||||
|
|
||||||
|
\define .tiddler-fields(tiddler)
|
||||||
|
<$tiddler tiddler=<<__tiddler__>>>
|
||||||
|
<div class="doc-tiddler-fields">
|
||||||
|
<h2>
|
||||||
|
<$link>
|
||||||
|
<span class="tc-tiddler-title-icon">{{||$:/core/ui/TiddlerIcon}}</span><$text text=<<currentTiddler>>/>
|
||||||
|
</$link>
|
||||||
|
</h2>
|
||||||
|
<table class="tc-view-field-table">
|
||||||
|
<tbody>
|
||||||
|
<$list filter="[all[current]fields[]sort[title]] -title" template="$:/core/ui/TiddlerFieldTemplate" variable="listItem"/>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</$tiddler>
|
||||||
|
\end
|
||||||
|
|
||||||
<pre><$view field="text"/></pre>
|
<pre><$view field="text"/></pre>
|
@ -221,3 +221,30 @@ tr.doc-table-subheading {
|
|||||||
.doc-link-badge:hover {
|
.doc-link-badge:hover {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.doc-tiddler-fields {
|
||||||
|
background-color: <<colour code-background>>;
|
||||||
|
border: 1px solid <<colour tiddler-border>>;
|
||||||
|
border-radius: 4px;
|
||||||
|
padding: 0 0.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.doc-tiddler-fields h2 svg {
|
||||||
|
height: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.doc-tiddler-fields table,
|
||||||
|
.doc-tiddler-fields h2 {
|
||||||
|
margin: 0.5em 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.doc-tiddler-fields table {
|
||||||
|
background-color: <<colour tiddler-background>>;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen {
|
||||||
|
.doc-tiddler-fields {
|
||||||
|
<<box-shadow "1px 1px 6px rgba(0, 0, 0, 0.6)">>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user