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 add-link-actions()
|
||||
\whitespace trim
|
||||
<$action-sendmessage $message="tm-edit-text-operation" $param="make-link" text={{$(linkTiddler)$}} />
|
||||
<$action-deletetiddler $filter="[<dropdown-state>] [<searchTiddler>] [<linkTiddler>] [<storeTitle>] [<searchListState>]"/>
|
||||
\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 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
|
||||
|
||||
\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()
|
||||
\whitespace trim
|
||||
<$button class="tc-btn-invisible" style="width: auto; display: inline-block; background-colour: inherit;" actions=<<add-link-actions>>>
|
||||
{{$:/core/images/chevron-right}}
|
||||
</$button>
|
||||
\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)
|
||||
\whitespace trim
|
||||
''<<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">>>
|
||||
@ -38,8 +41,10 @@ title: $:/core/ui/EditorToolbar/link-dropdown
|
||||
configTiddlerFilter="[[$:/state/search/currentTab]!is[missing]get[text]] ~[{$:/config/SearchResults/Default}]" />
|
||||
</$keyboard>
|
||||
</$keyboard>
|
||||
 
|
||||
<$reveal tag="span" state=<<storeTitle>> type="nomatch" text="">
|
||||
<<external-link>>
|
||||
 
|
||||
<$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>
|
||||
{{$:/core/images/close-button}}
|
||||
|
@ -2,6 +2,7 @@ title: $:/core/ui/ImportPreviews/Fields
|
||||
tags: $:/tags/ImportPreview
|
||||
caption: {{$:/language/Import/Listing/Preview/Fields}}
|
||||
|
||||
\whitespace trim
|
||||
<table class="tc-view-field-table">
|
||||
<tbody>
|
||||
<$list filter="[<payloadTiddler>subtiddlerfields<currentTiddler>sort[]] -text" variable="fieldName">
|
||||
|
@ -2,14 +2,26 @@ title: $:/snippets/LayoutSwitcher
|
||||
tags: $:/tags/ControlPanel/Appearance
|
||||
caption: {{$:/language/ControlPanel/LayoutSwitcher/Caption}}
|
||||
|
||||
\whitespace trim
|
||||
<$linkcatcher to="$:/layout">
|
||||
<div class="tc-chooser">
|
||||
<$list filter="[all[tiddlers+shadows]tag[$:/tags/Layout]] [[$:/core/ui/PageTemplate]] +[!is[draft]sort[name]]">
|
||||
<$list filter="[{$:/layout}!has[text]]" variable="ignore" emptyMessage="""
|
||||
<$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>
|
||||
<$list
|
||||
filter="[{$:/layout}!has[text]]"
|
||||
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>
|
||||
</$list>
|
||||
</$list>
|
||||
|
@ -1,5 +1,6 @@
|
||||
title: $:/snippets/ListTaggedCascade
|
||||
|
||||
\whitespace trim
|
||||
{{||$:/language/ControlPanel/Cascades/TagPrompt}}
|
||||
|
||||
<ol>
|
||||
|
@ -1,6 +1,7 @@
|
||||
title: $:/core/ui/ViewTemplate/unfold
|
||||
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" 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">
|
||||
|
@ -3,5 +3,11 @@ title: $:/snippets/allfields
|
||||
\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>
|
||||
\end
|
||||
<table class="tc-view-field-table"><tbody><$list filter="[fields[]sort[title]]" variable="listItem"><$macrocall $name="renderfield" title=<<listItem>>/></$list>
|
||||
</tbody></table>
|
||||
\whitespace trim
|
||||
<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
|
||||
|
||||
\define lingo-base() $:/language/ControlPanel/Tools/Download/
|
||||
\whitespace trim
|
||||
<$button class="tc-btn-big-green">
|
||||
<$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>
|
@ -1,5 +1,6 @@
|
||||
title: $:/snippets/minifocusswitcher
|
||||
|
||||
\whitespace trim
|
||||
<$select tiddler="$:/config/AutoFocus">
|
||||
<$list filter="title tags text type fields">
|
||||
<option value=<<currentTiddler>>><<currentTiddler>></option>
|
||||
|
@ -1,5 +1,6 @@
|
||||
title: $:/snippets/minilanguageswitcher
|
||||
|
||||
\whitespace trim
|
||||
<$select tiddler="$:/language">
|
||||
<$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>
|
||||
|
@ -1,7 +1,8 @@
|
||||
title: $:/snippets/minithemeswitcher
|
||||
|
||||
\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]]">
|
||||
<option value=<<currentTiddler>>><$view field="name"><$view field="title"/></$view></option>
|
||||
</$list>
|
||||
|
@ -3,6 +3,7 @@ title: $:/snippets/modules
|
||||
\define describeModuleType(type)
|
||||
{{$:/language/Docs/ModuleTypes/$type$}}
|
||||
\end
|
||||
\whitespace trim
|
||||
<$list filter="[moduletypes[]]">
|
||||
|
||||
!! <$macrocall $name="currentTiddler" $type="text/plain" $output="text/plain"/>
|
||||
|
@ -1,5 +1,6 @@
|
||||
title: $:/snippets/palettepreview
|
||||
|
||||
\whitespace trim
|
||||
<$set name="currentTiddler" value={{$:/palette}}>
|
||||
{{||$:/snippets/currpalettepreview}}
|
||||
</$set>
|
||||
|
@ -1,8 +1,19 @@
|
||||
title: $:/snippets/paletteswitcher
|
||||
|
||||
\whitespace trim
|
||||
<$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></$set>
|
||||
<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>
|
||||
</$set>
|
||||
</$list>
|
||||
</div>
|
||||
</$linkcatcher>
|
||||
|
@ -1,7 +1,16 @@
|
||||
title: $:/snippets/themeswitcher
|
||||
|
||||
\whitespace trim
|
||||
<$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>
|
||||
</$list>
|
||||
</div>
|
||||
|
@ -3,6 +3,7 @@ title: $:/snippets/viewswitcher
|
||||
\define icon()
|
||||
$:/core/images/storyview-$(storyview)$
|
||||
\end
|
||||
\whitespace trim
|
||||
<$linkcatcher to="$:/view">
|
||||
<div class="tc-chooser tc-viewswitcher">
|
||||
<$list filter="[storyviews[]]" variable="storyview">
|
||||
|
Loading…
Reference in New Issue
Block a user