1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-25 01:20:30 +00:00

Add span wrapper around button caption text

Reasons:
- can show or hide the button text with CSS (assuming
  tv-config-toolbar-text is yes).
- can have different looking buttons in the page controls versus the
  view toolbar, etc
- more flexibility styling the button appearance, for example you
  can change the text size compared to the icon size
- button appearance is more themeable
This commit is contained in:
Simon Baird 2014-10-12 00:26:51 +10:00
parent 06f9ed8bad
commit 0671e59fed
29 changed files with 34 additions and 29 deletions

View File

@ -8,6 +8,6 @@ description: {{$:/language/Buttons/Cancel/Hint}}
{{$:/core/images/cancel-button}} {{$:/core/images/cancel-button}}
</$list> </$list>
<$list filter="[<tv-config-toolbar-text>prefix[yes]]"> <$list filter="[<tv-config-toolbar-text>prefix[yes]]">
<$text text={{$:/language/Buttons/Cancel/Caption}}/> <span class="tc-btn-text"><$text text={{$:/language/Buttons/Cancel/Caption}}/></span>
</$list> </$list>
</$button> </$button>

View File

@ -8,6 +8,6 @@ description: {{$:/language/Buttons/Delete/Hint}}
{{$:/core/images/delete-button}} {{$:/core/images/delete-button}}
</$list> </$list>
<$list filter="[<tv-config-toolbar-text>prefix[yes]]"> <$list filter="[<tv-config-toolbar-text>prefix[yes]]">
<$text text={{$:/language/Buttons/Delete/Caption}}/> <span class="tc-btn-text"><$text text={{$:/language/Buttons/Delete/Caption}}/></span>
</$list> </$list>
</$button> </$button>

View File

@ -8,6 +8,6 @@ description: {{$:/language/Buttons/Save/Hint}}
{{$:/core/images/done-button}} {{$:/core/images/done-button}}
</$list> </$list>
<$list filter="[<tv-config-toolbar-text>prefix[yes]]"> <$list filter="[<tv-config-toolbar-text>prefix[yes]]">
<$text text={{$:/language/Buttons/Save/Caption}}/> <span class="tc-btn-text"><$text text={{$:/language/Buttons/Save/Caption}}/></span>
</$list> </$list>
</$button> </$button>

View File

@ -8,6 +8,6 @@ description: {{$:/language/Buttons/CloseAll/Hint}}
{{$:/core/images/close-all-button}} {{$:/core/images/close-all-button}}
</$list> </$list>
<$list filter="[<tv-config-toolbar-text>prefix[yes]]"> <$list filter="[<tv-config-toolbar-text>prefix[yes]]">
<$text text={{$:/language/Buttons/CloseAll/Caption}}/> <span class="tc-btn-text"><$text text={{$:/language/Buttons/CloseAll/Caption}}/></span>
</$list> </$list>
</$button> </$button>

View File

@ -8,6 +8,6 @@ description: {{$:/language/Buttons/ControlPanel/Hint}}
{{$:/core/images/options-button}} {{$:/core/images/options-button}}
</$list> </$list>
<$list filter="[<tv-config-toolbar-text>prefix[yes]]"> <$list filter="[<tv-config-toolbar-text>prefix[yes]]">
<$text text={{$:/language/Buttons/ControlPanel/Caption}}/> <span class="tc-btn-text"><$text text={{$:/language/Buttons/ControlPanel/Caption}}/></span>
</$list> </$list>
</$button> </$button>

View File

@ -9,7 +9,7 @@ description: {{$:/language/Buttons/Encryption/Hint}}
{{$:/core/images/locked-padlock}} {{$:/core/images/locked-padlock}}
</$list> </$list>
<$list filter="[<tv-config-toolbar-text>prefix[yes]]"> <$list filter="[<tv-config-toolbar-text>prefix[yes]]">
<$text text={{$:/language/Buttons/Encryption/ClearPassword/Caption}}/> <span class="tc-btn-text"><$text text={{$:/language/Buttons/Encryption/ClearPassword/Caption}}/></span>
</$list> </$list>
</$button> </$button>
</$reveal> </$reveal>
@ -19,7 +19,7 @@ description: {{$:/language/Buttons/Encryption/Hint}}
{{$:/core/images/unlocked-padlock}} {{$:/core/images/unlocked-padlock}}
</$list> </$list>
<$list filter="[<tv-config-toolbar-text>prefix[yes]]"> <$list filter="[<tv-config-toolbar-text>prefix[yes]]">
<$text text={{$:/language/Buttons/Encryption/SetPassword/Caption}}/> <span class="tc-btn-text"><$text text={{$:/language/Buttons/Encryption/SetPassword/Caption}}/></span>
</$list> </$list>
</$button> </$button>
</$reveal> </$reveal>

View File

@ -8,6 +8,6 @@ description: {{$:/language/Buttons/FullScreen/Hint}}
{{$:/core/images/full-screen-button}} {{$:/core/images/full-screen-button}}
</$list> </$list>
<$list filter="[<tv-config-toolbar-text>prefix[yes]]"> <$list filter="[<tv-config-toolbar-text>prefix[yes]]">
<$text text={{$:/language/Buttons/FullScreen/Caption}}/> <span class="tc-btn-text"><$text text={{$:/language/Buttons/FullScreen/Caption}}/></span>
</$list> </$list>
</$button> </$button>

View File

@ -8,6 +8,6 @@ description: {{$:/language/Buttons/Home/Hint}}
{{$:/core/images/home-button}} {{$:/core/images/home-button}}
</$list> </$list>
<$list filter="[<tv-config-toolbar-text>prefix[yes]]"> <$list filter="[<tv-config-toolbar-text>prefix[yes]]">
<$text text={{$:/language/Buttons/Home/Caption}}/> <span class="tc-btn-text"><$text text={{$:/language/Buttons/Home/Caption}}/></span>
</$list> </$list>
</$button> </$button>

View File

@ -9,7 +9,7 @@ description: {{$:/language/Buttons/Import/Hint}}
{{$:/core/images/import-button}} {{$:/core/images/import-button}}
</$list> </$list>
<$list filter="[<tv-config-toolbar-text>prefix[yes]]"> <$list filter="[<tv-config-toolbar-text>prefix[yes]]">
<$text text={{$:/language/Buttons/Import/Caption}}/> <span class="tc-btn-text"><$text text={{$:/language/Buttons/Import/Caption}}/></span>
</$list> </$list>
</$button> </$button>
<$browse/> <$browse/>

View File

@ -15,7 +15,7 @@ $(languagePluginTitle)$/icon
</span> </span>
</$list> </$list>
<$list filter="[<tv-config-toolbar-text>prefix[yes]]"> <$list filter="[<tv-config-toolbar-text>prefix[yes]]">
<$text text={{$:/language/Buttons/Language/Caption}}/> <span class="tc-btn-text"><$text text={{$:/language/Buttons/Language/Caption}}/></span>
</$list> </$list>
</$button> </$button>
<$reveal state=<<qualify "$:/state/popup/language">> type="popup" position="below" animate="yes"> <$reveal state=<<qualify "$:/state/popup/language">> type="popup" position="below" animate="yes">

View File

@ -11,7 +11,7 @@ $:/config/PageControlButtons/Visibility/$(listItem)$
{{$:/core/images/down-arrow}} {{$:/core/images/down-arrow}}
</$list> </$list>
<$list filter="[<tv-config-toolbar-text>prefix[yes]]"> <$list filter="[<tv-config-toolbar-text>prefix[yes]]">
<$text text={{$:/language/Buttons/More/Caption}}/> <span class="tc-btn-text"><$text text={{$:/language/Buttons/More/Caption}}/></span>
</$list> </$list>
</$button> </$button>
<$reveal state=<<qualify "$:/state/popup/more">> type="popup" position="below" animate="yes"> <$reveal state=<<qualify "$:/state/popup/more">> type="popup" position="below" animate="yes">

View File

@ -10,7 +10,7 @@ description: {{$:/language/Buttons/NewJournal/Hint}}
{{$:/core/images/new-journal-button}} {{$:/core/images/new-journal-button}}
</$list> </$list>
<$list filter="[<tv-config-toolbar-text>prefix[yes]]"> <$list filter="[<tv-config-toolbar-text>prefix[yes]]">
<$text text={{$:/language/Buttons/NewJournal/Caption}}/> <span class="tc-btn-text"><$text text={{$:/language/Buttons/NewJournal/Caption}}/></span>
</$list> </$list>
</$button> </$button>
\end \end

View File

@ -8,6 +8,6 @@ description: {{$:/language/Buttons/NewTiddler/Hint}}
{{$:/core/images/new-button}} {{$:/core/images/new-button}}
</$list> </$list>
<$list filter="[<tv-config-toolbar-text>prefix[yes]]"> <$list filter="[<tv-config-toolbar-text>prefix[yes]]">
<$text text={{$:/language/Buttons/NewTiddler/Caption}}/> <span class="tc-btn-text"><$text text={{$:/language/Buttons/NewTiddler/Caption}}/></span>
</$list> </$list>
</$button> </$button>

View File

@ -8,6 +8,6 @@ description: {{$:/language/Buttons/Refresh/Hint}}
{{$:/core/images/refresh-button}} {{$:/core/images/refresh-button}}
</$list> </$list>
<$list filter="[<tv-config-toolbar-text>prefix[yes]]"> <$list filter="[<tv-config-toolbar-text>prefix[yes]]">
<$text text={{$:/language/Buttons/Refresh/Caption}}/> <span class="tc-btn-text"><$text text={{$:/language/Buttons/Refresh/Caption}}/></span>
</$list> </$list>
</$button> </$button>

View File

@ -9,7 +9,7 @@ description: {{$:/language/Buttons/SaveWiki/Hint}}
{{$:/core/images/save-button}} {{$:/core/images/save-button}}
</$list> </$list>
<$list filter="[<tv-config-toolbar-text>prefix[yes]]"> <$list filter="[<tv-config-toolbar-text>prefix[yes]]">
<$text text={{$:/language/Buttons/SaveWiki/Caption}}/> <span class="tc-btn-text"><$text text={{$:/language/Buttons/SaveWiki/Caption}}/></span>
</$list> </$list>
</span> </span>
</$button> </$button>

View File

@ -13,7 +13,7 @@ $:/core/images/storyview-$(storyview)$
</$set> </$set>
</$list> </$list>
<$list filter="[<tv-config-toolbar-text>prefix[yes]]"> <$list filter="[<tv-config-toolbar-text>prefix[yes]]">
<$text text={{$:/language/Buttons/StoryView/Caption}}/> <span class="tc-btn-text"><$text text={{$:/language/Buttons/StoryView/Caption}}/></span>
</$list> </$list>
</$button> </$button>
<$reveal state=<<qualify "$:/state/popup/storyview">> type="popup" position="below" animate="yes"> <$reveal state=<<qualify "$:/state/popup/storyview">> type="popup" position="below" animate="yes">

View File

@ -8,6 +8,6 @@ description: {{$:/language/Buttons/TagManager/Hint}}
{{$:/core/images/tag-button}} {{$:/core/images/tag-button}}
</$list> </$list>
<$list filter="[<tv-config-toolbar-text>prefix[yes]]"> <$list filter="[<tv-config-toolbar-text>prefix[yes]]">
<$text text={{$:/language/Buttons/TagManager/Caption}}/> <span class="tc-btn-text"><$text text={{$:/language/Buttons/TagManager/Caption}}/></span>
</$list> </$list>
</$button> </$button>

View File

@ -8,7 +8,7 @@ description: {{$:/language/Buttons/Theme/Hint}}
{{$:/core/images/theme-button}} {{$:/core/images/theme-button}}
</$list> </$list>
<$list filter="[<tv-config-toolbar-text>prefix[yes]]"> <$list filter="[<tv-config-toolbar-text>prefix[yes]]">
<$text text={{$:/language/Buttons/Theme/Caption}}/> <span class="tc-btn-text"><$text text={{$:/language/Buttons/Theme/Caption}}/></span>
</$list> </$list>
</$button> </$button>
<$reveal state=<<qualify "$:/state/popup/theme">> type="popup" position="below" animate="yes"> <$reveal state=<<qualify "$:/state/popup/theme">> type="popup" position="below" animate="yes">

View File

@ -8,6 +8,6 @@ description: {{$:/language/Buttons/Clone/Hint}}
{{$:/core/images/clone-button}} {{$:/core/images/clone-button}}
</$list> </$list>
<$list filter="[<tv-config-toolbar-text>prefix[yes]]"> <$list filter="[<tv-config-toolbar-text>prefix[yes]]">
<$text text={{$:/language/Buttons/Clone/Caption}}/> <span class="tc-btn-text"><$text text={{$:/language/Buttons/Clone/Caption}}/></span>
</$list> </$list>
</$button> </$button>

View File

@ -8,6 +8,6 @@ description: {{$:/language/Buttons/CloseOthers/Hint}}
{{$:/core/images/close-others-button}} {{$:/core/images/close-others-button}}
</$list> </$list>
<$list filter="[<tv-config-toolbar-text>prefix[yes]]"> <$list filter="[<tv-config-toolbar-text>prefix[yes]]">
<$text text={{$:/language/Buttons/CloseOthers/Caption}}/> <span class="tc-btn-text"><$text text={{$:/language/Buttons/CloseOthers/Caption}}/></span>
</$list> </$list>
</$button> </$button>

View File

@ -8,6 +8,6 @@ description: {{$:/language/Buttons/Close/Hint}}
{{$:/core/images/close-button}} {{$:/core/images/close-button}}
</$list> </$list>
<$list filter="[<tv-config-toolbar-text>prefix[yes]]"> <$list filter="[<tv-config-toolbar-text>prefix[yes]]">
<$text text={{$:/language/Buttons/Close/Caption}}/> <span class="tc-btn-text"><$text text={{$:/language/Buttons/Close/Caption}}/></span>
</$list> </$list>
</$button> </$button>

View File

@ -8,6 +8,6 @@ description: {{$:/language/Buttons/Edit/Hint}}
{{$:/core/images/edit-button}} {{$:/core/images/edit-button}}
</$list> </$list>
<$list filter="[<tv-config-toolbar-text>prefix[yes]]"> <$list filter="[<tv-config-toolbar-text>prefix[yes]]">
<$text text={{$:/language/Buttons/Edit/Caption}}/> <span class="tc-btn-text"><$text text={{$:/language/Buttons/Edit/Caption}}/></span>
</$list> </$list>
</$button> </$button>

View File

@ -8,6 +8,6 @@ description: {{$:/language/Buttons/Info/Hint}}
{{$:/core/images/info-button}} {{$:/core/images/info-button}}
</$list> </$list>
<$list filter="[<tv-config-toolbar-text>prefix[yes]]"> <$list filter="[<tv-config-toolbar-text>prefix[yes]]">
<$text text={{$:/language/Buttons/Info/Caption}}/> <span class="tc-btn-text"><$text text={{$:/language/Buttons/Info/Caption}}/></span>
</$list> </$list>
</$button> </$button>

View File

@ -11,7 +11,7 @@ $:/config/ViewToolbarButtons/Visibility/$(listItem)$
{{$:/core/images/down-arrow}} {{$:/core/images/down-arrow}}
</$list> </$list>
<$list filter="[<tv-config-toolbar-text>prefix[yes]]"> <$list filter="[<tv-config-toolbar-text>prefix[yes]]">
<$text text={{$:/language/Buttons/More/Caption}}/> <span class="tc-btn-text"><$text text={{$:/language/Buttons/More/Caption}}/></span>
</$list> </$list>
</$button> </$button>
<$reveal state=<<qualify "$:/state/popup/more">> type="popup" position="below" animate="yes"> <$reveal state=<<qualify "$:/state/popup/more">> type="popup" position="below" animate="yes">

View File

@ -13,7 +13,7 @@ description: {{$:/language/Buttons/NewHere/Hint}}
{{$:/core/images/new-here-button}} {{$:/core/images/new-here-button}}
</$list> </$list>
<$list filter="[<tv-config-toolbar-text>prefix[yes]]"> <$list filter="[<tv-config-toolbar-text>prefix[yes]]">
<$text text={{$:/language/Buttons/NewHere/Caption}}/> <span class="tc-btn-text"><$text text={{$:/language/Buttons/NewHere/Caption}}/></span>
</$list> </$list>
</$button> </$button>
\end \end

View File

@ -13,7 +13,7 @@ description: {{$:/language/Buttons/NewJournalHere/Hint}}
{{$:/core/images/new-journal-button}} {{$:/core/images/new-journal-button}}
</$list> </$list>
<$list filter="[<tv-config-toolbar-text>prefix[yes]]"> <$list filter="[<tv-config-toolbar-text>prefix[yes]]">
<$text text={{$:/language/Buttons/NewJournalHere/Caption}}/> <span class="tc-btn-text"><$text text={{$:/language/Buttons/NewJournalHere/Caption}}/></span>
</$list> </$list>
</$button> </$button>
\end \end

View File

@ -8,6 +8,6 @@ description: {{$:/language/Buttons/Permalink/Hint}}
{{$:/core/images/permalink-button}} {{$:/core/images/permalink-button}}
</$list> </$list>
<$list filter="[<tv-config-toolbar-text>prefix[yes]]"> <$list filter="[<tv-config-toolbar-text>prefix[yes]]">
<$text text={{$:/language/Buttons/Permalink/Caption}}/> <span class="tc-btn-text"><$text text={{$:/language/Buttons/Permalink/Caption}}/></span>
</$list> </$list>
</$button> </$button>

View File

@ -8,6 +8,6 @@ description: {{$:/language/Buttons/Permaview/Hint}}
{{$:/core/images/permaview-button}} {{$:/core/images/permaview-button}}
</$list> </$list>
<$list filter="[<tv-config-toolbar-text>prefix[yes]]"> <$list filter="[<tv-config-toolbar-text>prefix[yes]]">
<$text text={{$:/language/Buttons/Permaview/Caption}}/> <span class="tc-btn-text"><$text text={{$:/language/Buttons/Permaview/Caption}}/></span>
</$list> </$list>
</$button> </$button>

View File

@ -260,6 +260,11 @@ button svg, button img {
fill: <<colour muted-foreground>>; fill: <<colour muted-foreground>>;
} }
.tc-btn-text {
padding: 0;
margin: 0;
}
.tc-btn-big-green { .tc-btn-big-green {
padding: 8px; padding: 8px;
margin: 4px 8px 4px 8px; margin: 4px 8px 4px 8px;