2019-08-18 20:14:36 +02:00
|
|
|
.block.block__header
|
|
|
|
.flex.flex--wrap.image-metabar.center--layout id="image_meta_#{@image.id}"
|
|
|
|
.stretched-mobile-links
|
2024-04-29 02:55:27 +02:00
|
|
|
a.js-prev href=~p"/images/#{@image}/navigate?#{[rel: "prev"] ++ scope(@conn)}" title="Previous Image (j)"
|
2019-08-18 20:14:36 +02:00
|
|
|
i.fa.fa-chevron-left
|
2024-04-29 02:55:27 +02:00
|
|
|
a.js-up href=~p"/images/#{@image}/navigate?#{[rel: "find"] ++ scope(@conn)}" title="Find this image in the global image list (i)"
|
2019-08-18 20:14:36 +02:00
|
|
|
i.fa.fa-chevron-up
|
2024-04-29 02:55:27 +02:00
|
|
|
a.js-next href=~p"/images/#{@image}/navigate?#{[rel: "next"] ++ scope(@conn)}" title="Next Image (k)"
|
2019-08-18 20:14:36 +02:00
|
|
|
i.fa.fa-chevron-right
|
2024-04-29 02:55:27 +02:00
|
|
|
a.js-rand href=~p"/images/random?#{scope(@conn)}" title="Random (r)"
|
2019-08-18 20:14:36 +02:00
|
|
|
i.fa.fa-random
|
|
|
|
.stretched-mobile-links
|
|
|
|
a.interaction--fave href="#" rel="nofollow" data-image-id=@image.id
|
|
|
|
span.favorites> title="Favorites" data-image-id=@image.id = @image.faves_count
|
|
|
|
span.fave-span title="Fave!"
|
|
|
|
i.fa.fa-star
|
|
|
|
a.interaction--upvote href="#" rel="nofollow" data-image-id=@image.id
|
2019-11-30 23:40:53 +01:00
|
|
|
= if show_vote_counts?(@conn.assigns.current_user) do
|
|
|
|
span.upvotes> title="Upvotes" data-image-id=@image.id = @image.upvotes_count
|
2019-08-18 20:14:36 +02:00
|
|
|
span.upvote-span title="Yay!"
|
|
|
|
i.fa.fa-arrow-up
|
|
|
|
span.score.block__header__title data-image-id=@image.id = @image.score
|
|
|
|
a.interaction--downvote href="#" rel="nofollow" data-image-id=@image.id
|
|
|
|
span.downvote-span title="Neigh!"
|
|
|
|
i.fa.fa-arrow-down
|
2019-11-30 23:40:53 +01:00
|
|
|
= if show_vote_counts?(@conn.assigns.current_user) do
|
|
|
|
span.downvotes< title="Downvotes" data-image-id=@image.id = @image.downvotes_count
|
2019-08-18 20:14:36 +02:00
|
|
|
a.interaction--comments href="#comments" title="Comments"
|
|
|
|
i.fa.fa-comments
|
|
|
|
span.comments_count< data-image-id=@image.id = @image.comments_count
|
|
|
|
a.interaction--hide href="#" rel="nofollow" data-image-id=@image.id
|
|
|
|
span.hide-span title="Hide"
|
|
|
|
i.fa.fa-eye-slash
|
|
|
|
.stretched-mobile-links
|
2019-11-17 18:50:42 +01:00
|
|
|
= render PhilomenaWeb.Image.SubscriptionView, "_subscription.html", watching: @watching, image: @image, conn: @conn
|
2020-05-01 20:09:57 +02:00
|
|
|
= render PhilomenaWeb.ImageView, "_add_to_gallery_dropdown.html", image: @image, user_galleries: @user_galleries, conn: @conn
|
2024-04-29 02:55:27 +02:00
|
|
|
a href=~p"/images/#{@image}/related" title="Related Images"
|
2019-12-21 00:07:02 +01:00
|
|
|
i.fa.fa-sitemap>
|
|
|
|
span.hide-limited-desktop.hide-mobile Related
|
2019-08-18 20:14:36 +02:00
|
|
|
.stretched-mobile-links
|
|
|
|
a href="#{pretty_url(@image, false, false)}" rel="nofollow" title="View (tags in filename)"
|
|
|
|
i.fa.fa-eye>
|
|
|
|
| View
|
|
|
|
a href="#{pretty_url(@image, true, false)}" rel="nofollow" title="View (no tags in filename)"
|
|
|
|
i.fa.fa-eye>
|
|
|
|
| VS
|
|
|
|
a href="#{pretty_url(@image, false, true)}" rel="nofollow" title="Download (tags in filename)"
|
|
|
|
i.fa.fa-download>
|
|
|
|
| Download
|
|
|
|
a href="#{pretty_url(@image, true, true)}" title="Download (no tags in filename)"
|
|
|
|
i.fa.fa-download>
|
|
|
|
| DS
|
|
|
|
.image-metabar.flex.flex--wrap.block__header--user-credit.center--layout#extrameta
|
|
|
|
div
|
2019-10-04 03:03:33 +02:00
|
|
|
' Uploaded
|
|
|
|
=> pretty_time(@image.created_at)
|
2019-12-17 19:53:41 +01:00
|
|
|
= render PhilomenaWeb.ImageView, "_uploader.html", assigns
|
|
|
|
|
2019-08-18 20:14:36 +02:00
|
|
|
span.image-size
|
|
|
|
|
|
|
|
|
= @image.image_width
|
|
|
|
| x
|
|
|
|
= @image.image_height
|
2020-07-06 20:00:02 +02:00
|
|
|
|
|
|
|
= if not is_nil(@image.image_duration) and @image.image_is_animated and @image.image_duration > 0 do
|
2020-09-16 19:50:19 +02:00
|
|
|
span.image-size title=@image.image_duration
|
2020-07-06 20:00:02 +02:00
|
|
|
|
|
2020-09-16 19:50:19 +02:00
|
|
|
- dur = trunc(@image.image_duration)
|
|
|
|
- ms = trunc((@image.image_duration - dur)*100)
|
|
|
|
- {mm, ss} = {div(dur, 60), rem(dur, 60)}
|
|
|
|
= :io_lib.format("~2..0B:~2..0B.~2..0B", [mm, ss, ms])
|
2020-07-06 20:00:02 +02:00
|
|
|
|
2019-12-09 00:17:12 +01:00
|
|
|
=<> String.upcase(to_string(@image.image_format))
|
2020-07-06 14:56:23 +02:00
|
|
|
- size_kb = div(@image.image_size, 1000)
|
|
|
|
- size_mb = Float.round(size_kb / 1000.0, 2)
|
2019-08-18 20:14:36 +02:00
|
|
|
span title="#{size_kb} kB"
|
2020-07-06 14:56:23 +02:00
|
|
|
= if size_kb <= 1000 do
|
2019-08-18 20:14:36 +02:00
|
|
|
=> size_kb
|
|
|
|
| kB
|
|
|
|
- else
|
|
|
|
=> size_mb
|
|
|
|
| MB
|