Add sponsors page
This commit is contained in:
parent
31373ce8a7
commit
e48bd57a35
25
source/_includes/sponsors/full.html.twig
Normal file
25
source/_includes/sponsors/full.html.twig
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
<div class="tw-mb-4">
|
||||||
|
<h3>{{ name }}</h3>
|
||||||
|
|
||||||
|
<div class="tw-flex tw-flex-row-reverse tw--mx-4">
|
||||||
|
<div class="tw-flex-1 tw-px-4">
|
||||||
|
{% if description %}
|
||||||
|
<div>
|
||||||
|
{{ description|markdown }}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if url %}
|
||||||
|
<a href="{{ url }}" class="tw-inline-block tw-mt-1 tw-px-4 tw-py-2 tw-bg-purple-600 hocus:tw-bg-green-600 tw-text-white tw-no-underline tw-uppercase tw-font-semibold">
|
||||||
|
Visit <span class="tw-visuallyhidden">{{ name }}’s</span> website
|
||||||
|
</a>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% if logo %}
|
||||||
|
<div class="tw-flex-none tw-px-4 tw-w-1/4">
|
||||||
|
<img src="/images/sponsors/{{ logo }}" alt="{{ name }} logo" class="tw-max-w-full">
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
9
source/_includes/sponsors/teaser.html.twig
Normal file
9
source/_includes/sponsors/teaser.html.twig
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
<div class="tw-flex tw-flex-col tw-items-center tw-justify-center">
|
||||||
|
<div>
|
||||||
|
<img src="/images/sponsors/{{ logo }}" alt="{{ name }} logo" class="tw-max-w-full tw-w-full">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="tw-mt-1">
|
||||||
|
<a href="{{ url }}">{{ name }}</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
26
source/sponsors.html.twig
Normal file
26
source/sponsors.html.twig
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
---
|
||||||
|
layout: page
|
||||||
|
title: Sponsors
|
||||||
|
---
|
||||||
|
{% for level in site.sponsorship_levels %}
|
||||||
|
{% set sponsors = site.sponsors[level] %}
|
||||||
|
{% if sponsors %}
|
||||||
|
<section class="tw-block tw-mb-8">
|
||||||
|
<h2 class="tw-mb-4">{{ level ~ ' Sponsors'|capitalize }}</h2>
|
||||||
|
|
||||||
|
<div class="{{ level == 'gold' ? '' : 'tw-flex tw-flex-wrap tw--mx-2' }}">
|
||||||
|
{% for sponsor in sponsors %}
|
||||||
|
<article class="{{ level == 'gold' ? 'tw-w-full' : 'tw-w-1/6 tw-px-2 tw-mb-6' }}">
|
||||||
|
{% set template = (level == 'gold') ? 'sponsors/full' : 'sponsors/teaser' %}
|
||||||
|
{% include template with {
|
||||||
|
description: sponsor.description,
|
||||||
|
logo: sponsor.logo,
|
||||||
|
name: sponsor.name,
|
||||||
|
url: sponsor.url,
|
||||||
|
} %}
|
||||||
|
</article>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
Loading…
Reference in a new issue