Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make titles clickable #621

Merged
merged 3 commits into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 25 additions & 5 deletions content/index.erb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@
<div class="tile is-parent">
<div class="tile is-child">
<div class="block has-text-centered">
<span class="title is-2-responsive underline--magical">Upcoming Events</span>
<span class="title is-2-responsive underline--magical">
<a href="https://zeus.ugent.be/events/<%= current_academic_year %>" style="color: black; text-decoration: none;">
Upcoming Events
</a>
</span>
</div>
<% unless upcoming_events.empty? %>
<% upcoming_events.each do |event| %>
Expand All @@ -41,7 +45,11 @@
<div class="tile is-parent">
<div class="tile is-child">
<div class="block has-text-centered">
<span class="title is-2-responsive underline--magical">Top Coders</span>
<span class="title is-2-responsive underline--magical">
<a href="https://gamification.zeus.gent" style="color: black; text-decoration: none;">
Top Coders
</a>
</span>
</div>
<div class="box gamification-tile">
<div class="content">
Expand All @@ -60,7 +68,11 @@


<div class="block has-text-centered">
<span class="title is-2-responsive underline--magical">Previous Events</span>
<span class="title is-2-responsive underline--magical">
<a href="https://zeus.ugent.be/events/<%= current_academic_year %>" style="color: black; text-decoration: none;">
Previous Events
</a>
</span>
</div>
<% previous_events[0..3].each do |event| %>
<div class="block">
Expand All @@ -72,7 +84,11 @@
<div class="tile is-parent">
<div class="tile is-child">
<div class='content has-text-centered box'>
<h2>About Zeus WPI</h2>
<h2>
<a href="https://zeus.ugent.be/about/about/" style="color: black; text-decoration: none;">
About Zeus WPI
</a>
</h2>
<p>
Zeus WPI is the student association for Computer Science at Ghent University. Our goal is to provide a stimulating environment for motivated students looking to expand their skills by engaging in interesting real-world projects.
</p>
Expand All @@ -82,7 +98,11 @@
</p>
</div>
<div class="block has-text-centered">
<span class="title is-2-responsive underline--magical">Blogposts</span>
<span class="title is-2-responsive underline--magical">
<a href="https://zeus.ugent.be/blog/<%= current_academic_year %>" style="color: black; text-decoration: none;">
Blogpost
</a>
</span>
</div>
<% sorted_articles[0..3].each do |post| %>
<%= render '/partials/_blog_preview.*', post: post %>
Expand Down
8 changes: 8 additions & 0 deletions lib/helpers/time.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,12 @@ def timehelper(ranges)
def periodhelper(startdate, enddate)
$tz.now.between?(startdate, enddate)
end

def current_academic_year
year = Time.now.year
month = Time.now.month
start_year = month < 9 ? year - 1 : year
"#{start_year % 100}-#{(start_year + 1) % 100}"
end

end
Loading