Skip to content

Commit

Permalink
A few more static asset URL reference fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jerodsanto committed Sep 1, 2023
1 parent c333239 commit d0c850e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
9 changes: 9 additions & 0 deletions assets/app/components/playbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,12 @@
background-image: url("../images/icons/icon-pause.svg");
background-size: 11px 20px !important;
}
.playbar_discuss {
background-image: url("../images/icons/icon-chat.svg");
}
.playbar_subscribe {
background-image: url("../images/icons/icon-subscribe.svg");
}
.playbar_share {
background-image: url("../images/icons/icon-share.svg");
}
3 changes: 2 additions & 1 deletion lib/changelog_web/meta/image.ex
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ defmodule ChangelogWeb.Meta.Image do
use ChangelogWeb, :verified_routes

alias ChangelogWeb.{
Endpoint,
Meta,
NewsItemView,
NewsSourceView,
Expand Down Expand Up @@ -72,7 +73,7 @@ defmodule ChangelogWeb.Meta.Image do
defp podcasts_image, do: static_image(~w[images share all-podcasts.png])
defp post_image(post), do: PostView.image_url(post, :large)
defp source_image(source), do: NewsSourceView.icon_url(source, :large)
defp static_image(parts), do: url(~p"/#{parts}")
defp static_image(parts), do: static_url(Endpoint, ~p"/#{parts}")
defp topic_image(topic), do: TopicView.icon_url(topic, :large)

defp summary_image, do: static_image(~w[images share twitter-sidewide-summary.png])
Expand Down
11 changes: 4 additions & 7 deletions lib/changelog_web/templates/episode/_play_bar.html.eex
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,19 @@
<%= link("Discuss",
title: "Discuss this Episode",
to: Routes.news_item_path(@conn, :show, NewsItem.slug(@item)),
class: "toolbar_item toolbar_item--button",
style: "background-image: url('#{~p"/images/icons/icon-chat.svg"}')") %>
class: "toolbar_item toolbar_item--button playbar_discuss") %>
<% end %>

<%= link("Subscribe",
title: "Subscribe to Podcast",
to: {:javascript, "void(0);"},
class: "toolbar_item toolbar_item--button has-tooltip",
style: "background-image: url('#{~p"/images/icons/icon-subscribe.svg"}')") %>
class: "toolbar_item toolbar_item--button has-tooltip playbar_subscribe") %>
<%= render(PodcastView, "_subscribe_tooltip.html", conn: @conn, podcast: @episode.podcast) %>

<%= link("Share",
title: "Share this Episode",
to: {:javascript, "void(0);"},
class: "toolbar_item toolbar_item--button",
data: [share: Routes.episode_path(@conn, :share, @episode.podcast.slug, @episode.slug)],
style: "background-image: url('#{~p"/images/icons/icon-share.svg"}')") %>
class: "toolbar_item toolbar_item--button playbar_share",
data: [share: Routes.episode_path(@conn, :share, @episode.podcast.slug, @episode.slug)]) %>
</div>
</div>

0 comments on commit d0c850e

Please sign in to comment.