Skip to content

Commit fe4e588

Browse files
authored
Small adjustments (#550)
* Change from using helper to event decorator instead * Change margin at top of event card above title * Fix bookmark on event to not try and bookmark the decorator * Change margin on resource_card above the title
1 parent bd67682 commit fe4e588

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

app/views/events/_card.html.erb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,20 @@
1717
<div class="flex-shrink-0 w-32 h-24 rounded overflow-hidden bg-gray-100 relative">
1818
<%= link_to event_path(event), class: "block w-full h-full" do %>
1919
<div class="absolute inset-0 flex items-center justify-center text-gray-400 text-4xl fallback-icon"
20-
style="<%= main_image_url(event).present? ? 'display:none;' : 'display:flex;' %>">
20+
style="<%= event.main_image_url.present? ? 'display:none;' : 'display:flex;' %>">
2121
<i class="fa-regular fa-image"></i>
2222
</div>
2323

24-
<% if main_image_url(event).present? %>
25-
<img src="<%= main_image_url(event) %>"
24+
<% if event.main_image_url.present? %>
25+
<img src="<%= event.main_image_url %>"
2626
class="object-cover w-full h-full"
2727
onerror="this.style.display='none'; this.previousElementSibling.style.display='flex';">
2828
<% end %>
2929
<% end %>
3030
</div>
3131

3232
<!-- Title + badges -->
33-
<div class="flex flex-col gap-2 flex-1 min-w-0 mr-4">
33+
<div class="flex flex-col gap-2 flex-1 min-w-0 mr-4 mt-1">
3434
<%= link_to event_path(event),
3535
class: "hover:underline block leading-tight",
3636
data: { turbo: false } do %>

app/views/events/show.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<% end %>
1515

1616
<span class="inline-block">
17-
<%= render "bookmarks/editable_bookmark_button", resource: @event %>
17+
<%= render "bookmarks/editable_bookmark_button", resource: @event.object %>
1818
</span>
1919
</div>
2020

app/views/resources/_resource_card.html.erb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@
4545

4646
<!-- RIGHT SIDE -->
4747
<div class="flex-1 min-w-0 pl-4 pr-10 pb-12 mt-2 relative">
48-
49-
<div class="my-2">
48+
<div class="mt-3 mb-2">
5049
<%= link_to resource_path(resource.object),
5150
class: "inline-flex min-w-0 max-w-full text-lg font-semibold
5251
text-gray-900 leading-tight hover:underline" do %>

0 commit comments

Comments
 (0)