Better abbreviation function, also add dsa images for themes

This commit is contained in:
mcbloch 2020-08-23 00:09:11 +02:00
parent 799f21f9c8
commit a0f6d06546
3 changed files with 4 additions and 4 deletions

View file

@ -1,7 +1,7 @@
<html>
<head>
<meta charset="UTF-8">
<title> Durf Doen! - <%= item[:titel] || item.identifier.without_ext.split('/').last %> </title>
<title> Durf Doen! - <%= item[:titel] || abbreviation(item) %> </title>
<link rel="stylesheet" href="/stylesheets/main.css">
<link rel="shortcut icon" href="/assets/favicon.png">

View file

@ -1,8 +1,8 @@
<h1> Themas </h1>
<ul>
<% for theme in themes %>
<%= "<img src=/assets/konventen/" ++ theme.tr(" ", "_") ++ ".png alt=" ++ theme %>
<li> <%= link_to(theme, "/thema/"++theme.tr(" ", "_")) %> </li>
<img src="https://dsa.ugent.be/verenigingen/details/<%= theme.tr(" ", "_") %>/logo?size=medium" alt="<%= theme %>">
<li> <%= link_to(theme, "/thema/"++theme.tr(" ", "_")) %> </li>
<% end %>
</ul>

View file

@ -20,6 +20,6 @@ module VerenigingenHelper
}}.to_a
end
def abbreviation(item)
item.identifier.without_ext.split('/')[2]
item.identifier.without_ext.split('/').last
end
end