summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/style.css3
-rw-r--r--elm/User/Edit.elm2
-rw-r--r--lib/VNWeb/Auth.pm3
-rw-r--r--lib/VNWeb/HTML.pm7
-rw-r--r--static/f/patreon.pngbin0 -> 2481 bytes
5 files changed, 12 insertions, 3 deletions
diff --git a/data/style.css b/data/style.css
index e1fcedc2..87034f90 100644
--- a/data/style.css
+++ b/data/style.css
@@ -185,6 +185,9 @@ div.spinner { content: ''; border: 3px solid #9eaebd; border-bottom-color: trans
#menulist .logout { border: 0; background: none; color: $maintext$; cursor: pointer }
#menulist .logout:hover { text-decoration: underline }
+#patreon { opacity: 0.6; border-bottom: none!important }
+#patreon:hover { opacity: 1 }
+
diff --git a/elm/User/Edit.elm b/elm/User/Edit.elm
index 6a335d75..680b34d0 100644
--- a/elm/User/Edit.elm
+++ b/elm/User/Edit.elm
@@ -163,7 +163,7 @@ view model =
supportform =
[ tr [ class "newpart" ] [ td [ colspan 2 ] [ text "Supporter options" ] ]
, if not data.nodistract_can && not data.authmod then text ""
- else formField "" [ label [] [ inputCheck "" data.nodistract_noads (Set << NoAds), text " Disable advertising and other distractions (doesn't hide affiliate links for the moment)" ] ]
+ else formField "" [ label [] [ inputCheck "" data.nodistract_noads (Set << NoAds), text " Disable advertising and other distractions (only hides the Patreon icon for the moment)" ] ]
, if not data.nodistract_can && not data.authmod then text ""
else formField "" [ label [] [ inputCheck "" data.nodistract_nofancy (Set << NoFancy), text " Disable supporters badges, custom display names and profile skins" ] ]
, if not data.support_can && not data.authmod then text ""
diff --git a/lib/VNWeb/Auth.pm b/lib/VNWeb/Auth.pm
index bd1fba49..9e26d123 100644
--- a/lib/VNWeb/Auth.pm
+++ b/lib/VNWeb/Auth.pm
@@ -276,7 +276,8 @@ sub csrfcheck {
my @pref_columns = qw/
email_confirmed skin customcss filter_vn filter_release show_nsfw hide_list notify_dbedit notify_announce
- vn_list_own vn_list_wish tags_all tags_cont tags_ero tags_tech spoilers traits_sexual nodistract_can nodistract_nofancy
+ vn_list_own vn_list_wish tags_all tags_cont tags_ero tags_tech spoilers traits_sexual
+ nodistract_can nodistract_noads nodistract_nofancy
/;
# Returns a user preference column for the current user. Lazily loads all
diff --git a/lib/VNWeb/HTML.pm b/lib/VNWeb/HTML.pm
index cd6b4916..17ab0947 100644
--- a/lib/VNWeb/HTML.pm
+++ b/lib/VNWeb/HTML.pm
@@ -119,7 +119,7 @@ sub _head_ {
my $o = shift;
my $fancy = !(auth->pref('nodistract_can') && auth->pref('nodistract_nofancy'));
- my $skin = tuwf->reqGet('skin') || ($fancy && $o->{pubskin}{pubskin_can} ? $o->{pubskin}{skin} : auth->pref('skin'));
+ my $skin = tuwf->reqGet('skin') || ($fancy && $o->{pubskin}{pubskin_can} ? $o->{pubskin}{skin} : auth->pref('skin')) || '';
$skin = config->{skin_default} if !tuwf->{skins}{$skin};
my $customcss = $fancy && $o->{pubskin}{pubskin_can} ? $o->{pubskin}{customcss} : auth->pref('customcss');
@@ -152,6 +152,11 @@ sub _head_ {
sub _menu_ {
my $o = shift;
+
+ a_ href => 'https://www.patreon.com/vndb', id => 'patreon', sub {
+ img_ src => config->{url_static}.'/f/patreon.png', alt => 'Support VNDB on Patreon', width => 160, height => 38;
+ } if !(auth->pref('nodistract_can') && auth->pref('nodistract_noads'));
+
div_ class => 'menubox', sub {
h2_ 'Menu';
div_ sub {
diff --git a/static/f/patreon.png b/static/f/patreon.png
new file mode 100644
index 00000000..ae2938b7
--- /dev/null
+++ b/static/f/patreon.png
Binary files differ