From cb285c2f1eced18c60626d670b00513e3ea37b5b Mon Sep 17 00:00:00 2001 From: mcbloch Date: Sat, 29 Aug 2020 16:01:18 +0200 Subject: [PATCH 1/3] Fix image function --- lib/helpers/verenigingen.rb | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/lib/helpers/verenigingen.rb b/lib/helpers/verenigingen.rb index 63f8608..3fef67a 100644 --- a/lib/helpers/verenigingen.rb +++ b/lib/helpers/verenigingen.rb @@ -51,17 +51,15 @@ module VerenigingenHelper else item[:image] end - def abbreviation(item) - item.identifier.without_ext.split('/').last - end - def verenigingen_random(amount) - @items.find_all("**/verenigingen/*").map{|x| { - "titel" => x[:titel], - "naam" => x[:naam], - "konvent" => x[:konvent], - "themas" => x[:themas] - }}.to_a.shuffle[0..amount] - end + end + + def verenigingen_random(amount) + @items.find_all("**/verenigingen/*").map { |x| { + "titel" => x[:titel], + "naam" => x[:naam], + "konvent" => x[:konvent], + "themas" => x[:themas] + } }.to_a.shuffle[0..amount] end def image_tag(item) From 4945b78af58ef72358c21bb55d8d8275735de2cd Mon Sep 17 00:00:00 2001 From: mcbloch Date: Sat, 29 Aug 2020 16:02:38 +0200 Subject: [PATCH 2/3] Use image_tag function in 'ontdek verenigingen' page --- layouts/verenigingen.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/verenigingen.erb b/layouts/verenigingen.erb index 7664996..2663da1 100644 --- a/layouts/verenigingen.erb +++ b/layouts/verenigingen.erb @@ -3,7 +3,7 @@

Thema's

@@ -12,7 +12,7 @@

Konventen en projecten

From 71c33dc92a4e0422a6f07bdc6cbcc4f3892c775b Mon Sep 17 00:00:00 2001 From: mcbloch Date: Sat, 29 Aug 2020 16:04:59 +0200 Subject: [PATCH 3/3] Fix image_tag alt --- lib/helpers/verenigingen.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/helpers/verenigingen.rb b/lib/helpers/verenigingen.rb index 3fef67a..72db7e0 100644 --- a/lib/helpers/verenigingen.rb +++ b/lib/helpers/verenigingen.rb @@ -63,6 +63,6 @@ module VerenigingenHelper end def image_tag(item) - "#{ item[:name] } logo" + "#{ item[:naam] } logo" end end