diff --git a/core/ui/ViewToolbar/more-tiddler-actions.tid b/core/ui/ViewToolbar/more-tiddler-actions.tid index b344dc4d187..6d5b39c67cd 100644 --- a/core/ui/ViewToolbar/more-tiddler-actions.tid +++ b/core/ui/ViewToolbar/more-tiddler-actions.tid @@ -7,7 +7,7 @@ description: {{$:/language/Buttons/More/Hint}} \define config-title() $:/config/ViewToolbarButtons/Visibility/$(listItem)$ \end -<$button popup=<> tooltip={{$:/language/Buttons/More/Hint}} aria-label={{$:/language/Buttons/More/Caption}} class=<> selectedClass="tc-selected"> +<$button popupTitle={{{ [[$:/state/popup/more/]addsuffix] }}} tooltip={{$:/language/Buttons/More/Hint}} aria-label={{$:/language/Buttons/More/Caption}} class=<> selectedClass="tc-selected"> <$list filter="[prefix[yes]]"> {{$:/core/images/down-arrow}} @@ -18,7 +18,7 @@ $:/config/ViewToolbarButtons/Visibility/$(listItem)$ -<$reveal state=<> type="popup" position="belowleft" animate="yes"> +<$reveal stateTitle={{{ [[$:/state/popup/more/]addsuffix] }}} type="popup" position="belowleft" animate="yes">
@@ -30,7 +30,7 @@ $:/config/ViewToolbarButtons/Visibility/$(listItem)$ <$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewToolbar]!has[draft.of]] -[[$:/core/ui/Buttons/more-tiddler-actions]]" variable="listItem"> -<$reveal type="match" state=<> text="hide"> +<$reveal type="match" stateTitle=<> text="hide"> <$set name="tv-config-toolbar-class" filter="[] [encodeuricomponent[]addprefix[tc-btn-]]"> @@ -50,4 +50,4 @@ $:/config/ViewToolbarButtons/Visibility/$(listItem)$
- \ No newline at end of file + diff --git a/core/wiki/macros/CSS.tid b/core/wiki/macros/CSS.tid index a5b68ea0723..6cd04d0b217 100644 --- a/core/wiki/macros/CSS.tid +++ b/core/wiki/macros/CSS.tid @@ -74,3 +74,61 @@ column-count: $columns$; \define if-background-attachment(text) <$reveal state="$:/themes/tiddlywiki/vanilla/settings/backgroundimage" type="nomatch" text="">$text$ \end + +\define create-data-tag() +\rules only +$(classesBefore)$[$(tagName)$$(tagSelector)$"$(escapedTagValue)$"]$(classesAfter)$ { +$(tagStyles)$ +} +\end + +\define assign-css-to-data-tag(tagName:"data-tiddler-title",tagSelector:"=",tagValue:"",tagStyles:"",classesBefore:"",classesAfter:"") +\whitespace trim +<$vars escapedTagValue={{{ [<__tagValue__>escapecss[]] }}} tagStyles=<<__tagStyles__>> tagName=<<__tagName__>> tagSelector=<<__tagSelector__>> classesBefore=<<__classesBefore__>> classesAfter=<<__classesAfter__>>> +<> + +\end + +\define get-full-zindex-list() +$(zIndexFilter)$ $(tiddlerList)$ +\end + +\define sticky-z-index() +z-index: $(zIndex)$; +\end + +\define sticky-titles() +\whitespace trim +<$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: ``<>``; + z-index: 500; +} +`` +<$set name="morePopupTiddler" value={{{ [all[tiddlers]removeprefix[$:/state/popup/more/]] }}}> +<$macrocall $name="assign-css-to-data-tag" tagValue=<> tagStyles="z-index: 520;" classesAfter=" .tc-tiddler-title"/> +<$set name="tiddlerList" filter="[list[$:/StoryList]allafterlimit[20]]"> +<$list filter="[enlist]" variable="zIndexTiddler"> +<$set name="zIndexFilter" filter="[range[1,500]addsuffix]"> +<$set name="zIndexList" value=<>> +<$set name="tiddlerIndex" value={{{ [list[$:/StoryList]allafterlimit[20]] +[allbefore] [] +[count[]] }}}> +<$set name="reversedTiddler" value={{{ [enlistreverse[]nth] }}}> +<$set name="zIndex" value={{{ [enlist] +[allbeforecount[]] }}}> +<$macrocall $name="assign-css-to-data-tag" tagValue=<> tagStyles=<> classesAfter=" .tc-tiddler-title"/> + + + + + + + + + +\end diff --git a/themes/tiddlywiki/vanilla/base.tid b/themes/tiddlywiki/vanilla/base.tid index 401022128fa..f750590d8ac 100644 --- a/themes/tiddlywiki/vanilla/base.tid +++ b/themes/tiddlywiki/vanilla/base.tid @@ -845,8 +845,6 @@ button.tc-untagged-label { border: 1px solid <>; } -{{$:/themes/tiddlywiki/vanilla/sticky}} - .tc-tiddler-info { padding: 14px 42px 14px 42px; background-color: <>; diff --git a/themes/tiddlywiki/vanilla/sticky.tid b/themes/tiddlywiki/vanilla/sticky.tid index 407f4466545..e8f35c588b8 100644 --- a/themes/tiddlywiki/vanilla/sticky.tid +++ b/themes/tiddlywiki/vanilla/sticky.tid @@ -1,16 +1,4 @@ title: $:/themes/tiddlywiki/vanilla/sticky +tags: $:/tags/Stylesheet -<$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: ``<>``; - z-index: 500; -} -`` - +<>