Skip to content

Commit edc85be

Browse files
committed
hugo: inline top-nav partial
Signed-off-by: David Karlsson <[email protected]>
1 parent f530a68 commit edc85be

File tree

2 files changed

+9
-12
lines changed

2 files changed

+9
-12
lines changed

layouts/partials/header.html

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,15 @@
1616
</div>
1717
</a>
1818
</div>
19-
{{ partial "top-nav.html" . }}
19+
<nav>
20+
<ul class="mt-1 box-content hidden gap-4 md:flex">
21+
{{ range site.Menus.main }}
22+
<li {{- if or (eq page .Page) (page.IsDescendant .Page) }} class="border-b-4" {{- end }}>
23+
<a class="block px-2 py-1" href="{{ .URL }}">{{ .Name }}</a>
24+
</li>
25+
{{ end }}
26+
</ul>
27+
</nav>
2028
</div>
2129
<div class="flex items-center gap-6">
2230
{{ partialCached "search.html" "-" }}

layouts/partials/top-nav.html

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)