mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-01-12 10:20:26 +00:00
Merge branch 'master' into zh
This commit is contained in:
commit
55530e80a8
@ -82,6 +82,11 @@ Settings/NavigationHistory/Caption: Navigation History
|
||||
Settings/NavigationHistory/Hint: Update browser history when navigating to a tiddler:
|
||||
Settings/NavigationHistory/No/Description: Do not update history
|
||||
Settings/NavigationHistory/Yes/Description: Update history
|
||||
Settings/ToolbarButtonStyle/Caption: Toolbar Button Style
|
||||
Settings/ToolbarButtonStyle/Hint: Choose the style for toolbar buttons:
|
||||
Settings/ToolbarButtonStyle/Styles/Borderless: Borderless
|
||||
Settings/ToolbarButtonStyle/Styles/Boxed: Boxed
|
||||
Settings/ToolbarButtonStyle/Styles/Rounded: Rounded
|
||||
Settings/ToolbarButtons/Caption: Toolbar Buttons
|
||||
Settings/ToolbarButtons/Hint: Default toolbar button appearance:
|
||||
Settings/ToolbarButtons/Icons/Description: Include icon
|
||||
|
@ -95,11 +95,12 @@ CheckboxWidget.prototype.handleChangeEvent = function(event) {
|
||||
fallbackFields = {text: ""},
|
||||
newFields = {title: this.checkboxTitle},
|
||||
hasChanged = false,
|
||||
tagCheck = false;
|
||||
tagCheck = false,
|
||||
hasTag = tiddler && tiddler.hasTag(this.checkboxTag);
|
||||
if(this.checkboxTag && this.checkboxInvertTag === "yes") {
|
||||
tagCheck = tiddler.hasTag(this.checkboxTag) === checked;
|
||||
tagCheck = hasTag === checked;
|
||||
} else {
|
||||
tagCheck = tiddler.hasTag(this.checkboxTag) !== checked;
|
||||
tagCheck = hasTag !== checked;
|
||||
}
|
||||
// Set the tag if specified
|
||||
if(this.checkboxTag && (!tiddler || tagCheck)) {
|
||||
|
@ -0,0 +1,5 @@
|
||||
title: $:/core/buttonstyles/Borderless
|
||||
tags: $:/tags/ToolbarButtonStyle
|
||||
caption: {{$:/language/ControlPanel/Settings/ToolbarButtonStyle/Styles/Borderless}}
|
||||
|
||||
tc-btn-invisible
|
5
core/ui/ControlPanel/Settings/ButtonStyles/Boxed.tid
Normal file
5
core/ui/ControlPanel/Settings/ButtonStyles/Boxed.tid
Normal file
@ -0,0 +1,5 @@
|
||||
title: $:/core/buttonstyles/Boxed
|
||||
tags: $:/tags/ToolbarButtonStyle
|
||||
caption: {{$:/language/ControlPanel/Settings/ToolbarButtonStyle/Styles/Boxed}}
|
||||
|
||||
tc-btn-boxed
|
5
core/ui/ControlPanel/Settings/ButtonStyles/Rounded.tid
Normal file
5
core/ui/ControlPanel/Settings/ButtonStyles/Rounded.tid
Normal file
@ -0,0 +1,5 @@
|
||||
title: $:/core/buttonstyles/Rounded
|
||||
tags: $:/tags/ToolbarButtonStyle
|
||||
caption: {{$:/language/ControlPanel/Settings/ToolbarButtonStyle/Styles/Rounded}}
|
||||
|
||||
tc-btn-rounded
|
12
core/ui/ControlPanel/Settings/ToolbarButtonStyle.tid
Normal file
12
core/ui/ControlPanel/Settings/ToolbarButtonStyle.tid
Normal file
@ -0,0 +1,12 @@
|
||||
title: $:/core/ui/ControlPanel/Settings/ToolbarButtonStyle
|
||||
tags: $:/tags/ControlPanel/Settings
|
||||
caption: {{$:/language/ControlPanel/Settings/ToolbarButtonStyle/Caption}}
|
||||
|
||||
\define lingo-base() $:/language/ControlPanel/Settings/ToolbarButtonStyle/
|
||||
<$link to="$:/config/Toolbar/ButtonClass"><<lingo "Hint">></$link>
|
||||
|
||||
<$select tiddler="$:/config/Toolbar/ButtonClass">
|
||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/ToolbarButtonStyle]]">
|
||||
<option value={{!!text}}>{{!!caption}}</option>
|
||||
</$list>
|
||||
</$select>
|
@ -13,8 +13,7 @@ $:/config/PageControlButtons/Visibility/$(listItem)$
|
||||
<$list filter="[<tv-config-toolbar-text>prefix[yes]]">
|
||||
<span class="tc-btn-text"><$text text={{$:/language/Buttons/More/Caption}}/></span>
|
||||
</$list>
|
||||
</$button>
|
||||
<$reveal state=<<qualify "$:/state/popup/more">> type="popup" position="below" animate="yes">
|
||||
</$button><$reveal state=<<qualify "$:/state/popup/more">> type="popup" position="below" animate="yes">
|
||||
|
||||
<div class="tc-drop-down">
|
||||
|
||||
|
@ -10,7 +10,7 @@ tc-page-container tc-page-view-$(themeTitle)$ tc-language-$(languageTitle)$
|
||||
|
||||
<$set name="tv-config-toolbar-text" value={{$:/config/Toolbar/Text}}>
|
||||
|
||||
<$set name="tv-config-toolbar-class" value="tc-btn-invisible">
|
||||
<$set name="tv-config-toolbar-class" value={{$:/config/Toolbar/ButtonClass}}>
|
||||
|
||||
<$set name="themeTitle" value={{$:/view}}>
|
||||
|
||||
|
@ -14,15 +14,31 @@ $:/config/ViewToolbarButtons/Visibility/$(listItem)$
|
||||
<span class="tc-btn-text"><$text text={{$:/language/Buttons/More/Caption}}/></span>
|
||||
</$list>
|
||||
</$button><$reveal state=<<qualify "$:/state/popup/more">> type="popup" position="below" animate="yes">
|
||||
|
||||
<div class="tc-drop-down">
|
||||
|
||||
<$set name="tv-config-toolbar-icons" value="yes">
|
||||
|
||||
<$set name="tv-config-toolbar-text" value="yes">
|
||||
|
||||
<$set name="tv-config-toolbar-class" value="tc-btn-invisible">
|
||||
|
||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewToolbar]!has[draft.of]] -[[$:/core/ui/Buttons/more-tiddler-actions]]" variable="listItem">
|
||||
|
||||
<$reveal type="match" state=<<config-title>> text="hide">
|
||||
<$transclude tiddler=<<listItem>>/>
|
||||
|
||||
<$transclude tiddler=<<listItem>> mode="inline"/>
|
||||
|
||||
</$reveal>
|
||||
|
||||
</$list>
|
||||
|
||||
</$set>
|
||||
|
||||
</$set>
|
||||
|
||||
</$set>
|
||||
|
||||
</div>
|
||||
|
||||
</$reveal>
|
3
core/wiki/config/ToolbarButtonClass.tid
Normal file
3
core/wiki/config/ToolbarButtonClass.tid
Normal file
@ -0,0 +1,3 @@
|
||||
title: $:/config/Toolbar/ButtonClass
|
||||
|
||||
tc-btn-invisible
|
@ -25,6 +25,16 @@ To switch it on, visit ''Theme Tweaks'' in the $:/ControlPanel ''Appearance'' ta
|
||||
* Sidebar width:
|
||||
** The width of the sidebar. Can be specified in pixels (eg ''350px''), a percentage (eg ''25%'') or other [[CSS unit|https://developer.mozilla.org/en/docs/Web/CSS/length]]
|
||||
|
||||
!! Toolbar Button Style Setting
|
||||
|
||||
A new setting in $:/ControlPanel ''Settings'' tab allows the toolbar button style to be chosen from the following options:
|
||||
|
||||
* <$button set="$:/config/Toolbar/ButtonClass" setTo="tc-btn-invisible">borderless</$button> the existing style
|
||||
* <$button set="$:/config/Toolbar/ButtonClass" setTo="tc-btn-boxed">boxed</$button>, which adds a thin border box around the button
|
||||
* <$button set="$:/config/Toolbar/ButtonClass" setTo="tc-btn-rounded">rounded</$button>, which rounds the button corners and inverts the button colours
|
||||
|
||||
Plugins can add new style options.
|
||||
|
||||
!! New Tiddler Toolbar Button: "Open in new window"
|
||||
|
||||
An experimental new tiddler toolbar button opens a single tiddler in a separate pop-up browser window. The tiddler will be dynamically updated just as in the main window. There are several uses:
|
||||
|
@ -332,6 +332,54 @@ button svg, button img {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.tc-btn-boxed {
|
||||
font-size: 0.6em;
|
||||
padding: 0.2em;
|
||||
margin: 1px;
|
||||
background: none;
|
||||
border: 1px solid <<colour tiddler-controls-foreground>>;
|
||||
border-radius: 0.25em;
|
||||
}
|
||||
|
||||
html body.tc-body .tc-btn-boxed svg {
|
||||
font-size: 1.6666em;
|
||||
}
|
||||
|
||||
.tc-btn-boxed:hover {
|
||||
background: <<colour muted-foreground>>;
|
||||
color: <<colour background>>;
|
||||
}
|
||||
|
||||
html body.tc-body .tc-btn-boxed:hover svg {
|
||||
fill: <<colour background>>;
|
||||
}
|
||||
|
||||
.tc-btn-rounded {
|
||||
font-size: 0.5em;
|
||||
line-height: 2;
|
||||
padding: 0em 0.3em 0.2em 0.4em;
|
||||
margin: 1px;
|
||||
border: 1px solid <<colour muted-foreground>>;
|
||||
background: <<colour muted-foreground>>;
|
||||
color: <<colour background>>;
|
||||
border-radius: 2em;
|
||||
}
|
||||
|
||||
html body.tc-body .tc-btn-rounded svg {
|
||||
font-size: 1.6666em;
|
||||
fill: <<colour background>>;
|
||||
}
|
||||
|
||||
.tc-btn-rounded:hover {
|
||||
border: 1px solid <<colour muted-foreground>>;
|
||||
background: <<colour background>>;
|
||||
color: <<colour muted-foreground>>;
|
||||
}
|
||||
|
||||
html body.tc-body .tc-btn-rounded:hover svg {
|
||||
fill: <<colour muted-foreground>>;
|
||||
}
|
||||
|
||||
.tc-btn-icon svg {
|
||||
height: 1em;
|
||||
width: 1em;
|
||||
|
Loading…
Reference in New Issue
Block a user