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

header.html « partials « layouts - github.com/apvarun/showcase-hugo-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 3a425cbef0cebbe27c4a9bc0eda6b4c92b81c689 (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
<header class="text-gray-700 body-font sticky top-0 z-10 dark:text-white">
  <div
    class="container mx-auto flex flex-wrap p-5 flex-col md:flex-row items-center"
  >
    <a
      class="flex title-font font-medium items-center text-gray-900 dark:text-white mb-4 md:mb-0"
      href="{{ .Site.BaseURL }}"
    >
    {{- partial "logo.html" . -}}
    </a>
    <nav
      class="md:ml-auto flex flex-wrap items-center text-base justify-center dark:text-white {{ if .Site.Params.multipage }} multipage {{ end }}"
    >
      {{ if and (eq .Site.Params.hideAutoMenu false) (eq $.IsNode true ) }}
      <a
        class="mr-2 px-2 rounded cursor-pointer select-none hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-100 show-all"
        href="{{ if .Site.Params.multipage }}/{{ else }}#{{ end }}"
        >All</a
      >
      {{ range where .Site.Sections ".Params.private" "!=" true }}
      <a
        class="mr-2 px-2 rounded cursor-pointer select-none hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-100 filter-{{lower .Title}}"
        href="{{ if .Site.Params.multipage }}{{ .Permalink }}{{ else }}#{{ end }}"
        >{{.Title}}</a
      >
      {{ end }}
      {{ end }}
      {{ range .Site.Menus.main }}
      <a
      href="{{ .URL }}"
      class="mr-2 px-2 rounded cursor-pointer select-none hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-100"
      >{{ .Name }}</a>
      {{ end }}
      {{ if .Site.Params.darkMode }}
      <div
        class="toggle-dark-mode select-none p-2 rounded-full transition-colors duration-300 cursor-pointer hover:bg-gray-200 dark:hover:text-gray-900"
      >
        <svg xmlns="http://www.w3.org/2000/svg"
        width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
          <path stroke="none" d="M0 0h24v24H0z" fill="none"/>
          <path d="M12 9a3 3 0 0 0 0 6v-6z" />
          <path d="M6 6h3.5l2.5 -2.5l2.5 2.5h3.5v3.5l2.5 2.5l-2.5 2.5v3.5h-3.5l-2.5 2.5l-2.5 -2.5h-3.5v-3.5l-2.5 -2.5l2.5 -2.5z" />
        </svg>
      </div>
      {{ end }}
    </nav>
  </div>
</header>