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

header.html « partials « layouts - github.com/huyb1991/hugo-lamp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 8b2e7623fdbfc6b5fabed42e3123546cbc5f5d38 (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
<header class="header">
  <amp-img alt="{{ .Site.Title }}"
    width="128px"
    height="128px"
    class="logo"
    src="{{ .Site.Params.Logo }}"
    sizes="(max-width: 800px) 36px, 128px">
  </amp-img>
  {{  if eq .Kind "home" }}
    <h1 class="title"><a href="{{ .Site.BaseURL }}" title="{{ .Site.Title }}">{{ .Site.Title }}</a></h1>
  {{ else }}
    <h2 class="title"><a href="{{ .Site.BaseURL }}" title="{{ .Site.Title }}">{{ .Site.Title }}</a></h2>
  {{ end }}
  <p class="subtitle">{{ .Site.Params.subtitle }}</p>
  <button class="menu-toggle" type="button" on="tap:sidebar.open">
    <svg class="icon icon-menu" fill="currentColor"><use xlink:href="#icon-menu" /></svg>
  </button>

  <!-- Sidebar is header on desktop -->
  <nav class="menu">
    <ul class="menu-list">
      {{ partial "navigation.html" . }}
    </ul>
  </nav>

  <button on="tap:AMP.setState({darkMode: !darkMode})">
    <svg class="icon moon" fill="currentColor"><use xlink:href="#icon-moon" /></svg>
    <svg class="icon sunny" fill="currentColor"><use xlink:href="#icon-sunny" /></svg>
  </button>

  {{ partial "social.html" . }}
</header>