diff --git a/core/modules/macros/story/views/sideways.js b/core/modules/macros/story/views/sideways.js new file mode 100644 index 000000000..fc19b9719 --- /dev/null +++ b/core/modules/macros/story/views/sideways.js @@ -0,0 +1,45 @@ +/*\ +title: $:/core/modules/macros/story/views/sideways.js +type: application/javascript +module-type: storyview + +A storyview that shows a sequence of tiddlers as horizontally stacked blocks + +\*/ +(function(){ + +/*jslint node: true, browser: true */ +/*global $tw: false */ +"use strict"; + +function setStoryElementStyles(e) { + e.style.display = "inline-block"; + e.style.width = "350px"; + e.style.verticalAlign = "top"; + e.style.whiteSpace = "normal"; +} + +function SidewaysView(story) { + this.story = story; + var wrapper = this.story.child.children[1].domNode; + // Scroll horizontally + wrapper.style.whiteSpace = "nowrap"; + // Make all the tiddlers position absolute, and hide all but the first one + for(var t=0; t {{dropdown-menu tw-suppress-missing-tiddlylink{ * << << >> Classic>> +* << << >> Sideways>> * << << >> Zoomin>> * << << >> Pasteboard>> }}} diff --git a/tw5.com/wiki/styles.css.tid b/tw5.com/wiki/styles.css.tid index 39b9d3850..8edf83ce5 100644 --- a/tw5.com/wiki/styles.css.tid +++ b/tw5.com/wiki/styles.css.tid @@ -9,7 +9,7 @@ body { .tw-story-element { position: relative; - margin: 30px 0px 30px 0px; + margin: 30px 5px 30px 5px; padding: 20px 20px 20px 20px; border: 1px solid #999; background-color: #fff;