-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
61 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { z, defineCollection } from "astro:content"; | ||
|
||
const projectsCollection = defineCollection({ | ||
type: 'content', | ||
schema: z.object({ | ||
title: z.string(), | ||
description: z.string(), | ||
image: z.object({ | ||
url: z.string(), | ||
alt: z.string() | ||
}), | ||
worksImage1: z.object({ | ||
url: z.string(), | ||
alt: z.string() | ||
}), | ||
worksImage2: z.object({ | ||
url: z.string(), | ||
alt: z.string() | ||
}), | ||
platform: z.string(), | ||
stack: z.string(), | ||
website: z.string(), | ||
github: z.string(), | ||
}) | ||
}); | ||
|
||
export const collections = { | ||
projects: projectsCollection, | ||
}; |
1 change: 0 additions & 1 deletion
1
src/pages/projects/project-1.md → src/content/projects/project-1.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
src/pages/projects/project-2.md → src/content/projects/project-2.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
src/pages/projects/project-3.md → src/content/projects/project-3.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
src/pages/projects/project-4.md → src/content/projects/project-4.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
/// <reference path="../.astro/types.d.ts" /> | ||
/// <reference types="astro/client" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
import { getCollection } from 'astro:content'; | ||
import MarkdownWorksLayout from '../../layouts/MarkdownWorksLayout.astro'; | ||
export async function getStaticPaths() { | ||
const projectEntries = await getCollection('projects'); | ||
return projectEntries.map(entry => ({ | ||
params: { slug: entry.slug }, props: { entry }, | ||
})); | ||
} | ||
const { entry } = Astro.props; | ||
const { Content } = await entry.render(); | ||
--- | ||
|
||
<MarkdownWorksLayout frontmatter={entry.data}> | ||
<Content /> | ||
</MarkdownWorksLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,21 @@ | ||
--- | ||
import { getCollection } from "astro:content"; | ||
import Layout from '../layouts/Layout.astro'; | ||
import Card from '../components/Card.astro'; | ||
const allProjects = await Astro.glob('../pages/projects/*.md'); | ||
const allContributions = await Astro.glob('../pages/contributions/*.md'); | ||
const allProjects = await getCollection("projects"); | ||
const pageTitle = "Works"; | ||
--- | ||
<Layout pageTitle={pageTitle}> | ||
<div class="gif"> | ||
<img width="300" height="259" alt="RaccoonLaptopGif" src="/laptop.webp"/> | ||
</div> | ||
<h2>Contributions</h2> | ||
<ul role="list" class="link-card-grid"> | ||
{allContributions.map((card) => <Card | ||
url={card.url} | ||
image={card.frontmatter.image.url} | ||
title={card.frontmatter.title} | ||
body={card.frontmatter.description} | ||
/>)} | ||
</ul> | ||
<h2>Projects</h2> | ||
<ul role="list" class="link-card-grid"> | ||
{allProjects.map((card) => <Card | ||
url={card.url} | ||
image={card.frontmatter.image.url} | ||
title={card.frontmatter.title} | ||
body={card.frontmatter.description} | ||
url={`/projects/${card.slug}/`} | ||
image={card.data.image.url} | ||
title={card.data.title} | ||
body={card.data.description} | ||
/>)} | ||
</ul> | ||
</Layout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
{ | ||
"extends": "astro/tsconfigs/base" | ||
} | ||
"extends": "astro/tsconfigs/base", | ||
"compilerOptions": { | ||
"strictNullChecks": true, | ||
"allowJs": true | ||
} | ||
} |