philomena/lib/philomena_web/templates/channel/_channel_box.html.slime

40 lines
1.6 KiB
Text
Raw Permalink Normal View History

2019-11-30 07:30:45 +01:00
- link_class = "media-box__header media-box__header--channel media-box__header--link"
.media-box
2024-06-06 22:28:35 +02:00
a.media-box__header.media-box__header--channel.media-box__header--link href=~p"/channels/#{@channel}" title=@channel.title
2019-11-30 07:30:45 +01:00
= @channel.title || @channel.short_name
.media-box__header.media-box__header--channel
= if @channel.is_live do
2023-11-23 17:07:49 +01:00
.spacing--right.label.label--success.label--block.label--small: strong LIVE NOW
2019-11-30 07:30:45 +01:00
=> @channel.viewers
=> pluralize "viewer", "viewers", @channel.viewers
- else
.label.label--danger.label--block.label--small: strong OFF AIR
= if @channel.nsfw do
.media-box__overlay
| NSFW
.media-box__content.media-box__content--channel
2024-06-06 22:28:35 +02:00
a href=~p"/channels/#{@channel}"
2019-11-30 07:30:45 +01:00
.image-constrained.media-box__content--channel
img src=channel_image(@channel) alt="#{@channel.title}"
= if @channel.associated_artist_tag do
2024-06-06 22:28:35 +02:00
a href=~p"/tags/#{@channel.associated_artist_tag}" class=link_class
2024-05-20 22:30:41 +02:00
i.fa.icon--padded.small.fa-tags>
2019-11-30 07:30:45 +01:00
= @channel.associated_artist_tag.name
- else
.media-box__header.media-box__header--channel No artist tag
2019-12-18 18:01:33 +01:00
= if can?(@conn, :edit, @channel) do
2024-06-06 22:28:35 +02:00
a href=~p"/channels/#{@channel}/edit" class=link_class
2024-05-20 22:30:41 +02:00
i.fas.icon--padded.small.fa-edit>
2019-12-18 18:01:33 +01:00
' Edit
2024-06-06 22:28:35 +02:00
a href=~p"/channels/#{@channel}" class=link_class data-method="delete" data-confirm="Are you really, really sure?"
2024-05-20 22:30:41 +02:00
i.fas.icon--padded.small.fa-trash>
' Delete
2019-12-18 18:01:33 +01:00
2019-12-05 05:27:40 +01:00
= render PhilomenaWeb.Channel.SubscriptionView, "_subscription.html", conn: @conn, watching: @subscriptions[@channel.id], channel: @channel