Skip to content

Commit 25b9936

Browse files
authored
Merge pull request #78 from trifectatechfoundation/update-sponsor-section
Update sponsor section
2 parents e80f964 + e8c999a commit 25b9936

7 files changed

Lines changed: 72 additions & 8 deletions

File tree

content/_index.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ template = "index.html"
44

55
[extra]
66

7+
goldSponsors = [
8+
"canonical"
9+
]
10+
711
silverSponsors = [
812
"aws",
913
"google"

content/support.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ template = "support.html"
66

77
[extra]
88

9+
goldSponsors = [
10+
"canonical"
11+
]
12+
913
silverSponsors = [
1014
"aws",
1115
"google"

sass/components/partners.scss

Lines changed: 45 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,28 @@
4040
gap: 0.5rem;
4141
grid-template-columns: repeat(3, 1fr);
4242

43+
&.current-funders {
44+
grid-template-columns: repeat(2, 1fr);
45+
}
46+
47+
&.current-funders.gold {
48+
grid-template-columns: repeat(1, 1fr);
49+
}
50+
4351
@media (min-width: 62rem) {
4452
grid-template-columns: repeat(6, 1fr);
45-
53+
4654
&.current-funders {
4755
grid-template-columns: repeat(3, 1fr);
4856
}
57+
58+
&.current-funders.gold {
59+
grid-template-columns: repeat(2, 1fr);
60+
}
4961
}
5062
}
5163

52-
.funder {
64+
.funders .funder {
5365
align-items: center;
5466
justify-content: start;
5567
background-color: rgba(255,255,255,0.25);
@@ -73,10 +85,10 @@
7385

7486
.image {
7587
min-height: 3.5rem;
88+
width: 5rem;
7689
background-size: contain;
7790
background-position: center center;
7891
background-repeat: no-repeat;
79-
width: 5rem;
8092
pointer-events: none;
8193

8294
@media (min-width: 62rem) {
@@ -117,8 +129,7 @@
117129
}
118130

119131
&.aws {
120-
background-image: url('/funders/aws.svg');
121-
width: 3.5rem;
132+
background-image: url('/funders/aws.png');
122133
}
123134

124135
&.google {
@@ -178,6 +189,35 @@
178189
}
179190
}
180191

192+
.funders {
193+
&.current-funders {
194+
195+
.funder {
196+
.image {
197+
min-height: 4.5rem;
198+
width: 5rem;
199+
}
200+
201+
@media (min-width: 62rem) {
202+
.image {
203+
min-height: 5rem;
204+
width: 8rem;
205+
}
206+
}
207+
}
208+
}
209+
210+
&.current-funders.gold {
211+
.funder {
212+
.image {
213+
min-height: 6rem;
214+
width: 12rem;
215+
}
216+
}
217+
}
218+
}
219+
220+
181221
.funder dialog {
182222
align-items: center;
183223
display: flex;

static/funders/aws.png

18.9 KB
Loading

templates/index.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ <h2>What we do</h2>
2929
</div>
3030
</div>
3131

32-
{{ macros::sponsors(silverSponsors=page.extra.silverSponsors) }}
32+
<!-- {{ macros::sponsors(goldSponsors=page.extra.goldSponsors, silverSponsors=page.extra.silverSponsors) }} -->
33+
{{ macros::sponsors(goldSponsors=[], silverSponsors=page.extra.silverSponsors) }}
3334
{{ macros::page_funders(currentFunders=page.extra.funders, supporters=page.extra.supporters) }}
3435

3536
{% include "components/initiative_listing.html" %}

templates/macros.html

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,24 @@ <h3>{{funder.name}}</h3>
8282
{% endmacro funder_tile %}
8383

8484

85-
{% macro sponsors(silverSponsors) %}
85+
{% macro sponsors(goldSponsors, silverSponsors) %}
8686

8787
{% set funders = load_data(path = "data/funders.json") %}
8888
<div class="partners sponsors">
89+
{% if goldSponsors %}
90+
<div class="partners-title current-funders">
91+
<h3>Gold sponsors</h3>
92+
</div>
93+
<div class="funders current-funders gold">
94+
{% for name in goldSponsors %}
95+
{% for funder in funders %}
96+
{% if funder.image == name %}
97+
{{ macros::funder_tile(funder=funder) }}
98+
{% endif %}
99+
{% endfor %}
100+
{% endfor %}
101+
</div>
102+
{% endif %}
89103
{% if silverSponsors %}
90104
<div class="partners-title current-funders">
91105
<h3>Silver sponsors</h3>

templates/support.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ <h1><span>Support us</span></h1>
1010
{{ page.content | safe }}
1111
</div>
1212
</div>
13-
{{ macros::sponsors(silverSponsors=page.extra.silverSponsors) }}
13+
<!-- {{ macros::sponsors(goldSponsors=page.extra.goldSponsors, silverSponsors=page.extra.silverSponsors) }} -->
14+
{{ macros::sponsors(goldSponsors=[], silverSponsors=page.extra.silverSponsors) }}
1415
{{ macros::page_funders(currentFunders=page.extra.funders, supporters=page.extra.supporters) }}
1516
{% endblock content %}

0 commit comments

Comments
 (0)