1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-23 18:17:20 +00:00

Text-slicer: style edit and view templates

This commit is contained in:
Jermolene 2016-02-29 17:47:46 +00:00
parent 6e4222e5e8
commit 51db3e9e75
3 changed files with 71 additions and 10 deletions

View File

@ -43,7 +43,8 @@ tags: $:/tags/Stylesheet
margin-bottom: 3px; margin-bottom: 3px;
} }
.tc-view-template-document-tiddler-wrapper { .tc-view-template-document-tiddler-wrapper,
.tc-edit-template-document-tiddler-wrapper {
border-top: 2px solid #D6A2A2; border-top: 2px solid #D6A2A2;
margin-left: -42px; margin-left: -42px;
margin-right: -42px; margin-right: -42px;
@ -54,31 +55,50 @@ tags: $:/tags/Stylesheet
padding-bottom: 10px; padding-bottom: 10px;
} }
.tc-view-template-document-tiddler-heading a { .tc-edit-template-document-tiddler-wrapper {
background: #A3A3D7;
}
div.tc-view-template-document-tiddler-heading a,
div.tc-edit-template-document-tiddler-heading a {
border: 1px solid #D6A2A2; border: 1px solid #D6A2A2;
background: #fff; background: #fff;
border-radius: 16px; border-radius: 16px;
padding: 4px; padding: 0px 4px 0px 4px;
margin: 4px; margin: 2px 4px 2px 4px;
white-space: nowrap; white-space: nowrap;
display: inline-block;
} }
.tc-view-template-document-tiddler-heading-icon { div.tc-view-template-document-tiddler-heading a:hover,
div.tc-edit-template-document-tiddler-heading a:hover {
border: 1px solid <<colour background>>;
text-decoration: none;
color: <<colour background>>;
background: <<colour foreground>>;
}
.tc-view-template-document-tiddler-heading-icon,
.tc-edit-template-document-tiddler-heading-icon {
width: 42px; width: 42px;
text-align: center; text-align: center;
margin-left: -42px; margin-left: -42px;
margin-right: -42px; margin-right: -42px;
position: absolute; position: absolute;
margin-top: -20px;
} }
.tc-view-template-document-tiddler-heading-icon svg { .tc-view-template-document-tiddler-subheading,
.tc-edit-template-document-tiddler-subheading {
font-size: 0.7em;
font-weight: bold;
color: <<colour muted-foreground>>;
}
.tc-view-template-document-tiddler-heading-icon svg,
.tc-edit-template-document-tiddler-heading-icon svg {
fill: <<colour background>>; fill: <<colour background>>;
} }
.tc-view-template-document-tiddler-heading {
}
.tc-view-template-document-tiddler { .tc-view-template-document-tiddler {
font-size: 0.9em; font-size: 0.9em;
} }

View File

@ -0,0 +1,35 @@
title: $:/plugins/tiddlywiki/text-slicer/ui/edit-template-segment
tags: $:/tags/EditTemplate
\define edit-field(name,tag:"input")
$name$:
<$edit-text field="""$name$""" tag="$tag$" class="tc-edit-texteditor"/>
\end
<$reveal type="nomatch" state="!!toc-type" text="">
<div class="tc-edit-template-document-tiddler-wrapper">
<div class="tc-edit-template-document-tiddler-heading">
<div class="tc-edit-template-document-tiddler-heading-icon">
{{$:/core/images/file}}
</div>
<div class="tc-edit-template-document-tiddler-subheading">
<$view field="toc-type"/>
</div>
<<edit-field "list" tag:"textarea">>
</div>
</div>
</$reveal>

View File

@ -19,6 +19,12 @@ $:/state/plugins/tiddlywiki/text-slicer/heading-status/$(currentTiddler)$
</div> </div>
<div class="tc-view-template-document-tiddler-subheading">
<$view field="toc-type"/>
</div>
Parents: <$list filter="[all[current]listed[]!is[system]]" emptyMessage="None"> Parents: <$list filter="[all[current]listed[]!is[system]]" emptyMessage="None">
<$link><$view field="title"/></$link> <$link><$view field="title"/></$link>
</$list> </$list>