68 lines
2.4 KiB
HTML
68 lines
2.4 KiB
HTML
|
<!DOCTYPE html>
|
||
|
<html>
|
||
|
<head>
|
||
|
<meta charset="utf-8">
|
||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
|
<base href="{{ .Site.BaseURL }}">
|
||
|
{{ partial "html-meta.html" . -}}
|
||
|
<title>{{ if not .IsHome }}{{ .Title }} - {{ end }}{{ .Site.Title }}</title>
|
||
|
<link rel="stylesheet" type="text/css" href="{{ "/css/main.css" | relURL }}">
|
||
|
{{ with .Site.Params.favicon -}}
|
||
|
<link rel="shortcut icon" href="{{ . }}" type="image/x-icon">
|
||
|
{{ end -}}
|
||
|
</head>
|
||
|
<body>
|
||
|
<header>
|
||
|
{{ with .Site.Menus.parent -}}
|
||
|
<nav>
|
||
|
{{ range . -}}
|
||
|
<a href="{{ .URL }}">{{ .Name }}</a>
|
||
|
{{ end -}}
|
||
|
</nav>
|
||
|
{{ end -}}
|
||
|
<div>
|
||
|
<h1><a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a></h1>
|
||
|
{{- if .Site.Params.subtitle }}<h2><a href="{{ .Site.BaseURL }}">{{ .Site.Params.subtitle }}</a></h2>{{- end }}
|
||
|
</div>
|
||
|
<nav>
|
||
|
{{- range .Site.Menus.main -}}
|
||
|
<a href="{{ .URL }}">{{ .Name }}</a>
|
||
|
{{- end -}}
|
||
|
{{ if isset site.Params "search" -}}
|
||
|
{{ if eq site.Params.Search "baidu" -}}
|
||
|
{{ partial "search.html" (dict "url" "https://www.baidu.com/s" "key" "wd") -}}
|
||
|
{{ else if eq site.Params.Search "google" -}}
|
||
|
{{ partial "search.html" (dict "url" "https://www.google.com/search" "key" "q") -}}
|
||
|
{{ else if eq site.Params.Search "bing" -}}
|
||
|
{{ partial "search.html" (dict "url" "https://www.bing.com/search" "key" "q") -}}
|
||
|
{{ else if eq site.Params.Search "duckduckgo" -}}
|
||
|
{{ partial "search.html" (dict "url" "https://www.duckduckgo.com/" "key" "q") -}}
|
||
|
{{ else -}}
|
||
|
{{ errorf "Unknown 'Site.Params.Search' value '%s'! Only 'baidu' is supported now." site.Params.Search -}}
|
||
|
{{ end -}}
|
||
|
{{ end -}}
|
||
|
</nav>
|
||
|
</header>
|
||
|
<main>
|
||
|
{{ block "main" . }}{{- end }}
|
||
|
</main>
|
||
|
<footer>
|
||
|
<div>
|
||
|
<div>
|
||
|
{{- if .Site.Copyright -}}
|
||
|
{{ .Site.Copyright | markdownify }}
|
||
|
{{- else -}}
|
||
|
© 2019 Linlin Yan. <a href="https://creativecommons.org/licenses/by/4.0/deed.zh">CC-BY-4.0</a>
|
||
|
{{- end -}}
|
||
|
{{- if .Site.Params.ShowThemeInfo -}}
|
||
|
<p>Powered by <a href="https://gohugo.io/">Hugo</a> with <a href="https://github.com/yanlinlin82/simple-style">Simple-Style</a>
|
||
|
{{- end -}}
|
||
|
</div>
|
||
|
</div>
|
||
|
</footer>
|
||
|
{{ template "_internal/google_analytics.html" . -}}
|
||
|
{{ partial "github-corner.html" . -}}
|
||
|
{{ partial "external-links.html" . -}}
|
||
|
</body>
|
||
|
</html>
|