No, I don’t use snippets. I’m just getting to know that.
This is the page:
http://www.christinasperling.com
The menu is only fixed on the „art“ page.
This is part of my index.css file:
a {
font-family: 'Poppins';
font-weight: 500;
opacity: 0.8;
font-size: 16px;
color: #000000;
text-decoration: none;
letter-spacing: 2px;
}
html {
font-family: sans-serif;
line-height: 150%;
font-size: 10pt;
}
header {
margin-bottom: 2rem;
display: flex;
justify-content: space-between;
}
body {
background-size: cover;
margin: 3rem;
background-repeat: no-repeat;
}
img {
width: 50%;
display: block;
margin-left: auto;
margin-right: auto;
margin-top: 50px;
height: auto;
}
.menu {
position: fixed;
right: 30;
}
.menu a {
margin-right: 4rem;
}
And the art.php:
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><?= $site->title() ?></title>
<?= css('index.css') ?>
</head>
<body>
<header>
<a class="logo" href="<?= $site->url() ?>"><?= $site->title() ?></a>
<nav class="menu">
<?php foreach ($site->children()->listed() as $subpage): ?>
<a href="<?= $subpage->url() ?>"><?= $subpage->title() ?></a>
<?php endforeach ?>
</nav>
</header>
<?= $page->text() ?>
<?php foreach($page->images() as $file): ?>
<img src="<?= $file->url() ?>">
<?php endforeach ?>
</body>
</html>
For example the contact.php:
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><?= $site->title() ?></title>
<?= css('index.css') ?>
</head>
<body>
<header>
<a class="logo" href="<?= $site->url() ?>"><?= $site->title() ?></a>
<nav class="menu">
<?php foreach ($site->children()->listed() as $subpage): ?>
<a href="<?= $subpage->url() ?>"><?= $subpage->title() ?></a>
<?php endforeach ?>
</nav>
</header>
<?= $page->text() ?>
</body>
</html>