diff --git a/source/_redirects b/source/_redirects
new file mode 100644
index 0000000..763cef0
--- /dev/null
+++ b/source/_redirects
@@ -0,0 +1 @@
+/sponsorship /sponsor-us
diff --git a/source/images/sponsors/acquia.png b/source/images/sponsors/acquia.png
new file mode 100644
index 0000000..d8701a5
Binary files /dev/null and b/source/images/sponsors/acquia.png differ
diff --git a/source/images/sponsors/drupalize-me.png b/source/images/sponsors/drupalize-me.png
new file mode 100644
index 0000000..868bb17
Binary files /dev/null and b/source/images/sponsors/drupalize-me.png differ
diff --git a/source/images/sponsors/microserve.png b/source/images/sponsors/microserve.png
new file mode 100644
index 0000000..5230e53
Binary files /dev/null and b/source/images/sponsors/microserve.png differ
diff --git a/source/images/sponsors/proctors.jpg b/source/images/sponsors/proctors.jpg
new file mode 100644
index 0000000..6aed64f
Binary files /dev/null and b/source/images/sponsors/proctors.jpg differ
diff --git a/source/images/sponsors/tpx-manifesto.svg b/source/images/sponsors/tpx-manifesto.svg
new file mode 100644
index 0000000..b60747a
--- /dev/null
+++ b/source/images/sponsors/tpx-manifesto.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/source/index.html.twig b/source/index.html.twig
index 05c1235..92c1579 100644
--- a/source/index.html.twig
+++ b/source/index.html.twig
@@ -48,4 +48,9 @@ use: [sessions, speakers]
sessions: data.sessions,
slots: site.schedule.slots,
} %}
+
+ {% include 'sponsors-block' with {
+ sponsorData: site.sponsors,
+ sponsorshipLevels: site.sponsorship_levels,
+ } %}
{% endblock %}
diff --git a/source/sponsors.html.twig b/source/sponsors.html.twig
new file mode 100644
index 0000000..1aeff60
--- /dev/null
+++ b/source/sponsors.html.twig
@@ -0,0 +1,32 @@
+---
+layout: page
+title: Our Sponsors
+---
+
+
DrupalCamp Bristol would like to say a massive THANK YOU! to all of our incredible sponsors. Without your support, this event would never have been possible.
+
If you'd like to get involved with sponsorship, head over to our Sponsorship page. We'll be on the lookout for new sponsors up until the day of the event.
+
+
+
+ {% for level in site.sponsorship_levels %}
+ {% set sponsors = getSponsors(site.sponsors, level) %}
+ {% if sponsors %}
+
+ {{ level ~ ' Sponsors'|capitalize }}
+
+ {% for sponsor in sponsors %}
+
+ {% set template = (level == 'gold') ? 'sponsors/full' : 'sponsors/teaser' %}
+ {% include template with {
+ description: sponsor.description,
+ logo: sponsor.logo,
+ name: sponsor.name,
+ url: sponsor.url,
+ } %}
+
+ {% endfor %}
+
+
+ {% endif %}
+ {% endfor %}
+
diff --git a/src/Sponsors/services.yml b/src/Sponsors/services.yml
new file mode 100644
index 0000000..8e1fe67
--- /dev/null
+++ b/src/Sponsors/services.yml
@@ -0,0 +1,4 @@
+services:
+ App\Sponsors\TwigExtension\SponsorsExtension:
+ tags:
+ - { name: twig.extension }
diff --git a/src/Sponsors/src/DependencyInjection/SculpinSponsorsExtension.php b/src/Sponsors/src/DependencyInjection/SculpinSponsorsExtension.php
new file mode 100644
index 0000000..59c3fea
--- /dev/null
+++ b/src/Sponsors/src/DependencyInjection/SculpinSponsorsExtension.php
@@ -0,0 +1,20 @@
+load('services.yml');
+ }
+}
diff --git a/src/Sponsors/src/Model/Sponsor.php b/src/Sponsors/src/Model/Sponsor.php
new file mode 100644
index 0000000..e4de25d
--- /dev/null
+++ b/src/Sponsors/src/Model/Sponsor.php
@@ -0,0 +1,33 @@
+data = $sponsorData;
+ }
+
+ public static function create(array $sponsorData): self
+ {
+ return new static($sponsorData);
+ }
+
+ public function isConfirmed(): bool
+ {
+ return $this->data['confirmed'] ?? false;
+ }
+
+ public function getData(): array
+ {
+ return $this->data;
+ }
+}
diff --git a/src/Sponsors/src/SculpinSponsorsBundle.php b/src/Sponsors/src/SculpinSponsorsBundle.php
new file mode 100644
index 0000000..15403de
--- /dev/null
+++ b/src/Sponsors/src/SculpinSponsorsBundle.php
@@ -0,0 +1,9 @@
+map(function ($sponsor) {
+ return Sponsor::create($sponsor);
+ })
+ ->filter->isConfirmed()
+ ->map->getData()
+ ->values()
+ ->toArray();
+ }
+}
diff --git a/src/Sponsors/tests/SponsorsTest.php b/src/Sponsors/tests/SponsorsTest.php
new file mode 100644
index 0000000..d9ae225
--- /dev/null
+++ b/src/Sponsors/tests/SponsorsTest.php
@@ -0,0 +1,54 @@
+extension = new SponsorsExtension();
+ }
+
+ /** @test */
+ public function get_sponsors_by_level()
+ {
+ $data = [
+ Sponsor::LEVEL_GOLD => [
+ ['name' => 'Microserve', 'confirmed' => true],
+ ],
+ Sponsor::LEVEL_SILVER => [
+ ['name' => 'Drupalize.me', 'confirmed' => true],
+ ],
+ ];
+
+ $sponsors = $this->extension->getSponsors($data, Sponsor::LEVEL_SILVER);
+
+ $this->assertCount(1, $sponsors);
+ $this->assertSame('Drupalize.me', $sponsors[0]['name']);
+ }
+
+ /** @test */
+ public function only_confirmed_sponsors_are_returned()
+ {
+ $data = [
+ Sponsor::LEVEL_GOLD => [
+ ['name' => 'Acquia', 'confirmed' => false],
+ ['name' => 'Microserve', 'confirmed' => true],
+ ],
+ ];
+
+ $sponsors = $this->extension->getSponsors($data, Sponsor::LEVEL_GOLD);
+
+ $this->assertCount(1, $sponsors);
+ $this->assertSame('Microserve', $sponsors[0]['name']);
+ }
+}
diff --git a/tailwind.config.js b/tailwind.config.js
index eda0f32..fe1fa75 100644
--- a/tailwind.config.js
+++ b/tailwind.config.js
@@ -15,10 +15,11 @@ module.exports = {
}
},
variants: {
+ backgroundColor: [...variants.backgroundColor, 'hocus'],
borderColor: [...variants.textColor, 'hocus', 'group-hocus'],
+ fontStyle: [...variants.fontStyle, 'hocus'],
textColor: [...variants.textColor, 'hocus'],
- textDecoration: [...variants.textColor, 'hocus', 'group-hocus'],
- fontStyle: [...variants.fontStyle, 'hocus']
+ textDecoration: [...variants.textColor, 'hocus', 'group-hocus']
},
corePlugins: {
preflight: false
@@ -27,6 +28,7 @@ module.exports = {
require('tailwindcss-interaction-variants')(),
require('tailwindcss-list-reset')(),
require('tailwindcss-spaced-items')({ values: spacing }),
- require('tailwindcss-transitions')()
+ require('tailwindcss-transitions')(),
+ require('tailwindcss-visuallyhidden')()
]
}
diff --git a/yarn.lock b/yarn.lock
index 74f20c2..283362c 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -6699,6 +6699,11 @@ tailwindcss-transitions@^2.0.0:
dependencies:
lodash "^4.17.11"
+tailwindcss-visuallyhidden@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/tailwindcss-visuallyhidden/-/tailwindcss-visuallyhidden-1.0.2.tgz#cdf178208282d1787e72186df2cf9d1286347667"
+ integrity sha512-Hk3Do4x9nAz43CGzcxXqdAhsQs+bE6tUhlcHWBvLC4F8WjqbiGIcp1jPPHmXBAv41D8kFIH0UZyLGw490upsKg==
+
tailwindcss@^1.0.0-beta.4:
version "1.0.0-beta.8"
resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-1.0.0-beta.8.tgz#62c04d4bb342933b45164735b0334119651cd733"