mirror of
https://gitlab.com/octtspacc/OcttKB
synced 2024-12-24 14:01:37 +01:00
85 lines
4.3 KiB
Plaintext
85 lines
4.3 KiB
Plaintext
list-before: $:/core/ui/ViewTemplate/title
|
|
tags: $:/tags/ViewTemplate
|
|
title: $:/plugins/Gk0Wk/notionpage-covericon/body
|
|
|
|
<$list filter="[all[current]!is[system]]">
|
|
<$set name="tiddler" value=<<currentTiddler>>>
|
|
<$list filter="[<currentTiddler>addprefix[$:/temp/Gk0Wk/notionpage-covericon/Selector/]]" variable="stateTiddler1">
|
|
<$list filter="[<currentTiddler>addprefix[$:/temp/Gk0Wk/notionpage-covericon/ChangeCover/]]" variable="stateTiddler2">
|
|
<$set name="icon" value={{!!icon}}>
|
|
<$set name="cover" value={{!!page-cover}}>
|
|
<$list filter="[<icon>match[]]">
|
|
<$list filter="[<cover>match[]]">
|
|
<!-- !icon && !cover -->
|
|
<div class="gk0wk-notionpagebg gk0wk-notionpagebg-n">
|
|
<div class="gk0wk-notionbg-addbuttons">
|
|
<$button setTitle=<<tiddler>> setField="icon" setTo={{$:/plugins/Gk0Wk/notionpage-covericon/default-icon}} tooltip="Add Icon">😁 Add Icon</$button>
|
|
<$button setTitle=<<tiddler>> setField="page-cover" setTo={{$:/plugins/Gk0Wk/notionpage-covericon/default-pagecover-url}} tooltip="Add Cover">{{$:/core/images/picture}} Add Cover</$button>
|
|
</div>
|
|
</div>
|
|
</$list>
|
|
<$list filter="[<cover>!match[]]">
|
|
<!-- !icon && cover -->
|
|
<div class="gk0wk-notionpagebg gk0wk-notionpagebg-c">
|
|
<div class="gk0wk-notionpagebg-image"><$image source=<<cover>> width="100%" height="auto"/></div>
|
|
<$button popup=<<stateTiddler2>> class="gk0wk-notionpageb-changecover" tooltip="Change Cover">Change Cover</$button>
|
|
<$reveal type="popup" state=<<stateTiddler2>> position="belowleft" tag="div" class="tc-popup-keep">
|
|
<div class="gk0wk-notionpageb-changecover-box">
|
|
<div>
|
|
<$edit-text tiddler=<<tiddler>> field="page-cover" default="" placeholder="Tiddler or URL" focus="true"/>
|
|
</div>
|
|
</div>
|
|
</$reveal>
|
|
<div class="gk0wk-notionbg-addbuttons">
|
|
<$button setTitle=<<tiddler>> setField="icon" setTo={{$:/plugins/Gk0Wk/notionpage-covericon/default-icon}} tooltip="Add Icon">😁 Add Icon</$button>
|
|
</div>
|
|
</div>
|
|
</$list>
|
|
</$list>
|
|
<$list filter="[<icon>!match[]]">
|
|
<$list filter="[<cover>match[]]">
|
|
<!-- icon && !cover -->
|
|
<div class="gk0wk-notionpagebg gk0wk-notionpagebg-i">
|
|
<$button popup=<<stateTiddler1>> class="gk0wk-notionpagebg-icon1">
|
|
<$list filter="[title<icon>is[shadow]!is[tiddler]]"><$transclude tiddler=<<icon>>/></$list>
|
|
<$list filter="[title<icon>is[tiddler]!is[shadow]]"><$transclude tiddler=<<icon>>/></$list>
|
|
<$list filter="[title<icon>!is[shadow]!is[tiddler]]"><$wikify name="rendered" text=<<icon>> output=html><<rendered>></$wikify></$list>
|
|
</$button>
|
|
<$reveal type="popup" state=<<stateTiddler1>> position="below" tag="div" class="tc-popup-keep">
|
|
{{$:/plugins/Gk0Wk/notionpage-covericon/icon-selector}}
|
|
</$reveal>
|
|
<div class="gk0wk-notionbg-addbuttons">
|
|
<$button setTitle=<<tiddler>> setField="page-cover" setTo={{$:/plugins/Gk0Wk/notionpage-covericon/default-pagecover-url}} tooltip="Add Cover">{{$:/core/images/picture}} Add Cover</$button>
|
|
</div>
|
|
</div>
|
|
</$list>
|
|
<$list filter="[<cover>!match[]]">
|
|
<!-- icon && cover -->
|
|
<div class="gk0wk-notionpagebg gk0wk-notionpagebg-ci">
|
|
<div class="gk0wk-notionpagebg-image"><$image source=<<cover>> width="100%" height="auto"/></div>
|
|
<$button popup=<<stateTiddler1>> class="gk0wk-notionpagebg-icon2">
|
|
<$list filter="[title<icon>is[shadow]!is[tiddler]]"><$transclude tiddler=<<icon>>/></$list>
|
|
<$list filter="[title<icon>is[tiddler]!is[shadow]]"><$transclude tiddler=<<icon>>/></$list>
|
|
<$list filter="[title<icon>!is[shadow]!is[tiddler]]"><$wikify name="rendered" text=<<icon>> output=html><<rendered>></$wikify></$list>
|
|
</$button>
|
|
<$reveal type="popup" state=<<stateTiddler1>> position="below" tag="div" class="tc-popup-keep">
|
|
{{$:/plugins/Gk0Wk/notionpage-covericon/icon-selector}}
|
|
</$reveal>
|
|
<$button popup=<<stateTiddler2>> class="gk0wk-notionpageb-changecover" tooltip="Change Cover">Change Cover</$button>
|
|
<$reveal type="popup" state=<<stateTiddler2>> position="belowleft" tag="div" class="tc-popup-keep">
|
|
<div class="gk0wk-notionpageb-changecover-box">
|
|
<div>
|
|
<$edit-text tiddler=<<tiddler>> field="page-cover" default="" placeholder="Tiddler or URL" focus="true"/>
|
|
</div>
|
|
</div>
|
|
</$reveal>
|
|
</div>
|
|
</$list>
|
|
</$list>
|
|
</$set>
|
|
</$set>
|
|
</$list>
|
|
</$list>
|
|
</$set>
|
|
</$list>
|