Jan Dittberner
7ec9e393e0
This commit adds a separate protected resource page to demonstrate how to selectively require logins. Add code to improve client performance by providing modification timestamps and Cache-Control headers for embedded static files.
12 lines
No EOL
427 B
Text
12 lines
No EOL
427 B
Text
{{ define "content" }}
|
|
<main class="container">
|
|
<h1>{{ .Greeting }}</h1>
|
|
<p>{{ .IntroductionText }}</p>
|
|
{{ if .IsAuthenticated }}
|
|
<p>{{ .AuthenticatedAs }}</p>
|
|
<a class="btn btn-outline-primary" href="{{ .LogoutURL }}">{{ .LogoutLabel }}</a>
|
|
{{ else }}
|
|
<a class="btn btn-primary" href="/login">{{ .LoginLabel }}</a>
|
|
{{ end }}
|
|
</main>
|
|
{{ end }} |