1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-01-24 07:56:52 +00:00

make it more generic

This commit is contained in:
BurningTreeC 2024-10-25 19:57:04 +02:00
parent 70b759c852
commit 4f9a2fa8c5
4 changed files with 15 additions and 20 deletions

View File

@ -0,0 +1,5 @@
title: $:/themes/tiddlywiki/centralised/functions
\function set.centralised() yes
\function set.storywidth.storyright() no
\function set.sidebarwidth() no

View File

@ -1,16 +0,0 @@
title: $:/core/ui/PageTemplate/sidebar-resizer
tags: $:/tags/PageTemplate
list-after: $:/core/ui/PageTemplate/story
\import $:/core/macros/sidebar-resizer
\whitespace trim
<%if [{$:/themes/tiddlywiki/vanilla/options/sidebarresizer}match[show]] %>
<$set name="tv-set-centralised" value="yes">
<$transclude $variable="sidebar-resizer"/>
</$set>
<% endif %>

View File

@ -0,0 +1,5 @@
title: $:/themes/tiddlywiki/vanilla/functions
\function set.centralised() no
\function set.storywidth.storyright() [{$:/themes/tiddlywiki/vanilla/options/sidebarlayout}match[fixed-fluid]then[yes]] :else[[no]]
\function set.sidebarwidth() [{$:/themes/tiddlywiki/vanilla/options/sidebarlayout}match[fluid-fixed]then[yes]] :else[[no]]

View File

@ -1,15 +1,16 @@
title: $:/core/ui/PageTemplate/sidebar-resizer
title: $:/themes/tiddlywiki/vanilla/ui/sidebar-resizer
tags: $:/tags/PageTemplate
list-after: $:/core/ui/PageTemplate/story
\import $:/core/macros/sidebar-resizer
\import [{$:/theme}addsuffix[/functions]!is[missing]else{$:/theme}addsuffix[/functions]is[shadow]else[$:/themes/tiddlywiki/vanilla/functions]] [[$:/core/macros/sidebar-resizer]]
\whitespace trim
<%if [{$:/themes/tiddlywiki/vanilla/options/sidebarresizer}match[show]] %>
<$let
tv-set-storywidth-storyright={{{ [{$:/themes/tiddlywiki/vanilla/options/sidebarlayout}match[fixed-fluid]then[yes]] :else[[no]] }}}
tv-set-sidebarwidth={{{ [{$:/themes/tiddlywiki/vanilla/options/sidebarlayout}match[fluid-fixed]then[yes]] :else[[no]] }}}
tv-set-storywidth-storyright=<<set.storywidth.storyright>>
tv-set-sidebarwidth=<<set.sidebarwidth>>
tv-set-centralised=<<set.centralised>>
>
<$transclude $variable="sidebar-resizer"/>