Add main menu, basic layout
This commit is contained in:
22
themes/kosmos-22/layouts/partials/topnav.html
Normal file
22
themes/kosmos-22/layouts/partials/topnav.html
Normal file
@@ -0,0 +1,22 @@
|
||||
<header class="max-w-5xl mx-auto px-8 text-left">
|
||||
<div class="flex items-center justify-between h-20">
|
||||
<div class="flex items-center">
|
||||
<div>
|
||||
<h1 class="uppercase font-bold">{{ .Site.Title }}</h1>
|
||||
</div>
|
||||
<nav class="hidden md:block">
|
||||
<ul class="ml-20 flex items-baseline space-x-8">
|
||||
{{ $currentPage := . }}
|
||||
{{ range .Site.Menus.main }}
|
||||
<li class="{{ if $currentPage.IsMenuCurrent "main" . }}border-b-2 border-teal-500{{ end }}">
|
||||
<a href="{{ .URL }}" class="font-bold">
|
||||
{{ .Pre }}
|
||||
<span>{{ .Name }}</span>
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
Reference in New Issue
Block a user