diff --git a/src/components/Panels/SubPanel.tsx b/src/components/Panels/SubPanel.tsx
index 2c9b96b..82aefef 100644
--- a/src/components/Panels/SubPanel.tsx
+++ b/src/components/Panels/SubPanel.tsx
@@ -4,7 +4,7 @@ type SubPanelProps = {
export default function SubPanel(props: SubPanelProps): JSX.Element {
return (
-
+
{props.children}
);
diff --git a/src/components/SVG.tsx b/src/components/SVG.tsx
index bc00dd1..cc258fd 100644
--- a/src/components/SVG.tsx
+++ b/src/components/SVG.tsx
@@ -9,12 +9,7 @@ export type SVGProps = {
export default function SVG(props: SVGProps): JSX.Element {
return (
-
+
);
}
diff --git a/src/graphql/operation.graphql b/src/graphql/operation.graphql
index 609beff..4cbcf10 100644
--- a/src/graphql/operation.graphql
+++ b/src/graphql/operation.graphql
@@ -268,12 +268,14 @@ query getLibraryItem($slug: String, $language_code: String) {
}
}
... on ComponentMetadataVideo {
- resolution
- audio_languages {
+ subtype {
data {
attributes {
- code
- name
+ titles(
+ filters: { language: { code: { eq: $language_code } } }
+ ) {
+ title
+ }
}
}
}
@@ -324,14 +326,6 @@ query getLibraryItem($slug: String, $language_code: String) {
}
}
}
- languages {
- data {
- attributes {
- code
- name
- }
- }
- }
}
... on ComponentMetadataOther {
subtype {
diff --git a/src/graphql/operations-types.ts b/src/graphql/operations-types.ts
index e971bd6..7547006 100644
--- a/src/graphql/operations-types.ts
+++ b/src/graphql/operations-types.ts
@@ -403,17 +403,18 @@ export type GetLibraryItemQuery = {
}
| {
__typename: "ComponentMetadataVideo";
- resolution: Enum_Componentmetadatavideo_Resolution;
- audio_languages: {
- __typename: "LanguageRelationResponseCollection";
- data: Array<{
- __typename: "LanguageEntity";
+ subtype: {
+ __typename: "VideoSubtypeEntityResponse";
+ data: {
+ __typename: "VideoSubtypeEntity";
attributes: {
- __typename: "Language";
- code: string;
- name: string;
+ __typename: "VideoSubtype";
+ titles: Array<{
+ __typename: "ComponentTranslationsSimpleTitle";
+ title: string;
+ }>;
};
- }>;
+ };
};
}
| {
@@ -478,17 +479,6 @@ export type GetLibraryItemQuery = {
};
};
};
- languages: {
- __typename: "LanguageRelationResponseCollection";
- data: Array<{
- __typename: "LanguageEntity";
- attributes: {
- __typename: "Language";
- code: string;
- name: string;
- };
- }>;
- };
}
| {
__typename: "ComponentMetadataOther";
diff --git a/src/graphql/schema.graphql b/src/graphql/schema.graphql
index 2f6e33f..d16a8c1 100644
--- a/src/graphql/schema.graphql
+++ b/src/graphql/schema.graphql
@@ -430,11 +430,6 @@ type ComponentCollectionsComponentWeaponStory {
type ComponentMetadataAudio {
id: ID!
- languages(
- filters: LanguageFiltersInput
- pagination: PaginationArg = {}
- sort: [String] = []
- ): LanguageRelationResponseCollection
subtype: AudioSubtypeEntityResponse
}
@@ -492,22 +487,9 @@ type ComponentMetadataOther {
subtype: OtherSubtypeEntityResponse
}
-enum ENUM_COMPONENTMETADATAVIDEO_RESOLUTION {
- SD_480p
- HD_720p
- FullHD_1080p
- QuadHD_2160p
-}
-
type ComponentMetadataVideo {
id: ID!
- resolution: ENUM_COMPONENTMETADATAVIDEO_RESOLUTION
- audio_languages(
- filters: LanguageFiltersInput
- pagination: PaginationArg = {}
- sort: [String] = []
- ): LanguageRelationResponseCollection
- sub_languages: LanguageEntityResponse
+ subtype: VideoSubtypeEntityResponse
}
input ComponentPageBuilderComponentPaneFiltersInput {
@@ -2193,6 +2175,46 @@ type TextualSubtypeEntityResponseCollection {
meta: ResponseCollectionMeta!
}
+input VideoSubtypeFiltersInput {
+ id: IDFilterInput
+ slug: StringFilterInput
+ createdAt: DateTimeFilterInput
+ updatedAt: DateTimeFilterInput
+ and: [VideoSubtypeFiltersInput]
+ or: [VideoSubtypeFiltersInput]
+ not: VideoSubtypeFiltersInput
+}
+
+input VideoSubtypeInput {
+ slug: String
+ titles: [ComponentTranslationsSimpleTitleInput]
+}
+
+type VideoSubtype {
+ slug: String!
+ titles(
+ filters: ComponentTranslationsSimpleTitleFiltersInput
+ pagination: PaginationArg = {}
+ sort: [String] = []
+ ): [ComponentTranslationsSimpleTitle]
+ createdAt: DateTime
+ updatedAt: DateTime
+}
+
+type VideoSubtypeEntity {
+ id: ID
+ attributes: VideoSubtype
+}
+
+type VideoSubtypeEntityResponse {
+ data: VideoSubtypeEntity
+}
+
+type VideoSubtypeEntityResponseCollection {
+ data: [VideoSubtypeEntity!]!
+ meta: ResponseCollectionMeta!
+}
+
input WeaponStoryFiltersInput {
id: IDFilterInput
slug: StringFilterInput
@@ -2379,6 +2401,24 @@ input WebsiteInterfaceFiltersInput {
chronology_overview_description: StringFilterInput
chronology_walkthrough: StringFilterInput
chronology_walkthrough_description: StringFilterInput
+ library_item_front_matter: StringFilterInput
+ library_item_back_matter: StringFilterInput
+ library_item_type_textual: StringFilterInput
+ library_item_type_audio: StringFilterInput
+ library_item_type_game: StringFilterInput
+ library_item_type_video: StringFilterInput
+ library_item_type_other: StringFilterInput
+ library_item_open_content: StringFilterInput
+ library_item_view_scans: StringFilterInput
+ content_read_content: StringFilterInput
+ content_watch_content: StringFilterInput
+ content_listen_content: StringFilterInput
+ global_category: StringFilterInput
+ global_categories: StringFilterInput
+ global_paperback: StringFilterInput
+ global_hardcover: StringFilterInput
+ global_left_to_right: StringFilterInput
+ global_right_to_left: StringFilterInput
createdAt: DateTimeFilterInput
updatedAt: DateTimeFilterInput
and: [WebsiteInterfaceFiltersInput]
@@ -2432,6 +2472,24 @@ input WebsiteInterfaceInput {
chronology_overview_description: String
chronology_walkthrough: String
chronology_walkthrough_description: String
+ library_item_front_matter: String
+ library_item_back_matter: String
+ library_item_type_textual: String
+ library_item_type_audio: String
+ library_item_type_game: String
+ library_item_type_video: String
+ library_item_type_other: String
+ library_item_open_content: String
+ library_item_view_scans: String
+ content_read_content: String
+ content_watch_content: String
+ content_listen_content: String
+ global_category: String
+ global_categories: String
+ global_paperback: String
+ global_hardcover: String
+ global_left_to_right: String
+ global_right_to_left: String
}
type WebsiteInterface {
@@ -2480,6 +2538,24 @@ type WebsiteInterface {
chronology_overview_description: String
chronology_walkthrough: String
chronology_walkthrough_description: String
+ library_item_front_matter: String
+ library_item_back_matter: String
+ library_item_type_textual: String
+ library_item_type_audio: String
+ library_item_type_game: String
+ library_item_type_video: String
+ library_item_type_other: String
+ library_item_open_content: String
+ library_item_view_scans: String
+ content_read_content: String
+ content_watch_content: String
+ content_listen_content: String
+ global_category: String
+ global_categories: String
+ global_paperback: String
+ global_hardcover: String
+ global_left_to_right: String
+ global_right_to_left: String
createdAt: DateTime
updatedAt: DateTime
}
@@ -2567,6 +2643,7 @@ union GenericMorph =
| Recorder
| Source
| TextualSubtype
+ | VideoSubtype
| WeaponStory
| WeaponStoryGroup
| WeaponStoryType
@@ -2707,6 +2784,12 @@ type Query {
pagination: PaginationArg = {}
sort: [String] = []
): TextualSubtypeEntityResponseCollection
+ videoSubtype(id: ID): VideoSubtypeEntityResponse
+ videoSubtypes(
+ filters: VideoSubtypeFiltersInput
+ pagination: PaginationArg = {}
+ sort: [String] = []
+ ): VideoSubtypeEntityResponseCollection
weaponStory(id: ID): WeaponStoryEntityResponse
weaponStories(
filters: WeaponStoryFiltersInput
@@ -2823,6 +2906,12 @@ type Mutation {
data: TextualSubtypeInput!
): TextualSubtypeEntityResponse
deleteTextualSubtype(id: ID!): TextualSubtypeEntityResponse
+ createVideoSubtype(data: VideoSubtypeInput!): VideoSubtypeEntityResponse
+ updateVideoSubtype(
+ id: ID!
+ data: VideoSubtypeInput!
+ ): VideoSubtypeEntityResponse
+ deleteVideoSubtype(id: ID!): VideoSubtypeEntityResponse
createWeaponStory(data: WeaponStoryInput!): WeaponStoryEntityResponse
updateWeaponStory(id: ID!, data: WeaponStoryInput!): WeaponStoryEntityResponse
deleteWeaponStory(id: ID!): WeaponStoryEntityResponse
diff --git a/src/pages/404.tsx b/src/pages/404.tsx
index 450b6df..0a973ef 100644
--- a/src/pages/404.tsx
+++ b/src/pages/404.tsx
@@ -1,42 +1,30 @@
import Link from "next/link";
import ContentPanel from "components/Panels/ContentPanel";
-import { applyCustomAppProps } from "./_app";
-import Head from "next/head";
import { getWebsiteInterface } from "graphql/operations";
import { GetStaticProps } from "next";
import { GetWebsiteInterfaceQuery } from "graphql/operations-types";
-import MainPanel from "components/Panels/MainPanel";
+import AppLayout from "components/AppLayout";
-applyCustomAppProps(FourOhFour, {
- useSubPanel: false,
- useContentPanel: true,
-});
-
-type Props = {
+type FourOhFourProps = {
langui: GetWebsiteInterfaceQuery;
};
-export default function FourOhFour(props: Props): JSX.Element {
+export default function FourOhFour(props: FourOhFourProps): JSX.Element {
const langui = props.langui.websiteInterfaces.data[0].attributes;
- return (
- <>
-
-
Accord’s Library - 404
-
-
-
- 404 - Page Not Found
-
- Go back home
-
-
- >
+ const contentPanel = (
+
+ 404 - Page Not Found
+
+ Go back home
+
+
);
+ return
;
}
export const getStaticProps: GetStaticProps = async (context) => {
if (context.locale) {
- const props: Props = {
+ const props: FourOhFourProps = {
langui: await getWebsiteInterface({
language_code: context.locale,
}),
diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx
index 9fbe713..df5cd07 100644
--- a/src/pages/_app.tsx
+++ b/src/pages/_app.tsx
@@ -1,37 +1,9 @@
import type { AppProps } from "next/app";
-import MainPanel from "components/Panels/MainPanel";
import "tailwind.css";
import "@fontsource/zen-maru-gothic/500.css";
import "@fontsource/vollkorn/700.css";
import "@fontsource/material-icons";
-export type CustomAppProps = {
- useSubPanel: boolean;
- useContentPanel: boolean;
-};
-
-export function applyCustomAppProps(
- page: Function,
- customAppProps: CustomAppProps
-) {
- page.customAppProps = customAppProps;
-}
-
export default function AccordsLibraryApp(appProps: AppProps) {
- return (
-
- );
+ return
;
}
diff --git a/src/pages/about-us/index.tsx b/src/pages/about-us/index.tsx
index 66092ef..b242500 100644
--- a/src/pages/about-us/index.tsx
+++ b/src/pages/about-us/index.tsx
@@ -1,41 +1,31 @@
import SubPanel from "components/Panels/SubPanel";
-import { applyCustomAppProps } from "pages/_app";
import PanelHeader from "components/PanelComponents/PanelHeader";
-import MainPanel from "components/Panels/MainPanel";
import { GetWebsiteInterfaceQuery } from "graphql/operations-types";
import { GetStaticProps } from "next";
import { getWebsiteInterface } from "graphql/operations";
-import ContentPanel from "components/Panels/ContentPanel";
+import AppLayout from "components/AppLayout";
-applyCustomAppProps(AboutUs, {
- useSubPanel: true,
- useContentPanel: true,
-});
-
-type Props = {
+type AboutUsProps = {
langui: GetWebsiteInterfaceQuery;
};
-export default function AboutUs(props: Props): JSX.Element {
+export default function AboutUs(props: AboutUsProps): JSX.Element {
const langui = props.langui.websiteInterfaces.data[0].attributes;
- return (
- <>
-
-
-
-
-
Hello
- >
+ const subPanel = (
+
+
+
);
+ return
;
}
export const getStaticProps: GetStaticProps = async (context) => {
if (context.locale) {
- const props: Props = {
+ const props: AboutUsProps = {
langui: await getWebsiteInterface({
language_code: context.locale,
}),
diff --git a/src/pages/archives/index.tsx b/src/pages/archives/index.tsx
index 08e4c67..f6a34d1 100644
--- a/src/pages/archives/index.tsx
+++ b/src/pages/archives/index.tsx
@@ -1,41 +1,31 @@
import SubPanel from "components/Panels/SubPanel";
-import { applyCustomAppProps } from "pages/_app";
import PanelHeader from "components/PanelComponents/PanelHeader";
-import MainPanel from "components/Panels/MainPanel";
import { GetWebsiteInterfaceQuery } from "graphql/operations-types";
import { GetStaticProps } from "next";
import { getWebsiteInterface } from "graphql/operations";
-import ContentPanel from "components/Panels/ContentPanel";
+import AppLayout from "components/AppLayout";
-applyCustomAppProps(Archives, {
- useSubPanel: true,
- useContentPanel: true,
-});
-
-type Props = {
+type ArchivesProps = {
langui: GetWebsiteInterfaceQuery;
};
-export default function Archives(props: Props): JSX.Element {
+export default function Archives(props: ArchivesProps): JSX.Element {
const langui = props.langui.websiteInterfaces.data[0].attributes;
- return (
- <>
-
-
-
-
-
Hello
- >
+ const subPanel = (
+
+
+
);
+ return
;
}
export const getStaticProps: GetStaticProps = async (context) => {
if (context.locale) {
- const props: Props = {
+ const props: ArchivesProps = {
langui: await getWebsiteInterface({
language_code: context.locale,
}),
diff --git a/src/pages/chronicles/index.tsx b/src/pages/chronicles/index.tsx
index 73c4ef0..46eaf40 100644
--- a/src/pages/chronicles/index.tsx
+++ b/src/pages/chronicles/index.tsx
@@ -1,41 +1,31 @@
import SubPanel from "components/Panels/SubPanel";
-import { applyCustomAppProps } from "pages/_app";
import PanelHeader from "components/PanelComponents/PanelHeader";
-import MainPanel from "components/Panels/MainPanel";
import { GetWebsiteInterfaceQuery } from "graphql/operations-types";
import { GetStaticProps } from "next";
import { getWebsiteInterface } from "graphql/operations";
-import ContentPanel from "components/Panels/ContentPanel";
+import AppLayout from "components/AppLayout";
-applyCustomAppProps(Chronicles, {
- useSubPanel: true,
- useContentPanel: true,
-});
-
-type Props = {
+type ChroniclesProps = {
langui: GetWebsiteInterfaceQuery;
};
-export default function Chronicles(props: Props): JSX.Element {
+export default function Chronicles(props: ChroniclesProps): JSX.Element {
const langui = props.langui.websiteInterfaces.data[0].attributes;
- return (
- <>
-
-
-
-
-
Hello
- >
+ const subPanel = (
+
+
+
);
+ return
;
}
export const getStaticProps: GetStaticProps = async (context) => {
if (context.locale) {
- const props: Props = {
+ const props: ChroniclesProps = {
langui: await getWebsiteInterface({
language_code: context.locale,
}),
diff --git a/src/pages/content/[slug]/index.tsx b/src/pages/content/[slug]/index.tsx
index 9114db2..e416082 100644
--- a/src/pages/content/[slug]/index.tsx
+++ b/src/pages/content/[slug]/index.tsx
@@ -1,5 +1,4 @@
import { GetStaticPaths, GetStaticProps } from "next";
-import { applyCustomAppProps } from "pages/_app";
import {
getContent,
getContentsSlugs,
@@ -10,62 +9,55 @@ import {
GetWebsiteInterfaceQuery,
} from "graphql/operations-types";
import ContentPanel from "components/Panels/ContentPanel";
-import Image from "next/image";
-import { getAssetURL, prettySlug } from "queries/helpers";
import Button from "components/Button";
import HorizontalLine from "components/HorizontalLine";
import ThumbnailHeader from "components/Content/ThumbnailHeader";
-import MainPanel from "components/Panels/MainPanel";
+import AppLayout from "components/AppLayout";
-type Props = {
+type ContentIndexProps = {
content: GetContentQuery;
langui: GetWebsiteInterfaceQuery;
};
-applyCustomAppProps(Library, {
- useSubPanel: false,
- useContentPanel: true,
-});
-
-export default function Library(props: Props): JSX.Element {
+export default function ContentIndex(props: ContentIndexProps): JSX.Element {
const content = props.content.contents.data[0].attributes;
const langui = props.langui.websiteInterfaces.data[0].attributes;
+ const contentPanel = (
+
+
+
+
+
+
+ {content.text_set.length > 0 ? (
+
+ {langui.content_read_content}
+
+ ) : (
+ ""
+ )}
+
+ {content.audio_set.length > 0 ? (
+
+ {langui.content_listen_content}
+
+ ) : (
+ ""
+ )}
+
+ {content.video_set.length > 0 ? (
+
+ {langui.content_watch_content}
+
+ ) : (
+ ""
+ )}
+
+
+ );
return (
- <>
-
-
-
-
-
-
-
- {content.text_set.length > 0 ? (
-
- {langui.content_read_content}
-
- ) : (
- ""
- )}
-
- {content.audio_set.length > 0 ? (
-
- {langui.content_listen_content}
-
- ) : (
- ""
- )}
-
- {content.video_set.length > 0 ? (
-
- {langui.content_watch_content}
-
- ) : (
- ""
- )}
-
-
- >
+
);
}
@@ -75,7 +67,7 @@ export const getStaticProps: GetStaticProps = async (context) => {
if (context.params.slug instanceof Array)
context.params.slug = context.params.slug.join("");
- const props: Props = {
+ const props: ContentIndexProps = {
content: await getContent({
slug: context.params.slug,
language_code: context.locale,
diff --git a/src/pages/content/[slug]/read.tsx b/src/pages/content/[slug]/read.tsx
index 4bda0ef..9ad8dbe 100644
--- a/src/pages/content/[slug]/read.tsx
+++ b/src/pages/content/[slug]/read.tsx
@@ -1,5 +1,4 @@
import { GetStaticPaths, GetStaticProps } from "next";
-import { applyCustomAppProps } from "pages/_app";
import {
getContentsSlugs,
getContentText,
@@ -10,60 +9,59 @@ import {
GetWebsiteInterfaceQuery,
} from "graphql/operations-types";
import ContentPanel from "components/Panels/ContentPanel";
-import Image from "next/image";
-import { getAssetURL, prettySlug } from "queries/helpers";
-import Button from "components/Button";
import HorizontalLine from "components/HorizontalLine";
import Markdown from "markdown-to-jsx";
import SubPanel from "components/Panels/SubPanel";
import ReturnButton from "components/PanelComponents/ReturnButton";
import SceneBreak from "components/Markdown/SceneBreak";
import ThumbnailHeader from "components/Content/ThumbnailHeader";
-import MainPanel from "components/Panels/MainPanel";
+import AppLayout from "components/AppLayout";
-type Props = {
+type ContentReadProps = {
content: GetContentTextQuery;
langui: GetWebsiteInterfaceQuery;
};
-applyCustomAppProps(Library, {
- useSubPanel: true,
- useContentPanel: true,
-});
-
-export default function Library(props: Props): JSX.Element {
+export default function ContentRead(props: ContentReadProps): JSX.Element {
const content = props.content.contents.data[0].attributes;
const langui = props.langui.websiteInterfaces.data[0].attributes;
+ const subPanel = (
+
+
+
+ );
+ const contentPanel = (
+
+
+
+
+
+
+ {content.text_set.length > 0 ? (
+
+ {content.text_set[0].text}
+
+ ) : (
+ ""
+ )}
+
+
+ );
return (
- <>
-
-
-
-
-
-
-
-
-
-
- {content.text_set.length > 0 ? (
-
- {content.text_set[0].text}
-
- ) : (
- ""
- )}
-
-
- >
+
);
}
@@ -73,7 +71,7 @@ export const getStaticProps: GetStaticProps = async (context) => {
if (context.params.slug instanceof Array)
context.params.slug = context.params.slug.join("");
- const props: Props = {
+ const props: ContentReadProps = {
content: await getContentText({
slug: context.params.slug,
language_code: context.locale,
diff --git a/src/pages/data/chronology.tsx b/src/pages/data/chronology.tsx
index 88d2955..cd5203f 100644
--- a/src/pages/data/chronology.tsx
+++ b/src/pages/data/chronology.tsx
@@ -2,7 +2,6 @@ import { GetStaticProps } from "next";
import ContentPanel from "components/Panels/ContentPanel";
import SubPanel from "components/Panels/SubPanel";
import ChronologyYearComponent from "components/Chronology/ChronologyYearComponent";
-import { applyCustomAppProps } from "pages/_app";
import {
GetChronologyItemsQuery,
GetErasQuery,
@@ -16,22 +15,20 @@ import {
import NavOption from "components/PanelComponents/NavOption";
import ReturnButton from "components/PanelComponents/ReturnButton";
import HorizontalLine from "components/HorizontalLine";
-import MainPanel from "components/Panels/MainPanel";
+import AppLayout from "components/AppLayout";
-interface Props {
+interface DataChronologyProps {
chronologyItems: GetChronologyItemsQuery;
chronologyEras: GetErasQuery;
langui: GetWebsiteInterfaceQuery;
}
-applyCustomAppProps(ChronologyOverview, {
- useSubPanel: true,
- useContentPanel: true,
-});
-
-export default function ChronologyOverview(props: Props): JSX.Element {
- // Group by year the Chronology items
+export default function DataChronology(
+ props: DataChronologyProps
+): JSX.Element {
const langui = props.langui.websiteInterfaces.data[0].attributes;
+
+ // Group by year the Chronology items
let chronologyItemYearGroups: GetChronologyItemsQuery["chronologyItems"]["data"][number][][] =
[];
@@ -45,46 +42,54 @@ export default function ChronologyOverview(props: Props): JSX.Element {
});
}
- return (
- <>
-
-
-
-
+ const subPanel = (
+
+
+
- {props.chronologyEras.chronologyEras.data.map((era) => (
-
- ))}
-
-
-
- {chronologyItemYearGroups.map((items, index: number) => {
- if (items && items[0].attributes.year) {
- return (
-
- );
+ {props.chronologyEras.chronologyEras.data.map((era) => (
+
- >
+ border={true}
+ />
+ ))}
+
+ );
+
+ const contentPanel = (
+
+ {chronologyItemYearGroups.map((items, index: number) => {
+ if (items && items[0].attributes.year) {
+ return (
+
+ );
+ }
+ })}
+
+ );
+
+ return (
+
);
}
export const getStaticProps: GetStaticProps = async (context) => {
if (context.locale) {
- const props: Props = {
+ const props: DataChronologyProps = {
chronologyItems: await getChronologyItems({
language_code: context.locale,
}),
diff --git a/src/pages/data/index.tsx b/src/pages/data/index.tsx
index d35f5b6..237f15f 100644
--- a/src/pages/data/index.tsx
+++ b/src/pages/data/index.tsx
@@ -1,68 +1,61 @@
import SubPanel from "components/Panels/SubPanel";
import NavOption from "components/PanelComponents/NavOption";
-import { applyCustomAppProps } from "pages/_app";
import PanelHeader from "components/PanelComponents/PanelHeader";
-import MainPanel from "components/Panels/MainPanel";
import { GetWebsiteInterfaceQuery } from "graphql/operations-types";
import { GetStaticProps } from "next";
import { getWebsiteInterface } from "graphql/operations";
+import AppLayout from "components/AppLayout";
-applyCustomAppProps(Data, {
- useSubPanel: true,
- useContentPanel: false,
-});
-
-type Props = {
+type DataProps = {
langui: GetWebsiteInterfaceQuery;
};
-export default function Data(props: Props): JSX.Element {
+export default function Data(props: DataProps): JSX.Element {
const langui = props.langui.websiteInterfaces.data[0].attributes;
- return (
- <>
-
-
-
+ const subPanel = (
+
+
-
+
-
+
-
+
-
-
- >
+
+
);
+
+ return
;
}
export const getStaticProps: GetStaticProps = async (context) => {
if (context.locale) {
- const props: Props = {
+ const props: DataProps = {
langui: await getWebsiteInterface({
language_code: context.locale,
}),
diff --git a/src/pages/gallery/index.tsx b/src/pages/gallery/index.tsx
index 607be2c..60e8e50 100644
--- a/src/pages/gallery/index.tsx
+++ b/src/pages/gallery/index.tsx
@@ -1,34 +1,29 @@
-import MainPanel from "components/Panels/MainPanel";
+import AppLayout from "components/AppLayout";
import { getWebsiteInterface } from "graphql/operations";
import { GetWebsiteInterfaceQuery } from "graphql/operations-types";
import { GetStaticProps } from "next";
-import { applyCustomAppProps } from "pages/_app";
-applyCustomAppProps(Gallery, {
- useSubPanel: false,
- useContentPanel: true,
-});
-
-type Props = {
+type GalleryProps = {
langui: GetWebsiteInterfaceQuery;
};
-export default function Gallery(props: Props): JSX.Element {
+export default function Gallery(props: GalleryProps): JSX.Element {
const langui = props.langui.websiteInterfaces.data[0].attributes;
+ const contentPanel = (
+
+ );
+
return (
- <>
-
-
- >
+
);
}
export const getStaticProps: GetStaticProps = async (context) => {
if (context.locale) {
- const props: Props = {
+ const props: GalleryProps = {
langui: await getWebsiteInterface({
language_code: context.locale,
}),
diff --git a/src/pages/hubs/index.tsx b/src/pages/hubs/index.tsx
index 4bf50fc..d146c75 100644
--- a/src/pages/hubs/index.tsx
+++ b/src/pages/hubs/index.tsx
@@ -1,41 +1,41 @@
import SubPanel from "components/Panels/SubPanel";
-import { applyCustomAppProps } from "pages/_app";
import PanelHeader from "components/PanelComponents/PanelHeader";
-import MainPanel from "components/Panels/MainPanel";
import { GetWebsiteInterfaceQuery } from "graphql/operations-types";
import { GetStaticProps } from "next";
import { getWebsiteInterface } from "graphql/operations";
import ContentPanel from "components/Panels/ContentPanel";
+import AppLayout from "components/AppLayout";
-applyCustomAppProps(Hubs, {
- useSubPanel: true,
- useContentPanel: true,
-});
-
-type Props = {
+type HubsProps = {
langui: GetWebsiteInterfaceQuery;
};
-export default function Hubs(props: Props): JSX.Element {
+export default function Hubs(props: HubsProps): JSX.Element {
const langui = props.langui.websiteInterfaces.data[0].attributes;
+ const subPanel = (
+
+
+
+ );
+ const contentPanel =
Hello ;
+
return (
- <>
-
-
-
-
-
Hello
- >
+
);
}
export const getStaticProps: GetStaticProps = async (context) => {
if (context.locale) {
- const props: Props = {
+ const props: HubsProps = {
langui: await getWebsiteInterface({
language_code: context.locale,
}),
diff --git a/src/pages/index.tsx b/src/pages/index.tsx
index f9a6cd5..1a84cc7 100644
--- a/src/pages/index.tsx
+++ b/src/pages/index.tsx
@@ -1,160 +1,150 @@
+import AppLayout from "components/AppLayout";
import ContentPanel from "components/Panels/ContentPanel";
-import MainPanel from "components/Panels/MainPanel";
import { getWebsiteInterface } from "graphql/operations";
import { GetWebsiteInterfaceQuery } from "graphql/operations-types";
import { GetStaticProps } from "next";
import Head from "next/head";
-import { applyCustomAppProps } from "./_app";
-
-applyCustomAppProps(Home, {
- useSubPanel: false,
- useContentPanel: true,
-});
-
-type Props = {
+type HomeProps = {
langui: GetWebsiteInterfaceQuery;
};
-export default function Home(props: Props): JSX.Element {
+export default function Home(props: HomeProps): JSX.Element {
const langui = props.langui.websiteInterfaces.data[0].attributes;
+
+ const contentPanel = (
+
+ 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.
+
+
+ );
+
return (
<>
-
-
Accord’s Library - Home
-
-
-
-
-
- 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 const getStaticProps: GetStaticProps = async (context) => {
if (context.locale) {
- const props: Props = {
+ const props: HomeProps = {
langui: await getWebsiteInterface({
language_code: context.locale,
}),
diff --git a/src/pages/library/[slug].tsx b/src/pages/library/[slug].tsx
index 5b7df46..b6d9874 100644
--- a/src/pages/library/[slug].tsx
+++ b/src/pages/library/[slug].tsx
@@ -3,7 +3,6 @@ import ContentPanel, {
} from "components/Panels/ContentPanel";
import Image from "next/image";
import { GetStaticPaths, GetStaticProps } from "next";
-import { applyCustomAppProps } from "pages/_app";
import {
getLibraryItem,
getLibraryItemsSlugs,
@@ -30,21 +29,469 @@ import LibraryItemComponent from "components/Library/LibraryItemComponent";
import Chip from "components/Chip";
import Button from "components/Button";
import HorizontalLine from "components/HorizontalLine";
-import MainPanel from "components/Panels/MainPanel";
+import AppLayout from "components/AppLayout";
-type Props = {
+type LibrarySlugProps = {
libraryItem: GetLibraryItemQuery;
langui: GetWebsiteInterfaceQuery;
};
-applyCustomAppProps(Library, {
- useSubPanel: true,
- useContentPanel: true,
-});
-
-export default function Library(props: Props): JSX.Element {
+export default function LibrarySlug(props: LibrarySlugProps): JSX.Element {
const item = props.libraryItem.libraryItems.data[0].attributes;
const langui = props.langui.websiteInterfaces.data[0].attributes;
+ const subPanel = (
+
+
+
+
+
+
+ {item.gallery.data.length > 0 ? (
+
+ ) : (
+ ""
+ )}
+
+
+
+ {item.subitems.data.length > 0 ? (
+ item.metadata.length > 0 &&
+ item.metadata[0].__typename === "ComponentMetadataOther" &&
+ item.metadata[0].subtype.data.attributes.slug === "variant-set" ? (
+
+ ) : (
+
+ )
+ ) : (
+ ""
+ )}
+
+ {item.contents.data.length > 0 ? (
+
+ ) : (
+ ""
+ )}
+
+ );
+
+ const contentPanel = (
+
+
+
+ {item.thumbnail.data ? (
+
+ ) : (
+
+ )}
+
+
+
+
+ {item.subitem_of.data.length > 0 ? (
+
+
{langui.global_subitem_of}
+
+ {prettyinlineTitle(
+ "",
+ item.subitem_of.data[0].attributes.title,
+ item.subitem_of.data[0].attributes.subtitle
+ )}
+
+
+ ) : (
+ ""
+ )}
+
+
{item.title}
+ {item.subtitle ? (
+ {item.subtitle}
+ ) : (
+ ""
+ )}
+
+ {item.descriptions.length > 0 ? (
+
{item.descriptions[0].description}
+ ) : (
+ ""
+ )}
+
+
+
+ {item.gallery.data.length > 0 ? (
+
+
{langui.library_item_gallery}
+
+ {item.gallery.data.map((galleryItem) => (
+
+ ))}
+
+
+ ) : (
+ ""
+ )}
+
+
+
+
+ {langui.library_item_details}
+
+
+ {item.metadata.length > 0 ? (
+
+
{langui.global_type}
+
+ {item.metadata[0].__typename === "ComponentMetadataAudio"
+ ? langui.library_item_type_audio
+ : item.metadata[0].__typename === "ComponentMetadataBooks"
+ ? langui.library_item_type_textual
+ : item.metadata[0].__typename === "ComponentMetadataGame"
+ ? langui.library_item_type_game
+ : item.metadata[0].__typename === "ComponentMetadataOther"
+ ? langui.library_item_type_game
+ : item.metadata[0].__typename === "ComponentMetadataVideo"
+ ? langui.library_item_type_video
+ : ""}
+
+
+ ) : (
+ ""
+ )}
+
+ {item.release_date ? (
+
+
{langui.global_release_date}
+
{prettyDate(item.release_date)}
+
+ ) : (
+ ""
+ )}
+
+ {item.release_date ? (
+
+
{langui.global_price}
+
{prettyPrice(item.price)}
+
+ ) : (
+ ""
+ )}
+
+ {item.size ? (
+ <>
+
{langui.library_item_physical_size}
+
+
+
{langui.global_width}:
+
+
{item.size.width} mm
+
{convertMmToInch(item.size.width)} in
+
+
+
+
{langui.global_height}:
+
+
{item.size.height} mm
+
{convertMmToInch(item.size.height)} in
+
+
+ {item.size.thickness ? (
+
+
{langui.global_thickness}:
+
+
{item.size.thickness} mm
+
{convertMmToInch(item.size.thickness)} in
+
+
+ ) : (
+ ""
+ )}
+
+ >
+ ) : (
+ ""
+ )}
+
+ {item.metadata.length > 0 ? (
+ <>
+
+ {langui.library_item_type_information}
+
+
+ {item.metadata[0].__typename === "ComponentMetadataBooks" ? (
+ <>
+
+
{langui.global_type}:
+
+ {item.metadata[0].subtype.data.attributes.titles
+ .length > 0
+ ? item.metadata[0].subtype.data.attributes.titles[0]
+ .title
+ : prettySlug(
+ item.metadata[0].subtype.data.attributes.slug
+ )}
+
+
+
+
+
{langui.global_pages}:
+
{item.metadata[0].page_count}
+
+
+
+
{langui.global_binding}:
+
+ {item.metadata[0].binding_type ===
+ Enum_Componentmetadatabooks_Binding_Type.Paperback
+ ? langui.global_paperback
+ : item.metadata[0].binding_type ===
+ Enum_Componentmetadatabooks_Binding_Type.Hardcover
+ ? langui.global_hardcover
+ : ""}
+
+
+
+
+
{langui.global_page_order}:
+
+ {item.metadata[0].page_order ===
+ Enum_Componentmetadatabooks_Page_Order.LeftToRight
+ ? langui.global_left_to_right
+ : item.metadata[0].page_order ===
+ Enum_Componentmetadatabooks_Page_Order.RightToLeft
+ ? langui.global_right_to_left
+ : ""}
+
+
+
+
+
{langui.global_languages}:
+ {item.metadata[0].languages.data.map((lang) => (
+
+ {lang.attributes.name}
+
+ ))}
+
+ >
+ ) : item.metadata[0].__typename ===
+ "ComponentMetadataAudio" ? (
+ <>>
+ ) : item.metadata[0].__typename ===
+ "ComponentMetadataVideo" ? (
+ <>>
+ ) : item.metadata[0].__typename ===
+ "ComponentMetadataGame" ? (
+ <>>
+ ) : item.metadata[0].__typename ===
+ "ComponentMetadataOther" ? (
+ <>
+
+
{langui.global_type}:
+
+ {item.metadata[0].subtype.data.attributes.titles
+ .length > 0
+ ? item.metadata[0].subtype.data.attributes.titles[0]
+ .title
+ : prettySlug(
+ item.metadata[0].subtype.data.attributes.slug
+ )}
+
+
+ >
+ ) : (
+ ""
+ )}
+
+ >
+ ) : (
+ ""
+ )}
+
+
+
+ {item.subitems.data.length > 0 ? (
+ item.metadata.length > 0 &&
+ item.metadata[0].__typename === "ComponentMetadataOther" &&
+ item.metadata[0].subtype.data.attributes.slug === "variant-set" ? (
+
+
{langui.library_item_variants}
+
+ {item.subitems.data.map((variant) => (
+
+ ))}
+
+
+ ) : (
+
+
{langui.library_item_subitems}
+
+ {item.subitems.data.map((subitem) => (
+
+ ))}
+
+
+ )
+ ) : (
+ ""
+ )}
+
+ {item.contents.data.length > 0 ? (
+
+
{langui.library_item_content}
+
+ {item.contents.data.map((content) => (
+
+
+
+
+ subdirectory_arrow_right
+
+
+ {content.attributes.scan_set.length > 0 ? (
+
+ {langui.library_item_view_scans}
+
+ ) : (
+ ""
+ )}
+
+ {content.attributes.content.data ? (
+
+ {langui.library_item_open_content}
+
+ ) : (
+ ""
+ )}
+
+ {content.attributes.scan_set.length === 0 &&
+ !content.attributes.content.data
+ ? "The content is not available"
+ : ""}
+
+
+ ))}
+
+
+ ) : (
+ ""
+ )}
+
+
+ );
item.contents.data.sort((a, b) => {
if (
@@ -60,474 +507,12 @@ export default function Library(props: Props): JSX.Element {
});
return (
- <>
-
-
-
-
-
-
-
- {item.gallery.data.length > 0 ? (
-
- ) : (
- ""
- )}
-
-
-
- {item.subitems.data.length > 0 ? (
- item.metadata.length > 0 &&
- item.metadata[0].__typename === "ComponentMetadataOther" &&
- item.metadata[0].subtype.data.attributes.slug === "variant-set" ? (
-
- ) : (
-
- )
- ) : (
- ""
- )}
-
- {item.contents.data.length > 0 ? (
-
- ) : (
- ""
- )}
-
-
-
-
- {item.thumbnail.data ? (
-
- ) : (
-
- )}
-
-
-
-
- {item.subitem_of.data.length > 0 ? (
-
-
{langui.global_subitem_of}
-
- {prettyinlineTitle(
- "",
- item.subitem_of.data[0].attributes.title,
- item.subitem_of.data[0].attributes.subtitle
- )}
-
-
- ) : (
- ""
- )}
-
-
{item.title}
- {item.subtitle ? (
- {item.subtitle}
- ) : (
- ""
- )}
-
- {item.descriptions.length > 0 ? (
-
{item.descriptions[0].description}
- ) : (
- ""
- )}
-
-
-
- {item.gallery.data.length > 0 ? (
-
-
{langui.library_item_gallery}
-
- {item.gallery.data.map((galleryItem) => (
-
- ))}
-
-
- ) : (
- ""
- )}
-
-
-
-
- {langui.library_item_details}
-
-
- {item.metadata.length > 0 ? (
-
-
{langui.global_type}
-
- {item.metadata[0].__typename === "ComponentMetadataAudio"
- ? langui.library_item_type_audio
- : item.metadata[0].__typename ===
- "ComponentMetadataBooks"
- ? langui.library_item_type_textual
- : item.metadata[0].__typename ===
- "ComponentMetadataGame"
- ? langui.library_item_type_game
- : item.metadata[0].__typename ===
- "ComponentMetadataOther"
- ? langui.library_item_type_game
- : item.metadata[0].__typename ===
- "ComponentMetadataVideo"
- ? langui.library_item_type_video
- : ""}
-
-
- ) : (
- ""
- )}
-
- {item.release_date ? (
-
-
{langui.global_release_date}
-
{prettyDate(item.release_date)}
-
- ) : (
- ""
- )}
-
- {item.release_date ? (
-
-
{langui.global_price}
-
{prettyPrice(item.price)}
-
- ) : (
- ""
- )}
-
- {item.size ? (
- <>
-
- {langui.library_item_physical_size}
-
-
-
-
{langui.global_width}:
-
-
{item.size.width} mm
-
{convertMmToInch(item.size.width)} in
-
-
-
-
{langui.global_height}:
-
-
{item.size.height} mm
-
{convertMmToInch(item.size.height)} in
-
-
- {item.size.thickness ? (
-
-
{langui.global_thickness}:
-
-
{item.size.thickness} mm
-
{convertMmToInch(item.size.thickness)} in
-
-
- ) : (
- ""
- )}
-
- >
- ) : (
- ""
- )}
-
- {item.metadata.length > 0 ? (
- <>
-
- {langui.library_item_type_information}
-
-
- {item.metadata[0].__typename ===
- "ComponentMetadataBooks" ? (
- <>
-
-
{langui.global_type}:
-
- {item.metadata[0].subtype.data.attributes.titles
- .length > 0
- ? item.metadata[0].subtype.data.attributes
- .titles[0].title
- : prettySlug(
- item.metadata[0].subtype.data.attributes.slug
- )}
-
-
-
-
-
{langui.global_pages}:
-
{item.metadata[0].page_count}
-
-
-
-
{langui.global_binding}:
-
- {item.metadata[0].binding_type ===
- Enum_Componentmetadatabooks_Binding_Type.Paperback
- ? langui.global_paperback
- : item.metadata[0].binding_type ===
- Enum_Componentmetadatabooks_Binding_Type.Hardcover
- ? langui.global_hardcover
- : ""}
-
-
-
-
-
- {langui.global_page_order}:
-
-
- {item.metadata[0].page_order ===
- Enum_Componentmetadatabooks_Page_Order.LeftToRight
- ? langui.global_left_to_right
- : item.metadata[0].page_order ===
- Enum_Componentmetadatabooks_Page_Order.RightToLeft
- ? langui.global_right_to_left
- : ""}
-
-
-
-
-
- {langui.global_languages}:
-
- {item.metadata[0].languages.data.map((lang) => (
-
- {lang.attributes.name}
-
- ))}
-
- >
- ) : item.metadata[0].__typename ===
- "ComponentMetadataAudio" ? (
- <>>
- ) : item.metadata[0].__typename ===
- "ComponentMetadataVideo" ? (
- <>>
- ) : item.metadata[0].__typename ===
- "ComponentMetadataGame" ? (
- <>>
- ) : item.metadata[0].__typename ===
- "ComponentMetadataOther" ? (
- <>
-
-
{langui.global_type}:
-
- {item.metadata[0].subtype.data.attributes.titles
- .length > 0
- ? item.metadata[0].subtype.data.attributes
- .titles[0].title
- : prettySlug(
- item.metadata[0].subtype.data.attributes.slug
- )}
-
-
- >
- ) : (
- ""
- )}
-
- >
- ) : (
- ""
- )}
-
-
-
- {item.subitems.data.length > 0 ? (
- item.metadata.length > 0 &&
- item.metadata[0].__typename === "ComponentMetadataOther" &&
- item.metadata[0].subtype.data.attributes.slug === "variant-set" ? (
-
-
{langui.library_item_variants}
-
- {item.subitems.data.map((variant) => (
-
- ))}
-
-
- ) : (
-
-
{langui.library_item_subitems}
-
- {item.subitems.data.map((subitem) => (
-
- ))}
-
-
- )
- ) : (
- ""
- )}
-
- {item.contents.data.length > 0 ? (
-
-
{langui.library_item_content}
-
- {item.contents.data.map((content) => (
-
-
-
-
- subdirectory_arrow_right
-
-
- {content.attributes.scan_set.length > 0 ? (
-
- {langui.library_item_view_scans}
-
- ) : (
- ""
- )}
-
- {content.attributes.content.data ? (
-
- {langui.library_item_open_content}
-
- ) : (
- ""
- )}
-
- {content.attributes.scan_set.length === 0 &&
- !content.attributes.content.data
- ? "The content is not available"
- : ""}
-
-
- ))}
-
-
- ) : (
- ""
- )}
-
-
- >
+
);
}
@@ -537,7 +522,7 @@ export const getStaticProps: GetStaticProps = async (context) => {
if (context.params.slug instanceof Array)
context.params.slug = context.params.slug.join("");
- const props: Props = {
+ const props: LibrarySlugProps = {
libraryItem: await getLibraryItem({
slug: context.params.slug,
language_code: context.locale,
diff --git a/src/pages/library/index.tsx b/src/pages/library/index.tsx
index 1cc5ac9..26586a8 100644
--- a/src/pages/library/index.tsx
+++ b/src/pages/library/index.tsx
@@ -4,7 +4,6 @@ import ContentPanel, {
ContentPanelWidthSizes,
} from "components/Panels/ContentPanel";
import LibraryItemComponent from "components/Library/LibraryItemComponent";
-import { applyCustomAppProps } from "pages/_app";
import {
GetLibraryItemsPreviewQuery,
GetWebsiteInterfaceQuery,
@@ -14,49 +13,46 @@ import {
getWebsiteInterface,
} from "graphql/operations";
import PanelHeader from "components/PanelComponents/PanelHeader";
-import MainPanel from "components/Panels/MainPanel";
-import Head from "next/head";
+import AppLayout from "components/AppLayout";
-type Props = {
+type LibraryProps = {
libraryItems: GetLibraryItemsPreviewQuery;
langui: GetWebsiteInterfaceQuery;
};
-applyCustomAppProps(Library, {
- useSubPanel: true,
- useContentPanel: true,
-});
-
-export default function Library(props: Props): JSX.Element {
+export default function Library(props: LibraryProps): JSX.Element {
const langui = props.langui.websiteInterfaces.data[0].attributes;
+ const subPanel = (
+
+
+
+ );
+ const contentPanel = (
+
+
+ {props.libraryItems.libraryItems.data.map((item) => (
+
+ ))}
+
+
+ );
return (
- <>
-
-
Accord’s Library - Library
-
-
-
-
-
-
-
-
- {props.libraryItems.libraryItems.data.map((item) => (
-
- ))}
-
-
- >
+
);
}
export const getStaticProps: GetStaticProps = async (context) => {
if (context.locale) {
- const props: Props = {
+ const props: LibraryProps = {
libraryItems: await getLibraryItemsPreview({
language_code: context.locale,
}),
diff --git a/src/pages/merch/index.tsx b/src/pages/merch/index.tsx
index 24fa29a..ed534e9 100644
--- a/src/pages/merch/index.tsx
+++ b/src/pages/merch/index.tsx
@@ -1,41 +1,32 @@
import SubPanel from "components/Panels/SubPanel";
-import { applyCustomAppProps } from "pages/_app";
import PanelHeader from "components/PanelComponents/PanelHeader";
-import MainPanel from "components/Panels/MainPanel";
import { GetWebsiteInterfaceQuery } from "graphql/operations-types";
import { GetStaticProps } from "next";
import { getWebsiteInterface } from "graphql/operations";
-import ContentPanel from "components/Panels/ContentPanel";
+import AppLayout from "components/AppLayout";
-applyCustomAppProps(Merch, {
- useSubPanel: true,
- useContentPanel: true,
-});
-
-type Props = {
+type MerchProps = {
langui: GetWebsiteInterfaceQuery;
};
-export default function Merch(props: Props): JSX.Element {
+export default function Merch(props: MerchProps): JSX.Element {
const langui = props.langui.websiteInterfaces.data[0].attributes;
- return (
- <>
-
-
-
-
-
Hello
- >
+ const subPanel = (
+
+
+
);
+
+ return
;
}
export const getStaticProps: GetStaticProps = async (context) => {
if (context.locale) {
- const props: Props = {
+ const props: MerchProps = {
langui: await getWebsiteInterface({
language_code: context.locale,
}),
diff --git a/src/pages/news/index.tsx b/src/pages/news/index.tsx
index 2dfe173..be7932a 100644
--- a/src/pages/news/index.tsx
+++ b/src/pages/news/index.tsx
@@ -1,41 +1,32 @@
import SubPanel from "components/Panels/SubPanel";
-import { applyCustomAppProps } from "pages/_app";
import PanelHeader from "components/PanelComponents/PanelHeader";
-import MainPanel from "components/Panels/MainPanel";
import { GetWebsiteInterfaceQuery } from "graphql/operations-types";
import { GetStaticProps } from "next";
import { getWebsiteInterface } from "graphql/operations";
-import ContentPanel from "components/Panels/ContentPanel";
+import AppLayout from "components/AppLayout";
-applyCustomAppProps(News, {
- useSubPanel: true,
- useContentPanel: true,
-});
-
-type Props = {
+type NewsProps = {
langui: GetWebsiteInterfaceQuery;
};
-export default function News(props: Props): JSX.Element {
+export default function News(props: NewsProps): JSX.Element {
const langui = props.langui.websiteInterfaces.data[0].attributes;
- return (
- <>
-
-
-
-
-
Hello
- >
+ const subPanel = (
+
+
+
);
+
+ return
;
}
export const getStaticProps: GetStaticProps = async (context) => {
if (context.locale) {
- const props: Props = {
+ const props: NewsProps = {
langui: await getWebsiteInterface({
language_code: context.locale,
}),
diff --git a/src/queries/helpers.ts b/src/queries/helpers.ts
index 3222038..6ffc7ac 100644
--- a/src/queries/helpers.ts
+++ b/src/queries/helpers.ts
@@ -57,4 +57,4 @@ export function capitalizeString(string: string): string {
export function convertMmToInch(mm: number): string {
return (mm * 0.03937008).toPrecision(3);
-}
\ No newline at end of file
+}
diff --git a/tailwind.config.js b/tailwind.config.js
index 84bb11e..06f055d 100644
--- a/tailwind.config.js
+++ b/tailwind.config.js
@@ -13,6 +13,10 @@ module.exports = {
body: ["Zen Maru Gothic"],
headers: ["Vollkorn"],
},
+ screens: {
+ desktop: {'min': '70rem'},
+ mobile: {'max': '70rem'},
+ }
},
plugins: [
require("@tailwindcss/typography"),