You've already forked computing-box
Completed Wave 3 features:
All checks were successful
Pre-release on non-main branches / prerelease (push) Successful in 27s
All checks were successful
Pre-release on non-main branches / prerelease (push) Successful in 27s
- [X] New User Interface (Responsive) - [X] Two's Compliment Simulator - [X] Extended Binary Simulator (Custom bit sizes) - [X] Unified Binary Simulator (Unsigned & Two's Completment combined) - [X] Extended Hexadecimal Simulator - [X] Unified Hexadecimal Simulator (For GCSE & A Level Specification) - [X] Enhanced Gate Simulator (Truth Table Creator) - [X] Compound Gate Simulator - [ ] Computer Components Simulator Signed-off-by: Alexander Lyall <alex@adcm.uk>
This commit is contained in:
@@ -1,85 +1,190 @@
|
||||
:root{
|
||||
/* Global fonts */
|
||||
@font-face {
|
||||
font-family: "SevenSegment";
|
||||
src: url("/fonts/Seven-Segment.woff2") format("woff2"),
|
||||
url("/fonts/Seven-Segment.woff") format("woff");
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "DSEG7Classic";
|
||||
src: url("/fonts/DSEG7Classic-Regular.woff") format("woff"),
|
||||
url("/fonts/DSEG7Classic-Regular.ttf") format("truetype");
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
:root {
|
||||
--nav-h: 92px;
|
||||
--bg: #1f2027;
|
||||
--panel: #22242d;
|
||||
--panel2: rgba(255,255,255,.04);
|
||||
--text: #e8e8ee;
|
||||
--muted: #a9acb8;
|
||||
--accent: #33ff7a;
|
||||
--accent-dim: rgba(51,255,122,.15);
|
||||
--line: rgba(255,255,255,.12);
|
||||
--line: rgba(255,255,255,.10);
|
||||
|
||||
--ui-font: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
|
||||
--num-font: "DSEG7Classic", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
|
||||
--bit-font: "SevenSegment", monospace;
|
||||
}
|
||||
|
||||
*{ box-sizing:border-box; }
|
||||
* { box-sizing: border-box; }
|
||||
html, body { height: 100%; }
|
||||
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--ui-font); display: flex; flex-direction: column; }
|
||||
|
||||
body{
|
||||
margin:0;
|
||||
font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
|
||||
background: var(--bg);
|
||||
color: var(--text);
|
||||
/* --- BASE LAYOUT --- */
|
||||
.siteNav { position: sticky; top: 0; z-index: 50; height: var(--nav-h); background: rgba(0,0,0,.10); border-bottom: 1px solid var(--line); backdrop-filter: blur(8px); }
|
||||
.navInner { height: 100%; max-width: 1400px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
|
||||
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
|
||||
.brandLogo { width: 2.5em; height: 2.5em; image-rendering: pixelated; }
|
||||
.brandName { letter-spacing: .12em; font-weight: 900; font-size: 18px; }
|
||||
.navLinks { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
|
||||
.navLinks a { color: var(--muted); text-decoration: none; font-weight: 800; letter-spacing: .12em; font-size: 16px; }
|
||||
.navLinks a:hover, .navLinks a.active { color: #e8e8ee; }
|
||||
|
||||
.pageWrap { flex: 1; max-width: 1400px; margin: 0 auto; padding: 0 20px 40px; width: 100%; display: flex; flex-direction: column; }
|
||||
.siteFooter { border-top: 1px solid var(--line); background: rgba(0,0,0,.08); }
|
||||
.footerInner { max-width: 1400px; margin: 0 auto; padding: 18px 20px; color: var(--muted); font-size: 12px; letter-spacing: .08em; display: flex; flex-direction: column; gap: 6px; }
|
||||
|
||||
/* --- APP LAYOUT --- */
|
||||
.binaryPage {
|
||||
--toolbox-w: 360px;
|
||||
--toolbox-gap: 22px;
|
||||
--toolbox-toggle-top: calc(var(--nav-h) + 16px);
|
||||
--toolbox-top: calc(var(--toolbox-toggle-top) + 60px);
|
||||
position: relative; padding-top: 16px; flex: 1; display: flex; flex-direction: column;
|
||||
}
|
||||
.binaryPage:not(.toolboxCollapsed) { padding-right: calc(var(--toolbox-w) + var(--toolbox-gap)); }
|
||||
.binaryPage.toolboxCollapsed { padding-right: 0; }
|
||||
.topGrid { display: flex; align-items: stretch; gap: 28px; flex: 1; }
|
||||
.leftCol { flex: 1 1 auto; min-width: 0; container-type: inline-size; display: flex; flex-direction: column; }
|
||||
|
||||
/* --- READOUT FORMATTING --- */
|
||||
.readoutContainer { display: flex; align-items: center; justify-content: center; gap: 64px; width: 100%; }
|
||||
.readout { display: flex; flex-direction: column; align-items: center; gap: 16px; padding-top: 4px; }
|
||||
.readoutBlock { display: flex; flex-direction: column; align-items: center; gap: 8px; }
|
||||
.label { font-family: var(--bit-font); letter-spacing: .14em; text-transform: uppercase; font-size: 18px; opacity: .75; margin: 0; }
|
||||
.num { font-family: var(--num-font); color: #28f07a; text-shadow: 0 0 18px rgba(40,240,122,.35); letter-spacing: 2px; }
|
||||
|
||||
.denaryValue, .hexValue, .binaryValue { display: flex; gap: 16px; justify-content: center; white-space: pre-wrap; text-align: center; margin: 0; line-height: 1; }
|
||||
.denaryValue { font-size: 56px; }
|
||||
.hexValue { font-size: 48px; }
|
||||
.binaryValue { font-size: 40px; }
|
||||
.divider { height: 1px; background: rgba(255,255,255,.08); margin: 16px 0 16px; }
|
||||
|
||||
/* --- GRIDS & BITS --- */
|
||||
.bitsWrap { width: 100%; }
|
||||
.bitsGrid { --cols: 8; display: grid; grid-template-columns: repeat(var(--cols), minmax(92px, 1fr)); gap: 26px 22px; align-items: start; justify-items: center; }
|
||||
.bitsGrid.bitsFew { justify-content: center; }
|
||||
.bit { width: 100%; max-width: 140px; display: flex; flex-direction: column; align-items: center; gap: 8px; container-type: inline-size; }
|
||||
.bitVal { font-family: var(--bit-font); font-size: min(32px, calc(140cqw / var(--len, 1))); letter-spacing: 2px; color: rgba(232,232,238,.85); white-space: nowrap; line-height: 1; }
|
||||
|
||||
.bulb { width: 44px; height: 44px; color: rgba(255,255,255,.15); margin-bottom: 8px; flex-shrink: 0; transition: 0.2s ease; background: transparent; display: flex; align-items: center; justify-content: center; }
|
||||
.bulb svg { width: 100%; height: 100%; display: block; }
|
||||
.bulb.on { color: #ffd86b !important; filter: drop-shadow(0 0 14px rgba(255, 216, 107, 1)) !important; }
|
||||
.bulb.on svg { fill: #ffd86b !important; }
|
||||
|
||||
.switch { position: relative; width: 56px; height: 28px; display: inline-block; }
|
||||
.switch input { display: none; }
|
||||
.slider { position: absolute; inset: 0; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.14); border-radius: 999px; transition: .2s ease; }
|
||||
.slider::before { content: ""; position: absolute; width: 22px; height: 22px; left: 3px; top: 2px; background: rgba(255,255,255,.92); border-radius: 999px; transition: .2s ease; pointer-events: none; }
|
||||
.switch input:checked + .slider { background: rgba(40,240,122,.25); border-color: rgba(40,240,122,.30); }
|
||||
.switch input:checked + .slider::before { transform: translateX(28px); }
|
||||
|
||||
/* --- HEXADECIMAL --- */
|
||||
.hexGrid { --cols: 4; display: grid; grid-template-columns: repeat(var(--cols), minmax(160px, 1fr)); gap: 32px 20px; align-items: start; justify-items: center; width: 100%; }
|
||||
.hexGrid.bitsFew { justify-content: center; }
|
||||
.hexCol { display: flex; flex-direction: column; align-items: center; width: 100%; }
|
||||
|
||||
/* --- HEX COLOURS SPECIFIC --- */
|
||||
.colorGroupWrap { display: flex; flex-wrap: nowrap; gap: 16px; justify-content: center; width: 100%; }
|
||||
.colorGroup { display: flex; gap: 12px; padding: 12px; background: rgba(255,255,255,.02); border-radius: 20px; border: 1px solid rgba(255,255,255,.05); flex: 0 1 auto; min-width: 0; }
|
||||
.colorPreviewSide { display: flex; gap: 24px; align-items: center; justify-content: center; }
|
||||
.colorBoxWrap { display: flex; flex-direction: column; align-items: center; gap: 8px; }
|
||||
.colorBox { width: 60px; height: 60px; border-radius: 12px; border: 2px solid rgba(255,255,255,.15); box-shadow: 0 4px 16px rgba(0,0,0,.4); background-color: #000000; transition: background-color 0.2s ease; }
|
||||
.colorBoxLabel { font-family: var(--ui-font); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
|
||||
|
||||
.text-red { color: #ff5555 !important; text-shadow: 0 0 18px rgba(255,85,85,.35) !important; }
|
||||
.text-green { color: #28f07a !important; text-shadow: 0 0 18px rgba(40,240,122,.35) !important; }
|
||||
.text-blue { color: #55aaff !important; text-shadow: 0 0 18px rgba(85,170,255,.35) !important; }
|
||||
|
||||
/* HEX CARD */
|
||||
.hexCard { background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.08); border-radius: 16px; padding: 16px 14px; display: flex; flex-direction: column; align-items: center; gap: 16px; width: 100%; max-width: 190px; flex: 0 1 auto; min-width: 0; box-shadow: 0 4px 24px rgba(0,0,0,.2); backdrop-filter: blur(10px); }
|
||||
.hexCardButtons { display: flex; gap: 10px; }
|
||||
.hexCardBtn { width: 38px; height: 38px; border-radius: 10px; border: 1px solid rgba(255,255,255,.12); font-family: var(--bit-font); font-size: 16px; font-weight: 900; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; color: rgba(232,232,238,.92); transition: all 0.2s ease; }
|
||||
.hexCardBtn.inc { background: rgba(40,240,122,.15); border-color: rgba(40,240,122,.25); }
|
||||
.hexCardBtn.inc:hover { background: rgba(40,240,122,.25); border-color: rgba(40,240,122,.4); }
|
||||
.hexCardBtn.dec { background: rgba(255,80,80,.18); border-color: rgba(255,80,80,.25); }
|
||||
.hexCardBtn.dec:hover { background: rgba(255,80,80,.28); border-color: rgba(255,80,80,.4); }
|
||||
.hexDigitDisplay { font-family: var(--num-font); font-size: 48px; color: #28f07a; text-shadow: 0 0 18px rgba(40,240,122,.35); line-height: 1; }
|
||||
.hexNibbleRow { display: flex; gap: 10px; justify-content: center; width: 100%; }
|
||||
.hexNibbleBit { display: flex; flex-direction: column; align-items: center; gap: 6px; }
|
||||
.hexNibbleBulb { width: 32px !important; height: 32px !important; margin-bottom: 2px !important; }
|
||||
.hexNibbleLabel { font-family: var(--bit-font); font-size: 24px; color: rgba(232,232,238,.6); }
|
||||
.hexColWeight { font-family: var(--bit-font); font-size: 40px; color: rgba(232,232,238,.6); margin-top: 14px; }
|
||||
|
||||
|
||||
/* --- TOOLBOX --- */
|
||||
.toolboxToggle { position: fixed; top: var(--toolbox-toggle-top); right: 22px; z-index: 90; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; border: 1px solid rgba(255,255,255,.12); background: rgba(0,0,0,.15); backdrop-filter: blur(8px); color: rgba(232,232,238,.95); font-family: var(--bit-font); font-weight: 800; font-size: 16px; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; }
|
||||
.toolboxIcon { font-size: 20px; filter: drop-shadow(0 0 8px rgba(255,105,180,.35)); }
|
||||
.toolboxToggle:hover { border-color: rgba(255,255,255,.22); }
|
||||
.panelCol { position: fixed; top: var(--toolbox-top); right: 22px; width: var(--toolbox-w); z-index: 80; display: flex; flex-direction: column; gap: 16px; transform: translateX(0); opacity: 1; transition: transform 420ms cubic-bezier(.2,.9,.2,1), opacity 220ms ease; }
|
||||
.binaryPage.toolboxCollapsed .panelCol { transform: translateX(calc(var(--toolbox-w) + 32px)); opacity: 0; pointer-events: none; }
|
||||
.card { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.10); border-radius: 16px; padding: 16px; backdrop-filter: blur(10px); }
|
||||
.cardTitle { font-family: var(--bit-font); font-weight: 900; letter-spacing: .14em; text-transform: uppercase; font-size: 18px; color: rgba(232,232,238,.9); margin-bottom: 12px; }
|
||||
.hint { font-family: var(--bit-font); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: rgba(232,232,238,.55); margin-top: 10px; line-height: 1.35; }
|
||||
.toggleRow { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
|
||||
.toggleLabel { font-family: var(--bit-font); font-size: 16px; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; color: var(--muted); transition: color 0.2s, text-shadow 0.2s; }
|
||||
.toggleLabel.activeMode { color: #28f07a; text-shadow: 0 0 12px rgba(40,240,122,.45); }
|
||||
.subCard { margin-top: 12px; padding: 12px; border-radius: 14px; border: 1px solid rgba(255,255,255,.10); background: rgba(0,0,0,.12); }
|
||||
.subTitle { font-family: var(--bit-font); font-weight: 900; letter-spacing: .14em; text-transform: uppercase; font-size: 16px; margin-bottom: 10px; opacity: .85; }
|
||||
.bitWidthRow { display: flex; align-items: center; gap: 10px; }
|
||||
.miniBtn { width: 44px; height: 44px; border-radius: 12px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.06); color: rgba(232,232,238,.9); font-family: var(--bit-font); font-weight: 900; font-size: 22px; cursor: pointer; }
|
||||
.miniBtn:hover { border-color: rgba(255,255,255,.22); }
|
||||
.bitInputWrap { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-radius: 12px; border: 1px solid rgba(255,255,255,.10); background: rgba(255,255,255,.04); padding: 10px 12px; }
|
||||
.bitInputLabel { font-family: var(--bit-font); font-size: 16px; letter-spacing: .12em; text-transform: uppercase; opacity: .7; }
|
||||
.bitInput { width: 70px; text-align: right; font-family: var(--num-font); font-size: 28px; letter-spacing: 2px; color: #28f07a; background: transparent; border: none; outline: none; }
|
||||
.btn { border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.06); color: rgba(232,232,238,.92); border-radius: 12px; padding: 10px 12px; font-family: var(--bit-font); font-size: 14px; letter-spacing: .12em; text-transform: uppercase; font-weight: 900; cursor: pointer; }
|
||||
.btn:hover { border-color: rgba(255,255,255,.22); }
|
||||
.btnAccent { background: rgba(40,240,122,.12); border-color: rgba(40,240,122,.22); }
|
||||
.btnAccent:hover { border-color: rgba(40,240,122,.35); }
|
||||
.btnHalf { width: calc(50% - 6px); }
|
||||
.btnWide { width: 100%; }
|
||||
.controlsRow { display: flex; gap: 12px; margin-bottom: 12px; }
|
||||
.toolRowCentered { display: flex; justify-content: center; gap: 10px; margin-bottom: 10px; }
|
||||
.toolBtn { width: 46px; height: 46px; border-radius: 12px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.06); color: rgba(232,232,238,.92); font-family: var(--bit-font); font-size: 16px; font-weight: 900; cursor: pointer; }
|
||||
.toolDec { background: rgba(255,80,80,.20); border-color: rgba(255,80,80,.25); }
|
||||
.toolInc { background: rgba(40,240,122,.18); border-color: rgba(40,240,122,.25); }
|
||||
.btnReset { color: rgba(232,232,238,.95); }
|
||||
.btnReset:hover { background: rgba(255,80,80,.18); border-color: rgba(255,80,80,.35); }
|
||||
|
||||
/* === CONTAINER QUERIES === */
|
||||
@container (max-width: 1050px) {
|
||||
.readoutContainer { gap: 40px; }
|
||||
.colorGroupWrap { gap: 10px; }
|
||||
.colorGroup { padding: 10px; gap: 8px; border-radius: 16px; }
|
||||
.hexCard { padding: 12px 8px; width: 140px; gap: 12px; }
|
||||
.hexDigitDisplay { font-size: 40px; }
|
||||
.hexNibbleBulb { width: 24px !important; height: 24px !important; }
|
||||
.hexNibbleLabel { font-size: 20px; }
|
||||
.hexColWeight { font-size: 26px; margin-top: 10px; }
|
||||
.hexCardBtn { width: 34px; height: 34px; font-size: 14px; }
|
||||
}
|
||||
|
||||
.siteHeader{
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 10;
|
||||
background: rgba(0,0,0,.15);
|
||||
backdrop-filter: blur(8px);
|
||||
border-bottom: 1px solid rgba(255,255,255,.06);
|
||||
@container (max-width: 800px) {
|
||||
.readoutContainer { flex-direction: column; gap: 24px; }
|
||||
.colorPreviewSide { padding-top: 0; }
|
||||
.colorGroupWrap { gap: 6px; }
|
||||
.colorGroup { padding: 6px; gap: 6px; border-radius: 12px; }
|
||||
.hexCard { padding: 8px 4px; width: 90px; gap: 8px; border-radius: 10px; }
|
||||
.hexDigitDisplay { font-size: 32px; }
|
||||
.hexNibbleBulb { width: 16px !important; height: 16px !important; }
|
||||
.hexNibbleLabel { font-size: 16px; }
|
||||
.hexColWeight { font-size: 20px; margin-top: 6px; }
|
||||
.hexCardBtn { width: 28px; height: 28px; font-size: 12px; }
|
||||
.denaryValue, .hexValue, .binaryValue { font-size: 32px; gap: 10px; }
|
||||
}
|
||||
|
||||
.siteHeaderInner{
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
padding: 14px 20px;
|
||||
display:flex;
|
||||
align-items:center;
|
||||
justify-content:space-between;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.brand{
|
||||
color: var(--text);
|
||||
text-decoration:none;
|
||||
font-weight: 900;
|
||||
letter-spacing:.02em;
|
||||
}
|
||||
|
||||
.nav{
|
||||
display:flex;
|
||||
gap: 14px;
|
||||
flex-wrap:wrap;
|
||||
justify-content:flex-end;
|
||||
}
|
||||
.nav a{
|
||||
color: var(--muted);
|
||||
text-decoration:none;
|
||||
font-weight: 700;
|
||||
font-size: 14px;
|
||||
}
|
||||
.nav a:hover{ color: var(--text); }
|
||||
|
||||
.siteMain{
|
||||
min-height: calc(100vh - 140px);
|
||||
}
|
||||
|
||||
.siteFooter{
|
||||
border-top: 1px solid rgba(255,255,255,.08);
|
||||
margin-top: 32px;
|
||||
background: rgba(0,0,0,.10);
|
||||
}
|
||||
|
||||
.siteFooterInner{
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
padding: 18px 20px 26px;
|
||||
color: var(--muted);
|
||||
font-size: 12px;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.footerTitle{
|
||||
color: var(--text);
|
||||
opacity:.9;
|
||||
font-weight: 800;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
@media (max-width: 1100px) { .binaryPage { --toolbox-w: 330px; } .denaryValue { font-size: 48px; } .hexValue { font-size: 40px; } .binaryValue { font-size: 32px; } }
|
||||
@media (max-width: 900px) { .binaryPage { --toolbox-w: 320px; } .bitsGrid { grid-template-columns: repeat(var(--cols), minmax(84px, 1fr)); } .hexGrid { grid-template-columns: repeat(var(--cols), minmax(130px, 1fr)); } }
|
||||
Reference in New Issue
Block a user