furtka/website/layouts/partials/lang-switcher.html
Daniel Maksymilian Syrnicki defd2eda06
Some checks failed
CI / lint (push) Successful in 24s
CI / test (push) Successful in 32s
CI / validate-json (push) Successful in 23s
CI / markdown-links (push) Failing after 2s
feat: publish public website at furtka.org
Hugo static site with an intentionally minimal single-page copy — English
default, German under /de/ — while the project stays pre-alpha. No CMS, no
external theme, no webfonts, no external requests. System-UI sans on a
paper-white / near-black palette with a deep crimson accent; a small
wicket-gate SVG as the sole brand mark.

Hosting: nginx on forge-runner-01 serves /var/www/furtka.org; the upstream
openresty proxy terminates TLS so the VM itself only speaks plain HTTP.
Deploy is ./website/deploy.sh (rsync + remote hugo --minify). One-time VM
bootstrap in ops/nginx/setup-vm.sh.
2026-04-14 10:27:51 +02:00

23 lines
750 B
HTML

<ul class="lang-switcher" aria-label="Language">
{{ $current := .Site.Language.Lang }}
{{ range site.Languages }}
{{ $lang := . }}
{{ $link := "" }}
{{ if eq .Lang $current }}
{{ $link = $.Permalink }}
{{ else }}
{{ with (where $.AllTranslations "Lang" .Lang) }}
{{ $link = (index . 0).Permalink }}
{{ else }}
{{ if eq $lang.Lang "en" }}
{{ $link = "/" }}
{{ else }}
{{ $link = printf "/%s/" $lang.Lang }}
{{ end }}
{{ end }}
{{ end }}
<li{{ if eq .Lang $current }} class="is-active"{{ end }}>
<a href="{{ $link }}" lang="{{ .Lang }}"{{ if eq .Lang $current }} aria-current="true"{{ end }}>{{ upper .Lang }}</a>
</li>
{{ end }}
</ul>