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

github.com/jpescador/hugo-future-imperfect.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials/navbar.html')
-rw-r--r--layouts/partials/navbar.html73
1 files changed, 38 insertions, 35 deletions
diff --git a/layouts/partials/navbar.html b/layouts/partials/navbar.html
index 63fe851..10129aa 100644
--- a/layouts/partials/navbar.html
+++ b/layouts/partials/navbar.html
@@ -1,41 +1,44 @@
<!-- Header -->
<header id="header">
- {{ if .IsHome }}
- <h1><a href="/">{{ .Site.Params.navbarTitle }}</a></h1>
- {{ else }}
- <h1><a href="/">{{ .Section }}</a></h1>
- {{ end }}
- <nav class="links">
- <ul>
- {{ range .Site.Menus.main }}
- <li>
- <a href="{{ .URL }}">
- <i class="{{ .Identifier }}">&nbsp;</i>{{ .Name }}
- </a>
- </li>
- {{ end }}
- </ul>
- </nav>
- <nav class="main">
- <ul>
- {{ if $.Scratch.Get "shareNav" }}
- <li id="share-nav" class="share-menu" style="display:none;">
- <a class="fa-share-alt" href="#share-menu">Share</a>
- </li>
- {{ end }}
- <li class="search">
- <a class="fa-search" href="#search">Search</a>
- <form id="search" method="get" action="//google.com/search">
- <input type="text" name="q" placeholder="Search" />
- <input type="hidden" name="as_sitesearch" value="{{ .Site.BaseURL }}">
- </form>
- </li>
- <li class="menu">
- <a class="fa-bars" href="#menu">Menu</a>
- </li>
- </ul>
- </nav>
+ {{ if .IsHome }}
+ <h1><a href="/">{{ .Site.Params.navbarTitle }}</a></h1>
+ {{ else if ne .Section "" }}
+ <h1><a href="/">{{ .Section }}</a></h1>
+ {{ else }}
+ <h1><a href="/">{{ .Title }}</a></h1>
+ {{ end }}
+
+ <nav class="links">
+ <ul>
+ {{ range .Site.Menus.main }}
+ <li>
+ <a href="{{ .URL }}">
+ <i class="{{ .Identifier }}">&nbsp;</i>{{ .Name }}
+ </a>
+ </li>
+ {{ end }}
+ </ul>
+ </nav>
+ <nav class="main">
+ <ul>
+ {{ if $.Scratch.Get "shareNav" }}
+ <li id="share-nav" class="share-menu" style="display:none;">
+ <a class="fa-share-alt" href="#share-menu">Share</a>
+ </li>
+ {{ end }}
+ <li class="search">
+ <a class="fa-search" href="#search">Search</a>
+ <form id="search" method="get" action="//google.com/search">
+ <input type="text" name="q" placeholder="Search" />
+ <input type="hidden" name="as_sitesearch" value="{{ .Site.BaseURL }}">
+ </form>
+ </li>
+ <li class="menu">
+ <a class="fa-bars" href="#menu">Menu</a>
+ </li>
+ </ul>
+ </nav>
</header>
<!-- Menu -->