mirror of
https://github.com/Radiquum/AniX.git
synced 2025-05-04 11:59:40 +05:00
frontend: add color theme & theme switcher
This commit is contained in:
parent
84b13a2c80
commit
b8878c4fb8
7 changed files with 192 additions and 19 deletions
53
frontend/app/components/NavigationRail/NavigationRail.js
Normal file
53
frontend/app/components/NavigationRail/NavigationRail.js
Normal file
|
@ -0,0 +1,53 @@
|
|||
"use client";
|
||||
|
||||
import { usePathname } from "next/navigation";
|
||||
import { useThemeStore } from "@/app/store/theme-store";
|
||||
import Link from "next/link";
|
||||
|
||||
export const NavigationRail = () => {
|
||||
const pathname = usePathname();
|
||||
const themeStore = useThemeStore();
|
||||
|
||||
return (
|
||||
<nav className="left">
|
||||
<button className="circle transparent ">
|
||||
<img className="responsive" src="/favicon.ico"></img>
|
||||
</button>
|
||||
|
||||
<Link href="/" className={pathname == "/" ? "active" : ""}>
|
||||
<i>home</i>
|
||||
<div>Домашняя</div>
|
||||
</Link>
|
||||
<Link href="/search" className={pathname == "/search" ? "active" : ""}>
|
||||
<i>search</i>
|
||||
<div>Поиск</div>
|
||||
</Link>
|
||||
<Link
|
||||
href="/bookmarks"
|
||||
className={pathname == "/bookmarks" ? "active" : ""}
|
||||
>
|
||||
<i>bookmark</i>
|
||||
<div>Закладки</div>
|
||||
</Link>
|
||||
<Link
|
||||
href="/favorites"
|
||||
className={pathname == "/favorites" ? "active" : ""}
|
||||
>
|
||||
<i>favorite</i>
|
||||
<div>Избранное</div>
|
||||
</Link>
|
||||
<Link href="/history" className={pathname == "/history" ? "active" : ""}>
|
||||
<i>history</i>
|
||||
<div>История</div>
|
||||
</Link>
|
||||
{/* <a>
|
||||
<i>share</i>
|
||||
<div>share</div>
|
||||
</a> */}
|
||||
<span className="max"></span>
|
||||
<button className="circle transparent end-align" onClick={() => themeStore.changeTheme(themeStore.theme == "dark" ? "light" : "dark")}>
|
||||
<i>palette</i>
|
||||
</button>
|
||||
</nav>
|
||||
);
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue