summaryrefslogtreecommitdiff
path: root/lib/VNDB
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2020-04-20 09:27:27 +0200
committerYorhel <git@yorhel.nl>2020-04-20 14:16:54 +0200
commitde2a0b3cb152175e7b8df28e97fb532d1021f20c (patch)
treedf03548756feca0b0b6874b7de1c0a880640860c /lib/VNDB
parent17445db2d7d7ce34616e21dd5cce6d8c81b66c21 (diff)
v2rw/VN::Page: Add releases listing
Biggest visible change here is that external links now require a click to show the dropdown box. I hadn't implemented a hover-style dropdown in Elm yet. I'm not sure yet which solution I like better.
Diffstat (limited to 'lib/VNDB')
-rw-r--r--lib/VNDB/ExtLinks.pm8
-rw-r--r--lib/VNDB/Types.pm20
2 files changed, 14 insertions, 14 deletions
diff --git a/lib/VNDB/ExtLinks.pm b/lib/VNDB/ExtLinks.pm
index 2d057847..00472abd 100644
--- a/lib/VNDB/ExtLinks.pm
+++ b/lib/VNDB/ExtLinks.pm
@@ -218,7 +218,7 @@ sub enrich_extlinks {
my sub w {
return if !$obj->{l_wikidata};
my($v, $fmt, $label) = ($w->{$obj->{l_wikidata}}{$_[0]}, @{$WIKIDATA{$_[0]}}{'fmt', 'label'});
- push @links, map [ $label, ref $fmt ? $fmt->($_) : sprintf $fmt, $_ ], ref $v ? @$v : $v ? $v : ()
+ push @links, map [ $label, ref $fmt ? $fmt->($_) : sprintf($fmt, $_), undef ], ref $v ? @$v : $v ? $v : ()
}
my sub l {
my($f, $price) = @_;
@@ -242,7 +242,7 @@ sub enrich_extlinks {
w 'howlongtobeat';
w 'igdb_game';
l 'l_renai';
- push @links, [ 'VNStat', sprintf 'https://vnstat.net/novel/%d', $obj->{id} ] if $obj->{c_votecount}>=20;
+ push @links, [ 'VNStat', sprintf('https://vnstat.net/novel/%d', $obj->{id}), undef ] if $obj->{c_votecount}>=20;
}
# Release links
@@ -250,7 +250,7 @@ sub enrich_extlinks {
l 'l_egs';
l 'l_erotrail';
l 'l_steam';
- push @links, [ 'SteamDB', sprintf 'https://steamdb.info/app/%d/info', $obj->{l_steam} ] if $obj->{l_steam};
+ push @links, [ 'SteamDB', sprintf('https://steamdb.info/app/%d/info', $obj->{l_steam}), undef ] if $obj->{l_steam};
l 'l_dlsite', $obj->{l_dlsite_price};
l 'l_dlsiteen', $obj->{l_dlsiteen_price};
l 'l_gog';
@@ -289,7 +289,7 @@ sub enrich_extlinks {
w 'mobygames_company';
w 'gamefaqs_company';
w 'doujinshi_author';
- push @links, [ 'VNStat', sprintf 'https://vnstat.net/developer/%d', $obj->{id} ];
+ push @links, [ 'VNStat', sprintf('https://vnstat.net/developer/%d', $obj->{id}), undef ];
}
$obj->{extlinks} = \@links
diff --git a/lib/VNDB/Types.pm b/lib/VNDB/Types.pm
index dfb187f4..573562a2 100644
--- a/lib/VNDB/Types.pm
+++ b/lib/VNDB/Types.pm
@@ -182,20 +182,20 @@ hash TAG_CATEGORY =>
hash ANIMATED =>
- 0 => { txt => 'Unknown', story_icon => 'unknown', ero_icon => 'unknown' },
- 1 => { txt => 'No animations', story_icon => 'story_not_animated', ero_icon => 'ero_not_animated' },
- 2 => { txt => 'Simple animations', story_icon => 'story_simple_animated', ero_icon => 'ero_simple_animated' },
- 3 => { txt => 'Some fully animated scenes', story_icon => 'story_some_fully_animated', ero_icon => 'ero_some_fully_animated' },
- 4 => { txt => 'All scenes fully animated', story_icon => 'story_all_fully_animated', ero_icon => 'ero_all_fully_animated' };
+ 0 => { txt => 'Unknown' },
+ 1 => { txt => 'No animations' },
+ 2 => { txt => 'Simple animations' },
+ 3 => { txt => 'Some fully animated scenes' },
+ 4 => { txt => 'All scenes fully animated' };
hash VOICED =>
- 0 => { txt => 'Unknown', icon => 'unknown' },
- 1 => { txt => 'Not voiced', icon => 'not_voiced' },
- 2 => { txt => 'Only ero scenes voiced', icon => 'ero_voiced' },
- 3 => { txt => 'Partially voiced', icon => 'partially_voiced' },
- 4 => { txt => 'Fully voiced', icon => 'fully_voiced' };
+ 0 => { txt => 'Unknown' },
+ 1 => { txt => 'Not voiced' },
+ 2 => { txt => 'Only ero scenes voiced' },
+ 3 => { txt => 'Partially voiced' },
+ 4 => { txt => 'Fully voiced' };