Merge branch '404' of pmpc/website into master

lektura
Max Mehl 2017-03-22 14:31:37 +00:00 committed by Gogs
commit cd0a60d36b
6 changed files with 40 additions and 4 deletions

View File

@ -96,6 +96,12 @@ DefaultContentLanguage = "en"
privacy = "Privacy"
transparency = "Transparency"
license = "Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved."
# 404 Error Page
[params.error]
headline = "Error 404 - Page not found"
description = "The page you're looking for does not exist."
button = "Back to start page"
# === TRANSLATIONS ===

18
layouts/404.html 100644
View File

@ -0,0 +1,18 @@
<!DOCTYPE html>
{{ $data := index .Site.Data .Site.Language.Lang }}
<html lang="en-US">
<head>
{{ partial "head.html" . }}
</head>
<body id="page-top">
<!--{{ partial "nav.html" . }}-->
{{ partial "404.html" . }}
{{ partial "legal.html" . }}
{{ partial "sharecolumn.html" . }}
{{ partial "js.html" . }}
</body>
</html>

View File

@ -0,0 +1,11 @@
{{ "<!-- 404 HEADER -->" | safeHTML }}
<header>
<div class="header-content">
<div class="header-content-inner">
<h1>{{ .Site.Params.error.headline }}</h1>
<hr>
<p>{{ .Site.Params.error.description }}</p>
<a href="/" class="btn btn-primary btn-xl page-scroll">{{ .Site.Params.error.button }}</a>
</div>
</div>
</header>

View File

@ -6,9 +6,9 @@
{{ .Hugo.Generator }}
<title>{{ .Site.Title }}</title>
{{ "<!-- Translations -->" | safeHTML }}
<link type="text/html" rel="alternate" hreflang="{{ .Lang }}" lang="{{ .Lang }}" href="{{ if eq .Lang "en" }}/{{else}}/{{ .Lang }}/{{end}}" title="{{ .Site.Params.languageName }}">
<link type="text/html" rel="alternate" hreflang="{{ .Lang }}" lang="{{ .Lang }}" href="{{ .RelPermalink }}" title="{{ .Site.Params.languageName }}">
{{ range .Translations }}
<link type="text/html" rel="alternate" hreflang="{{ .Lang }}" lang="{{ .Lang }}" href="{{ if eq .Lang "en" }}/{{else}}/{{ .Lang }}/{{end}}" title="{{ .Site.Params.languageName }}">
<link type="text/html" rel="alternate" hreflang="{{ .Lang }}" lang="{{ .Lang }}" href="{{ .RelPermalink }}" title="{{ .Site.Params.languageName }}">
{{end}}
{{ "<!-- Favicon -->" | safeHTML }}
<link rel="shortcut icon" href="{{ .Site.Params.favicon | absURL }}">

View File

@ -8,9 +8,9 @@
<p style="font-size:25px;"><i class="fa fa-globe" aria-hidden="true" style="font-size:1.5em;vertical-align:top;"></i></p>
<ul>
{{ range .Translations }}
<li><a href="{{ if eq .Lang "en" }}/{{else}}/{{ .Lang }}/{{end}}">{{ .Site.Params.languageName }}</a></li>
<li><a href="{{ .RelPermalink }}">{{ .Site.Params.languageName }}</a></li>
{{end}}
<li><a href="{{ if eq .Lang "en" }}/{{else}}/{{ .Lang }}/{{end}}">{{ .Site.Params.languageName }}</a></li>
<li><a href="{{ .RelPermalink }}">{{ .Site.Params.languageName }}</a></li>
</ul>
</div>
</div>

1
static/.htaccess 100644
View File

@ -0,0 +1 @@
ErrorDocument 404 /404.html