mirror of
https://github.com/idanoo/m2.nz
synced 2025-07-17 19:01:51 +00:00
17 lines
No EOL
982 B
HTML
17 lines
No EOL
982 B
HTML
{{- $content := .Content -}}
|
|
{{- $lang := .Lang -}}
|
|
{{- $options := dict "lineNoStart" 1 "lineNos" true -}}
|
|
{{- $options = .Options | partial "function/dict.html" | merge $options -}}
|
|
{{- $lineNoStart := $options.lineNoStart | int -}}
|
|
{{- $lineNos := $options.lineNos | partial "function/bool.html" -}}
|
|
|
|
{{- $options = dict "noClasses" false "lineNos" false | merge $options -}}
|
|
{{- $result := transform.Highlight $content $lang $options -}}
|
|
<div class="code-block{{ if $lineNos }} code-line-numbers{{ end }} open" style="counter-reset: code-block {{ sub $lineNoStart 1 }}">
|
|
<div class="code-header language-bash">
|
|
<span class="code-title"><i class="arrow fas fa-chevron-right fa-fw" aria-hidden="true"></i></span>
|
|
<span class="ellipses"><i class="fas fa-ellipsis-h fa-fw" aria-hidden="true"></i></span>
|
|
<span class="copy" title="{{ T "copyToClipboard" }}"><i class="far fa-copy fa-fw" aria-hidden="true"></i></span>
|
|
</div>
|
|
{{- $result -}}
|
|
</div> |