2021-11-04 11:45:18 +00:00
|
|
|
import Link from 'next/link'
|
2021-11-04 18:48:31 +00:00
|
|
|
import styles from '../styles/mainmenu.module.css'
|
|
|
|
import { useRouter } from 'next/router'
|
2021-11-04 11:45:18 +00:00
|
|
|
|
|
|
|
export default function MainMenu() {
|
2021-11-04 18:48:31 +00:00
|
|
|
|
|
|
|
const router = useRouter();
|
|
|
|
|
|
|
|
function generateMenuOption(url: string, icon: string, title: string, subtitle?: string) {
|
|
|
|
const classActive = router.asPath === url ? styles.active : null;
|
|
|
|
return (
|
|
|
|
<Link href={url} passHref>
|
|
|
|
<div className={styles.menuOption + " " + classActive}>
|
|
|
|
<img src={icon} alt="" />
|
|
|
|
<h3>{title}</h3>
|
|
|
|
<p>{subtitle}</p>
|
|
|
|
</div>
|
|
|
|
</Link>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
2021-11-04 11:45:18 +00:00
|
|
|
return (
|
2021-11-04 18:48:31 +00:00
|
|
|
|
2021-11-04 11:45:18 +00:00
|
|
|
<div className={styles.menu}>
|
|
|
|
|
|
|
|
<Link href="/" passHref>
|
|
|
|
<div className={styles.menuLogo}>
|
2021-11-04 18:48:31 +00:00
|
|
|
<img src="/icons/accords.svg" alt="" />
|
2021-11-04 11:45:18 +00:00
|
|
|
<h2>Accord's Library</h2>
|
|
|
|
</div>
|
|
|
|
</Link>
|
|
|
|
|
|
|
|
<button>Change language</button>
|
|
|
|
|
2021-11-04 18:48:31 +00:00
|
|
|
<hr />
|
2021-11-04 11:45:18 +00:00
|
|
|
|
2021-11-04 18:48:31 +00:00
|
|
|
{generateMenuOption("/library", "/icons/book-solid.svg", "Library", "Browse all physical and digital media")}
|
|
|
|
{generateMenuOption("/hubs", "/icons/hubs.svg", "Hubs", "Explore all content of a specific game/series")}
|
|
|
|
{generateMenuOption("/chronology", "/icons/timeline-solid.svg", "Chronology", "Follow all events in chronological order")}
|
2021-11-04 11:45:18 +00:00
|
|
|
|
2021-11-04 18:48:31 +00:00
|
|
|
<hr />
|
2021-11-04 11:45:18 +00:00
|
|
|
|
2021-11-04 18:48:31 +00:00
|
|
|
{generateMenuOption("/archive", "/icons/box-archive-solid.svg", "Archive")}
|
|
|
|
{generateMenuOption("/news", "/icons/newspaper-solid.svg", "News")}
|
|
|
|
{generateMenuOption("/gallery", "/icons/images-solid.svg", "Gallery")}
|
|
|
|
{generateMenuOption("/about-us", "/icons/circle-info-solid.svg", "About us")}
|
2021-11-04 11:45:18 +00:00
|
|
|
|
2021-11-04 18:48:31 +00:00
|
|
|
<hr />
|
2021-11-04 11:45:18 +00:00
|
|
|
|
2021-11-04 18:48:31 +00:00
|
|
|
<div className={styles.menuFooter}>
|
|
|
|
<p>This website’s content is made available under <a href="https://creativecommons.org/licenses/by-sa/4.0/">CC-BY-SA</a> unless otherwise noted.</p>
|
|
|
|
<a href="https://creativecommons.org/licenses/by-sa/4.0/">
|
|
|
|
<div className={styles.menuFooterCC}>
|
|
|
|
<img src="/icons/creative-commons-brands.svg" alt="" />
|
|
|
|
<img src="/icons/creative-commons-by-brands.svg" alt="" />
|
|
|
|
<img src="/icons/creative-commons-sa-brands.svg" alt="" />
|
|
|
|
</div>
|
|
|
|
</a>
|
|
|
|
<p>Accord’s Library is not affiliated with or endorsed by SQUARE ENIX CO. LTD. All game assets and promotional materials belongs to © SQUARE ENIX CO. LTD.</p>
|
|
|
|
<div className={styles.menuFooterSocials}>
|
|
|
|
<a href="https://github.com/Accords-Library"><img src="/icons/github-brands.svg" alt="" /></a>
|
|
|
|
<a href="https://accords-library.com/discord"><img src="/icons/discord-brands.svg" alt="" /></a>
|
2021-11-04 11:45:18 +00:00
|
|
|
</div>
|
2021-11-04 18:48:31 +00:00
|
|
|
</div>
|
2021-11-04 11:45:18 +00:00
|
|
|
</div>
|
|
|
|
)
|
|
|
|
}
|