You've already forked computing-box
Update to increment/decrement buttons and rearrangement of buttons.
Page now broken... Signed-off-by: Alexander Lyall <alex@adcm.uk>
This commit is contained in:
@@ -1,4 +1,14 @@
|
||||
/* DSEG7ClassicRegular font */
|
||||
:root{
|
||||
--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);
|
||||
}
|
||||
|
||||
@font-face{
|
||||
font-family: "DSEG7ClassicRegular";
|
||||
src:
|
||||
@@ -9,8 +19,17 @@
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
.binary-wrap{
|
||||
padding-top: 6px;
|
||||
body{
|
||||
margin:0;
|
||||
font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
|
||||
background: var(--bg);
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
.wrap{
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
padding: 32px 20px 60px;
|
||||
}
|
||||
|
||||
.topGrid{
|
||||
@@ -28,10 +47,10 @@
|
||||
|
||||
.label{
|
||||
letter-spacing: .18em;
|
||||
font-weight: 800;
|
||||
font-weight: 700;
|
||||
color: var(--muted);
|
||||
text-transform: uppercase;
|
||||
font-size: 13px;
|
||||
font-size: 14px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
@@ -42,41 +61,33 @@
|
||||
text-shadow: 0 0 18px var(--accent-dim);
|
||||
}
|
||||
|
||||
.denary{
|
||||
font-size: 72px; /* smaller */
|
||||
.denaryValue{
|
||||
font-size: 70px; /* smaller than before */
|
||||
line-height: 1.0;
|
||||
margin: 6px 0 10px;
|
||||
}
|
||||
|
||||
.binary{
|
||||
font-size: 46px; /* smaller */
|
||||
.binaryValue{
|
||||
font-size: 52px; /* smaller than before */
|
||||
letter-spacing: .12em;
|
||||
line-height: 1.15;
|
||||
line-height: 1.0;
|
||||
margin: 6px 0 14px;
|
||||
white-space: pre-wrap;
|
||||
word-break: break-word;
|
||||
display:inline-block;
|
||||
text-align:center;
|
||||
white-space: pre; /* keep spaces */
|
||||
}
|
||||
|
||||
.controls{
|
||||
margin-top: 8px;
|
||||
.controlsStack{
|
||||
margin-top: 10px;
|
||||
display:flex;
|
||||
justify-content:center;
|
||||
gap: 12px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.controls--twoRows{
|
||||
flex-direction: column;
|
||||
flex-direction:column;
|
||||
gap: 10px;
|
||||
align-items:center;
|
||||
}
|
||||
|
||||
.controlsRow{
|
||||
display:flex;
|
||||
gap: 12px;
|
||||
justify-content:center;
|
||||
flex-wrap: wrap;
|
||||
flex-wrap:wrap;
|
||||
}
|
||||
|
||||
.btn{
|
||||
@@ -85,29 +96,19 @@
|
||||
color: #fff;
|
||||
padding: 12px 14px;
|
||||
border-radius: 12px;
|
||||
font-weight: 800;
|
||||
font-weight: 700;
|
||||
cursor: pointer;
|
||||
min-width: 160px;
|
||||
min-width: 170px;
|
||||
}
|
||||
|
||||
.btn:active{ transform: translateY(1px); }
|
||||
|
||||
.btn--green{
|
||||
background: rgba(51,255,122,.16);
|
||||
.btnAccent{
|
||||
background: rgba(51,255,122,.18);
|
||||
border-color: rgba(51,255,122,.45);
|
||||
}
|
||||
|
||||
.btn--green:hover{
|
||||
background: rgba(51,255,122,.22);
|
||||
}
|
||||
|
||||
.btn--spin{
|
||||
min-width: 120px;
|
||||
font-size: 18px; /* bigger */
|
||||
}
|
||||
|
||||
.divider{
|
||||
margin-top: 22px;
|
||||
margin-top: 26px;
|
||||
border-top: 1px solid var(--line);
|
||||
}
|
||||
|
||||
@@ -118,15 +119,15 @@
|
||||
}
|
||||
|
||||
.card{
|
||||
background: var(--panel);
|
||||
border: 1px solid var(--panel-border);
|
||||
background: var(--panel2);
|
||||
border: 1px solid rgba(255,255,255,.10);
|
||||
border-radius: 14px;
|
||||
padding: 14px;
|
||||
}
|
||||
|
||||
.cardTitle{
|
||||
letter-spacing: .18em;
|
||||
font-weight: 900;
|
||||
font-weight: 800;
|
||||
color: var(--muted);
|
||||
text-transform: uppercase;
|
||||
font-size: 12px;
|
||||
@@ -149,16 +150,17 @@
|
||||
|
||||
.toggleLabel{
|
||||
color: var(--text);
|
||||
font-weight: 800;
|
||||
font-weight: 700;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
/* Shared toggle switch (mode + bit switches) */
|
||||
.switch{
|
||||
position:relative;
|
||||
width:56px;
|
||||
height:34px;
|
||||
position: relative;
|
||||
width: 56px;
|
||||
height: 34px;
|
||||
display:inline-block;
|
||||
flex:0 0 auto;
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
.switch input{
|
||||
opacity:0;
|
||||
@@ -170,19 +172,19 @@
|
||||
inset:0;
|
||||
background: rgba(255,255,255,.10);
|
||||
border: 1px solid rgba(255,255,255,.14);
|
||||
border-radius:999px;
|
||||
transition:.18s ease;
|
||||
border-radius: 999px;
|
||||
transition: .18s ease;
|
||||
}
|
||||
.slider::before{
|
||||
content:"";
|
||||
position:absolute;
|
||||
height:28px;
|
||||
width:28px;
|
||||
left:3px;
|
||||
top:2px;
|
||||
height: 28px;
|
||||
width: 28px;
|
||||
left: 3px;
|
||||
top: 2px;
|
||||
background: rgba(255,255,255,.92);
|
||||
border-radius:50%;
|
||||
transition:.18s ease;
|
||||
border-radius: 50%;
|
||||
transition: .18s ease;
|
||||
}
|
||||
.switch input:checked + .slider{
|
||||
background: rgba(51,255,122,.20);
|
||||
@@ -193,19 +195,47 @@
|
||||
background: var(--accent);
|
||||
}
|
||||
|
||||
.bitWidthRow{
|
||||
/* Tools card layout */
|
||||
.toolRow{
|
||||
display:grid;
|
||||
grid-template-columns:44px 1fr 44px;
|
||||
gap:10px;
|
||||
align-items:center;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.toolRow2{
|
||||
display:grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.toolBtn{
|
||||
height: 48px;
|
||||
border-radius: 12px;
|
||||
background: rgba(255,255,255,.06);
|
||||
border: 1px solid rgba(255,255,255,.14);
|
||||
color: #fff;
|
||||
cursor: pointer;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.toolSpin{
|
||||
font-size: 22px; /* bigger spin feature */
|
||||
}
|
||||
|
||||
/* Bit width control */
|
||||
.bitWidthRow{
|
||||
display:grid;
|
||||
grid-template-columns: 44px 1fr 44px;
|
||||
gap: 10px;
|
||||
align-items:center;
|
||||
}
|
||||
.miniBtn{
|
||||
height:44px;
|
||||
width:44px;
|
||||
border-radius:12px;
|
||||
background: rgba(255,255,255,.06);
|
||||
border: 1px solid rgba(255,255,255,.14);
|
||||
background:rgba(255,255,255,.06);
|
||||
border:1px solid rgba(255,255,255,.14);
|
||||
color:#fff;
|
||||
cursor:pointer;
|
||||
font-weight:900;
|
||||
@@ -213,8 +243,8 @@
|
||||
}
|
||||
|
||||
.bitInputWrap{
|
||||
background: rgba(255,255,255,.06);
|
||||
border: 1px solid rgba(255,255,255,.14);
|
||||
background:rgba(255,255,255,.06);
|
||||
border:1px solid rgba(255,255,255,.14);
|
||||
border-radius:12px;
|
||||
padding:10px 12px;
|
||||
display:flex;
|
||||
@@ -222,22 +252,20 @@
|
||||
justify-content:space-between;
|
||||
gap:12px;
|
||||
}
|
||||
|
||||
.bitInputLabel{
|
||||
color: var(--muted);
|
||||
color:var(--muted);
|
||||
font-size:12px;
|
||||
font-weight:900;
|
||||
font-weight:800;
|
||||
letter-spacing:.18em;
|
||||
text-transform:uppercase;
|
||||
}
|
||||
|
||||
.bitInput{
|
||||
width:86px;
|
||||
text-align:right;
|
||||
background: transparent;
|
||||
border: none;
|
||||
outline: none;
|
||||
color: var(--accent);
|
||||
background:transparent;
|
||||
border:none;
|
||||
outline:none;
|
||||
color:var(--accent);
|
||||
font-family:"DSEG7ClassicRegular", ui-monospace, monospace;
|
||||
font-size:28px;
|
||||
}
|
||||
@@ -247,17 +275,17 @@
|
||||
margin:0;
|
||||
}
|
||||
|
||||
/* Bits: wrap every 8 */
|
||||
.bits{
|
||||
--cols: 8;
|
||||
margin-top: 26px;
|
||||
padding-top: 18px;
|
||||
/* Bits area (wrap every 8 bits, centered) */
|
||||
.bitsWrap{
|
||||
margin-top: 22px;
|
||||
}
|
||||
|
||||
.bitsGrid{
|
||||
display:grid;
|
||||
grid-template-columns: repeat(var(--cols), 90px);
|
||||
justify-content: center; /* centres when < 8 too */
|
||||
gap: 18px;
|
||||
align-items:end;
|
||||
text-align:center;
|
||||
justify-content:center;
|
||||
grid-template-columns: repeat(8, minmax(90px, 1fr)); /* wraps at 8 */
|
||||
padding-top: 18px;
|
||||
}
|
||||
|
||||
.bit{
|
||||
@@ -266,32 +294,60 @@
|
||||
align-items:center;
|
||||
gap: 10px;
|
||||
padding: 8px 4px;
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
/* Bulb emoji bigger */
|
||||
/* “Bulb like 💡” but consistent + bigger */
|
||||
.bulb{
|
||||
font-size: 26px; /* bigger */
|
||||
width: 34px; /* bigger */
|
||||
height: 34px; /* bigger */
|
||||
border-radius: 50%;
|
||||
background: rgba(255,255,255,.08);
|
||||
border: 1px solid rgba(255,255,255,.12);
|
||||
box-shadow: none;
|
||||
display:flex;
|
||||
align-items:center;
|
||||
justify-content:center;
|
||||
font-size: 20px;
|
||||
line-height: 1;
|
||||
opacity: .55;
|
||||
}
|
||||
.bulb::before{
|
||||
content: "💡";
|
||||
filter: grayscale(1);
|
||||
opacity: .35;
|
||||
transform: translateY(2px);
|
||||
}
|
||||
.bulb.on{
|
||||
filter: grayscale(0);
|
||||
opacity: 1;
|
||||
text-shadow: 0 0 16px rgba(255,216,107,.55);
|
||||
background: rgba(255,216,107,.18);
|
||||
border-color: rgba(255,216,107,.55);
|
||||
box-shadow: 0 0 18px rgba(255,216,107,.45);
|
||||
}
|
||||
.bulb.on::before{
|
||||
filter: grayscale(0);
|
||||
}
|
||||
|
||||
/* Bit value (MSB becomes negative in two’s mode via JS label text) */
|
||||
.bitVal{
|
||||
font-family:"DSEG7ClassicRegular", ui-monospace, monospace;
|
||||
font-size: 28px;
|
||||
color: var(--text);
|
||||
opacity: .95;
|
||||
line-height: 1;
|
||||
min-height: 34px;
|
||||
min-height: 32px;
|
||||
}
|
||||
|
||||
/* Make sure small bit counts still look centered/nice */
|
||||
.bitsGrid.bitsFew{
|
||||
grid-template-columns: repeat(var(--cols, 4), minmax(90px, 1fr));
|
||||
}
|
||||
|
||||
@media (max-width: 980px){
|
||||
.topGrid{ grid-template-columns: 1fr; }
|
||||
.denary{ font-size: 62px; }
|
||||
.binary{ font-size: 40px; }
|
||||
.denaryValue{ font-size: 62px; }
|
||||
.binaryValue{ font-size: 46px; }
|
||||
}
|
||||
|
||||
@media (max-width: 520px){
|
||||
.btn{ min-width: 150px; }
|
||||
.bitsGrid{ grid-template-columns: repeat(4, minmax(90px, 1fr)); }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user