Skip to content

Commit

Permalink
Remove the "work in progress" sponsors page
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszklis committed Apr 10, 2018
1 parent 28fb373 commit 2a007cc
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 56 deletions.
6 changes: 0 additions & 6 deletions contents/sponsors-work-in-progress.json

This file was deleted.

49 changes: 0 additions & 49 deletions templates/pages/sponsors-list.html.njk

This file was deleted.

47 changes: 46 additions & 1 deletion templates/pages/sponsors.html.njk
Original file line number Diff line number Diff line change
@@ -1,11 +1,56 @@
{% extends "../layouts/default.html.njk" %}

{% block header %}
{% if page.metadata.title %}
<section class="grid">
<div class="grid-item-sponsor">
<h1 class="tl">
{{ page.metadata.title }}
</h1>
</div>
</section>
{% endif %}
{% endblock %}

{% block content %}
{% set sponsorTypes = ['double down', 'main', 'supporting', 'community'] %}

{% for sponsorType in sponsorTypes %}
{% set sponsors = contents.sponsors._.pages |
filterObjects('metadata.sponsor.type', sponsorType) |
filterObjects('metadata.sponsor.reviewed', true) |
sortObjects('metadata.sponsor.order', 100, 'number') %}
{% set firstSponsor = sponsors | first %}
{% set sponsorsTitle = firstSponsor.metadata.sponsor.title %}
{% set sponsorsType = sponsorType | replace(' ', '-') %}

{% if sponsors.length > 0 %}
<section class="grid">
<div class="grid-item-sponsor">
<h2>{{ sponsorsTitle }}</h2>
<div class="sponsors sponsors-{{ sponsorsType }}">
{% for page in sponsors %}
{% set sponsor = page.metadata.sponsor %}

<div class="sponsor sponsor-{{ sponsorsType }}"
id="{{ sponsor.id }}">
<a href="{{ sponsor.link }}"
rel="nofollow"
target="_blank">
<img src="{{ contents.images.sponsor[sponsor.image.filename].url }}"
alt="{{ sponsor.name }}">
</a>
</div>
{% endfor %}
</div>
</div>
</section>
{% endif %}
{% endfor %}

<section class="grid">
<div class="grid-item-center md-content">
{{ contents.copy.sponsors['sponsors.md'].html }}
</div>
</section>

{% endblock %}

0 comments on commit 2a007cc

Please sign in to comment.