joinpeertube/themes/hugo-bootstrap-premium/layouts/partials/base/header.html
2018-02-28 16:33:36 +01:00

59 lines
2.6 KiB
HTML

<header id="main-header">
<nav class="navbar navbar-default">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
{{ if and ( ne .Site.Title "" ) ( eq .Site.Params.BrandImage "" )}}
<a class="navbar-brand" href="{{ .Site.BaseURL | relLangURL}}">
{{ .Site.Title }}
{{ end }}
{{ if ( ne .Site.Params.BrandImage "" ) }}
<a class="navbar-brand-img" href="{{ .Site.BaseURL | relLangURL}}">
<img alt="{{ .Site.Params.brand }}" src="{{ .Site.Params.BrandImage }}">
{{ end }}
</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav navbar-right">
{{ $currentNode := . }}
{{ range .Site.Menus.main }}
<li class="{{if $currentNode.IsMenuCurrent "main" . }}active{{end}}">
<a href="{{ .URL | absLangURL }}" {{ if and ( isset . "Name" ) ( ne .Name "" ) }} title="{{ .Name }}"{{ end }}>
{{ .Pre }}
{{ .Name }}
</a>
</li>
{{ end }}
<!-- switch language -->
{{ if eq .Site.Params.switchlang true }}
<li>
<div class="btn-group pull-right">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" title="Changer la langue">
<i class="fa fa-lg fa-language" aria-hidden="true"></i> {{ i18n "langue" }} <span class="caret"></span>
</button>
<ul class="dropdown-menu">
{{ $currentNode := . }}
{{ range .Site.Menus.switchlang }}
<li class="{{if $currentNode.IsMenuCurrent "main" . }}active{{end}}">
<a href="javascript:changeLanguage('{{ .URL | markdownify }}');" {{ if and ( isset . "Name" ) ( ne .Name "" ) }} title="{{ .Name }}"{{ end }}>
{{ .Pre }}
{{ .Name }}
</a>
</li>
{{ end }}
</ul>
</div>
</li>
{{ end }}
</ul>
</div>
<!--/.nav-collapse -->
</div>
</nav>
</header>