OcttKB Cross-Repo Sync (HTML to Raw)

This commit is contained in:
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,41 @@
created: 20230331064526443
creator: Mohammad
modified: 20240129163606737
modifier: Octt
tags: $:/tags/Stylesheet
title: $:/kk-notes-box/styles
\rules only filteredtranscludeinline transcludeinline macrodef macrocallinline html
/* structure */
.kk-notes{
display: flex;
flex-direction: column;
overflow: hidden;
padding:1em;
border-radius:10px;
}
.kk-notes-header{
display:flex;
align-items: center;
}
.kk-notes-title{
margin-left:0.5em;
font-weight:bold;
}
/* skin */
<$list filter="[{$:/palette}get[color-scheme]match[dark]]" variable=ignore>
.kk-notes{background-color: <<colour page-background>>; /*rgb(255 249 243);*/}
.kk-notes-info{ color:rgb(0 128 0);}
.kk-notes-warning{color:rgb(255 0 0);}
.kk-notes-content{color: <<colour foreground>>;}
</$list>
<$list filter="[{$:/palette}get[color-scheme]!match[dark]]" variable=ignore>
.kk-notes{background-color: rgb(255 249 243);}
.kk-notes-info{ color:rgb(0 128 0 / 0.8);}
.kk-notes-warning{color:rgb(255 0 0 /0.8);}
.kk-notes-content{color: rgb(0 0 0 /0.8);}
</$list>

View File

@ -0,0 +1,20 @@
created: 20230331055313846
creator: Mohammad
modified: 20240129163630576
modifier: Octt
tags: $:/tags/Macro
title: $:/kk-notes-box/macros/note
\define note(type:"info", src:"", title:"Note" )
\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[ ]]}}} >
<div class=<<header-class>> >
<$macrocall $name=<<icon>> />
<div class="kk-notes-title"><<__title__>></div>
</div>
</$let>
<div class="kk-notes-content"><$transclude tiddler=<<__src__>> field=title mode=block/></div>
</div>
\end

View File

@ -0,0 +1,19 @@
code-body: yes
created: 20230331064327180
creator: Mohammad
modified: 20240129163649203
modifier: Octt
tags:
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>
\end
\define warning-svg()
<svg class="tc-image-warning-outline tc-image-button" width="22pt" height="22pt" version="1.2" viewBox="0 0 20.08500099182129 17.48900032043457" fill="currentColor"><g transform="translate(-1.957 -3.511)"><path d="M12 5.511c.561 0 1.119.354 1.544 1.062l5.912 9.854C20.307 17.842 19.65 19 18 19H6c-1.65 0-2.307-1.159-1.456-2.573l5.912-9.854c.425-.708.983-1.062 1.544-1.062m0-2c-1.296 0-2.482.74-3.259 2.031l-5.912 9.856c-.786 1.309-.872 2.705-.235 3.83S4.473 21 6 21h12c1.527 0 2.77-.646 3.406-1.771s.551-2.521-.235-3.83l-5.912-9.854C14.482 4.251 13.296 3.511 12 3.511z"/><circle cx="12" cy="16" r="1.3"/><path d="M13.5 10c0-.83-.671-1.5-1.5-1.5a1.499 1.499 0 0 0-1.389 2.062C11.165 11.938 12 14 12 14l1.391-3.438c.068-.173.109-.363.109-.562z"/></g></svg>
\end
<!-- from TW Icons 1.1.0
library: svg-icon collection: awesome
-->