1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-06-26 15:23:15 +00:00

Add theme toolbar button

This commit is contained in:
Jermolene 2014-08-02 22:13:54 +01:00
parent 19028fee0a
commit 1a9bd683e4
6 changed files with 48 additions and 5 deletions

View File

@ -0,0 +1,12 @@
title: $:/core/images/theme-button
tags: $:/tags/Image
<svg class="tw-image-theme-button tw-image-button" width="22pt" height="22pt" viewBox="0 0 128 129">
<g fill-rule="evenodd">
<g transform="translate(6.762422, 19.968999)">
<path d="M0.824945506,108.186742 C0.664785639,108.187747 0.504640965,108.188251 0.344516735,108.188251 C24.6927592,97.3230528 16.4618388,61.4785938 43.121606,61.4785936 C43.3514982,62.5099075 43.5895175,63.6196137 43.8937798,64.7474092 C25.0518979,61.7172401 26.754298,99.6790423 0.824939051,108.186742 Z M1.34304326,108.181747 C29.613352,107.814217 58.1805158,91.9297101 58.1805151,75.5906019 C51.4386888,75.5906018 47.9457839,73.0599394 45.9513275,69.8149659 C33.880418,64.7217657 23.8678719,103.061726 1.34301955,108.181748 Z"></path>
<path d="M48.871084,61.6312522 C45.6348746,64.6233738 52.4243955,73.581882 57.1020034,69.8621716 C65.3329228,61.631253 108.502656,20.4006304 116.733576,12.169711 C124.964495,3.9387916 116.733576,-4.29212771 108.502656,3.9387916 C100.271737,12.1697108 57.4180113,53.7289683 48.871084,61.6312522 Z"></path>
</g>
<path d="M62.2824054,71.6211067 C57.93733,66.8541323 54.3123948,62.6301561 51.9937779,59.5814279 C41.5433616,45.8402704 36.2721798,53.0755512 30.307554,59.5814276 C24.3429282,66.0873041 31.8788571,71.3587209 26.2181932,75.9543964 C20.5575294,80.5500719 20.9070004,82.1430826 11.3532982,73.7355757 C1.79959591,65.3280689 1.13881905,63.0132479 5.52449152,58.2159872 C9.91016399,53.4187265 13.5756887,60.9722938 22.5346144,52.4469667 C31.4935401,43.9216395 23.9676854,36.3658236 23.9676854,36.3658236 C23.9676854,36.3658236 42.6210998,-1.76571499 67.5465342,1.05058165 C92.4719685,3.8668783 58.1171911,-2.5961653 49.5716499,27.3088291 C45.9128772,40.1126497 50.2525733,37.0956468 57.1903023,42.5036084 C59.4792141,44.2878157 67.5103988,50.0176866 77.2457031,57.2905766 C71.4143155,62.9019825 66.2337717,67.8661661 62.2824054,71.6211067 Z M73.4870997,83.4678852 C87.4278174,97.7290403 103.323635,112.360587 109.285731,114.539289 C119.139459,118.140092 123.820369,111.571999 123.820368,100.570289 C123.820367,94.7414103 107.064445,80.3074425 90.2759123,67.2185217 C83.6390655,73.6178 77.7700759,79.2918373 73.4870997,83.4678852 Z"></path>
</g>
</svg>

View File

@ -52,3 +52,5 @@ HideSideBar/Caption: hide sidebar
HideSideBar/Hint: Hide sidebar
ShowSideBar/Caption: show sidebar
ShowSideBar/Hint: Show sidebar
Theme/Caption: theme
Theme/Hint: Choose the display theme

View File

@ -0,0 +1,32 @@
title: $:/core/ui/Buttons/theme
tags: $:/tags/PageControls
caption: {{$:/core/images/theme-button}} {{$:/language/Buttons/Theme/Caption}}
description: {{$:/language/Buttons/Theme/Hint}}
<$button popup=<<qualify "$:/state/popup/theme">> title={{$:/language/Buttons/Theme/Hint}} aria-label={{$:/language/Buttons/Theme/Caption}} class=<<tw-config-toolbar-class>> selectedClass="tw-selected">
<$list filter="[<tw-config-toolbar-icons>prefix[yes]]">
{{$:/core/images/theme-button}}
</$list>
<$list filter="[<tw-config-toolbar-text>prefix[yes]]">
<$text text={{$:/language/Buttons/Theme/Caption}}/>
</$list>
</$button>
<$reveal state=<<qualify "$:/state/popup/theme">> type="popup" position="below" animate="yes">
<div class="tw-drop-down">
<$linkcatcher to="$:/theme">
<$list filter="[plugin-type[theme]sort[title]]" variable="themeTitle">
<$link to=<<themeTitle>>>
<span class="tw-drop-down-bullet">
<$reveal type="match" state="$:/theme" text=<<themeTitle>>>
&bull;
</$reveal>
<$reveal type="nomatch" state="$:/theme" text=<<themeTitle>>>
&nbsp;
</$reveal>
</span>
<$view tiddler=<<themeTitle>> field="name"/>
</$link>
</$list>
</$linkcatcher>
</div>
</$reveal>

View File

@ -26,7 +26,3 @@ $:/config/PageControlButtons/Visibility/$(listItem)$
</$set>
</$set>
---
{{$:/snippets/minithemeswitcher}}

View File

@ -9,3 +9,4 @@ core/ui/Buttons/language: hide
core/ui/Buttons/more-page-actions: hide
core/ui/Buttons/permaview: hide
core/ui/Buttons/storyview: hide
core/ui/Buttons/theme: hide

View File

@ -1,2 +1,2 @@
title: $:/tags/PageControls
list: [[$:/core/ui/Buttons/home]] [[$:/core/ui/Buttons/close-all]] [[$:/core/ui/Buttons/permaview]] [[$:/core/ui/Buttons/new-tiddler]] [[$:/core/ui/Buttons/import]] [[$:/core/ui/Buttons/control-panel]] [[$:/core/ui/Buttons/language]] [[$:/core/ui/Buttons/storyview]] [[$:/core/ui/Buttons/encryption]] [[$:/core/ui/Buttons/full-screen]] [[$:/core/ui/Buttons/save-wiki]] [[$:/core/ui/Buttons/more-page-actions]]
list: [[$:/core/ui/Buttons/home]] [[$:/core/ui/Buttons/close-all]] [[$:/core/ui/Buttons/permaview]] [[$:/core/ui/Buttons/new-tiddler]] [[$:/core/ui/Buttons/import]] [[$:/core/ui/Buttons/control-panel]] [[$:/core/ui/Buttons/language]] [[$:/core/ui/Buttons/theme]] [[$:/core/ui/Buttons/storyview]] [[$:/core/ui/Buttons/encryption]] [[$:/core/ui/Buttons/full-screen]] [[$:/core/ui/Buttons/save-wiki]] [[$:/core/ui/Buttons/more-page-actions]]