Welcome to mirror list, hosted at ThFree Co, Russian Federation.

baseof.html « _default « layouts - github.com/yanlinlin82/simple-style.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 1df284956e01f0c7a9cfea144357ae7c41dc86f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<!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 -}}
        &copy; 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>