diff --git a/files/assets/css/main.css b/files/assets/css/main.css index 1c6cb3090..24e11ece8 100644 --- a/files/assets/css/main.css +++ b/files/assets/css/main.css @@ -3366,6 +3366,14 @@ small, .small { object-fit: cover; background-color: var(--gray-600); } +.profile-pic-30 { + width: 30px; + height: 30px; + border-radius: 50%; + text-align: center; + object-fit: cover; + background-color: var(--gray-600); +} .profile-pic-35 { width: 35px; height: 35px; @@ -3406,6 +3414,37 @@ small, .small { object-fit: cover; background-color: var(--gray-600); } + +.profile-pic-30-wrapper, +.profile-pic-35-wrapper, +.profile-pic-65-wrapper, +.profile-pic-100-wrapper { + display: inline-block; + position: relative; + vertical-align: middle; +} +.profile-pic-30-hat, +.profile-pic-35-hat, +.profile-pic-65-hat, +.profile-pic-100-hat { + position: absolute; + left: 0; + bottom: 0; +} + +.profile-pic-30-wrapper { width: 30px; height: 30px; } +.profile-pic-35-wrapper { width: 35px; height: 35px; } +.profile-pic-65-wrapper { width: 65px; height: 65px; } +.profile-pic-100-wrapper { width: 100px; height: 100px; } +.profile-pic-30-hat { width: 30px; } +.profile-pic-35-hat { width: 35px; } +.profile-pic-65-hat { width: 65px; } +.profile-pic-100-hat { width: 100px; } + +.profile--pfp--hat { + margin-top: 20px; +} + .card-header:first-child { border-radius: 0.35rem 0.35rem 0 0; } @@ -3730,6 +3769,7 @@ small, .small { color: var(--muted); margin-bottom: 0.25rem; margin-top: -0.25rem; + padding-top: 10px; } .comment .comment-body .user-name { color: var(--black); @@ -3876,7 +3916,7 @@ ul.comment-section { .comment.collapsed .user-info { margin-bottom: 0; } -.comment.collapsed .profile-pic-25 { +.comment.collapsed .profile-pic-30 { opacity: 0.5; } .comment.collapsed .comment-body { @@ -5085,7 +5125,7 @@ html { scroll-padding-top: 100px; } .comment .comment-body { - padding: 3px 0 0 0; + padding: 0px 0 0 0; } .comment-anchor { padding: 1px; @@ -5353,34 +5393,6 @@ th, td { } } -.party-hat { - cursor: pointer; - height: 20px; - position: absolute; - transform: translate(-36px, -10px); -} - -.party-hat2 { - cursor: pointer; - height: 50px; - position: absolute; - transform: translate(-100px,-30px); -} - -.party-hat3 { - cursor: pointer; - height: 40px; - position: absolute; - transform: translate(-70px,-22px); -} - -.party-hat4 { - cursor: pointer; - height: 30px; - position: absolute; - transform: translate(-40px,-20px); -} - .checkmark { color: #1DA1F2 !important; } diff --git a/files/assets/images/hats/cakeday-1.webp b/files/assets/images/hats/cakeday-1.webp new file mode 100644 index 000000000..8ff14c492 Binary files /dev/null and b/files/assets/images/hats/cakeday-1.webp differ diff --git a/files/classes/user.py b/files/classes/user.py index e6196a0c2..b85af9fee 100644 --- a/files/classes/user.py +++ b/files/classes/user.py @@ -608,6 +608,27 @@ class User(Base): return self.profileurl return f"{SITE_FULL}/assets/images/default-profile-pic.webp?v=1008" + @property + @lazy + def hat_active(self): + if not FEATURES['HATS']: + return '' + + if self.is_cakeday: + return 'cakeday-1' + return '' + + @property + @lazy + def hat_tooltip(self): + if not FEATURES['HATS']: + return '' + + if self.is_cakeday: + return 'I’ve spent another year rotting my brain with dramaposting, ' \ + + 'please ridicule me 🤓' + return '' + @lazy def json_popover(self, v): data = {'username': self.username, diff --git a/files/helpers/const.py b/files/helpers/const.py index 21a44ca54..8e42ebeda 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -168,6 +168,7 @@ FEATURES = { 'COUNTRY_CLUB': True, 'PRONOUNS': False, 'BADGES': True, + 'HATS': False, 'HOUSES': False, 'GAMBLING': True, 'WORDLE': True, @@ -241,6 +242,7 @@ GAMBLING_THREAD = 0 if SITE in ('rdrama.net', 'devrama.xyz'): FEATURES['PRONOUNS'] = True + FEATURES['HATS'] = True FEATURES['HOUSES'] = True SIDEBAR_THREAD = 37696 @@ -389,6 +391,7 @@ elif SITE == 'lgbdropthet.com': GAMBLING_THREAD = 25 else: # localhost or testing environment implied FEATURES['PRONOUNS'] = True + FEATURES['HATS'] = True FEATURES['HOUSES'] = True FEATURES['REPOST_DETECTION'] = False diff --git a/files/templates/comments.html b/files/templates/comments.html index 927eb1883..cc57ad373 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -205,10 +205,12 @@ {% endif %} - - {% if c.author.is_cakeday %} - - {% endif %} +
+ + {% if c.author.hat_active -%} + + {%- endif %} +
{{c.author_name}}
{% if FEATURES['PRONOUNS'] %} diff --git a/files/templates/header.html b/files/templates/header.html index 24339a14c..9c58da980 100644 --- a/files/templates/header.html +++ b/files/templates/header.html @@ -199,11 +199,11 @@
- - {% if p.author.is_cakeday %} - - {% endif %} +
+ + {% if p.author.hat_active -%} + + {%- endif %} +
{{p.author_name}}
{% if FEATURES['PRONOUNS'] %} diff --git a/files/templates/submission_listing.html b/files/templates/submission_listing.html index 5c9341636..b4f85cdb4 100644 --- a/files/templates/submission_listing.html +++ b/files/templates/submission_listing.html @@ -206,10 +206,12 @@ {% if p.author.verified %} {% endif %} - - {% if p.author.is_cakeday %} - - {% endif %} +
+ + {% if p.author.hat_active -%} + + {%- endif %} +
{{p.author_name}}
{% if FEATURES['PRONOUNS'] %} diff --git a/files/templates/userpage.html b/files/templates/userpage.html index dde645b45..07e3bc601 100644 --- a/files/templates/userpage.html +++ b/files/templates/userpage.html @@ -38,11 +38,13 @@
-
- - {% if u.is_cakeday %} - - {% endif %} +
{% if u.is_suspended %} @@ -392,7 +394,12 @@
- + + + {% if u.hat_active -%} + + {%- endif %} + {% if u.is_cakeday %} {% endif %} diff --git a/files/templates/util/assetcache.html b/files/templates/util/assetcache.html index 8687b4094..d0e3ba8e8 100644 --- a/files/templates/util/assetcache.html +++ b/files/templates/util/assetcache.html @@ -1,6 +1,6 @@ {%- set CACHE_VER = { - 'css/main.css': 443, + 'css/main.css': 444, 'css/catalog.css': 2, 'css/4chan.css': 61,