Skip to content

Commit e7408dd

Browse files
committed
changing work to feed; adding quotes; swapping projects from md to yaml content
1 parent d592659 commit e7408dd

38 files changed

Lines changed: 765 additions & 359 deletions

.pages.yml

Lines changed: 59 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ components:
316316
default: true
317317
description: Display project name tags inside matrix cells
318318

319-
projects_filter_grid_section:
319+
feed_grid_section:
320320
type: object
321321
fields:
322322
- name: title
@@ -325,7 +325,7 @@ components:
325325
- name: description
326326
label: Description
327327
type: string
328-
description: Optional intro text shown above the interactive filter.
328+
description: Optional intro text shown above the chronological feed of mixed projects + quotes.
329329

330330
active_projects_section:
331331
type: object
@@ -588,9 +588,9 @@ content:
588588
label: Projects Roll
589589
component: projects_roll_section
590590

591-
- name: projectsFilterGrid
592-
label: Projects Filter Grid
593-
component: projects_filter_grid_section
591+
- name: feedGrid
592+
label: Feed Grid
593+
component: feed_grid_section
594594

595595
- name: activeProjects
596596
label: Active Projects (titles only)
@@ -623,8 +623,8 @@ content:
623623
label: Projects
624624
type: collection
625625
path: src/content/projects
626-
format: yaml-frontmatter
627-
filename: '{fields.slug}.md'
626+
format: yaml
627+
filename: '{fields.slug}.yaml'
628628
subfolders: false
629629
view:
630630
fields: [name, client, status]
@@ -1180,6 +1180,58 @@ content:
11801180
- label: Archived
11811181
name: archived
11821182

1183+
# --------------------------------------------------------------------------
1184+
# Quotes
1185+
# --------------------------------------------------------------------------
1186+
- name: quotes
1187+
label: Quotes
1188+
type: collection
1189+
path: src/content/quotes
1190+
format: json
1191+
filename: '{fields.date}-{fields.name}.json'
1192+
subfolders: false
1193+
view:
1194+
fields: [date, name, organisation]
1195+
primary: name
1196+
sort: [date]
1197+
default:
1198+
sort: date
1199+
order: desc
1200+
fields:
1201+
- name: date
1202+
label: Date
1203+
type: date
1204+
required: true
1205+
1206+
- name: name
1207+
label: Name
1208+
type: string
1209+
required: true
1210+
description: Name of the person being quoted
1211+
1212+
- name: quote
1213+
label: Quote
1214+
type: text
1215+
required: true
1216+
1217+
- name: organisation
1218+
label: Organisation
1219+
type: reference
1220+
required: true
1221+
options:
1222+
collection: organisations
1223+
value: "{id}"
1224+
label: "{fields.name}"
1225+
1226+
- name: project
1227+
label: Project
1228+
type: reference
1229+
options:
1230+
collection: projects
1231+
value: "{slug}"
1232+
label: "{fields.name}"
1233+
description: Optional — leave empty if the quote isn't tied to a specific project
1234+
11831235
# --------------------------------------------------------------------------
11841236
# Categories
11851237
# --------------------------------------------------------------------------

.vscode/settings.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"yaml.schemas": {
33
"./.astro/collections/pages.schema.json": "/src/content/pages/*.yaml",
4-
"./.astro/collections/projects.schema.json": "/src/content/projects/*.md"
4+
"./.astro/collections/projects.schema.json": "/src/content/projects/*.yaml"
55
},
66
"json.schemas": [
77
{
@@ -32,6 +32,10 @@
3232
"fileMatch": ["/src/content/phases/*.json"],
3333
"url": "./.astro/collections/phases.schema.json"
3434
},
35+
{
36+
"fileMatch": ["/src/content/quotes/*.json"],
37+
"url": "./.astro/collections/quotes.schema.json"
38+
},
3539
{
3640
"fileMatch": ["/src/content/site/*.json"],
3741
"url": "./.astro/collections/site.schema.json"

src/components/molecules/ProjectCard.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
2+
import { Image } from 'astro:assets';
23
import draftlabLogo from '@assets/draftlab-logo.svg';
34
import GradientLink from '@components/atoms/GradientLink.astro';
45
import SkillIcon from '@components/atoms/SkillIcon.astro';
56
import type { ImageMetadata } from 'astro';
6-
import { Image } from 'astro:assets';
77
88
const PHASE_ORDER = ['understand', 'define', 'deliver', 'sustain'] as const;
99
@@ -56,7 +56,7 @@ const cardGradient = `linear-gradient(to right, ${gradientStops.join(', ')})`;
5656
---
5757

5858
<a
59-
href={`/work/${slug}`}
59+
href={`/projects/${slug}`}
6060
class:list={[
6161
'group relative flex h-full overflow-hidden no-underline shadow-sm transition-colors duration-150 **:no-underline hover:shadow-md',
6262
featured && 'ring-1 ring-secondary-200',
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
import { Image } from 'astro:assets';
3+
import type { ImageMetadata } from 'astro';
4+
5+
export interface Props {
6+
quote: string;
7+
name: string;
8+
orgName?: string;
9+
orgLogo?: ImageMetadata;
10+
class?: string;
11+
}
12+
13+
const { quote, name, orgName, orgLogo, class: className = '' } = Astro.props;
14+
---
15+
16+
<figure class:list={['flex h-full flex-col justify-end p-5', className]}>
17+
<blockquote
18+
class="font-serif text-xl leading-snug text-ink italic md:text-2xl"
19+
>
20+
&ldquo;{quote}&rdquo;
21+
</blockquote>
22+
23+
<figcaption class="mt-6 flex items-center justify-between gap-4">
24+
<span
25+
class="font-mono text-[0.7rem] tracking-widest text-ink-muted uppercase"
26+
>
27+
&mdash; {name}
28+
</span>
29+
{
30+
orgLogo && (
31+
<Image
32+
src={orgLogo}
33+
alt={orgName ?? ''}
34+
class="h-8 w-auto object-contain object-right grayscale"
35+
/>
36+
)
37+
}
38+
</figcaption>
39+
</figure>

0 commit comments

Comments
 (0)