willy.club/views/templates/header.php

36 lines
831 B
PHP
Raw Normal View History

2022-12-13 16:59:47 +00:00
<?php
function special_events(): string {
2022-12-29 01:53:33 +00:00
if (in_array(date('m'), ['12', '1', '2'])) {
return 'Winter';
}
return 'Nothing';
2022-12-13 16:59:47 +00:00
}
?>
2022-11-29 12:49:29 +00:00
<!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">
2022-12-13 16:59:47 +00:00
<title><?=htmlspecialchars($title)?></title>
<link rel="stylesheet" href="<?=url('/static/style/main.css')?>">
2022-11-29 12:49:29 +00:00
</head>
<body>
2022-12-29 01:53:33 +00:00
<?php if (special_events() === 'Winter'): ?>
2022-12-13 16:59:47 +00:00
<script src="<?=url('/static/js/snow.js')?>"></script>
<?php endif; ?>
2022-11-29 12:49:29 +00:00
2022-12-13 16:59:47 +00:00
<div class="container">
2022-12-29 01:53:33 +00:00
<a href="<?=url('/')?>">
<img src="<?=url('/static/img/logo.png')?>">
</a>
<div>
<nav>
<!-- the image holds for now... -->
</nav>
</div>
2022-12-13 16:59:47 +00:00
<main>