-
-
-
Filter
-
-
- {(tag) => (
- -
-
-
- )}
-
-
-
-
-
-
-
- SHOWING {workshop().length} OF {data.length} ADD-ONS
-
-
- {workshop().map((entryp) => (
- -
-
-
- ))}
-
-
-
+ return (
+
+
+
+
+ Filtr
+
+
+
+ {(tag) => (
+ -
+
+
+ )}
+
+
+
+
+
+
+
+ SHOWING {workshop().length} OF {data.length} ADD-ONS
+
+
+ {workshop().map((entryp) => (
+ -
+
+
+ ))}
+
- )
+
+
+ );
}
diff --git a/src/consts.ts b/src/consts.ts
index 64c63e4..5f0106c 100644
--- a/src/consts.ts
+++ b/src/consts.ts
@@ -31,11 +31,6 @@ export const TEAM: Page = {
DESCRIPTION: "See our team.",
}
-// Other Page
-export const OTHERPROJECTS: Page = {
- TITLE: "Other Stuff",
- DESCRIPTION: "Random unfinished events.",
-}
// Search Page
export const SEARCH: Page = {
@@ -43,10 +38,10 @@ export const SEARCH: Page = {
DESCRIPTION: "Search all posts and events by keyword.",
}
-// NNB Workshop
-export const NNB_WORKSHOP: Page = {
- TITLE: "NNB Workshop",
- DESCRIPTION: "Explore modded content.",
+// Products Page
+export const PRODUCTS: Page = {
+ TITLE: "Produkty",
+ DESCRIPTION: "Recent events I have worked on.",
}
// Links
@@ -57,7 +52,7 @@ export const LINKS: Links = [
},
{
TEXT: "Produkty",
- HREF: "/produkty",
+ HREF: "/products",
},
{
TEXT: "Lokalizacja",
diff --git a/src/content.config.ts b/src/content.config.ts
index 7c7b829..87ed4ab 100644
--- a/src/content.config.ts
+++ b/src/content.config.ts
@@ -36,6 +36,22 @@ const events = defineCollection({
}),
})
+
+const products = defineCollection({
+ loader: glob({ pattern: '**\/[^_]*.md', base: "./src/content/products" }),
+ schema: z.object({
+ title: z.string(),
+ summary: z.string(),
+ date: z.coerce.date(),
+ tags: z.array(z.string()),
+ draft: z.boolean().optional(),
+ demoUrl: z.string().optional(),
+ repoUrl: z.string().optional(),
+ imageUrl: z.string().optional(),
+ }),
+})
+
+
const otherprojects = defineCollection({
loader: glob({ pattern: '**\/[^_]*.md', base: "./src/content/otherprojects" }),
schema: z.object({
@@ -93,4 +109,4 @@ const legal = defineCollection({
}),
})
-export const collections = { work, blog, events, legal, team, otherprojects, nnb_workshop}
+export const collections = { work, blog, events, legal, team, otherprojects, nnb_workshop, products}
diff --git a/src/content/products/00-Test/index.md b/src/content/products/00-Test/index.md
new file mode 100644
index 0000000..3fe4d76
--- /dev/null
+++ b/src/content/products/00-Test/index.md
@@ -0,0 +1,13 @@
+---
+title: "Test"
+summary: "Test"
+date: "Jan 6 2024"
+draft: false
+tags:
+ - TEEEST
+demoUrl: /mc_nnb
+repoUrl: https://github.com/Nikos-Stuff/nikosnextbots
+imageUrl: "/previews/sezam_preview.webp"
+---
+
+Test ABC
diff --git a/src/content/products/01-Test/index.md b/src/content/products/01-Test/index.md
new file mode 100644
index 0000000..3fe4d76
--- /dev/null
+++ b/src/content/products/01-Test/index.md
@@ -0,0 +1,13 @@
+---
+title: "Test"
+summary: "Test"
+date: "Jan 6 2024"
+draft: false
+tags:
+ - TEEEST
+demoUrl: /mc_nnb
+repoUrl: https://github.com/Nikos-Stuff/nikosnextbots
+imageUrl: "/previews/sezam_preview.webp"
+---
+
+Test ABC
diff --git a/src/content/products/02-Test/index.md b/src/content/products/02-Test/index.md
new file mode 100644
index 0000000..3fe4d76
--- /dev/null
+++ b/src/content/products/02-Test/index.md
@@ -0,0 +1,13 @@
+---
+title: "Test"
+summary: "Test"
+date: "Jan 6 2024"
+draft: false
+tags:
+ - TEEEST
+demoUrl: /mc_nnb
+repoUrl: https://github.com/Nikos-Stuff/nikosnextbots
+imageUrl: "/previews/sezam_preview.webp"
+---
+
+Test ABC
diff --git a/src/content/products/03-Test/index.md b/src/content/products/03-Test/index.md
new file mode 100644
index 0000000..3fe4d76
--- /dev/null
+++ b/src/content/products/03-Test/index.md
@@ -0,0 +1,13 @@
+---
+title: "Test"
+summary: "Test"
+date: "Jan 6 2024"
+draft: false
+tags:
+ - TEEEST
+demoUrl: /mc_nnb
+repoUrl: https://github.com/Nikos-Stuff/nikosnextbots
+imageUrl: "/previews/sezam_preview.webp"
+---
+
+Test ABC
diff --git a/src/layouts/ArticleTopLayout.astro b/src/layouts/ArticleTopLayout.astro
index 6e27b81..533b98d 100644
--- a/src/layouts/ArticleTopLayout.astro
+++ b/src/layouts/ArticleTopLayout.astro
@@ -3,7 +3,7 @@ import type { CollectionEntry } from "astro:content"
import { formatDate, readingTime } from "@lib/utils"
type Props = {
- entry: CollectionEntry<"events"> | CollectionEntry<"blog"> | CollectionEntry<"nnb_workshop">
+ entry: CollectionEntry<"events"> | CollectionEntry<"blog"> | CollectionEntry<"products">
}
const { entry } = Astro.props
@@ -13,7 +13,7 @@ const { title, summary, date } = data
const demoUrl = collection === "events" ? data.demoUrl : null
const repoUrl = collection === "events" ? data.repoUrl : null
-const imageUrl = collection === "events" ? data.imageUrl : null
+const imageUrl = (collection === "events" || collection === "products") ? data.imageUrl : null;
---
diff --git a/src/layouts/BottomLayout.astro b/src/layouts/BottomLayout.astro
index 7ec2575..dbff71f 100644
--- a/src/layouts/BottomLayout.astro
+++ b/src/layouts/BottomLayout.astro
@@ -3,7 +3,7 @@ import Container from "@components/Container.astro"
---
-
+
\ No newline at end of file
diff --git a/src/layouts/TopLayout.astro b/src/layouts/TopLayout.astro
index 4edad4e..e7f4d9e 100644
--- a/src/layouts/TopLayout.astro
+++ b/src/layouts/TopLayout.astro
@@ -3,7 +3,7 @@ import Container from "@components/Container.astro"
---
-
+
\ No newline at end of file
diff --git a/src/pages/products/[...slug].astro b/src/pages/products/[...slug].astro
new file mode 100644
index 0000000..86f997e
--- /dev/null
+++ b/src/pages/products/[...slug].astro
@@ -0,0 +1,35 @@
+---
+import { type CollectionEntry, getCollection } from "astro:content"
+import PageLayout from "@layouts/PageLayout.astro"
+import TopLayout from "@layouts/TopLayout.astro"
+import BottomLayout from "@layouts/BottomLayout.astro"
+import ArticleTopLayout from "@layouts/ArticleTopLayout.astro"
+import ArticleBottomLayout from "@layouts/ArticleBottomLayout.astro"
+
+// Create the static blog pages
+export async function getStaticPaths() {
+ const products = await getCollection("products")
+ return products.map((product) => ({
+ params: { slug: product.id },
+ props: product,
+ }))
+}
+
+// Get the requested post
+type Props = CollectionEntry<"blog">
+const product = Astro.props
+const { title, summary } = product.data
+---
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/pages/products/index.astro b/src/pages/products/index.astro
new file mode 100644
index 0000000..e4eb369
--- /dev/null
+++ b/src/pages/products/index.astro
@@ -0,0 +1,30 @@
+---
+import { getCollection } from "astro:content"
+import PageLayout from "@layouts/PageLayout.astro"
+import TopLayout from "@layouts/TopLayout.astro"
+import BottomLayout from "@layouts/BottomLayout.astro"
+import Products from "@components/Products"
+import { PRODUCTS } from "@consts"
+
+const products = (await getCollection("products"))
+ .filter(product => !product.data.draft)
+ .sort((a, b) => b.data.date.getTime() - a.data.date.getTime())
+
+const tags = [...new Set(products.flatMap(post => post.data.tags))]
+ .sort((a, b) => a.localeCompare(b))
+---
+
+
+
+
+ {PRODUCTS.TITLE}
+
+
+
+
+
+
+
+