Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ body {
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif;
line-height: 1.5;
/* https://modern-fluid-typography.vercel.app */
font-size: clamp(1rem, 0.5vw + 1rem, 1.4rem);
font-size: clamp(1rem, 0.5vw + 1rem, 1.2rem);
transition: 0.3s;
background: var(--body-bg);
color: var(--text-color);
Expand Down
14 changes: 13 additions & 1 deletion src/lib/ChapterList.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
export let chapters: Chapter[]

const openChapters = chapters.filter((ch) => ch.acceptsSignups)
const startingChapters = chapters.filter((ch) => !ch.acceptsSignups)
const startingChapters = chapters.filter((ch) => ch.status == `starting`)
const partnerChapters = chapters.filter((ch) => ch.status == `partner`)
</script>

<h1>
Expand All @@ -29,6 +30,17 @@
{/each}
</ol>
{/if}
{#if partnerChapters.length > 2}
<h1>
<Icon icon="ic:place" inline />
{$microcopy?.chapterList?.partner}
</h1>
<ol>
{#each partnerChapters as { title, slug }}
<li><a href={slug}>{title}</a></li>
{/each}
</ol>
{/if}

<style>
h1 {
Expand Down
12 changes: 11 additions & 1 deletion src/lib/ChapterMap.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<Map
markers={chapters.map((chap) => ({
...chap.coords, // contains { lng, lat }
classes: [`chapter`, chap.acceptsSignups ? `active` : `starting`],
classes: [`chapter`, chap.status],
title: chap.token,
url: chap.slug,
}))}
Expand All @@ -39,6 +39,10 @@
<span style="background: var(--dark-green)" />
{$microcopy?.map?.text?.inSetup}
</div>
<div>
<span style="background: var(--grey)" />
{$microcopy?.map?.text?.partner}
</div>
</legend>
</div>

Expand Down Expand Up @@ -78,6 +82,9 @@
:global(a.chapter.starting) {
background-color: var(--dark-green);
}
:global(a.chapter.partner) {
background-color: var(--gray);
}
:global(a.chapter:hover) {
background-color: var(--blue);
}
Expand All @@ -97,4 +104,7 @@
:global(a.chapter.starting::after) {
border-color: var(--dark-green) transparent transparent transparent;
}
:global(a.chapter.partner::after) {
border-color: var(--gray) transparent transparent transparent;
}
</style>
1 change: 1 addition & 0 deletions src/lib/fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ const chapters_query = `{
}
baseId
acceptsSignups
status
token
}
}
Expand Down
1 change: 1 addition & 0 deletions src/lib/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export type Chapter = {
}
baseId: string
acceptsSignups: boolean
status: 'active' | 'starting' | 'partner' | null
token: string
}

Expand Down
5 changes: 4 additions & 1 deletion src/routes/+layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ export const load = async () => {
const nav = await fetch_yaml(`Nav`)
const footer = await fetch_yaml(`Footer`)
const social = await fetch_yaml(`Social`)
const chapters = await fetch_chapters()
// don't show partner orgs in nav
const chapters = (await fetch_chapters()).filter(
(chap) => chap.status != `partner`
)
const smallTexts = await fetch_yaml(`smallTexts`)
microcopy.set(smallTexts)

Expand Down
1 change: 1 addition & 0 deletions src/signup-form/de/smallTexts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ location:
linkStudentInfo: '/mitmachen/nachhilfelehrer'
infoStudentButton: 'Infos für Studierende'
joinPupil: 'Suchst du Nachhilfe?'
declinePupil: 'Leider ist die Warteliste voll'
registerPupil: 'Als Schüler:in anmelden'
linkPupilInfo: '/mitmachen/schueler'
infoPupilButton: 'Infos für Schüler:innen'
Expand Down