willy.club/views/templates/header.php
2022-12-29 01:53:33 +00:00

36 lines
831 B
PHP

<?php
function special_events(): string {
if (in_array(date('m'), ['12', '1', '2'])) {
return 'Winter';
}
return 'Nothing';
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><?=htmlspecialchars($title)?></title>
<link rel="stylesheet" href="<?=url('/static/style/main.css')?>">
</head>
<body>
<?php if (special_events() === 'Winter'): ?>
<script src="<?=url('/static/js/snow.js')?>"></script>
<?php endif; ?>
<div class="container">
<a href="<?=url('/')?>">
<img src="<?=url('/static/img/logo.png')?>">
</a>
<div>
<nav>
<!-- the image holds for now... -->
</nav>
</div>
<main>