summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2021-07-08 14:49:09 +0200
committerYorhel <git@yorhel.nl>2021-07-08 14:49:11 +0200
commit7c08ad43f59ab237d7fd011fb285e26db9dc5c2d (patch)
tree6b757907f9ee7e2e5038b8a8b9ec5a030f185e53
parent5bd83321e5f8a11797fd5b90dbe5aa8528c68de4 (diff)
VN::List: Add tag score info to cards and grid view
Fixes https://vndb.org/t2520.579
-rw-r--r--css/v2.css6
-rw-r--r--lib/VNWeb/VN/List.pm4
2 files changed, 7 insertions, 3 deletions
diff --git a/css/v2.css b/css/v2.css
index b7074bfe..e54c248f 100644
--- a/css/v2.css
+++ b/css/v2.css
@@ -647,10 +647,10 @@ div#vntags { margin: 0 30px 0 30px; border-top: 1px solid $bo
.vngrid { padding: 10px; display: flex; flex-wrap: wrap; justify-content: space-evenly }
.vngrid > a { margin: 5px 10px 15px 10px; flex: 1 0 200px; max-width: 256px; height: 300px; background-size: cover; background-repeat: no-repeat; background-position: top }
-.vngrid > a div { display: none }
+.vngrid > a > div { display: none }
.vngrid > a:hover, .vngrid > a.noimage { border-bottom: none }
-.vngrid > a:hover div, .vngrid > a.noimage div { box-sizing: border-box; padding: 5px; display: block; width: 100%; height: 100%; background-color: rgba(0,0,0,0.7); color: $maintext }
-.vngrid div span:first-child { display: block; font-weight: bold }
+.vngrid > a:hover > div, .vngrid > a.noimage > div { box-sizing: border-box; padding: 5px; display: block; width: 100%; height: 100%; background-color: rgba(0,0,0,0.7); color: $maintext }
+.vngrid > a > div > span:first-child { display: block; font-weight: bold }
.vngrid table { margin: 10px 0 }
.vngrid table td { padding: 0 5px 0 0 }
diff --git a/lib/VNWeb/VN/List.pm b/lib/VNWeb/VN/List.pm
index 82cba23a..670c8358 100644
--- a/lib/VNWeb/VN/List.pm
+++ b/lib/VNWeb/VN/List.pm
@@ -138,6 +138,10 @@ sub listing_ {
}
table_ sub {
tr_ sub {
+ td_ 'Tag score:';
+ td_ sub { tagscore_ $_->{tagscore} };
+ } if $tagscore;
+ tr_ sub {
td_ 'Popularity:';
td_ sprintf '%.2f', ($_->{c_popularity}||0)/100;
} if $opt->{s}->vis('popularity');