-
Notifications
You must be signed in to change notification settings - Fork 830
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding Github and version dropdown to the navigation bar
Check the preview for details.
- Loading branch information
1 parent
ba92be3
commit 7b6cf3b
Showing
1 changed file
with
38 additions
and
0 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{{ $cover := .HasShortcode "blocks/cover" }} | ||
<nav class="js-navbar-scroll navbar navbar-expand navbar-dark {{ if $cover}} td-navbar-cover {{ end }}flex-column flex-md-row td-navbar"> | ||
<a class="navbar-brand" href="{{ .Site.Home.RelPermalink }}"> | ||
{{ with resources.Get "icons/logo.svg" }}{{ ( . | minify).Content | safeHTML }} {{ end }}<span class="text-uppercase font-weight-bold">{{ .Site.Title }}</span> | ||
</a> | ||
<div class="td-navbar-nav-scroll ml-md-auto" id="main_navbar"> | ||
<ul class="navbar-nav mt-2 mt-lg-0"> | ||
{{ $p := . }} | ||
{{ range .Site.Menus.main }} | ||
<li class="nav-item mr-4 mb-2 mb-lg-0"> | ||
{{ $active := or ($p.IsMenuCurrent "main" .) ($p.HasMenuCurrent "main" .) }} | ||
{{ with .Page }} | ||
{{ $active = or $active ( $.IsDescendant .) }} | ||
{{ end }} | ||
<a class="nav-link{{if $active }} active{{end}}" href="{{ with .Page }}{{ .RelPermalink }}{{ else }}{{ .URL | relLangURL }}{{ end }}"><span{{if $active }} class="active"{{end}}>{{ .Name }}</span></a> | ||
</li> | ||
{{ end }} | ||
<li class="nav-item mr-4 mb-2 mb-lg-0"> | ||
<a class="nav-link" href="{{ .Site.Params.github_repo }}">Github</a> | ||
</li> | ||
<li class="nav-item dropdown d-none d-lg-block"> | ||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | ||
Release | ||
</a> | ||
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink"> | ||
<a class="dropdown-item" href="https://agones.dev">{{ .Site.Params.release_version }}</a> | ||
<a class="dropdown-item" href="https://development.agones.dev">Development</a> | ||
</div> | ||
</li> | ||
{{ if (gt (len .Site.Home.Translations) 0) }} | ||
<li class="nav-item dropdown d-none d-lg-block"> | ||
{{ partial "navbar-lang-selector.html" . }} | ||
</li> | ||
{{ end }} | ||
</ul> | ||
</div> | ||
<div class="navbar-nav d-none d-lg-block">{{ partial "search-input.html" . }}</div> | ||
</nav> |