Add main menu, basic layout

This commit is contained in:
Basti 2022-05-27 12:49:18 +02:00
parent 1e728d56e6
commit f65aadc03c
Signed by untrusted user: basti
GPG Key ID: 9F88009D31D99C72
11 changed files with 315 additions and 23 deletions

View File

@ -1,5 +0,0 @@
theme = "kosmos-22"
baseURL = 'https://kosmos.org/'
languageCode = 'en-us'
title = 'Kosmos'
disableKinds = ["taxonomy", "term", "RSS", "sitemap", "robotsTXT"]

14
config.yaml Normal file
View File

@ -0,0 +1,14 @@
theme: kosmos-22
baseURL: https://kosmos.org/
languageCode: en-us
title: Kosmos
disableKinds:
- taxonomy
- term
- RSS
- sitemap
- robotsTXT
markup:
goldmark:
renderer:
unsafe: true # Allow HTML in md files

View File

@ -1,5 +1,10 @@
---
title: Contact Us
menu:
main:
identifier: contact
name: Contact
weight: 20
---
Contact us.
Contact content

View File

@ -1,5 +1,10 @@
---
title: Kosmos Infrastructure Foundation
menu:
main:
identifier: foundation
name: Foundation
weight: 10
---
Foundation content

View File

@ -1,11 +1,15 @@
module.exports = {
content: [
"./content/**/*.{html,js}",
"./content/**/*.{md,html}",
"./layouts/**/*.{html,js}",
"./themes/**/*.{html,js}"
],
theme: {
extend: {},
extend: {
fontFamily: {
sans: ['Open Sans', 'sans-serif']
}
},
},
plugins: [],
}

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>

View File

@ -42,7 +42,7 @@ html {
-o-tab-size: 4;
tab-size: 4;
/* 3 */
font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
font-family: Open Sans, sans-serif;
/* 4 */
}
@ -468,10 +468,250 @@ Ensure the default browser behavior of the `hidden` attribute.
--tw-backdrop-sepia: ;
}
.mx-auto {
margin-left: auto;
margin-right: auto;
}
.ml-10 {
margin-left: 2.5rem;
}
.ml-20 {
margin-left: 5rem;
}
.-mt-8 {
margin-top: -2rem;
}
.-mt-10 {
margin-top: -2.5rem;
}
.-mt-12 {
margin-top: -3rem;
}
.mb-8 {
margin-bottom: 2rem;
}
.block {
display: block;
}
.flex {
display: flex;
}
.hidden {
display: none;
}
.h-16 {
height: 4rem;
}
.h-20 {
height: 5rem;
}
.h-28 {
height: 7rem;
}
.h-32 {
height: 8rem;
}
.h-48 {
height: 12rem;
}
.h-40 {
height: 10rem;
}
.h-36 {
height: 9rem;
}
.w-full {
width: 100%;
}
.max-w-5xl {
max-width: 64rem;
}
.list-none {
list-style-type: none;
}
.items-center {
align-items: center;
}
.items-baseline {
align-items: baseline;
}
.justify-between {
justify-content: space-between;
}
.space-x-4 > :not([hidden]) ~ :not([hidden]) {
--tw-space-x-reverse: 0;
margin-right: calc(1rem * var(--tw-space-x-reverse));
margin-left: calc(1rem * calc(1 - var(--tw-space-x-reverse)));
}
.space-x-6 > :not([hidden]) ~ :not([hidden]) {
--tw-space-x-reverse: 0;
margin-right: calc(1.5rem * var(--tw-space-x-reverse));
margin-left: calc(1.5rem * calc(1 - var(--tw-space-x-reverse)));
}
.space-x-8 > :not([hidden]) ~ :not([hidden]) {
--tw-space-x-reverse: 0;
margin-right: calc(2rem * var(--tw-space-x-reverse));
margin-left: calc(2rem * calc(1 - var(--tw-space-x-reverse)));
}
.border-b-4 {
border-bottom-width: 4px;
}
.border-b-2 {
border-bottom-width: 2px;
}
.border-teal-500 {
--tw-border-opacity: 1;
border-color: rgb(20 184 166 / var(--tw-border-opacity));
}
.border-emerald-500 {
--tw-border-opacity: 1;
border-color: rgb(16 185 129 / var(--tw-border-opacity));
}
.bg-teal-50 {
--tw-bg-opacity: 1;
background-color: rgb(240 253 250 / var(--tw-bg-opacity));
}
.bg-slate-200 {
--tw-bg-opacity: 1;
background-color: rgb(226 232 240 / var(--tw-bg-opacity));
}
.bg-white {
--tw-bg-opacity: 1;
background-color: rgb(255 255 255 / var(--tw-bg-opacity));
}
.bg-\[url\(\'\/img\/lagoon-close-02\.jpg\'\)\] {
background-image: url('/img/lagoon-close-02.jpg');
}
.bg-cover {
background-size: cover;
}
.bg-center {
background-position: center;
}
.bg-top {
background-position: top;
}
.bg-\[center_top_20rem\] {
background-position: center top 20rem;
}
.bg-\[center_top_10rem\] {
background-position: center top 10rem;
}
.bg-\[center_bottom_10rem\] {
background-position: center bottom 10rem;
}
.bg-\[center_top_50rem\] {
background-position: center top 50rem;
}
.bg-\[center_top_40rem\] {
background-position: center top 40rem;
}
.bg-\[center_top_30rem\] {
background-position: center top 30rem;
}
.py-4 {
padding-top: 1rem;
padding-bottom: 1rem;
}
.px-4 {
padding-left: 1rem;
padding-right: 1rem;
}
.py-10 {
padding-top: 2.5rem;
padding-bottom: 2.5rem;
}
.py-8 {
padding-top: 2rem;
padding-bottom: 2rem;
}
.px-8 {
padding-left: 2rem;
padding-right: 2rem;
}
.text-left {
text-align: left;
}
.text-center {
text-align: center;
}
.text-2xl {
font-size: 1.5rem;
line-height: 2rem;
}
.text-4xl {
font-size: 2.25rem;
line-height: 2.5rem;
}
.font-bold {
font-weight: 700;
}
.uppercase {
text-transform: uppercase;
}
@media (min-width: 640px) {
.sm\:px-0 {
padding-left: 0px;
padding-right: 0px;
}
}
@media (min-width: 768px) {
.md\:block {
display: block;
}
}