diff options
author | Yorhel <git@yorhel.nl> | 2021-12-12 11:04:11 +0100 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2021-12-12 11:04:15 +0100 |
commit | a267984143315dbae21bcb90c3670be100dc3c2a (patch) | |
tree | eefbb7ae6482dba887954d5cfefa82790632b740 | |
parent | a6383ccdbf640436114f238d10fe68315efece1a (diff) |
VN::Page: Add next/prev buttons to screenshot image viewer in revisions
https://vndb.org/t950.1118
-rw-r--r-- | lib/VNWeb/VN/Page.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/VNWeb/VN/Page.pm b/lib/VNWeb/VN/Page.pm index d0efad1d..92bc3bac 100644 --- a/lib/VNWeb/VN/Page.pm +++ b/lib/VNWeb/VN/Page.pm @@ -112,11 +112,12 @@ sub rev_ { }], [ anime => 'Anime', fmt => sub { a_ href => "https://anidb.net/anime/$_->{aid}", "a$_->{aid}" }], [ screenshots => 'Screenshots', fmt => sub { + my $rev = $_[0]{chid} == $v->{chid} ? 'new' : 'old'; txt_ '['; a_ href => "/$_->{rid}", $_->{rid} if $_->{rid}; txt_ 'no release' if !$_->{rid}; txt_ '] '; - a_ href => imgurl($_->{scr}{id}), 'data-iv' => "$_->{scr}{width}x$_->{scr}{height}::$_->{scr}{sexual}$_->{scr}{violence}$_->{scr}{votecount}", $_->{scr}{id}; + a_ href => imgurl($_->{scr}{id}), 'data-iv' => "$_->{scr}{width}x$_->{scr}{height}:$rev:$_->{scr}{sexual}$_->{scr}{violence}$_->{scr}{votecount}", $_->{scr}{id}; txt_ ' ['; a_ href => "/img/$_->{scr}{id}", image_flagging_display $_->{scr}; txt_ '] '; |