mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-02-01 03:46:44 +01:00
allow changing the link
This commit is contained in:
parent
cd48d948cb
commit
bc82e368a5
2 changed files with 7 additions and 4 deletions
|
@ -1,10 +1,11 @@
|
||||||
|
- link = Routes.gallery_path(@conn, :show, @gallery)
|
||||||
|
|
||||||
.media-box
|
.media-box
|
||||||
a.media-box__header.media-box__header--link href=Routes.gallery_path(@conn, :show, @gallery) title=@gallery.title
|
a.media-box__header.media-box__header--link href=link title=@gallery.title
|
||||||
= @gallery.title
|
= @gallery.title
|
||||||
|
|
||||||
.media-box__overlay
|
.media-box__overlay
|
||||||
= @gallery.spoiler_warning
|
= @gallery.spoiler_warning
|
||||||
|
|
||||||
.media-box__content.media-box__content--large
|
.media-box__content.media-box__content--large
|
||||||
a href=Routes.gallery_path(@conn, :show, @gallery)
|
= render PhilomenaWeb.ImageView, "_image_container.html", image: @gallery.thumbnail, size: :thumb, conn: @conn, link: link
|
||||||
= render PhilomenaWeb.ImageView, "_image_container.html", image: @gallery.thumbnail, size: :thumb, conn: @conn
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
- link = assigns[:link] || Routes.image_path(@conn, :show, @image)
|
||||||
|
|
||||||
= image_container @image, @size, fn ->
|
= image_container @image, @size, fn ->
|
||||||
= cond do
|
= cond do
|
||||||
- @image.duplicate_id ->
|
- @image.duplicate_id ->
|
||||||
|
@ -13,7 +15,7 @@
|
||||||
- true ->
|
- true ->
|
||||||
|
|
||||||
.media-box__overlay.js-spoiler-info-overlay
|
.media-box__overlay.js-spoiler-info-overlay
|
||||||
a href="/#{@image.id}"
|
a href=link
|
||||||
= if @image.thumbnails_generated do
|
= if @image.thumbnails_generated do
|
||||||
- uris = thumb_urls(@image, false)
|
- uris = thumb_urls(@image, false)
|
||||||
- vid = @image.image_mime_type == "video/webm"
|
- vid = @image.image_mime_type == "video/webm"
|
||||||
|
|
Loading…
Reference in a new issue