La Bureautique, c'est mieux que le gin tonic.

This commit is contained in:
Boris 2022-10-24 14:16:30 +02:00
parent 08d55f366b
commit a2e2d4583f
12 changed files with 186 additions and 47 deletions

View File

@ -8,7 +8,7 @@ error_reporting(E_ALL);
session_start();
define('DEFAULT_RADIUS', 10);
define('DEFAULT_RADIUS', 100);
define('TAILLE_SPRITE', 32);
define('DEMI_TAILLE_SPRITE', (TAILLE_SPRITE/2));

View File

@ -2,6 +2,7 @@
<html>
<head>
<title>La bureautique</title>
<?php
echo '
@ -10,6 +11,10 @@
';
?>
<link rel="stylesheet" type="text/css" href="themes/layout.css" />
<link rel="stylesheet" type="text/css" href="themes/deco.css" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
</head>
<?php

View File

@ -5,7 +5,7 @@ require_once('config.php');
require_once('lib/Gchange.class.php');
require_once('lib/Location.class.php');
$bodyIds = 'home';
$bodyIds = 'startpage';
include_once('header.php');
@ -18,25 +18,37 @@ echo '
À quel jeu voulez-vous jouer ?
</p>
<dl>';
<ul id="games-list">';
foreach ($games as $gameId => $game) {
echo '
<dt>
<a href="select_game.php?gameId='. $gameId .'">
'. $game['title'] .'
</a>
</dt>
<dd>
'. $game['description'] .'
</dd>
<li class="game">
<h2>
<a href="select_game.php?gameId='. $gameId .'">
<span>
'. $game['title'] .'
</span>
</a>
</h2>
<p>
<img
src="themes/'. $gameId . '/game-icon.png"
alt="'. $game['title'] .'"
/>
</p>
<p>
'. $game['description'] .'
</p>
</li>
';
}
echo '
</dl>';
</ul>';

View File

@ -1,4 +1,7 @@
<?php
/**
* https://github.com/duniter/cesium-plus-pod/blob/master/src/site/markdown/REST_API.md
*/
require_once('DAO.class.php');
@ -11,6 +14,8 @@ class CesiumPlus {
$this->dao = DAO::getInstance();
}
public function
/*
public function getNearbyUsers ($lat, $lon, $radius) {
$n = 15;
@ -47,4 +52,5 @@ class CesiumPlus {
return $result->hits->hits;
}
*/
}

View File

@ -1,4 +1,7 @@
<?php
/**
* https://github.com/duniter/duniter-bma/blob/master/doc/API.md
*/
date_default_timezone_set('Europe/Paris');

View File

@ -1,4 +1,7 @@
<?php
/**
* https://github.com/duniter-gchange/gchange-pod/blob/master/src/site/markdown/REST_API.md
*/
require_once('DAO.class.php');
require_once('GchangeUser.class.php');

View File

@ -30,46 +30,33 @@ if (isset($_POST['salt'], $_POST['pepper'])) {
include_once('header.php');
echo '
<form method="post" action="">';
<form method="post" action="">
/*
<fieldset>
<legend>Identification par Ğchange</legend>
<p>
<label>Joueur&nbsp;:
<select name="player">';
<p>
<label>
Identifiant :
<input type="text" name="salt" />
</label>
</p>
foreach ($players as $p) {
echo '<option value="'. $p->getPubkey() .'">'. $p->getName() .'</option>';
}
echo '
</select>
</label>
</p>
*/
echo '
<p>
<label>
Sel :
<input type="text" name="salt" />
</label>
</p>
<p>
<label>
Poivre:
<input type="text" name="pepper" />
</label>
</p>
<p>
<label>
Mot de passe :
<input type="password" name="pepper" />
</label>
</p>
<p>
<input type="submit" />
</p>
<p>
<input type="submit" value="Jouer" />
</p>
</fieldset>
</form>
';
include_once('footer.php');
}

31
themes/deco.css Normal file
View File

@ -0,0 +1,31 @@
body#startpage {
background: hsl(0, 0%, 5%);
color: white;
}
body#startpage a,
body#startpage a:visited {
color: white;
text-decoration: none;
}
body#startpage #games-list .game {
border-style: solid;
border-color: yellow;
}
body#startpage #games-list .game:hover {
background-color: yellow;
}
body#startpage #games-list .game:hover,
body#startpage #games-list .game:hover a {
color: black;
}

56
themes/layout.css Normal file
View File

@ -0,0 +1,56 @@
body#startpage
{
text-align: center;
}
body#startpage ul#games-list {
list-style: none;
margin: 0;
padding: 0;
}
body#startpage ul#games-list li {
margin: 0;
padding: 0;
}
body#startpage #games-list {
display: flex;
flex-wrap: wrap;
flex-direction: row;
}
body#startpage #games-list .game {
width: 31.333%;
margin-left: 1%;
margin-right: 1%;
border-width: 0.125rem ;
position: relative;
}
body#startpage #games-list .game h2 {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
body#startpage #games-list .game h2 a {
display: block;
width: 100%;
height: 100%;
}
body#startpage #games-list .game h2 + * {
margin-top: 4rem;
}

BIN
themes/magie/game-icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@ -276,3 +276,39 @@ main {
right: 0;
}
#login-page input {
border-radius: 0;
}
#login-page {
height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
flex-shrink: 1;
flex-basis: 100%;
}
#login-page footer {
justify-self: flex-end;
}
#login-page main {
flex-basis: 100vh;
display: flex;
flex-direction: column;
justify-content: center;
}
#login-page fieldset {
border-width: 0;
}