mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-23 10:07:19 +00:00
Docs Macros: Add new <<.tiddler-fields>> macro
This commit is contained in:
parent
9e28356047
commit
edcba4ee16
@ -1,7 +1,8 @@
|
||||
created: 20150110182600000
|
||||
modified: 20150228082845000
|
||||
title: Documentation Macros
|
||||
modified: 20211206080809651
|
||||
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.
|
||||
|
||||
@ -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>> |
|
||||
|.strong |major emphasis within a tiddler |<<.strong Important!>> |
|
||||
|.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
|
||||
|
||||
@ -36,6 +38,8 @@ The following macros are used throughout ~TiddlyWiki's documentation. Their name
|
||||
|.wid |a widget name |<<.wid list>> |
|
||||
|.attr |an attribute name |<<.attr filter>> |
|
||||
|.param |a macro parameter name |<<.param text>> |
|
||||
|.tiddler-fields |a list of tiddler fields |<<.tiddler-fields "Monday">> |
|
||||
|
||||
|
||||
!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-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>
|
@ -221,3 +221,30 @@ tr.doc-table-subheading {
|
||||
.doc-link-badge:hover {
|
||||
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…
Reference in New Issue
Block a user