1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-23 10:07:19 +00:00

Add icon to default page layout and show in switcher

Thanks @linonetwo

Fixes #7197
This commit is contained in:
jeremy@jermolene.com 2023-01-16 13:21:40 +00:00
parent c0615e20ec
commit 34643a4279
2 changed files with 3 additions and 2 deletions

View File

@ -13,13 +13,13 @@ caption: {{$:/language/ControlPanel/LayoutSwitcher/Caption}}
<$set name="cls" filter="[all[current]field:title{$:/layout}]" value="tc-chooser-item tc-chosen" emptyValue="tc-chooser-item"> <$set name="cls" filter="[all[current]field:title{$:/layout}]" value="tc-chooser-item tc-chosen" emptyValue="tc-chooser-item">
<div class=<<cls>>> <div class=<<cls>>>
<$link to={{!!title}}> <$link to={{!!title}}>
''<$transclude field="name"/>''&#32;-&#32;<$transclude field="description"/> ''<$transclude tiddler={{{ [<currentTiddler>get[icon]] }}}/><$transclude field="name"/>''&#32;-&#32;<$transclude field="description"/>
</$link></div></$set> </$link></div></$set>
"""> """>
<$set name="cls" filter="[all[current]field:title[$:/core/ui/PageTemplate]]" value="tc-chooser-item tc-chosen" emptyValue="tc-chooser-item"> <$set name="cls" filter="[all[current]field:title[$:/core/ui/PageTemplate]]" value="tc-chooser-item tc-chosen" emptyValue="tc-chooser-item">
<div class=<<cls>>> <div class=<<cls>>>
<$link to={{!!title}}> <$link to={{!!title}}>
''<$transclude field="name"/>''&#32;-&#32;<$transclude field="description"/> ''<$transclude tiddler={{{ [<currentTiddler>get[icon]] }}}/><$transclude field="name"/>''&#32;-&#32;<$transclude field="description"/>
</$link> </$link>
</div> </div>
</$set> </$set>

View File

@ -1,6 +1,7 @@
title: $:/core/ui/PageTemplate title: $:/core/ui/PageTemplate
name: {{$:/language/PageTemplate/Name}} name: {{$:/language/PageTemplate/Name}}
description: {{$:/language/PageTemplate/Description}} description: {{$:/language/PageTemplate/Description}}
icon: $:/core/images/layout-button
\whitespace trim \whitespace trim
\import [[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]] \import [[$:/core/ui/PageMacros]] [all[shadows+tiddlers]tag[$:/tags/Macro]!has[draft.of]]