From 5c7c9d2d3a96bbddae7d5dff9e67754e12d1b6e6 Mon Sep 17 00:00:00 2001 From: Victor Westerlund Date: Thu, 13 Mar 2025 15:16:06 +0000 Subject: [PATCH] chore: clean up MORE missed references to battlestation (#31) Apparently I didn't get em' all in #27 Reviewed-on: https://codeberg.org/vlw/vlw.se/pulls/31 --- .../css/pages/about/battlestation-retired.css | 45 --- .../assets/css/pages/about/battlestation.css | 290 ------------------ .../js/pages/about/battlestation-retired.js | 0 public/assets/js/pages/about/battlestation.js | 72 ----- public/assets/media/battlestation.svg | 173 ----------- src/Database/Tables/Battlestation/Chassis.php | 19 -- .../Tables/Battlestation/Config/ChassisMb.php | 14 - .../Tables/Battlestation/Config/Config.php | 15 - .../Battlestation/Config/MbCpuCooler.php | 24 -- .../Tables/Battlestation/Config/MbDram.php | 23 -- .../Tables/Battlestation/Config/MbGpu.php | 14 - .../Tables/Battlestation/Config/MbPsu.php | 14 - .../Tables/Battlestation/Config/MbStorage.php | 25 -- src/Database/Tables/Battlestation/Coolers.php | 16 - src/Database/Tables/Battlestation/Cpu.php | 31 -- src/Database/Tables/Battlestation/Dram.php | 37 --- src/Database/Tables/Battlestation/Gpu.php | 20 -- src/Database/Tables/Battlestation/Mb.php | 30 -- src/Database/Tables/Battlestation/Psu.php | 31 -- src/Database/Tables/Battlestation/Storage.php | 45 --- 20 files changed, 938 deletions(-) delete mode 100644 public/assets/css/pages/about/battlestation-retired.css delete mode 100644 public/assets/css/pages/about/battlestation.css delete mode 100644 public/assets/js/pages/about/battlestation-retired.js delete mode 100644 public/assets/js/pages/about/battlestation.js delete mode 100644 public/assets/media/battlestation.svg delete mode 100644 src/Database/Tables/Battlestation/Chassis.php delete mode 100644 src/Database/Tables/Battlestation/Config/ChassisMb.php delete mode 100644 src/Database/Tables/Battlestation/Config/Config.php delete mode 100644 src/Database/Tables/Battlestation/Config/MbCpuCooler.php delete mode 100644 src/Database/Tables/Battlestation/Config/MbDram.php delete mode 100644 src/Database/Tables/Battlestation/Config/MbGpu.php delete mode 100644 src/Database/Tables/Battlestation/Config/MbPsu.php delete mode 100644 src/Database/Tables/Battlestation/Config/MbStorage.php delete mode 100644 src/Database/Tables/Battlestation/Coolers.php delete mode 100644 src/Database/Tables/Battlestation/Cpu.php delete mode 100644 src/Database/Tables/Battlestation/Dram.php delete mode 100644 src/Database/Tables/Battlestation/Gpu.php delete mode 100644 src/Database/Tables/Battlestation/Mb.php delete mode 100644 src/Database/Tables/Battlestation/Psu.php delete mode 100644 src/Database/Tables/Battlestation/Storage.php diff --git a/public/assets/css/pages/about/battlestation-retired.css b/public/assets/css/pages/about/battlestation-retired.css deleted file mode 100644 index a6a92da..0000000 --- a/public/assets/css/pages/about/battlestation-retired.css +++ /dev/null @@ -1,45 +0,0 @@ -/* # Overrides */ - -:root { - --primer-color-accent: 148, 255, 21; - --color-accent: rgb(var(--primer-color-accent)); -} - -vv-shell { - display: flex; - flex-direction: column; - gap: var(--padding); -} - -/* # Content */ - -/* ## Title */ - -section.title { - display: flex; - flex-direction: column; - gap: 5px; -} - -/* ## Actions */ - -section.actions { - display: grid; - grid-template-columns: repeat(3, 1fr); - gap: var(--padding); -} - -/* # Size quries */ - -@media (max-width: 800px) { - section.actions { - grid-template-columns: repeat(2, 1fr); - } -} - -@media (max-width: 600px) { - section.actions { - display: flex; - flex-direction: column; - } -} \ No newline at end of file diff --git a/public/assets/css/pages/about/battlestation.css b/public/assets/css/pages/about/battlestation.css deleted file mode 100644 index 981c2cc..0000000 --- a/public/assets/css/pages/about/battlestation.css +++ /dev/null @@ -1,290 +0,0 @@ -/* # Overrides */ - -:root { - --primer-color-accent: 148, 255, 21; - --color-accent: rgb(var(--primer-color-accent)); -} - -vv-shell { - display: flex; - flex-direction: column; - gap: var(--padding); -} - -/* # Content */ - -/* ## Title */ - -section.title { - display: flex; - flex-direction: column; - gap: 5px; - padding: calc(var(--padding) * 1.5); - background-color: rgba(var(--primer-color-accent), .1); - border-radius: 6px; -} - -section.title > div { - margin-top: calc(var(--padding) / 2); - display: flex; - gap: var(--padding); -} - -/* ## Heading */ - -section.heading h1::before, -section.heading h1::after { - opacity: .4; -} - -section.heading h1::before { - content: "“"; -} - -section.heading h1::after { - content: "”"; -} - -/* ## Config */ - -section.config { - position: relative; - display: grid; - grid-template-columns: 300px 1fr; - gap: calc(var(--padding) * 2); -} - -section.config:nth-child(4n+2) { - grid-template-columns: 1fr 300px; -} - -section.config:nth-child(4n+2) > svg { - order: 1; -} - -/* ### PC */ - -section.config > svg { - position: sticky; - top: calc(var(--running-size) + var(--padding)); - width: 100%; -} - -section.config > svg :is(rect, path) { - transition: 300ms; - stroke: white; -} - -section.config > svg.active :is(rect, path), -section.config > svg:hover :is(rect, path) { - opacity: .4; -} - -section.config > svg g.active rect, -section.config > svg g.active path, -section.config > svg g:not(.group):hover rect, -section.config > svg g:not(.group):hover path { - opacity: 1; - stroke: var(--color-accent); -} - -section.config > svg g.active rect, -section.config > svg g:not(.group):hover rect { - filter: drop-shadow(0 0 10px rgba(var(--primer-color-accent), .4)); -} - -/* #### Case */ - -section.config g.case:not(:hover, .active) :is(rect, path) { - opacity: .2; -} - -section.config > svg g.active path, -section.config > svg g:not(.group):hover path { - fill: var(--color-accent); -} - -/* #### Motherboard */ - -section.config > svg .mb .chips { - opacity: 0; -} - -/* #### Active states */ - -section.config > svg g:not(.group) { - display: none; -} - -section.config[data-dram="1"] > svg g.drams g.dram:nth-child(1), -section.config[data-dram="2"] > svg g.drams g.dram:nth-child(3n+1), -section.config[data-dram="3"] > svg g.drams g.dram:nth-child(-n+3), -section.config[data-dram="4"] > svg g.drams g.dram, - -section.config[data-drives-mdottwo="1"] > svg g.mdottwo g.drive:nth-child(1), -section.config[data-drives-mdottwo="2"] > svg g.mdottwo g.drive:nth-child(-n+2), -section.config[data-drives-mdottwo="3"] > svg g.mdottwo g.drive:nth-child(-n+3), - -section.config[data-drives-twodotfive="1"] > svg g.twodotfive g.drive:nth-child(1), -section.config[data-drives-twodotfive="2"] > svg g.twodotfive g.drive:nth-child(-n+2), -section.config[data-drives-twodotfive="3"] > svg g.twodotfive g.drive:nth-child(-n+3), - -section.config[data-drives-threedotfive="1"] > svg g.threedotfive g.drive:nth-child(1), -section.config[data-drives-threedotfive="2"] > svg g.threedotfive g.drive:nth-child(-n+2), -section.config[data-drives-threedotfive="3"] > svg g.threedotfive g.drive:nth-child(-n+3), - -section.config[data-mb="1"] > svg g.mb, -section.config[data-psu="1"] > svg g.psu, -section.config[data-gpu="1"] > svg g.gpu, -section.config[data-cpu="1"] > svg g.cpu, -section.config[data-case="1"] > svg g.case { - display: initial; -} - -/* ## Specs */ - -section.config .specs { - position: relative; - display: flex; - flex-direction: column; - gap: calc(var(--padding) / 2); - border-radius: 6px; -} - -section.config .specs :is(.spec, .group) { - --border-width: 4px; - - transition: 300ms background-color, 300ms border-color, 500ms box-shadow; - padding: calc(var(--padding) - var(--border-width)); - border: solid var(--border-width) transparent; - background-color: rgba(255, 255, 255, .03); - border-radius: 6px; - cursor: pointer; -} - -section.config .specs :is(.spec, .group) * { - pointer-events: none; -} - -/* ### Active state */ - -section.config .specs.active { - background-color: rgba(255, 255, 255, .03); -} - -section.config .specs.active :is(.group, .spec:not(.active)) { - display: none; -} - -/* ### Spec */ - -section.config .specs .spec { - display: flex; - flex-direction: column; -} - -section.config .specs .spec:hover { - border-color: rgba(255, 255, 255, .05); - background-color: rgba(255, 255, 255, .1); - box-shadow: 0 0 30px 10px rgba(255, 255, 255, .05); -} - -section.config .specs .spec.active { - border-color: var(--color-accent); - background-color: rgba(var(--primer-color-accent), .1); - box-shadow: 0 0 30px 10px rgba(var(--primer-color-accent), .05); - cursor: initial; -} - -section.config .specs.active .spec.active { - position: sticky; - top: calc(var(--running-size) + var(--padding)); -} - -section.config .specs .spec h3 { - color: rgba(255, 255, 255, .3); -} - -section.config .specs .spec span { - color: white; -} - -section.config .specs .spec > div { - display: none; - grid-template-columns: repeat(2, 1fr); - gap: calc(var(--padding) / 2); - margin-top: var(--padding); -} - -section.config .specs .spec.active > div { - display: grid; -} - -section.config .specs .spec > div label { - color: var(--color-accent); -} - -section.config .specs .spec > svg { - display: none; - height: calc(var(--padding) / 2); - margin: 0 auto; - margin-top: calc(var(--padding) / 2); - fill: var(--color-accent); -} - -/* ### Group */ - -section.config .specs .group { - display: flex; - justify-content: space-between; - align-items: center; -} - -section.config .specs .group.active { - background-color: rgba(255, 255, 255, .2); -} - -section.config .specs .group:hover { - background-color: rgba(255, 255, 255, .1); -} - -section.config .specs .group.active:hover { - background-color: rgba(255, 255, 255, .3); -} - -section.config .specs .group > svg { - transition: 300ms transform; - fill: var(--color-accent); - height: 10px; -} - -section.config .specs .group.active > svg { - transform: rotateX(180deg); -} - -/* #### Collection */ - -section.config .specs .collection { - display: none; -} - -section.config .specs .group.active + .collection { - display: contents; -} - -/* # Size quries */ - -@media (max-width: 700px) { - section.title > div { - flex-direction: column; - } - - section.config, - section.config:nth-child(4n+2) { - grid-template-columns: 1fr; - } - - section.config > svg { - display: none; - } -} \ No newline at end of file diff --git a/public/assets/js/pages/about/battlestation-retired.js b/public/assets/js/pages/about/battlestation-retired.js deleted file mode 100644 index e69de29..0000000 diff --git a/public/assets/js/pages/about/battlestation.js b/public/assets/js/pages/about/battlestation.js deleted file mode 100644 index d587920..0000000 --- a/public/assets/js/pages/about/battlestation.js +++ /dev/null @@ -1,72 +0,0 @@ -import { Elevent } from "/assets/js/modules/npm/Elevent.mjs"; - -new Elevent("click", document.querySelectorAll(".group"), (event) => { - // Collapse self if already active and current target - if (event.target.classList.contains("active")) { - return event.target.classList.remove("active"); - } - - // Collapse all and open current target - [...event.target.closest(".specs").querySelectorAll(".group")].forEach(element => element.classList.remove("active")); - event.target.classList.add("active"); -}); - -new Elevent("click", document.querySelectorAll(".spec"), (event) => { - event.target.classList.add("active"); - event.target.addEventListener("mouseleave", () => event.target.classList.remove("active")); -}); - -// Bind hover listeners for components in the SVGs -[...document.querySelectorAll("section.config g:not(.group)")].forEach(element => { - element.addEventListener("mouseenter", () => { - // Find an element in the most adjacent speclist and highlighit it - const target = element.closest("section.config").querySelector(`.spec[data-target="${element.dataset.target}"]`); - // Get closest specs wrapper element - const specsElement = target.closest(".specs"); - // Spec item is part of a collection, we need to expand the group if that is the case - const collectionElement = target.closest(".collection") ?? null; - // Don't close the group after hove ends - let closeGroupOnLeave = false; - - // Set fixed height on .specs wrapper to prevent glitchy page jumping when scrolled - specsElement.style.setProperty("height", `${specsElement.offsetHeight}px`); - target.classList.add("active"); - specsElement.classList.add("active"); - - if (collectionElement) { - // Close the group on leave if the group wasn't active before hovering - closeGroupOnLeave = !collectionElement.previousElementSibling.classList.contains("active"); - - collectionElement.previousElementSibling.classList.add("active"); - } - - // Bind hover leave listener - element.addEventListener("mouseleave", () => { - // Reset to initial states - target.classList.remove("active"); - specsElement.classList.remove("active"); - specsElement.style.removeProperty("height"); - - // Group was closed prior to hover, let's close it on hover leave - if (closeGroupOnLeave) { - collectionElement.previousElementSibling.classList.remove("active"); - } - }, { once: true }); - }); -}); - -// Bind event listeners for components in the spec lists -[...document.querySelectorAll("section.config .spec:not(.group)")].forEach(element => { - element.addEventListener("mouseenter", () => { - const svgTarget = element.closest("section.config").querySelector(`svg`); - const target = svgTarget.querySelector(`svg g[data-target="${element.dataset.target}"]`); - - svgTarget.classList.add("active"); - target.classList.add("active"); - - element.addEventListener("mouseleave", () => { - svgTarget.classList.remove("active"); - target.classList.remove("active"); - }, { once: true }); - }); -}); \ No newline at end of file diff --git a/public/assets/media/battlestation.svg b/public/assets/media/battlestation.svg deleted file mode 100644 index 633f67d..0000000 --- a/public/assets/media/battlestation.svg +++ /dev/null @@ -1,173 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/Database/Tables/Battlestation/Chassis.php b/src/Database/Tables/Battlestation/Chassis.php deleted file mode 100644 index bdb4619..0000000 --- a/src/Database/Tables/Battlestation/Chassis.php +++ /dev/null @@ -1,19 +0,0 @@ -