7 segments

This commit is contained in:
Adrien MALINGREY 2025-05-03 02:04:03 +02:00
parent c8c376f1dd
commit 6258874114
2 changed files with 9 additions and 6 deletions

View File

@ -60,7 +60,8 @@ echo ("-->");*/
<h2>Interfaces</h2> <h2>Interfaces</h2>
<?php <?php
foreach ($stack as $member_id => $lines) { foreach ($stack as $member_id => $lines) {
echo "<div class='member'>\n<span class='member-id'>$member_id</span>\n<table class='interfaces'>\n<tbody>\n"; $member_7_segments = mb_convert_encoding("&#x" . dechex(0x1FBF0 + $member_id) . ";", 'UTF-8', 'HTML-ENTITIES');
echo "<div class='member'>\n<span class='member-id'>$member_7_segments</span>\n<table class='interfaces'>\n<tbody>\n";
foreach ($lines as $interfaces) { foreach ($lines as $interfaces) {
ksort($interfaces); ksort($interfaces);
echo "<tr>\n"; echo "<tr>\n";

View File

@ -104,24 +104,26 @@ main {
.member { .member {
display: flex; display: flex;
align-items: center; align-items: baseline;
border: 6px outset #476079; border: 6px outset #476079;
border-radius: 4px; border-radius: 4px;
background-color: #34495e; background-color: #34495e;
margin-bottom: 0.5rem; margin-bottom: 0.5rem;
print-color-adjust: exact; print-color-adjust: exact;
justify-content: flex-start;
} }
.member-id { .member-id {
background: #888; background: #666;
align-content: center; align-content: center;
color: lightgreen; color: lightgreen;
text-shadow: 0 1px 3px #fffb; text-shadow: 0 1px 3px #fff5;
font-weight: bold; font-weight: bold;
border: 2px inset black; border: 2px inset black;
font-family: monospace; font-family: monospace;
margin: 1em 0.5em; margin: 0 0.5em;
padding: 0.12em 0.4em; padding: 0 0.3em;
font-size: 1.4em;
} }
.interfaces { .interfaces {