Эх сурвалжийг харах

Modification du style - Passage de la légende en haut + tableau en no wrap

Guichen 5 жил өмнө
parent
commit
4a60ccd3ef
2 өөрчлөгдсөн 21 нэмэгдсэн , 21 устгасан
  1. 1 0
      assets/divers.css
  2. 20 21
      index.php

+ 1 - 0
assets/divers.css

@@ -7,6 +7,7 @@ table {
     font-size: 13px;
     text-align: center;
     border-collapse: collapse;
+    white-space: nowrap;
 }
 
 th, td {

+ 20 - 21
index.php

@@ -30,10 +30,25 @@ $isClassementValid = isset($_GET["classement"]) && (int) $_GET["classement"] !==
 	
 	<button type="submit" class="btn btn-info">Envoyer</button>
 </form>
+<?php if ($isClassementValid) : ?>
+	<hr><h1>Tableau de classement</h1>
+	<h2>Légende</h2>
+	<table>
+		<thead>
+		<th colspan="5">Légende (sur toutes les années)</th>
+		</thead>
+		<tbody>
+		<tr>
+			<td>Jamais proposé</td>
+			<td class="no-choice">Aucun choix</td>
+			<td class="last-choice">Une seule année</td>
+			<td class="half-choices">Plusieurs choix</td>
+			<td class="all-choices">Tous les choix</td>
+		</tr>
+		</tbody>
+	</table>
 <?php
-
-if ($isClassementValid) {
-	$html = "<hr><h1>Tableau de classement</h1>";
+	$html = "<h2>Résultats</h2>";
 	
 	// On va récupérer tous les rangs limited dispo triés par idChoix
 	$reqRL = $db->query("SELECT idChoix, annee, rangLimite FROM dataset");
@@ -122,25 +137,9 @@ if ($isClassementValid) {
 	$html .= "</tbody></table><br>";
 	echo $html;
 	?>
-	<table>
-		<thead>
-		<th colspan="5">Légende (sur toutes les années)</th>
-		</thead>
-		<tbody>
-		<tr>
-			<td>Jamais proposé</td>
-			<td class="no-choice">Aucun choix</td>
-			<td class="last-choice">Une seule année</td>
-			<td class="half-choices">Plusieurs choix</td>
-			<td class="all-choices">Tous les choix</td>
-		</tr>
-		</tbody>
-	</table>
-	<br>
 	<table>
 	</table>
-<?php
-}
-?>
+<?php endif;?>
+
 </body>
 </html>