fix: remove double title and add some layout options and styles

This commit is contained in:
Patrick Kollitsch 2020-09-25 21:14:09 +07:00
parent ebe5d18663
commit f02a45a35e
No known key found for this signature in database
GPG Key ID: 22E2ACCFF7E3174A
2 changed files with 14 additions and 28 deletions

View File

@ -2,30 +2,22 @@
<html> <html>
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>{{ block "title" . }} <title>{{ block "title" . }}{{ .Site.Title }}{{ end }}</title>
<!-- Blocks may include default content. -->
{{ .Site.Title }}
{{ end }}</title>
<link href="https://fonts.googleapis.com/css2?family=Exo+2:wght@200;900&display=swap" rel="stylesheet"> <link href="https://fonts.googleapis.com/css2?family=Exo+2:wght@200;900&display=swap" rel="stylesheet">
<style> <style>
body { body {
font-family: 'Exo 2', sans-serif; font-family: 'Exo 2', sans-serif;
font-weight: 200; font-weight: 200;
} max-width: 800px;
h1, h2, h3, h4, h5, h6, strong { margin: 0 auto;
font-weight: 900; }
} h1, h2, h3, h4, h5, h6, strong {
</style> font-weight: 900;
}
</style>
</head> </head>
<body> <body>
<!-- Code that all your templates share, like a header --> {{ block "main" . }}{{ end }}
{{ block "main" . }} {{ block "footer" . }}{{ end }}
<!-- The part of the page that begins to differ between templates -->
{{ end }}
{{ block "footer" . }}
<!-- More shared code, perhaps a footer but that can be overridden if need be in -->
{{ end }}
</body> </body>
</html> </html>

View File

@ -1,11 +1,5 @@
{{ define "main" }} {{ define "main" }}
<main aria-role="main"> <main aria-role="main">
<header class="homepage-header">
<h1>{{.Title}}</h1>
{{ with .Params.subtitle }}
<span class="subtitle">{{.}}</span>
{{ end }}
</header>
{{ readFile "README.md" | markdownify }} {{ readFile "README.md" | markdownify }}
</main> </main>
{{ end }} {{ end }}