You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
ozgurkon-theme-hugo/layouts/partials/header.html

52 lines
1.6 KiB

<header>
<div class="top-content">
<div class="logo">
<a href="{{"/" | relLangURL}}">
<img src="{{ .Site.Params.logos.header }}" alt="logo {{ .Site.Title }}">
</a>
</div>
<input type="checkbox" id="menu-burger" class="visually-hidden" aria-label="Menu"/>
<label for="menu-burger">
{{ partial "icon.html" "menu" }}
{{ partial "icon.html" "close" }}
</label>
<nav>
<ul class="menu">
{{- $currentPage := . -}}
{{ range .Site.Menus.main }}
<li class="{{ if $currentPage.IsMenuCurrent "main" . }}active{{ end }}" >
{{ if (hasPrefix .URL "http") }}
<a class="external" rel="noreferrer" target="_blank" href="{{ .URL }}" title="{{ .Name }}">{{ .Name }}</a>
{{ else if (isset .Page.Params "icon") }}
<a href="{{ .URL | relLangURL }}" class="link-icon" title="{{ .Name }}">
{{ partial "icon.html" .Page.Params.icon }}
</a>
{{ else }}
<a href="{{ .URL | relLangURL }}">{{ .Name }}</a>
{{ end }}
</li>
{{ end }}
</ul>
<ul class="languages">
{{ range .Translations }}
<li>
<a class="lang lang-{{ .Language.LanguageName }} {{ if eq .Language $.Site.Home.Language }}active{{ end }}"
title="{{ .Language.LanguageName }}"
href="{{ .RelPermalink }}"
role="radio"
aria-label="{{ i18n "language_switch" }} {{ .Language.LanguageName }}"
aria-checked="{{ if eq .Language $.Site.Home.Language }}true{{ else }}false{{ end }}">
{{- i18n "language_switch" }} {{ .Language.LanguageName -}}
</a>
</li>
{{ end }}
</ul>
</nav>
</div>
</header>