Correction de la page poi view sur ls écrans étroits

This commit is contained in:
leosw
2026-03-08 11:16:08 +01:00
parent bef4998a64
commit 65b9cf071f
2 changed files with 34 additions and 45 deletions

View File

@@ -26,7 +26,7 @@ html, body {
} }
#slide-icon { #slide-icon {
position: absolute; position: absolute;
left: 400px; left: calc(50% - 26px);
top: -35px; top: -35px;
color: #000; color: #000;
font-size: 60px; font-size: 60px;
@@ -510,7 +510,7 @@ form.form input[type="checkbox"]:checked + span:before {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
font-size: 19px; /* demandé */ font-size: 19px;
font-weight: 600; font-weight: 600;
} }
@@ -518,7 +518,9 @@ form.form input[type="checkbox"]:checked + span:before {
.poi-id-coords { .poi-id-coords {
display: flex; display: flex;
align-items: center; align-items: center;
flex-wrap: wrap;
gap: 8px; gap: 8px;
row-gap: 2px;
} }
.poi-id-coords a { .poi-id-coords a {
@@ -528,7 +530,6 @@ form.form input[type="checkbox"]:checked + span:before {
.poi-id-coords a:hover { .poi-id-coords a:hover {
text-decoration: underline; text-decoration: underline;
} }
.poi-id-elev { .poi-id-elev {
color: #333; color: #333;
} }
@@ -633,44 +634,46 @@ form.form input[type="checkbox"]:checked + span:before {
*****************************************/ *****************************************/
.bool-grid { .bool-grid {
display: flex;
margin: 20px 0 0 0; margin: 20px 0 0 0;
padding: 20px 15px; padding: 20px 15px;
background: rgba(200, 220, 255, 0.25); background: rgba(200, 220, 255, 0.25);
border-top: 1px solid #bbb; border-top: 1px solid #bbb;
} }
.bool-row { .bool-grid .bool-cell {
display: grid; margin-right: 10px;
grid-auto-flow: column;
grid-auto-columns: 1fr;
text-align: center; text-align: center;
margin-bottom: 10px;
} }
.bool-row.labels { .bool-grid .bool-cell:last-child {
font-size: 16px; margin-right: 0;
}
.bool-label {
padding: 5px;
}
.bool-row.values {
margin-top: 5px;
} }
.boolean-pill { .boolean-pill {
display: inline-block; display: inline-block;
padding: 8px 12px; padding: 8px 12px;
margin-top: 5px;
border-radius: 20px; border-radius: 20px;
font-weight: 700; font-weight: 700;
font-size: 18px; font-size: 18px;
background: white; background: white;
} }
@media (max-width: 900px) { /**
.bool-row { * Utiliser flexbox pour s'adapter à la largeur de la page
grid-auto-flow: row; */
grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); @media only screen and (max-width: 800px) {
.bool-grid {
flex-direction: column;
}
.bool-grid .bool-cell {
margin-right: 0;
margin-bottom: 10px;
width: 100%;
text-align: left;
}
.bool-label, .bool-icon {
display: inline-block;
} }
} }

View File

@@ -164,31 +164,17 @@
-1 => "<span class='boolean-pill boolean-unknown'></span>" -1 => "<span class='boolean-pill boolean-unknown'></span>"
]; ];
?> ?>
<div class="bool-grid"> <div class="bool-grid">
<!-- Boolean labels -->
<div class="bool-row labels">
<?php foreach ($boolFields as $key => $label): ?> <?php foreach ($boolFields as $key => $label): ?>
<div class="bool-label"><?= $label ?></div> <?php $icon = $boolIcons[$poiValues[$key] ?? 2]; ?>
<?php endforeach; ?>
</div>
<!-- Boolean values -->
<div class="bool-row values">
<?php foreach ($boolFields as $key => $label): ?>
<?php
$value = $poiValues[$key] ?? 2;
$icon = $boolIcons[$value];
?>
<div class="bool-cell"> <div class="bool-cell">
<?= $icon ?> <div class="bool-label"><?= $label ?></div>
<div class="bool-icon"><?= $icon ?></div>
</div> </div>
<?php endforeach; ?> <?php endforeach; ?>
</div> </div>
</div>
<?php endif; ?> <?php endif; ?>
</div> </div>