summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2022-09-01 08:53:59 +0200
committerYorhel <git@yorhel.nl>2022-09-01 08:54:04 +0200
commitc88cd361118514fff08d30c2183a6fa94d335387 (patch)
tree146e608f9137f3ef8b6884c46ad9d5af7a6a7e15
parentfe97972d35d0b3fdb525ee2f2f5fe05bf977b7fe (diff)
Always display "lie" flag when tag has been set in user preferences
Fixes https://vndb.org/t12792.10 (or not?)
-rw-r--r--css/v2.css1
-rw-r--r--lib/VNWeb/VN/Page.pm4
2 files changed, 3 insertions, 2 deletions
diff --git a/css/v2.css b/css/v2.css
index a199114e..bf78ffc0 100644
--- a/css/v2.css
+++ b/css/v2.css
@@ -533,6 +533,7 @@ div.vndetails .lengthvotefrm {
div#vntags { margin: 0 30px 0 30px; border-top: 1px solid $border; padding: 3px 5% 0 5%; text-align: center; }
#vntags span { white-space: nowrap; margin-left: 15px; }
#vntags b { color: $grayedout; font-weight: normal; font-size: 10px }
+#vntags .lieo { text-decoration: line-through }
#tagops { text-align: right; width: auto; }
#tagops label { margin: 0 0 0 10px; border: 0; outline: none; color: $link; cursor: pointer; }
diff --git a/lib/VNWeb/VN/Page.pm b/lib/VNWeb/VN/Page.pm
index ec54dbe7..69aff93b 100644
--- a/lib/VNWeb/VN/Page.pm
+++ b/lib/VNWeb/VN/Page.pm
@@ -401,7 +401,7 @@ sub infobox_tags_ {
$cnt->[0]++ if $spoil < 1;
my $cut = $_->{override} ? '' : $cnt->[0] > 15 ? ' cut cut2 cut1 cut0' : $cnt->[1] > 15 ? ' cut cut2 cut1' : $cnt->[2] > 15 ? ' cut cut2' : '';
span_ class => "tagspl$spoil cat_$_->{cat} $cut", sub {
- a_ href => "/$_->{id}", mkclass(lie => $_->{lie}, standout => $_->{spoiler} == -1),
+ a_ href => "/$_->{id}", mkclass($_->{override} ? 'lieo' : 'lie', $_->{lie}, standout => $_->{spoiler} == -1),
style => sprintf('font-size: %dpx', $_->{rating}*3.5+6), $_->{name};
spoil_ $spoil;
b_ class => 'grayedout', sprintf ' %.1f', $_->{rating};
@@ -921,7 +921,7 @@ sub tags_ {
b_ class => 'grayedout', '━━'x($lvl-1).' ' if $lvl > 1;
a_ href => "/$t->{id}", mkclass(
standout => $t->{spoiler} == -1,
- lie => $view->{spoilers} > 1 && $t->{lie},
+ lie => $t->{lie} && ($view->{spoilers} > 1 || $t->{override}),
parent => !$t->{rating}), $t->{name};
spoil_ $t->{spoiler};
} if $lvl;