mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-27 03:57:21 +00:00
Trim Saga: All snippets, language tiddlers, and typed (#6275)
* adding trim: link-dropdown, Fields, unfold * adding trim: all remaining snippets * Fix for reversion I accidentally applied
This commit is contained in:
parent
6701683ddf
commit
def8e6d354
@ -3,6 +3,7 @@ title: $:/core/ui/EditorToolbar/link-dropdown
|
|||||||
\define lingo-base() $:/language/Buttons/Link/
|
\define lingo-base() $:/language/Buttons/Link/
|
||||||
|
|
||||||
\define add-link-actions()
|
\define add-link-actions()
|
||||||
|
\whitespace trim
|
||||||
<$action-sendmessage $message="tm-edit-text-operation" $param="make-link" text={{$(linkTiddler)$}} />
|
<$action-sendmessage $message="tm-edit-text-operation" $param="make-link" text={{$(linkTiddler)$}} />
|
||||||
<$action-deletetiddler $filter="[<dropdown-state>] [<searchTiddler>] [<linkTiddler>] [<storeTitle>] [<searchListState>]"/>
|
<$action-deletetiddler $filter="[<dropdown-state>] [<searchTiddler>] [<linkTiddler>] [<storeTitle>] [<searchListState>]"/>
|
||||||
\end
|
\end
|
||||||
@ -10,20 +11,22 @@ title: $:/core/ui/EditorToolbar/link-dropdown
|
|||||||
\define get-focus-selector() [data-tiddler-title="$(cssEscapedTitle)$"] .tc-create-wikitext-link input
|
\define get-focus-selector() [data-tiddler-title="$(cssEscapedTitle)$"] .tc-create-wikitext-link input
|
||||||
|
|
||||||
\define cancel-search-actions-inner()
|
\define cancel-search-actions-inner()
|
||||||
<$set name="userInput" value={{{ [<storeTitle>get[text]] }}}><$list filter="[<searchTiddler>get[text]!match<userInput>]" emptyMessage="""<$action-deletetiddler $filter="[<searchTiddler>] [<linkTiddler>] [<storeTitle>] [<searchListState>]"/>"""><$action-setfield $tiddler=<<searchTiddler>> text=<<userInput>>/><$action-setfield $tiddler=<<refreshTitle>> text="yes"/></$list></$set>
|
<$set name="userInput" value={{{ [<storeTitle>get[text]] }}}><$list filter="[<searchTiddler>get[text]!match<userInput>]" emptyMessage="<$action-deletetiddler $filter='[<searchTiddler>] [<linkTiddler>] [<storeTitle>] [<searchListState>]'/>"><$action-setfield $tiddler=<<searchTiddler>> text=<<userInput>>/><$action-setfield $tiddler=<<refreshTitle>> text="yes"/></$list></$set>
|
||||||
\end
|
\end
|
||||||
|
|
||||||
\define cancel-search-actions() <$list filter="[<storeTitle>!has[text]] +[<searchTiddler>!has[text]]" emptyMessage="""<<cancel-search-actions-inner>>"""><$action-sendmessage $message="tm-edit-text-operation" $param="focus-editor"/></$list>
|
\define cancel-search-actions() <$list filter="[<storeTitle>!has[text]] +[<searchTiddler>!has[text]]" emptyMessage="<<cancel-search-actions-inner>>"><$action-sendmessage $message="tm-edit-text-operation" $param="focus-editor"/></$list>
|
||||||
|
|
||||||
\define external-link()
|
\define external-link()
|
||||||
|
\whitespace trim
|
||||||
<$button class="tc-btn-invisible" style="width: auto; display: inline-block; background-colour: inherit;" actions=<<add-link-actions>>>
|
<$button class="tc-btn-invisible" style="width: auto; display: inline-block; background-colour: inherit;" actions=<<add-link-actions>>>
|
||||||
{{$:/core/images/chevron-right}}
|
{{$:/core/images/chevron-right}}
|
||||||
</$button>
|
</$button>
|
||||||
\end
|
\end
|
||||||
|
|
||||||
\define set-next-input-tab(beforeafter:"after") <$macrocall $name="change-input-tab" stateTitle="$:/state/tab/search-results/sidebar" tag="$:/tags/SearchResults" beforeafter="$beforeafter$" defaultState={{$:/config/SearchResults/Default}} actions="""<$action-setfield $tiddler="$:/state/search/currentTab" text=<<nextTab>>/>"""/>
|
\define set-next-input-tab(beforeafter:"after") <$macrocall $name="change-input-tab" stateTitle="$:/state/tab/search-results/sidebar" tag="$:/tags/SearchResults" beforeafter="$beforeafter$" defaultState={{$:/config/SearchResults/Default}} actions="<$action-setfield $tiddler='$:/state/search/currentTab' text=<<nextTab>>/>"/>
|
||||||
|
|
||||||
\define body(config-title)
|
\define body(config-title)
|
||||||
|
\whitespace trim
|
||||||
''<<lingo Hint>>''
|
''<<lingo Hint>>''
|
||||||
|
|
||||||
<$vars searchTiddler="""$config-title$/search""" linkTiddler="""$config-title$/link""" linktext="" searchListState=<<qualify "$:/temp/link-search/selected-item">> refreshTitle=<<qualify "$:/temp/link-search/refresh">> storeTitle=<<qualify "$:/temp/link-search/input">>>
|
<$vars searchTiddler="""$config-title$/search""" linkTiddler="""$config-title$/link""" linktext="" searchListState=<<qualify "$:/temp/link-search/selected-item">> refreshTitle=<<qualify "$:/temp/link-search/refresh">> storeTitle=<<qualify "$:/temp/link-search/input">>>
|
||||||
@ -33,13 +36,15 @@ title: $:/core/ui/EditorToolbar/link-dropdown
|
|||||||
<$keyboard key="((input-tab-left))" actions=<<set-next-input-tab "before">> class="tc-create-wikitext-link">
|
<$keyboard key="((input-tab-left))" actions=<<set-next-input-tab "before">> class="tc-create-wikitext-link">
|
||||||
<$macrocall $name="keyboard-driven-input" tiddler=<<searchTiddler>> storeTitle=<<storeTitle>>
|
<$macrocall $name="keyboard-driven-input" tiddler=<<searchTiddler>> storeTitle=<<storeTitle>>
|
||||||
selectionStateTitle=<<searchListState>> refreshTitle=<<refreshTitle>> type="search" filterMinLength="1"
|
selectionStateTitle=<<searchListState>> refreshTitle=<<refreshTitle>> type="search" filterMinLength="1"
|
||||||
tag="input" focus="true" class="tc-popup-handle" inputCancelActions=<<cancel-search-actions>>
|
tag="input" focus="true" class="tc-popup-handle" inputCancelActions=<<cancel-search-actions>>
|
||||||
inputAcceptActions=<<add-link-actions>> placeholder={{$:/language/Search/Search}} default=""
|
inputAcceptActions=<<add-link-actions>> placeholder={{$:/language/Search/Search}} default=""
|
||||||
configTiddlerFilter="[[$:/state/search/currentTab]!is[missing]get[text]] ~[{$:/config/SearchResults/Default}]" />
|
configTiddlerFilter="[[$:/state/search/currentTab]!is[missing]get[text]] ~[{$:/config/SearchResults/Default}]" />
|
||||||
</$keyboard>
|
</$keyboard>
|
||||||
</$keyboard>
|
</$keyboard>
|
||||||
|
 
|
||||||
<$reveal tag="span" state=<<storeTitle>> type="nomatch" text="">
|
<$reveal tag="span" state=<<storeTitle>> type="nomatch" text="">
|
||||||
<<external-link>>
|
<<external-link>>
|
||||||
|
 
|
||||||
<$button class="tc-btn-invisible" style="width: auto; display: inline-block; background-colour: inherit;">
|
<$button class="tc-btn-invisible" style="width: auto; display: inline-block; background-colour: inherit;">
|
||||||
<<cancel-search-actions>><$set name="cssEscapedTitle" value={{{ [<storyTiddler>escapecss[]] }}}><$action-sendmessage $message="tm-focus-selector" $param=<<get-focus-selector>>/></$set>
|
<<cancel-search-actions>><$set name="cssEscapedTitle" value={{{ [<storyTiddler>escapecss[]] }}}><$action-sendmessage $message="tm-focus-selector" $param=<<get-focus-selector>>/></$set>
|
||||||
{{$:/core/images/close-button}}
|
{{$:/core/images/close-button}}
|
||||||
|
@ -2,6 +2,7 @@ title: $:/core/ui/ImportPreviews/Fields
|
|||||||
tags: $:/tags/ImportPreview
|
tags: $:/tags/ImportPreview
|
||||||
caption: {{$:/language/Import/Listing/Preview/Fields}}
|
caption: {{$:/language/Import/Listing/Preview/Fields}}
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
<table class="tc-view-field-table">
|
<table class="tc-view-field-table">
|
||||||
<tbody>
|
<tbody>
|
||||||
<$list filter="[<payloadTiddler>subtiddlerfields<currentTiddler>sort[]] -text" variable="fieldName">
|
<$list filter="[<payloadTiddler>subtiddlerfields<currentTiddler>sort[]] -text" variable="fieldName">
|
||||||
|
@ -2,14 +2,26 @@ title: $:/snippets/LayoutSwitcher
|
|||||||
tags: $:/tags/ControlPanel/Appearance
|
tags: $:/tags/ControlPanel/Appearance
|
||||||
caption: {{$:/language/ControlPanel/LayoutSwitcher/Caption}}
|
caption: {{$:/language/ControlPanel/LayoutSwitcher/Caption}}
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
<$linkcatcher to="$:/layout">
|
<$linkcatcher to="$:/layout">
|
||||||
<div class="tc-chooser">
|
<div class="tc-chooser">
|
||||||
<$list filter="[all[tiddlers+shadows]tag[$:/tags/Layout]] [[$:/core/ui/PageTemplate]] +[!is[draft]sort[name]]">
|
<$list filter="[all[tiddlers+shadows]tag[$:/tags/Layout]] [[$:/core/ui/PageTemplate]] +[!is[draft]sort[name]]">
|
||||||
<$list filter="[{$:/layout}!has[text]]" variable="ignore" emptyMessage="""
|
<$list
|
||||||
<$set name="cls" filter="[all[current]field:title{$:/layout}]" value="tc-chooser-item tc-chosen" emptyValue="tc-chooser-item"><div class=<<cls>>><$link to={{!!title}}>''<$transclude field="name"/>'' - <$transclude field="description"/></$link></div>
|
filter="[{$:/layout}!has[text]]"
|
||||||
</$set>
|
variable="ignore"
|
||||||
|
emptyMessage="""\whitespace trim
|
||||||
|
<$set name="cls" filter="[all[current]field:title{$:/layout}]" value="tc-chooser-item tc-chosen" emptyValue="tc-chooser-item">
|
||||||
|
<div class=<<cls>>>
|
||||||
|
<$link to={{!!title}}>
|
||||||
|
''<$transclude field="name"/>'' - <$transclude field="description"/>
|
||||||
|
</$link></div></$set>
|
||||||
""">
|
""">
|
||||||
<$set name="cls" filter="[all[current]field:title[$:/core/ui/PageTemplate]]" value="tc-chooser-item tc-chosen" emptyValue="tc-chooser-item"><div class=<<cls>>><$link to={{!!title}}>''<$transclude field="name"/>'' - <$transclude field="description"/></$link></div>
|
<$set name="cls" filter="[all[current]field:title[$:/core/ui/PageTemplate]]" value="tc-chooser-item tc-chosen" emptyValue="tc-chooser-item">
|
||||||
|
<div class=<<cls>>>
|
||||||
|
<$link to={{!!title}}>
|
||||||
|
''<$transclude field="name"/>'' - <$transclude field="description"/>
|
||||||
|
</$link>
|
||||||
|
</div>
|
||||||
</$set>
|
</$set>
|
||||||
</$list>
|
</$list>
|
||||||
</$list>
|
</$list>
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
title: $:/snippets/ListTaggedCascade
|
title: $:/snippets/ListTaggedCascade
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
{{||$:/language/ControlPanel/Cascades/TagPrompt}}
|
{{||$:/language/ControlPanel/Cascades/TagPrompt}}
|
||||||
|
|
||||||
<ol>
|
<ol>
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
title: $:/core/ui/ViewTemplate/unfold
|
title: $:/core/ui/ViewTemplate/unfold
|
||||||
tags: $:/tags/ViewTemplate
|
tags: $:/tags/ViewTemplate
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
<$reveal tag="div" type="nomatch" state="$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/fold-bar" text="hide">
|
<$reveal tag="div" type="nomatch" state="$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/fold-bar" text="hide">
|
||||||
<$reveal tag="div" type="nomatch" stateTitle=<<folded-state>> text="hide" default="show" retain="yes" animate="yes">
|
<$reveal tag="div" type="nomatch" stateTitle=<<folded-state>> text="hide" default="show" retain="yes" animate="yes">
|
||||||
<$button tooltip={{$:/language/Buttons/Fold/Hint}} aria-label={{$:/language/Buttons/Fold/Caption}} class="tc-fold-banner">
|
<$button tooltip={{$:/language/Buttons/Fold/Hint}} aria-label={{$:/language/Buttons/Fold/Caption}} class="tc-fold-banner">
|
||||||
|
@ -3,5 +3,11 @@ title: $:/snippets/allfields
|
|||||||
\define renderfield(title)
|
\define renderfield(title)
|
||||||
<tr class="tc-view-field"><td class="tc-view-field-name">''<$text text=<<__title__>>/>'':</td><td class="tc-view-field-value">//{{$:/language/Docs/Fields/$title$}}//</td></tr>
|
<tr class="tc-view-field"><td class="tc-view-field-name">''<$text text=<<__title__>>/>'':</td><td class="tc-view-field-value">//{{$:/language/Docs/Fields/$title$}}//</td></tr>
|
||||||
\end
|
\end
|
||||||
<table class="tc-view-field-table"><tbody><$list filter="[fields[]sort[title]]" variable="listItem"><$macrocall $name="renderfield" title=<<listItem>>/></$list>
|
\whitespace trim
|
||||||
</tbody></table>
|
<table class="tc-view-field-table">
|
||||||
|
<tbody>
|
||||||
|
<$list filter="[fields[]sort[title]]" variable="listItem">
|
||||||
|
<$macrocall $name="renderfield" title=<<listItem>>/>
|
||||||
|
</$list>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
title: $:/snippets/download-wiki-button
|
title: $:/snippets/download-wiki-button
|
||||||
|
|
||||||
\define lingo-base() $:/language/ControlPanel/Tools/Download/
|
\define lingo-base() $:/language/ControlPanel/Tools/Download/
|
||||||
|
\whitespace trim
|
||||||
<$button class="tc-btn-big-green">
|
<$button class="tc-btn-big-green">
|
||||||
<$action-sendmessage $message="tm-download-file" $param="$:/core/save/all" filename="index.html"/>
|
<$action-sendmessage $message="tm-download-file" $param="$:/core/save/all" filename="index.html"/>
|
||||||
<<lingo Full/Caption>> {{$:/core/images/save-button}}
|
<<lingo Full/Caption>> {{$:/core/images/save-button}}
|
||||||
</$button>
|
</$button>
|
@ -1,5 +1,6 @@
|
|||||||
title: $:/snippets/minifocusswitcher
|
title: $:/snippets/minifocusswitcher
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
<$select tiddler="$:/config/AutoFocus">
|
<$select tiddler="$:/config/AutoFocus">
|
||||||
<$list filter="title tags text type fields">
|
<$list filter="title tags text type fields">
|
||||||
<option value=<<currentTiddler>>><<currentTiddler>></option>
|
<option value=<<currentTiddler>>><<currentTiddler>></option>
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
title: $:/snippets/minilanguageswitcher
|
title: $:/snippets/minilanguageswitcher
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
<$select tiddler="$:/language">
|
<$select tiddler="$:/language">
|
||||||
<$list filter="[[$:/languages/en-GB]] [plugin-type[language]sort[title]]">
|
<$list filter="[[$:/languages/en-GB]] [plugin-type[language]sort[title]]">
|
||||||
<option value=<<currentTiddler>>><$view field="description"><$view field="name"><$view field="title"/></$view></$view></option>
|
<option value=<<currentTiddler>>><$view field="description"><$view field="name"><$view field="title"/></$view></$view></option>
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
title: $:/snippets/minithemeswitcher
|
title: $:/snippets/minithemeswitcher
|
||||||
|
|
||||||
\define lingo-base() $:/language/ControlPanel/Theme/
|
\define lingo-base() $:/language/ControlPanel/Theme/
|
||||||
<<lingo Prompt>> <$select tiddler="$:/theme">
|
\whitespace trim
|
||||||
|
<<lingo Prompt>> <$select tiddler="$:/theme">
|
||||||
<$list filter="[plugin-type[theme]sort[title]]">
|
<$list filter="[plugin-type[theme]sort[title]]">
|
||||||
<option value=<<currentTiddler>>><$view field="name"><$view field="title"/></$view></option>
|
<option value=<<currentTiddler>>><$view field="name"><$view field="title"/></$view></option>
|
||||||
</$list>
|
</$list>
|
||||||
|
@ -3,6 +3,7 @@ title: $:/snippets/modules
|
|||||||
\define describeModuleType(type)
|
\define describeModuleType(type)
|
||||||
{{$:/language/Docs/ModuleTypes/$type$}}
|
{{$:/language/Docs/ModuleTypes/$type$}}
|
||||||
\end
|
\end
|
||||||
|
\whitespace trim
|
||||||
<$list filter="[moduletypes[]]">
|
<$list filter="[moduletypes[]]">
|
||||||
|
|
||||||
!! <$macrocall $name="currentTiddler" $type="text/plain" $output="text/plain"/>
|
!! <$macrocall $name="currentTiddler" $type="text/plain" $output="text/plain"/>
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
title: $:/snippets/palettepreview
|
title: $:/snippets/palettepreview
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
<$set name="currentTiddler" value={{$:/palette}}>
|
<$set name="currentTiddler" value={{$:/palette}}>
|
||||||
{{||$:/snippets/currpalettepreview}}
|
{{||$:/snippets/currpalettepreview}}
|
||||||
</$set>
|
</$set>
|
||||||
|
@ -1,8 +1,19 @@
|
|||||||
title: $:/snippets/paletteswitcher
|
title: $:/snippets/paletteswitcher
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
<$linkcatcher to="$:/palette">
|
<$linkcatcher to="$:/palette">
|
||||||
<div class="tc-chooser"><$list filter="[all[shadows+tiddlers]tag[$:/tags/Palette]sort[name]]"><$set name="cls" filter="[all[current]prefix{$:/palette}]" value="tc-chooser-item tc-chosen" emptyValue="tc-chooser-item"><div class=<<cls>>><$link to={{!!title}}>''<$view field="name" format="text"/>'' - <$view field="description" format="text"/>{{||$:/snippets/currpalettepreview}}</$link>
|
<div class="tc-chooser">
|
||||||
</div></$set>
|
<$list filter="[all[shadows+tiddlers]tag[$:/tags/Palette]sort[name]]">
|
||||||
|
<$set name="cls" filter="[all[current]prefix{$:/palette}]" value="tc-chooser-item tc-chosen" emptyValue="tc-chooser-item">
|
||||||
|
<div class=<<cls>>>
|
||||||
|
<$link to={{!!title}}>
|
||||||
|
''<$view field="name" format="text"/>''
|
||||||
|
 - 
|
||||||
|
<$view field="description" format="text"/>
|
||||||
|
{{||$:/snippets/currpalettepreview}}
|
||||||
|
</$link>
|
||||||
|
</div>
|
||||||
|
</$set>
|
||||||
</$list>
|
</$list>
|
||||||
</div>
|
</div>
|
||||||
</$linkcatcher>
|
</$linkcatcher>
|
||||||
|
@ -1,7 +1,16 @@
|
|||||||
title: $:/snippets/themeswitcher
|
title: $:/snippets/themeswitcher
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
<$linkcatcher to="$:/theme">
|
<$linkcatcher to="$:/theme">
|
||||||
<div class="tc-chooser"><$list filter="[plugin-type[theme]sort[title]]"><$set name="cls" filter="[all[current]field:title{$:/theme}] [[$:/theme]!has[text]addsuffix[s/tiddlywiki/vanilla]field:title<currentTiddler>] +[limit[1]]" value="tc-chooser-item tc-chosen" emptyValue="tc-chooser-item"><div class=<<cls>>><$link to={{!!title}}>''<$view field="name" format="text"/>'' <$view field="description" format="text"/></$link></div>
|
<div class="tc-chooser">
|
||||||
|
<$list filter="[plugin-type[theme]sort[title]]">
|
||||||
|
<$set name="cls" filter="[all[current]field:title{$:/theme}] [[$:/theme]!has[text]addsuffix[s/tiddlywiki/vanilla]field:title<currentTiddler>] +[limit[1]]" value="tc-chooser-item tc-chosen" emptyValue="tc-chooser-item">
|
||||||
|
<div class=<<cls>>><$link to={{!!title}}>
|
||||||
|
''<$view field="name" format="text"/>''
|
||||||
|
 
|
||||||
|
<$view field="description" format="text"/>
|
||||||
|
</$link>
|
||||||
|
</div>
|
||||||
</$set>
|
</$set>
|
||||||
</$list>
|
</$list>
|
||||||
</div>
|
</div>
|
||||||
|
@ -3,6 +3,7 @@ title: $:/snippets/viewswitcher
|
|||||||
\define icon()
|
\define icon()
|
||||||
$:/core/images/storyview-$(storyview)$
|
$:/core/images/storyview-$(storyview)$
|
||||||
\end
|
\end
|
||||||
|
\whitespace trim
|
||||||
<$linkcatcher to="$:/view">
|
<$linkcatcher to="$:/view">
|
||||||
<div class="tc-chooser tc-viewswitcher">
|
<div class="tc-chooser tc-viewswitcher">
|
||||||
<$list filter="[storyviews[]]" variable="storyview">
|
<$list filter="[storyviews[]]" variable="storyview">
|
||||||
|
Loading…
Reference in New Issue
Block a user