This commit is contained in:
2026-02-28 16:59:39 +00:00
parent 6d786905ec
commit dd45933223
16 changed files with 5 additions and 1 deletions

View File

@@ -0,0 +1,13 @@
{{- if gt ( len .Params ) 1 -}}
{{- $.Scratch.Set "format" ( .Get 1 ) -}}
{{- else -}}
{{- $splits := ( split ( .Get 0 ) "." ) -}}
{{- $splitsLength := ( len $splits ) -}}
{{- $format := ( index $splits ( sub $splitsLength 1 ) ) -}}
{{- $.Scratch.Set "format" $format -}}
{{- end -}}
{{- $file := ( .Get 0 ) -}}
{{- $format := ( $.Scratch.Get "format" ) -}}
{{- ( print "```" $format "\n" ( readFile $file ) "\n" "```" ) | markdownify -}}

View File

@@ -0,0 +1,7 @@
<span class="icon">
{{- $fname:=print "assets/icons/" ( .Get 0 ) ".svg" -}}
{{- $path:="<path" -}}
{{- $fill:="<path fill=\"currentColor\"" -}}
{{- replace (readFile $fname) $path $fill | safeHTML -}}
</span>
{{- /**/ -}}

View File

@@ -0,0 +1,5 @@
<div class="js-block">
<pre class="source">source</div>
<div class="in"><textarea onchange="js_block_run" style="width:100%"></textarea></div>
<pre class="out">aaa</div>
</div>