Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions app/views/events/_card.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,20 @@
<div class="flex-shrink-0 w-32 h-24 rounded overflow-hidden bg-gray-100 relative">
<%= link_to event_path(event), class: "block w-full h-full" do %>
<div class="absolute inset-0 flex items-center justify-center text-gray-400 text-4xl fallback-icon"
style="<%= main_image_url(event).present? ? 'display:none;' : 'display:flex;' %>">
style="<%= event.main_image_url.present? ? 'display:none;' : 'display:flex;' %>">
<i class="fa-regular fa-image"></i>
</div>

<% if main_image_url(event).present? %>
<img src="<%= main_image_url(event) %>"
<% if event.main_image_url.present? %>
<img src="<%= event.main_image_url %>"
class="object-cover w-full h-full"
onerror="this.style.display='none'; this.previousElementSibling.style.display='flex';">
<% end %>
<% end %>
</div>

<!-- Title + badges -->
<div class="flex flex-col gap-2 flex-1 min-w-0 mr-4">
<div class="flex flex-col gap-2 flex-1 min-w-0 mr-4 mt-1">
<%= link_to event_path(event),
class: "hover:underline block leading-tight",
data: { turbo: false } do %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/events/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<% end %>

<span class="inline-block">
<%= render "bookmarks/editable_bookmark_button", resource: @event %>
<%= render "bookmarks/editable_bookmark_button", resource: @event.object %>
</span>
</div>

Expand Down
3 changes: 1 addition & 2 deletions app/views/resources/_resource_card.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@

<!-- RIGHT SIDE -->
<div class="flex-1 min-w-0 pl-4 pr-10 pb-12 mt-2 relative">

<div class="my-2">
<div class="mt-3 mb-2">
<%= link_to resource_path(resource.object),
class: "inline-flex min-w-0 max-w-full text-lg font-semibold
text-gray-900 leading-tight hover:underline" do %>
Expand Down