Skip to content

Commit

Permalink
feat: add Brussels Region logos to /about
Browse files Browse the repository at this point in the history
  • Loading branch information
th0rgall committed Dec 3, 2023
1 parent 4a82477 commit fd17da1
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 6 deletions.
23 changes: 19 additions & 4 deletions src/lib/components/UI/Partner.svelte
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
<script lang="ts">
export let logo: string;
/**
* Expected to be a direct HTML string of an svg
*/
export let logo: string | undefined;
/**
* The link to an <img> src (alternative to the "logo" prop)
*/
export let src: string | undefined;
export let link: string;
export let name: string;
</script>

<a href={link} class="partner-link" target="_blank" aria-label={name}>
{@html logo}
{#if logo}
{@html logo}
{:else if src}
<img {src} alt={name} />
{/if}
</a>

<style>
Expand All @@ -14,10 +25,14 @@
width: min-content;
}
.partner-link :global(svg) {
fill: var(--color-orange-light);
.partner-link :global(svg),
img {
max-width: 18rem;
min-width: 16rem;
max-height: 10rem;
}
.partner-link :global(svg) {
fill: var(--color-orange-light);
}
</style>
40 changes: 40 additions & 0 deletions src/lib/images/hoofdstedelijk-gewest.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/lib/images/shifting-economy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/lib/partners.js → src/lib/partners.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ import natuurpuntLogo from './images/natuurpunt_logo.svg';
import groteRoutePadenLogo from './images/groteroutepaden-logo-vernieuwd.svg';
import GRSentiers from './images/les-sentiers-de-grande-randonnee-logo.svg';
import wikimediaBELogo from './images/wikimediabe_logo.svg';
import SELogoSrc from './images/shifting-economy.png';
import brusselsRegion from './images/hoofdstedelijk-gewest.svg';

export default [
{ name: 'Brussels Region', link: 'https://be.brussels/en', logo: brusselsRegion },
{ name: 'Shifting Economy', link: 'https://shiftingeconomy.brussels/', src: SELogoSrc },
{
name: 'Grote Routepaden',
link: 'https://www.groteroutepaden.be/',
Expand Down
4 changes: 2 additions & 2 deletions src/routes/(marketing)/about-us/PartnersSection.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
<h2>{$_('about-us.partners-section.title')}</h2>
<p>{$_('about-us.partners-section.description')}</p>
<div class="partner-logos">
{#each partners as { name, logo, link } (name)}
<Partner {name} {logo} {link} />
{#each partners as { name, logo, link, src } (name)}
<Partner {name} {logo} {link} {src} />
{/each}
</div>
</div>
Expand Down

0 comments on commit fd17da1

Please sign in to comment.