Hugo go go go

Made a hugo setup from scratch to generate a static blog and portfolio webpage.
The old stuff may still be found in static/old.
This commit is contained in:
2022-03-29 22:52:36 +00:00
parent 1e418219e9
commit d64efb5fb4
60 changed files with 658 additions and 33 deletions

34
layouts/partials/nav.html Normal file
View File

@@ -0,0 +1,34 @@
<nav id="navbar">
<ul class="top-nav">
<li class=""><a href="/">{{ site.Title }}</a></li>
{{ partial "i18n/nav.html" . }}
<div class="link-group">
{{ $currentPage := . }}
{{ range .Site.Menus.main }}
{{ if .HasChildren }}
<li class='{{ if $currentPage.HasMenuCurrent "main" . }}active{{ end }}'>
<a href='#'>{{ .Pre }}<span>{{ .Name }}</span></a>
</li>
<ul class='sub-menu'>
{{ range .Children }}
<li class='{{ if $currentPage.IsMenuCurrent "main" . }}active{{ end }}'>
<a href='{{ .URL }}'>{{ .Name }}</a>
</li>
{{ end }}
</ul>
{{ else }}
<li>
<a href='{{ .URL }}'>
{{ .Pre }}
<span>{{ .Name }}</span>
</a>
</li>
{{ end }}
{{ end }}
<!-- <li class="top-nav__link"><a href="#">
<img class="icons" src="/search-icon.svg">
</a>
</li> -->
</div>
</ul>
</nav>