Task 7 - Add sponsor styling

This commit is contained in:
Oliver Davies 2021-02-18 01:14:50 +00:00
parent acac7e6ec1
commit 6bd1f864ba
3 changed files with 32 additions and 14 deletions

View file

@ -11,10 +11,15 @@ module.exports = {
DEFAULT: '#56a9db', DEFAULT: '#56a9db',
dark: '#1772ae', dark: '#1772ae',
}, },
bronze: '#998100',
gold: '#e6c200',
gray: { gray: {
light: '#fafafa',
dark: '#333333', dark: '#333333',
}, },
orange: '#fcb040', orange: '#fcb040',
platinum: '#666666',
silver: '#999999',
white: '#ffffff', white: '#ffffff',
}, },
extend: { extend: {

View file

@ -1,5 +1,5 @@
<div> <div class="px-4 mx-auto mt-10 mb-10 max-w-screen-xl">
<h2>Sponsors</h2> <h2 class="sr-only">Sponsors</h2>
<div> <div>
{% include 'includes/sponsor-list.html.twig' with { {% include 'includes/sponsor-list.html.twig' with {

View file

@ -1,14 +1,27 @@
<div> {% set titleClasses = [
<h2>{{ title }}</h2> 'text-5xl font-display',
type == 'bronze' ? 'text-bronze',
type == 'gold' ? 'text-gold',
type == 'in_kind' ? 'text-blue-dark',
type == 'platinum' ? 'text-platinum',
type == 'silver' ? 'text-silver',
] %}
<ul> <div class="mt-10 text-center">
{% for sponsor in sponsors.findByType(type) %} <h2 class="{{ titleClasses|join(' ')|trim }}">{{ title }}</h2>
<li>
<a href="#0"> <div class="mt-6">
<img src="{{ sponsor.logo_url }}" alt=""> <ul class="flex flex-wrap justify-center mx-auto -mt-2 -ml-2">
<p>{{ sponsor.name }}</p> {% for sponsor in sponsors.findByType(type) %}
</a> <li class="mt-2 ml-2">
</li> <a class="flex flex-col items-center justify-center w-64 h-48 p-4 bg-gray-light" href="#0">
{% endfor %} <span class="flex items-center h-full">
</ul> <img class="block w-4/5 max-h-full mx-auto" src="{{ sponsor.logo_url }}" alt="">
</span>
<p class="sr-only">{{ sponsor.name }}</p>
</a>
</li>
{% endfor %}
</ul>
</div>
</div> </div>