From df997e024c51b91e4393c2c93627cefe639d3b75 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Mon, 1 Jul 2013 18:47:31 +0100 Subject: [PATCH] Add experimental sticky titles theme Select the new "Sticky Titles" theme to cause tiddler titles to stick to the top of the window as you scroll. It works very well in Chrome Canary, reasonably well in iOS 7. As an aside, it would be nice to be able to package this is as something a bit smaller than a theme; maybe themes need to have optional hacks that can be associated with them. --- editions/tw5.com/tiddlywiki.info | 1 + themes/tiddlywiki/stickytitles/plugin.info | 10 ++++++++++ themes/tiddlywiki/stickytitles/styles.tid | 14 ++++++++++++++ 3 files changed, 25 insertions(+) create mode 100644 themes/tiddlywiki/stickytitles/plugin.info create mode 100644 themes/tiddlywiki/stickytitles/styles.tid diff --git a/editions/tw5.com/tiddlywiki.info b/editions/tw5.com/tiddlywiki.info index 6edc475ef..409ed26e5 100644 --- a/editions/tw5.com/tiddlywiki.info +++ b/editions/tw5.com/tiddlywiki.info @@ -5,6 +5,7 @@ "themes": [ "tiddlywiki/snowwhite", "tiddlywiki/starlight", + "tiddlywiki/stickytitles", "giffmex/rocker", "giffmex/blue", "giffmex/blanca" diff --git a/themes/tiddlywiki/stickytitles/plugin.info b/themes/tiddlywiki/stickytitles/plugin.info new file mode 100644 index 000000000..bd1aad46c --- /dev/null +++ b/themes/tiddlywiki/stickytitles/plugin.info @@ -0,0 +1,10 @@ +{ + "title": "$:/themes/tiddlywiki/stickytitles", + "name": "Sticky Titles", + "author": "JeremyRuston", + "version": "0.0.0", + "core-version": ">=5.0.0", + "plugin-type": "theme", + "description": "Experimental theme with titles that stick to the top of the window", + "dependents": ["$:/themes/tiddlywiki/snowwhite"] +} diff --git a/themes/tiddlywiki/stickytitles/styles.tid b/themes/tiddlywiki/stickytitles/styles.tid new file mode 100644 index 000000000..b687fc8f9 --- /dev/null +++ b/themes/tiddlywiki/stickytitles/styles.tid @@ -0,0 +1,14 @@ +title: $:/themes/tiddlywiki/stickytitles/styles.tid +tags: [[$:/tags/stylesheet]] + +\rules only filteredtranscludeinline transcludeinline macrodef macrocallinline + +.tw-tiddler-title { + position: -webkit-sticky; + position: -moz-sticky; + position: -o-sticky; + position: -ms-sticky; + position: sticky; + top: 0px; + background: #fff; +}