OcttKB Cross-Repo Sync (HTML to Raw)

This commit is contained in:
2023-07-11 11:28:00 +00:00
parent 6cb76e325b
commit 46c11002a1
748 changed files with 48 additions and 23 deletions

View File

@@ -0,0 +1,23 @@
/*\
Credits: 1337box by Leah Rowe, Creative Commons Zero 1.0
Info: <https://vimuser.org/1337box.html>
\*/
.f, .f * {
position: fixed;
max-width: 100%;
max-height: 100%;
top: 50%;
left: 50%
}
.f * { transform: translate(-50%,-50%) }
.f {
display: none;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 999;
background:rgba(0,0,0,0.8);
}
*:focus + .f { display:block; }
img { cursor:pointer; }

View File

@@ -0,0 +1,7 @@
Credits: 1337box by Leah Rowe, Creative Commons Zero 1.0
Info: <https://vimuser.org/1337box.html>
created: 20230114161404958
modified: 20230114163044372
tags:
title: $:/Styles/1337box/shadow.css
type: text/css

View File

@@ -0,0 +1,85 @@
created: 20230126091040410
creator: Octt
modified: 20230301212829674
modifier: Octt
tags: $:/tags/Stylesheet
title: $:/Styles/Breadcrumbs
\import [[$:/Macros/Styles]]
\define River() .tc-story-river
\define SRiver() .tc-static-story-river
\define Frame() .tc-tiddler-frame
\define Titler() .tc-tiddler-title
<<River>> > <<Frame>> <<Titler>> .tc-title { <<NoDisp>> }
.tc-story-river > .tc-tiddler-frame > .View-Breadcrumbs {
opacity: 0.80;
/*
font-size: xx-large;
margin-top: 0px;
margin-bottom: -1.5em;
position: sticky;
z-index: 512;
*/
}
.tc-story-river > .tc-tiddler-frame:not(.tc-tiddler-missing) > .View-Breadcrumbs > * {
/*font-style: normal !important;*/
opacity: 0.40;
}
.tc-story-river > .tc-tiddler-frame:not(.tc-tiddler-missing) > .View-Breadcrumbs:hover > * { opacity: 0.80; }
.tc-story-river > .tc-tiddler-frame .View-Breadcrumbs > .Inline-Icon > * {
width: 1em;
height: 1em;
vertical-align: top;
}
/*.View-Breadcrumbs { display: inline-flex; }*/
/*.View-Breadcrumbs > .Inline-Sep:not(.View-Breadcrumbs > .Inline-Sep:last-of-type):before*/
.View-Breadcrumbs > .Inline-Sep { padding-left: 0.3em; padding-right: 0.3em; }
.View-Breadcrumbs > .Inline-Sep:after { content: '>'; font-size: smaller; }
.View-Breadcrumbs > .Inline-Sep > span { font-size: 0px; }
.View-Breadcrumbs > .Path-Elem[data-path-elem="$:"] > a,
.View-Breadcrumbs > .Path-Elem[data-path-elem="$:"] + .Inline-Sep
{ color: gray; padding-left: 0em; }
.View-Breadcrumbs > .Path-Elem[data-path-elem="$:"] + .Inline-Sep:after { content: ''; }
.View-Breadcrumbs > .Path-Elem[data-path-elem="$:"] + .Inline-Sep > span { font-size: revert; font-size: smaller; }
.View-Breadcrumbs > .Path-Elem:last-of-type { cursor: pointer; }
.View-Breadcrumbs details { display: inline; vertical-align: top; }
.tc-static-story-river > .tc-tiddler-frame > .tc-tiddler-title details > summary,
.View-Breadcrumbs details > summary {
width: fit-content;
list-style: none;
cursor: pointer;
}
tc-table-of-contents
.tc-static-story-river > .tc-tiddler-frame > .tc-tiddler-title details > .tc-tree,
.tc-static-story-river > .tc-tiddler-frame > .tc-tiddler-title details > .tc-table-of-contents,
.View-Breadcrumbs details > .tc-tree,
.View-Breadcrumbs details > .tc-table-of-contents {
font-size: initial; line-height: 1rem;
}
.tc-static-story-river > .tc-tiddler-frame > .tc-tiddler-title details > .tc-tree > span,
.tc-static-story-river > .tc-tiddler-frame > .tc-tiddler-title details > .tc-table-of-contents > span,
.View-Breadcrumbs details > .tc-tree > span,
.View-Breadcrumbs details > .tc-table-of-contents > span {
display: none;
}
.tc-static-story-river > .tc-tiddler-frame > .tc-tiddler-title .Path-Copy { display: none; }
.View-Breadcrumbs > .Path-Copy {
margin-left: 0.3em;
margin-right: 0.3em;
text-decoration: none;
font-size: smaller;
}

View File

@@ -0,0 +1,55 @@
created: 20230112154615238
creator: Octt
modified: 20230228225214583
modifier: Octt
tags: $:/tags/Stylesheet
title: $:/Styles/Embed
\define --HeadingColor0() #c061cb;
.iFrameNormal, .iFrame100 {
Margin: 0px;
Padding: 0px;
Background: #eeeeff/*#ddddff*/;
Width: 100vw;
}
.iFrameNormal { Height: 90vh; }
.iFrame100 { Height: 100vh; }
.iFrameFitX { Width: 100%; }
.iFrameFullY { Height: 96vh; }
.MediaWikiEmbed, .MediaWikiEmbedBlock {
Border-Left: 4px Solid <<--HeadingColor0>>;
Padding-Left: 1em /*8px*/;
}
.MediaWikiEmbedCover { float: right; }
.MediaWikiEmbedCover > * { max-height: 35vh /*50vh*/; }
.EmbedFrom, .Embed-From,
.MediaWikiEmbed-From, .MediaWikiEmbedFrom {
Font-Size: Smaller;
Font-Style: Italic;
/* Don't make the link go over the "fullscreen" checkbox+label */
max-width: calc(100% - 9em);
}
/* input.Checkbox-Btn:after { content: attr(label); } */
.Embed-Fullscreen-Btn { float: right; font-style: revert; margin-top: -2em; }
label.Embed-Fullscreen-Btn { margin-right: 2.5em; }
input.Embed-Fullscreen-Btn { width: 2em; height: 2em; }
/* TODO: Different top: positioning based on if mobile or desktop view is active, and if sidebar is open or closed (2em for mobile and sidebar closed, ~0.64em for the rest) */
input.Embed-Fullscreen-Btn:checked,
input.Embed-Fullscreen-Btn:checked ~ label,
input.Embed-Fullscreen-Btn:checked ~ iframe
{ position: absolute; z-index: 99999; top: 2em/*0.64em*/; right: 0px; }
input.Embed-Fullscreen-Btn:checked ~ iframe {
height: calc(100vh - 2em);
left: 0px;
right: unset;
min-width: calc(100vw - 40px);
}

View File

@@ -0,0 +1,10 @@
.NoDisplay { display: none; }
.NoSelect {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
User-Select: none;
}

View File

@@ -0,0 +1,7 @@
created: 20230130151417995
creator: Octt
modified: 20230130151526950
modifier: Octt
tags: $:/tags/Stylesheet
title: $:/Styles/Global.css
type: text/css

View File

@@ -0,0 +1,29 @@
created: 20230219153505142
creator: Octt
modified: 20230219191248808
modifier: Octt
tags: $:/tags/Stylesheet
title: $:/Styles/LinkIcon
<!-- Code originally from <https://linkstyle.tiddlyspot.com/>, adapted by me to work just with icons -->
<!-- Notes:
- Anchor classes are selected via strict HTML attributes to avoid things like custom buttons from being stylized where they shouldn't; we will then need another rule to look for an explicit class to stylize other elements
- Currently this assumes that the icon field of a tiddler can only have an emoji, never an image URL
-->
\define linkstyle()
<$set name="uri" value=<<makedatauri """$(tid)$""" "text/plain">> >
<$list variable="urititle" filter="""[<uri>removeprefix[data:text/plain,]]""">
<style>
a[href="#<<urititle>>"][class='tc-tiddlylink tc-tiddlylink-resolves']:after { content: ' <<icon>>'; }
</style>
</$list>
</$set>
\end
<$list filter="""[has[linkstyle]] [has[linkstyle-before]] [has[linkstyle-after]] [has[icon]]""">
<$vars tid={{!!title}} icon={{!!icon}}>
<<linkstyle>>
</$vars>
</$list>

View File

@@ -0,0 +1,41 @@
created: 20230307191735805
creator: Octt
modified: 20230531085347943
modifier: Octt
tags: $:/tags/Stylesheet
title: $:/Styles/Lists
.tc-tiddler-body ul:hover,
.tc-tiddler-body ol:hover,
.tc-tiddler-body dd:hover {
Box-Shadow: 2px 2px 12px RGBA(128, 128, 128, 0.5);
padding-top: 4px;
padding-bottom: 4px;
padding-right: 4px;
}
ul, ol, dd { transition: 0.3s; }
.tc-tiddler-body li { padding-top: 4px; }
/* Definition lists */
dd:before { content: '»'; margin-right: 8px; vertical-align: top; }
dl { margin-left: 8px; }
dl > dd { margin-left: 24px; }
dl > dd > p,
dl > dd > div,
dl > dd > dt {
display: inline-block;
max-width: calc(100% - 1.5em);
}
/*
dl > dd > div > ul,
dl > dd > div > ol {
padding-left: 16px;
}*/
div:not(.tc-tiddler-body) > dl > dt,
dd > p,
dd > div > p,
dd > div > ul {
margin-top: unset;
margin-bottom: unset;
}

View File

@@ -0,0 +1,170 @@
created: 20230108190740128
creator: Octt
modified: 20230605214117998
modifier: Octt
tags: $:/tags/Stylesheet
title: $:/Styles/Main
\define --HeadingColor0() #c061cb;
\define sidebarbreakpoint()
<$text text={{$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint}}/>
\end
\define if-fluid-fixed(text,hiddenSidebarText)
<$reveal state="$:/themes/tiddlywiki/vanilla/options/sidebarlayout" type="match" text="fluid-fixed">
$text$
<$reveal state="$:/state/sidebar" type="nomatch" text="yes" default="yes">
$hiddenSidebarText$
</$reveal>
</$reveal>
\end
/* Override the font used for icon display by the the <$:/plugins/Gk0Wk/notionpage-covericon> plugin, and then also apply it to the :after of .tc-tiddlylink anchors, for consistency.
We override adding a "sans-serif" to the start due to a spacing bug (?) */
.gk0wk-notionpagebg-icon1,
.gk0wk-notionpagebg-icon2,
a[class="tc-tiddlylink tc-tiddlylink-resolves"]:after {
font-family: sans-serif, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Noto Color Emoji", "Segoe UI Symbol", "Android Emoji", EmojiSymbols;
}
/* Mobile */
@media (max-width: <<sidebarbreakpoint>>) {
.tc-sidebar-scrollable .tc-sidebar-header { padding-top: 0px; }
}
/* Desktop */
@media (min-width: <<sidebarbreakpoint>>) {
.tc-sidebar-scrollable {
padding-left: 0px;
padding-right: 0px;
}
.tc-story-river {
padding: {{$:/Config/OcttKB/Tweaks/Starlight/.tc-story-river Padding}};
}
.tc-tiddler-frame {
padding: 20px /*24px 32px 24px 32px*/;
margin-bottom: 20px;
}
<<if-fluid-fixed text:"""
.tc-story-river {
margin-right: {{$:/themes/tiddlywiki/vanilla/metrics/sidebarwidth}};
}
""" hiddenSidebarText:"""
.tc-story-river {
margin-right: 0px;
padding-right: 24px;
}
""">>
}
Div.View-Breadcrumbs
{ margin: 4px; padding: 4px; }
/* Inserting HTML content with tag $:/tags/AboveStory causes excess padding on top of the story river; Setting display none breaks that HTML, so we just tweak position */
.tc-page-container .tc-story-river > .story-backdrop { position: absolute; }
/* Reduce top padding of sidebar */
.tc-sidebar-scrollable { padding-top: 12px; }
.tc-sidebar-scrollable .tc-sidebar-header .tc-reveal .tc-site-subtitle { padding-right: 4em; }
.tc-story-river { padding-bottom: 0px; }
.tc-story-river ~ p { display: none; }
.tc-tiddler-frame,
.tc-tiddler-body p iframe {
Box-Shadow: 2px 2px 12px RGBA(128, 128, 128, 0.5);
}
.tc-tiddler-body p iframe { Border: None; }
.tc-tiddler-frame { border-radius: 4px; }
.tc-modal-body { max-height: 75vh /*60vh*/; }
.tc-sidebar-scrollable .tc-sidebar-tabs-main .tc-more-sidebar .tc-tab-content { overflow: visible; }
.tc-unfold-banner {
width: calc(100% - 8px);
margin-left: -16px;
margin-top: -8px;
}
/* Large tag selection menu, optimized for desktop + nicer tag button */
.tc-edit-tags .tc-edit-add-tag .tc-block-tags-dropdown {
position: revert;
white-space: revert;
}
.tc-edit-tags .tc-edit-add-tag .tc-block-tags-dropdown a {
display: inline-block;
border-radius: 1em;
}
.AiLink { opacity: 0.40; }
.DirList-Title, .DirList-Title * { Font-Style: Normal !Important; }
.Separator-Right:last-of-type { Display: None; }
.StartHere-Button {
font-size: x-large /*smaller*/;
text-decoration: none !important;
user-select: none;
}
.StartHere-Button > img {
width: 122px;
image-rendering: pixelated;
}
.StartHere-Button > span {
position: relative;
top: -20px /*-10px*/;
}
Img.Img90, .Img90 Img {
Max-Width: 90%;
Max-Height: 90vh;
}
.tc-sidebar-scrollable .tc-sidebar-header .tc-page-controls .tc-popup .tc-drop-down { min-width: auto; }
.tc-story-river > .tc-tiddler-frame .tc-subtitle { margin: 4px; padding: 4px; }
/* Customized sidebar button */
.tc-topbar.tc-topbar-right {
bottom: 10px;
right: 10px;
top: unset;
}
.tc-topbar.tc-topbar-right > button {
background: RGBA(0,0,0,0.64);
border-radius: 4px;
}
.tc-topbar.tc-topbar-right > button > svg > g { fill: white; }
details.tw-details > summary > * { display: inline; }
input[type="range"] { min-width: 8em; }
input.Edit-Text-Full { width: 100% !important; }
.tc-tiddler-body details:hover {
Box-Shadow: 2px 2px 12px RGBA(128, 128, 128, 0.5);
}
.tc-tiddler-body details:hover > iframe {
Box-Shadow: none;
}
.ibox-btn {
max-width: 35%;
max-height: 50vh;
}
.ibox-btn img {
width: 100% !important;
}
.tc-modal {
width: 80%;
left: calc((100% - 80%) / 2);
}
.tb-inc > .tb-inc-controls.tc-tiddler-controls > button {
font-size: 150%;
}

View File

@@ -0,0 +1,30 @@
/* This has to be redone basically from scratch because there are issues with position:fixed without editing the tiddler frame z-index, which can't be done via CSS only (no parent selector) */
input.PIP-Select, input.PIP-Select+label, div.PIP-Select > input, div.PIP-Select > label, div.PIP-Select > span { width: 1.25em; height: 1.25em; font-size: 1.50em; vertical-align: middle; }
/*
input[type="radio"].PIP-Select[value="↗️"]:checked ~ div { border: 3px solid red; }
input[type="radio"].PIP-Select[value="↘️"]:checked ~ div { border: 3px solid blue; }
*/
/* Set PIP properties common to all position */
/*
input[type="radio"].PIP-Select[value]:not(input[type="radio"].PIP-Select[value="❎"]):checked,
input[type="radio"].PIP-Select[value]:not(input[type="radio"].PIP-Select[value="❎"]):checked ~ input,
input[type="radio"].PIP-Select[value]:not(input[type="radio"].PIP-Select[value="❎"]):checked ~ label,
*/
input[type="radio"].PIP-Select[value]:not(input[type="radio"].PIP-Select[value="❎"]):checked ~ input[type="radio"].PIP-Select[value="❎"],
input[type="radio"].PIP-Select[value]:not(input[type="radio"].PIP-Select[value="❎"]):checked ~ div {
position: fixed;
z-index: 99999;
top: 0px;
right: 0px;
}
input[type="radio"].PIP-Select[value]:not(input[type="radio"].PIP-Select[value="❎"]):checked ~ input[type="radio"].PIP-Select[value="❎"] { z-index: 100001; }
input[type="radio"].PIP-Select[value]:not(input[type="radio"].PIP-Select[value="❎"]):checked ~ div {
/*height: 100vh;*/
width: 50vw;
background: white;
}

View File

@@ -0,0 +1,7 @@
created: 20230202093634199
creator: Octt
modified: 20230202194628022
modifier: Octt
tags: $:/tags/Stylesheet
title: $:/Styles/PIP.css
type: text/css

View File

@@ -0,0 +1,10 @@
created: 20230108212828635
creator: Octt
modified: 20230218112003133
modifier: Octt
tags: $:/tags/PageControls
title: $:/Styles/Ribbon.html
type:
<!-- TOP RIGHT RIBBON --->
<div class="github-fork-ribbon-wrapper right"><div class="github-fork-ribbon"><a rel="noopener noreferrer" target="_blank" href="https://hub.octt.eu.org">Visit the Octt Hub 🌐</a></div></div>

View File

@@ -0,0 +1,17 @@
created: 20230225150051400
creator: Octt
modified: 20230226210519405
modifier: Octt
tags: $:/tags/Stylesheet
title: $:/Styles/Static/Main
\import [[$:/Macros/Styles]]
\define River() .tc-static-story-river
\define Frame() .tc-tiddler-frame
<<River>> > a[name]/*:not(a[name="~Welcome~"])*/ + <<Frame>> { <<NoDisp>> }
<<River>> > a[name]:target + <<Frame>> { display: block; }
<<River>> > <<Frame>> .gk0wk-notionbg-addbuttons,
<<River>> > <<Frame>> .gk0wk-notionpageb-changecover { <<NoDisp>> }

View File

@@ -0,0 +1,11 @@
created: 20230218174142523
creator: Octt
modified: 20230218174227834
modifier: Octt
tags: $:/tags/AboveStory
title: $:/Styles/Statistics.html
<!-- GoatCounter statistics - Doesn't require a GDPR notice, see <https://goatcounter.com/help/gdpr> -->
<<script>>
<script data-goatcounter="https://private-analytics-not-for-public-use.octt.eu.org/octtkb/count" async src="https://octospacc.gitlab.io/pastebin/GoatCounterCount.js"></script>
<<script off>>

View File

@@ -0,0 +1,11 @@
created: 20230124190137826
creator: Octt
list-after: $:/core/ui/ViewTemplate/title
modified: 20230225182506517
modifier: Octt
tags: $:/tags/ViewTemplate
title: $:/Styles/View/2-10-Breadcrumbs.xml
\whitespace trim
<!-- <<%ViewBreadcrumbs>> -->
<!-- <<i18nBreadcrumbsNamespaceLabelStrip>> -->

View File

@@ -0,0 +1,33 @@
created: 20230111090705398
creator: Octt
modified: 20230228222918606
modifier: Octt
tags: $:/tags/ViewTemplate
title: $:/Styles/View/5-10-Missing.xml
\whitespace trim
<$list filter="[all[current]!is[system]is[missing]]" variable=~>
<!-- <$list filter="[all[current]is[missing]]" variable=~> -->
<!--<$button>
Great features todo!-->
<!--
<$action-setfield object-type="todo"/>
Make Todo
--->
<!--</$button>-->
<$macrocall $name="^WikipediaFrame" Article=<<currentTiddler>>/>
<!--<br><br>-->
<details class="tw-details">
<summary>
Directory Listing
</summary>
<!-- <$macrocall $name="tree_" prefix=<<__currentTiddler__>>/> -->
<!-- <$macrocall $name="tree_" prefix={{{[<currentTiddler>append[/]]}}}/> -->
<<DirTreeList>>
</details>
</$list>

View File

@@ -0,0 +1,10 @@
created: 20230215222923704
creator: Octt
modified: 20230215230026688
modifier: Octt
tags: $:/tags/ViewTemplate
title: $:/Styles/View/9-25-Footnotes.xml
<$list filter="[all[current]!has[draft.of]]">
<<DetailsFootnotes title:"Footnotes">>
</$list>

View File

@@ -0,0 +1,13 @@
created: 20230111080904175
creator: Octt
modified: 20230125115456476
modifier: Octt
tags: $:/tags/ViewTemplate
title: $:/Styles/View/9-50-Backlinks.xml
<$list filter="[all[current]backlinks[]limit[1]has[title]]-[prefix[$:/temp/]]" variable=ignore>
<div class="Backlinks-Div tc-subtitle">
<hr>
See also: <$list filter="[!is[system]all[current]backlinks[]sort[title]] -[is[current]]-[prefix[$:/temp/]]"><$link /><span class="Separator-Right"> | </span></$list>
</div>
</$list>

View File

@@ -0,0 +1,34 @@
created: 20230124112022156
creator: Octt
modified: 20230429202157475
modifier: Octt
tags: $:/tags/ViewTemplate
title: $:/Styles/View/9-99-Hacks
\define AiLinks(Enabled:1)
\whitespace trim
<<script script="
try {
if ('$(Enabled)$' == 1) {
var Query = decodeURIComponent('Please summarize the following article into concise key bullet points: ${URL}. Write the points as objective, generalized declarations that stand by themselves. Do not write them as to explain what the author thinks subjectively. Do not leave any point as unclear: each point must not lead the reader to asking any %22why%22; questions. Avoid boilerplate and repetitions.');
var Title = `$(currentTiddler)$`.replaceAll(`'`, '&apos;');
var Select = `.tc-tiddler-frame[data-tiddler-title='${Title}']`;
var Tiddlers = document.querySelectorAll(Select);
Tiddlers.forEach(function(El){
El.querySelectorAll('a.tc-tiddlylink-external').forEach(function(Link){
var AiLink = document.createElement('span');
AiLink.className = 'AiLink';
AiLink.innerHTML = `<sup>[<a rel='noopener noreferrer' target='_blank' href='https://www.bing.com/search?q=${encodeURIComponent(Query.replace('${URL}', Link.href))}'>AI</a>]</sup>`;
Link.after(AiLink);
});
});
};
} catch(e) { ErrAtLine(e); };
">>
\end
<$set name=Enabled value={{$:/OcttKB/Config/AiLinks.ui!!Enabled}}>
<<AiLinks>>
</$set>

View File

@@ -0,0 +1,51 @@
created: 20230124224040783
creator: Octt
modified: 20230218174510343
modifier: Octt
tags: $:/tags/AboveStory
title: $:/Styles/bilibili-back-to-top.html
<!-- Original image is by <https://bilibili.com> -->
<!-- <div -->
<a
class="bilibili-back-to-top"
title="Cute little lolis from bilibili to help you reach the top of the page..."
style="
display: block;
position: fixed;
/*
bottom: 100px;
right: 20px;
*/
z-index: 9999;
bottom: 2px;
left: 2px;
transform: translateY(0px);
width: 62px;
height: 85px;
/*
margin-left: 602px;
*/
transform: scale(0.5);
cursor: pointer;
background-image: url(https://s1.hdslb.com/bfs/static/jinkela/space/assets/space-to-top.png);
background-position: -40px -44px;
" href="javascript:(function(){
var Select = [
'.tc-story-river > .story-backdrop',
'.tc-sidebar-scrollable .tc-sidebar-header .tc-site-title',
];
for (var i=0; i < Select.length; i++) {
var Elem = document.querySelectorAll(Select[i])[0];
Elem.scrollIntoView({behavior: 'smooth'});
};
/*alert('TODO animation');*/
})();"></a>
<!--
" onclick="
"></div>
-->

View File

@@ -0,0 +1,9 @@
.tc-tiddler-frame .tc-titlebar button {
opacity: 0;
transition: opacity .5s ease-in-out;
}
.tc-tiddler-frame:hover .tc-titlebar button {
zoom: 1;
filter: alpha(opacity=100);
opacity: 1;
}

View File

@@ -0,0 +1,8 @@
created: 20150924065447163
creator: Tobias Beer
modified: 20230110175248723
modifier: Tobias Beer
revision: 0
tags:
title: $:/Styles/onhover-toolbar-styles.css
type: text/css