This commit is contained in:
Boris 2022-10-26 13:03:52 +02:00
parent 7c87c4a371
commit 1bd4554893
13 changed files with 118 additions and 21 deletions

View File

@ -95,6 +95,8 @@ if (!isset($_SESSION['gameId'])) {
}
define('DEFAULT_WEBPAGE_TITLE', 'La bureautique');
require_once('functions.php');

View File

@ -4,14 +4,18 @@
<p>Created by La Bureautique Incorporated, STI (Société Totalement Irresponsable) au capital de 200 000 Ğ1.</p>
</footer>
<?php
echo '
<script src="themes/'. $_SESSION['gameId'] .'/layout.js"></script>
<script src="themes/'. $_SESSION['gameId'] .'/deco.js"></script>
<?php
$themeJSDir = 'themes/'. $_SESSION['gameId'] . '/js';
$files = scandir($themeJSDir);
$files = array_slice($files, 2);
';
?>
foreach ($files as $f) {
echo '
<script type="text/javascript" src="'. $themeJSDir . '/' . $f .'"></script>
';
}
?>
</body>
</html>

View File

@ -1,15 +1,22 @@
<!DOCTYPE html>
<?php
$webpageTitle = isset($webpageTitle) ? $webpageTitle : DEFAULT_WEBPAGE_TITLE;
?><!DOCTYPE html>
<html>
<head>
<title>La bureautique</title>
<title><?php echo $webpageTitle; ?></title>
<?php
echo '
$themeCSSDir = 'themes/'. $_SESSION['gameId'] . '/css';
$files = scandir($themeCSSDir);
$files = array_slice($files, 2);
<link rel="stylesheet" type="text/css" href="themes/'. $_SESSION['gameId'] .'/layout.css" />
<link rel="stylesheet" type="text/css" href="themes/'. $_SESSION['gameId'] .'/deco.css" />
';
foreach ($files as $f) {
echo '
<link rel="stylesheet" type="text/css" href="'. $themeCSSDir . '/' . $f .'" title="'. $games[$_SESSION['gameId']]['title'] .'" />';
}
?>
<link rel="stylesheet" type="text/css" href="themes/layout.css" />

29
home.php Normal file
View File

@ -0,0 +1,29 @@
<?php
require_once('config.php');
$bodyIds = 'home';
include_once('header.php');
echo '
<nav>
<ul>
<li>
<a href="map.php">
Carte
</a>
</li>
<li>
<a href="messenger.php">
Messagerie
</a>
</li>
</ul>
</nav>
';
include_once('footer.php');

View File

@ -21,11 +21,12 @@ if (isset($_POST['salt'], $_POST['pepper'])) {
$_SESSION['salt'] = $_POST['salt'];
$_SESSION['pepper'] = $_POST['pepper'];
header('Location:map.php');
header('Location:home.php');
} else {
$bodyIds = 'login-page';
$webpageTitle = $games[$_SESSION['gameId']]['title'];
include_once('header.php');

14
map.php
View File

@ -34,10 +34,22 @@ $origLoc->setPosition($origLat, $origLon);
echo '
<nav id="go-back-home">
<a href="home.php">
<span>
'. dgettext($_SESSION['gameId'], _('Retour au tableau de bord')) . '
</span>
</a>
</nav>
<section id="mapview">
<aside id="geoPoint">
<a href=".">'. $origLat . ' , ' . $origLon .'</a>
<span id="origLat">'.
$origLat .
'</span><span class="sep">,</span><span id="origLon">' .
$origLon .
'</span>
</aside>
<nav id="zoom">

1
themes/magie/css/layout.css Symbolic link
View File

@ -0,0 +1 @@
../../spationaute/css/layout.css

View File

@ -1 +0,0 @@
../spationaute/layout.css

View File

@ -10,17 +10,49 @@
body {
background: hsl(0, 50%, 2%);
color: white;
}
a,
a:visited {
color: white;
}
#login-page {
color: white;
}
#go-back-home {
#mapview #geoPoint a,
#mapview #geoPoint a:visited {
background-color: hsla(132.2, 59.8%, 12.1%, 0.5);
}
#go-back-home a {
text-decoration: none;
}
#go-back-home a span {
display: none;
}
#go-back-home a:before {
content: "<";
background: hsl(132.2, 59.8%, 52.2%);
color: hsla(132.2, 59.8%, 12.1%);
width: 3rem;
height: 3rem;
font-size: 2rem;
font-weight: bolder;
display: flex;
justify-content: center;
align-items: center;
border-radius: 50%;
}
#mapview #geoPoint {
color: white;
opacity: 0.4;

View File

@ -20,11 +20,21 @@ body {
}
#go-back-home {
position: fixed;
top: 0;
left: 0;
padding: 0.5rem;
margin: 0.5rem;
z-index: 200;
}
#mapview #geoPoint {
padding: 1rem;
position: fixed;
top: 0;
position: absolute;
bottom: 0;
left: 0;
display: inline-block;
}