Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

605 reststructure page for partners and sponsors #607

Merged
merged 2 commits into from
Nov 18, 2023
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
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion src/lib/components/Hero.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
export let gradient_only;
export let height;
export let text;
export let image_alt;
export let buttons = [];
export let correlaidx = false;
export let image = void 0;
Expand Down
4 changes: 4 additions & 0 deletions src/lib/data/translations.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ export default {
'footer.coe': {text: 'Code of Ethics', url: '/codeofethics'},
// 'footer.contact': {text: 'Kontakt', url: '/contact'},
'misc.read_more': {text: 'Mehr lesen'},
'misc.partners': {text: 'Partner'},
'misc.financial_supporters': {text: 'Fördernde'},
'access.close': {text: 'Navigation schließen'},
'access.open': {text: 'Navigation öffnen'},
'access.next': {text: 'Nächstes'},
Expand Down Expand Up @@ -191,6 +193,8 @@ export default {
'footer.coe': {text: 'Code of Ethics', url: '/en/codeofethics'},
// 'footer.contact': {text: 'Contact', url: '/en/contact'},
'misc.read_more': {text: 'Read more'},
'misc.partners': {text: 'Partners'},
'misc.financial_supporters': {text: 'Financial Supporters'},
'access.close': {text: 'Close Navigation'},
'access.open': {text: 'Open Navigation'},
'access.next': {text: 'Next'},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,15 @@ import {parseEntries} from '$lib/js/parse_cms.js';
export async function load({params}) {
const data = await directus_fetch(partnerQuery, {language: get_lang(params)});

return {partners: parseEntries(data.Partners, 'partners')};
const partners = data.Partners.filter(
(partner) => partner.type === 'partner',
);
const financial_supporters = data.Partners.filter(
(partner) => partner.type === 'financial_supporter',
);

return {
partners: parseEntries(partners, 'partners'),
financial_supporters: parseEntries(financial_supporters, 'partners'),
};
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<script>
import {page_key} from '$lib/stores/page_key';
import {onMount} from 'svelte';
import {t} from '$lib/stores/i18n';
import Partner from '$lib/components/Partner.svelte';

onMount(() => {
Expand All @@ -9,12 +10,22 @@

export let data;
$: partners = data.partners;
$: financial_supporters = data.financial_supporters;
</script>

<div class="mt-12">
<h2 class="mb-6 mt-8 px-4 text-2xl font-bold">{$t('misc.partners').text}</h2>
<div class="container mx-auto flex flex-col space-y-8">
{#each partners as partner}
<Partner {...partner} />
{/each}
</div>
<h2 class="mb-6 mt-8 px-4 text-2xl font-bold">
{$t('misc.financial_supporters').text}
</h2>
<div class="container mx-auto flex flex-col space-y-8">
{#each financial_supporters as partner}
<Partner {...partner} />
{/each}
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ query Partners($language: String = "de-DE") {
logo {
id
}
type
link
translations(filter: { languages_code: { code: { _eq: $language } } }) {
description
Expand Down
Loading