From d842d397a46d0e0388a65b3a46a183b991edf333 Mon Sep 17 00:00:00 2001 From: Adrien Poly Date: Fri, 8 Aug 2025 09:52:05 +0200 Subject: [PATCH 1/2] style a bit the stamp --- app/views/shared/_stickers_display.html.erb | 42 ++++++++++++++++----- 1 file changed, 32 insertions(+), 10 deletions(-) diff --git a/app/views/shared/_stickers_display.html.erb b/app/views/shared/_stickers_display.html.erb index 43d753562..dc27d14a1 100644 --- a/app/views/shared/_stickers_display.html.erb +++ b/app/views/shared/_stickers_display.html.erb @@ -1,14 +1,36 @@ -
-
-
-
-
- <% events.shuffle.each do |event| %> - <%= link_to event, class: "max-w-[10vw]", style: "transform: rotate(#{(-20...20).to_a.sample}deg) translateY(#{(0...10).to_a.sample}vw) translateX(#{(0...10).to_a.sample}vh) scale(#{100 + (-10...10).to_a.sample}%)" do %> - <%= image_tag event.sticker_image_path, class: "transition transition-transform hover:scale-105" %> +
+
+ +
+

+ <%= events.count %> STAMPS COLLECTED +

+
+ + +
+
+ <% events.each_with_index do |event, index| %> +
+ <%= link_to event, class: "block h-full w-full" do %> +
+
+ <%= image_tag event.sticker_image_path, class: "w-4/5 h-4/5 object-contain", style: "transform: rotate(#{(-10..10).to_a.sample}deg)" %> +
+
<% end %> - <% end %> -
+
+ <% end %> + + + <% (9 - events.count).times do %> +
+
+
+
+
+
+ <% end %>
From e4f5062ffc23e4180abec0153b41ee90e28df2b1 Mon Sep 17 00:00:00 2001 From: Adrien Poly Date: Fri, 8 Aug 2025 09:54:02 +0200 Subject: [PATCH 2/2] remove grey background for empty slot --- app/views/shared/_stickers_display.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/shared/_stickers_display.html.erb b/app/views/shared/_stickers_display.html.erb index dc27d14a1..dcf699e61 100644 --- a/app/views/shared/_stickers_display.html.erb +++ b/app/views/shared/_stickers_display.html.erb @@ -26,7 +26,7 @@ <% (9 - events.count).times do %>
-
+