123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- {{"<!-- Fixed Navigation -->" | safeHTML}}
- <nav id="navigation" class="navbar navbar-expand-lg navigation sticky-top">
- <div class="container">
-
- {{"<!-- logo -->" | safeHTML}}
- <a class="navbar-brand logo" href="{{ .Site.BaseURL | relLangURL }}">
- {{ if .Site.Params.logo }}
- <img class="img-fluid" src="{{ .Site.Params.logo | absURL }}" alt="{{ .Site.Title }}">
- {{ else }}
- {{ .Site.Title }}
- {{ end }}
- </a>
- {{"<!-- /logo -->" | safeHTML}}
-
- {{"<!-- responsive nav button -->" | safeHTML}}
- <button class="navbar-toggler navbar-dark" 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>
- {{"<!-- /responsive nav button -->" | safeHTML}}
-
- {{"<!-- main nav -->" | safeHTML}}
- {{ if .IsHome }}
- <div class="collapse navbar-collapse" id="navbarSupportedContent">
- <ul class="navbar-nav ml-auto navigation-menu">
- <li class="nav-item"><a class="nav-link" href="#body">{{ with .Site.Params.home }}{{ . }}{{ end }}</a></li>
- {{ range .Site.Menus.main }}
- <li class="nav-item"><a class="nav-link" href="#{{ .URL }}">{{ .Name }}</a></li>
- {{ end }}
- </ul>
- </div>
- {{ else }}
- <div class="collapse navbar-collapse" id="navbarSupportedContent">
- <ul class="navbar-nav ml-auto navigation-menu">
- <li class="nav-item"><a class="nav-link" href="{{ .Site.BaseURL | relLangURL }}#body">{{ with .Site.Params.home }}{{ . }}{{ end }}</a></li>
- {{ range .Site.Menus.main }}
- <li class="nav-item"><a class="nav-link" href="{{ $.Site.BaseURL | relLangURL }}#{{ .URL }}">{{ .Name }}</a></li>
- {{ end }}
- </ul>
- </div>
- {{ end }}
- {{"<!-- /main nav -->" | safeHTML}}
-
-
- <!-- Language List -->
- {{- if .Site.IsMultiLingual }}
- <select id="select-language" onchange="location = this.value;">
- {{ $siteLanguages := .Site.Languages}}
- {{ $pageLang := .Page.Lang}}
- {{ range .Page.AllTranslations }}
- {{ $translation := .}}
- {{ range $siteLanguages }}
- {{ if eq $translation.Lang .Lang }}
- {{ $selected := false }}
- {{ if eq $pageLang .Lang}}
- <option id="{{ $translation.Language }}" value="{{ $translation.URL }}" selected>{{ .LanguageName }}
- </option>
- {{ else }}
- <option id="{{ $translation.Language }}" value="{{ $translation.URL }}">{{ .LanguageName }}</option>
- {{ end }}
- {{ end }}
- {{ end }}
- {{ end }}
- </select>
- {{ end }}
- </div>
- </nav>
- {{"<!-- End Fixed Navigation -->" | safeHTML}}
|