style: import master and draft index

This commit is contained in:
SerKo 2022-04-05 00:20:04 +08:00
parent 3e90edc8ef
commit 5b0c35b72d
3 changed files with 64 additions and 7 deletions

View File

@ -1,11 +1,31 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
{{- partial "head.html" . -}} {{- partial "head.html" . -}}
<body>
{{- partial "header.html" . -}} <body>
<div id="content"> <nav class="w:full h:90 fixed bg:white">
<div class="
h:full
w:full
max-w:1280
mx:auto
px:16
d:flex
align-items:center
">
<div class="mr:8">
<a class="mr-3 font:extralight">Holy</a>
</div>
{{ $navBtn := `font:semibold px:8` }}
<a class="{{ $navBtn }}">Home</a>
<a class="{{ $navBtn }}">About</a>
</div>
</nav>
<div class="pt:90 px:16 max-w:1280 mx:auto">
{{- block "main" . }}{{- end }} {{- block "main" . }}{{- end }}
</div> </div>
{{- partial "footer.html" . -}} {{- partial "footer.html" . -}}
</body> </body>
</html> </html>

View File

@ -0,0 +1,17 @@
{{ define "main" }}
<div>
{{ .Content }}
<ul id="posts">
{{- range where site.RegularPages "Type" "in" site.Params.mainSections }}
<li>
<div class="my:16 py:26">
<a class="f:24 font:semibold" href="{{ .Permalink }}">
<div>{{ .Title }}</div>
<div class="font:16 mt:5 f:gray"><time>{{ .Date | time.Format (":date_medium") }}</time></div>
</a>
</div>
</li>
{{- end }}
</ul>
</div>
{{ end }}

View File

@ -0,0 +1,20 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<title>{{ if not .IsHome }}{{ .Title }} - {{ end }}{{ site.Title }}</title>
<!-- Meta -->
{{ if eq .Kind "page" }}
<meta name="description" content="{{ .Summary }}" />
<meta name="author" content="{{ .Params.Author | default site.Author.name }}" />
{{ else }}
<meta name="description" content="{{ site.Params.description }}" />
<meta name="author" content="{{ site.Author.name }}" />
{{ end }}
<link href="https://unpkg.com/@master/normal.css" rel="stylesheet">
<script src="https://unpkg.com/@master/style"></script>
<script src="https://unpkg.com/@master/styles"></script>
</head>