-
+
{item.thumbnail.data ? (
Subitems
{item.subitems.data.map((subitem) => (
-
+
))}
@@ -416,6 +418,8 @@ export default function Library(props: Props): JSX.Element {
export const getStaticProps: GetStaticProps = async (context) => {
if (context.params) {
if (context.params.slug && context.locale) {
+ if (context.params.slug instanceof Array)
+ context.params.slug = context.params.slug.join("");
return {
props: {
libraryItem: await getLibraryItem({
@@ -439,6 +443,7 @@ export const getStaticPaths: GetStaticPaths = async () => {
const data = await getLibraryItemsSlugs({});
const paths: Path[] = [];
data.libraryItems.data.map((item) => {
+ console.log(item.attributes.slug);
paths.push({ params: { slug: item.attributes.slug } });
});
return {
diff --git a/src/pages/library/index.tsx b/src/pages/library/index.tsx
index 378b19b..d99d875 100644
--- a/src/pages/library/index.tsx
+++ b/src/pages/library/index.tsx
@@ -32,7 +32,7 @@ export default function Library(props: Props): JSX.Element {
{props.libraryItems.libraryItems.data.map((item) => (
-
+
))}
diff --git a/src/queries/helpers.ts b/src/queries/helpers.ts
index f493a7f..a35919b 100644
--- a/src/queries/helpers.ts
+++ b/src/queries/helpers.ts
@@ -30,30 +30,31 @@ export function prettyPrice(
export function prettySlug(slug: string, parentSlug?: string): string {
if (parentSlug && slug.startsWith(parentSlug))
- slug = slug.substring(parentSlug.length + 1);
- slug = slug.replace(new RegExp("-", 'g'), " ");
- slug = slug.replace(new RegExp("_", 'g'), " ");
- return capitalizeString(slug)
+ slug = slug.substring(parentSlug.length + 1);
+ slug = slug.replace(new RegExp("-", "g"), " ");
+ slug = slug.replace(new RegExp("_", "g"), " ");
+ return capitalizeString(slug);
}
-export function prettyinlineTitle(pretitle:string, title: string, subtitle:string): string {
+export function prettyinlineTitle(
+ pretitle: string,
+ title: string,
+ subtitle: string
+): string {
let result = "";
- if (pretitle) result += pretitle + ": "
+ if (pretitle) result += pretitle + ": ";
result += title;
if (subtitle) result += " - " + subtitle;
return result;
}
-
-export function capitalizeString(string:string):string {
+export function capitalizeString(string: string): string {
function capitalizeWord(word: string): string {
return word.charAt(0).toUpperCase() + word.substring(1);
}
let words = string.split(" ");
- words = words.map(
- (word) => (word = capitalizeWord(word))
- );
+ words = words.map((word) => (word = capitalizeWord(word)));
return words.join(" ");
}
diff --git a/tailwind.config.js b/tailwind.config.js
index 640393b..84bb11e 100644
--- a/tailwind.config.js
+++ b/tailwind.config.js
@@ -4,10 +4,10 @@ module.exports = {
content: ["./src/**/*.{tsx,ts}"],
theme: {
colors: {
- light: "#ffedd8",
- mid: "#f0d1b3",
- dark: "#9c6644",
- black: "#1B1811",
+ light: "rgb(255, 237, 216)",
+ mid: "rgb(240, 209, 179)",
+ dark: "rgb(156, 102, 68)",
+ black: "rgb(27, 24, 17)",
},
fontFamily: {
body: ["Zen Maru Gothic"],
@@ -49,6 +49,23 @@ module.exports = {
});
}),
+ // Colored Dropshadow
+ plugin(function ({ addUtilities }) {
+ addUtilities({
+ ".drop-shadow-dark-lg": {
+ filter:
+ "drop-shadow(0 10px 8px rgb(156 102 68 / 0.2)) drop-shadow(0 4px 3px rgb(156 102 68 / 0.8))",
+ },
+ ".drop-shadow-dark-xl": {
+ filter:
+ "drop-shadow(0 20px 13px rgb(156 102 68 / 0.25)) drop-shadow(0 8px 5px rgb(156 102 68 / 0.7))",
+ },
+ ".drop-shadow-dark-2xl": {
+ filter: "drop-shadow(0 25px 25px rgb(156 102 68 / 0.8))",
+ },
+ });
+ }),
+
plugin(function ({ addUtilities }) {
addUtilities({
".linearbg-1": {