diff --git a/components/menu.tsx b/components/menu.tsx deleted file mode 100644 index 974b32b..0000000 --- a/components/menu.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import MainMenu from './mainmenu' -import SubMenu from './submenu' -import styles from '../styles/menu.module.css' - -export default function Menu() { - return ( -
- - -
- ) -} - - - - diff --git a/components/submenu.tsx b/components/submenu.tsx deleted file mode 100644 index 191eae0..0000000 --- a/components/submenu.tsx +++ /dev/null @@ -1,10 +0,0 @@ -import Link from 'next/link' -import styles from '../styles/submenu.module.css' - -export default function MainMenu() { - return ( -
- -
- ) -} \ No newline at end of file diff --git a/next.config.js b/next.config.js index 8b61df4..0249033 100644 --- a/next.config.js +++ b/next.config.js @@ -1,4 +1,8 @@ /** @type {import('next').NextConfig} */ module.exports = { reactStrictMode: true, + i18n: { + locales: ['en', 'fr', 'jp', 'pt-br', 'pt-pt'], + defaultLocale: 'en', + } } diff --git a/pages/_app.tsx b/pages/_app.tsx deleted file mode 100644 index 3f5c9d5..0000000 --- a/pages/_app.tsx +++ /dev/null @@ -1,8 +0,0 @@ -import '../styles/globals.css' -import type { AppProps } from 'next/app' - -function MyApp({ Component, pageProps }: AppProps) { - return -} - -export default MyApp diff --git a/pages/chronology/index.tsx b/pages/chronology/index.tsx deleted file mode 100644 index 6c6bce6..0000000 --- a/pages/chronology/index.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import type { NextPage } from 'next' -import Head from 'next/head' -import Menu from '../../components/menu' - -const Chronology: NextPage = () => { - return ( - <> - - Library - - - - - - - - ) -} - -export default Chronology diff --git a/pages/index.tsx b/pages/index.tsx deleted file mode 100644 index 14867e3..0000000 --- a/pages/index.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import type { NextPage } from 'next' -import Head from 'next/head' -import Menu from '../components/menu' - -const Home: NextPage = () => { - return ( - <> - - Accord’s Library - Discover • Analyse • Translate • Archive - - - - - - - - ) -} - -export default Home diff --git a/public/default_og.jpg b/public/default_og.jpg new file mode 100644 index 0000000..5ab1582 Binary files /dev/null and b/public/default_og.jpg differ diff --git a/public/favicon.ico b/public/favicon.ico deleted file mode 100644 index 718d6fe..0000000 Binary files a/public/favicon.ico and /dev/null differ diff --git a/public/vercel.svg b/public/vercel.svg deleted file mode 100644 index fbf0e25..0000000 --- a/public/vercel.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - \ No newline at end of file diff --git a/src/components/Panels/ContentPanel.tsx b/src/components/Panels/ContentPanel.tsx new file mode 100644 index 0000000..0aeace8 --- /dev/null +++ b/src/components/Panels/ContentPanel.tsx @@ -0,0 +1,12 @@ +import styles from 'styles/Panels/ContentPanel.module.css' +import panelStyles from 'styles/Panels/Panels.module.css' + +export default function ContentPanel({children}) { + return ( +
+
+ {children} +
+
+ ) +} \ No newline at end of file diff --git a/components/mainmenu.tsx b/src/components/Panels/MainPanel.tsx similarity index 81% rename from components/mainmenu.tsx rename to src/components/Panels/MainPanel.tsx index 7eac8c5..0042902 100644 --- a/components/mainmenu.tsx +++ b/src/components/Panels/MainPanel.tsx @@ -1,16 +1,18 @@ import Link from 'next/link' -import styles from '../styles/mainmenu.module.css' import { useRouter } from 'next/router' +import styles from 'styles/Panels/MainPanel.module.css' +import panelStyles from 'styles/Panels/Panels.module.css' -export default function MainMenu() { +export default function MainPanel() { const router = useRouter(); function generateMenuOption(url: string, icon: string, title: string, subtitle?: string) { - const classActive = router.asPath === url ? styles.active : null; + console.log(router.asPath, url) + const classActive = router.asPath.startsWith(url) ? panelStyles.active : null; return ( -
+

{title}

{subtitle}

@@ -21,10 +23,10 @@ export default function MainMenu() { return ( -
+
-
+

Accord's Library

diff --git a/src/components/Panels/SubPanel.tsx b/src/components/Panels/SubPanel.tsx new file mode 100644 index 0000000..e658eb3 --- /dev/null +++ b/src/components/Panels/SubPanel.tsx @@ -0,0 +1,10 @@ +import styles from 'styles/Panels/SubPanel.module.css' +import panelStyles from 'styles/Panels/Panels.module.css' + +export default function SubPanel({children}) { + return ( +
+ {children} +
+ ) +} \ No newline at end of file diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx new file mode 100644 index 0000000..b4b204c --- /dev/null +++ b/src/pages/_app.tsx @@ -0,0 +1,79 @@ +import type { AppProps } from 'next/app' +import Head from 'next/head' +import MainPanel from 'components/Panels/MainPanel' +import 'styles/globals.css' + +function AccordsLibraryApp({ Component, pageProps }: AppProps) { + + + /* [BIG HACK] + Yes this is probably terrible, I'm trying to apply a different style to my appContainer div + depending on if the page uses a subpanel or contentpanel, or both, or neither. This is because + I want the first column to be always 20rem, the second one to be 20rem when it's the subbar, but + 1fr if it's the content... + + Anyway, there is probably a much better way to do this, it it might backfire in my face in the future + Much love, + + Mint + */ + + const componentProcessed = Component(pageProps) + let useSubPanel = false + let useContentPanel = false + + const children = componentProcessed.props.children + + if (Array.isArray(children)) { + children.forEach(child => { + if (child.type.name === "SubPanel") { + useSubPanel = true + } else if (child.type.name === "ContentPanel") { + useContentPanel = true + } + }); + + } else { + + if (children.type.name === "SubPanel") { + useSubPanel = true + } else if (children.type.name === "ContentPanel") { + useContentPanel = true + } + } + + let additionalClasses = "" + if (useSubPanel) additionalClasses += " withSubPanel" + if (useContentPanel) additionalClasses += " withContentPanel" + + /* [End of BIG HACK] */ + + return ( + +
+ + + Accord’s Library - Discover • Analyse • Translate • Archive + + + + + + + + + + + + + + + + + {componentProcessed} + +
+ ) +} + +export default AccordsLibraryApp diff --git a/pages/api/hello.ts b/src/pages/api/hello.ts similarity index 100% rename from pages/api/hello.ts rename to src/pages/api/hello.ts diff --git a/src/pages/chronology/index.tsx b/src/pages/chronology/index.tsx new file mode 100644 index 0000000..ad60111 --- /dev/null +++ b/src/pages/chronology/index.tsx @@ -0,0 +1,14 @@ +import type { NextPage } from 'next' +import SubPanel from 'components/Panels/SubPanel' + +const Chronology: NextPage = () => { + + return ( + <> + + Hello + + + ) +} +export default Chronology diff --git a/src/pages/chronology/overview.tsx b/src/pages/chronology/overview.tsx new file mode 100644 index 0000000..5066575 --- /dev/null +++ b/src/pages/chronology/overview.tsx @@ -0,0 +1,41 @@ +import type { NextPage } from 'next' +import Head from 'next/head' +import { useRouter } from 'next/router' +import { GetStaticProps } from 'next' +import ContentPanel from 'components/Panels/ContentPanel' +import SubPanel from 'components/Panels/SubPanel' + +import { getChronologyItems } from 'queries/queries' + +export const getStaticProps: GetStaticProps = async (context) => { + return await getChronologyItems() +} + +const ChronologyOverview: NextPage = ({ chronologyItems }) => { + const router = useRouter() + + return ( + <> + Hello + + + {chronologyItems.map((item: any) => ( +
{item.year} -{' '} + { + item.translations.map((translation: any) => ( + <> + {translation.languages_code.code === router.locale ? translation.title : ""} + + ))} +
+ ))} + +
+ + + + + + ) +} +export default ChronologyOverview diff --git a/src/pages/index.tsx b/src/pages/index.tsx new file mode 100644 index 0000000..f3411b0 --- /dev/null +++ b/src/pages/index.tsx @@ -0,0 +1,24 @@ +import type { NextPage } from 'next' +import SubPanel from 'components/Panels/SubPanel' +import ContentPanel from 'components/Panels/ContentPanel' + +const Home: NextPage = () => { + return ( + <> + +

Discover • Analyse • Translate • Archive

+

What is this?

+

Accord’s Library aims at gathering and archiving all of Yoko Taro’s work. Yoko Taro is a Japanese video game director and scenario writer. He is best-known for his work on the NieR and Drakengard (Drag-on Dragoon) franchises. To complement his games, Yoko Taro likes to publish side materials in the form of books, novellas, artbooks, stage plays, manga, drama CDs, and comics. Those side materials can be very difficult to find. His work goes all the way back to 2003, and most of them are out of print after having been released solely in Japan, sometimes in limited quantities. Their prices on the second hand market have skyrocketed, ranging all the way to hundreds if not thousand of dollars for the rarest items. 

+

This is where this library takes its meaning, in trying to help the community grow by providing translators, writers, and wiki’s contributors a simple way to access these records filled with stories, artworks, and knowledge.

+

We are a small group of Yoko Taro’s fans that decided to join forces and create a website and a community. Our motto is Discover • Analyze • Translate • Archive (D.A.T.A. for short). We started with the goal of gathering and archiving as much side-materials/merch as possible. But since then, our ambition grew and we decided to create a full-fledged website that will also include news articles, lore, summaries, translations, and transcriptions. Hopefully one day, we will be up there in the list of notable resources for Drakengard and NieR fans.

+

What’s on this website?

+

The Compendium: This is where we will list every NieR/DOD/other Yoko Tato merch, games, books, novel, stage play, CD... well everything! For each, we will provide photos and/or scans of the content, information about what it is, when and how it was released, size, initial price...

+

News: Yes because we also want to create our own content! So there you will find translations, transcriptions, unboxing, news about future merch/game releases, maybe some guides. We don’t see this website as being purely a showcase of our work, but also of the community, and as such, we will be accepting applications for becoming contributors on the website. For the applicant, there is no deadline or article quota, it merely means that we will have access to the website Post Writing tools and will be able to submit a draft that can be published once verified by an editor. Anyway, that’s at least the plan, we will think more about this until the website’s official launch.

+

Data: There we will publish lore/knowledge about the Yokoverse: Dictionary, Timeline, Weapons Stories, Game summaries... We have not yet decided how deep we want to go as they are already quite a few resources out there.

+

Gallery: A fully tagged Danbooru-styled gallery with currently more than a thousand unique artworks. If you are unfamiliar with this kind of gallery, it comes with a powerful search function that allows you to search for specific images: want to search for images with both Caim and Inuart, just type Caim Inuart. If you want images of Devola OR Popola, you can use a comma Popola,Devola. You can also negate a tag: i.e. images of 9S without any pods around, search for 9S -Pods. Anyway, there is a lot more to it, you can click on "Syntax help" next to the Search button for even neater functions. Btw, you can create an account to favorite, upvote/downvote posts, or if you want to help tagging them. There isn’t currently a way for new users to upload images, you’ll have to contact us first and we can decide to enable this function on your account.

+
+ + ) +} + +export default Home diff --git a/pages/library.tsx b/src/pages/library.tsx similarity index 80% rename from pages/library.tsx rename to src/pages/library.tsx index 4fd938d..a39a3d5 100644 --- a/pages/library.tsx +++ b/src/pages/library.tsx @@ -1,6 +1,5 @@ import type { NextPage } from 'next' import Head from 'next/head' -import Menu from '../components/menu' const Home: NextPage = () => { return ( @@ -11,8 +10,6 @@ const Home: NextPage = () => { - - ) } diff --git a/src/queries/queries.ts b/src/queries/queries.ts new file mode 100644 index 0000000..64df291 --- /dev/null +++ b/src/queries/queries.ts @@ -0,0 +1,26 @@ +export const getChronologyItems = async () => { + const res = await fetch( + process.env.NEXT_PUBLIC_GRAPHQL + `?query={ + + chronology_items { + id, + year, + month, + day, + translations { + languages_code { + code + } + title + } + } + + }`) + + const data = (await res.json()).data.chronology_items + return { + props: { + chronologyItems: data, + }, + } +} \ No newline at end of file diff --git a/src/styles/Panels/ContentPanel.module.css b/src/styles/Panels/ContentPanel.module.css new file mode 100644 index 0000000..0f90c36 --- /dev/null +++ b/src/styles/Panels/ContentPanel.module.css @@ -0,0 +1,9 @@ +.panel { + padding-top: 5rem; +} + +.panelInside { + max-width: 50rem; + text-align: justify; + text-justify: inter-word; +} \ No newline at end of file diff --git a/src/styles/Panels/MainPanel.module.css b/src/styles/Panels/MainPanel.module.css new file mode 100644 index 0000000..4375dd7 --- /dev/null +++ b/src/styles/Panels/MainPanel.module.css @@ -0,0 +1,59 @@ +.topLogo { + display: grid; + place-items: center; + cursor: pointer; +} + +.topLogo > h2 { + margin-top: 1rem; +} + +.topLogo > img { + width: 50%; + height: auto; + place-self: start center; +} + +.menuFooter { + text-align: center; +} + +.menuFooterCC { + margin-top: 1rem; + margin-bottom: 2rem; + display: grid; + height: 1rem; + grid-auto-flow: column; + place-content: center; + grid-gap: .2rem; +} + +.menuFooterCC img { + height: 1.5rem; + width: auto; +} + +.menuFooterCC:hover img { + filter: var(--filter-color-main-dark); +} + + +.menuFooterSocials { + margin-top: 3rem; + margin-bottom: 1rem; + display: grid; + height: 1rem; + grid-auto-flow: column; + place-content: center; + grid-gap: 2rem; +} + +.menuFooterSocials img { + height: 2rem; + width: auto; + transition: .1s filter; +} + +.menuFooterSocials img:hover { + filter: var(--filter-color-main-dark); +} \ No newline at end of file diff --git a/src/styles/Panels/Panels.module.css b/src/styles/Panels/Panels.module.css new file mode 100644 index 0000000..048fe8c --- /dev/null +++ b/src/styles/Panels/Panels.module.css @@ -0,0 +1,61 @@ +.panel { + display: grid; + border-right: 1px solid black; + height: 100%; + max-height: 100vh; + justify-items: center; + padding: 2rem; + overflow-y: auto; + grid-row-gap: 0.5em; + place-content: start center; + scrollbar-width: none; +} + +.panel::-webkit-scrollbar { + display: none; +} + +.panel > 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; + border-radius: 1em; + grid-column-gap: 1em; + cursor: pointer; + padding: 0.6em 1.2em; + width: 100%; + transition: .1s background-color; +} + +.menuOption:hover, .menuOption.active { + background-color: var(--color-main-base); +} + +.menuOption > * { + margin: 0; +} + +.menuOption > img { + width: 1.2em; + height: auto; + grid-area: img; +} + +.menuOption > h3 { + grid-area: title; + font-size: 150%; +} + +.menuOption > p { + grid-area: subtitle; +} \ No newline at end of file diff --git a/src/styles/Panels/SubPanel.module.css b/src/styles/Panels/SubPanel.module.css new file mode 100644 index 0000000..2d24be8 --- /dev/null +++ b/src/styles/Panels/SubPanel.module.css @@ -0,0 +1,3 @@ +.panel { + width: 20rem; +} \ No newline at end of file diff --git a/styles/globals.css b/src/styles/globals.css similarity index 79% rename from styles/globals.css rename to src/styles/globals.css index 6c2d558..0240cd4 100644 --- a/styles/globals.css +++ b/src/styles/globals.css @@ -1,8 +1,6 @@ @import url('https://fonts.googleapis.com/css2?family=Vollkorn:wght@400;500;600;700;800;900&display=swap'); - @import url('https://fonts.googleapis.com/css2?family=Zen+Maru+Gothic:wght@300;400;500;700;900&display=swap'); - :root { --color-main-light: #ffedd8; --color-main-base: #e6ccb2; @@ -19,6 +17,25 @@ body { color: var(--color-main-black); } +.appContainer { + display: grid; + min-height: 100vh; + grid-auto-flow: column; + grid-template-columns: 20rem; +} + +.appContainer.withSubPanel { + grid-template-columns: 20rem 20rem; +} + +.appContainer.withContentPanel { + grid-template-columns: 20rem 1fr; +} + +.appContainer.withSubPanel.withContentPanel { + grid-template-columns: 20rem 20rem 1fr; +} + h1, h2, h3, h4, h5, h6 { font-family: "Vollkorn"; font-weight: 700; diff --git a/styles/mainmenu.module.css b/styles/mainmenu.module.css deleted file mode 100644 index 10650db..0000000 --- a/styles/mainmenu.module.css +++ /dev/null @@ -1,122 +0,0 @@ -.menu { - border-right: 1px solid black; - height: 100%; - width: 100%; - display: grid; - justify-items: center; - padding: 2rem; - overflow-y: auto; - max-height: 100vh; - grid-row-gap: 0.5em; - place-content: start; - scrollbar-width: none; -} - -.menu::-webkit-scrollbar { - display: none; -} - -.menu > hr { - height: 0; - width: 100%; - border: none; - border-top: 0.3rem dotted black; - margin: 2rem; -} - -.menuLogo { - display: grid; - place-items: center; - cursor: pointer; -} - -.menuLogo > h2 { - margin-top: 1rem; -} - -.menuLogo > img { - width: 50%; - height: auto; - place-self: start center; -} - -.menuOption { - justify-self: start; - display: grid; - grid-template-areas: 'img title' '. subtitle'; - grid-template-columns: auto 1fr; - align-items: center; - border-radius: 1em; - grid-column-gap: 1em; - cursor: pointer; - padding: 0.6em 1.2em; - width: 100%; - transition: .1s background-color; -} - -.menuOption:hover, .menuOption.active { - background-color: var(--color-main-base); -} - -.menuOption > * { - margin: 0; -} - -.menuOption > img { - width: 1.2em; - height: auto; - grid-area: img; -} - -.menuOption > h3 { - grid-area: title; - font-size: 150%; -} - -.menuOption > p { - grid-area: subtitle; -} - -.menuFooter { - text-align: center; -} - -.menuFooterCC { - margin-top: 1rem; - margin-bottom: 2rem; - display: grid; - height: 1rem; - grid-auto-flow: column; - place-content: center; - grid-gap: .2rem; -} - -.menuFooterCC img { - height: 1.5rem; - width: auto; -} - -.menuFooterCC:hover img { - filter: var(--filter-color-main-dark); -} - - -.menuFooterSocials { - margin-top: 3rem; - margin-bottom: 1rem; - display: grid; - height: 1rem; - grid-auto-flow: column; - place-content: center; - grid-gap: 2rem; -} - -.menuFooterSocials img { - height: 2rem; - width: auto; - transition: .1s filter; -} - -.menuFooterSocials img:hover { - filter: var(--filter-color-main-dark); -} \ No newline at end of file diff --git a/styles/menu.module.css b/styles/menu.module.css deleted file mode 100644 index 6d8b7a6..0000000 --- a/styles/menu.module.css +++ /dev/null @@ -1,6 +0,0 @@ -.container { - display: grid; - grid-template-columns: 20rem 20rem 1fr; - min-height: 100vh; -} - diff --git a/styles/submenu.module.css b/styles/submenu.module.css deleted file mode 100644 index a7e2c20..0000000 --- a/styles/submenu.module.css +++ /dev/null @@ -1,13 +0,0 @@ -.menu { - border-right: 1px solid black; - height: 100%; - width: 100%; - display: grid; - justify-items: center; - padding: 2rem; - overflow-y: auto; - max-height: 100vh; - grid-row-gap: 0.5em; - place-content: start; - scrollbar-width: none; - } \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index 99710e8..6a46877 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - "target": "es5", + "target": "es6", "lib": ["dom", "dom.iterable", "esnext"], "allowJs": true, "skipLibCheck": true, @@ -13,7 +13,8 @@ "resolveJsonModule": true, "isolatedModules": true, "jsx": "preserve", - "incremental": true + "incremental": true, + "baseUrl": "src" }, "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], "exclude": ["node_modules"]