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>
<head>
<meta charset="utf-8">
<title>{{ block "title" . }}
<!-- Blocks may include default content. -->
{{ .Site.Title }}
{{ end }}</title>
<title>{{ block "title" . }}{{ .Site.Title }}{{ end }}</title>
<link href="https://fonts.googleapis.com/css2?family=Exo+2:wght@200;900&display=swap" rel="stylesheet">
<style>
body {
font-family: 'Exo 2', sans-serif;
font-weight: 200;
}
h1, h2, h3, h4, h5, h6, strong {
font-weight: 900;
}
</style>
<style>
body {
font-family: 'Exo 2', sans-serif;
font-weight: 200;
max-width: 800px;
margin: 0 auto;
}
h1, h2, h3, h4, h5, h6, strong {
font-weight: 900;
}
</style>
</head>
<body>
<!-- Code that all your templates share, like a header -->
{{ block "main" . }}
<!-- 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 }}
{{ block "main" . }}{{ end }}
{{ block "footer" . }}{{ end }}
</body>
</html>

View File

@ -1,11 +1,5 @@
{{ define "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 }}
</main>
{{ end }}