summaryrefslogtreecommitdiff
path: root/lib/VNWeb/Releases
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2021-03-06 16:14:20 +0100
committerYorhel <git@yorhel.nl>2021-03-06 16:14:22 +0100
commit4cf49275519dd6950c60a60e9b7e09f7630b3f0d (patch)
tree35d54589dc0507a4ff7c2b7879ec5aec6421aa8e /lib/VNWeb/Releases
parent08ae3b6f10ca0ba31b76aa1f260c615ce211e808 (diff)
SVG platform icons
Still kind of experimental, let's see how people react. Icons contributed by eacil. Some are colored versions based on the SVG icons contributed by xy2, some are vectorized versions of old icons. These retain much of the legibility of the old png icons by virtue of not being monochrome. At least for the dark skins. I may experiment later to see if the monochrome icons may be a solution for light skins, now that I have the infrastructure in place anyway. Not sure I really want to maintain two icon sets, though. I used scour to optimize the SVGs for size, but they're still rather less efficient than the combined PNG sprites. Maybe I'll use an SVG merge trick later, but that tends to be less widely supported among browsers. Closes #30.
Diffstat (limited to 'lib/VNWeb/Releases')
-rw-r--r--lib/VNWeb/Releases/Lib.pm2
-rw-r--r--lib/VNWeb/Releases/Page.pm2
-rw-r--r--lib/VNWeb/Releases/VNTab.pm2
3 files changed, 3 insertions, 3 deletions
diff --git a/lib/VNWeb/Releases/Lib.pm b/lib/VNWeb/Releases/Lib.pm
index e1340e03..a20d1339 100644
--- a/lib/VNWeb/Releases/Lib.pm
+++ b/lib/VNWeb/Releases/Lib.pm
@@ -106,7 +106,7 @@ sub release_row_ {
td_ class => 'tc1', sub { rdate_ $r->{released} };
td_ class => 'tc2', defined $r->{minage} ? minage $r->{minage} : '';
td_ class => 'tc3', sub {
- abbr_ class => "icons $_", title => $PLATFORM{$_}, '' for grep $_ ne 'oth', $r->{platforms}->@*;
+ abbr_ class => "icons plat $_", title => $PLATFORM{$_}, '' for $r->{platforms}->@*;
if($opt->{lang}) {
abbr_ class => "icons lang $_", title => $LANGUAGE{$_}, '' for $r->{lang}->@*;
}
diff --git a/lib/VNWeb/Releases/Page.pm b/lib/VNWeb/Releases/Page.pm
index e2059e8f..1f29ad48 100644
--- a/lib/VNWeb/Releases/Page.pm
+++ b/lib/VNWeb/Releases/Page.pm
@@ -108,7 +108,7 @@ sub _infotable_ {
td_ 'Platform'.($r->{platforms}->@* == 1 ? '' : 's');
td_ sub {
join_ \&br_, sub {
- abbr_ class => "icons $_", title => $PLATFORM{$_}, ' ';
+ abbr_ class => "icons plat $_", title => $PLATFORM{$_}, ' ';
txt_ ' '.$PLATFORM{$_};
}, $r->{platforms}->@*;
}
diff --git a/lib/VNWeb/Releases/VNTab.pm b/lib/VNWeb/Releases/VNTab.pm
index cebaf7f6..de8c1d66 100644
--- a/lib/VNWeb/Releases/VNTab.pm
+++ b/lib/VNWeb/Releases/VNTab.pm
@@ -59,7 +59,7 @@ my @rel_cols = (
default => 1,
has_data => sub { !!@{$_[0]{platforms}} },
draw => sub {
- join_ \&br_, sub { abbr_ class => "icons $_", title => $PLATFORM{$_}, ''; }, $_[0]{platforms}->@*;
+ join_ \&br_, sub { abbr_ class => "icons plat $_", title => $PLATFORM{$_}, ''; }, $_[0]{platforms}->@*;
txt_ 'Unknown' if !$_[0]{platforms}->@*;
},
}, { # Media