The repo tracks work progress for ura.design website redesign
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.
 
 
 

55 lines
3.4 KiB

<div class="container-fluid">
<div class="container">
<nav class="navbar navbar-expand-lg justify-content-between align-items-center" aria-label="Primary">
<a class="navbar-brand" href="{{ .Site.BaseURL }}">
{{ $theme := .Page.Params.theme }}
{{ $type := .Page.Type }}
{{ $home := .IsHome }}
<img src="{{ if .IsHome }}/img/logo-white.svg{{ else if eq .Page.Type "about" }}/img/logo-white.svg{{ else if eq $theme "dark" }}/img/logo-white.svg{{ else if eq $theme "light" }}/img/logo-dark.svg{{ else }}/img/logo.svg{{ end }}" alt="Ura Design logo" {{ if .IsHome }}width="100px"{{ else }}width="100px"{{ end }}>
</a>
<button class="navbar-toggler" type="button" aria-label="Toggle navigation" onclick="openNav()">
<i class="fa-solid fa-grip-lines {{ if .IsHome }}text-white{{ else if eq $theme "dark" }}text-white{{ else if eq $theme "light" }}text-dark{{ else if eq $type "about" }}text-white{{ else }}color-blue-500{{ end }}"></i>
</button>
<div class="collapse navbar-collapse flex-grow-0">
<ul class="navbar-nav">
{{- $firstUrlElement := print "/" (index (split .RelPermalink "/") 1) "/" -}}
{{- range .Site.Menus.main -}}
<li class="nav-item ms-4">
<a class="nav-link {{ if eq $theme "dark" }}text-white{{ else if eq $theme "light" }}text-dark{{ else if $home }}text-white{{ else if eq $type "about" }}text-white{{ else }}{{ end }} {{ if eq ($firstUrlElement|lower) (.URL|lower) }}active{{end}}" {{ if eq
($firstUrlElement|lower) (.URL|lower) }}aria-current="page" {{end}} href="{{ .URL | absLangURL }}">{{ .Name }}</a>
</li>
{{ end }}
</ul>
</div>
</nav>
<div id="navbar-mobile" class="overlay d-block d-lg-none" {{ if .Params.background }}style="background-color: {{ .Params.background }};"{{ else }}{{ end }}>
<div class="container-fluid">
<div class="container">
<div class="navbar align-items-center justify-content-between">
<a class="brand" href="{{ .Site.BaseURL }}">
<img src="{{ if eq $theme "dark" }}/img/logo-white.svg{{ else if eq $theme "light" }}/img/logo-dark.svg{{ else }}/img/logo-white.svg{{ end }}" alt="Ura Design logo" width="100px">
</a>
<button type="button" class="closebtn" aria-label="Toggle navigation" onclick="closeNav()"><i class="fa-solid fa-xmark {{ if eq $theme "dark" }}text-white{{ else if eq $theme "light" }}text-dark{{ else }}{{ end }}"></i></button>
</div>
</div>
<div class="overlay-content">
<div class="container pt-4">
{{- $firstUrlElement := print "/" (index (split .RelPermalink "/") 1) "/" -}}
{{- range .Site.Menus.main -}}
<a class="{{ if eq $theme "dark" }}text-white{{ else if eq $theme "light" }}text-dark{{ else }}{{ end }} {{ if eq ($firstUrlElement|lower) (.URL|lower) }}active{{end}}" {{ if eq
($firstUrlElement|lower) (.URL|lower) }}aria-current="page" {{end}} href="{{ .URL | absLangURL }}">{{ .Name }}</a>
{{ end }}
</div>
</div>
</div>
</div>
</div>
<script>
function openNav() {
document.getElementById("navbar-mobile").style.height = "100%";
}
function closeNav() {
document.getElementById("navbar-mobile").style.height = "0%";
}
</script>