Skip to content

Commit fba63f7

Browse files
Merge pull request #98 from larsmbm/add-sponsors-to-the-homepage
Add sponsors to the homepage
2 parents 6e1a685 + 7e0bd1b commit fba63f7

File tree

5 files changed

+53
-5
lines changed

5 files changed

+53
-5
lines changed

content/data/nl.csv

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,7 @@
99
"Become member","Lid worden"
1010
"Your email","Jouw emailadres"
1111
"Pay now","Nu betalen"
12-
"Directory of Magento in Nederland","Directory van Magento in Nederland"
12+
"Directory of Magento in Nederland","Directory van Magento in Nederland"
13+
"Sponsors","Sponsoren"
14+
"Want to become a sponsor of Mage-OS Netherlands? Send an email to","Wilt u ook sponsor worden van Mage-OS Nederland? Stuur een email naar"
15+
"Interest in sponsorship Mage-OS Netherlands","Interesse in sponsorschap Mage-OS Nederland"

content/pages/home-en.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,6 @@
77

88
Mage-OS Netherlands is an initiative of the Dutch Magento community, with the aim of representing the Magento / Adobe Commerce / Mage-OS ecosystem in the Netherlands. The association aims to facilitate initiatives from the community (such as Dutch events, a better website, information provision to online retailers and much more).
99

10-
All help is welcome, so if you have an idea to strengthen Magento in the Netherlands, let us know!
10+
All help is welcome, so if you have an idea to strengthen Magento in the Netherlands, let us know!
11+
12+
{{snippet sponsors}}

content/pages/home-nl.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
## Over Mage-OS Nederland {#over}
66

7-
Mage-OS Nederland is een initiatief van de Nederlandse Magento community, met als doel het ecosysteem van Magento / Adobe Commerce / Mage-OS in Nederland te vertegenwoordigen. De vereniging stelt zich als doel om initiatieven vanuit de community te faciliteren (zoals Nederlandse events, een betere website, informatievoorziening richting webwinkeliers en nog veel meer).
7+
Mage-OS Nederland is een initiatief van de Nederlandse Magento community, met als doel het ecosysteem van Magento / Adobe Commerce / Mage-OS in Nederland te vertegenwoordigen. De vereniging stelt zich als doel om initiatieven vanuit de community te faciliteren (zoals Nederlandse events, een betere website, informatievoorziening richting webwinkeliers en nog veel meer).
88

9-
Alle hulp is hierbij welkom, dus mocht je een idee hebben om Magento in Nederland te versterken, laat het ons weten!
9+
Alle hulp is hierbij welkom, dus mocht je een idee hebben om Magento in Nederland te versterken, laat het ons weten!
10+
11+
{{snippet sponsors}}

content/snippets/sponsors.php

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
use MageOsNl\Website\DirectoryProvider;
6+
7+
$items = (new DirectoryProvider())->getDirectoryItems();
8+
$sponsors = array_filter($items, function($item) {
9+
return $item->isSponsor();
10+
});
11+
12+
if (empty($sponsors)) {
13+
return;
14+
}
15+
?>
16+
<section class="py-8">
17+
<h2 class="text-3xl font-bold text-center mb-8"><?= __('Sponsors') ?></h2>
18+
19+
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6">
20+
<?php foreach ($sponsors as $sponsor): ?>
21+
<div class="bg-white relative overflow-hidden shadow-lg ring-1 ring-black/5 p-6 text-center hover:shadow-xl transition-shadow flex flex-col">
22+
<a href="<?= $sponsor->getUrl() ?>" class="no-underline flex flex-col h-full">
23+
<div class="relative h-[120px] flex items-center justify-center">
24+
<?php if ($sponsor->hasLogo()): ?>
25+
<img class="w-auto max-h-[100px] inline object-contain"
26+
src="<?= $sponsor->getLogo() ?>"
27+
alt=""
28+
loading="lazy"
29+
/>
30+
<?php endif; ?>
31+
</div>
32+
<div class="mt-auto">
33+
<h3 class="text-base font-semibold text-gray-900"><?= $sponsor->getName() ?></h3>
34+
</div>
35+
</a>
36+
</div>
37+
<?php endforeach; ?>
38+
</div>
39+
40+
<p class="my-8"><?= __('Want to become a sponsor of Mage-OS Netherlands? Send an email to') ?> <a class="hover:text-orange" href="mailto:bestuur@nl.mage-os.org?subject=<?= __('Interest in sponsorship Mage-OS Netherlands') ?>">bestuur@nl.mage-os.org</a></p>
41+
</section>

pub/style.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)