Added stuff

This commit is contained in:
DrMint 2021-11-04 12:45:18 +01:00
parent 2c5dbaecdd
commit 0b61263f36
8 changed files with 227 additions and 164 deletions

21
LICENSE Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2021 Accord's Library
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -0,0 +1,73 @@
.menu {
border: 1px solid black;
height: 100%;
width: 100%;
display: grid;
justify-items: center;
padding: 2rem;
overflow-y: auto;
max-height: 100vh;
scrollbar-width: none;
grid-row-gap: 0.5em;
}
.menuLogo {
display: grid;
place-items: center;
cursor: pointer;
}
.menuLogo > h2 {
margin-top: 0;
}
.menuLogo > img {
width: 50%;
height: auto;
place-self: start center;
}
.menu > hr {
height: 0;
width: 100%;
border: none;
border-top: 0.3rem dotted black;
margin: 2rem;
}
.menuOption {
justify-self: start;
display: grid;
grid-template-areas: 'img title' '. subtitle';
grid-template-columns: auto 1fr;
align-items: center;
grid-column-gap: 1em;
cursor: pointer;
padding: 0.4em 1em;
width: 100%;
}
.menuOption:hover {
background-color: var(--color-main-base);
border-radius: 1em;
}
.menuOption > * {
margin: 0;
}
.menuOption > img {
width: 1.2em;
height: auto;
grid-area: img;
}
.menuOption > h3 {
grid-area: title;
font-size: 150%;
font-weight: 600;
}
.menuOption > p {
grid-area: subtitle;
}

75
components/mainmenu.tsx Normal file
View File

@ -0,0 +1,75 @@
import Link from 'next/link'
import styles from './mainmenu.module.css'
export default function MainMenu() {
return (
<div className={styles.menu}>
<Link href="/" passHref>
<div className={styles.menuLogo}>
<img src="/icons/accords.png" alt="" />
<h2>Accord&apos;s Library</h2>
</div>
</Link>
<button>Change language</button>
<hr></hr>
<Link href="/library" passHref>
<div className={styles.menuOption}>
<img src="/icons/books.png" alt="" />
<h3>Library</h3>
<p>Browse all physical and digital media</p>
</div>
</Link>
<Link href="/hubs" passHref>
<div className={styles.menuOption}>
<img src="/icons/hubs.png" alt="" />
<h3>Hubs</h3>
<p>Explore all content of a specific game/series</p>
</div>
</Link>
<Link href="/chronology" passHref>
<div className={styles.menuOption}>
<img src="/icons/chronology.png" alt="" />
<h3>Chronology</h3>
<p>Follow all events in chronological order</p>
</div>
</Link>
<hr></hr>
<Link href="/archive" passHref>
<div className={styles.menuOption}>
<img src="/icons/archive.png" alt="" />
<h3>Archive</h3>
</div>
</Link>
<Link href="/news" passHref>
<div className={styles.menuOption}>
<img src="/icons/news.png" alt="" />
<h3>News</h3>
</div>
</Link>
<Link href="/gallery" passHref>
<div className={styles.menuOption}>
<img src="/icons/gallery.png" alt="" />
<h3>Gallery</h3>
</div>
</Link>
<Link href="/about-us" passHref>
<div className={styles.menuOption}>
<img src="/icons/info.png" alt="" />
<h3>About us</h3>
</div>
</Link>
</div>
)
}

View File

@ -9,5 +9,5 @@ export default function handler(
req: NextApiRequest,
res: NextApiResponse<Data>
) {
res.status(200).json({ name: 'John Doe' })
res.status(200).json({ name: 'John Lenon' })
}

View File

@ -1,7 +1,7 @@
import type { NextPage } from 'next'
import Head from 'next/head'
import Image from 'next/image'
import styles from '../styles/Home.module.css'
import MainMenu from '../components/mainmenu'
const Home: NextPage = () => {
return (
@ -9,62 +9,17 @@ const Home: NextPage = () => {
<Head>
<title>Create Next App</title>
<meta name="description" content="Generated by create next app" />
<link rel="icon" href="/favicon.ico" />
<link rel="icon" href="/favicon.png" />
</Head>
<MainMenu></MainMenu>
<div className={styles.submenu}></div>
<main className={styles.main}>
<h1 className={styles.title}>
Welcome to <a href="https://nextjs.org">Next.js!</a>
</h1>
<p className={styles.description}>
Get started by editing{' '}
<code className={styles.code}>pages/index.tsx</code>
</p>
<div className={styles.grid}>
<a href="https://nextjs.org/docs" className={styles.card}>
<h2>Documentation &rarr;</h2>
<p>Find in-depth information about Next.js features and API.</p>
</a>
<a href="https://nextjs.org/learn" className={styles.card}>
<h2>Learn &rarr;</h2>
<p>Learn about Next.js in an interactive course with quizzes!</p>
</a>
<a
href="https://github.com/vercel/next.js/tree/master/examples"
className={styles.card}
>
<h2>Examples &rarr;</h2>
<p>Discover and deploy boilerplate example Next.js projects.</p>
</a>
<a
href="https://vercel.com/new?utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app"
className={styles.card}
>
<h2>Deploy &rarr;</h2>
<p>
Instantly deploy your Next.js site to a public URL with Vercel.
</p>
</a>
</div>
</main>
<footer className={styles.footer}>
<a
href="https://vercel.com?utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app"
target="_blank"
rel="noopener noreferrer"
>
Powered by{' '}
<span className={styles.logo}>
<Image src="/vercel.svg" alt="Vercel Logo" width={72} height={16} />
</span>
</a>
</footer>
</div>
)
}

27
pages/library.tsx Normal file
View File

@ -0,0 +1,27 @@
import type { NextPage } from 'next'
import Head from 'next/head'
import styles from '../styles/Home.module.css'
import MainMenu from '../components/mainmenu'
const Home: NextPage = () => {
return (
<div className={styles.container}>
<Head>
<title>Library</title>
<meta name="description" content="Generated by create next app" />
<link rel="icon" href="/favicon.png" />
</Head>
<MainMenu></MainMenu>
<div className={styles.submenu}></div>
<main className={styles.main}>
</main>
</div>
)
}
export default Home

View File

@ -1,116 +1,6 @@
.container {
padding: 0 2rem;
}
.main {
display: grid;
grid-template-columns: 20rem 1fr 5fr;
min-height: 100vh;
padding: 4rem 0;
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.footer {
display: flex;
flex: 1;
padding: 2rem 0;
border-top: 1px solid #eaeaea;
justify-content: center;
align-items: center;
}
.footer a {
display: flex;
justify-content: center;
align-items: center;
flex-grow: 1;
}
.title a {
color: #0070f3;
text-decoration: none;
}
.title a:hover,
.title a:focus,
.title a:active {
text-decoration: underline;
}
.title {
margin: 0;
line-height: 1.15;
font-size: 4rem;
}
.title,
.description {
text-align: center;
}
.description {
margin: 4rem 0;
line-height: 1.5;
font-size: 1.5rem;
}
.code {
background: #fafafa;
border-radius: 5px;
padding: 0.75rem;
font-size: 1.1rem;
font-family: Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono,
Bitstream Vera Sans Mono, Courier New, monospace;
}
.grid {
display: flex;
align-items: center;
justify-content: center;
flex-wrap: wrap;
max-width: 800px;
}
.card {
margin: 1rem;
padding: 1.5rem;
text-align: left;
color: inherit;
text-decoration: none;
border: 1px solid #eaeaea;
border-radius: 10px;
transition: color 0.15s ease, border-color 0.15s ease;
max-width: 300px;
}
.card:hover,
.card:focus,
.card:active {
color: #0070f3;
border-color: #0070f3;
}
.card h2 {
margin: 0 0 1rem 0;
font-size: 1.5rem;
}
.card p {
margin: 0;
font-size: 1.25rem;
line-height: 1.5;
}
.logo {
height: 1em;
margin-left: 0.5rem;
}
@media (max-width: 600px) {
.grid {
width: 100%;
flex-direction: column;
}
}

View File

@ -1,9 +1,17 @@
:root {
--color-main-light: #ffedd8;
--color-main-base: #e6ccb2;
--color-main-dark: #9c6644;
--color-main-black: #1B1811;
}
html,
body {
padding: 0;
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
background-color: var(--color-main-light);
}
a {
@ -14,3 +22,17 @@ a {
* {
box-sizing: border-box;
}
button {
border: .1rem solid var(--color-main-dark);
color: var(--color-main-dark);
background: var(--color-main-light);
border-radius: 100vmax;
padding: 0.4em 1em;
cursor: pointer;
}
button:hover {
background: var(--color-main-dark);
color: var(--color-main-light);
}