Skip to content

Commit

Permalink
fix home page safari bug
Browse files Browse the repository at this point in the history
  • Loading branch information
adrienpoly committed Sep 15, 2024
1 parent 4c7c8c3 commit 1bc0ade
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
6 changes: 3 additions & 3 deletions app/views/page/home.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<h2 class="text-primary shrink-0">Latest talks</h2>
<%= link_to "see all talks", talks_path, class: "link text-right w-full" %>
</div>
<div class="grid min-w-full grid-cols-1 gap-8 sm:grid-cols-2 md:grid-cols-3 md:[&>:nth-child(4)]:hidden lg:grid-cols-4 lg:[&>:nth-child(4)]:block gallery">
<div class="grid min-w-full grid-cols-1 gap-8 sm:grid-cols-2 md:grid-cols-3 md:[&>:nth-child(4)]:hidden lg:grid-cols-4 lg:[&>:nth-child(4)]:block">
<%= render partial: "talks/card", collection: @latest_talks, as: :talk, cached: true %>
</div>
</section>
Expand All @@ -25,7 +25,7 @@
<h2 class="text-primary shrink-0">Active speakers</h2>
<%= link_to "see all speakers", speakers_path, class: "link text-right w-full" %>
</div>
<div class="grid min-w-full grid-cols-1 gap-8 sm:grid-cols-2 md:grid-cols-3 md:[&>:nth-child(4)]:hidden lg:grid-cols-4 lg:[&>:nth-child(4)]:block gallery">
<div class="grid min-w-full grid-cols-1 gap-8 sm:grid-cols-2 md:grid-cols-3 md:[&>:nth-child(4)]:hidden lg:grid-cols-4 lg:[&>:nth-child(4)]:block">
<%= render partial: "speakers/card", collection: @active_speakers, as: :speaker %>
</div>
</section>
Expand All @@ -35,7 +35,7 @@
<h2 class="text-primary shrink-0">Latest events</h2>
<%= link_to "see all events", events_path, class: "link text-right w-full" %>
</div>
<div class="grid min-w-full grid-cols-1 gap-8 sm:grid-cols-2 md:grid-cols-3 md:[&>:nth-child(4)]:hidden lg:grid-cols-4 lg:[&>:nth-child(4)]:block gallery">
<div class="grid min-w-full grid-cols-1 gap-8 sm:grid-cols-2 md:grid-cols-3 md:[&>:nth-child(4)]:hidden lg:grid-cols-4 lg:[&>:nth-child(4)]:block">
<%= render partial: "events/card", collection: @latest_events, as: :event %>
</div>
</section>
Expand Down
8 changes: 1 addition & 7 deletions app/views/talks/_card.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<%# locals: (talk:, user_favorite_talks_ids: [], favoritable: false, back_to: nil, back_to_title: nil) -%>

<div class="card card-compact bg-white shadow-xl h-full w-full relative" id="<%= dom_id talk %>" style="<%= "view-transition-name: #{dom_id(talk, :talk_card)}" %>">
<div class="card card-compact bg-white shadow-xl w-full" id="<%= dom_id talk %>" style="<%= "view-transition-name: #{dom_id(talk, :talk_card)}" %>">
<%= link_to talk_path(talk, back_to: back_to, back_to_title: back_to_title), class: "flex aspect-video overflow-hidden" do %>
<%= image_tag talk.thumbnail_sm,
srcset: ["#{talk.thumbnail_lg} 2x"],
Expand All @@ -14,12 +14,6 @@
<% end %>
<div class="card-body flex flex-row justify-between items-start gap-2">
<div class="flex flex-col items-start h-full justify-between gap-2 w-full">
<%# if talk.speakers.last&.github&.present? && local_assigns.fetch(:picture_profile, true) %>
<%#= image_tag talk.speakers.last.github_avatar_url(size: 64),
class: "rounded-full w-8 h-8 mr-2 mt-1",
alt: "GitHub picture profile of #{talk.speakers.last.github}",
loading: :lazy %>
<%# end %>
<div class="flex items-start justify-between gap-2 w-full">
<%= link_to talk_path(talk, back_to: back_to, back_to_title: back_to_title) do %>
<%= content_tag :h2, talk.title, class: "text-sm font-sans font-medium" %>
Expand Down

0 comments on commit 1bc0ade

Please sign in to comment.