Compare commits

...

1 Commits
0.2.0 ... 0.3.0

Author SHA1 Message Date
f6c05b8a0c change work to projects 2024-08-23 21:01:26 -05:00
10 changed files with 15 additions and 15 deletions

View File

@@ -5,7 +5,7 @@ import type { iconPaths } from './IconPaths';
const textLinks: { label: string; href: string }[] = [
{ label: 'Home', href: '/' },
{ label: 'Work', href: '/work/' },
{ label: 'Projects', href: '/projects/' },
{ label: 'About', href: '/about/' },
];

View File

@@ -2,13 +2,13 @@
import type { CollectionEntry } from 'astro:content';
interface Props {
project: CollectionEntry<'work'>;
project: CollectionEntry<'projects'>;
}
const { data, slug } = Astro.props.project;
---
<a class="card" href={`/work/${slug}`}>
<a class="card" href={`/projects/${slug}`}>
<span class="title">{data.title}</span>
<img src={data.img} alt={data.img_alt || ''} loading="lazy" decoding="async" />
</a>

View File

@@ -1,7 +1,7 @@
import { defineCollection, z } from 'astro:content';
export const collections = {
work: defineCollection({
projects: defineCollection({
type: 'content',
schema: z.object({
title: z.string(),

View File

@@ -13,7 +13,7 @@ import PortfolioPreview from '../components/PortfolioPreview.astro';
import ContactCTA from '../components/ContactCTA.astro';
import Skills from '../components/Skills.astro';
const projects = (await getCollection('work'))
const projects = (await getCollection('projects'))
.sort((a, b) => b.data.publishDate.valueOf() - a.data.publishDate.valueOf())
.slice(0, 4);
---
@@ -48,8 +48,8 @@ const projects = (await getCollection('work'))
<main class="wrapper stack gap-20 lg:gap-48">
<section class="section with-background with-cta">
<header class="section-header stack gap-2 lg:gap-4">
<h3>Selected Work</h3>
<p>Take a look below at some of my featured work from the past few years.</p>
<h3>Selected Projects</h3>
<p>Take a look below at some of my featured projects from the past few years.</p>
</header>
<div class="gallery">
@@ -65,7 +65,7 @@ const projects = (await getCollection('work'))
</div>
<div class="cta">
<CallToAction href="/work/">
<CallToAction href="/projects/">
View All
<Icon icon="arrow-right" size="1.2em" />
</CallToAction>

View File

@@ -8,19 +8,19 @@ import PortfolioPreview from '../components/PortfolioPreview.astro';
import Hero from '../components/Hero.astro';
import Grid from '../components/Grid.astro';
const projects = (await getCollection('work')).sort(
const projects = (await getCollection('projects')).sort(
(a, b) => b.data.publishDate.valueOf() - a.data.publishDate.valueOf(),
);
---
<BaseLayout
title="My Work | Alex Lebens"
title="My Projects | Alex Lebens"
description="Learn about Alex Lebens's most recent projects"
>
<div class="stack gap-20">
<main class="wrapper stack gap-8">
<Hero
title="My Work"
title="My Projects"
tagline="See my most recent projects below to get an idea of my past experience."
align="start"
/>

View File

@@ -9,12 +9,12 @@ import Icon from '../../components/Icon.astro';
import Pill from '../../components/Pill.astro';
interface Props {
entry: CollectionEntry<'work'>;
entry: CollectionEntry<'projects'>;
}
export async function getStaticPaths() {
const work = await getCollection('work');
return work.map((entry) => ({
const projects = await getCollection('projects');
return projects.map((entry) => ({
params: { slug: entry.slug },
props: { entry },
}));
@@ -29,7 +29,7 @@ const { Content } = await entry.render();
<div class="stack gap-15">
<header>
<div class="wrapper stack gap-2">
<a class="back-link" href="/work/"><Icon icon="arrow-left" /> Work</a>
<a class="back-link" href="/projects/"><Icon icon="arrow-left" /> Projects</a>
<Hero title={entry.data.title} align="start">
<div class="details">
<div class="tags">