backend: rename /view -> /media
This commit is contained in:
parent
b09a5e7fe1
commit
c55bdd6ea7
@ -75,7 +75,7 @@ get "/" => sub {
|
|||||||
my @media = map +{
|
my @media = map +{
|
||||||
# XXX point to a cache
|
# XXX point to a cache
|
||||||
image_src => "$POORBOORU_API/download/$_",
|
image_src => "$POORBOORU_API/download/$_",
|
||||||
view_uri => uri_for("/view/$_"),
|
media_uri => uri_for("/media/$_"),
|
||||||
}, @{$data->{media}};
|
}, @{$data->{media}};
|
||||||
|
|
||||||
template "gallery" => {
|
template "gallery" => {
|
||||||
@ -119,7 +119,7 @@ get "/tag/:tag_id_or_name" => sub {
|
|||||||
my @media = map +{
|
my @media = map +{
|
||||||
# XXX point to a cache
|
# XXX point to a cache
|
||||||
image_src => "$POORBOORU_API/download/$_",
|
image_src => "$POORBOORU_API/download/$_",
|
||||||
view_uri => uri_for("/view/$_"),
|
media_uri => uri_for("/media/$_"),
|
||||||
}, @{$data->{media}};
|
}, @{$data->{media}};
|
||||||
|
|
||||||
template "gallery" => {
|
template "gallery" => {
|
||||||
@ -129,7 +129,7 @@ get "/tag/:tag_id_or_name" => sub {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
get "/view/:media_id" => sub {
|
get "/media/:media_id" => sub {
|
||||||
my $media_id = route_parameters->get("media_id");
|
my $media_id = route_parameters->get("media_id");
|
||||||
|
|
||||||
my $res = api_get("/media/$media_id");
|
my $res = api_get("/media/$media_id");
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<div class="flex-c-horizontal flex-c-wrap gallery">
|
<div class="flex-c-horizontal flex-c-wrap gallery">
|
||||||
[% FOREACH entry IN media -%]
|
[% FOREACH entry IN media -%]
|
||||||
<a href="[% entry.view_uri %]">
|
<a href="[% entry.media_uri %]">
|
||||||
<img class="gallery-image" src="[% entry.image_src %]" />
|
<img class="gallery-image" src="[% entry.image_src %]" />
|
||||||
</a>
|
</a>
|
||||||
[% END -%]
|
[% END -%]
|
||||||
|
Loading…
Reference in New Issue
Block a user