
* revamp code highlighting * replace standard Fira Code with a variable version * change buttons arrows * redesign code blocks * make terminal logo more prominent * separate terminal theme styles from terminal.css Terminal.css styles only can change the color scheme. * update docs and version * remove USERS.md * fix header pattern * remove old prismjs shortcode * remove old rss template * remove old figure shortcode * [chore] update yarn LOL, I'm still using 1.22.x * [chore] update package-lock.json * fix pagination & boost meta visibility * fix code blocks on mobile & move some parts from CSS to JS
16 lines
702 B
HTML
16 lines
702 B
HTML
{{ $id := delimit (shuffle (seq 1 9)) "" }}
|
|
{{ $open := .Get "open" }}
|
|
{{ $lang := .Get "language" }}
|
|
{{ $opts := .Get "opts" }}
|
|
|
|
{{- if $lang -}}
|
|
<details class="collapsable-code" {{ if eq $open "true" -}} open {{- end }}>
|
|
<summary title="Click to interact">
|
|
{{- if .Get "title" }}<span class="collapsable-code__title">{{ .Get "title" | markdownify }}</span>{{ end -}}
|
|
</summary>
|
|
{{ $trInner := trim .Inner "\n" }}
|
|
{{- transform.Highlight $trInner $lang $opts -}}
|
|
</details>
|
|
{{ else }}
|
|
{{ errorf "If you want to use the \"collapsable code\" shortcode, you need to pass a mandatory \"language\" param. The issue occured in %q (%q)" .Page.File .Page.Permalink }}
|
|
{{- end -}}
|