Remove unwanted whitespace from sidebar links (#4552)

* add a new-line before the log text to increase readability of the test output

* make eslint, jslint happy

* it shouldn't be there

* fremove this file from my PRs

* fix 4532. Links should not add unwanted whitespace, since this causes problems with CSS styling

* remove whitespace from tiddler title and add a little bit of margin-right to the tiddler icon.

* use default parameters for link handling, which results in less code

* introduce tc-viewswitcher class to be able to style icon distance to text
Jermolene-patch-1
Mario Pietsch 2020-04-15 13:35:35 +02:00 zatwierdzone przez GitHub
rodzic 01226fbe90
commit 2b6c87fb4b
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
9 zmienionych plików z 24 dodań i 22 usunięć

Wyświetl plik

@ -1,7 +1,5 @@
title: $:/core/ui/ListItemTemplate title: $:/core/ui/ListItemTemplate
<div class="tc-menu-list-item"> <div class="tc-menu-list-item">
<$link to={{!!title}}> <$link />
<$view field="title"/>
</$link>
</div> </div>

Wyświetl plik

@ -5,9 +5,7 @@ title: $:/core/ui/PluginInfo/Default/contents
<ul> <ul>
<$list filter="[all[current]plugintiddlers[]sort[title]]" emptyMessage=<<lingo Empty/Hint>>> <$list filter="[all[current]plugintiddlers[]sort[title]]" emptyMessage=<<lingo Empty/Hint>>>
<li> <li>
<$link to={{!!title}}> <$link />
<$view field="title"/>
</$link>
</li> </li>
</$list> </$list>
</ul> </ul>

Wyświetl plik

@ -1,9 +1,5 @@
title: $:/core/ui/PluginListItemTemplate title: $:/core/ui/PluginListItemTemplate
<div class="tc-menu-list-item"> <div class="tc-menu-list-item">
<$link to={{!!title}}> <$link to={{!!title}}><$view field="description"><$view field="title"/></$view></$link>
<$view field="description">
<$view field="title"/>
</$view>
</$link>
</div> </div>

Wyświetl plik

@ -1,10 +1,10 @@
title: $:/core/ui/ViewTemplate/subtitle title: $:/core/ui/ViewTemplate/subtitle
tags: $:/tags/ViewTemplate tags: $:/tags/ViewTemplate
\whitespace trim
<$reveal type="nomatch" stateTitle=<<folded-state>> text="hide" tag="div" retain="yes" animate="yes"> <$reveal type="nomatch" stateTitle=<<folded-state>> text="hide" tag="div" retain="yes" animate="yes">
<div class="tc-subtitle"> <div class="tc-subtitle">
<$link to={{!!modifier}}> <$link to={{!!modifier}} />
<$view field="modifier"/> <$view field="modified" format="date" template={{$:/language/Tiddler/DateFormat}}/>
</$link> <$view field="modified" format="date" template={{$:/language/Tiddler/DateFormat}}/>
</div> </div>
</$reveal> </$reveal>

Wyświetl plik

@ -1,6 +1,7 @@
title: $:/core/ui/ViewTemplate/title title: $:/core/ui/ViewTemplate/title
tags: $:/tags/ViewTemplate tags: $:/tags/ViewTemplate
\whitespace trim
\define title-styles() \define title-styles()
fill:$(foregroundColor)$; fill:$(foregroundColor)$;
\end \end

Wyświetl plik

@ -4,6 +4,7 @@ tags: $:/tags/Macro
title: $:/core/macros/timeline title: $:/core/macros/timeline
\define timeline-title() \define timeline-title()
\whitespace trim
<!-- Override this macro with a global macro <!-- Override this macro with a global macro
of the same name if you need to change of the same name if you need to change
how titles are displayed on the timeline how titles are displayed on the timeline
@ -17,9 +18,7 @@ title: $:/core/macros/timeline
<$view field="$dateField$" format="date" template="$format$"/> <$view field="$dateField$" format="date" template="$format$"/>
<$list filter="[sameday:$dateField${!!$dateField$}!is[system]$subfilter$!sort[$dateField$]]"> <$list filter="[sameday:$dateField${!!$dateField$}!is[system]$subfilter$!sort[$dateField$]]">
<div class="tc-menu-list-subitem"> <div class="tc-menu-list-subitem">
<$link to={{!!title}}> <$link to={{!!title}}><<timeline-title>></$link>
<<timeline-title>>
</$link>
</div> </div>
</$list> </$list>
</div> </div>

Wyświetl plik

@ -4,13 +4,10 @@ title: $:/snippets/viewswitcher
$:/core/images/storyview-$(storyview)$ $:/core/images/storyview-$(storyview)$
\end \end
<$linkcatcher to="$:/view"> <$linkcatcher to="$:/view">
<div class="tc-chooser"> <div class="tc-chooser tc-viewswitcher">
<$list filter="[storyviews[]]" variable="storyview"> <$list filter="[storyviews[]]" variable="storyview">
<$set name="cls" filter="[<storyview>prefix{$:/view}]" value="tc-chooser-item tc-chosen" emptyValue="tc-chooser-item"><div class=<<cls>>> <$set name="cls" filter="[<storyview>prefix{$:/view}]" value="tc-chooser-item tc-chosen" emptyValue="tc-chooser-item"><div class=<<cls>>>
<$link to=<<storyview>>> <$link to=<<storyview>>><$transclude tiddler=<<icon>>/><$text text=<<storyview>>/></$link>
<$transclude tiddler=<<icon>>/>
<$text text=<<storyview>>/>
</$link>
</div> </div>
</$set> </$set>
</$list> </$list>

Wyświetl plik

@ -43,6 +43,10 @@ tags: [[$:/tags/Stylesheet]]
font-weight: 700; font-weight: 700;
} }
html body.tc-body .tc-tiddler-frame .tc-subtitle .tc-tiddlylink {
margin-right: .3em;
}
html body.tc-body .tc-tiddler-frame .tc-tags-wrapper { html body.tc-body .tc-tiddler-frame .tc-tags-wrapper {
margin: 0; margin: 0;
} }

Wyświetl plik

@ -970,6 +970,7 @@ button.tc-btn-invisible.tc-remove-tag-button {
.tc-tiddler-title-icon { .tc-tiddler-title-icon {
vertical-align: middle; vertical-align: middle;
margin-right: .1em;
} }
.tc-system-title-prefix { .tc-system-title-prefix {
@ -991,6 +992,10 @@ button.tc-btn-invisible.tc-remove-tag-button {
font-weight: 300; font-weight: 300;
} }
.tc-subtitle .tc-tiddlylink {
margin-right: .3em;
}
.tc-tiddler-missing .tc-title { .tc-tiddler-missing .tc-title {
font-style: italic; font-style: italic;
font-weight: normal; font-weight: normal;
@ -1400,6 +1405,10 @@ html body.tc-body.tc-single-tiddler-window {
** Storyview Classes ** Storyview Classes
*/ */
.tc-viewswitcher .tc-image-button {
margin-right: .3em;
}
.tc-storyview-zoomin-tiddler { .tc-storyview-zoomin-tiddler {
position: absolute; position: absolute;
display: block; display: block;