1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-24 00:50:28 +00:00

Style tweaks for the edit template

This commit is contained in:
Jermolene 2013-11-18 09:00:00 +00:00
parent 9257c8205f
commit 7658789971
7 changed files with 53 additions and 52 deletions

View File

@ -2,6 +2,6 @@ title: $:/core/ui/EditTemplate
modifier: JeremyRuston
\define frame-classes()
tw-tiddler-frame $(missingTiddlerClass)$ $(shadowTiddlerClass)$ $(systemTiddlerClass)$
tw-tiddler-frame tw-tiddler-edit-frame $(missingTiddlerClass)$ $(shadowTiddlerClass)$ $(systemTiddlerClass)$
\end
<div class=<<frame-classes>>><$list filter="[is[shadow]!has[draft.of]tag[$:/tags/EditTemplate]] [!is[shadow]!has[draft.of]tag[$:/tags/EditTemplate]]" variable="listItem"><$transclude tiddler=<<listItem>>/></$list></div>

View File

@ -2,7 +2,7 @@ title: $:/core/ui/EditTemplate/body
tags: $:/tags/EditTemplate
<$reveal state="$:/ShowEditPreview" type="match" text="yes">
<$transclude tiddler="$:/core/ui/EditorHint"/> <$button type="set" set="$:/ShowEditPreview" setTo="no">hide preview</$button>
//<$transclude tiddler="$:/core/ui/EditorHint"/>// <$button type="set" set="$:/ShowEditPreview" setTo="no">hide preview</$button>
<div class="tw-tiddler-preview">
<div class="tw-tiddler-preview-preview">
<$transclude />
@ -13,6 +13,6 @@ tags: $:/tags/EditTemplate
</div>
</$reveal>
<$reveal state="$:/ShowEditPreview" type="nomatch" text="yes">
<$transclude tiddler="$:/core/ui/EditorHint"/> <$button type="set" set="$:/ShowEditPreview" setTo="yes">show preview</$button>
//<$transclude tiddler="$:/core/ui/EditorHint"/>// <$button type="set" set="$:/ShowEditPreview" setTo="yes">show preview</$button>
<$edit field="text" class="tw-edit-texteditor"/>
</$reveal>

View File

@ -2,13 +2,13 @@ title: $:/core/ui/EditTemplate/fields
tags: $:/tags/EditTemplate
<$fieldmangler><div class="tw-edit-fields">
<table class="tw-edit-fields"><tbody><$list filter="[is[current]fields[]] -title -tags -text -creator -created -modified -modifier -[[draft.title]] -[[draft.of]]" variable="currentField"><tr class="tw-edit-field"><td class="tw-edit-field-name"><<currentField>>:</td><td class="tw-edit-field-value"><$edit-text tiddler=<<currentTiddler>> field=<<currentField>> placeholder="field value"/></td><td class="tw-edit-field-remove"><$button message="tw-remove-field" param=<<currentField>> class="btn-invisible">{{$:/core/images/delete-button}}</$button></td>
<table class="tw-edit-fields"><tbody><$list filter="[is[current]fields[]] -title -tags -text -creator -created -modified -modifier -type -[[draft.title]] -[[draft.of]]" variable="currentField"><tr class="tw-edit-field"><td class="tw-edit-field-name"><<currentField>>:</td><td class="tw-edit-field-value"><$edit-text tiddler=<<currentTiddler>> field=<<currentField>> placeholder="field value"/></td><td class="tw-edit-field-remove"><$button message="tw-remove-field" param=<<currentField>> class="btn-invisible">{{$:/core/images/delete-button}}</$button></td>
</tr>
</$list>
</tbody>
</table>
</div>
<div class="tw-edit-field-add">Add a new field: <span class="tw-edit-field-add-name"><$edit-text tiddler="$:/NewFieldName" tag="input" default="" placeholder="field name" class="tw-edit-texteditor"/></span> <span class="tw-edit-field-add-button"><$button message="tw-add-field" param={{$:/NewFieldName}} set="$:/NewFieldName" setTo="" class="">add</$button></span></div>
<div class="tw-edit-field-add">//Add a new field:// <span class="tw-edit-field-add-name"><$edit-text tiddler="$:/NewFieldName" tag="input" default="" placeholder="field name" class="tw-edit-texteditor"/></span> <span class="tw-edit-field-add-button"><$button message="tw-add-field" param={{$:/NewFieldName}} set="$:/NewFieldName" setTo="" class="">add</$button></span></div>
</$fieldmangler>

View File

@ -7,11 +7,11 @@ background-color:$(backgroundColor)$;
<$fieldmangler><div class="tw-edit-tags-list"><$list filter="[is[current]tags[]sort[title]]" storyview="pop" itemClass="tw-tag-editor-label"><$set name="backgroundColor" value={{!!color}}><span style=<<tag-styles>> class="tw-tag-label"><$view field="title" format="text" /><$button message="tw-remove-tag" param={{!!title}} class="btn-invisible tw-remove-tag-button">&times;</$button></span></$set>
</$list></div>
<div class="tw-add-tag">Add a new tag: <span class="tw-add-tag-name"><$edit-text tiddler="$:/NewTagName" tag="input" default="" placeholder="tag name" focusPopup=<<qualify "$:/state/tagsAutoComplete">> class="tw-edit-texteditor"/></span> <$button popup=<<qualify "$:/state/tagsAutoComplete">> class="btn-invisible">{{$:/core/images/down-arrow}}</$button> <span class="tw-add-tag-button"><$button message="tw-add-tag" param={{$:/NewTagName}} set="$:/NewTagName" setTo="" class="">add</$button></span></div>
<div class="tw-add-tag">//Add a new tag:// <span class="tw-add-tag-name"><$edit-text tiddler="$:/NewTagName" tag="input" default="" placeholder="tag name" focusPopup=<<qualify "$:/state/tagsAutoComplete">> class="tw-edit-texteditor"/></span> <$button popup=<<qualify "$:/state/tagsAutoComplete">> class="btn-invisible btn-dropdown">{{$:/core/images/down-arrow}}</$button> <span class="tw-add-tag-button"><$button message="tw-add-tag" param={{$:/NewTagName}} set="$:/NewTagName" setTo="" class="">add</$button></span></div>
<div class="tw-tags-autocomplete-wrapper">
<div class="tw-block-dropdown-wrapper">
<$reveal state=<<qualify "$:/state/tagsAutoComplete">> type="nomatch" text="" default="">
<div class="tw-tags-autocomplete">
<div class="tw-block-dropdown">
<$linkcatcher set="$:/NewTagName" setTo="" message="tw-add-tag"><$list filter="[!is[shadow]tags[]search{$:/NewTagName}sort[title]]"><$link><$set name="backgroundColor" value={{!!color}}><span style=<<tag-styles>> class="tw-tag-label"><$view field="title" format="text"/></span></$set></$link>
</$list>
</$linkcatcher>

View File

@ -1,3 +1,3 @@
title: $:/core/ui/EditorHint
<span class="tw-tiddler-help">Use WikiText to add formatting, images, and dynamic features</span>
Use WikiText to add formatting, images, and dynamic features

View File

@ -1,2 +1,2 @@
title: $:/tags/EditTemplate
list: [[$:/core/ui/EditTemplate/controls]] [[$:/core/ui/EditTemplate/title]] [[$:/core/ui/EditTemplate/tags]] [[$:/core/ui/EditTemplate/body]] [[$:/core/ui/EditTemplate/fields]]
list: [[$:/core/ui/EditTemplate/controls]] [[$:/core/ui/EditTemplate/title]] [[$:/core/ui/EditTemplate/tags]] [[$:/core/ui/EditTemplate/body]] [[$:/core/ui/EditTemplate/type]] [[$:/core/ui/EditTemplate/fields]]

View File

@ -562,6 +562,15 @@ canvas.tw-edit-bitmapeditor {
** Tiddler edit mode
*/
.tw-tiddler-edit-frame em {
color: #999;
font-style: normal;
}
.tw-edit-type-dropdown a.tw-tiddlylink-missing {
font-style: normal;
}
.tw-edit-tags-list {
margin: 14px 0 14px 0;
}
@ -575,44 +584,6 @@ canvas.tw-edit-bitmapeditor {
padding-left: 4px;
}
.tw-tags-autocomplete-wrapper {
position: relative;
}
.tw-tags-autocomplete {
position: absolute;
min-width: 280px;
border: 1px solid {{$:/themes/tiddlywiki/snowwhite/colourmappings##dropdownborder}};
background-color: {{$:/themes/tiddlywiki/snowwhite/colourmappings##dropdownbackground}};
<<border-radius 4px>>
<<box-shadow "2px 2px 10px rgba(0, 0, 0, 0.5)">>
padding: 0 0 0 0;
margin: 4px 0 0 0;
white-space: nowrap;
z-index: 1000;
}
.tw-tags-autocomplete a {
display: block;
padding: 4px 14px 4px 14px;
}
.tw-tags-autocomplete a:hover {
color: {{$:/themes/tiddlywiki/snowwhite/colourmappings##linkbackground}};
background-color: {{$:/themes/tiddlywiki/snowwhite/colourmappings##linkforeground}};
text-decoration: none;
}
.tw-add-tag {
color: #999;
}
.tw-add-tag svg {
height: 1em;
width: 1em;
fill: #999;
}
.tw-add-tag-name {
display: inline-block;
width: 15%;
@ -670,10 +641,6 @@ canvas.tw-edit-bitmapeditor {
vertical-align: middle;
}
.tw-edit-field-add {
color: #999;
}
.tw-edit-field-add-name {
display: inline-block;
width: 15%;
@ -688,6 +655,12 @@ canvas.tw-edit-bitmapeditor {
** Dropdowns
*/
.btn-dropdown svg {
height: 1em;
width: 1em;
fill: #999;
}
.tw-drop-down {
min-width: 280px;
border: 1px solid {{$:/themes/tiddlywiki/snowwhite/colourmappings##dropdownborder}};
@ -723,6 +696,34 @@ canvas.tw-edit-bitmapeditor {
padding: 0 0.5em 0 0.5em;
}
.tw-block-dropdown-wrapper {
position: relative;
}
.tw-block-dropdown {
position: absolute;
min-width: 280px;
border: 1px solid {{$:/themes/tiddlywiki/snowwhite/colourmappings##dropdownborder}};
background-color: {{$:/themes/tiddlywiki/snowwhite/colourmappings##dropdownbackground}};
<<border-radius 4px>>
<<box-shadow "2px 2px 10px rgba(0, 0, 0, 0.5)">>
padding: 0 0 0 0;
margin: 4px 0 0 0;
white-space: nowrap;
z-index: 1000;
}
.tw-block-dropdown a {
display: block;
padding: 4px 14px 4px 14px;
}
.tw-block-dropdown a:hover {
color: {{$:/themes/tiddlywiki/snowwhite/colourmappings##linkbackground}};
background-color: {{$:/themes/tiddlywiki/snowwhite/colourmappings##linkforeground}};
text-decoration: none;
}
/*
** Modals
*/