mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-12-24 17:10:29 +00:00
Trim Saga: Edit and View templates (#6276)
* the text/vnd-tiddlywiki tiddler and language * adding trim: edit and view templates
This commit is contained in:
parent
758d590837
commit
b9ae6607c0
@ -3,6 +3,7 @@ title: $:/language/Help/default
|
|||||||
\define commandTitle()
|
\define commandTitle()
|
||||||
$:/language/Help/$(command)$
|
$:/language/Help/$(command)$
|
||||||
\end
|
\end
|
||||||
|
\whitespace trim
|
||||||
```
|
```
|
||||||
usage: tiddlywiki [<wikifolder>] [--<command> [<args>...]...]
|
usage: tiddlywiki [<wikifolder>] [--<command> [<args>...]...]
|
||||||
```
|
```
|
||||||
@ -11,7 +12,9 @@ Available commands:
|
|||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<$list filter="[commands[]sort[title]]" variable="command">
|
<$list filter="[commands[]sort[title]]" variable="command">
|
||||||
<li><$link to=<<commandTitle>>><$macrocall $name="command" $type="text/plain" $output="text/plain"/></$link>: <$transclude tiddler=<<commandTitle>> field="description"/></li>
|
<li><$link to=<<commandTitle>>><$macrocall $name="command" $type="text/plain" $output="text/plain"/></$link>:
|
||||||
|
 
|
||||||
|
<$transclude tiddler=<<commandTitle>> field="description"/></li>
|
||||||
</$list>
|
</$list>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
title: $:/core/ui/EditTemplate/body/editor
|
title: $:/core/ui/EditTemplate/body/editor
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
|
|
||||||
<$edit
|
<$edit
|
||||||
|
|
||||||
field="text"
|
field="text"
|
||||||
|
@ -8,9 +8,13 @@ $:/config/EditorToolbarButtons/Visibility/$(currentTiddler)$
|
|||||||
<$action-popup $state=<<importState>> $coords="(0,0,0,0)" $floating="yes"/>
|
<$action-popup $state=<<importState>> $coords="(0,0,0,0)" $floating="yes"/>
|
||||||
\end
|
\end
|
||||||
|
|
||||||
<$set name="edit-preview-state" value={{{ [{$:/config/ShowEditPreview/PerTiddler}!match[yes]then[$:/state/showeditpreview]] :else[<qualify "$:/state/showeditpreview">] }}}>
|
\whitespace trim
|
||||||
<$vars importTitle=<<qualify $:/ImportImage>> importState=<<qualify $:/state/ImportImage>> >
|
<$let
|
||||||
<$dropzone importTitle=<<importTitle>> autoOpenOnImport="no" contentTypesFilter={{$:/config/Editor/ImportContentTypesFilter}} class="tc-dropzone-editor" enable={{{ [{$:/config/DragAndDrop/Enable}match[no]] :else[subfilter{$:/config/Editor/EnableImportFilter}then[yes]else[no]] }}} filesOnly="yes" actions=<<importFileActions>> ><$reveal stateTitle=<<edit-preview-state>> type="match" text="yes" tag="div">
|
edit-preview-state={{{ [{$:/config/ShowEditPreview/PerTiddler}!match[yes]then[$:/state/showeditpreview]] :else[<qualify "$:/state/showeditpreview">] }}}
|
||||||
|
importTitle=<<qualify $:/ImportImage>>
|
||||||
|
importState=<<qualify $:/state/ImportImage>> >
|
||||||
|
<$dropzone importTitle=<<importTitle>> autoOpenOnImport="no" contentTypesFilter={{$:/config/Editor/ImportContentTypesFilter}} class="tc-dropzone-editor" enable={{{ [{$:/config/DragAndDrop/Enable}match[no]] :else[subfilter{$:/config/Editor/EnableImportFilter}then[yes]else[no]] }}} filesOnly="yes" actions=<<importFileActions>> >
|
||||||
|
<$reveal stateTitle=<<edit-preview-state>> type="match" text="yes" tag="div">
|
||||||
<div class="tc-tiddler-preview">
|
<div class="tc-tiddler-preview">
|
||||||
|
|
||||||
<$transclude tiddler="$:/core/ui/EditTemplate/body/editor" mode="inline"/>
|
<$transclude tiddler="$:/core/ui/EditTemplate/body/editor" mode="inline"/>
|
||||||
@ -34,5 +38,4 @@ $:/config/EditorToolbarButtons/Visibility/$(currentTiddler)$
|
|||||||
|
|
||||||
</$reveal>
|
</$reveal>
|
||||||
</$dropzone>
|
</$dropzone>
|
||||||
</$vars>
|
</$let>
|
||||||
</$set>
|
|
||||||
|
@ -4,6 +4,7 @@ tags: $:/tags/EditTemplate
|
|||||||
\define config-title()
|
\define config-title()
|
||||||
$:/config/EditToolbarButtons/Visibility/$(listItem)$
|
$:/config/EditToolbarButtons/Visibility/$(listItem)$
|
||||||
\end
|
\end
|
||||||
|
\whitespace trim
|
||||||
<div class="tc-tiddler-title tc-tiddler-edit-title">
|
<div class="tc-tiddler-title tc-tiddler-edit-title">
|
||||||
<$view field="title"/>
|
<$view field="title"/>
|
||||||
<span class="tc-tiddler-controls tc-titlebar"><$list filter="[all[shadows+tiddlers]tag[$:/tags/EditToolbar]!has[draft.of]]" variable="listItem"><$reveal type="nomatch" state=<<config-title>> text="hide"><$transclude tiddler=<<listItem>>/></$reveal></$list></span>
|
<span class="tc-tiddler-controls tc-titlebar"><$list filter="[all[shadows+tiddlers]tag[$:/tags/EditToolbar]!has[draft.of]]" variable="listItem"><$reveal type="nomatch" state=<<config-title>> text="hide"><$transclude tiddler=<<listItem>>/></$reveal></$list></span>
|
||||||
|
@ -3,10 +3,12 @@ tags: $:/tags/EditTemplate
|
|||||||
|
|
||||||
\define lingo-base() $:/language/EditTemplate/Shadow/
|
\define lingo-base() $:/language/EditTemplate/Shadow/
|
||||||
\define pluginLinkBody()
|
\define pluginLinkBody()
|
||||||
|
\whitespace trim
|
||||||
<$link to="""$(pluginTitle)$""">
|
<$link to="""$(pluginTitle)$""">
|
||||||
<$text text="""$(pluginTitle)$"""/>
|
<$text text="""$(pluginTitle)$"""/>
|
||||||
</$link>
|
</$link>
|
||||||
\end
|
\end
|
||||||
|
\whitespace trim
|
||||||
<$list filter="[all[current]get[draft.of]is[shadow]!is[tiddler]]">
|
<$list filter="[all[current]get[draft.of]is[shadow]!is[tiddler]]">
|
||||||
|
|
||||||
<$list filter="[all[current]shadowsource[]]" variable="pluginTitle">
|
<$list filter="[all[current]shadowsource[]]" variable="pluginTitle">
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
title: $:/core/ui/EditTemplate/title
|
title: $:/core/ui/EditTemplate/title
|
||||||
tags: $:/tags/EditTemplate
|
tags: $:/tags/EditTemplate
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
<$edit-text field="draft.title" class="tc-titlebar tc-edit-texteditor" focus={{{ [{$:/config/AutoFocus}match[title]then[true]] ~[[false]] }}} tabindex={{$:/config/EditTabIndex}} cancelPopups="yes"/>
|
<$edit-text field="draft.title" class="tc-titlebar tc-edit-texteditor" focus={{{ [{$:/config/AutoFocus}match[title]then[true]] ~[[false]] }}} tabindex={{$:/config/EditTabIndex}} cancelPopups="yes"/>
|
||||||
|
|
||||||
<$vars pattern="""[\|\[\]{}]""" bad-chars="""`| [ ] { }`""">
|
<$vars pattern="""[\|\[\]{}]""" bad-chars="""`| [ ] { }`""">
|
||||||
@ -9,7 +10,7 @@ tags: $:/tags/EditTemplate
|
|||||||
|
|
||||||
<div class="tc-message-box">
|
<div class="tc-message-box">
|
||||||
|
|
||||||
{{$:/core/images/warning}} {{$:/language/EditTemplate/Title/BadCharacterWarning}}
|
{{$:/core/images/warning}} {{$:/language/EditTemplate/Title/BadCharacterWarning}}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -23,7 +24,7 @@ tags: $:/tags/EditTemplate
|
|||||||
|
|
||||||
<div class="tc-message-box">
|
<div class="tc-message-box">
|
||||||
|
|
||||||
{{$:/core/images/warning}} {{$:/language/EditTemplate/Title/Exists/Prompt}}: <$link to={{!!draft.title}} />
|
{{$:/core/images/warning}} {{$:/language/EditTemplate/Title/Exists/Prompt}}: <$link to={{!!draft.title}} />
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -33,18 +34,22 @@ tags: $:/tags/EditTemplate
|
|||||||
|
|
||||||
<$vars fromTitle={{!!draft.of}} toTitle={{!!draft.title}}>
|
<$vars fromTitle={{!!draft.of}} toTitle={{!!draft.title}}>
|
||||||
|
|
||||||
<$checkbox tiddler="$:/config/RelinkOnRename" field="text" checked="yes" unchecked="no" default="no"> {{$:/language/EditTemplate/Title/Relink/Prompt}}</$checkbox>
|
<$checkbox tiddler="$:/config/RelinkOnRename" field="text" checked="yes" unchecked="no" default="no"> {{$:/language/EditTemplate/Title/Relink/Prompt}}</$checkbox>
|
||||||
|
|
||||||
<$list filter="[title<fromTitle>backlinks[]limit[1]]" variable="listItem">
|
<$list filter="[title<fromTitle>backlinks[]limit[1]]" variable="listItem">
|
||||||
|
|
||||||
<$vars stateTiddler=<<qualify "$:/state/edit/references">> >
|
<$vars stateTiddler=<<qualify "$:/state/edit/references">> >
|
||||||
|
|
||||||
<$reveal type="nomatch" state=<<stateTiddler>> text="show">
|
<$reveal type="nomatch" state=<<stateTiddler>> text="show">
|
||||||
<$button set=<<stateTiddler>> setTo="show" class="tc-btn-invisible">{{$:/core/images/right-arrow}}
|
<$button set=<<stateTiddler>> setTo="show" class="tc-btn-invisible">
|
||||||
|
{{$:/core/images/right-arrow}}
|
||||||
|
 
|
||||||
<<lingo EditTemplate/Title/References/Prompt>></$button>
|
<<lingo EditTemplate/Title/References/Prompt>></$button>
|
||||||
</$reveal>
|
</$reveal>
|
||||||
<$reveal type="match" state=<<stateTiddler>> text="show">
|
<$reveal type="match" state=<<stateTiddler>> text="show">
|
||||||
<$button set=<<stateTiddler>> setTo="hide" class="tc-btn-invisible">{{$:/core/images/down-arrow}}
|
<$button set=<<stateTiddler>> setTo="hide" class="tc-btn-invisible">
|
||||||
|
{{$:/core/images/down-arrow}}
|
||||||
|
 
|
||||||
<<lingo EditTemplate/Title/References/Prompt>></$button>
|
<<lingo EditTemplate/Title/References/Prompt>></$button>
|
||||||
</$reveal>
|
</$reveal>
|
||||||
|
|
||||||
|
@ -3,6 +3,7 @@ title: $:/core/ui/ViewTemplate/body/import
|
|||||||
\define lingo-base() $:/language/Import/
|
\define lingo-base() $:/language/Import/
|
||||||
|
|
||||||
\define confirmCancel()
|
\define confirmCancel()
|
||||||
|
\whitespace trim
|
||||||
<$action-confirm $message={{$:/language/Import/Listing/Cancel/Warning}} >
|
<$action-confirm $message={{$:/language/Import/Listing/Cancel/Warning}} >
|
||||||
<$action-deletetiddler $tiddler=<<currentTiddler>>/>
|
<$action-deletetiddler $tiddler=<<currentTiddler>>/>
|
||||||
<$action-sendmessage $message="tm-close-tiddler" title=<<currentTiddler>>/>
|
<$action-sendmessage $message="tm-close-tiddler" title=<<currentTiddler>>/>
|
||||||
@ -10,14 +11,18 @@ title: $:/core/ui/ViewTemplate/body/import
|
|||||||
\end
|
\end
|
||||||
|
|
||||||
\define buttons()
|
\define buttons()
|
||||||
|
\whitespace trim
|
||||||
<$button actions=<<confirmCancel>> ><<lingo Listing/Cancel/Caption>></$button>
|
<$button actions=<<confirmCancel>> ><<lingo Listing/Cancel/Caption>></$button>
|
||||||
|
 
|
||||||
<$button message="tm-perform-import" param=<<currentTiddler>>><<lingo Listing/Import/Caption>></$button>
|
<$button message="tm-perform-import" param=<<currentTiddler>>><<lingo Listing/Import/Caption>></$button>
|
||||||
<<lingo Listing/Preview>> <$select tiddler="$:/state/importpreviewtype" default="$:/core/ui/ImportPreviews/Text">
|
 
|
||||||
|
<<lingo Listing/Preview>> <$select tiddler="$:/state/importpreviewtype" default="$:/core/ui/ImportPreviews/Text">
|
||||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/ImportPreview]!has[draft.of]]">
|
<$list filter="[all[shadows+tiddlers]tag[$:/tags/ImportPreview]!has[draft.of]]">
|
||||||
<option value=<<currentTiddler>>>{{!!caption}}</option>
|
<option value=<<currentTiddler>>>{{!!caption}}</option>
|
||||||
</$list>
|
</$list>
|
||||||
</$select>
|
</$select>
|
||||||
\end
|
\end
|
||||||
|
\whitespace trim
|
||||||
|
|
||||||
<$list filter="[all[current]field:plugin-type[import]]">
|
<$list filter="[all[current]field:plugin-type[import]]">
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
title: $:/core/ui/ViewTemplate/body/plugin
|
title: $:/core/ui/ViewTemplate/body/plugin
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
<div class="tc-tiddler-plugin-info">
|
<div class="tc-tiddler-plugin-info">
|
||||||
<$let plugin-type={{!!plugin-type}}
|
<$let plugin-type={{!!plugin-type}}
|
||||||
default-popup-state="yes"
|
default-popup-state="yes"
|
||||||
|
@ -2,6 +2,7 @@ title: $:/core/ui/ViewTemplate/classic
|
|||||||
tags: $:/tags/ViewTemplate $:/tags/EditTemplate
|
tags: $:/tags/ViewTemplate $:/tags/EditTemplate
|
||||||
|
|
||||||
\define lingo-base() $:/language/ClassicWarning/
|
\define lingo-base() $:/language/ClassicWarning/
|
||||||
|
\whitespace trim
|
||||||
<$list filter="[all[current]type[text/x-tiddlywiki]]">
|
<$list filter="[all[current]type[text/x-tiddlywiki]]">
|
||||||
<div class="tc-message-box">
|
<div class="tc-message-box">
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
title: $:/core/ui/ViewTemplate/tags
|
title: $:/core/ui/ViewTemplate/tags
|
||||||
tags: $:/tags/ViewTemplate
|
tags: $:/tags/ViewTemplate
|
||||||
|
|
||||||
|
\whitespace trim
|
||||||
<$reveal type="nomatch" stateTitle=<<folded-state>> text="hide" tag="div" retain="yes" animate="yes">
|
<$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>
|
<div class="tc-tags-wrapper"><$list filter="[all[current]tags[]sort[title]]" template="$:/core/ui/TagTemplate" storyview="pop"/></div>
|
||||||
</$reveal>
|
</$reveal>
|
||||||
|
@ -5,22 +5,23 @@ title: $:/core/macros/image-picker
|
|||||||
type: text/vnd.tiddlywiki
|
type: text/vnd.tiddlywiki
|
||||||
|
|
||||||
\define image-picker-thumbnail(actions)
|
\define image-picker-thumbnail(actions)
|
||||||
<$button tag="a" tooltip="""$(imageTitle)$""">
|
<$button tag="a" tooltip="""$(imageTitle)$""">$actions$<$transclude tiddler=<<imageTitle>>/></$button>
|
||||||
$actions$
|
|
||||||
<$transclude tiddler=<<imageTitle>>/>
|
|
||||||
</$button>
|
|
||||||
\end
|
\end
|
||||||
|
|
||||||
\define image-picker-list(filter,actions)
|
\define image-picker-list(filter,actions)
|
||||||
|
\whitespace trim
|
||||||
<$list filter="""$filter$""" variable="imageTitle">
|
<$list filter="""$filter$""" variable="imageTitle">
|
||||||
<$macrocall $name="image-picker-thumbnail" actions="""$actions$"""/>
|
<$macrocall $name="image-picker-thumbnail" actions="""$actions$"""/>
|
||||||
|
 
|
||||||
</$list>
|
</$list>
|
||||||
\end
|
\end
|
||||||
|
|
||||||
\define image-picker(actions,filter:"[all[shadows+tiddlers]is[image]] -[type[application/pdf]] +[!has[draft.of]$subfilter$sort[title]]",subfilter:"")
|
\define image-picker(actions,filter:"[all[shadows+tiddlers]is[image]] -[type[application/pdf]] +[!has[draft.of]$subfilter$sort[title]]",subfilter:"")
|
||||||
|
\whitespace trim
|
||||||
<div class="tc-image-chooser">
|
<div class="tc-image-chooser">
|
||||||
<$vars state-system=<<qualify "$:/state/image-picker/system">>>
|
<$vars state-system=<<qualify "$:/state/image-picker/system">>>
|
||||||
<$checkbox tiddler=<<state-system>> field="text" checked="show" unchecked="hide" default="hide">
|
<$checkbox tiddler=<<state-system>> field="text" checked="show" unchecked="hide" default="hide">
|
||||||
|
 
|
||||||
{{$:/language/SystemTiddlers/Include/Prompt}}
|
{{$:/language/SystemTiddlers/Include/Prompt}}
|
||||||
</$checkbox>
|
</$checkbox>
|
||||||
<$reveal state=<<state-system>> type="match" text="hide" default="hide" tag="div">
|
<$reveal state=<<state-system>> type="match" text="hide" default="hide" tag="div">
|
||||||
|
Loading…
Reference in New Issue
Block a user