diff options
author | Yorhel <git@yorhel.nl> | 2020-02-13 15:28:05 +0100 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2020-02-13 15:28:07 +0100 |
commit | 23fb02e36defa7660ee871dd9e650906b0d2d616 (patch) | |
tree | ef96a9aad699df8a42da33930af373d4ea69e177 /util/vndb.pl | |
parent | f95eab4d6547d402d79e443c5488d12b74650f74 (diff) |
v2rw: WIP: Convert character pages
This uses an alternative (non-JS) approach to spoiler hiding, which is
both much simpler to implement and properly handles all cases. Downside
is that it requires a page reload. It also allows direct linking to a
character page with a particular view, but I'm not entirely sure if this
is a welcome feature.
This is a WIP because it doesn't display instances yet.
Diffstat (limited to 'util/vndb.pl')
-rwxr-xr-x | util/vndb.pl | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/util/vndb.pl b/util/vndb.pl index 15db575a..405b32a9 100755 --- a/util/vndb.pl +++ b/util/vndb.pl @@ -37,6 +37,13 @@ TUWF::set %{ config->{tuwf} }; tuwf->{elmgen} = $ARGV[0] && $ARGV[0] eq 'elmgen'; +# tuwf->imgpath(cg => $image_id) +sub TUWF::Object::imgpath { sprintf '%s/%s/%02d/%d.jpg', $ROOT, $_[1], $_[2]%100, $_[2] } + +# tuwf->imgurl(cv => $image_id) +sub TUWF::Object::imgurl { sprintf '%s/%s/%02d/%d.jpg', $_[0]->{url_static}, $_[1], $_[2]%100, $_[2] } + + TUWF::hook before => sub { # If we're running standalone, serve www/ and static/ too. if(tuwf->{_TUWF}{http}) { |