forked from themefisher/meghna-hugo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
64 additions
and
2,339 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,69 +1,56 @@ | ||
{{"<!-- Fixed Navigation -->" | safeHTML}} | ||
<nav id="navigation" class="navbar navbar-expand-lg navigation sticky-top"> | ||
<section class="sticky-top navigation"> | ||
<div class="container"> | ||
<nav class="navbar navbar-expand-lg navbar-dark"> | ||
<a class="navbar-brand p-0" 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}} | ||
<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}} | ||
<button class="navbar-toggler rounded-0" type="button" data-toggle="collapse" data-target="#navigation"> | ||
<span class="navbar-toggler-icon"></span> | ||
</button> | ||
|
||
{{"<!-- responsive nav button -->" | safeHTML}} | ||
<button class="navbar-toggler navbar-dark" type="button" data-toggle="collapse" | ||
data-target="#navigation" aria-controls="navigation" aria-expanded="false" | ||
aria-label="Toggle navigation"> | ||
<span class="navbar-toggler-icon"></span> | ||
</button> | ||
{{"<!-- /responsive nav button -->" | safeHTML}} | ||
<div class="collapse navbar-collapse" id="navigation"> | ||
<ul class="navbar-nav ml-auto"> | ||
<li class="nav-item"><a class="nav-link" href="#body">{{ .Site.Params.home }}</a></li> | ||
{{ if .IsHome }} | ||
{{ range .Site.Menus.main }} | ||
<li class="nav-item"><a class="nav-link" href="#{{ .URL }}">{{ .Name }}</a></li> | ||
{{ end }} | ||
|
||
{{"<!-- main nav -->" | safeHTML}} | ||
{{ if .IsHome }} | ||
<div class="collapse navbar-collapse" id="navigation"> | ||
<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="navigation"> | ||
<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}} | ||
{{ else }} | ||
|
||
|
||
<!-- 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.Permalink }}" selected>{{ .LanguageName }} | ||
</option> | ||
{{ else }} | ||
<option id="{{ $translation.Language }}" value="{{ $translation.Permalink }}">{{ .LanguageName }}</option> | ||
{{ end }} | ||
{{ end }} | ||
{{ end }} | ||
{{ end }} | ||
</select> | ||
{{ end }} | ||
{{ range .Site.Menus.main }} | ||
<li class="nav-item"><a class="nav-link" href="{{ $.Site.BaseURL | relLangURL }}#{{ .URL }}">{{ .Name }}</a> | ||
</li> | ||
{{ end }} | ||
{{ end }} | ||
</ul> | ||
<!-- 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.Permalink }}" selected>{{ .LanguageName }} | ||
</option> | ||
{{ else }} | ||
<option id="{{ $translation.Language }}" value="{{ $translation.Permalink }}">{{ .LanguageName }}</option> | ||
{{ end }} | ||
{{ end }} | ||
{{ end }} | ||
{{ end }} | ||
</select> | ||
{{ end }} | ||
</div> | ||
</nav> | ||
</div> | ||
</nav> | ||
{{"<!-- End Fixed Navigation -->" | safeHTML}} | ||
</section> |
Oops, something went wrong.