Skip to content

Commit

Permalink
change sponsor location
Browse files Browse the repository at this point in the history
  • Loading branch information
Topvennie committed Apr 24, 2024
1 parent 1817f2d commit a2bc00b
Show file tree
Hide file tree
Showing 7 changed files with 140 additions and 7 deletions.
61 changes: 60 additions & 1 deletion content/index.erb
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
</a>
</span>
</div>
<% sorted_articles[0..3].each do |post| %>
<% sorted_articles[0..2].each do |post| %>
<%= render '/partials/_blog_preview.*', post: post %>
<%end%>
</div>
Expand All @@ -119,5 +119,64 @@
</div>
</div>
</div>
<!--Sponsors -->
<div class="tile is-parent">
<div id='sponsoring-members' class="tile is-child">
<div class="block has-text-centered">
<span class="title is-2-responsive underline--magical">
<a href="https://zeus.ugent.be/sponsors/members" style="color: black; text-decoration: none;">
Sponsoring members
</a>
</span>
</div>
<% if current_sponsoring_members.nil? %>
<div class="block has-text-centered">
<p>No sponsoring members yet for this academic year. Interested? Contact the board.</p>
</div>
<% else %>
<div class="columns is-centered is-multiline is-mobile">
<% current_sponsoring_members.shuffle.each do |member| %>
<div class='column is-2-desktop is-one-fifth-tablet is-one-third-mobile'>
<figure class="image is-squared">
<a href="https://zeus.ugent.be/sponsors/members/#<%= member[:nickname] %>">
<img class="is-rounded" src="<%= member[:photo] %>" alt="<%= member[:name] %>">
</a>
</figure>
</div>
<% end %>
</div>
<% end %>
</div>
</div>
<div class="tile is-parent">
<div id="sponsors" class="tile is-child">
<div class="block has-text-centered">
<span class="title is-2-responsive underline--magical">
<a href="https://zeus.ugent.be/sponsors/sponsors" style="color: black; text-decoration: none;">
Sponsors
</a>
</span>
</div>
<% if current_sponsors.nil? %>
<div class="block has-text-centered">
<p>No sponsors yet for this academic year. Interested? Contact the board.</p>
</div>
<% else %>
<div class="columns is-centered is-multiline is-mobile">
<% current_sponsors.shuffle.each do |sponsor| %>
<div class='column is-2-desktop is-one-fifth-tablet is-one-third-mobile'>
<figure class="image is-squared">
<a href="https://zeus.ugent.be/sponsors/sponsors/#<%= sponsor[:name] %>">
<img class="is-rounded" src="<%= sponsor[:photo] %>" alt="<%= sponsor[:name] %>">
</a>
</figure>
</div>
<% end %>
</div>
<% end %>
</div>
</div>
</div>
</div>

<!-- TODO: Change url -->
8 changes: 8 additions & 0 deletions content/sponsors.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
navigable: true
title: Sponsors
order: 35
narrow_page: true
---

<meta http-equiv="refresh" content="0; url=/sponsors/members">
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
---
narrow_page: true
subnavigation:
bar: about
identifier: sponsorende-leden
name: Sponsorende leden
order: 700
bar: sponsors
identifier: members
name: Sponsoring Members
order: 10
---

<h1 class='title is-1 has-text-centered'>Sponsorende leden</h1>
<h1 class='title is-1 has-text-centered'>Sponsoring members</h1>

<div id='sponsoring-members' class="content">
<% if current_sponsoring_members.nil? %>
Nog geen sponsorende leden voor dit academiejaar. Interesse? Contacteer het bestuur.
No sponsoring members yet for this academic year. Interested? Contact the board.
<% else %>
<% current_sponsoring_members.shuffle.each do |member| %>
<div id="<%= member[:nickname] %>" class="box sponsoring-member">
Expand Down
57 changes: 57 additions & 0 deletions content/sponsors/sponsors.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
narrow_page: true
subnavigation:
bar: sponsors
identifier: sponsors
name: Sponsors
order: 20
---

<h1 class='title is-1 has-text-centered'>Sponsors</h1>

<div id='sponsors' class="content">
<% if current_sponsors.nil? %>
No sponsors yet for this academic year. Interested? Contact the board.
<% else %>
<% current_sponsors.shuffle.each do |sponsor| %>
<div id="<%= sponsor[:name] %>" class="box sponsoring-member">
<article class="columns is-mobile">
<div class="column is-gapless is-narrow logo-wrapper">
<% if sponsor[:photo] %>
<img src="<%= sponsor[:photo] %>" alt="<%= sponsor[:name] %>">
<% else %>
<div class="logo-initial has-text-centered">
<%= sponsor[:name].chars.first %>
</div>
<% end %>
<div class="name"><%= sponsor[:name] %></div>
</div>
<div class="column">
<div>
<p class="description">
<%= to_HTML(sponsor[:description]) %>
</p>
</div>
<div class="links">
<% sponsor[:links].each do |link| %>
<% if link[:icon] %>
<a class="social-icon" href="<%= link[:url] %>" target="_blank">
<span class="icon">
<%= fa link[:icon], {:size => "2x"} %>
</span>
</a>
<% else %>
<a class="social-icon" href="<%= link[:url] %>" target="_blank">
<span class="icon">
<%= fa :globe, {:size => "2x"} %>
</span>
</a>
<% end %>
<% end %>
</div>
</div>
</article>
</div>
<% end %>
<% end %>
</div>
Empty file added data/sponsors.yaml
Empty file.
8 changes: 8 additions & 0 deletions lib/helpers/about.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ def current_sponsoring_members
sponsoring_members_of(@config[:sponsoring_members_year])
end

def sponsors_of(year)
data_from(:sponsors)[year]
end

def current_sponsors
sponsors_of(@config[:sponsors_year])
end

def all_bestuur
data_from(:bestuur).sort_by(&method(:academic_year_sort)).reverse.to_h
end
Expand Down
1 change: 1 addition & 0 deletions nanoc.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
title: Zeus WPI
academic_year: 23-24
sponsoring_members_year: 2023
sponsors_year: 2024
show_tags: false
# Needed for atom_feed
author_name: ""
Expand Down

0 comments on commit a2bc00b

Please sign in to comment.