Add sponsors block to front page
This commit is contained in:
parent
9e9ce86454
commit
8169ba4aad
28
source/_includes/sponsors-block.html.twig
Normal file
28
source/_includes/sponsors-block.html.twig
Normal file
|
@ -0,0 +1,28 @@
|
|||
<section class="tw-text-center tw-max-w-5xl md:tw-w-full tw-mx-auto tw-p-8">
|
||||
<h2 class="tw-font-bold tw-text-6xl">
|
||||
Our <span class="tw-text-green-600">Sponsors</span>
|
||||
</h2>
|
||||
|
||||
{% for level in site.sponsorship_levels %}
|
||||
{% set sponsors = site.sponsors[level] %}
|
||||
{% if sponsors %}
|
||||
<section class="tw-block">
|
||||
<h3 class="tw-visuallyhidden">{{ level|capitalize }} Sponsors</h2>
|
||||
|
||||
<div class="tw-flex tw-flex-wrap tw-items-center tw-justify-center tw--mx-4">
|
||||
{% for sponsor in sponsors %}
|
||||
<article class="tw-mb-6 {{ level == 'gold' ? 'tw-w-1/3' : 'tw-w-1/4' }}">
|
||||
<div class="tw-px-4 tw-mb-4">
|
||||
<img src="/images/sponsors/{{ sponsor.logo }}" alt="{{ sponsor.name }} logo" class="tw-inline-block tw-max-w-full">
|
||||
</div>
|
||||
</article>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</section>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
<footer class="tw-mt-4">
|
||||
<a class="tw-button tw-w-auto tw-py-2 tw-text-base tw-bg-green-600 hocus:tw-bg-pink-600" href="/sponsors">See all sponsors</a>
|
||||
</footer>
|
||||
</section>
|
|
@ -15,8 +15,10 @@
|
|||
{% block content_botton %}{% endblock %}
|
||||
|
||||
{% if page.update_text %}
|
||||
{% include 'update-text' %}
|
||||
{% include 'update-text' %}
|
||||
{% endif %}
|
||||
|
||||
{% block content_bottom %}{% endblock %}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
|
|
Loading…
Reference in a new issue