HTML improvements

- link from logo to start page
- move common page header to templates/base.gohtml
main
Jan Dittberner 10 months ago
parent 9ad06a2935
commit 0a4cc75bd3

@ -8,6 +8,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Unreleased
### Changed
- let the session expire when the token expires
- link from logo to start page
- move common page header to templates/base.gohtml
### Added
- add identity output to index page

@ -27,9 +27,10 @@
<title>{{ .Title }}</title>
</head>
<body class="resource-app d-flex flex-column h-100">
<main role="main" class="flex-shrink-0">
{{ template "content" . }}
</main>
<header class="container flex-shrink-0">
<a href="/"><img src="/images/CAcert-logo.svg" width="300" height="68" alt="CAcert" class="mb-4"></a>
</header>
{{ template "content" . }}
<footer class="footer mt-auto py-3">
<div class="container">
<span class="text-muted small">© 2020-2023 <a href="https://www.cacert.org/">CAcert</a></span>

@ -1,6 +1,5 @@
{{ define "content" }}
<div class="container text-center error-message">
<img src="/images/CAcert-logo.svg" width="300" height="68" alt="CAcert" class="mb-4">
<main class="container error-message">
<h1>{{ .Title }}</h1>
<h2>{{ if .details.ErrorCode }}
<strong>{{ .details.ErrorCode }}</strong> {{ end }}{{ .details.ErrorMessage }}</h2>
@ -9,5 +8,5 @@
<p>{{ . }}</p>
{{ end }}
{{ end }}
</div>
</main>
{{ end }}

@ -1,9 +1,8 @@
{{ define "content" }}
<div class="container">
<img src="/images/CAcert-logo.svg" width="300" height="68" alt="CAcert" class="mb-4">
<main class="container">
<h1>{{ .Greeting }}</h1>
<p>{{ .IntroductionText }}</p>
<p>{{ .AuthenticatedAs }}</p>
<a class="btn btn-outline-primary" href="{{ .LogoutURL }}">{{ .LogoutLabel }}</a>
</div>
</main>
{{ end }}
Loading…
Cancel
Save