This repository has been archived on 2026-11-16. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
karim 5a6129bee1 Dokumentations-/Marketing-Website hinzugefügt (Hugo, Hextra-Theme)
Erstmaliger Commit des website/-Unterprojekts (bisher nie versioniert).
Enthält Inhalt/Konfiguration (content/, data/, i18n/, hugo.toml) sowie das
vendorte Hextra-Theme; Build-Output (public/) und Lock-Datei bleiben über
website/.gitignore ausgeschlossen.
2026-10-08 20:25:14 +02:00

30 lines
1014 B
HTML

{{ $filename := .filename | default "" -}}
{{ $base_url := .base_url | default "" -}}
{{ $lang := .lang | default "" }}
{{ $content := .content }}
{{ $options := .options | default (dict) }}
{{- if $filename -}}
<div class="hextra-code-filename not-prose" dir="auto">
{{- if $base_url -}}
{{- $base_url = strings.TrimSuffix "/" $base_url -}}
{{- $filename = strings.TrimPrefix "/" $filename -}}
{{- $file_url := urls.JoinPath $base_url $filename -}}
<a class="hx:no-underline hx:inline-flex hx:items-center hx:gap-1" href="{{ $file_url }}" target="_blank" rel="noopener noreferrer">
<span>{{- $filename -}}</span>
{{- partial "utils/icon" (dict "name" "external-link" "attributes" "height=1em") -}}
</a>
{{- else -}}
{{- $filename -}}
{{- end -}}
</div>
{{- end -}}
{{- if transform.CanHighlight $lang -}}
<div>{{- highlight $content $lang $options -}}</div>
{{- else -}}
<div><pre><code>{{ $content }}</code></pre></div>
{{- end -}}