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

header.html « partials « layouts - github.com/mattstratton/castanet.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a83c6d35d5db44755cccc73a6142b343102ad399 (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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<nav class="navbar fixed-top navbar-expand-md navbar-light bg-light">
<div class="container">
<a class="navbar-brand" href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a>
  <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
    <span class="navbar-toggler-icon"></span>
  </button>

  <div id="navbarSupportedContent" class="navbar-collapse collapse">
      <ul class="navbar-nav mr-auto">
          {{ $currentPage := . }}
          {{ if gt (len .Site.Menus) 0 }}
            {{ range sort .Site.Menus.main "Identifier"}}
              {{ if .HasChildren }}
                <li class="nav-item dropdown">
                  <a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">{{ .Name }}</a>
                <div class="dropdown-menu">
                {{ range sort .Children  "Identifier"}}
                  <a class="dropdown-item{{ if $currentPage.IsMenuCurrent "Main" . }} active {{ end }}" href="{{ .URL | absURL}}">{{ .Name }}</a>
                {{ end }}
                </div>
                </li>
              {{ else }}
                  <li class= "nav-item {{ if or ($currentPage.IsMenuCurrent "Main" .) ($currentPage.HasMenuCurrent "Main" .) }} active {{ end }}">
                  <a href="{{ .URL | absURL }}" class="nav-link">
                      {{ .Pre }}
                      <span>{{ .Name }}</span>
                  </a>
                </li>
              {{ end }}
            {{ end }}
          {{end}}
        </ul>

      <ul class="navbar-nav ml-auto">
        {{ if (isset .Site.Params.social "facebook" ) }}
          <li class>
            {{ partial "social-link.html" (dict "context" $.Site.Params.social.facebook "aclass" "social-links" "iclass" "fab fa-facebook-square fa-2x" "prefix" "https://www.facebook.com/" "text" "") }}
          </li>
        {{ end }}
        {{ if (isset .Site.Params.social "twitter" ) }}
          <li>
            {{ partial "social-link.html" (dict "context" $.Site.Params.social.twitter "aclass" "social-links" "iclass" "fab fa-twitter-square fa-2x" "prefix" "https://twitter.com/" "text" "") }}
          </li>
        {{ end }}
        {{ if (isset .Site.Params.social "youtube" ) }}
          <li>
            {{ partial "social-link.html" (dict "context" $.Site.Params.social.youtube "aclass" "social-links" "iclass" "fab fa-youtube-square fa-2x" "prefix" "https://youtube.com/" "text" "") }}
          </li>
        {{ end }}
        {{ if (isset .Site.Params.social "pinterest" ) }}
          <li>
            {{ partial "social-link.html" (dict "context" $.Site.Params.social.pinterest "aclass" "social-links" "iclass" "fab fa-pinterest-square fa-2x" "prefix" "https://www.pinterest.com/" "text" "") }}
          </li>
        {{ end }}
        {{ if (isset .Site.Params.social "instagram" ) }}
          <li>
            {{ partial "social-link.html" (dict "context" $.Site.Params.social.instagram "aclass" "social-links" "iclass" "fab fa-instagram fa-2x" "prefix" "https://www.instagram.com/" "text" "") }}
          </li>
        {{ end }}
        {{ if (isset .Site.Params.social "linkedin" ) }}
          <li>
            {{ partial "social-link.html" (dict "context" $.Site.Params.social.linkedin "aclass" "social-links" "iclass" "fab fa-linkedin fa-2x" "prefix" "https://www.linkedin.com/in/" "text" "") }}
          </li>
        {{ end }}
        {{ if (isset .Site.Params.social "github" ) }}
          <li>
            {{ partial "social-link.html" (dict "context" $.Site.Params.social.github "aclass" "social-links" "iclass" "fab fa-github-square fa-2x" "prefix" "https://github.com/" "text" "") }}
          </li>
        {{ end }}
        {{ if (isset .Site.Params.social "gitlab" ) }}
          <li>
            {{ partial "social-link.html" (dict "context" $.Site.Params.social.gitlab "aclass" "social-links" "iclass" "fab fa-gitlab fa-2x" "prefix" "https://gitlab.com/" "text" "") }}
          </li>
        {{ end }}
        {{ if (isset .Site.Params.social "twitch" ) }}
        <li>
          {{ partial "social-link.html" (dict "context" $.Site.Params.social.twitch "aclass" "social-links" "iclass" "fab fa-twitch fa-2x" "prefix" "https://twitch.tv/" "text" "") }}
        </li>
      {{ end }}
      </ul>
  </div>
  </div>
  </nav>