|
|
|
@ -25,6 +25,8 @@ viewerView ({ attachments, attachment } as viewer) =
|
|
|
|
|
, onClickWithPreventAndStop event
|
|
|
|
|
]
|
|
|
|
|
[ text label ]
|
|
|
|
|
|
|
|
|
|
altText = Maybe.withDefault "No description. 😢" attachment.description
|
|
|
|
|
in
|
|
|
|
|
div
|
|
|
|
|
[ class "viewer"
|
|
|
|
@ -35,7 +37,10 @@ viewerView ({ attachments, attachment } as viewer) =
|
|
|
|
|
, navLink "❮" "prev" prev <| ViewerEvent NextAttachment
|
|
|
|
|
, case attachment.type_ of
|
|
|
|
|
"image" ->
|
|
|
|
|
img [ class "viewer-content", src attachment.url ] []
|
|
|
|
|
div [ class "viewer-content" ] [
|
|
|
|
|
img [ src attachment.url, alt altText, title altText ] [],
|
|
|
|
|
span [ class "alt-text" ] [ text altText ]
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
"audio" ->
|
|
|
|
|
audio
|
|
|
|
|