mirror of
https://github.com/siderolabs/talos.git
synced 2025-12-07 02:21:14 +01:00
* Add a dark theme The latest bootstrap supports themes out of the box. Utilize the dark theme and fix our custom styles that broke in the process. * Fix the language tag 1px offset issue Remove the custom script that added the copy button and use the native solution available with the newer hugo version. That script also added the small element on top of the code blocks that showed the language, so this needed to be added back manually. Signed-off-by: Orzelius <33936483+Orzelius@users.noreply.github.com> Signed-off-by: Noel Georgi <git@frezbo.dev>
14 lines
521 B
HTML
14 lines
521 B
HTML
<!-- https://write.rog.gr/writing/labeling-code-blocks-in-hugo/ -->
|
|
<figure class="highlight">
|
|
<div class="code-type">{{ .Type }}</div>
|
|
{{- if transform.CanHighlight .Type }}
|
|
<pre tabindex="0" class="chroma"><code class="language-{{ .Type }}" data-lang="{{ .Type }}">
|
|
{{- with transform.HighlightCodeBlock . -}}
|
|
{{ .Inner }}
|
|
{{- end -}}
|
|
</code></pre>
|
|
{{- else }}
|
|
<pre tabindex="0"><code class="language-{{ .Type }}" data-lang="{{ .Type }}">{{ .Inner }}</code></pre>
|
|
{{- end }}
|
|
</figure>
|