Skip to content

Commit

Permalink
OcttKB Cross-Repo Sync (HTML to Raw)
Browse files Browse the repository at this point in the history
  • Loading branch information
octospacc committed Jan 29, 2024
1 parent a4cb441 commit c6b7dd6
Show file tree
Hide file tree
Showing 33 changed files with 354 additions and 53 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
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>
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
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>
41 changes: 41 additions & 0 deletions Wiki-OcttKB/tiddlers/System/Apps/MagicBox/_Overlay.tid
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
created: 20240129145705629
creator: Octt
modified: 20240129161333542
modifier: Octt
tags:
title: $:/Apps/MagicBox/Overlay

\define @thisOverlay() section.tc-story-river > div.tc-tiddler-frame.tc-tiddler-view-frame[data-tiddler-title="<$text text=<<currentTiddler>>/>"]
<style>
<<@thisOverlay>> {
position: fixed;
top: 0;
left: 0;
z-index: 9999;
width: 100vw;
height: 100vh;
overflow-y: auto;
}
<<@thisOverlay>> div.tc-tiddler-title,
<<@thisOverlay>> div.tc-titlebar {
background: none;
height: 0;
}
<<@thisOverlay>> .tc-tiddler-controls button {
display: none;
}
<<@thisOverlay>> .tc-tiddler-controls button[class*="tc-btn-%24%3A%2Fcore%2Fui%2FButtons%2Fclose"] {
display: revert;
position: fixed;
top: 0px;
right: 8px;
}
<<@thisOverlay>> .View-Breadcrumbs,
<<@thisOverlay>> div.OcttKB-i18n,
<<@thisOverlay>> div.tc-subtitle {
display: none;
}
</style>
<$set name=closeOnChoose value=<<currentTiddler>>>
{{$:/Apps/MagicBox}}
</$set>
55 changes: 35 additions & 20 deletions Wiki-OcttKB/tiddlers/System/Apps/_MagicBox.tid
Original file line number Diff line number Diff line change
@@ -1,72 +1,87 @@
.context: 1
.type: masonry
.width: 24
.width: 33
created: 20240129095948486
creator: Octt
modified: 20240129135204381
modified: 20240129171354932
modifier: Octt
tags: $:/Apps
title: $:/Apps/MagicBox

\define SearchResults(fields)
<$list filter="[!is[system]search:$fields${$:/temp/MagicBox!!.input}sort[title]limit[150]]">
<div class=`MagicBoxResult ${[{$:/Apps/MagicBox!!.type}]}$` style=`background-image: url("${[{!!page-cover}]}$");`>
<$link to={{!!title}}>
<h3>
<$link to={{!!title}}/>
</h3>
<$if value={{$:/Apps/MagicBox!!.context}}>
<$context term={{$:/temp/MagicBox!!.input}}/>
</$if>
</$link>
<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>>/>
<$action-navigate $to={{!!title}}/>
<!--<$link to={{!!title}}>-->
<h3>
<$link to={{!!title}} tabindex="-1"/>
</h3>
<$if value={{$:/Apps/MagicBox!!.context}}>
<$context term={{$:/temp/MagicBox!!.input}} $tabindex="-1"/>
</$if>
<!--</$link>-->
</$button>
</div>
</$list>
\end

<div>
<$edit-text tiddler="$:/temp/MagicBox" field=".input" placeholder="Search..."/>
<div class="MagicBoxApplet options">
<$edit-text tiddler="$:/temp/MagicBox" field=".input" class="_input" placeholder="Search..." tabindex="0"/>
<$checkbox field=".context" checked="1">Context</$checkbox>
<!--<$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}}%
</div>

<$action-sendmessage $message="tm-focus-selector" $param=".MagicBoxApplet.options > ._input"/>
<<script script='try {
document.querySelector(".MagicBoxApplet.options > ._input")?.focus();
document.querySelector("div.tc-tiddler-frame.tc-tiddler-view-frame[data-tiddler-title=\"$:/Apps/MagicBox/Overlay\"] .MagicBoxApplet.options > ._input")?.focus();
} catch(e) { $OcttKB.ErrAtLine(e) }'>><<script off>>

<style>
.MagicBoxResult {
.MagicBoxApplet.result {
margin: 8px;
display: inline-block;
background-color: lightgray;
background-size: cover;
background-position: center;
}
.MagicBoxResult.grid {
.MagicBoxApplet.result.grid {
width: calc({{!!.width}}% - 16px);
aspect-ratio: 16/9;
vertical-align: top;
}
.MagicBoxResult.masonry {
.MagicBoxApplet.result.masonry {
max-width: calc({{!!.width}}% - 16px);
}
.MagicBoxResult h3 {
.MagicBoxApplet.result h3 {
margin-top: 25%;
padding: 8px;
background-color: rgba(255, 255, 255, 0.75);
text-align: center;
}
.MagicBoxResult pre {
.MagicBoxApplet.result pre {
color: initial;
max-height: 7em;
overflow-y: auto;
margin: 0;
top: 1em;
position: relative;
text-align: initial;
}
.MagicBoxApplet.result h3 > a {
pointer-events: none;
}
.MagicBoxResult > a {
.MagicBoxApplet.result > a,
.MagicBoxApplet.result > button {
display: inline-block;
width: 100%;
height: 100%;
}
.MagicBoxResult > a:after {
.MagicBoxApplet.result > a:after {
content: "" !important;
}
</style>
Expand Down
4 changes: 2 additions & 2 deletions Wiki-OcttKB/tiddlers/System/_HistoryList.json.meta
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
created: 20240129140126456
created: 20240129171445021
current-tiddler: GettingStarted
modified: 20240129140126456
modified: 20240129171445021
title: $:/HistoryList
type: application/json
3 changes: 2 additions & 1 deletion Wiki-OcttKB/tiddlers/System/_Import.tid
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ title: $:/Import

The following tiddlers were imported:

# [[$:/plugins/ebalster/condition]]
# [[$:/config/ShortcutInfo/Open-MagicBox]]
# [[$:/Apps/MagicBox/Shortcuts/Open-MagicBox]]
2 changes: 1 addition & 1 deletion Wiki-OcttKB/tiddlers/System/_StoryList.tid
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
created: 20240129132106430
creator: Octt
list:
modified: 20240129135852455
modified: 20240129171406542
modifier: Octt
title: $:/StoryList
4 changes: 2 additions & 2 deletions Wiki-OcttKB/tiddlers/System/config/Manager/_Filter.tid
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
created: 20240128222912902
creator: Octt
modified: 20240128222912902
modified: 20240129160709219
modifier: Octt
title: $:/config/Manager/Filter

Draft of
MagicBox
6 changes: 2 additions & 4 deletions Wiki-OcttKB/tiddlers/System/config/Manager/_System.tid
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
created: 20230203215732789
creator: Octt
modified: 20230203215744445
modified: 20240129160704435
modifier: Octt
title: $:/config/Manager/System

system
title: $:/config/Manager/System
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
created: 20240129164312864
modified: 20240129164319981
tags:
title: $:/config/ShortcutInfo/Open-MagicBox
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
created: 20240129143536837
creator: Octt
modified: 20240129143547597
modifier: Octt
title: $:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/fold-bar

hide
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
created: 20240129143540117
creator: Octt
modified: 20240129143540888
modifier: Octt
title: $:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/fold-others

hide
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
created: 20240129142939181
creator: Octt
modified: 20240129143911354
modifier: Octt
tags:
title: $:/config/ViewToolbarButtons/Visibility/$:/plugins/btheado/BrowserStorage/Buttons/browser-storage-info

hide
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
created: 20240129165246939
creator: Octt
modified: 20240129165246939
modifier: Octt
title: $:/config/shortcuts/Open-MagicBox

ctrl-O
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
created: 20230331064526443
creator: Mohammad
modified: 20230331083727181
modifier: Mohammad
modified: 20240129163606737
modifier: Octt
tags: $:/tags/Stylesheet
title: kk-notes-box/styles
title: $:/kk-notes-box/styles

\rules only filteredtranscludeinline transcludeinline macrodef macrocallinline html

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
created: 20230331055313846
creator: Mohammad
modified: 20230331073020353
modifier: Mohammad
modified: 20240129163630576
modifier: Octt
tags: $:/tags/Macro
title: kk-notes-box/macros/note
title: $:/kk-notes-box/macros/note

\define note(type:"info", src:"", title:"Note" )
\import kk-notes-box/macros/svg-icons
\import [[$:/kk-notes-box/macros/svg-icons]]
<div class="kk-notes">
<$let icon={{{ [<__type__>match[warning]then[warning-svg]else[info-svg]] }}}
header-class={{{"kk-notes-header" [<__type__>match[warning]then[warning]else[info]addprefix[kk-notes-]] :and[join[ ]]}}} >
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
code-body: yes
created: 20230331064327180
creator: Mohammad
modified: 20230331073238027
modifier: Mohammad
modified: 20240129163649203
modifier: Octt
tags:
title: kk-notes-box/macros/svg-icons
title: $:/kk-notes-box/macros/svg-icons

\define info-svg()
<svg class="tc-image-lightbulb-o tc-image-button" width="22pt" height="22pt" viewBox="0 0 1024 1536" fill="currentColor"><path d="M736 448q0 13-9.5 22.5T704 480t-22.5-9.5T672 448q0-46-54-71t-106-25q-13 0-22.5-9.5T480 320t9.5-22.5T512 288q50 0 99.5 16t87 54 37.5 90zm160 0q0-72-34.5-134t-90-101.5-123-62T512 128t-136.5 22.5-123 62-90 101.5T128 448q0 101 68 180 10 11 30.5 33t30.5 33q128 153 141 298h228q13-145 141-298 10-11 30.5-33t30.5-33q68-79 68-180zm128 0q0 155-103 268-45 49-74.5 87T787 898.5 753 1006q47 28 47 82 0 37-25 64 25 27 25 64 0 52-45 81 13 23 13 47 0 46-31.5 71t-77.5 25q-20 44-60 70t-87 26-87-26-60-70q-46 0-77.5-25t-31.5-71q0-24 13-47-45-29-45-81 0-37 25-64-25-27-25-64 0-54 47-82-4-50-34-107.5T177.5 803 103 716Q0 603 0 448q0-99 44.5-184.5t117-142 164-89T512 0t186.5 32.5 164 89 117 142T1024 448z"/></svg>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
caption: {{$:/images/boxicons/regular/bx-cylinder}} Browser Storage Status
created: 20230927064059779
creator: Octt
list-before:
modified: 20230927064059779
modified: 20240129143901328
modifier: Octt
tags: $:/tags/ViewToolbar
title: $:/plugins/btheado/BrowserStorage/Buttons/browser-storage-info

\whitespace trim
<$list filter="[{$:/config/ViewToolbarButtons/Visibility/$:/plugins/btheado/BrowserStorage/Buttons/browser-storage-info}match[show]]" variable="ignore">
<$list filter="[enlist{$:/temp/BrowserStorage/Log}match<currentTiddler>] [haschanged[]subfilter{$:/config/BrowserStorage/SaveFilter}match<currentTiddler>] :and[first[]]">
<$button to="$:/plugins/btheado/BrowserStorage/backup" tooltip="this tiddler is stored in browser storage" aria-label="this tiddler is stored in browser storage" class=<<tv-config-toolbar-class>>>
{{$:/images/boxicons/regular/bx-cylinder}}
</$button>
</$list>
</$list>
Loading

0 comments on commit c6b7dd6

Please sign in to comment.