HASH 27faa15aa3d4
DATE 2025-11-13
SUBJECT web: frontmatter fix
FILES 2 CHANGED
HASH 27faa15aa3d4
DATE 2025-11-13
SUBJECT web: frontmatter fix
FILES 2 CHANGED
┌─ ...rc/components/Leaderboard/ClassFilterSelect/ClassFilterSelect.astro ───┐
│ diff --git a/web/src/components/Leaderboard/ClassFilterSelect/ClassFilterSelect.as │
│ tro b/web/src/components/Leaderboard/ClassFilterSelect/ClassFilterSelect.astro │
│ index ae7610f..c818387 100644 │
│ --- a/web/src/components/Leaderboard/ClassFilterSelect/ClassFilterSelect.astro │
│ +++ b/web/src/components/Leaderboard/ClassFilterSelect/ClassFilterSelect.astro │
│ @@ -1,3 +1,4 @@ │
│ +--- │
│ import "./ClassFilterSelect.scss"; │
│ │
│ interface Props { │
│ @@ -36,58 +37,66 @@ const classes = [ │
│ </div> │
│ │
│ <script> │
│ - document.getElementById('class-filter')?.addEventListener('change', (e) => { │
│ + document.getElementById("class-filter")?.addEventListener("change", (e) => { │
│ const select = e.target as HTMLSelectElement; │
│ const selectedClass = select.value; │
│ │
│ // Check if we're using query params │
│ const searchParams = new URLSearchParams(window.location.search); │
│ - const usesQueryParams = searchParams.toString().length > 0 && !window.locatio │
│ n.pathname.includes('/players/'); │
│ + const usesQueryParams = │
│ + searchParams.toString().length > 0 && │
│ + !window.location.pathname.includes("/players/"); │
│ │
│ if (usesQueryParams) { │
│ // Query param mode │
│ - if (selectedClass === 'all') { │
│ - searchParams.delete('class'); │
│ + if (selectedClass === "all") { │
│ + searchParams.delete("class"); │
│ } else { │
│ - searchParams.set('class', selectedClass); │
│ + searchParams.set("class", selectedClass); │
│ } │
│ - searchParams.delete('page'); // reset to page 1 │
│ + searchParams.delete("page"); // reset to page 1 │
│ window.location.href = `${window.location.pathname}?${searchParams.toString │
│ ()}`; │
│ } else { │
│ // Path-based mode for player leaderboards │
│ - const pathParts = window.location.pathname.split('/').filter(p => p); │
│ + const pathParts = window.location.pathname.split("/").filter((p) => p); │
│ │
│ // Detect base path │
│ - const basePath = pathParts[0] === 'test-challenge-mode' ? 'test-challenge-m │
│ ode' : 'challenge-mode'; │
│ + const basePath = │
│ + pathParts[0] === "test-challenge-mode" │
│ + ? "test-challenge-mode" │
│ + : "challenge-mode"; │
│ │
│ // Extract season │
│ - let seasonSlug = 'season1'; │
│ - if (pathParts.length >= 2 && pathParts[1].startsWith('season')) { │
│ + let seasonSlug = "season1"; │
│ + if (pathParts.length >= 2 && pathParts[1].startsWith("season")) { │
│ seasonSlug = pathParts[1]; │
│ } │
│ │
│ // Find the 'players' segment │
│ - const playersIndex = pathParts.indexOf('players'); │
│ + const playersIndex = pathParts.indexOf("players"); │
│ if (playersIndex === -1) return; │
│ │
│ // Parse current scope │
│ let newPath: string; │
│ const scopeParts = pathParts.slice(playersIndex + 1); │
│ │
│ - if (scopeParts.length === 0 || scopeParts[0] === 'global') { │
│ + if (scopeParts.length === 0 || scopeParts[0] === "global") { │
│ // Global scope │
│ - newPath = `/${basePath}/${seasonSlug}/players/global${selectedClass !== ' │
│ all' ? '/' + selectedClass : ''}`; │
│ + newPath = `/${basePath}/${seasonSlug}/players/global${selectedClass !== " │
│ all" ? "/" + selectedClass : ""}`; │
│ } else { │
│ const region = scopeParts[0]; │
│ │
│ // Check if second part is a class or realm │
│ - if (scopeParts.length === 1 || (scopeParts.length >= 2 && scopeParts[1].i │
│ ncludes('_'))) { │
│ + if ( │
│ + scopeParts.length === 1 || │
│ + (scopeParts.length >= 2 && scopeParts[1].includes("_")) │
│ + ) { │
│ // Regional scope (region or region/class) │
│ - newPath = `/${basePath}/${seasonSlug}/players/${region}${selectedClass │
│ !== 'all' ? '/' + selectedClass : ''}`; │
│ + newPath = `/${basePath}/${seasonSlug}/players/${region}${selectedClass │
│ !== "all" ? "/" + selectedClass : ""}`; │
│ } else { │
│ // Realm scope (region/realm or region/realm/class) │
│ const realm = scopeParts[1]; │
│ - newPath = `/${basePath}/${seasonSlug}/players/${region}/${realm}${selec │
│ tedClass !== 'all' ? '/' + selectedClass : ''}`; │
│ + newPath = `/${basePath}/${seasonSlug}/players/${region}/${realm}${selec │
│ tedClass !== "all" ? "/" + selectedClass : ""}`; │
│ } │
│ } │
│ │
└────────────────────────────────────────────────────────────────────────────────────┘
┌─ ...elect/ClassFilterSelect.astro ───┐
│ diff --git a/web/src/components/Leaderboard/ │
│ ClassFilterSelect/ClassFilterSelect.astro b/ │
│ web/src/components/Leaderboard/ClassFilterSe │
│ lect/ClassFilterSelect.astro │
│ index ae7610f..c818387 100644 │
│ --- a/web/src/components/Leaderboard/ClassFi │
│ lterSelect/ClassFilterSelect.astro │
│ +++ b/web/src/components/Leaderboard/ClassFi │
│ lterSelect/ClassFilterSelect.astro │
│ @@ -1,3 +1,4 @@ │
│ +--- │
│ import "./ClassFilterSelect.scss"; │
│ │
│ interface Props { │
│ @@ -36,58 +37,66 @@ const classes = [ │
│ </div> │
│ │
│ <script> │
│ - document.getElementById('class-filter')?. │
│ addEventListener('change', (e) => { │
│ + document.getElementById("class-filter")?. │
│ addEventListener("change", (e) => { │
│ const select = e.target as HTMLSelectEl │
│ ement; │
│ const selectedClass = select.value; │
│ │
│ // Check if we're using query params │
│ const searchParams = new URLSearchParam │
│ s(window.location.search); │
│ - const usesQueryParams = searchParams.to │
│ String().length > 0 && !window.location.path │
│ name.includes('/players/'); │
│ + const usesQueryParams = │
│ + searchParams.toString().length > 0 && │
│ + !window.location.pathname.includes("/ │
│ players/"); │
│ │
│ if (usesQueryParams) { │
│ // Query param mode │
│ - if (selectedClass === 'all') { │
│ - searchParams.delete('class'); │
│ + if (selectedClass === "all") { │
│ + searchParams.delete("class"); │
│ } else { │
│ - searchParams.set('class', selectedC │
│ lass); │
│ + searchParams.set("class", selectedC │
│ lass); │
│ } │
│ - searchParams.delete('page'); // reset │
│ to page 1 │
│ + searchParams.delete("page"); // reset │
│ to page 1 │
│ window.location.href = `${window.loca │
│ tion.pathname}?${searchParams.toString()}`; │
│ } else { │
│ // Path-based mode for player leaderb │
│ oards │
│ - const pathParts = window.location.pat │
│ hname.split('/').filter(p => p); │
│ + const pathParts = window.location.pat │
│ hname.split("/").filter((p) => p); │
│ │
│ // Detect base path │
│ - const basePath = pathParts[0] === 'te │
│ st-challenge-mode' ? 'test-challenge-mode' : │
│ 'challenge-mode'; │
│ + const basePath = │
│ + pathParts[0] === "test-challenge-mo │
│ de" │
│ + ? "test-challenge-mode" │
│ + : "challenge-mode"; │
│ │
│ // Extract season │
│ - let seasonSlug = 'season1'; │
│ - if (pathParts.length >= 2 && pathPart │
│ s[1].startsWith('season')) { │
│ + let seasonSlug = "season1"; │
│ + if (pathParts.length >= 2 && pathPart │
│ s[1].startsWith("season")) { │
│ seasonSlug = pathParts[1]; │
│ } │
│ │
│ // Find the 'players' segment │
│ - const playersIndex = pathParts.indexO │
│ f('players'); │
│ + const playersIndex = pathParts.indexO │
│ f("players"); │
│ if (playersIndex === -1) return; │
│ │
│ // Parse current scope │
│ let newPath: string; │
│ const scopeParts = pathParts.slice(pl │
│ ayersIndex + 1); │
│ │
│ - if (scopeParts.length === 0 || scopeP │
│ arts[0] === 'global') { │
│ + if (scopeParts.length === 0 || scopeP │
│ arts[0] === "global") { │
│ // Global scope │
│ - newPath = `/${basePath}/${seasonSlu │
│ g}/players/global${selectedClass !== 'all' ? │
│ '/' + selectedClass : ''}`; │
│ + newPath = `/${basePath}/${seasonSlu │
│ g}/players/global${selectedClass !== "all" ? │
│ "/" + selectedClass : ""}`; │
│ } else { │
│ const region = scopeParts[0]; │
│ │
│ // Check if second part is a class │
│ or realm │
│ - if (scopeParts.length === 1 || (sco │
│ peParts.length >= 2 && scopeParts[1].include │
│ s('_'))) { │
│ + if ( │
│ + scopeParts.length === 1 || │
│ + (scopeParts.length >= 2 && scopeP │
│ arts[1].includes("_")) │
│ + ) { │
│ // Regional scope (region or regi │
│ on/class) │
│ - newPath = `/${basePath}/${seasonS │
│ lug}/players/${region}${selectedClass !== 'a │
│ ll' ? '/' + selectedClass : ''}`; │
│ + newPath = `/${basePath}/${seasonS │
│ lug}/players/${region}${selectedClass !== "a │
│ ll" ? "/" + selectedClass : ""}`; │
│ } else { │
│ // Realm scope (region/realm or r │
│ egion/realm/class) │
│ const realm = scopeParts[1]; │
│ - newPath = `/${basePath}/${seasonS │
│ lug}/players/${region}/${realm}${selectedCla │
│ ss !== 'all' ? '/' + selectedClass : ''}`; │
│ + newPath = `/${basePath}/${seasonS │
│ lug}/players/${region}/${realm}${selectedCla │
│ ss !== "all" ? "/" + selectedClass : ""}`; │
│ } │
│ } │
│ │
└──────────────────────────────────────────────┘
┌─ .../components/Leaderboard/LeaderboardTypeNav/LeaderboardTypeNav.astro ───┐
│ diff --git a/web/src/components/Leaderboard/LeaderboardTypeNav/LeaderboardTypeNav. │
│ astro b/web/src/components/Leaderboard/LeaderboardTypeNav/LeaderboardTypeNav.astro │
│ index 9aa0937..7809fb6 100644 │
│ --- a/web/src/components/Leaderboard/LeaderboardTypeNav/LeaderboardTypeNav.astro │
│ +++ b/web/src/components/Leaderboard/LeaderboardTypeNav/LeaderboardTypeNav.astro │
│ @@ -1,3 +1,4 @@ │
│ +--- │
│ import "./LeaderboardTypeNav.scss"; │
│ │
│ interface Props { │
└────────────────────────────────────────────────────────────────────────────────────┘
┌─ ...eNav/LeaderboardTypeNav.astro ───┐
│ diff --git a/web/src/components/Leaderboard/ │
│ LeaderboardTypeNav/LeaderboardTypeNav.astro │
│ b/web/src/components/Leaderboard/Leaderboard │
│ TypeNav/LeaderboardTypeNav.astro │
│ index 9aa0937..7809fb6 100644 │
│ --- a/web/src/components/Leaderboard/Leaderb │
│ oardTypeNav/LeaderboardTypeNav.astro │
│ +++ b/web/src/components/Leaderboard/Leaderb │
│ oardTypeNav/LeaderboardTypeNav.astro │
│ @@ -1,3 +1,4 @@ │
│ +--- │
│ import "./LeaderboardTypeNav.scss"; │
│ │
│ interface Props { │
└──────────────────────────────────────────────┘
[ BACK TO LOG ]
──────────────────────────────────────────────────────────────────────────────────────
OOKNET
────────────────────────────────────────────────
OOKNET