2022-09-06 00:17:17 +00:00
|
|
|
{{ if .Site.Params.showMenu | default true }}
|
2018-06-11 23:39:40 +00:00
|
|
|
<!-- Begin Nav bar -->
|
|
|
|
<div class="container">
|
2018-06-27 08:58:30 +00:00
|
|
|
<hr>
|
2018-07-10 07:23:19 +00:00
|
|
|
<nav class="navbar" role="navigation" aria-label="main navigation">
|
2018-06-27 08:58:30 +00:00
|
|
|
{{ $isHome := .Page.IsHome }}
|
2018-07-10 07:23:19 +00:00
|
|
|
<a role="button" class="navbar-burger" data-target="navMenu" aria-label="menu" aria-expanded="false" >
|
|
|
|
<span aria-hidden="true"></span>
|
|
|
|
<span aria-hidden="true"></span>
|
|
|
|
<span aria-hidden="true"></span>
|
|
|
|
</a>
|
2018-10-29 17:44:11 +00:00
|
|
|
<div class="navbar-menu {{ if $isHome }}has-content-centered{{ end }}" id="navMenu">
|
2018-07-01 16:09:14 +00:00
|
|
|
<!-- look for custom menu and include it -->
|
|
|
|
{{ if .Site.Menus.main }}
|
|
|
|
{{ range .Site.Menus.main }}
|
|
|
|
{{ if .HasChildren }}
|
2018-07-10 07:23:19 +00:00
|
|
|
<a class="navbar-item" href="{{ .URL }}">
|
2018-07-01 16:09:14 +00:00
|
|
|
{{ .Pre }}
|
|
|
|
{{ .Name }}
|
|
|
|
{{ .Post }}
|
|
|
|
</a>
|
|
|
|
{{ range .Children }}
|
|
|
|
<!-- TODO: style children diffrent then parents-->
|
2018-07-10 07:23:19 +00:00
|
|
|
<a class="navbar-item" href="{{ .URL }}">
|
2018-07-01 16:09:14 +00:00
|
|
|
{{ .Pre }}
|
|
|
|
{{ .Name }}
|
|
|
|
{{ .Post }}
|
|
|
|
</a>
|
|
|
|
{{ end }}
|
|
|
|
{{ else }}
|
2018-07-10 07:23:19 +00:00
|
|
|
<a class="navbar-item" href="{{ .URL }}">
|
2018-07-01 16:09:14 +00:00
|
|
|
{{ .Pre }}
|
|
|
|
{{ .Name }}
|
|
|
|
{{ .Post }}
|
|
|
|
</a>
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
{{ else }}
|
|
|
|
<!-- use default menu -->
|
2018-06-27 08:58:30 +00:00
|
|
|
{{ if not $isHome }}
|
2019-08-07 09:37:06 +00:00
|
|
|
<a class="navbar-item" href="{{ "" | relLangURL }}">{{ i18n "nav_main" . }}</a>
|
2018-06-27 08:58:30 +00:00
|
|
|
{{ end }}
|
2018-07-18 15:47:54 +00:00
|
|
|
|
2018-07-23 04:00:30 +00:00
|
|
|
{{ with .Site.GetPage "/home" }}
|
2019-04-11 08:45:43 +00:00
|
|
|
{{ $pages := .Resources.ByType "page" }}
|
|
|
|
|
|
|
|
{{ with .Site.GetPage "/blog" }}
|
|
|
|
{{ $pages = $pages | append . }}
|
2018-07-18 15:47:54 +00:00
|
|
|
{{ end }}
|
2018-06-11 23:39:40 +00:00
|
|
|
|
2018-07-23 04:00:30 +00:00
|
|
|
{{ with .Site.GetPage "/projects" }}
|
2019-04-11 08:45:43 +00:00
|
|
|
{{ $pages = $pages | append . }}
|
2018-06-27 08:58:30 +00:00
|
|
|
{{ end }}
|
2018-06-11 23:39:40 +00:00
|
|
|
|
2019-04-11 08:45:43 +00:00
|
|
|
{{ range sort $pages "Params.weight" }}
|
|
|
|
{{ if ne .Name "contact.md" }}
|
2019-05-29 15:28:58 +00:00
|
|
|
{{ if eq (os.Stat .File.Dir).Name "projects" }}
|
2019-04-11 08:45:43 +00:00
|
|
|
<!-- Now for some cool projects -->
|
2019-04-18 07:10:42 +00:00
|
|
|
{{ if $isHome }}
|
2020-05-31 18:12:41 +00:00
|
|
|
<a class="navbar-item" href="{{ printf "#%s" ( .Title | urlize) | relLangURL }}">{{ .Title | markdownify }}</a>
|
2019-04-18 07:10:42 +00:00
|
|
|
{{ else }}
|
2020-11-24 10:38:30 +00:00
|
|
|
{{ $pageIsInProjects := eq $.Page.Section "projects"}}
|
2019-04-18 07:10:42 +00:00
|
|
|
{{ if not (and $pageIsInProjects (eq $.Page.Kind "section")) }}
|
|
|
|
<a class="navbar-item" href="{{ .Permalink }}">
|
|
|
|
{{ if $pageIsInProjects }}
|
|
|
|
{{ i18n "nav_backToSection" . }}
|
|
|
|
{{ else }}
|
2020-08-15 20:03:38 +00:00
|
|
|
<!-- fix-224 -->
|
|
|
|
{{ .Title }}
|
|
|
|
<!-- end fix-224 -->
|
2019-04-18 07:10:42 +00:00
|
|
|
{{ end }}
|
|
|
|
</a>
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
2019-05-29 15:28:58 +00:00
|
|
|
{{ else if eq (os.Stat .File.Dir).Name "blog" }}
|
2019-04-11 08:45:43 +00:00
|
|
|
<!-- Let`s show some blog posts -->
|
2019-04-18 07:10:42 +00:00
|
|
|
{{ if $isHome }}
|
2020-05-31 18:12:41 +00:00
|
|
|
<a class="navbar-item" href="{{ printf "#%s" ( .Title | urlize) | relLangURL }}">{{ .Title | markdownify }}</a>
|
2019-04-18 07:10:42 +00:00
|
|
|
{{ else }}
|
|
|
|
{{ $pageIsInBlog := eq $.Page.Section "blog"}}
|
|
|
|
{{ if not (and $pageIsInBlog (eq $.Page.Kind "section")) }}
|
|
|
|
<a class="navbar-item" href="{{ .Permalink }}">
|
|
|
|
{{ if $pageIsInBlog }}
|
|
|
|
{{ i18n "nav_backToSection" . }}
|
|
|
|
{{ else }}
|
|
|
|
{{ .Title | singularize}}
|
|
|
|
{{ end }}
|
|
|
|
</a>
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
2018-06-27 08:58:30 +00:00
|
|
|
{{ else }}
|
2020-05-31 18:12:41 +00:00
|
|
|
<a class="navbar-item" href="{{ if $isHome }}#{{ .File.TranslationBaseName }}{{ else }}{{ printf "#%s" (.File.TranslationBaseName | urlize) | relLangURL }}{{ end }}">{{ .Title | markdownify }}</a>
|
2019-04-11 08:45:43 +00:00
|
|
|
{{ end }}
|
2018-06-27 08:58:30 +00:00
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
2018-06-11 23:39:40 +00:00
|
|
|
|
2018-07-23 04:00:30 +00:00
|
|
|
{{ with .Site.GetPage "/home" }}
|
2018-07-18 15:47:54 +00:00
|
|
|
{{ with .Resources.GetMatch "contact.md" }}
|
2020-05-31 18:12:41 +00:00
|
|
|
<a class="navbar-item" href="{{ if $isHome }}#{{ .File.TranslationBaseName }}{{ else }}{{ printf "#%s" (.File.TranslationBaseName | urlize) | relLangURL }}{{ end }}">{{ .Title | markdownify }}</a>
|
2018-06-27 08:58:30 +00:00
|
|
|
{{ end }}
|
2018-07-18 15:47:54 +00:00
|
|
|
{{ end }}
|
2018-06-27 00:10:46 +00:00
|
|
|
|
2018-06-27 08:58:30 +00:00
|
|
|
{{ range $.Site.Home.AllTranslations.ByWeight }}
|
2018-07-26 21:03:06 +00:00
|
|
|
{{ if ne .Language.LanguageName $.Language.LanguageName }}
|
|
|
|
<a class="navbar-item" href="{{ .Permalink }}">{{ .Language.LanguageName }}</a>
|
2018-07-06 12:10:50 +00:00
|
|
|
{{ end }}
|
2018-06-27 08:58:30 +00:00
|
|
|
{{ end }}
|
2018-06-11 23:39:40 +00:00
|
|
|
|
2018-07-26 21:03:06 +00:00
|
|
|
{{ if and .Site.Params.showRSSButton .Site.RSSLink }}
|
2018-07-12 10:15:25 +00:00
|
|
|
<a class="navbar-item" href="{{ .Site.RSSLink }}"><i class="fas fa-rss"></i></a>
|
2018-06-27 08:58:30 +00:00
|
|
|
{{ end }}
|
2018-07-01 16:09:14 +00:00
|
|
|
{{ end }}
|
2018-06-27 08:58:30 +00:00
|
|
|
</div>
|
|
|
|
</nav>
|
|
|
|
<hr>
|
2018-06-11 23:39:40 +00:00
|
|
|
</div>
|
|
|
|
<!-- End Nav bar -->
|
2022-09-06 00:17:17 +00:00
|
|
|
{{ end }}
|