summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2008-11-21 11:30:43 +0100
committerYorhel <git@yorhel.nl>2008-11-21 11:30:43 +0100
commitd1fbf6b1339c43eb16d0b3d11518cdb8d1f80830 (patch)
tree9883c9d3d8d6605fc90aea2605eae954ed4e4f66 /lib
parenta1a471c2647a06bd98f1eac6193caf44d4325685 (diff)
Added javascript image viewer
This is an improved version, using less code, but allowing multiple image sequences. Searches for <a rel=".."> tags, where rel now has three parts: iv:widthxheight:sequence The sequence part is optional, no prev/next links will be shown when not specified, otherwise the prev/next links will point to the previous or next image in that sequence, ignoring images with 'hidden' as class
Diffstat (limited to 'lib')
-rw-r--r--lib/VNDB/Handler/VNPage.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/VNDB/Handler/VNPage.pm b/lib/VNDB/Handler/VNPage.pm
index ddafaeec..e95f8639 100644
--- a/lib/VNDB/Handler/VNPage.pm
+++ b/lib/VNDB/Handler/VNPage.pm
@@ -323,7 +323,8 @@ sub _screenshots {
td class => 'scr';
for (@scr) {
div $_->{nsfw} ? (class => 'nsfw'.(!$self->authInfo->{show_nsfw} ? ' hidden' : '')) : ();
- a href => sprintf('%s/sf/%02d/%d.jpg', $self->{url_static}, $_->{id}%100, $_->{id});
+ a href => sprintf('%s/sf/%02d/%d.jpg', $self->{url_static}, $_->{id}%100, $_->{id}),
+ rel => "iv:$_->{width}x$_->{height}:scr", $_->{nsfw} && !$self->authInfo->{show_nsfw} ? (class => 'hidden') : ();
img src => sprintf('%s/st/%02d/%d.jpg', $self->{url_static}, $_->{id}%100, $_->{id}), alt => "Screenshot #$_->{id}";
end;
end;