Chore: Patched Library Completed & Added Home-Page

This commit is contained in:
Youwes09
2026-03-19 21:20:33 -05:00
parent 821e13fc44
commit deb8a5ee02
13 changed files with 2073 additions and 199 deletions
+23 -35
View File
@@ -1,13 +1,14 @@
<script lang="ts">
import { Books, MagnifyingGlass, ClockCounterClockwise, Compass, DownloadSimple, PuzzlePiece, GearSix } from "phosphor-svelte";
import { House, Books, MagnifyingGlass, ClockCounterClockwise, Compass, DownloadSimple, PuzzlePiece, GearSix } from "phosphor-svelte";
import { navPage, activeManga, activeSource, libraryFilter, genreFilter, settingsOpen } from "../../store";
import type { NavPage } from "../../store";
const TABS: { id: NavPage; label: string; icon: any }[] = [
{ id: "home", label: "Home", icon: House },
{ id: "library", label: "Library", icon: Books },
{ id: "search", label: "Search", icon: MagnifyingGlass },
{ id: "history", label: "History", icon: ClockCounterClockwise },
{ id: "explore", label: "Explore", icon: Compass },
{ id: "explore", label: "Discover", icon: Compass },
{ id: "downloads", label: "Downloads", icon: DownloadSimple },
{ id: "extensions", label: "Extensions", icon: PuzzlePiece },
];
@@ -20,15 +21,16 @@
}
function goHome() {
navPage.set("library");
navPage.set("home");
activeSource.set(null);
activeManga.set(null);
libraryFilter.set("library");
genreFilter.set("");
}
</script>
<aside class="root">
<button class="logo" on:click={goHome} title="Go to Library" aria-label="Go to Library">
<button class="logo" on:click={goHome} title="Home" aria-label="Go to Home">
<div class="logo-icon"></div>
</button>
<nav class="nav">
@@ -48,19 +50,13 @@
<style>
.root {
width: var(--sidebar-width);
flex-shrink: 0;
background: var(--bg-void);
display: flex;
flex-direction: column;
align-items: center;
padding: var(--sp-4) 0;
width: var(--sidebar-width); flex-shrink: 0;
background: var(--bg-void); display: flex; flex-direction: column;
align-items: center; padding: var(--sp-4) 0;
}
.logo {
width: 80px; height: 80px;
display: flex; align-items: center; justify-content: center;
margin-bottom: var(--sp-3);
background: none; border: none; outline: none;
width: 80px; height: 80px; display: flex; align-items: center; justify-content: center;
margin-bottom: var(--sp-3); background: none; border: none; outline: none;
cursor: pointer; border-radius: var(--radius-lg);
transition: opacity var(--t-base), transform var(--t-base);
padding: 0; appearance: none; -webkit-appearance: none;
@@ -69,27 +65,22 @@
.logo:active { transform: scale(0.92); }
.logo:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.logo-icon {
width: 80px; height: 80px;
background-color: var(--accent);
width: 80px; height: 80px; background-color: var(--accent);
mask-image: url("../../assets/moku-icon.svg");
mask-repeat: no-repeat; mask-position: center; mask-size: contain;
-webkit-mask-image: url("../../assets/moku-icon.svg");
-webkit-mask-repeat: no-repeat; -webkit-mask-position: center; -webkit-mask-size: contain;
filter: drop-shadow(0 0 8px rgba(107,143,107,0.35));
pointer-events: none;
filter: drop-shadow(0 0 8px rgba(107,143,107,0.35)); pointer-events: none;
}
.nav {
flex: 1;
display: flex; flex-direction: column; align-items: center;
flex: 1; display: flex; flex-direction: column; align-items: center;
gap: var(--sp-1); width: 100%; padding: 0 var(--sp-2);
}
.tab {
width: 36px; height: 36px;
display: flex; align-items: center; justify-content: center;
border-radius: var(--radius-md);
color: var(--text-faint);
background: none; border: none; outline: none;
cursor: pointer; padding: 0; appearance: none; -webkit-appearance: none;
width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
border-radius: var(--radius-md); color: var(--text-faint);
background: none; border: none; outline: none; cursor: pointer; padding: 0;
appearance: none; -webkit-appearance: none;
transition: color var(--t-base), background var(--t-base);
}
.tab:hover { color: var(--text-muted); background: var(--bg-raised); }
@@ -99,16 +90,13 @@
.bottom {
display: flex; flex-direction: column; align-items: center;
width: 100%; padding: var(--sp-3) var(--sp-2) 0;
border-top: 1px solid var(--border-dim);
margin-top: var(--sp-3);
border-top: 1px solid var(--border-dim); margin-top: var(--sp-3);
}
.settings-btn {
width: 36px; height: 36px;
display: flex; align-items: center; justify-content: center;
border-radius: var(--radius-md);
color: var(--text-faint);
background: none; border: none; outline: none;
cursor: pointer; padding: 0; appearance: none; -webkit-appearance: none;
width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
border-radius: var(--radius-md); color: var(--text-faint);
background: none; border: none; outline: none; cursor: pointer; padding: 0;
appearance: none; -webkit-appearance: none;
transition: color var(--t-base), background var(--t-base), transform var(--t-slow);
}
.settings-btn:hover { color: var(--text-muted); background: var(--bg-raised); transform: rotate(30deg); }