From f70120c2a0ea00b44675db42501b519a8155c8fb Mon Sep 17 00:00:00 2001 From: Alexander Lyall Date: Mon, 30 Mar 2026 18:54:23 +0100 Subject: [PATCH] feat(app): update branding, improve button animations, and complete PC Components simulator - Replace logo with updated Computing:Box branding assets - Fix animations for Random and Reset buttons for smoother interaction - Implement full first version of the PC Components simulator - Update built output to reflect new assets, layout, and functionality - Remove legacy assets and outdated build files Signed-off-by: Alexander Lyall --- ...astro_type_script_index_0_lang.C_c_A3x5.js | 12 - dist/binary/index.html | 81 +- dist/favicon.svg | 9 - dist/hexadecimal/index.html | 79 +- dist/images/computing-box-logo.svg | Bin 1518588 -> 0 bytes dist/images/favicon.svg | 1017 ----------------- dist/index.html | 77 +- package-lock.json | 2 +- package.json | 2 +- ...crosoft_Nostalgic_Windows_Wallpaper_4k.jpg | Bin 0 -> 7627019 bytes public/favicon.ico | Bin 0 -> 15406 bytes public/favicon.svg | 9 - public/favicon.webp | Bin 0 -> 89258 bytes public/images/computing-box-logo-small.webp | Bin 0 -> 25924 bytes public/images/computing-box-logo.svg | Bin 1518588 -> 0 bytes public/images/computing-box-logo.webp | Bin 75356 -> 89258 bytes public/images/favicon.ico | Bin 15406 -> 15406 bytes public/images/favicon.svg | 1017 ----------------- public/images/favicon.webp | Bin 193146 -> 89258 bytes ...crosoft_Nostalgic_Windows_Wallpaper_4k.jpg | Bin 0 -> 7627019 bytes src/layouts/BaseLayout.astro | 79 +- src/pages/binary.astro | 2 +- src/pages/logic-gates.astro | 11 +- src/pages/pc-builder.astro | 17 +- src/scripts/binary.js | 2 +- src/scripts/logicGates.js | 141 ++- src/scripts/pcBuilder.js | 358 +++--- src/styles/global.css | 148 ++- src/styles/logic-gates.css | 95 +- src/styles/number-simulators.css | 33 +- src/styles/pc-builder.css | 15 +- 31 files changed, 859 insertions(+), 2347 deletions(-) delete mode 100644 dist/_astro/binary.astro_astro_type_script_index_0_lang.C_c_A3x5.js delete mode 100644 dist/favicon.svg delete mode 100644 dist/images/computing-box-logo.svg delete mode 100644 dist/images/favicon.svg create mode 100644 public/Microsoft_Nostalgic_Windows_Wallpaper_4k.jpg create mode 100644 public/favicon.ico delete mode 100644 public/favicon.svg create mode 100644 public/favicon.webp create mode 100644 public/images/computing-box-logo-small.webp delete mode 100644 public/images/computing-box-logo.svg delete mode 100644 public/images/favicon.svg create mode 100644 src/assets/Microsoft_Nostalgic_Windows_Wallpaper_4k.jpg diff --git a/dist/_astro/binary.astro_astro_type_script_index_0_lang.C_c_A3x5.js b/dist/_astro/binary.astro_astro_type_script_index_0_lang.C_c_A3x5.js deleted file mode 100644 index a23a7d5..0000000 --- a/dist/_astro/binary.astro_astro_type_script_index_0_lang.C_c_A3x5.js +++ /dev/null @@ -1,12 +0,0 @@ -(()=>{const d=document.getElementById("bitsGrid"),h=document.getElementById("denaryNumber"),M=document.getElementById("binaryNumber"),f=document.getElementById("bitsInput"),m=document.getElementById("modeToggle"),E=document.getElementById("modeHint"),T=document.getElementById("lblUnsigned"),k=document.getElementById("lblTwos"),H=document.getElementById("btnCustomBinary"),G=document.getElementById("btnCustomDenary"),P=document.getElementById("btnShiftLeft"),V=document.getElementById("btnShiftRight"),q=document.getElementById("btnDec"),Z=document.getElementById("btnInc"),z=document.getElementById("btnClear"),I=document.getElementById("btnRandom"),O=document.getElementById("btnBitsUp"),W=document.getElementById("btnBitsDown"),R=document.getElementById("toolboxToggle"),w=document.getElementById("binaryPage");let i=b(Number(f?.value??8),1,64),s=new Array(i).fill(!1),u=null;function b(t,n,e){return Number.isFinite(t)?Math.max(n,Math.min(e,Math.trunc(t))):n}function l(){return!!m?.checked}function a(t){return 1n<>BigInt(o)&1n)===1n}function L(){const t=v();return s[i-1]===!0?t-a(i):t}function x(t){const n=a(i);let e=t;e=(e%n+n)%n,g(e)}function j(){let t="";for(let n=i-1;n>=0;n--){t+=s[n]?"1":"0";const e=i-n;n!==0&&e%4===0&&(t+=" ")}return t.trimEnd()}function D(){E&&(l()?E.textContent="Tip: In two's complement, the left-most bit (MSB) represents a negative value.":E.textContent="Tip: In unsigned binary, all bits represent positive values.")}function A(){if(!d)return;const t=d.parentElement;if(!t)return;const n=t.getBoundingClientRect().width,o=b(Math.floor(n/100),1,12);d.style.setProperty("--cols",String(Math.min(o,i)))}function C(t){i=b(t,1,64),f&&(f.value=String(i));const n=s.slice();s=new Array(i).fill(!1);for(let e=0;e=0;e--){const o=document.createElement("div");o.className="bit",o.innerHTML=` - -
- - `,d.appendChild(o)}d.querySelectorAll('input[type="checkbox"]').forEach(e=>{e.addEventListener("change",()=>{const o=Number(e.dataset.index);s[o]=e.checked,r()})}),A(),r()}function J(){for(let t=0;t{const n=Number(t.dataset.index);t.checked=!!s[n]})}function Q(){for(let t=0;tc)return!1;x(e)}else{if(e<0n||e>$(i))return!1;g(e)}return r(),!0}function tt(){for(let t=i-1;t>=1;t--)s[t]=s[t-1];s[0]=!1,r()}function nt(){const t=s[i-1];for(let n=0;nn&&(e=t),x(e)}else{const t=y(i);g((v()+1n)%t)}r()}function ot(){if(l()){const t=B(i),n=p(i);let e=L()-1n;e0n&&(c=c>>U),c{lt(),Date.now()-t>=n&&(clearInterval(u),u=null,N(!1))},80)}function S(t){const n=b(t,1,64);C(n)}function F(t){if(!w)return;w.classList.toggle("toolboxCollapsed",!!t);const n=!t;R?.setAttribute("aria-expanded",n?"true":"false")}m?.addEventListener("change",r),H?.addEventListener("click",()=>{const t=prompt(`Enter binary (spaces allowed). Current width: ${i} bits`);t!==null&&(Y(t)||alert("Invalid binary"))}),G?.addEventListener("click",()=>{const t=prompt(l()?`Enter denary (${B(i).toString()} to ${p(i).toString()}):`:`Enter denary (0 to ${$(i).toString()}):`);t!==null&&(_(t)||alert("Invalid denary for current mode/bit width"))}),P?.addEventListener("click",tt),V?.addEventListener("click",nt),Z?.addEventListener("click",it),q?.addEventListener("click",ot),z?.addEventListener("click",et),I?.addEventListener("click",rt),O?.addEventListener("click",()=>S(i+1)),W?.addEventListener("click",()=>S(i-1)),f?.addEventListener("change",()=>S(Number(f.value))),R?.addEventListener("click",()=>{const t=w?.classList.contains("toolboxCollapsed");F(!t)}),window.addEventListener("resize",()=>{A()}),D(),C(i),F(!1)})(); diff --git a/dist/binary/index.html b/dist/binary/index.html index 669dde1..9b326ba 100644 --- a/dist/binary/index.html +++ b/dist/binary/index.html @@ -13,8 +13,81 @@ var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s); })(); - -
Denary
0
Binary
00000000
Computer Science Concept Simulators
Version: +dev • © 2026 Computing:Box • Created with ♥ by Mr A Lyall
\ No newline at end of file diff --git a/dist/favicon.svg b/dist/favicon.svg deleted file mode 100644 index f157bd1..0000000 --- a/dist/favicon.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - diff --git a/dist/hexadecimal/index.html b/dist/hexadecimal/index.html index 2febed5..0f18a89 100644 --- a/dist/hexadecimal/index.html +++ b/dist/hexadecimal/index.html @@ -13,8 +13,81 @@ var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s); })(); - -
Denary
0
Hexadecimal
00
Binary
00000000