diff --git a/js/10-base.js b/js/10-base.js index f51db5ff5e..a7ea10d3cd 100644 --- a/js/10-base.js +++ b/js/10-base.js @@ -42,6 +42,7 @@ Liberapay.init = function() { Liberapay.payments.init(); Liberapay.s3_uploader_init(); Liberapay.stripe_init(); + Liberapay.view_unsettling.init(); $('div[href]').css('cursor', 'pointer').on('click auxclick', function(event) { if (event.target.tagName == 'A') { diff --git a/js/viewUnsettling.js b/js/viewUnsettling.js new file mode 100644 index 0000000000..b021358aa8 --- /dev/null +++ b/js/viewUnsettling.js @@ -0,0 +1,22 @@ +Liberapay.view_unsettling = {}; + +Liberapay.view_unsettling.init = function () { + Liberapay.view_unsettling.once(); + Liberapay.view_unsettling.opt_in(); +}; + +Liberapay.view_unsettling.once = function () { + $(".display-unsettling-once").click(function () { + $(this).remove(); + $("#unsettling-content-display").remove(); + }); +}; + +Liberapay.view_unsettling.opt_in = function () { + $(".display-unsettling-opt-in").click(function () { + $(this).remove(); + $("#unsettling-content-display").remove(); + + document.cookie = 'always_view_unsettling=True;domain=;path=/'; + }); +}; diff --git a/liberapay/constants.py b/liberapay/constants.py index ce420a200d..fb7f0c42a5 100644 --- a/liberapay/constants.py +++ b/liberapay/constants.py @@ -379,14 +379,15 @@ def __missing__(self, currency): 'country', 'region', 'city', 'postal_code', 'local_address' ) -PRIVACY_FIELDS = OrderedDict([ - ('hide_giving', (_("Do not publish the amounts of money I send."), False)), - ('hide_receiving', (_("Do not publish the amounts of money I receive."), False)), +PROFILE_VISIBILITY_FIELDS = OrderedDict([ + ('hide_giving', (_("Hide total giving from others."), False)), + ('hide_receiving', (_("Hide total receiving from others."), False)), ('hide_from_search', (_("Hide this profile from search results on Liberapay."), True)), ('profile_noindex', (_("Tell web search engines not to index this profile."), True)), ('hide_from_lists', (_("Prevent this profile from being listed on Liberapay."), True)), + ('is_unsettling', (_("Mark this profile as displaying content that is upsetting or embarrassing."), True)), ]) -PRIVACY_FIELDS_S = ' '.join(PRIVACY_FIELDS.keys()) +PROFILE_VISIBILITY_FIELDS_S = ' '.join(PROFILE_VISIBILITY_FIELDS.keys()) PRIVILEGES = dict(admin=1, run_payday=2) check_bits(list(PRIVILEGES.values())) diff --git a/liberapay/models/_mixin_team.py b/liberapay/models/_mixin_team.py index 4158f72f8b..24a92cf741 100644 --- a/liberapay/models/_mixin_team.py +++ b/liberapay/models/_mixin_team.py @@ -174,7 +174,7 @@ def get_current_takes_for_display(self, cursor=None): assert self.kind == 'group' TAKES = """ SELECT p.id AS member_id, p.username AS member_name, p.avatar_url - , p.is_suspended + , p.is_suspended, p.is_unsettling , t.amount, t.actual_amount, t.ctime, t.mtime FROM current_takes t JOIN participants p ON p.id = member diff --git a/style/base/base.scss b/style/base/base.scss index 204b531735..2a8ac5d49f 100644 --- a/style/base/base.scss +++ b/style/base/base.scss @@ -233,6 +233,11 @@ a.account-link[href="#not-available"] { } } +.panel-blur { + filter: blur(4px); + -webkit-filter: blur(4px); +} + .profile-header { align-items: center; clear: both; @@ -375,6 +380,18 @@ p.summary { } } +<<<<<<< HEAD +======= +.repo-search-blur { + filter: blur(3px); + -webkit-filter: blur(3px); +} + +>>>>>>> 2faaf781829831874e7d681daec0a7ce2368daca +.repo-search-display { + display: inline; +} + @media (max-width: $screen-xs-min - 1) { .inline-boxes > .inline-box { display: block; @@ -1145,3 +1162,13 @@ abbr[title] { /* Bootstrap 3.3.6 adds a bottom border but doesn't disable text-decoration */ text-decoration: none; } + +.blur-3px { + filter: blur(3px); + -webkit-filter: blur(3px); +} + +.blur-4px { + filter: blur(4px); + -webkit-filter: blur(4px); +} diff --git a/templates/layouts/base.html b/templates/layouts/base.html index 0f41ec9f1e..7e6f92d01d 100644 --- a/templates/layouts/base.html +++ b/templates/layouts/base.html @@ -96,21 +96,41 @@