Skip to content

Commit c4c4534

Browse files
Added logic to footer.html to show only permanent sponsors in the footer (Zopa autoremoved).
Modified all sponsor .md files accordingly.
1 parent 5dab5af commit c4c4534

File tree

6 files changed

+18
-5
lines changed

6 files changed

+18
-5
lines changed

_includes/footer.html

+13-5
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,28 @@ <h2 class="footer__section-title">Our Sponsors</h2>
1414
If not even the last row must contain 1 sponsor and be terminated with appropriate tags.
1515
{% endcomment %}
1616

17-
{% assign num_of_sponsors_even = true %}
1817
{% assign sponsors = "" | split: ',' %}
1918
{% for sponsor in site.sponsors %}
20-
{% assign sponsors = sponsors | push: sponsor %}
19+
{% if sponsor.permanent %}
20+
{% assign sponsors = sponsors | push: sponsor %}
21+
{% endif %}
2122
{% endfor %}
2223
{% assign num_of_sponsors = sponsors | size %}
23-
{% if num_of_sponsors | modulo: 2 > 0 %}
24+
{% assign sponsors_remainder = num_of_sponsors | modulo: 2 %}
25+
26+
{% if sponsors_remainder == 0 %}
27+
{% assign num_of_sponsors_even = true %}
28+
{% assign row_num_modifier = 1 %}
29+
{% else %}
2430
{% assign num_of_sponsors_even = false %}
31+
{% assign row_num_modifier = 0 %}
2532
{% endif %}
26-
{% assign num_of_rows = num_of_sponsors | divided_by: 2 | floor %}
33+
34+
{% assign num_of_rows = num_of_sponsors | divided_by: 2 | floor | minus: row_num_modifier %}
2735
{% assign items_per_row = 1 %}
2836

2937
{% for row in (0..num_of_rows) %}
30-
{% if forloop.last == true and num_of_sponsors_even == false %}
38+
{% if forloop.last and num_of_sponsors_even == false %}
3139
{% assign items_per_row = 0 %}
3240
{% endif %}
3341
<div class="row">

_sponsors/bloomberg.md

+1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@ sponsor_id: bloomberg
33
sponsor_name: "Bloomberg"
44
sponsor_logo: static/images/sponsors/bloomberg.png
55
sponsor_link: https://www.bloomberg.com/careers/
6+
permanent: true
67
---
78
Bloomberg L.P. provides financial software tools such as an analytics and equity trading platform, data services, and news to financial companies and organizations through the Bloomberg Terminal (via its Bloomberg Professional Service), its core revenue-generating product.

_sponsors/harvey_nash.md

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ sponsor_id: harvey_nash
33
sponsor_name: "Harvey Nash"
44
sponsor_logo: static/images/sponsors/harvey_nash.png
55
sponsor_link: https://www.linkedin.com/in/hamishpitkeathly/
6+
permanent: true
67
---
78
Harvey Nash specialise in professional recruitment.
89
Since 1988, they supported many of the world's top organisations to recruit, source and manage the highly-skilled talent needed to succeed in an increasingly competitive world.

_sponsors/python_software_foundation.md

+1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@ sponsor_id: python_software_foundation
33
sponsor_name: "Python Software Foundation"
44
sponsor_logo: static/images/sponsors/python_software_foundation.png
55
sponsor_link: https://www.python.org/psf/
6+
permanent: true
67
---
78
The Python Software Foundation (PSF) is a non-profit corporation that holds the intellectual property rights behind the Python programming language. We manage the open source licensing for Python version 2.1 and later and own and protect the trademarks associated with Python.

_sponsors/touch_surgery.md

+1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@ sponsor_id: touch_surgery
33
sponsor_name: "Touch Surgery"
44
sponsor_logo: static/images/sponsors/touch_surgery.png
55
sponsor_link: https://www.touchsurgery.com/jobs.html
6+
permanent: true
67
---
78
The Touch Surgery platform is an interactive surgical simulator for healthcare professionals; providing a realistic and detailed guide to every step of a procedure. Users can quickly learn surgery, instantly test their knowledge, and rehearse for surgery.

_sponsors/zopa.md

+1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@ sponsor_id: zopa
33
sponsor_name: "Zopa"
44
sponsor_logo: static/images/sponsors/zopa.png
55
sponsor_link: https://www.zopa.com/
6+
permanent: false
67
---
78
Zopa provide loans and offer competitive rates, flexible and intuitive products and award-winning customer service. They strive to make money simple and fair for everyone – to enable people to do more with their money and take control of their finances.

0 commit comments

Comments
 (0)