fixed the links
This commit is contained in:
parent
3ce7cd487c
commit
2b2a9c41e2
|
@ -20,7 +20,7 @@ export default function LibraryContentPreview(
|
||||||
const item = props.item;
|
const item = props.item;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Link href={"/library/content/" + item.slug} passHref>
|
<Link href={"/contents/" + item.slug} passHref>
|
||||||
<div className="drop-shadow-dark-xl cursor-pointer grid items-end fine:[--cover-opacity:0] hover:[--cover-opacity:1] hover:scale-[1.02] transition-transform">
|
<div className="drop-shadow-dark-xl cursor-pointer grid items-end fine:[--cover-opacity:0] hover:[--cover-opacity:1] hover:scale-[1.02] transition-transform">
|
||||||
{item.thumbnail.data ? (
|
{item.thumbnail.data ? (
|
||||||
<Img
|
<Img
|
||||||
|
|
|
@ -23,7 +23,7 @@ export default function LibraryItemsPreview(
|
||||||
const item = props.item;
|
const item = props.item;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Link href={"/library/items/" + item.slug} passHref>
|
<Link href={"/library/" + item.slug} passHref>
|
||||||
<div
|
<div
|
||||||
className={`drop-shadow-dark-xl cursor-pointer grid items-end hover:rounded-3xl fine:[--cover-opacity:0] hover:[--cover-opacity:1] hover:scale-[1.02] transition-transform ${props.className}`}
|
className={`drop-shadow-dark-xl cursor-pointer grid items-end hover:rounded-3xl fine:[--cover-opacity:0] hover:[--cover-opacity:1] hover:scale-[1.02] transition-transform ${props.className}`}
|
||||||
>
|
>
|
||||||
|
|
|
@ -27,7 +27,7 @@ export default function ContentIndex(props: ContentIndexProps): JSX.Element {
|
||||||
const subPanel = (
|
const subPanel = (
|
||||||
<SubPanel>
|
<SubPanel>
|
||||||
<ReturnButton
|
<ReturnButton
|
||||||
href="/library/content"
|
href="/contents"
|
||||||
title={langui.library_content}
|
title={langui.library_content}
|
||||||
langui={langui}
|
langui={langui}
|
||||||
/>
|
/>
|
||||||
|
@ -42,7 +42,7 @@ export default function ContentIndex(props: ContentIndexProps): JSX.Element {
|
||||||
<HorizontalLine />
|
<HorizontalLine />
|
||||||
|
|
||||||
{content.text_set.length > 0 ? (
|
{content.text_set.length > 0 ? (
|
||||||
<Button href={`/library/content/${content.slug}/read/`}>
|
<Button href={`/contents/${content.slug}/read/`}>
|
||||||
{langui.content_read_content}
|
{langui.content_read_content}
|
||||||
</Button>
|
</Button>
|
||||||
) : (
|
) : (
|
||||||
|
@ -50,7 +50,7 @@ export default function ContentIndex(props: ContentIndexProps): JSX.Element {
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{content.audio_set.length > 0 ? (
|
{content.audio_set.length > 0 ? (
|
||||||
<Button href={`/library/content/${content.slug}/listen/`}>
|
<Button href={`/contents/${content.slug}/listen/`}>
|
||||||
{langui.content_listen_content}
|
{langui.content_listen_content}
|
||||||
</Button>
|
</Button>
|
||||||
) : (
|
) : (
|
||||||
|
@ -58,7 +58,7 @@ export default function ContentIndex(props: ContentIndexProps): JSX.Element {
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{content.video_set.length > 0 ? (
|
{content.video_set.length > 0 ? (
|
||||||
<Button href={`/library/content/${content.slug}/watch/`}>
|
<Button href={`/contents/${content.slug}/watch/`}>
|
||||||
{langui.content_watch_content}
|
{langui.content_watch_content}
|
||||||
</Button>
|
</Button>
|
||||||
) : (
|
) : (
|
||||||
|
|
|
@ -27,7 +27,7 @@ export default function ContentRead(props: ContentReadProps): JSX.Element {
|
||||||
const subPanel = (
|
const subPanel = (
|
||||||
<SubPanel>
|
<SubPanel>
|
||||||
<ReturnButton
|
<ReturnButton
|
||||||
href={`/library/content/${content.slug}`}
|
href={`/contents/${content.slug}`}
|
||||||
title={"Content"}
|
title={"Content"}
|
||||||
langui={langui}
|
langui={langui}
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -24,23 +24,31 @@ export default function Library(props: LibraryProps): JSX.Element {
|
||||||
const langui = props.langui.websiteInterfaces.data[0].attributes;
|
const langui = props.langui.websiteInterfaces.data[0].attributes;
|
||||||
|
|
||||||
props.contents.contents.data.sort((a, b) => {
|
props.contents.contents.data.sort((a, b) => {
|
||||||
const titleA = a.attributes.titles.length > 0 ? prettyinlineTitle(a.attributes.titles[0].pre_title, a.attributes.titles[0].title, a.attributes.titles[0].subtitle) : a.attributes.slug
|
const titleA =
|
||||||
const titleB = b.attributes.titles.length > 0 ? prettyinlineTitle(b.attributes.titles[0].pre_title, b.attributes.titles[0].title, b.attributes.titles[0].subtitle) : b.attributes.slug
|
a.attributes.titles.length > 0
|
||||||
|
? prettyinlineTitle(
|
||||||
|
a.attributes.titles[0].pre_title,
|
||||||
|
a.attributes.titles[0].title,
|
||||||
|
a.attributes.titles[0].subtitle
|
||||||
|
)
|
||||||
|
: a.attributes.slug;
|
||||||
|
const titleB =
|
||||||
|
b.attributes.titles.length > 0
|
||||||
|
? prettyinlineTitle(
|
||||||
|
b.attributes.titles[0].pre_title,
|
||||||
|
b.attributes.titles[0].title,
|
||||||
|
b.attributes.titles[0].subtitle
|
||||||
|
)
|
||||||
|
: b.attributes.slug;
|
||||||
return titleA.localeCompare(titleB);
|
return titleA.localeCompare(titleB);
|
||||||
});
|
});
|
||||||
|
|
||||||
const subPanel = (
|
const subPanel = (
|
||||||
<SubPanel>
|
<SubPanel>
|
||||||
<ReturnButton
|
|
||||||
href="/library"
|
|
||||||
title={langui.main_library}
|
|
||||||
langui={langui}
|
|
||||||
/>
|
|
||||||
<HorizontalLine />
|
|
||||||
<PanelHeader
|
<PanelHeader
|
||||||
icon="library_books"
|
icon="workspaces"
|
||||||
title={langui.library_content}
|
title="Contents"
|
||||||
description={langui.library_content_description}
|
description="Laboriosam vitae velit quis. Non et dolor reiciendis officia earum et molestias excepturi. Cupiditate officiis quis qui reprehenderit. Ut neque eos ipsa corrupti autem mollitia inventore. Exercitationem iste magni vel harum."
|
||||||
/>
|
/>
|
||||||
</SubPanel>
|
</SubPanel>
|
||||||
);
|
);
|
||||||
|
|
|
@ -53,7 +53,7 @@ export default function LibrarySlug(props: LibrarySlugProps): JSX.Element {
|
||||||
const subPanel = (
|
const subPanel = (
|
||||||
<SubPanel>
|
<SubPanel>
|
||||||
<ReturnButton
|
<ReturnButton
|
||||||
href="/library/items"
|
href="/library/"
|
||||||
title={langui.library_items}
|
title={langui.library_items}
|
||||||
langui={langui}
|
langui={langui}
|
||||||
/>
|
/>
|
||||||
|
@ -136,7 +136,7 @@ export default function LibrarySlug(props: LibrarySlugProps): JSX.Element {
|
||||||
<div className="grid place-items-center">
|
<div className="grid place-items-center">
|
||||||
<p>{langui.global_subitem_of}</p>
|
<p>{langui.global_subitem_of}</p>
|
||||||
<Button
|
<Button
|
||||||
href={`/library/items/${item.subitem_of.data[0].attributes.slug}`}
|
href={`/library/${item.subitem_of.data[0].attributes.slug}`}
|
||||||
>
|
>
|
||||||
{prettyinlineTitle(
|
{prettyinlineTitle(
|
||||||
"",
|
"",
|
||||||
|
@ -432,7 +432,7 @@ export default function LibrarySlug(props: LibrarySlugProps): JSX.Element {
|
||||||
|
|
||||||
{content.attributes.scan_set.length > 0 ? (
|
{content.attributes.scan_set.length > 0 ? (
|
||||||
<Button
|
<Button
|
||||||
href={`/library/content/${content.attributes.content.data.attributes.slug}/scans/`}
|
href={`/contents/${content.attributes.content.data.attributes.slug}/scans/`}
|
||||||
>
|
>
|
||||||
{langui.library_item_view_scans}
|
{langui.library_item_view_scans}
|
||||||
</Button>
|
</Button>
|
||||||
|
@ -442,7 +442,7 @@ export default function LibrarySlug(props: LibrarySlugProps): JSX.Element {
|
||||||
|
|
||||||
{content.attributes.content.data ? (
|
{content.attributes.content.data ? (
|
||||||
<Button
|
<Button
|
||||||
href={`/library/content/${content.attributes.content.data.attributes.slug}`}
|
href={`/contents/${content.attributes.content.data.attributes.slug}`}
|
||||||
>
|
>
|
||||||
{langui.library_item_open_content}
|
{langui.library_item_open_content}
|
||||||
</Button>
|
</Button>
|
||||||
|
|
|
@ -13,8 +13,6 @@ import {
|
||||||
} from "graphql/operations";
|
} from "graphql/operations";
|
||||||
import PanelHeader from "components/PanelComponents/PanelHeader";
|
import PanelHeader from "components/PanelComponents/PanelHeader";
|
||||||
import AppLayout from "components/AppLayout";
|
import AppLayout from "components/AppLayout";
|
||||||
import ReturnButton from "components/PanelComponents/ReturnButton";
|
|
||||||
import HorizontalLine from "components/HorizontalLine";
|
|
||||||
import LibraryItemsPreview from "components/Library/LibraryItemsPreview";
|
import LibraryItemsPreview from "components/Library/LibraryItemsPreview";
|
||||||
|
|
||||||
type LibraryProps = {
|
type LibraryProps = {
|
||||||
|
@ -26,16 +24,10 @@ export default function Library(props: LibraryProps): JSX.Element {
|
||||||
const langui = props.langui.websiteInterfaces.data[0].attributes;
|
const langui = props.langui.websiteInterfaces.data[0].attributes;
|
||||||
const subPanel = (
|
const subPanel = (
|
||||||
<SubPanel>
|
<SubPanel>
|
||||||
<ReturnButton
|
|
||||||
href="/library"
|
|
||||||
title={langui.main_library}
|
|
||||||
langui={langui}
|
|
||||||
/>
|
|
||||||
<HorizontalLine />
|
|
||||||
<PanelHeader
|
<PanelHeader
|
||||||
icon="library_books"
|
icon="library_books"
|
||||||
title={langui.library_items}
|
title={langui.main_library}
|
||||||
description={langui.library_items_description}
|
description={langui.library_description}
|
||||||
/>
|
/>
|
||||||
</SubPanel>
|
</SubPanel>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue