See more...
@@ -67,7 +75,7 @@ const games = await getCollection('games', (_, idx) => idx < 3);
Games
{
- games.map((item) => (
+ games.slice(0, 3).map((item) => (
-
{item.data.title}
diff --git a/src/pages/portafolio/[...slug].astro b/src/pages/portafolio/[...slug].astro
new file mode 100644
index 0000000..f4b9b4f
--- /dev/null
+++ b/src/pages/portafolio/[...slug].astro
@@ -0,0 +1,31 @@
+---
+import type { InferGetStaticPropsType, GetStaticPaths } from 'astro';
+import { getCollection } from 'astro:content';
+import Layout from '@layouts/Layout.astro';
+import Toc from '@components/Toc/Toc';
+import Gallery from '@components/MediaGallery/Gallery';
+
+export const getStaticPaths = (async () => {
+ const entries = await getCollection('portafolio');
+
+ return entries.map((entry) => ({
+ params: { slug: entry.slug },
+ props: entry,
+ }));
+}) satisfies GetStaticPaths;
+
+type Props = InferGetStaticPropsType;
+
+const entry = Astro.props;
+const { Content, headings } = await entry.render();
+---
+
+
+ {entry.data.title}
+
+
+
+
+
+
+
diff --git a/src/pages/portafolio/index.astro b/src/pages/portafolio/index.astro
new file mode 100644
index 0000000..bbf2fa7
--- /dev/null
+++ b/src/pages/portafolio/index.astro
@@ -0,0 +1,43 @@
+---
+import { getCollection } from 'astro:content';
+import Layout from '@layouts/Layout.astro';
+import Table from '@components/Table';
+import { HeaderType, type Header } from '@components/Table/types';
+
+const rawEntries = await getCollection('portafolio', ({ data }) => {
+ return import.meta.env.PROD ? data.draft !== true : true;
+});
+
+const entries = rawEntries.map((item, idx) => ({
+ ...item.data,
+ id: idx + 1,
+ slug: item.slug,
+}));
+
+const headers: Header[] = [
+ {
+ key: 'id',
+ header: 'index',
+ type: HeaderType.Index,
+ },
+ {
+ key: 'title',
+ header: 'Title',
+ formatter: (data) => `${data.title}`,
+ type: HeaderType.String,
+ },
+ {
+ key: 'technologies',
+ header: 'Technologies',
+ type: HeaderType.Multiple,
+ },
+];
+---
+
+
+ Blog's entries
+
+
+