itsblue-website/themes/quark-hugo/layouts/alias.html
Dorian Zedler f4642fe1f4
All checks were successful
continuous-integration/drone/push Build is passing
Chore: use hugo aliases instead of redirect layout (fix #9)
2022-08-07 10:55:31 +02:00

43 lines
1.6 KiB
HTML

<!DOCTYPE html>
<html>
{{- partial "head.html" (dict "Title" "redirecting...") -}}
<body id="top" class="header-fixed sticky-footer">
<div id="page-wrapper">
<section id="header" class="section">
<section class="container {{ site.Params.GridSize }}">
<nav class="navbar">
<section class="navbar-section logo">
{{ partial "logo.html" (dict "ctx" . "mobile" true) }}
</section>
</nav>
</section>
</section>
<section id="body-wrapper" class="section">
<section class="container {{ site.Params.GridSize }}">
{{ $redirectUrl := .Permalink }} {{ if hasPrefix .Permalink "/" }} {{
$redirectUrl = printf "%s" .Permalink | printf "%s%s" site.BaseURL |
printf "%s" }} {{ end }}
<article
class="mb-16 max-w-5xl mx-auto px-4 prose lg:prose-lg prose-blue dark:prose-dark"
>
<noscript
><meta http-equiv="refresh" content="0; url={{ $redirectUrl }}"
/></noscript>
<h1 class="font-bold text-3xl">Redirecting ...</h1>
<a href="{{ $redirectUrl }}">Click here if nothing happens</a>
<script>
var destination = "{{ $redirectUrl }}";
window.location.href = destination + (window.location.search || '') + (window.location.hash || '');
</script>
</article>
</section>
</section>
</div>
{{ block "footer" . }} {{- partial "footer.html" . -}} {{ end }}
</body>
</html>