-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add styling for sponsors * Adjust the "work in progress" sponsors page
- Loading branch information
1 parent
3f50998
commit 501d9a6
Showing
9 changed files
with
186 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
.sponsor { | ||
align-items: center; | ||
background-color: var(--clearwhite); | ||
border-radius: 2px; | ||
box-shadow: 0 0 10px 0 rgba(123, 136, 157, .15); | ||
display: flex; | ||
} | ||
|
||
.sponsor a { | ||
padding: 1.25rem; | ||
width: 100%; | ||
} | ||
|
||
.sponsor-community a { | ||
padding: .25rem; | ||
} | ||
|
||
.sponsor img { | ||
display: block; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
.sponsors { | ||
--sponsors-grid-count: 1; | ||
--sponsors-grid-gap: 1.25rem; | ||
--sponsors-margin-bottom: calc(var(--sponsors-grid-gap) * 2); | ||
|
||
display: grid; | ||
grid-template-columns: repeat(var(--sponsors-grid-count), 1fr); | ||
grid-gap: var(--sponsors-grid-gap); | ||
margin-bottom: var(--sponsors-margin-bottom); | ||
margin-top: var(--sponsors-grid-gap); | ||
|
||
@media (--xsmall) { | ||
--sponsors-grid-count: 2; | ||
} | ||
|
||
@media (--small) { | ||
--sponsors-grid-count: 3; | ||
--sponsors-margin-bottom: calc(var(--sponsors-grid-gap) * 4); | ||
} | ||
} | ||
|
||
.sponsors-supporting { | ||
@media (--xsmall) { | ||
--sponsors-grid-count: 3; | ||
} | ||
|
||
@media (--small) { | ||
--sponsors-grid-count: 4; | ||
} | ||
} | ||
|
||
.sponsors-community { | ||
@media (--xsmall) { | ||
--sponsors-grid-count: 4; | ||
} | ||
|
||
@media (--small) { | ||
--sponsors-grid-count: 6; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"pageId": "sponsors-list", | ||
"template": "pages/sponsors-list.html.njk", | ||
"pageId": "sponsors", | ||
"template": "pages/sponsors-work-in-progress.html.njk", | ||
"filename": ":file/index.html", | ||
"title": "Sponsors" | ||
"title": "Sponsors (WIP)" | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
{% 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) | | ||
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 %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 %} |