From 6fdbbf2faba43e4891d790edcd3b81d432ad5b25 Mon Sep 17 00:00:00 2001 From: Dean Lofts Date: Mon, 18 Sep 2023 00:11:48 +1000 Subject: [PATCH] add pinned links --- app/views/home/index.html.erb | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/app/views/home/index.html.erb b/app/views/home/index.html.erb index dd67e29..2f6e935 100644 --- a/app/views/home/index.html.erb +++ b/app/views/home/index.html.erb @@ -6,7 +6,9 @@
<% if @user %>
- <%= image_tag 'banner.png', alt: 'User Banner', class: 'img-fluid mb-4 rounded', style: 'width: 35%;' %> + <%= image_tag 'banner.png', alt: 'User Banner', class: 'img-fluid mb-4 rounded', style: 'width: 20%;' %> + +
@@ -15,19 +17,31 @@
+ + +
+ <% @links.each do |link| %> + <% if link.links_enabled && !link.public && link.links_pinned %> + + + + <% end %> + <% end %> +
+ +
<% @links.each_with_index do |link, index| %> - <% if link.links_enabled && !link.public %> + <% if link.links_enabled && !link.public && !link.links_pinned %> @@ -35,7 +49,7 @@ <% if (index + 1) % 4 == 0 %>
<% end %> - <% end %> + <% end %>