From 217113d05fd65e68932103c08425643d7394d6e2 Mon Sep 17 00:00:00 2001 From: redfast00 Date: Tue, 15 Sep 2020 18:31:44 +0200 Subject: [PATCH] Fix rest of website --- content/assets/js/random_vereniging.js | 2 +- layouts/homepage.erb | 2 +- lib/helpers/verenigingen.rb | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/content/assets/js/random_vereniging.js b/content/assets/js/random_vereniging.js index 5aed751..99f7bc9 100644 --- a/content/assets/js/random_vereniging.js +++ b/content/assets/js/random_vereniging.js @@ -11,6 +11,6 @@ window.addEventListener('load', function() { let destination = document.getElementById("display_repo"); for (node of selected) { node.getElementsByTagName("img")[0].setAttribute("loading", "eager"); - destination.appendChild(node); + destination.prepend(node); } }); \ No newline at end of file diff --git a/layouts/homepage.erb b/layouts/homepage.erb index c98ca1e..891174d 100644 --- a/layouts/homepage.erb +++ b/layouts/homepage.erb @@ -53,7 +53,7 @@
>
-
logo van <%= item['naam'] %>
+
" alt="logo van <%= item['naam'] %>" height="100">

<%= item['naam'] %>

diff --git a/lib/helpers/verenigingen.rb b/lib/helpers/verenigingen.rb index ddb0137..0e87721 100644 --- a/lib/helpers/verenigingen.rb +++ b/lib/helpers/verenigingen.rb @@ -48,7 +48,8 @@ module VerenigingenHelper "themas" => x[:themas], "postcodes" => x[:postcodes].to_a, "id" => x[:id], - "path" => x.path + "path" => x.path, + "image_url" => image_url(x) } }.to_a end