1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-23 10:07:19 +00:00

Make sticky titles be a theme tweak for Vanilla theme

Fixes #1599 (albeit brutally!)
This commit is contained in:
Jermolene 2015-03-22 10:15:43 +00:00
parent 9d2b782ae9
commit fc315d1df7
6 changed files with 27 additions and 12 deletions

View File

@ -29,7 +29,7 @@ This release includes many improvements to the documentation for TiddlyWiki. Man
* [[Improved|https://github.com/Jermolene/TiddlyWiki5/pull/1353]] behaviour of the tag dropdown in the edit template
* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/ea6e60e66983ee1184f09c5796ef6c8bceae703a]] automatic focusing of the search box at startup
* [[Introduced|https://github.com/Jermolene/TiddlyWiki5/commit/4f3cb8b9aebfc4f65f40c96ef99730887d746b41]] the [[Railroad Plugin]] by Astrid Elocson (see it in action in the new [[Filter Syntax]] documentation)
* [[Migrated|https://github.com/Jermolene/TiddlyWiki5/commit/230066eeae9ace8336612e02c78f8cdaa3f717e4]] functionality of "Sticky Titles" theme into "Vanilla"/"Snow White". This means that tiddler titles will stick to the top of the window during scrolling on browsers that support `position: sticky` (such as Safari and Firefox)
* [[Migrated|https://github.com/Jermolene/TiddlyWiki5/commit/230066eeae9ace8336612e02c78f8cdaa3f717e4]] functionality of "Sticky Titles" theme into an optional tweak for the "Vanilla"/"Snow White" themes. This means that tiddler titles will stick to the top of the window during scrolling on browsers that support `position: sticky` (such as Safari and Firefox)
* [[Added|https://github.com/Jermolene/TiddlyWiki5/commit/8cb7090c40489c81e8c5dfb8cbbdee2c60998c3e]] icons to [[$:/AdvancedSearch]], [[$:/ControlPanel]] and [[$:/TagManager]]
* [[Changed|https://github.com/Jermolene/TiddlyWiki5/commit/b9129d77e99970579074bdb4f9c2ef4b77b812c6]] wording of tiddler "save" button to "store"
* [[Added|https://github.com/Jermolene/TiddlyWiki5/issues/1103]] automatic linking of system tiddlers such as $:/ControlPanel

View File

@ -7,17 +7,6 @@ tags: [[$:/tags/Stylesheet]]
text-shadow: 0 1px 0 <<colour sidebar-foreground-shadow>>;
}
.tc-tiddler-title {
position: -webkit-sticky;
position: -moz-sticky;
position: -o-sticky;
position: -ms-sticky;
position: sticky;
top: 0px;
background: <<colour tiddler-background>>;
z-index: 500;
}
.tc-tiddler-info {
<<box-shadow "inset 1px 2px 3px rgba(0,0,0,0.1)">>
}

View File

@ -4,6 +4,11 @@ caption: Theme Tweaks
You can tweak certain aspects of the ''Vanilla'' theme.
! Options
|[[Sticky titles|$:/themes/tiddlywiki/vanilla/options/stickytitles]]<br>//Causes tiddler titles to "stick" to the top of the screen. Not compatible with Chrome, and causes some layout issues in Firefox// |<$select tiddler="$:/themes/tiddlywiki/vanilla/options/stickytitles"><option value="no">No</option><option value="yes">Yes</option></$select> |
! Settings
|[[Font family|$:/themes/tiddlywiki/vanilla/settings/fontfamily]] |<$edit-text tiddler="$:/themes/tiddlywiki/vanilla/settings/fontfamily" default="" tag="input"/> |

View File

@ -571,6 +571,8 @@ button.tc-untagged-label {
border: 1px solid <<colour tiddler-border>>;
}
{{$:/themes/tiddlywiki/vanilla/sticky}}
.tc-tiddler-info {
padding: 14px 42px 14px 42px;
background-color: <<colour tiddler-info-background>>;

View File

@ -0,0 +1,3 @@
title: $:/themes/tiddlywiki/vanilla/options/
stickytitles: no

View File

@ -0,0 +1,16 @@
title: $:/themes/tiddlywiki/vanilla/sticky
<$reveal state="$:/themes/tiddlywiki/vanilla/options/stickytitles" type="match" text="yes">
``
.tc-tiddler-title {
position: -webkit-sticky;
position: -moz-sticky;
position: -o-sticky;
position: -ms-sticky;
position: sticky;
top: 0px;
background: ``<<colour tiddler-background>>``;
z-index: 500;
}
``
</$reveal>