OcttKB Cross-Repo Sync (HTML to Raw)

This commit is contained in:
2024-01-30 00:47:41 +00:00
parent c6b7dd6f53
commit 3e8e23fc1a
39 changed files with 190 additions and 79 deletions

View File

@@ -1,13 +0,0 @@
created: 20240129160009781
creator: Octt
list-before: $:/core/ui/Buttons/more-page-actions
modified: 20240129165212023
modifier: Octt
tags: $:/tags/PageControls
title: $:/Apps/MagicBox/Buttons/Open-MagicBox
<$button tooltip="Open MagicBox" class="tc-btn-invisible">
🪟️
<!--<$action-navigate $to="$:/Apps/MagicBox/Overlay"/>-->
{{$:/Apps/MagicBox/Shortcuts/Open-MagicBox}}
</$button>

View File

@@ -0,0 +1,21 @@
created: 20240129160009781
creator: Octt
list-before: $:/core/ui/Buttons/more-page-actions
modified: 20240129223619782
modifier: Octt
tags: $:/tags/PageControls
title: $:/Apps/MagicBox/Buttons/Toggle-MagicBox
\define label() Toggle MagicBox
\whitespace trim
<$button tooltip=<<label>> class=<<tv-config-toolbar-class>>>
<$if value=<<tv-config-toolbar-icons>> match="yes">
🪟️
</$if>
<$if value=<<tv-config-toolbar-text>> match="yes">
<span class="tc-btn-text">
<$text text=<<label>>/>
</span>
</$if>
{{$:/Apps/MagicBox/Shortcuts/Toggle-MagicBox}}
</$button>

View File

@@ -1,13 +0,0 @@
created: 20240129163942191
creator: Octt
key: ((Open-MagicBox))
modified: 20240129170319526
modifier: Octt
tags: $:/tags/KeyboardShortcut
title: $:/Apps/MagicBox/Shortcuts/Open-MagicBox
\whitespace trim
<$navigator story="$:/StoryList" history="$:/HistoryList">
<$action-navigate $to="$:/Apps/MagicBox/Overlay" $scroll="yes"/>
<!--<$action-sendmessage $message="tm-focus-selector" $param="""[data-tiddler-title="$:/Apps/MagicBox/Overlay"] ._input""" preventScroll="true"/>-->
</$navigator>

View File

@@ -0,0 +1,18 @@
created: 20240129163942191
creator: Octt
key: ((Toggle-MagicBox))
modified: 20240129232038489
modifier: Octt
tags: $:/tags/KeyboardShortcut
title: $:/Apps/MagicBox/Shortcuts/Toggle-MagicBox
\define appTiddler() $:/Apps/MagicBox/Overlay
\whitespace trim
<$navigator story="$:/StoryList" history="$:/HistoryList">
<$if not value={{{[[$:/StoryList]contains<appTiddler>]}}}>
<$action-navigate $to=<<appTiddler>> $scroll="yes"/>
</$if><$else>
<$action-sendmessage $message="tm-close-tiddler" $param=<<appTiddler>>/>
</$else>
<!--<$action-sendmessage $message="tm-focus-selector" $param="""[data-tiddler-title="$:/Apps/MagicBox/Overlay"] ._input""" preventScroll="true"/>-->
</$navigator>

View File

@@ -0,0 +1,24 @@
created: 20240129220613684
creator: Octt
modified: 20240129225200513
modifier: Octt
tags:
title: $:/Apps/MagicBox/readme
This currently work-in-progress, experimental applet provides a "magic box", allowing for wiki content to be searched in a visually effective way: a full-screen interface complete with previews and covers.
* Thread: [[https://talk.tiddlywiki.org/t/wiki-search-grid-with-covers-and-content-preview-prototype/9003]]
Install in other wiki by drag-and-drop:
# <$draggable tag="button" filter="[[$:/Apps/MagicBox]] [prefix[$:/Apps/MagicBox/]] [tag[$:/Apps/MagicBox]] [tag[$:/Apps/MagicBox/Attached]]">
All applet files
</$draggable>
# (Required dependency) <$draggable tag="button" filter="[[$:/plugins/ebalster/condition]]">
`ebalster/condition` plugin
</$draggable>
# (Optional dependency, required to show content) <$draggable tag="button" filter="[[$:/plugins/danielo515/ContextPlugin/Stylesheet/results]] [[$:/plugins/danielo515/ContextPlugin/widgets/context.js]]">
Core files of `danielo515/ContextPlugin` plugin, modified to allow `tabindex=-1`
</$draggable>

View File

@@ -3,13 +3,13 @@
.width: 33
created: 20240129095948486
creator: Octt
modified: 20240129171354932
modified: 20240129234018781
modifier: Octt
tags: $:/Apps
title: $:/Apps/MagicBox
\define SearchResults(fields)
<$list filter="[!is[system]search:$fields${$:/temp/MagicBox!!.input}sort[title]limit[150]]">
<$list filter="[!is[system]search:$fields${$:/temp/MagicBox!!.input}sort[title]limit[100]]">
<div class=`MagicBoxApplet result ${[{$:/Apps/MagicBox!!.type}]}$` style=`background-image: url("${[{!!page-cover}]}$");`>
<$button class="tc-btn-invisible">
<$action-sendmessage $message="tm-close-tiddler" $param=<<closeOnChoose>>/>
@@ -19,7 +19,7 @@ title: $:/Apps/MagicBox
<$link to={{!!title}} tabindex="-1"/>
</h3>
<$if value={{$:/Apps/MagicBox!!.context}}>
<$context term={{$:/temp/MagicBox!!.input}} $tabindex="-1"/>
<$context term={{$:/temp/MagicBox!!.input}} tabindex="-1"/>
</$if>
<!--</$link>-->
</$button>
@@ -28,11 +28,14 @@ title: $:/Apps/MagicBox
\end
<div class="MagicBoxApplet options">
<$edit-text tiddler="$:/temp/MagicBox" field=".input" class="_input" placeholder="Search..." tabindex="0"/>
<$checkbox field=".context" checked="1">Context</$checkbox>
&nbsp;
<!--<$edit-text field=".type" placeholder="Display Type"/>-->
<$checkbox field=".type" checked="grid" unchecked="masonry">Fixed Grid</$checkbox>
<$range field=".width" min="24" max="49"/>{{!!.width}}%
&nbsp;
<$range field=".width" min="19" max="49"/>{{!!.width}}
&nbsp;
<$edit-text tiddler="$:/temp/MagicBox" field=".input" class="_input" placeholder="Search..." tabindex="0"/>
</div>
<$action-sendmessage $message="tm-focus-selector" $param=".MagicBoxApplet.options > ._input"/>
@@ -42,6 +45,12 @@ title: $:/Apps/MagicBox
} catch(e) { $OcttKB.ErrAtLine(e) }'>><<script off>>
<style>
@media (max-width: 500px) {
.MagicBoxApplet.result {
min-width: calc(({{!!.width}}% * 2) - 16px) !important;
max-width: calc(({{!!.width}}% * 3) - 16px) !important;
}
}
.MagicBoxApplet.result {
margin: 8px;
display: inline-block;
@@ -87,6 +96,16 @@ title: $:/Apps/MagicBox
</style>
<$if value={{{ [{$:/temp/MagicBox!!.input}split[]count[]compare:integer:gteq[3]then[1]] }}}>
<$if value={{{ [!is[system]search:title{$:/temp/MagicBox!!.input}then[]else[1]] }}}>
<$button>
<$action-sendmessage $message="tm-close-tiddler" $param=<<closeOnChoose>>/>
<$action-sendmessage $message="tm-new-tiddler" title={{$:/temp/MagicBox!!.input}} />
Create as New Tiddler
</$button>
</$if>
<div><br/><hr/><br/></div>
Title or Caption matches:
<br/><<SearchResults "title,caption">>