Files
pages/src/routes/+layout.svelte

361 lines
9.4 KiB
Svelte
Raw Normal View History

<script>
2025-04-03 21:38:34 +02:00
import Header from "$lib/header.svelte";
import Footer from "$lib/footer.svelte";
let { children } = $props();
</script>
2025-04-01 21:30:20 +02:00
<div class="waters"></div>
<div class="all-content-container">
<Header />
{@render children()}
<Footer />
</div>
2025-04-03 21:38:34 +02:00
<style>
2025-12-30 20:33:09 +00:00
/* #region Fonts */
2025-12-30 17:47:35 +00:00
/* Roboto Flex */
@font-face {
font-family: "Roboto Flex";
src: url("/fonts/roboto-flex/flex.ttf");
2025-12-30 17:47:35 +00:00
}
/* Space Mono */
@font-face {
font-family: "Space Mono";
src: url("/fonts/space-mono/regular.ttf");
2025-12-30 17:47:35 +00:00
}
@font-face {
font-family: "Space Mono";
src: url("/fonts/space-mono/italic.ttf");
2025-12-30 17:47:35 +00:00
font-style: italic;
}
@font-face {
font-family: "Space Mono";
src: url("/fonts/space-mono/bold.ttf");
2025-12-30 17:47:35 +00:00
font-weight: bold;
}
@font-face {
font-family: "Space Mono";
src: url("/fonts/space-mono/bolditalic.ttf");
2025-12-30 17:47:35 +00:00
font-style: italic;
font-weight: bold;
}
/* IBM Plex Mono */
@font-face {
font-family: "IBM Plex Mono";
src: url("/fonts/ibm-plex-mono/medium.ttf");
2025-12-30 17:47:35 +00:00
font-weight: 500;
}
2025-12-30 20:33:09 +00:00
/* #endregion */
2025-04-01 21:30:20 +02:00
2025-04-04 19:00:47 +02:00
:global {
2025-04-01 21:30:20 +02:00
:root {
2025-04-18 16:15:00 +02:00
--color-text: #d0d0d0;
2025-04-03 20:01:00 +02:00
--color-text-img: invert(98%) sepia(1%) saturate(4643%) hue-rotate(297deg) brightness(115%) contrast(76%);
2025-04-01 22:25:10 +02:00
--color-text-dark: #1e1e1e;
2025-12-30 20:33:09 +00:00
--color-highlight: #51B86B;
--color-header: color-mix(in srgb, var(--color-highlight) 80%, black);
--color-header-highlight: color-mix(in srgb, #6d1e26 80%, transparent);
2025-04-01 22:25:10 +02:00
2026-01-20 22:12:55 +01:00
--color-background: #111111;
2025-04-01 22:25:10 +02:00
--color-background-highlight: color-mix(in srgb, var(--color-highlight) 10%, transparent);
2025-04-03 20:01:00 +02:00
--color-background-highlight-hover: color-mix(in srgb, var(--color-highlight) 60%, transparent);
2025-04-01 22:25:10 +02:00
2026-01-20 22:12:55 +01:00
--color-waters: #242424;
2025-04-04 10:37:25 +02:00
--notch-size: 32px;
--notch-size-small: 16px;
--color-link-unvisited: #c2e8ff;
--color-link-visited: #ffd7f0;
--color-link-hovered: #ffdad5;
2025-04-04 19:00:47 +02:00
2025-12-30 17:47:35 +00:00
/* --font-title: 'Roboto Flex'; */
--font-sans-serif: 'Roboto Flex', 'Lato', sans-serif;
2025-04-18 16:15:00 +02:00
--font-mono: 'IBM Plex Mono', monospace;
2025-12-30 20:33:09 +00:00
--font-stylised: 'Space Mono', monospace;
2025-07-14 12:12:30 +02:00
--page-width: 1200px;
2025-12-30 19:10:43 +00:00
--content-width: 1000px;
--screen-width-mobile: 800px;
--margin-content-side: 24px;
2025-04-01 21:30:20 +02:00
}
2025-04-01 22:25:10 +02:00
html {
scroll-behavior: smooth;
position: relative;
min-height: 100%;
}
body {
2025-04-04 19:00:47 +02:00
font-family: var(--font-sans-serif);
font-size: 1.2rem;
2025-04-01 21:30:20 +02:00
color: var(--color-text); /* text colour */
2025-07-14 12:12:30 +02:00
margin: 0;
2025-04-01 21:30:20 +02:00
background-color: var(--color-background);
}
.all-content-container {
display: flex;
flex-direction: column;
2026-01-10 19:40:32 +01:00
height: 100vh;
/* max-width: 100%; */
}
2025-04-01 21:30:20 +02:00
.waters {
position: fixed;
z-index: -99;
top: 0;
left: 0;
height: 100%;
width: 100%;
background-color: var(--color-waters);
mask-image: url('/bremen-waters-white.svg');
2025-04-01 21:30:20 +02:00
mask-position: center;
background-position: center;
background-attachment: fixed;
}
p, span, li, pre, a {
color: var(--color-text);
font-size: 1.1rem;
line-height: 1.6rem;
2025-07-14 12:12:30 +02:00
font-weight: 400;
}
ul {
2025-04-27 19:24:41 +02:00
padding: 0;
}
li::before {
2025-04-27 19:24:41 +02:00
content: "";
font-weight: 900;
color: var(--color-highlight);
padding-right: 8px;
}
li {
2025-04-27 19:24:41 +02:00
display: flex;
padding-left: 0;
margin-top: 4px;
margin-bottom: 4px;
transition: background-color 0.2s ease-in-out;
padding: 2px 12px;
}
li a {
2025-04-27 19:24:41 +02:00
display: inline;
}
h1 {
2026-01-10 19:46:11 +01:00
font-size: 4.0rem;
line-height: 4.0rem;
}
h2 {
font-size: 2.5rem;
line-height: 2.5rem;
}
h2::before {
letter-spacing: -0.5rem;
content: ' ';
margin-right: 15px;
}
h3 {
font-size: 2.0rem;
line-height: 2.0rem;
}
h3::before {
letter-spacing: -0.3rem;
content: ' ';
margin-right: 10px;
}
h4, h5, h6 {
font-size: 1.7rem;
line-height: 1.7rem;
}
h4::before {
letter-spacing: -0.26rem;
content: ' ';
margin-right: 6px;
}
h1, h2, h3, h4, h5, h6 {
font-weight: 870;
font-family: var(--font-sans-serif);
color: var(--color-highlight);
margin-top: 12px;
margin-bottom: 8px;
width: fit-content;
}
h1, h2, h3, h4, h5, h6, .wide-font {
font-variation-settings:
"wdth" 151, /* width */
"XTRA" 560, /* counter width */
"YTUC" 662, /* uppercase height */
"YTAS" 700, /* ascender height */
"YOPQ" 69, /* thin stroke */
"YTFI" 788 /* figure height */
;
}
2025-04-04 10:37:25 +02:00
code, .code-block {
2025-04-04 19:00:47 +02:00
font-family: var(--font-mono);
2025-12-05 17:07:45 +00:00
font-size: 0.8em;
2025-04-18 16:15:00 +02:00
font-weight: 500;
background-color: var(--color-background-highlight);
/* color: var(--color-background); */
border-radius: 8px;
padding-left: 6px;
padding-right: 6px;
}
img, video {
width: 80%;
margin-left: auto;
margin-right: auto;
display: flex;
}
.horizontally-centre-aligned {
width: 80%;
display: flex;
justify-content: center;
align-items: center;
margin-left: auto;
margin-right: auto;
}
2025-04-27 19:24:41 +02:00
.inline-img-left {
float: left;
max-width: 24%;
margin: 0 24px 24px 0;
}
.inline-img-right {
float: right;
max-width: 24%;
margin: 0 0 24px 24px;
}
a:link {
color: var(--color-link-unvisited);
2025-08-16 21:40:51 +02:00
text-decoration-style: dashed;
}
/* visited link */
a:visited {
color: var(--color-link-visited);
}
/* mouse over link */
a:hover {
color: var(--color-link-hovered);
}
2025-04-04 10:37:25 +02:00
.notched {
clip-path: polygon(
0% var(--notch-size),
var(--notch-size) 0%,
calc(100% - var(--notch-size)) 0%,
100% var(--notch-size),
100% calc(100% - var(--notch-size)),
calc(100% - var(--notch-size)) 100%,
var(--notch-size) 100%,
0% calc(100% - var(--notch-size))
);
}
.notched-small {
clip-path: polygon(
0% var(--notch-size-small),
var(--notch-size-small) 0%,
calc(100% - var(--notch-size-small)) 0%,
100% var(--notch-size-small),
100% calc(100% - var(--notch-size-small)),
calc(100% - var(--notch-size-small)) 100%,
var(--notch-size-small) 100%,
0% calc(100% - var(--notch-size-small))
);
}
.project-subtitle {
color: var(--color-highlight);
font-weight: 700;
font-style: italic;
margin-top: 0;
font-family: var(--font-mono);
}
.project-banner-container {
position: relative;
width: 80%;
margin-left: auto;
margin-right: auto;
display: flex;
}
.project-banner {
margin: 0; /* reset left/right margins */
2025-08-16 21:40:51 +02:00
width: 100%;
}
.project-icon {
float: left;
margin: 16px 16px 16px 0;
width: 20%;
}
2025-08-10 20:39:54 +02:00
.project-date {
font-size: 1rem;
font-weight: 700;
2025-08-16 21:40:51 +02:00
line-height: 1rem;
width: fit-content;
margin: 0;
padding: 0;
2025-08-16 21:40:51 +02:00
color: var(--color-text-dark);
background-color: var(--color-highlight);
2025-12-30 20:33:09 +00:00
font-family: var(--font-stylised);
padding: 4px;
}
2025-08-16 21:40:51 +02:00
.project-date-embed {
position: absolute;
left: 0;
bottom: 0;
}
2025-08-10 20:39:54 +02:00
.pixelated-img {
image-rendering: pixelated;
}
@media screen and (max-width: 800px) {
h1 {
font-size: 2.3rem;
line-height: 2.4rem;
}
h2 {
font-size: 1.8rem;
line-height: 1.8rem;
}
h3 {
font-size: 1.6rem;
line-height: 1.6rem;
}
h4, h5, h6 {
font-size: 1.4rem;
line-height: 1.4rem;
}
/* p, span, li, pre, a {
} */
}
}
</style>