Restructure layout: search in sidebar, upload in header
Build & Deploy / build-and-deploy (push) Successful in 58s
Build & Deploy / build-and-deploy (push) Successful in 58s
- Removed toolbar (Library title, search, upload button) from library - Moved search box into the sidebar alongside Year/Genre filters - Removed 'Filters' heading from sidebar - Replaced 'Library' nav button in header with '+ Upload' button - Genre filters now sorted by count (desc) instead of alphabetically - Cleaned up unused CSS
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
let gameId = $state(null);
|
||||
let filterGenre = $state("");
|
||||
let filterYear = $state("");
|
||||
let uploadTriggered = $state(0);
|
||||
|
||||
function parseHash() {
|
||||
const hash = window.location.hash.slice(1) || "/";
|
||||
@@ -42,11 +43,11 @@
|
||||
});
|
||||
</script>
|
||||
|
||||
<Header />
|
||||
<Header onUploadClick={() => uploadTriggered++} />
|
||||
|
||||
<main class="container">
|
||||
{#if route === "/"}
|
||||
<Library genreFilter={filterGenre} yearFilter={filterYear} />
|
||||
<Library genreFilter={filterGenre} yearFilter={filterYear} {uploadTriggered} />
|
||||
{:else if route === "/game" && gameId}
|
||||
<GameDetail id={gameId} />
|
||||
{:else if route === "/play" && gameId}
|
||||
|
||||
Reference in New Issue
Block a user