mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-12-05 00:57:59 +01:00
59 lines
1.8 KiB
Text
59 lines
1.8 KiB
Text
- link = assigns[:link] || ~p"/images/#{@image}"
|
|
|
|
= image_container @conn, @image, @size, fn ->
|
|
= cond do
|
|
- @image.duplicate_id ->
|
|
.media-box__overlay
|
|
strong Marked Duplicate
|
|
|
|
- @image.destroyed_content ->
|
|
.media-box__overlay
|
|
strong Destroyed Content
|
|
|
|
- @image.hidden_from_users ->
|
|
.media-box__overlay
|
|
strong Deleted:
|
|
=< @image.deletion_reason
|
|
|
|
- true ->
|
|
|
|
= case render_intent(@conn, @image, @size) do
|
|
- {:hidpi, small_url, medium_url, hover_text} ->
|
|
.media-box__overlay.js-spoiler-info-overlay
|
|
a href=link title=hover_text
|
|
picture
|
|
img src=small_url srcset="#{small_url} 1x, #{medium_url} 2x" alt=hover_text
|
|
|
|
- {:image, small_url, hover_text} ->
|
|
.media-box__overlay.js-spoiler-info-overlay
|
|
= if @image.image_mime_type == "video/webm" do
|
|
| WebM
|
|
|
|
a href=link title=hover_text
|
|
picture
|
|
img src=small_url alt=hover_text
|
|
|
|
- {:video, webm, mp4, hover_text} ->
|
|
.media-box__overlay.js-spoiler-info-overlay
|
|
a href=link title=hover_text
|
|
video alt=hover_text autoplay="autoplay" muted="muted" loop="loop" playsinline="playsinline"
|
|
source src=webm type="video/webm"
|
|
source src=mp4 type="video/mp4"
|
|
img alt=hover_text
|
|
|
|
- {:filtered_image, hover_text} ->
|
|
.media-box__overlay.js-spoiler-info-overlay
|
|
a href=link title=hover_text
|
|
picture
|
|
img alt=hover_text
|
|
|
|
- {:filtered_video, hover_text} ->
|
|
.media-box__overlay.js-spoiler-info-overlay
|
|
a href=link title=hover_text
|
|
video autoplay="autoplay" muted="muted" loop="loop" playsinline="playsinline"
|
|
img alt=hover_text
|
|
|
|
- :not_rendered ->
|
|
.media-box__overlay.js-spoiler-info-overlay
|
|
a href=link
|
|
' Thumbnails not yet generated
|