OcttKB Cross-Repo Sync (HTML to Raw)

This commit is contained in:
octospacc 2024-01-29 17:14:51 +00:00
parent a4cb4417d6
commit c6b7dd6f53
33 changed files with 354 additions and 53 deletions

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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;
}
.MagicBoxResult > a {
.MagicBoxApplet.result h3 > a {
pointer-events: none;
}
.MagicBoxApplet.result > a,
.MagicBoxApplet.result > button {
display: inline-block;
width: 100%;
height: 100%;
}
.MagicBoxResult > a:after {
.MagicBoxApplet.result > a:after {
content: "" !important;
}
</style>

View File

@ -1,5 +1,5 @@
created: 20240129140126456
created: 20240129171445021
current-tiddler: GettingStarted
modified: 20240129140126456
modified: 20240129171445021
title: $:/HistoryList
type: application/json

View File

@ -3,4 +3,5 @@ title: $:/Import
The following tiddlers were imported:
# [[$:/plugins/ebalster/condition]]
# [[$:/config/ShortcutInfo/Open-MagicBox]]
# [[$:/Apps/MagicBox/Shortcuts/Open-MagicBox]]

View File

@ -1,6 +1,6 @@
created: 20240129132106430
creator: Octt
list:
modified: 20240129135852455
modified: 20240129171406542
modifier: Octt
title: $:/StoryList

View File

@ -1,7 +1,7 @@
created: 20240128222912902
creator: Octt
modified: 20240128222912902
modified: 20240129160709219
modifier: Octt
title: $:/config/Manager/Filter
Draft of
MagicBox

View File

@ -1,7 +1,5 @@
created: 20230203215732789
creator: Octt
modified: 20230203215744445
modified: 20240129160704435
modifier: Octt
title: $:/config/Manager/System
system
title: $:/config/Manager/System

View File

@ -0,0 +1,4 @@
created: 20240129164312864
modified: 20240129164319981
tags:
title: $:/config/ShortcutInfo/Open-MagicBox

View File

@ -0,0 +1,7 @@
created: 20240129143536837
creator: Octt
modified: 20240129143547597
modifier: Octt
title: $:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/fold-bar
hide

View File

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

View File

@ -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

View File

@ -0,0 +1,7 @@
created: 20240129165246939
creator: Octt
modified: 20240129165246939
modifier: Octt
title: $:/config/shortcuts/Open-MagicBox
ctrl-O

View File

@ -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

View File

@ -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[ ]]}}} >

View File

@ -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>

View File

@ -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>

View File

@ -0,0 +1,138 @@
/*\\
title: $:/core/modules/widgets/danielo/context-widget.js
type: application/javascript
module-type: widget
Edit-text widget
\*/
(function(){
/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";
var Widget = require("$:/core/modules/widgets/widget.js").widget;
var contextWidget = function(parseTreeNode,options) {
this.initialise(parseTreeNode,options);
};
/*
Inherit from the base widget class
*/
contextWidget.prototype = new Widget();
/*
Render this widget into the DOM
*/
contextWidget.prototype.render = function(parent,nextSibling) {
// Save the parent dom node
this.parentDomNode = parent;
// Compute our attributes
this.computeAttributes();
// Execute our logic
this.execute();
if(this.term && this.term.length>3){
this.createRegexp();
var matches = this.executeRegexp();
if(matches.length > 0){
this.domNode = this.document.createElement(this.element);
this.domNode.tabindex = this.tabindex;
this.domNode.className="tw-context";
this.composeResults( matches ); //this appends to domNode
// Insert element
parent.insertBefore(this.domNode,nextSibling);
this.renderChildren(this.domNode,null);
this.domNodes.push(this.domNode);
}
}
};
/*
Compute the internal state of the widget
*/
contextWidget.prototype.execute = function() {
// Get the parameters from the attributes
this.matchedClass = this.getAttribute("matchClass","matched");
this.tiddler = this.getAttribute( "tiddler",this.getVariable("currentTiddler") );
this.term = this.getAttribute("term",this.getAttribute("searchTerm"));
this.contextLength = this.getAttribute("length",50);
this.before = this.getAttribute("before",this.contextLength);
this.after = this.getAttribute("after",this.contextLength);
this.maxMatches = this.getAttribute("maxMatches",10);
this.element = this.getAttribute("element","pre");
this.tabindex = this.getAttribute("tabindex");
this.makeChildWidgets();
};
/*Create the regular expression*/
contextWidget.prototype.createRegexp = function()
{
var regString = "(\\w+[\\s\\S]{0,#before#})?(#term#)([\\s\\S]{0,#after#}\\w+)?";
var regString = regString.replace("#before#",this.before).replace("#term#", $tw.utils.escapeRegExp(this.term) ) .replace("#after#",this.after);
this.regexp = new RegExp(regString,"ig");
//console.log(regString);
};
/*
execute the regular expresion
*/
contextWidget.prototype.executeRegexp = function()
{
var text = this.wiki.getTiddlerText(this.tiddler), match,results = new Array();
while( (match = this.regexp.exec( text ) ) && (results.length < this.maxMatches) )
{ results.push(match) }
//console.log("matches",results);
return results;
};
/*
compose the results
matches : array of match objects from regular expression execute
*/
contextWidget.prototype.composeResults = function(matches){
var result=[], self=this, node = this.domNode,
dots = textNode("...\n"),
span = matchedNode( this.term );
for(var i=0; i < matches.length; i++){
processMatch( matches[i] );
}
function processMatch(match){
if( match.index !== 0) node.appendChild( dots.cloneNode(true) );
for( var i=1;i<match.length;i++ ) {//match[0] full matched text (all groups together)
if( match[i] ) {
if ( match[i].toLowerCase() == self.term.toLowerCase() )
node.appendChild( match[i] == self.term ? span.cloneNode(true) : matchedNode( match[i] ) )
else
node.appendChild( textNode( match[i]) )
}
}
if( match.index + match[0].length < match.input.length) node.appendChild( dots.cloneNode(true) );
}
function textNode(text){ return self.document.createTextNode(text) }
function matchedNode(text) {
var node = self.document.createElement("span"); node.appendChild( textNode(text) ); node.className = self.matchedClass;
return node }
};
/*
Selectively refreshes the widget if needed. Returns true if the widget or any of its children needed re-rendering
*/
contextWidget.prototype.refresh = function(changedTiddlers) {
var changedAttributes = this.computeAttributes();
if(changedAttributes.tiddler || changedAttributes.term || changedAttributes.length || changedAttributes.matchedClass) {
this.refreshSelf();
return true;
}
return this.refreshChildren(changedTiddlers);
};
exports.context = contextWidget;
})();

View File

@ -0,0 +1,7 @@
created: 20140418153435777
creator: danielo
modified: 20240129171317600
modifier: Octt
module-type: widget
title: $:/plugins/danielo515/ContextPlugin/widgets/context.js
type: application/javascript

View File

@ -1,6 +1,10 @@
caption: CMD
created: 20240129142324371
creator: Octt
description: Cmd
list-before: $:/core/ui/Buttons/more-page-actions
modified: 20240129142334360
modifier: Octt
tags: $:/tags/PageControls
title: $:/plugins/oeyoews/commandpalette/cmd
@ -11,7 +15,7 @@ title: $:/plugins/oeyoews/commandpalette/cmd
</$list>
<$list filter="[<tv-config-toolbar-text>match[yes]]">
<span class="tc-btn-text">
<$text text="CMd"/>
<$text text="Command Palette"/>
</span>
</$list>
</$button>

View File

@ -1,7 +1,7 @@
created: 20231107221030108
creator: Octt
modified: 20231107221038052
modified: 20240129160536894
modifier: Octt
title: $:/state/tab--23637530
$:/plugins/kookma/commander/tiddler/ui
$:/plugins/kookma/commander/snr/ui

View File

@ -1,7 +1,7 @@
created: 20220920090405977
creator: Octt
modified: 20240129132112208
modified: 20240129165232809
modifier: Octt
title: $:/state/tab-1749438307
$:/core/ui/ControlPanel/Plugins
$:/core/ui/ControlPanel/KeyboardShortcuts

View File

@ -0,0 +1,7 @@
created: 20240129165241804
creator: Octt
modified: 20240129165241804
modifier: Octt
title: $:/state/dropdown/keyboardshortcut/Open-MagicBox--502179266
open

View File

@ -0,0 +1,7 @@
created: 20240129144251603
creator: Octt
modified: 20240129144251603
modifier: Octt
title: $:/state/plugin-info--1208883240-$:/plugins/souk21/commandpalette
no

View File

@ -0,0 +1,7 @@
created: 20240129144142837
creator: Octt
modified: 20240129165231216
modifier: Octt
title: $:/state/plugin-info-1867135918-$:/plugins/souk21/commandpalette
no

View File

@ -1,6 +1,6 @@
created: 20220920092307479
creator: Octt
modified: 20240129122104626
modified: 20240129160508199
modifier: Octt
title: $:/state/tab/sidebar--595412856

View File

@ -1,7 +1,7 @@
created: 20220920114638764
creator: Octt
modified: 20240129120304646
modified: 20240129143019544
modifier: Octt
title: $:/state/tabs/controlpanel/toolbars-1345989671
$:/core/ui/ControlPanel/Toolbars/EditorToolbar
$:/core/ui/ControlPanel/Toolbars/ViewToolbar

View File

@ -1,6 +1,6 @@
created: 20230817233312379
creator: Octt
modified: 20240129133310010
modified: 20240129171402153
modifier: Octt
title: $:/state/toc/$:/ToC-$:/Apps--1697730578

View File

@ -1,6 +1,6 @@
created: 20230817233308156
creator: Octt
modified: 20240129010756384
modified: 20240129161429270
modifier: Octt
title: $:/state/toc/$:/ToC-$:/Tools--1697730578

View File

@ -0,0 +1,7 @@
created: 20240129165309464
creator: Octt
modified: 20240129165309464
modifier: Octt
title: $:/state/tree/$:/Apps/MagicBox/Shortcuts/
show

View File

@ -1,7 +1,7 @@
created: 20230108193801573
creator: Octt
modified: 20240129002807047
modified: 20240129160149400
modifier: Octt
title: $:/state/tree/$:/Styles/
show
hide

View File

@ -0,0 +1,7 @@
created: 20240129160152203
creator: Octt
modified: 20240129160152984
modifier: Octt
title: $:/state/tree/$:/images/
hide