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

make everything even more generic

This commit is contained in:
BurningTreeC 2024-10-26 07:17:01 +02:00
parent 279441388e
commit ae28506abb
3 changed files with 9 additions and 34 deletions

View File

@ -11,23 +11,23 @@ tags: [[$:/tags/Stylesheet]]
html .tc-story-river {
position: relative;
width: min({{$:/themes/tiddlywiki/centralised/metrics/storywidth}},calc(100% - (2 * {{$:/themes/tiddlywiki/centralised/metrics/sidebarminwidth}})));
padding: 42px {{$:/themes/tiddlywiki/centralised/metrics/storypaddingright}} 42px {{$:/themes/tiddlywiki/centralised/metrics/storypaddingleft}};
width: min(<<get.theme.metric storywidth>>,calc(100% - (2 * <<get.theme.metric sidebarminwidth>>)));
padding: 42px <<get.theme.metric storypaddingright>> 42px <<get.theme.metric storypaddingleft>>;
margin: 0 auto;
text-align: left;
}
html body.tc-body .tc-sidebar-left .tc-story-river {
margin: 0 auto;
padding-right: {{$:/themes/tiddlywiki/centralised/metrics/storypaddingright}};
padding-left: {{$:/themes/tiddlywiki/centralised/metrics/storypaddingleft}};
padding-right: <<get.theme.metric storypaddingright>>;
padding-left: <<get.theme.metric storypaddingleft>>;
}
html .tc-sidebar-scrollable {
text-align: left;
left: 50%;
right: 0;
margin-left: min(calc((100% - (2 * {{$:/themes/tiddlywiki/centralised/metrics/sidebarminwidth}})) / 2 - 42px),calc({{$:/themes/tiddlywiki/centralised/metrics/storywidth}} / 2 - 42px));
margin-left: min(calc((100% - (2 * <<get.theme.metric sidebarminwidth>>)) / 2 - 42px),calc(<<get.theme.metric storywidth>> / 2 - 42px));
width: auto;
}
@ -35,7 +35,7 @@ tags: [[$:/tags/Stylesheet]]
margin-left: 0;
right: 50%;
left: 0;
margin-right: min(calc((100% - (2 * {{$:/themes/tiddlywiki/centralised/metrics/sidebarminwidth}})) / 2 - 42px),calc({{$:/themes/tiddlywiki/centralised/metrics/storywidth}} / 2 - 42px));
margin-right: min(calc((100% - (2 * <<get.theme.metric sidebarminwidth>>)) / 2 - 42px),calc(<<get.theme.metric storywidth>> / 2 - 42px));
padding-right: 0px;
padding-left: 42px;
}

View File

@ -49,12 +49,12 @@ tags: [[$:/tags/Stylesheet]]
<%if [{$:/themes/tiddlywiki/vanilla/options/sidebarlayout}match[fixed-fluid]] %>
html body.tc-body div.tc-sidebar-scrollable {
left: clamp(calc({{$:/themes/tiddlywiki/vanilla/metrics/storyleft}} + {{$:/themes/tiddlywiki/vanilla/metrics/storyminwidth}} + 42px),calc(<<get.theme.metric storyright>> + 42px),calc(100% - {{$:/themes/tiddlywiki/vanilla/metrics/sidebarminwidth}} + 42px));
left: clamp(calc(<<get.theme.metric storyleft>> + <<get.theme.metric storyminwidth>> + 42px),calc(<<get.theme.metric storyright>> + 42px),calc(100% - <<get.theme.metric sidebarminwidth>> + 42px));
}
html body.tc-body .tc-sidebar-left div.tc-sidebar-scrollable {
left: 0;
right: clamp(calc({{$:/themes/tiddlywiki/vanilla/metrics/storyleft}} + {{$:/themes/tiddlywiki/vanilla/metrics/storyminwidth}} + 42px),calc(<<get.theme.metric storyright>> + 42px),calc(100% - {{$:/themes/tiddlywiki/vanilla/metrics/sidebarminwidth}} + 42px));
right: clamp(calc(<<get.theme.metric storyleft>> + <<get.theme.metric storyminwidth>> + 42px),calc(<<get.theme.metric storyright>> + 42px),calc(100% - <<get.theme.metric sidebarminwidth>> + 42px));
}
<% endif %>
@ -116,29 +116,4 @@ tags: [[$:/tags/Stylesheet]]
margin-top: -4px;
}
html body.tc-body .tc-sidebar-resizer {
width: 12px;
right: auto;
left: clamp(calc({{$:/themes/tiddlywiki/vanilla/metrics/storyleft}} + {{$:/themes/tiddlywiki/vanilla/metrics/storyminwidth}}),clamp(calc(<<get.theme.metric storywidth>>),max(calc({{$:/themes/tiddlywiki/vanilla/metrics/storyleft}} + <<get.theme.metric storywidth>>),calc(<<get.theme.metric storyright>>)),max(calc(100% - {{$:/themes/tiddlywiki/vanilla/metrics/sidebarminwidth}} + ({{$:/themes/tiddlywiki/vanilla/metrics/storyleft}} + <<get.theme.metric storywidth>> - <<get.theme.metric storyright>>)),calc(100% - {{$:/themes/tiddlywiki/vanilla/metrics/sidebarminwidth}}))),calc(100% - {{$:/themes/tiddlywiki/vanilla/metrics/sidebarminwidth}}));
}
html body.tc-body .tc-sidebar-left .tc-sidebar-resizer {
left: auto;
right: clamp(calc({{$:/themes/tiddlywiki/vanilla/metrics/storyleft}} + {{$:/themes/tiddlywiki/vanilla/metrics/storyminwidth}}),clamp(calc(<<get.theme.metric storywidth>>),max(calc({{$:/themes/tiddlywiki/vanilla/metrics/storyleft}} + <<get.theme.metric storywidth>>),calc(<<get.theme.metric storyright>>)),max(calc(100% - {{$:/themes/tiddlywiki/vanilla/metrics/sidebarminwidth}} + ({{$:/themes/tiddlywiki/vanilla/metrics/storyleft}} + <<get.theme.metric storywidth>> - <<get.theme.metric storyright>>)),calc(100% - {{$:/themes/tiddlywiki/vanilla/metrics/sidebarminwidth}}))),calc(100% - {{$:/themes/tiddlywiki/vanilla/metrics/sidebarminwidth}}));
}
<%if [{$:/themes/tiddlywiki/vanilla/options/sidebarlayout}match[fluid-fixed]] %>
html body.tc-body .tc-sidebar-resizer {
left: clamp(calc({{$:/themes/tiddlywiki/vanilla/metrics/storyleft}} + {{$:/themes/tiddlywiki/vanilla/metrics/storyminwidth}}),calc(100% - <<get.theme.metric sidebarwidth>>),calc(100% - {{$:/themes/tiddlywiki/vanilla/metrics/sidebarminwidth}}));
right: auto;
}
html body.tc-body .tc-sidebar-left .tc-sidebar-resizer {
left: auto;
right: clamp(calc({{$:/themes/tiddlywiki/vanilla/metrics/storyleft}} + {{$:/themes/tiddlywiki/vanilla/metrics/storyminwidth}}),calc(100% - <<get.theme.metric sidebarwidth>>),calc(100% - {{$:/themes/tiddlywiki/vanilla/metrics/sidebarminwidth}}));
}
<% endif %>
}

View File

@ -5,4 +5,4 @@ title: $:/themes/tiddlywiki/tight/functions
\function set.sidebarwidth() [{$:/themes/tiddlywiki/vanilla/options/sidebarlayout}match[fluid-fixed]then[yes]] :else[[no]]
\function sidebar.resizer.maxwidth() 12px
\function sidebar.resizer.width() <<sidebar.resizer.maxwidth>>
\function sidebar.resizer.width() [<sidebar.resizer.maxwidth>]