mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-26 19:47:20 +00:00
Feat: allow tags have its ViewTemplate tag and cascade (#8462)
* feat: allow tags have its ViewTemplate tag and cascade * feat: quick addition of subtitle cascade * docs: tag subtitle cascade control panel * Update ControlPanel.multids
This commit is contained in:
parent
5c43512a56
commit
57d3e8e765
@ -235,3 +235,7 @@ ViewTemplateBody/Caption: View Template Body
|
||||
ViewTemplateBody/Hint: This rule cascade is used by the default view template to dynamically choose the template for displaying the body of a tiddler.
|
||||
ViewTemplateTitle/Caption: View Template Title
|
||||
ViewTemplateTitle/Hint: This rule cascade is used by the default view template to dynamically choose the template for displaying the title of a tiddler.
|
||||
ViewTemplateSubtitle/Caption: View Template Subtitle
|
||||
ViewTemplateSubtitle/Hint: This rule cascade is used by the default view template to dynamically choose the template for displaying the subtitle of a tiddler.
|
||||
ViewTemplateTags/Caption: View Template Tags
|
||||
ViewTemplateTags/Hint: This rule cascade is used by the default view template to dynamically choose the template for displaying the tags area of a tiddler.
|
||||
|
9
core/ui/ControlPanel/Cascades/ViewTemplateSubtitle.tid
Normal file
9
core/ui/ControlPanel/Cascades/ViewTemplateSubtitle.tid
Normal file
@ -0,0 +1,9 @@
|
||||
title: $:/core/ui/ControlPanel/ViewTemplateSubtitle
|
||||
tags: $:/tags/ControlPanel/Cascades
|
||||
caption: {{$:/language/ControlPanel/ViewTemplateSubtitle/Caption}}
|
||||
|
||||
\define lingo-base() $:/language/ControlPanel/ViewTemplateSubtitle/
|
||||
|
||||
<<lingo Hint>>
|
||||
|
||||
{{$:/tags/ViewTemplateSubtitleFilter||$:/snippets/ListTaggedCascade}}
|
9
core/ui/ControlPanel/Cascades/ViewTemplateTags.tid
Normal file
9
core/ui/ControlPanel/Cascades/ViewTemplateTags.tid
Normal file
@ -0,0 +1,9 @@
|
||||
title: $:/core/ui/ControlPanel/ViewTemplateTags
|
||||
tags: $:/tags/ControlPanel/Cascades
|
||||
caption: {{$:/language/ControlPanel/ViewTemplateTags/Caption}}
|
||||
|
||||
\define lingo-base() $:/language/ControlPanel/ViewTemplateTags/
|
||||
|
||||
<<lingo Hint>>
|
||||
|
||||
{{$:/tags/ViewTemplateTagsFilter||$:/snippets/ListTaggedCascade}}
|
@ -2,10 +2,4 @@ title: $:/core/ui/ViewTemplate/subtitle
|
||||
tags: $:/tags/ViewTemplate
|
||||
|
||||
\whitespace trim
|
||||
<$reveal type="nomatch" stateTitle=<<folded-state>> text="hide" tag="div" retain="yes" animate="yes">
|
||||
<div class="tc-subtitle">
|
||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewTemplate/Subtitle]!has[draft.of]]" variable="subtitleTiddler">
|
||||
<$transclude tiddler=<<subtitleTiddler>> mode="inline"/><$list-join> </$list-join>
|
||||
</$list>
|
||||
</div>
|
||||
</$reveal>
|
||||
<$transclude tiddler={{{ [<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/ViewTemplateSubtitleFilter]!is[draft]get[text]] :and[!is[blank]else[$:/core/ui/ViewTemplate/subtitle/default]] }}} />
|
10
core/ui/ViewTemplate/subtitle/default.tid
Normal file
10
core/ui/ViewTemplate/subtitle/default.tid
Normal file
@ -0,0 +1,10 @@
|
||||
title: $:/core/ui/ViewTemplate/subtitle/default
|
||||
|
||||
\whitespace trim
|
||||
<$reveal type="nomatch" stateTitle=<<folded-state>> text="hide" tag="div" retain="yes" animate="yes">
|
||||
<div class="tc-subtitle">
|
||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewTemplate/Subtitle]!has[draft.of]]" variable="subtitleTiddler">
|
||||
<$transclude tiddler=<<subtitleTiddler>> mode="inline"/><$list-join> </$list-join>
|
||||
</$list>
|
||||
</div>
|
||||
</$reveal>
|
@ -2,6 +2,4 @@ title: $:/core/ui/ViewTemplate/tags
|
||||
tags: $:/tags/ViewTemplate
|
||||
|
||||
\whitespace trim
|
||||
<$reveal type="nomatch" stateTitle=<<folded-state>> text="hide" tag="div" retain="yes" animate="yes">
|
||||
<div class="tc-tags-wrapper"><$list filter="[all[current]tags[]sort[title]]" template="$:/core/ui/TagTemplate" storyview="pop"/></div>
|
||||
</$reveal>
|
||||
<$transclude tiddler={{{ [<currentTiddler>] :cascade[all[shadows+tiddlers]tag[$:/tags/ViewTemplateTagsFilter]!is[draft]get[text]] :and[!is[blank]else[$:/core/ui/ViewTemplate/tags/default]] }}} />
|
11
core/ui/ViewTemplate/tags/default.tid
Normal file
11
core/ui/ViewTemplate/tags/default.tid
Normal file
@ -0,0 +1,11 @@
|
||||
title: $:/core/ui/ViewTemplate/tags/default
|
||||
|
||||
\whitespace trim
|
||||
<$reveal type="nomatch" stateTitle=<<folded-state>> text="hide" tag="div" retain="yes" animate="yes">
|
||||
<div class="tc-tags-wrapper">
|
||||
<$list filter="[all[current]tags[]sort[title]]" template="$:/core/ui/TagTemplate" storyview="pop"/>
|
||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewTemplate/Tags]!has[draft.of]]">
|
||||
<$transclude mode="inline"/>
|
||||
</$list>
|
||||
</div>
|
||||
</$reveal>
|
@ -236,3 +236,7 @@ ViewTemplateBody/Caption: 查看模板主体
|
||||
ViewTemplateBody/Hint: 默认的查看模板使用此规则级联,动态选择模板以显示条目的主体。
|
||||
ViewTemplateTitle/Caption: 查看模板标题
|
||||
ViewTemplateTitle/Hint: 默认的查看模板使用此规则级联,动态选择模板以显示条目的标题。
|
||||
ViewTemplateSubtitle/Caption: 查看模板副标题
|
||||
ViewTemplateSubtitle/Hint: 默认的查看模板使用此规则级联,动态选择模板以显示条目的副标题。
|
||||
ViewTemplateTags/Caption: 查看模板标签区
|
||||
ViewTemplateTags/Hint: 默认的查看模板使用此规则级联,动态选择模板以显示条目的标签区域。
|
||||
|
@ -236,3 +236,7 @@ ViewTemplateBody/Caption: 檢視範本主體
|
||||
ViewTemplateBody/Hint: 預設的檢視範本使用此規則級聯,動態選擇範本以顯示條目的主體。
|
||||
ViewTemplateTitle/Caption: 檢視範本標題
|
||||
ViewTemplateTitle/Hint: 預設的檢視範本使用此規則級聯,動態選擇範本以顯示條目的標題。
|
||||
ViewTemplateSubtitle/Caption: 檢視範本副標題
|
||||
ViewTemplateSubtitle/Hint: 預設的檢視範本使用此規則級聯,動態選擇範本以顯示條目的副標題。
|
||||
ViewTemplateTags/Caption: 檢視範本標籤
|
||||
ViewTemplateTags/Hint: 預設的檢視範本使用此規則級聯,動態選擇範本以顯示條目的標籤。
|
Loading…
Reference in New Issue
Block a user