Files
cc-backend/web/templates/base.tmpl
Jan Eitzinger 411bc9b317 feat(web): make footer legal links configurable
Add a "main.footer-links" config option so the footer Imprint and
Privacy Policy links can point at internal pages (default) or external
URLs. External http(s) targets open in a new tab; empty/unset values
fall back to the built-in /imprint and /privacy routes, keeping the
existing ./var/*.tmpl override mechanism intact.

Closes #517

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: c5dca72c848f
2026-06-17 17:29:50 +02:00

72 lines
2.9 KiB
Cheetah

<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name='viewport' content='width=device-width,initial-scale=1'>
<title>{{.Title}}</title>
<link rel='icon' type='image/png' href='/favicon.png'>
<link rel="stylesheet" href="/bootstrap.min.css">
<link rel="stylesheet" href="/bootstrap-icons.css">
<link rel='stylesheet' href='/global.css'>
<link rel='stylesheet' href='/uPlot.min.css'>
{{block "stylesheets" .}}
{{end}}
<script>
// Used for header.entrypoint.js mount and filters/Resources.svelte
const hUsername = {{ .User.Username }};
const hAuthlevel = {{ .User.GetAuthLevel }};
const hClusterNames = {{ .Clusters }};
const hSubclusterMap = {{ .SubClusters }};
const hRoles = {{ .Roles }};
</script>
</head>
<body class="site">
{{if eq .Infos.displayType "PUBLIC"}}
<main>
<div class="container">
{{block "content-public" .}}
Whoops, you should not see this... [PUBLIC]
{{end}}
</div>
</main>
{{block "javascript-public" .}}
Whoops, you should not see this... [JS PUBLIC]
{{end}}
{{else}}
{{block "navigation" .}}
<header id="svelte-header"></header>
{{end}}
<main class="site-content">
<div class="container">
{{block "content" .}}
Whoops, you should not see this... [MAIN]
{{end}}
</div>
</main>
{{block "footer" .}}
<footer class="site-footer bg-light">
<ul class="footer-list">
<li class="footer-list-item"><a class="link-secondary fs-5" href="{{ .FooterLinks.Imprint.URL }}" title="Imprint"{{ if .FooterLinks.Imprint.External }} target="_blank" rel="noopener noreferrer"{{ else }} rel="nofollow"{{ end }}>Imprint</a></li>
<li class="footer-list-item"><a class="link-secondary fs-5" href="{{ .FooterLinks.Privacy.URL }}" title="Privacy Policy"{{ if .FooterLinks.Privacy.External }} target="_blank" rel="noopener noreferrer"{{ else }} rel="nofollow"{{ end }}>Privacy Policy</a></li>
</ul>
<ul class="build-list">
<li class="build-list-item">Version {{ .Build.Version }}</li>
<li class="build-list-item">Hash {{ .Build.Hash }}</li>
<li class="build-list-item">Built {{ .Build.Buildtime }}</li>
</ul>
</footer>
{{end}}
{{block "javascript" .}}
<script src='/build/header.js'></script>
{{end}}
{{end}}
</body>
</html>