Skip to content

Commit

Permalink
added img helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
krillan49 committed Jan 18, 2025
1 parent d17cb26 commit 0bca176
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions app/views/home/_list.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
<% if Podcast.any? %>
<div class="card-group">
<div class="card">
<img src="https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/9abc28136491393.61fa8bcfee8ce.png" class="card-img-top" alt="...">
<% if @last_podcast.photo.attached? %>
<%= image_tag @last_podcast.photo, class: "card-img-top", alt: "last podcast" %>
<% else %>
<img src="https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/9abc28136491393.61fa8bcfee8ce.png" class="card-img-top" alt="...">
<% end %>
<div class="card-body">
<h5 class="card-title">
<%= link_to @last_podcast.title, @last_podcast,
Expand All @@ -15,7 +19,11 @@
</div>
</div>
<div class="card" id="random_podcast">
<img src="https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/c4c965136491393.6336af6811b4b.jpg" class="card-img-top" alt="...">
<% if @random_podcast.photo.attached? %>
<%= image_tag @random_podcast.photo, class: "card-img-top", alt: "random podcast" %>
<% else %>
<img src="https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/c4c965136491393.6336af6811b4b.jpg" class="card-img-top" alt="...">
<% end %>
<div class="card-body">
<h5 class="card-title">
<%= link_to @random_podcast.title, @random_podcast,
Expand Down

0 comments on commit 0bca176

Please sign in to comment.