Skip to content

Commit 2a426a7

Browse files
committed
activ projects, and move logos to home
1 parent dfcb3bb commit 2a426a7

9 files changed

Lines changed: 108 additions & 21 deletions

File tree

.pages.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,10 @@ components:
201201
name: gray
202202
- label: Gradient
203203
name: gradient
204+
- label: Phase Gradient
205+
name: phase-gradient
206+
- label: Phase Gradient (light)
207+
name: phase-gradient-light
204208
default: white
205209
- name: bgType
206210
label: Type
@@ -323,6 +327,20 @@ components:
323327
type: string
324328
description: Optional intro text shown above the interactive filter.
325329

330+
active_projects_section:
331+
type: object
332+
fields:
333+
- name: background
334+
label: Section Background
335+
component: background_select
336+
- name: title
337+
label: Title
338+
type: string
339+
- name: description
340+
label: Description
341+
type: string
342+
description: Optional intro text shown above the list of active project titles.
343+
326344
projects_roll_section:
327345
type: object
328346
fields:
@@ -574,6 +592,10 @@ content:
574592
label: Projects Filter Grid
575593
component: projects_filter_grid_section
576594

595+
- name: activeProjects
596+
label: Active Projects (titles only)
597+
component: active_projects_section
598+
577599
- name: phasesOverview
578600
label: Phases Overview
579601
component: phases_overview_section
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
import Heading from '@components/atoms/Heading.astro';
3+
import Text from '@components/atoms/Text.astro';
4+
import { getProjects } from '@utils/projects';
5+
6+
export interface Props {
7+
title?: string;
8+
description?: string;
9+
}
10+
11+
const { title, description } = Astro.props;
12+
13+
const allProjects = await getProjects();
14+
const activeProjects = allProjects.filter(
15+
(p) => p.data.projectStatus === 'active'
16+
);
17+
---
18+
19+
{
20+
activeProjects.length > 0 && (
21+
<div class="relative left-1/2 -ml-[50vw] w-screen px-4 py-12 text-cream sm:px-6 md:py-16 lg:px-10">
22+
{title && (
23+
<Heading level={4} class="mb-3 text-cream">
24+
{title}
25+
</Heading>
26+
)}
27+
{description && (
28+
<Text size="lg" class="mb-6 max-w-2xl text-cream/90">
29+
{description}
30+
</Text>
31+
)}
32+
<ul class="flex flex-col gap-y-2 text-2xl font-semibold md:text-3xl lg:text-4xl">
33+
{activeProjects.map((project) => (
34+
<li>
35+
<a
36+
href={`/work/${project.data.slug}`}
37+
class="text-cream hover:text-white"
38+
>
39+
<h2 class="link-brackets">{project.data.name}</h2>
40+
</a>
41+
</li>
42+
))}
43+
</ul>
44+
</div>
45+
)
46+
}

src/components/sections/OrganisationsRollSection.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const orgsWithLogos = orgs.filter((o) => o.data.image);
3434
)}
3535

3636
{orgsWithLogos.length > 0 ? (
37-
<div class="grid grid-cols-2 gap-3 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5">
37+
<div class="grid grid-cols-2 gap-6 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5">
3838
{orgsWithLogos.map((org) => {
3939
const imgSrc = typeof org.data.image === 'string' ? org.data.image : org.data.image!.src;
4040
const tile = (
@@ -44,7 +44,7 @@ const orgsWithLogos = orgs.filter((o) => o.data.image);
4444
alt={org.data.name}
4545
title={org.data.name}
4646
loading="lazy"
47-
class="absolute inset-0 h-full w-full object-contain p-4"
47+
class="absolute inset-0 h-full w-full object-contain p-6 md:p-8"
4848
/>
4949
</div>
5050
);

src/components/sections/Sections.astro

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
---
2+
import ActiveProjectsSection from '@components/sections/ActiveProjectsSection.astro';
23
import ButtonSection from '@components/sections/ButtonSection.astro';
34
import CalEmbedSection from '@components/sections/CalEmbedSection.astro';
45
import CardSection from '@components/sections/CardSection.astro';
@@ -51,7 +52,6 @@ const { sectionItems } = Astro.props;
5152
case 'richText':
5253
return (
5354
<RichTextSection
54-
background={section.background}
5555
content={section.content}
5656
withTOC={section.withTOC}
5757
/>
@@ -97,6 +97,13 @@ const { sectionItems } = Astro.props;
9797
description={section.description}
9898
/>
9999
);
100+
case 'activeProjects':
101+
return (
102+
<ActiveProjectsSection
103+
title={section.title}
104+
description={section.description}
105+
/>
106+
);
100107
case 'phasesOverview':
101108
return (
102109
<PhasesOverviewSection

src/content/config.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,11 @@ const pagesCollection = defineCollection({
140140
filterModality: modalitySlugSchema.optional(),
141141
featuredOnly: z.boolean().optional().default(false),
142142
}),
143+
SectionCommonSchema.extend({
144+
type: z.literal('activeProjects'),
145+
title: z.string().optional(),
146+
description: z.string().optional(),
147+
}),
143148
SectionCommonSchema.extend({
144149
type: z.literal('phasesOverview'),
145150
title: z.string().optional(),

src/content/pages/about.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ sections:
2727
- type: skills
2828
title: What we do
2929
description: "The skills we bring to every engagement."
30-
- type: organisationsRoll
31-
title: Organisations we work with
3230
- type: richText
3331
content: >-
3432
### Open Technology Fund pro bono support

src/content/pages/home.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ sections:
77
# title: How we work
88
# description: "The framework below maps what we do across two dimensions: the phase of your project, and the way we show up."
99
# showProjects: true
10+
- type: activeProjects
11+
title: Active projects
12+
background:
13+
bgColor: phase-gradient
14+
bgType: full
1015
- type: richText
1116
content: >-
1217
Projects rarely move in a straight line, and neither do we. You might engage us at any phase, for any modality, or across several at once.
@@ -21,3 +26,5 @@ sections:
2126
size: lg
2227
href: /get-in-touch
2328
text: Get in touch
29+
- type: organisationsRoll
30+
title: Organisations we work with

src/layouts/SectionLayout.astro

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ const backgrounds = {
4343
white: 'bg-white',
4444
gray: 'bg-gray-50',
4545
gradient: 'bg-gradient-to-br from-blue-50 to-indigo-100',
46+
'phase-gradient': 'gradient-phase',
47+
'phase-gradient-light': 'gradient-phase-light',
4648
};
4749
4850
const bgClass = backgrounds[bgColor as keyof typeof backgrounds] || "";

src/styles/typography.css

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@
2727
linear-gradient(currentColor, currentColor),
2828
linear-gradient(currentColor, currentColor);
2929
background-size:
30-
0 2px,
31-
2px 0,
32-
0 2px,
33-
2px 0,
34-
0 2px,
35-
2px 0,
36-
0 2px,
37-
2px 0;
30+
0 0.1em,
31+
0.1em 0,
32+
0 0.1em,
33+
0.1em 0,
34+
0 0.1em,
35+
0.1em 0,
36+
0 0.1em,
37+
0.1em 0;
3838
background-position:
3939
top left,
4040
top left,
@@ -53,14 +53,14 @@
5353
&.is-active,
5454
&[aria-current='page'] {
5555
background-size:
56-
0.5em 2px,
57-
2px 0.5em,
58-
0.5em 2px,
59-
2px 0.5em,
60-
0.5em 2px,
61-
2px 0.5em,
62-
0.5em 2px,
63-
2px 0.5em;
56+
0.3em 0.1em,
57+
0.1em 0.3em,
58+
0.3em 0.1em,
59+
0.1em 0.3em,
60+
0.3em 0.1em,
61+
0.1em 0.3em,
62+
0.3em 0.1em,
63+
0.1em 0.3em;
6464
}
6565
}
6666

0 commit comments

Comments
 (0)