1
0
Fork 0

Add basic layout and style

This commit is contained in:
Luca 2020-04-03 11:20:31 +02:00
parent 8646f6657b
commit 63d47943ff
5 changed files with 70 additions and 0 deletions

32
assets/style.css Normal file
View File

@ -0,0 +1,32 @@
h1 {
width: 100%;
text-align: center;
font-size: 96px;
line-height: 1;
margin: calc(50vh - 48px) 0 calc(50vh - 48px) 0;
color: #ff0000;
animation: rainbow 3s linear 0s infinite;
}
footer {
text-align: center;
}
a, a:link, a:visited {
color: #444;
text-decoration: none;
}
a:hover {
color: #888;
}
@keyframes rainbow {
0% { color: #ff0000; }
16.66% { color: #ff8000; }
33.33% { color: #ffff00; }
50% { color: #00ff00; }
66.66% { color: #0000ff; }
83.33% { color: #8000ff; }
100% { color: #ff0000; }
}

View File

@ -0,0 +1,20 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>{{ block "title" . }}
{{ .Site.Title }}
{{ end }}</title>
<link rel="icon" href="data:;base64,iVBORw0KGgo=">
{{ $style := resources.Get "style.css" | minify }}
<link rel="stylesheet" href="{{ $style.Permalink }}">
</head>
<body>
{{ block "main" . }}
{{ end }}
<footer>{{ block "footer" . }}
<a href="#">Kontakt</a>&nbsp;&#8209;&nbsp;<a href="#">Impressum</a>&nbsp;&#8209;&nbsp;<a href="#">Datenschutzerklärung</a>
{{ end }}</footer>
</body>
</html>

View File

@ -0,0 +1,8 @@
{{ define "main" }}
{{ range .Pages }}
<article>
<h2>{{ .Title }}</h2>
{{ .Content }}
</article>
{{ end }}
{{ end }}

View File

@ -0,0 +1,7 @@
{{ define "title" }}
{{ .Title }} &ndash; {{ .Site.Title }}
{{ end }}
{{ define "main" }}
<h1>{{ .Title }}</h1>
{{ .Content }}
{{ end }}

3
layouts/index.html Normal file
View File

@ -0,0 +1,3 @@
{{ define "main" }}
<h1>Hallo Welt</h1>
{{ end }}