Skip to content

Commit

Permalink
Update Membership Page (#599)
Browse files Browse the repository at this point in the history
* Updated 1 file via CloudCannon.

* Added 1 file via CloudCannon.

* Updated 1 file via CloudCannon.

* Updated 1 file via CloudCannon.

* Updated 2 files via CloudCannon.

* Updated 1 file via CloudCannon.

* Updated 1 file via CloudCannon.

* Updated 1 file via CloudCannon.

* Updated 1 file via CloudCannon.

* Updated 1 file via CloudCannon.

* Add a hasMembersAtLevel filter and use it.

---------

Co-authored-by: Gracie Gregory <[email protected]>
Co-authored-by: Adam Harvey <[email protected]>
  • Loading branch information
3 people authored Nov 22, 2024
1 parent 276cb8c commit b61053d
Show file tree
Hide file tree
Showing 5 changed files with 87 additions and 76 deletions.
9 changes: 9 additions & 0 deletions .eleventy.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,15 @@ module.exports = function(eleventyConfig) {
return new Date();
});

eleventyConfig.addFilter("hasMembersAtLevel", function (memberslist, level) {
for (const member of memberslist) {
if (member.data.status !== "suspended" && member.data.level === level) {
return true;
}
}

return false;
});

eleventyConfig.addCollection("tagList", function(collection) {
let tagSet = new Set();
Expand Down
134 changes: 71 additions & 63 deletions _includes/memberslist.njk
Original file line number Diff line number Diff line change
@@ -1,72 +1,80 @@
<h2>Platinum</h2>
<ul class="memberslist">
{% for member in memberslist %}
{% if member.data.level == "platinum" and member.data.status != "suspended" %}
{% if member.data.founder == "yes" %}
<li class="platinummember">
{% if member.data.logo %}
<img src="{{ member.data.logo }}" alt="{{ member.data.name }}"/>
<a href="{{ member.data.url }}" rel="nofollow"><div style="background-image: url('/img/founding-member.png'" alt="Founding Member" class="founding"></div></a>
{% endif %}
</li>
{% else %}
<li class="platinummember">
{% if (memberslist | hasMembersAtLevel("platinum")) %}
<ul class="memberslist">
{% for member in memberslist %}
{% if member.data.level == "platinum" and member.data.status != "suspended" %}
{% if member.data.founder == "yes" %}
<li class="platinummember">
{% if member.data.logo %}
<img src="{{ member.data.logo }}" alt="{{ member.data.name }}"/>
<a href="{{ member.data.url }}" rel="nofollow"><div style="background-image: url('/img/founding-member.png'" alt="Founding Member" class="founding"></div></a>
{% endif %}
</li>
{% else %}
<li class="platinummember">
{% if member.data.logo %}
<a href="{{ member.data.url }}" rel="nofollow"><img src="{{ member.data.logo }}" alt="{{ member.data.name }}"/></a>
{% endif %}
</li>
{% endif %}
{% endif %}
{% endfor %}
</ul>
{% endif %}
{% if (memberslist | hasMembersAtLevel("gold")) %}
<h2>Gold</h2>
<ul class="memberslist">
{% for member in memberslist %}
{% if member.data.level == "gold" and member.data.status != "suspended" %}
<li class="goldmember">
{% if member.data.logo %}
<a href="{{ member.data.url }}" rel="nofollow"><img src="{{ member.data.logo }}" alt="{{ member.data.name }}"/></a>
{% if member.data.founder == "yes" %}
<a href="{{ member.data.url }}" rel="nofollow">
<div style="background-image: url('/img/founding-member.png'" alt="Founding Member" class="founding">
</div>
</a>
{% endif %}
{% endif %}
</li>
{% endif %}
{% endif %}
{% endfor %}
</ul>
<h2>Gold</h2>
<ul class="memberslist">
{% for member in memberslist %}
{% if member.data.level == "gold" and member.data.status != "suspended" %}
<li class="goldmember">
{% if member.data.logo %}
<a href="{{ member.data.url }}" rel="nofollow"><img src="{{ member.data.logo }}" alt="{{ member.data.name }}"/></a>
{% if member.data.founder == "yes" %}
<a href="{{ member.data.url }}" rel="nofollow">
<div style="background-image: url('/img/founding-member.png'" alt="Founding Member" class="founding">
</div>
</a>
{% endif %}
{% endif %}
</li>
{% endif %}
{% endfor %}
</ul>
<h2>Silver</h2>
<ul class="memberslist">
{% for member in memberslist %}
{% if member.data.level == "silver" and member.data.status != "suspended" %}
{% if member.data.founder == "yes" %}
<li class="silvermember">
{% if member.data.logo %}
<img src="{{ member.data.logo }}" alt="{{ member.data.name }}"/>
<a href="{{ member.data.url }}" rel="nofollow"><div style="background-image: url('/img/founding-member.png'" alt="Founding Member" class="founding"></div></a>
{% endif %}
</li>
{% else %}
<li class="silvermember">
{% endif %}
{% endfor %}
</ul>
{% endif %}
{% if (memberslist | hasMembersAtLevel("silver")) %}
<h2>Silver</h2>
<ul class="memberslist">
{% for member in memberslist %}
{% if member.data.level == "silver" and member.data.status != "suspended" %}
{% if member.data.founder == "yes" %}
<li class="silvermember">
{% if member.data.logo %}
<img src="{{ member.data.logo }}" alt="{{ member.data.name }}"/>
<a href="{{ member.data.url }}" rel="nofollow"><div style="background-image: url('/img/founding-member.png'" alt="Founding Member" class="founding"></div></a>
{% endif %}
</li>
{% else %}
<li class="silvermember">
{% if member.data.logo %}
<a href="{{ member.data.url }}" rel="nofollow"><img src="{{ member.data.logo }}" alt="{{ member.data.name }}"/></a>
{% endif %}
</li>
{% endif %}
{% endif %}
{% endfor %}
</ul>
{% endif %}
{% if (memberslist | hasMembersAtLevel("associate")) %}
<h2>Associate</h2>
<ul class="memberslist">
{% for member in memberslist %}
{% if member.data.level == "associate" and member.data.status != "suspended" %}
<li class="associatemember">
{% if member.data.logo %}
<a href="{{ member.data.url }}" rel="nofollow"><img src="{{ member.data.logo }}" alt="{{ member.data.name }}"/></a>
{% endif %}
</li>
{% endif %}
{% endif %}
{% endfor %}
</ul>
<h2>Associate</h2>
<ul class="memberslist">
{% for member in memberslist %}
{% if member.data.level == "associate" and member.data.status != "suspended" %}
<li class="associatemember">
{% if member.data.logo %}
<a href="{{ member.data.url }}" rel="nofollow"><img src="{{ member.data.logo }}" alt="{{ member.data.name }}"/></a>
{% endif %}
</li>
{% endif %}
{% endfor %}
</ul>
{% endif %}
{% endfor %}
</ul>
{% endif %}
10 changes: 5 additions & 5 deletions css/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ footer .container {
width: 20em;
display: inline-block;
margin: 0.5em;
}
}

.memberslist li.goldmember {
position: relative;
Expand Down Expand Up @@ -525,15 +525,15 @@ footer .container {
.silvermember img {
width: 10em;
}

.goldmember img {
width: 15em;
}

.platinummember img {
width: 20em;
}

.goldmember img {
width: 15em;
}

.donorslist {
text-align: center;
}
Expand Down
4 changes: 2 additions & 2 deletions events/rusttechx-summit-2024-bosch.md → events/new-event.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: RustTechX Summit 2024 BOSCH
title: 'RustTechX Summit 2024 BOSCH '
description: >-
RustTechX, is being organized by BOSCH, on November 28th at 3:30 PM IST (11:00
AM CET). This summit is an incredible opportunity for presenters to showcase
Expand All @@ -11,4 +11,4 @@ layout: layouts/event.njk
---
RustTechX, is being organized by BOSCH, on November 28th at 3:30 PM IST (11:00 AM CET) in Bangalore, India. This summit is an incredible opportunity for presenters to showcase their work on any Rust-related topic that can make a real impact.

Learn more and register here: https://hasgeek.com/rustbangalore/rusttechx-summit-2024-bosch/
Learn more and register here: [https://hasgeek.com/rustbangalore/rusttechx-summit-2024-bosch/]()
6 changes: 0 additions & 6 deletions members/shopify.md

This file was deleted.

0 comments on commit b61053d

Please sign in to comment.