From 76587899711edb7e0670a2c2e328a7016b594a02 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Mon, 18 Nov 2013 09:00:00 +0000 Subject: [PATCH] Style tweaks for the edit template --- core/ui/EditTemplate.tid | 2 +- core/ui/EditTemplate/body.tid | 4 +- core/ui/EditTemplate/fields.tid | 4 +- core/ui/EditTemplate/tags.tid | 6 +- core/ui/EditorHint.tid | 2 +- core/wiki/tags/EditTemplate.tid | 2 +- themes/tiddlywiki/snowwhite/base.tid | 85 ++++++++++++++-------------- 7 files changed, 53 insertions(+), 52 deletions(-) diff --git a/core/ui/EditTemplate.tid b/core/ui/EditTemplate.tid index dd775b7bc..fe824f368 100644 --- a/core/ui/EditTemplate.tid +++ b/core/ui/EditTemplate.tid @@ -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
>><$list filter="[is[shadow]!has[draft.of]tag[$:/tags/EditTemplate]] [!is[shadow]!has[draft.of]tag[$:/tags/EditTemplate]]" variable="listItem"><$transclude tiddler=<>/>
diff --git a/core/ui/EditTemplate/body.tid b/core/ui/EditTemplate/body.tid index 3b4f0e4d3..b1bbee810 100644 --- a/core/ui/EditTemplate/body.tid +++ b/core/ui/EditTemplate/body.tid @@ -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 +//<$transclude tiddler="$:/core/ui/EditorHint"/>// <$button type="set" set="$:/ShowEditPreview" setTo="no">hide preview
<$transclude /> @@ -13,6 +13,6 @@ tags: $:/tags/EditTemplate
<$reveal state="$:/ShowEditPreview" type="nomatch" text="yes"> -<$transclude tiddler="$:/core/ui/EditorHint"/> <$button type="set" set="$:/ShowEditPreview" setTo="yes">show preview +//<$transclude tiddler="$:/core/ui/EditorHint"/>// <$button type="set" set="$:/ShowEditPreview" setTo="yes">show preview <$edit field="text" class="tw-edit-texteditor"/> diff --git a/core/ui/EditTemplate/fields.tid b/core/ui/EditTemplate/fields.tid index efc8f30ae..c76810166 100644 --- a/core/ui/EditTemplate/fields.tid +++ b/core/ui/EditTemplate/fields.tid @@ -2,13 +2,13 @@ title: $:/core/ui/EditTemplate/fields tags: $:/tags/EditTemplate <$fieldmangler>
-<$list filter="[is[current]fields[]] -title -tags -text -creator -created -modified -modifier -[[draft.title]] -[[draft.of]]" variable="currentField"> +
<>:<$edit-text tiddler=<> field=<> placeholder="field value"/><$button message="tw-remove-field" param=<> class="btn-invisible">{{$:/core/images/delete-button}}
<$list filter="[is[current]fields[]] -title -tags -text -creator -created -modified -modifier -type -[[draft.title]] -[[draft.of]]" variable="currentField">
<>:<$edit-text tiddler=<> field=<> placeholder="field value"/><$button message="tw-remove-field" param=<> class="btn-invisible">{{$:/core/images/delete-button}}
-
Add a new field: <$edit-text tiddler="$:/NewFieldName" tag="input" default="" placeholder="field name" class="tw-edit-texteditor"/> <$button message="tw-add-field" param={{$:/NewFieldName}} set="$:/NewFieldName" setTo="" class="">add
+
//Add a new field:// <$edit-text tiddler="$:/NewFieldName" tag="input" default="" placeholder="field name" class="tw-edit-texteditor"/> <$button message="tw-add-field" param={{$:/NewFieldName}} set="$:/NewFieldName" setTo="" class="">add
diff --git a/core/ui/EditTemplate/tags.tid b/core/ui/EditTemplate/tags.tid index 1c2985775..2ec599690 100644 --- a/core/ui/EditTemplate/tags.tid +++ b/core/ui/EditTemplate/tags.tid @@ -7,11 +7,11 @@ background-color:$(backgroundColor)$; <$fieldmangler>
<$list filter="[is[current]tags[]sort[title]]" storyview="pop" itemClass="tw-tag-editor-label"><$set name="backgroundColor" value={{!!color}}>> class="tw-tag-label"><$view field="title" format="text" /><$button message="tw-remove-tag" param={{!!title}} class="btn-invisible tw-remove-tag-button">×
-
Add a new tag: <$edit-text tiddler="$:/NewTagName" tag="input" default="" placeholder="tag name" focusPopup=<> class="tw-edit-texteditor"/> <$button popup=<> class="btn-invisible">{{$:/core/images/down-arrow}} <$button message="tw-add-tag" param={{$:/NewTagName}} set="$:/NewTagName" setTo="" class="">add
+
//Add a new tag:// <$edit-text tiddler="$:/NewTagName" tag="input" default="" placeholder="tag name" focusPopup=<> class="tw-edit-texteditor"/> <$button popup=<> class="btn-invisible btn-dropdown">{{$:/core/images/down-arrow}} <$button message="tw-add-tag" param={{$:/NewTagName}} set="$:/NewTagName" setTo="" class="">add
-
+
<$reveal state=<> type="nomatch" text="" default=""> -
+
<$linkcatcher set="$:/NewTagName" setTo="" message="tw-add-tag"><$list filter="[!is[shadow]tags[]search{$:/NewTagName}sort[title]]"><$link><$set name="backgroundColor" value={{!!color}}>> class="tw-tag-label"><$view field="title" format="text"/> diff --git a/core/ui/EditorHint.tid b/core/ui/EditorHint.tid index fc3a46c91..dac450c90 100644 --- a/core/ui/EditorHint.tid +++ b/core/ui/EditorHint.tid @@ -1,3 +1,3 @@ title: $:/core/ui/EditorHint -Use WikiText to add formatting, images, and dynamic features \ No newline at end of file +Use WikiText to add formatting, images, and dynamic features \ No newline at end of file diff --git a/core/wiki/tags/EditTemplate.tid b/core/wiki/tags/EditTemplate.tid index 526fe1fc7..3fb395607 100644 --- a/core/wiki/tags/EditTemplate.tid +++ b/core/wiki/tags/EditTemplate.tid @@ -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]] diff --git a/themes/tiddlywiki/snowwhite/base.tid b/themes/tiddlywiki/snowwhite/base.tid index 6b9e7b2d2..899adb59d 100644 --- a/themes/tiddlywiki/snowwhite/base.tid +++ b/themes/tiddlywiki/snowwhite/base.tid @@ -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}}; - <> - <> - 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}}; + <> + <> + 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 */