96 lines
2.3 KiB
PHP
96 lines
2.3 KiB
PHP
<?php
|
|
if (!isset($title)) {
|
|
$title = DEFAULT_TITLE;
|
|
}
|
|
|
|
$bodyClass = isset($bodyClass) ? ' class="'. $bodyClass .'"' : '';
|
|
|
|
$h = localtime()[2];
|
|
|
|
if($h >= 9 and $h < 17) {
|
|
|
|
$sheet = 't-day';
|
|
|
|
} elseif($h < 6 or $h > 20) {
|
|
|
|
$sheet = 't-night';
|
|
|
|
} else {
|
|
|
|
$sheet = 't-dawn-or-dusk';
|
|
}
|
|
|
|
function changeEveryNSec ($n, $a) {
|
|
|
|
$nbElts = count($a);
|
|
|
|
$refresh = $n * $nbElts;
|
|
|
|
return $a[floor((time() % $refresh) / ($refresh / $nbElts))];
|
|
}
|
|
|
|
$taglines = [
|
|
'<span>terrains numériques constructibles</span> <span>pour junistes</span>',
|
|
'<span>mondes 3D</span> <span>pour rencontrer d\'autres junistes</span>',
|
|
'<span>pour empiler des cubes</span> <span>entre junistes</span>',
|
|
'<span>parc d\'attractions numériques</span> <span>pour la monnaie libre Ğ1 !</span>',
|
|
'<span>des lieux pour créer, jouer, gagner ou dépenser des Ğ1</span>',
|
|
'<span>espaces de convivialité numériques</span> <span>pour junistes</span>',
|
|
];
|
|
|
|
$siteDesc = changeEveryNSec(2, $taglines);
|
|
|
|
?>
|
|
<!doctype html>
|
|
<html lang="fr">
|
|
|
|
<head>
|
|
<meta charset="utf-8"/>
|
|
|
|
<title><?php echo $title; ?></title>
|
|
|
|
<link rel="stylesheet" href="<?php echo ROOT_URL;?>css/layout.css"/>
|
|
<link rel="stylesheet" href="<?php echo ROOT_URL;?>css/layout-home.css"/>
|
|
<link rel="stylesheet" href="<?php echo ROOT_URL;?>css/layout-donors.css"/>
|
|
|
|
<link rel="stylesheet" href="<?php echo ROOT_URL;?>css/decoration.css"/>
|
|
<link rel="stylesheet" href="<?php echo ROOT_URL;?>css/decoration-home.css"/>
|
|
<link rel="stylesheet" href="<?php echo ROOT_URL;?>css/decoration-donors.css"/>
|
|
|
|
<link rel="icon" type="image/png" href="<?php echo ROOT_URL; ?>Minetest_logo-240px.png"/>
|
|
|
|
<link rel="stylesheet" href="<?php echo ROOT_URL . 'css/' . $sheet . '.css'; ?>"/>
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
</head>
|
|
|
|
<body<?php echo $bodyClass; ?>>
|
|
|
|
<header>
|
|
|
|
<?php
|
|
$elt = isset($isHome) ? 'h1' : 'p';
|
|
?>
|
|
|
|
<<?php echo $elt; ?>>
|
|
<a href="<?php echo ROOT_URL; ?>">
|
|
<span class="sitename">Juneland</span>
|
|
|
|
<span class="sr-only"> : </span>
|
|
|
|
<span class="sitedesc"><?php echo $siteDesc; ?></span>
|
|
</a>
|
|
</<?php echo $elt; ?> >
|
|
|
|
<nav>
|
|
<button>
|
|
<span>Afficher le menu</span>
|
|
</button>
|
|
|
|
<?php include('menu.php'); ?>
|
|
</nav>
|
|
|
|
</header>
|
|
|
|
<main id="content">
|