This commit is contained in:
e025532
2025-05-22 10:26:59 +02:00
parent a2dddd8f57
commit d002d1b0a7
2 changed files with 231 additions and 7 deletions

View File

@@ -94,15 +94,30 @@
$color = "bg-success";
}
}
$progress_bar_height = '25px';
$marker_overlap = 5;
$marker_height = (int)$progress_bar_height + (2 * $marker_overlap);
$marker_top = -$marker_overlap;
echo "</div>";
echo "<div class='col'>";
echo "
<div class='progress' style='position: relative; border: 1px solid grey; height: 25px;'>
<div class='progress-bar bg-dark progress-bar-striped' role='progressbar' style='width:". $pcent_restant ."%;' aria-valuenow='".$pcent_restant."' aria-valuemin='0' aria-valuemax='100'></div>
echo "
<div style='position: relative; display: inline-block;'>
<div class='progress' style='border: 1px solid grey; height: ".$progress_bar_height."; margin-bottom: ".(2 * $marker_overlap)."px;'>
<div class='progress-bar bg-dark progress-bar-striped' role='progressbar' style='width:". $pcent_restant ."%;' aria-valuenow='".$pcent_restant."' aria-valuemin='0' aria-valuemax='100'></div>
<div class='progress-bar ".$color."' role='progressbar' style='width: ".$pcent."%;' aria-valuenow='".$pcent."' aria-valuemin='0' aria-valuemax='100'></div>
<div style='position: absolute; left: 50%; transform: translateX(-50%); top: -2px; height: 33px; width: 2px; background-color: orange;'></div>
</div>";
echo "</div>";
</div>
<div style='
position: absolute;
left: 50%;
transform: translateX(-50%);
top: ".$marker_top."px;
height: ".$marker_height."px;
width: 2px;
background-color: orange;
z-index: 1;
'></div>
</div>";
echo "</div>" ;
echo "<br>";