Add main menu, basic layout

This commit is contained in:
2022-05-27 12:49:18 +02:00
parent 1e728d56e6
commit f65aadc03c
11 changed files with 315 additions and 23 deletions

View File

@@ -6,8 +6,9 @@
<link href='https://assets.kosmos.org/fonts/open-sans/open-sans.css' rel='stylesheet'>
<link href="/css/main.css" rel="stylesheet" />
</head>
<body>
<main>
<body class="text-center">
{{ partial "topnav" . }}
<main class="text-left">
{{- block "main" . }}{{- end }}
</main>
<footer>

View File

@@ -0,0 +1,12 @@
{{ define "main" }}
<div class="w-full h-32 bg-[url('/img/lagoon-close-02.jpg')]
bg-[center_top_30rem] bg-cover">
</div>
<div class="max-w-5xl mx-auto -mt-12 py-8 px-8 text-left bg-white">
<header class="mb-8">
<h2 class="text-2xl font-bold">{{ .Title }}</h1>
</header>
<div class="content">
{{ .Content }}
</div>
{{ end }}

View File

@@ -1,6 +1,10 @@
{{ define "main" }}
<header>
<h2>{{ .Title }}</h1>
<div class="w-full h-32 bg-[url('/img/lagoon-close-02.jpg')]
bg-[center_top_30rem] bg-cover">
</div>
<div class="max-w-5xl mx-auto -mt-12 py-8 px-8 text-left bg-white">
<header class="mb-8">
<h2 class="text-2xl font-bold">{{ .Title }}</h1>
</header>
<div class="content">
{{ .Content }}

View File

@@ -1,10 +0,0 @@
{{ define "title" }}{{ .Title }} | KIF{{ end }}
{{ define "main" }}
<header>
<h2>{{ .Title }}</h1>
</header>
<div class="content">
{{ .Content }}
</div>
{{ end }}

View 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>