From 2b6c87fb4b6bbf3c9ffeff9fceeddf9469d50bf0 Mon Sep 17 00:00:00 2001 From: Mario Pietsch Date: Wed, 15 Apr 2020 13:35:35 +0200 Subject: [PATCH] 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 --- core/ui/ListItemTemplate.tid | 4 +--- core/ui/PluginInfoDefaultContents.tid | 4 +--- core/ui/PluginListItemTemplate.tid | 6 +----- core/ui/ViewTemplate/subtitle.tid | 6 +++--- core/ui/ViewTemplate/title.tid | 1 + core/wiki/macros/timeline.tid | 5 ++--- core/wiki/viewswitcher.tid | 7 ++----- themes/tiddlywiki/tight/base.tid | 4 ++++ themes/tiddlywiki/vanilla/base.tid | 9 +++++++++ 9 files changed, 24 insertions(+), 22 deletions(-) diff --git a/core/ui/ListItemTemplate.tid b/core/ui/ListItemTemplate.tid index 637864e2e..3887e1263 100644 --- a/core/ui/ListItemTemplate.tid +++ b/core/ui/ListItemTemplate.tid @@ -1,7 +1,5 @@ title: $:/core/ui/ListItemTemplate
-<$link to={{!!title}}> -<$view field="title"/> - +<$link />
\ No newline at end of file diff --git a/core/ui/PluginInfoDefaultContents.tid b/core/ui/PluginInfoDefaultContents.tid index f006d0c60..b5685f327 100644 --- a/core/ui/PluginInfoDefaultContents.tid +++ b/core/ui/PluginInfoDefaultContents.tid @@ -5,9 +5,7 @@ title: $:/core/ui/PluginInfo/Default/contents diff --git a/core/ui/PluginListItemTemplate.tid b/core/ui/PluginListItemTemplate.tid index f781bca92..66a2e64b4 100644 --- a/core/ui/PluginListItemTemplate.tid +++ b/core/ui/PluginListItemTemplate.tid @@ -1,9 +1,5 @@ title: $:/core/ui/PluginListItemTemplate
-<$link to={{!!title}}> -<$view field="description"> -<$view field="title"/> - - +<$link to={{!!title}}><$view field="description"><$view field="title"/>
\ No newline at end of file diff --git a/core/ui/ViewTemplate/subtitle.tid b/core/ui/ViewTemplate/subtitle.tid index c3511c4f7..a23026861 100644 --- a/core/ui/ViewTemplate/subtitle.tid +++ b/core/ui/ViewTemplate/subtitle.tid @@ -1,10 +1,10 @@ title: $:/core/ui/ViewTemplate/subtitle tags: $:/tags/ViewTemplate +\whitespace trim <$reveal type="nomatch" stateTitle=<> text="hide" tag="div" retain="yes" animate="yes">
-<$link to={{!!modifier}}> -<$view field="modifier"/> - <$view field="modified" format="date" template={{$:/language/Tiddler/DateFormat}}/> +<$link to={{!!modifier}} /> +<$view field="modified" format="date" template={{$:/language/Tiddler/DateFormat}}/>
diff --git a/core/ui/ViewTemplate/title.tid b/core/ui/ViewTemplate/title.tid index f611d71ab..6abacf18c 100644 --- a/core/ui/ViewTemplate/title.tid +++ b/core/ui/ViewTemplate/title.tid @@ -1,6 +1,7 @@ title: $:/core/ui/ViewTemplate/title tags: $:/tags/ViewTemplate +\whitespace trim \define title-styles() fill:$(foregroundColor)$; \end diff --git a/core/wiki/macros/timeline.tid b/core/wiki/macros/timeline.tid index ecc0c7e7a..b949d0432 100644 --- a/core/wiki/macros/timeline.tid +++ b/core/wiki/macros/timeline.tid @@ -4,6 +4,7 @@ tags: $:/tags/Macro title: $:/core/macros/timeline \define timeline-title() +\whitespace trim