Add main navigation
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Luca 2020-11-23 02:56:53 +01:00
parent 5209d26259
commit 2f369996cd
7 changed files with 99 additions and 11 deletions

2
assets/colors.scss Normal file
View File

@ -0,0 +1,2 @@
$background: #100e23;
$text-color: #ffffff;

9
assets/fonts.scss Normal file
View File

@ -0,0 +1,9 @@
@font-face {
font-family: Montserrat;
src: url(Montserrat/Montserrat-Regular.ttf);
}
@font-face {
font-family: Orbitron;
src: url(Orbitron-VariableFont_wght.ttf);
}

View File

@ -1,26 +1,75 @@
@font-face {
font-family: Montserrat;
src: url(Montserrat/Montserrat-Regular.ttf);
}
@font-face {
font-family: Orbitron;
src: url(Orbitron-VariableFont_wght.ttf);
}
@import 'fonts';
@import 'colors';
* {
font-family: Montserrat, sans-serif;
color: $text-color;
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
background: #000;
background: $background;
}
header {
margin-bottom: 1em;
}
main {
max-width: 1200px;
margin: auto;
}
h1, h2, h3, h4, h5, h6 {
font-family: Orbitron, sans-serif;
font-weight: 900;
text-transform: uppercase;
}
h1 {
border-bottom: 2px $text-color solid;
margin-bottom: 0.5em;
}
a {
text-decoration: none;
}
.nav {
max-width: 1200px;
margin: 0 auto;
padding: 0.25em 0;
display: flex;
flex-direction: column;
justify-content: space-between;
@media screen and (min-width: 800px) {
flex-direction: row;
}
.nav-logo {
margin: 0 auto;
@media screen and (min-width: 800px) {
margin-left: 0;
}
img {
width: 48px;
}
}
.nav-link {
align-self: center;
padding: 0.5em;
&.nav-link-active {
}
}
}
#no-content {

View File

@ -2,4 +2,17 @@ baseURL = "https://www.franconian.net/"
languageCode = "de"
title = "franconian"
[[menu.main]]
name = "Hackspaces"
url = "#hackspaces"
weight = 1
[[menu.main]]
name = "Programm"
url = "/programm/"
weight = 2
[taxonomies]
[markup.goldmark.renderer]
unsafe = true

5
content/_index.md Normal file
View File

@ -0,0 +1,5 @@
---
title: franconian
---
<img id="no-content" src="https://http.cat/204" alt="Picture of two cats in front of an empty bowl; the caption reads &quot;204 No Content&quot;">

View File

@ -11,6 +11,15 @@
<link rel="stylesheet" href="{{ $style.RelPermalink }}">
</head>
<body>
<header>
<nav class="nav">
<a class="nav-logo" href="/"><img src="https://styleguide.rc3.world/Logo/Logo%20Set%203/SVG/Logo%20SD%20blue.svg" alt="Blue version of the rC3 logo"></a>
{{ $currentPage := . }}
{{ range .Site.Menus.main }}
<a class="nav-link{{ if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }} nav-link-active{{ end }}" href="{{ .URL }}">{{ .Name }}</a>
{{ end }}
</nav>
</header>
{{ block "main" . }}
{{ end }}
</body>

View File

@ -1,5 +1,6 @@
{{ define "main" }}
<main>
<img id="no-content" src="https://http.cat/204" alt="Picture of two cats in front of an empty bowl; the caption reads &quot;204 No Content&quot;">
<h1>{{ .Title }}</h1>
{{ .Content }}
</main>
{{ end }}