render verenigingen projecten and konventen with the same detail layout
This commit is contained in:
parent
6b1a9ee9a7
commit
08961fa62a
5 changed files with 14 additions and 24 deletions
12
Rules
12
Rules
|
@ -14,17 +14,9 @@ preprocess do
|
|||
end
|
||||
end
|
||||
|
||||
compile '/{verenigingen,projecten}/*.md' do
|
||||
compile '/{verenigingen,projecten,konventen}/*.md' do
|
||||
filter :kramdown
|
||||
layout '/vereniging.*'
|
||||
layout '/default.*'
|
||||
layout '/base.*'
|
||||
write ext: 'html'
|
||||
end
|
||||
|
||||
compile '/konventen/*.md' do
|
||||
filter :kramdown
|
||||
layout '/konvent.*'
|
||||
layout '/detail.*'
|
||||
layout '/default.*'
|
||||
layout '/base.*'
|
||||
write ext: 'html'
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
<h1> <%= item[:naam] %> </h1>
|
||||
<div class="details-container details-logo">
|
||||
<img src="https://dsa.ugent.be/api/verenigingen/<%= abbreviation(item) %>/logo?size=huge" alt="<%= item[:naam] %>">
|
||||
</div>
|
||||
|
@ -52,3 +53,10 @@
|
|||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% if item.path.include? "konventen" %>
|
||||
<% for vereniging in verenigingen_voor_konvent(item[:id]) %>
|
||||
<div>
|
||||
<%= vereniging[:naam] %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
|
@ -1,7 +0,0 @@
|
|||
<h1> <%= item[:naam] %> </h1>
|
||||
<div class="details-wrapper">
|
||||
<div class="details-container details-text">
|
||||
<%= yield %>
|
||||
</div>
|
||||
<%= render '/partials/detail.*' %>
|
||||
</div>
|
|
@ -1,7 +0,0 @@
|
|||
<h1> <%= item[:naam] %> </h1>
|
||||
<div class="details-wrapper">
|
||||
<div class="details-container details-text">
|
||||
<%= yield %>
|
||||
</div>
|
||||
<%= render '/partials/detail.*' %>
|
||||
</div>
|
|
@ -20,6 +20,10 @@ module VerenigingenHelper
|
|||
@items.filter{|i| i[:themas] and i[:themas].include?(thema)}.to_a
|
||||
end
|
||||
|
||||
def verenigingen_voor_konvent(konvent)
|
||||
@items.find_all("**/verenigingen/*").filter { |i| i[:konvent] == konvent }.to_a
|
||||
end
|
||||
|
||||
def konventen
|
||||
@items.find_all("**/konventen/*").to_a
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue