feat(v2-alpha): refactor binary simulator and introduce shared site layout

- Rewrite binary simulator with unified unsigned and two’s complement logic
- Support dynamic bit widths from 4 to 64 with LSB-preserving resizing
- Replace legacy unsigned-only scripts with a single maintainable implementation
- Extract binary styles into dedicated CSS and add global site styling
- Introduce shared header, footer, and base layout components
- Migrate Binary page to BaseLayout and modular assets

Signed-off-by: Alexander Lyall <alex@adcm.uk>
This commit is contained in:
2025-12-14 19:46:23 +00:00
parent 460126dccc
commit d4765b3788
12 changed files with 1102 additions and 823 deletions

75
public/styles/global.css Normal file
View File

@@ -0,0 +1,75 @@
:root{
--bg: #1f2027;
--panel: rgba(255,255,255,.04);
--text: #e8e8ee;
--muted: #a9acb8;
--line: rgba(255,255,255,.12);
}
*{ box-sizing:border-box; }
body{
margin:0;
font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
background: var(--bg);
color: var(--text);
}
.site-header{
border-bottom: 1px solid var(--line);
background: rgba(0,0,0,.12);
backdrop-filter: blur(6px);
}
.site-header__inner{
max-width: 1200px;
margin: 0 auto;
padding: 14px 20px;
display:flex;
align-items:center;
justify-content:space-between;
gap:16px;
}
.brand{
text-decoration:none;
color: var(--text);
font-weight: 900;
letter-spacing: .02em;
}
.nav{
display:flex;
gap: 14px;
flex-wrap:wrap;
}
.nav a{
color: var(--muted);
text-decoration:none;
font-weight: 700;
font-size: 14px;
}
.nav a:hover{ color: var(--text); }
.site-main{
min-height: calc(100vh - 120px);
}
.site-footer{
border-top: 1px solid var(--line);
margin-top: 28px;
background: rgba(0,0,0,.10);
}
.site-footer__inner{
max-width: 1200px;
margin: 0 auto;
padding: 18px 20px;
display:flex;
justify-content:space-between;
gap:12px;
flex-wrap:wrap;
}
.muted{ color: var(--muted); font-size: 13px; }