diff --git a/src/lib/ChapterList.svelte b/src/lib/ChapterList.svelte index 5cb498e1..4b962d65 100644 --- a/src/lib/ChapterList.svelte +++ b/src/lib/ChapterList.svelte @@ -5,7 +5,7 @@ export let chapters: Chapter[] - const openChapters = chapters.filter((ch) => ch.acceptsSignups) + const openChapters = chapters.filter((ch) => ch.status == `active`) const startingChapters = chapters.filter((ch) => ch.status == `starting`) const partnerChapters = chapters.filter((ch) => ch.status == `partner`) @@ -19,7 +19,7 @@
  • {title}
  • {/each} -{#if startingChapters.length > 2} +{#if startingChapters.length > 0}

    {$microcopy?.chapterList?.inSetup} @@ -30,7 +30,7 @@ {/each} {/if} -{#if partnerChapters.length > 2} +{#if partnerChapters.length > 0}

    {$microcopy?.chapterList?.partner} diff --git a/src/lib/ChapterMap.svelte b/src/lib/ChapterMap.svelte index 08fa83fd..aec2c6ac 100644 --- a/src/lib/ChapterMap.svelte +++ b/src/lib/ChapterMap.svelte @@ -5,6 +5,7 @@ import { microcopy } from './stores' import type { Chapter } from './types' + // why do we fetch chapters here? They were already passed to the function export const load: Load = () => { return { props: { chapters: fetch_chapters() } } } diff --git a/src/lib/fetch.ts b/src/lib/fetch.ts index 2878d001..f78560fa 100644 --- a/src/lib/fetch.ts +++ b/src/lib/fetch.ts @@ -68,7 +68,9 @@ const chapters_query = `{ } baseId acceptsSignups + deactivatePupils status + signup token } } diff --git a/src/lib/types.ts b/src/lib/types.ts index dcb1e186..be9a4d90 100644 --- a/src/lib/types.ts +++ b/src/lib/types.ts @@ -7,7 +7,9 @@ export type Chapter = { } baseId: string acceptsSignups: boolean + deactivatePupils: boolean status: 'active' | 'starting' | 'partner' | null + signup: 'everyone' | 'onlyStudents' | 'nobody' | null token: string } diff --git a/src/routes/+layout.ts b/src/routes/+layout.ts index 76d75e7c..f214e439 100644 --- a/src/routes/+layout.ts +++ b/src/routes/+layout.ts @@ -18,8 +18,8 @@ export const load = async () => { // create { title, url } array containing all chapters const chapterLinks = chapters.map((chapter: Chapter) => { - const { title, slug, acceptsSignups } = chapter - return { title, url: slug, lightFont: !acceptsSignups } + const { title, slug, status } = chapter + return { title, url: slug, lightFont: status == `starting` } }) // prepend chapter links into chapter subnav diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 71565517..06bf91f4 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -34,7 +34,7 @@
    - {data.chapters.filter((ch) => ch.acceptsSignups).length} + {data.chapters.filter((ch) => ch.status == `active`).length} {$microcopy?.indexPage?.boxes?.locationsName} { let chapters = await fetch_chapters() - chapters = chapters.filter((chap) => chap.acceptsSignups) + chapters = chapters.filter((chap) => chap.signup == `everyone`) const form = parse_form_data({ ...raw_form, ...messages }) diff --git a/src/routes/signup-student/+page.server.ts b/src/routes/signup-student/+page.server.ts index 15daa211..c7b29a03 100644 --- a/src/routes/signup-student/+page.server.ts +++ b/src/routes/signup-student/+page.server.ts @@ -6,7 +6,9 @@ import raw_form from '../../signup-form/de/student.yml' export const load = async () => { let chapters = await fetch_chapters() - chapters = chapters.filter((chap) => chap.acceptsSignups) + chapters = chapters.filter( + (chap) => chap.signup == `everyone` || chap.signup == `onlyStudents` + ) const form = parse_form_data({ ...raw_form, ...messages }) diff --git a/src/routes/standorte/+page.svelte b/src/routes/standorte/+page.svelte index dae76fc1..a5bd1831 100644 --- a/src/routes/standorte/+page.svelte +++ b/src/routes/standorte/+page.svelte @@ -8,6 +8,4 @@ - -

    🤗 Wir brauchen dich! 🤗

    -
    + diff --git a/src/routes/standorte/[slug]/+page.server.ts b/src/routes/standorte/[slug]/+page.server.ts index f278c59a..7a12e9ba 100644 --- a/src/routes/standorte/[slug]/+page.server.ts +++ b/src/routes/standorte/[slug]/+page.server.ts @@ -1,12 +1,17 @@ import { fetch_page } from '$lib/fetch' import { error } from '@sveltejs/kit' +import { fetch_chapters } from '$lib/fetch' export const load = async ({ params }) => { const { slug } = params const page = await fetch_page(`standorte/${slug}`) + const chapters = await fetch_chapters() + + const selectedChapter = chapters.find((ch) => ch.slug == `/standorte/${slug}`) + if (!page) throw error(404) - return { page, slug } + return { page, slug, selectedChapter } } diff --git a/src/routes/standorte/[slug]/+page.svelte b/src/routes/standorte/[slug]/+page.svelte index ce2580b0..614bdec6 100644 --- a/src/routes/standorte/[slug]/+page.svelte +++ b/src/routes/standorte/[slug]/+page.svelte @@ -4,15 +4,14 @@ import Icon from '@iconify/svelte' export let data - $: ({ page, slug } = data) - + $: ({ page, slug, selectedChapter } = data) const style = `margin-right: 3pt;` - {#if page?.yaml?.showSignupButtons !== false} + when selectedChapter is not defined show all buttons as default --> + {#if !selectedChapter?.signup || selectedChapter?.signup == `everyone`}

    {$microcopy?.location?.register}

    @@ -57,10 +56,58 @@ >
    + {:else if selectedChapter?.signup == `onlyStudents`} +

    {$microcopy?.location?.register}

    +
    + + {$microcopy?.location?.joinStudent} + + {$microcopy?.location + ?.registerStudent} + + + {$microcopy?.location?.infoStudentButton} + + + + {$microcopy?.location?.joinPupil} + + {$microcopy?.location + ?.declinePupil} + + + {$microcopy?.location?.infoPupilButton} + + + {$microcopy?.location?.locationManagement} + + {$microcopy?.location?.writeMailButton} + + + {$microcopy?.location?.infoLeadingButton} + +
    {/if} - {#if page?.yaml?.showSignupButtons !== false} + {#if selectedChapter?.signup !== `nobody`}

    {$microcopy?.location?.contact}

    {$microcopy?.location?.questions}

      diff --git a/src/signup-form/at/smallTexts.yml b/src/signup-form/at/smallTexts.yml new file mode 100644 index 00000000..4de28653 --- /dev/null +++ b/src/signup-form/at/smallTexts.yml @@ -0,0 +1,93 @@ +comment: This yaml is both on github and on contentful for versioning and checking of correctness. Only the version on contentful is actually used! + +country: at + +indexPage: + title: Studenten bilden Schüler + theme: Kostenlose Nachhilfe von ehrenamtlichen Studierenden für finanziell benachteiligte Kinder + chooseLocation: 'Wähle deinen Standort auf der Karte!' + + register: + 'Oder melde dich direkt + bei uns an. + ' + boxes: + locationsName: Standorte + studentsName: Studierende + studentsNumber: 3 + pupilsName: Schüler:innen + pupilsNumber: 5 + scholarshipName: Gründung + scholarshipNumber: 2023 + organizationMemberName: Vereinsmitglieder + organizationMemberNumber: 10 + +footer: + name: 'Studenten bilden Schüler e.V.' + siteInfos: 'Diese Seite ist + + open source + + und verwendet keine + + use + + cookies. + ' + site: 'Diese Seite ist' + uses: 'und verwendet keine' + +map: + location: + lng: 13.55 + lat: 47.71 + zoom: 6.00 + minZoom: 4 + maxZoom: 10 + text: + active: 'aktiver Standort' + inSetup: 'in Gründung' + partner: 'Partner' + +chapterList: + locations: 'Unsere Standorte' + inSetup: 'Standorte in Gründung' + partner: 'Partner Standorte' + +location: + register: 'Anmeldungen' + joinStudent: 'Willst du bei uns mitmachen?' + registerStudent: 'Als Student:in anmelden' + linkStudentInfo: '/mitmachen/nachhilfelehrer' + infoStudentButton: 'Infos für Studierende' + joinPupil: 'Suchst du Nachhilfe?' + registerPupil: 'Als Schüler:in anmelden' + linkPupilInfo: '/mitmachen/schueler' + infoPupilButton: 'Infos für Schüler:innen' + locationManagement: 'Interesse an Standortleitung?' + mailTo: 'mailto:info.{slug}@studenten-bilden-schueler.de?subject=Interesse an Standortleitung in {page.title}' + writeMailButton: 'Schreib uns' + linkLeadingInfo: '/mitmachen/standortleiter' + infoLeadingButton: 'Infos für Standortleitende' + contact: 'Kontakt' + questions: 'Noch Fragen? Schreib uns eine Mail!' + url: 'studenten-bilden-schueler.de' + student: 'studenten' + forStudents: 'für Studierende' + pupil: 'schueler' + info: 'info' + forPartner: 'für Soziale Einrichtungen und Nachhilfeanfragen' + generalRequests: 'für Allgemeine Anfragen' + +basepage: + last: 'Zuletzt bearbeitet:' + feedback: 'Feedback zu dieser Seite?' + email: 'it@studenten-bilden-schueler.de?subject=Feedback zu Seite:' + +meta: + name: 'Studenten bilden Schüler e.V.' + description: 'Ehrenamtliche Nachhilfe von Studierenden für Schüler:innen in deutschlandweit über 50 Unistädten.' + url: studenten-bilden-schueler.de diff --git a/src/signup-form/de/smallTexts.yml b/src/signup-form/de/smallTexts.yml index a12e78e3..e24939cc 100644 --- a/src/signup-form/de/smallTexts.yml +++ b/src/signup-form/de/smallTexts.yml @@ -13,11 +13,13 @@ indexPage: boxes: locationsName: Standorte studentsName: Studierende - studentsNumber: 2872 + studentsNumber: 3228 pupilsName: Schüler:innen - pupilsNumber: 3186 + pupilsNumber: 3231 scholarshipName: 'Stipendien' - scholarshipNumber: 9 + scholarshipNumber: 12 + organizationMemberName: Vereinsmitglieder + organizationMemberNumber: 350 footer: name: 'Studenten bilden Schüler e.V.' @@ -34,10 +36,12 @@ map: text: active: 'aktiver Standort' inSetup: 'in Gründung' + partner: 'Partner' chapterList: locations: 'Unsere Standorte' inSetup: 'Standorte in Gründung' + partner: 'Partner Standorte' location: register: 'Anmeldungen' @@ -46,7 +50,7 @@ location: linkStudentInfo: '/mitmachen/nachhilfelehrer' infoStudentButton: 'Infos für Studierende' joinPupil: 'Suchst du Nachhilfe?' - declinePupil: 'Leider ist die Warteliste voll' + declinePupil: 'Warteliste voll :(' registerPupil: 'Als Schüler:in anmelden' linkPupilInfo: '/mitmachen/schueler' infoPupilButton: 'Infos für Schüler:innen' @@ -74,3 +78,108 @@ meta: name: 'Studenten bilden Schüler e.V.' description: 'Ehrenamtliche Nachhilfe von Studierenden für Schüler:innen in deutschlandweit über 50 Unistädten.' url: studenten-bilden-schueler.de + +icons: + global: + award: &AWARD 'fa-solid:award' + calendar: &CALENDAR 'oction:calendar' + child: &CHILD 'fa-solid:child' + close: &CLOSE 'ic:round-close' + currency: &CURRENCY 'ic:round-euro' + email: &EMAIL 'ic:email' + expand: &EXPAND 'bi:chevron-expand' + graduate: &GRADUATE 'fa-solid:user-graduate' + graduationCap: &GRADUATION_CAP 'fa-solid:graduation-cap' + group: &GROUP 'fa6-solid:user-group' + hands: &HANDS_HELPING 'fa-solid:hands-helping' + information: &INFORMATION 'bi:info-circle-fill' + link: &LINK 'bx:link' + newspaper: &NEWSPAPER 'ion:newspaper' + place: &PLACE 'ic:place' + plant: &PLANT 'ri:plant-fill' + selectAll: &SELECT_ALL 'ic:select-all' + socials: + facebook: &FACEBOOK 'fa-brands:facebook' + instagram: &INSTAGRAM 'fa-brands:instagram' + linkedin: &LINKEDIN 'fa-brands:linkedin' + twitter: &TWITTER 'fa-brands:twitter' + youtube: &YOUTUBE 'fa-brands:youtube' + tags: &TAGS 'fa-solid:tags' + teacher: &TEACHER 'fa-solid:chalkboard-teacher' + theme: + dark: &THEME_DARK 'octicon:moon-16' + light: &THEME_LIGHT 'ic:round-wb-sunny' + system: &THEME_SYSTEM 'bi:laptop' + + pages: + article: + history: 'ic:round-history-edu' + person: 'bi:person-circle' + blog: + eye: 'ic:round-remove-red-eye' + chapterList: + construction: 'ic:round-construction' + footer: + Datenschutz: 'ic:round-privacy-tip' + Impressum: 'octicon:law' + Satzung: 'ion:document-text' + Spenden: *CURRENCY + cookie: 'bxs:cookie' + opensource: 'ri:open-source-fill' + index: + update: 'ic:update' + nav: + Anmeldung: 'ic:round-assignment-ind' + Blog: 'fa-solid:rss-square' + Internes: *HANDS_HELPING + Kontakt: 'ic:round-alternate-email' + Mitmachen: 'ion:people-circle' + Standorte: *PLACE + expand: *EXPAND + menu: 'heroicons-solid:menu' + Über Uns: *PLANT + placeSelect: + delete: 'ic:delete' + + tags: + blog: + Alle: *SELECT_ALL + Auszeichnung: *AWARD + Bundesvorstand: 'ion:stats-chart' + Erfahrungsberichte: 'ic:rate-review' + Events: 'ic:event-available' + Freizeit: 'ic:beach-access' + IT: 'bx:git-branch' + Interview: 'ic:question-answer' + Mentoring: *TEACHER + Nachhilfelehrer: *TEACHER + Sonstiges: 'fa6-solid:earth-europe' + 'Soziale Partner': 'fa-solid:handshake' + Spenden: *CURRENCY + Standorte: 'fa6-solid:map-location-dot' + Standortleiter: *GRADUATION_CAP + Stipendium: 'fa-solid:donate' + Werbung: 'ic:public' + faq: + Alle: *SELECT_ALL + Datenschutz: 'ic:round-privacy-tip' + Führungszeugnis: 'ic:round-assignment-ind' + Mitgliederversammlung: 'ic:round-group' + Nachhilfe: *TEACHER + Rahmenbedingungen: 'ic:filter-frames' + 'Rund ums Engagement': *HANDS_HELPING + Sonstiges: 'ic:round-miscellaneous-services' + 'Tipps für Standorte': 'ic:round-storefront' + Vereinsaustritt: 'ic:exit-to-app' + Vermittlung: 'ic:round-support-agent' + Versicherung: 'map:insurance-agency' + learningMaterial: + Alle: *SELECT_ALL + 'Deutsche Sprache': 'ic:language' + Deutschunterricht: 'simple-icons:disqus' + Englisch: 'fa-brands:erlang' + 'Lernen mit Karteikarten': 'bi:card-text' + Mathe: 'ic:functions' + Physik: 'simple-icons:atom' + 'Viele Fächer': 'ic:group-work' + Wissenschaft: 'ic:round-science'