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
<div class="tc-menu-list-item">
<$link to={{!!title}}>
<$view field="title"/>
</$link>
<$link />
</div>

Wyświetl plik

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

Wyświetl plik

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

Wyświetl plik

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

Wyświetl plik

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

Wyświetl plik

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

Wyświetl plik

@ -4,13 +4,10 @@ title: $:/snippets/viewswitcher
$:/core/images/storyview-$(storyview)$
\end
<$linkcatcher to="$:/view">
<div class="tc-chooser">
<div class="tc-chooser tc-viewswitcher">
<$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>>>
<$link to=<<storyview>>>
<$transclude tiddler=<<icon>>/>
<$text text=<<storyview>>/>
</$link>
<$link to=<<storyview>>><$transclude tiddler=<<icon>>/><$text text=<<storyview>>/></$link>
</div>
</$set>
</$list>

Wyświetl plik

@ -43,6 +43,10 @@ tags: [[$:/tags/Stylesheet]]
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 {
margin: 0;
}

Wyświetl plik

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