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 }[] = [ const textLinks: { label: string; href: string }[] = [
{ label: 'Home', href: '/' }, { label: 'Home', href: '/' },
{ label: 'Work', href: '/work/' }, { label: 'Projects', href: '/projects/' },
{ label: 'About', href: '/about/' }, { label: 'About', href: '/about/' },
]; ];

View File

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

View File

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

View File

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

View File

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

View File

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