Restructured parts of the website

This commit is contained in:
Chris Josten 2020-06-24 17:40:20 +02:00
parent 1ffb19f811
commit 99f493dec3
11 changed files with 62 additions and 29 deletions

View file

@ -7,11 +7,24 @@
min-width: calc(100% - 2px - 4em); min-width: calc(100% - 2px - 4em);
} }
body > nav { body > section.header-navigation, body > footer {
width: 100%; width: 100%;
flex-grow: 1 !important; flex-grow: 1 !important;
} }
.hide-small {
display: none;
} }
.hide-big {
display: block !important;
}
}
.hide-big {
display: none;
}
:root { :root {
font-family: "sans-serif"; font-family: "sans-serif";
--colour-bg: #f0f0f0; --colour-bg: #f0f0f0;
@ -40,17 +53,23 @@ body {
color: var(--colour-fg); color: var(--colour-fg);
} }
body > nav { body > section.header-navigation {
flex: 0 0 160px; flex: 0 0 200px;
padding: 2em; padding: 2em;
} }
body > nav > header { body > footer {
flex: 0 0 200px;
padding: 2em;
border: none;
}
body > section.header-navigation > header {
text-align: center; text-align: center;
} }
body > nav > header > img { body > section.header-navigation > header > img {
width: 100%; width: 100%;
max-width: 160px; max-width: 160px;
} }

4
source/constants.d Normal file
View file

@ -0,0 +1,4 @@
class Constants {
public static immutable string SITE_NAME = "Chris Netsoj.nl";
public static immutable string COPYRIGHT = "© Chris Josten, 2020";
}

View file

@ -4,7 +4,6 @@ block header
title Posts - Netsoj.nl title Posts - Netsoj.nl
block sidebar block sidebar
include /parts/menu.dt
block content block content
header header

View file

@ -1,9 +1,11 @@
extends /parts/page extends /parts/page
block header block header
title #{content.title} - Netsoj.nl title #{content.title} - Chris Netsoj.nl
meta(name="og:title", content="#{content.title}")
meta(name="og:type", content="article")
meta(name="og:article", content="article")
block sidebar block sidebar
include /parts/menu.dt
block content block content
article article

View file

@ -4,7 +4,6 @@ block header
title #{error.message} - Netsoj.nl title #{error.message} - Netsoj.nl
block sidebar block sidebar
include /parts/menu.dt
block content block content
header header

View file

@ -1,10 +1,9 @@
extends /parts/page.dt extends /parts/page.dt
block header block header
title #{content.title} - Netsoj.nl title #{content.title} - Chris Netsoj.nl
block sidebar block sidebar
include /parts/menu.dt
block content block content
header header

View file

@ -1,10 +1,9 @@
extends /parts/page.dt extends /parts/page.dt
block header block header
title Projects - Netsoj.nl title Projects - Chris Netsoj.nl
block sidebar block sidebar
include /parts/menu.dt
block content block content
header header

View file

@ -3,7 +3,6 @@ block header
title #{content.title} - Netsoj.nl title #{content.title} - Netsoj.nl
block sidebar block sidebar
include /parts/menu.dt
block content block content
section section

5
views/parts/footer.dt Normal file
View file

@ -0,0 +1,5 @@
p
small
| © Chris Josten, 2020. If not specified otherwise, all content on this
| website is <a rel="license" href="https://creativecommons.org/licenses/by/4.0/">
| licensed under the CC-BY 4.0</a>.

View file

@ -1,14 +1 @@
- void menuItem(string text, string link)
li
a(href="#{link}") #{text}
header
img.logo(src="/static/img/logo.png", alt="The logo of the website: the letter C drawn in an inprofessional manner with wobbley eyes on top")
p Chris's webstekkie
ul
- menuItem("home", "/");
- menuItem("posts", "/posts/");
- menuItem("projects", "/projects/");
footer
p &copy;Chris Josten, 2020

View file

@ -1,5 +1,6 @@
doctype html doctype html
html html(prefix="og: http://ogp.me/ns#")
- import constants;
head head
meta(name="viewport", content="width=device-width; initial-scale=1") meta(name="viewport", content="width=device-width; initial-scale=1")
link(rel="stylesheet", href="/static/style/base.css") link(rel="stylesheet", href="/static/style/base.css")
@ -7,10 +8,30 @@ html
link(rel="alternate stylesheet", href="/static/style/old.css", title="1999") link(rel="alternate stylesheet", href="/static/style/old.css", title="1999")
link(rel="shortcut icon", href="/static/img/logo.png") link(rel="shortcut icon", href="/static/img/logo.png")
meta(name="theme-color", content="#7f0602") meta(name="theme-color", content="#7f0602")
meta(name="og:site_name", content="#{Constants.SITE_NAME}")
block header block header
body body
- void menuItem(string text, string link)
li
a(href="#{link}") #{text}
section.header-navigation
header
img.logo(src="/static/img/logo.png", alt="The logo of the website: the letter C drawn in an unprofessional manner with wobbly eyes on put on top")
p Chris's webstekkie
nav nav
ul
- menuItem("home", "/");
- menuItem("posts", "/posts/");
- menuItem("projects", "/projects/");
block sidebar block sidebar
footer.hide-small
block footer
include /parts/footer.dt
main main
block content block content
footer.hide-big
block footer
include /parts/footer.dt