Content lives in data/profile.yaml and is edited as structured fields through Sveltia at /admin/, so the page is never hand-written HTML. The CMS bundle is vendored at a pinned version instead of loaded from unpkg, and the admin assets ship with the built site, so hosting and builds stay self-contained. PKCE sign-in activates once a Gitea OAuth application client ID is added to static/admin/config.yml.
This commit is contained in:
commit
0341edc73d
30 files changed
+4181
No files matched your search
@@ -0,0 +1,50 @@
|
||||
<!doctype html>
|
||||
<html lang="{{ site.Language.Locale }}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>{{ .Title }}</title>
|
||||
<meta name="description" content="{{ .Description }}">
|
||||
<link rel="canonical" href="{{ .Permalink }}">
|
||||
<meta name="color-scheme" content="light dark">
|
||||
<meta name="theme-color" media="(prefers-color-scheme: light)" content="#f5f6f8">
|
||||
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="#0b0d11">
|
||||
<meta property="og:type" content="profile">
|
||||
<meta property="og:title" content="{{ .Title }}">
|
||||
<meta property="og:description" content="{{ .Description }}">
|
||||
<meta property="og:url" content="{{ .Permalink }}">
|
||||
{{ with hugo.Data.profile.avatar }}<meta property="og:image" content="{{ . | absURL }}">{{ end }}
|
||||
<link rel="icon" href="{{ "favicon.svg" | relURL }}" type="image/svg+xml">
|
||||
{{ $css := resources.Get "css/main.css" | minify | fingerprint }}
|
||||
<link rel="stylesheet" href="{{ $css.RelPermalink }}" integrity="{{ $css.Data.Integrity }}">
|
||||
</head>
|
||||
<body>
|
||||
{{ $p := hugo.Data.profile }}
|
||||
<main class="card">
|
||||
<header class="identity">
|
||||
{{ with $p.avatar }}
|
||||
<img class="avatar" src="{{ . | relURL }}" alt="" width="88" height="88">
|
||||
{{ else }}
|
||||
<div class="avatar avatar--fallback" aria-hidden="true">{{ $p.initials | default "WM" }}</div>
|
||||
{{ end }}
|
||||
<h1>{{ $p.name }}</h1>
|
||||
{{ with $p.tagline }}<p class="tagline">{{ . }}</p>{{ end }}
|
||||
</header>
|
||||
{{ with $p.links }}
|
||||
<nav class="links" aria-label="Links">
|
||||
{{ range . }}
|
||||
{{ $external := strings.HasPrefix .url "http" }}
|
||||
<a class="link" href="{{ .url }}"{{ if $external }} target="_blank" rel="noopener noreferrer"{{ end }}>
|
||||
<span class="link__icon">
|
||||
{{ $name := .icon | default "link-45deg" }}
|
||||
{{ with resources.Get (printf "icons/%s.svg" $name) }}{{ .Content | safeHTML }}{{ else }}{{ (resources.Get "icons/link-45deg.svg").Content | safeHTML }}{{ end }}
|
||||
</span>
|
||||
<span class="link__label">{{ .label }}</span>
|
||||
</a>
|
||||
{{ end }}
|
||||
</nav>
|
||||
{{ end }}
|
||||
<footer class="footer">© {{ now.Year }} {{ $p.name }}</footer>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
Reference in new issue
Block a user