responsive design
This commit is contained in:
65
index.php
65
index.php
@ -53,7 +53,7 @@ $grille->current();
|
||||
|
||||
<body>
|
||||
<form id="grilleForm" method="get" location=".">
|
||||
<h1>
|
||||
<h1 class="large width">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
@ -80,32 +80,35 @@ $grille->current();
|
||||
</tbody>
|
||||
</table>
|
||||
</h1>
|
||||
<?php if ($grille->valid()): ?>
|
||||
<table class="grille">
|
||||
<tr>
|
||||
<th></th>
|
||||
<?php for ($x = 0; $x < $largeur; $x++): ?>
|
||||
<th><?= chr($x + 65) ?></th>
|
||||
<?php endfor; ?>
|
||||
<th></th>
|
||||
</tr>
|
||||
<?php for ($y = 0; $y < $hauteur; $y++): ?>
|
||||
<tr>
|
||||
<th><?= $y + 1 ?></th>
|
||||
<?php for ($x = 0; $x < $largeur; $x++): ?>
|
||||
<td class="case <?= $grille->grille[$y][$x] == " " ? "noire" : "blanche" ?>">
|
||||
<?php if ($grille->grille[$y][$x] == " "): ?>
|
||||
<input type="text" maxlength="1" size="1" value=" " disabled />
|
||||
<?php else: ?>
|
||||
<input type="text" maxlength="1" size="1" pattern="[A-Z]"/>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<h1 class="small width">Mots croisés</h1>
|
||||
<div class="grille-et-definitions">
|
||||
<?php if ($grille->valid()): ?>
|
||||
<div class="grille">
|
||||
<table>
|
||||
<tr>
|
||||
<th></th>
|
||||
<?php for ($x = 0; $x < $largeur; $x++): ?>
|
||||
<th><?= chr($x + 65) ?></th>
|
||||
<?php endfor; ?>
|
||||
<th></th>
|
||||
</tr>
|
||||
<?php for ($y = 0; $y < $hauteur; $y++): ?>
|
||||
<tr>
|
||||
<th><?= $y + 1 ?></th>
|
||||
<?php for ($x = 0; $x < $largeur; $x++): ?>
|
||||
<td class="case <?= $grille->grille[$y][$x] == " " ? "noire" : "blanche" ?>">
|
||||
<?php if ($grille->grille[$y][$x] == " "): ?>
|
||||
<input type="text" maxlength="1" size="1" value=" " disabled />
|
||||
<?php else: ?>
|
||||
<input type="text" maxlength="1" size="1" pattern="[A-Z]"/>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<?php endfor; ?>
|
||||
</tr>
|
||||
<?php endfor; ?>
|
||||
</tr>
|
||||
<?php endfor; ?>
|
||||
</table>
|
||||
<div class="definitions">
|
||||
<div class="horizontales">
|
||||
</table>
|
||||
</div>
|
||||
<div class="definitions horizontales">
|
||||
<h2>Horizontalement</h2>
|
||||
<ol>
|
||||
<?php for ($y = 0; $y < $hauteur; $y++): ?>
|
||||
@ -124,7 +127,7 @@ $grille->current();
|
||||
<?php endfor; ?>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="verticales">
|
||||
<div class="definitions verticales">
|
||||
<h2>Verticalement</h2>
|
||||
<ol type="A">
|
||||
<?php for ($x = 0; $x < $largeur; $x++): ?>
|
||||
@ -143,10 +146,10 @@ $grille->current();
|
||||
<?php endfor; ?>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<h3 class="erreur">Erreur de génération de la grille</h3>
|
||||
<?php endif ?>
|
||||
<?php else: ?>
|
||||
<h3 class="erreur">Erreur de génération de la grille</h3>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
|
||||
<input type="hidden" id="lignes" <?php if (isset($_GET["lignes"])): ?>name="lignes" <?php endif ?>value="<?= $hauteur ?>" />
|
||||
<input type="hidden" id="colonnes" <?php if (isset($_GET["colonnes"])): ?>name="colonnes" <?php endif ?>value="<?= $largeur ?>" />
|
||||
|
Reference in New Issue
Block a user