forked from rDrama/rDrama
1
0
Fork 0

Merge branch 'frost' of https://github.com/Aevann1/Drama into frost

master
Aevann1 2022-06-15 15:32:55 +02:00
commit cdcef7d01d
11 changed files with 195 additions and 142 deletions

View File

@ -441,13 +441,23 @@ class User(Base):
@property
@lazy
def notifications_count(self):
notifs = g.db.query(Notification.user_id).join(Comment).filter(Notification.user_id == self.id, Notification.read == False, Comment.is_banned == False, Comment.deleted_utc == 0)
notifs = g.db.query(Notification.user_id).join(Comment).filter(
Notification.user_id == self.id, Notification.read == False,
Comment.is_banned == False, Comment.deleted_utc == 0)
if not self.shadowbanned and self.admin_level < 3:
notifs = notifs.join(User, User.id == Comment.author_id).filter(User.shadowbanned == None)
return notifs.count()
@property
@lazy
def normal_notifications_count(self):
return self.notifications_count \
- self.post_notifications_count \
- self.modaction_notifications_count \
- self.reddit_notifications_count
@property
@lazy
def post_notifications_count(self):
@ -475,11 +485,29 @@ class User(Base):
@property
@lazy
def normal_count(self):
return self.notifications_count \
- self.post_notifications_count \
- self.modaction_notifications_count \
- self.reddit_notifications_count
def notifications_do(self):
# only meaningful when notifications_count > 0; otherwise falsely '' ~ normal
if self.normal_notifications_count > 0:
return ''
elif self.post_notifications_count > 0:
return 'posts'
elif self.modaction_notifications_count > 0:
return 'modactions'
elif self.reddit_notifications_count > 0:
return 'reddit'
return ''
@property
@lazy
def notifications_color(self):
colors = {
'': '#dc3545',
'posts': '#0000ff',
'modactions': '#e5990d',
'reddit': '#805ad5',
}
return colors[self.notifications_do] if self.notifications_do \
else colors['']
@property
@lazy

View File

@ -128,12 +128,55 @@ AGENDAPOSTER_PHRASE = 'trans lives matter'
AGENDAPOSTER_MSG = """Hi @{username},\n\nYour {type} has been automatically removed because you forgot to include `{AGENDAPOSTER_PHRASE}`.\n\nDon't worry, we're here to help! We won't let you post or comment anything that doesn't express your love and acceptance towards the trans community. Feel free to resubmit your {type} with `{AGENDAPOSTER_PHRASE}` included. \n\n*This is an automated message; if you need help, you can message us [here](/contact).*"""
PIN_LIMIT = 3
POST_RATE_LIMIT = "1/second;2/minute;10/hour;50/day"
################################################################################
### SITE SPECIFIC CONSTANTS
################################################################################
HOLE_COST = 0
HOLE_INACTIVITY_DELETION = False
PIN_LIMIT = 3
POST_RATE_LIMIT = '1/second;2/minute;10/hour;50/day'
if SITE in {'rdrama.net','devrama.xyz'}:
NOTIFICATIONS_ID = 1
AUTOJANNY_ID = 2
SNAPPY_ID = 3
LONGPOSTBOT_ID = 4
ZOZBOT_ID = 5
AUTOPOLLER_ID = 6
AUTOBETTER_ID = 7
AUTOCHOICE_ID = 8
BASEDBOT_ID = 0
SCHIZO_ID = 0
A_ID = 0
KIPPY_ID = 0
GIFT_NOTIF_ID = 9
PIZZASHILL_ID = 0
PIZZA_VOTERS = ()
IDIO_ID = 0
CARP_ID = 0
JOAN_ID = 0
MOOSE_ID = 0
AEVANN_ID = 9
SNAKES_ID = 0
HOMO_ID = 0
SOREN_ID = 0
Q_ID = 0
LAWLZ_ID = 0
LLM_ID = 0
DAD_ID = 0
MOM_ID = 0
DONGER_ID = 0
BUG_THREAD = 0
WELCOME_MSG = f"Welcome to {SITE_NAME}!"
ROLES={}
LOTTERY_ENABLED = True
LOTTERY_TICKET_COST = 12
LOTTERY_SINK_RATE = 3
if SITE in {'rdrama.net', 'devrama.xyz'}:
HOLE_COST = 50000
HOLE_INACTIVITY_DELETION = True
NOTIFICATIONS_ID = 1046
@ -144,7 +187,6 @@ if SITE in {'rdrama.net','devrama.xyz'}:
AUTOPOLLER_ID = 6176
AUTOBETTER_ID = 7668
AUTOCHOICE_ID = 9167
BASEDBOT_ID = 0
SCHIZO_ID = 8494
A_ID = 1230
@ -157,6 +199,7 @@ if SITE in {'rdrama.net','devrama.xyz'}:
JOAN_ID = 28
MOOSE_ID = 1904
AEVANN_ID = 1
SNAKES_ID = 10288
HOMO_ID = 147
SOREN_ID = 2546
Q_ID = 1480
@ -165,6 +208,7 @@ if SITE in {'rdrama.net','devrama.xyz'}:
DAD_ID = 2513
MOM_ID = 4588
DONGER_ID = 541
BUG_THREAD = 18459
WELCOME_MSG = "Hi there! It's me, your soon-to-be favorite rDrama user @carpathianflorist here to give you a brief rundown on some of the sick features we have here. You'll probably want to start by following me, though. So go ahead and click my name and then smash that Follow button. This is actually really important, so go on. Hurry.\n\nThanks!\n\nNext up: If you're a member of the media, similarly just shoot me a DM and I'll set about verifying you and then we can take care of your sad journalism stuff.\n\n**FOR EVERYONE ELSE**\n\n Begin by navigating to [the settings page](/settings/profile) (we'll be prettying this up so it's less convoluted soon, don't worry) and getting some basic customization done.\n\n### Themes\n\nDefinitely change your theme right away, the default one (Midnight) is pretty enough, but why not use something *exotic* like Win98, or *flashy* like Tron? Even Coffee is super tasteful and way more fun than the default. More themes to come when we get around to it!\n\n### Avatar/pfp\n\nYou'll want to set this pretty soon. Set the banner too while you're at it. Your profile is important!\n\n### Flairs\n\nSince you're already on the settings page, you may as well set a flair, too. As with your username, you can - obviously - choose the color of this, either with a hex value or just from the preset colors. And also like your username, you can change this at any time. [Paypigs](https://marsey1.gumroad.com/l/tfcvri) can even further relive the glory days of 90s-00s internet and set obnoxious signatures.\n\n### PROFILE ANTHEMS\n\nSpeaking of profiles, hey, remember MySpace? Do you miss autoplaying music assaulting your ears every time you visited a friend's page? Yeah, we brought that back. Enter a YouTube URL, wait a few seconds for it to process, and then BAM! you've got a profile anthem which people cannot mute. Unless they spend 20,000 dramacoin in the shop for a mute button. Which you can then remove from your profile by spending 40,000 dramacoin on an unmuteable anthem. Get fucked poors!\n\n### Dramacoin?\n\nDramacoin is basically our take on the karma system. Except unlike the karma system, it's not gay and boring and stupid and useless. Dramacoin can be spent at [Marsey's Dramacoin Emporium](/shop) on upgrades to your user experience (many more coming than what's already listed there), and best of all on tremendously annoying awards to fuck with your fellow dramautists. We're always adding more, so check back regularly in case you happen to miss one of the announcement posts.\n\nLike karma, dramacoin is obtained by getting upvotes on your threads and comments. *Unlike* karma, it's also obtained by getting downvotes on your threads and comments. Downvotes don't really do anything here - they pay the same amount of dramacoin and they increase thread/comment ranking just the same as an upvote. You just use them to express petty disapproval and hopefully start a fight. Because all votes are visible here. To hell with your anonymity.\n\nDramacoin can also be traded amongst users from their profiles. Note that there is a 3% transaction fee.\n\n### Badges\n\nRemember all those neat little metallic icons you saw on my profile when you were following me? If not, scroll back up and go have a look. And doublecheck to make sure you pressed the Follow button. Anyway, those are badges. You earn them by doing a variety of things. Some of them even offer benefits, like discounts at the shop. A [complete list of badges and their requirements can be found here](/badges), though I add more pretty regularly, so keep an eye on the changelog.\n\n### Other stuff\n\nWe're always adding new features, and we take a fun-first approach to development. If you have a suggestion for something that would be fun, funny, annoying - or best of all, some combination of all three - definitely make a thread about it. Or just DM me if you're shy. Weirdo. Anyway there's also the [leaderboards](/leaderboard), boring stuff like two-factor authentication you can toggle on somewhere in the settings page (psycho), the ability to save posts and comments, more than a thousand emojis already (most of which are rDrama originals), and on and on and on and on. This is just the basics, mostly to help you get acquainted with some of the things you can do here to make it more easy on the eyes, customizable, and enjoyable. If you don't enjoy it, just go away! We're not changing things to suit you! Get out of here loser! And no, you can't delete your account :na:\n\nI love you.<BR>*xoxo Carp* 💋"
ROLES={
@ -179,11 +223,10 @@ if SITE in {'rdrama.net','devrama.xyz'}:
"6": "947236351445725204",
"7": "886781932430565418",
}
elif SITE == "pcmemes.net":
elif SITE == 'pcmemes.net':
HOLE_COST = 10000
PIN_LIMIT = 6
POST_RATE_LIMIT = "1/second;4/minute;20/hour;100/day"
POST_RATE_LIMIT = '1/second;4/minute;20/hour;100/day'
NOTIFICATIONS_ID = 1046
AUTOJANNY_ID = 1050
SNAPPY_ID = 261
@ -194,60 +237,21 @@ elif SITE == "pcmemes.net":
AUTOCHOICE_ID = 2072
BASEDBOT_ID = 800
SCHIZO_ID = 0
A_ID = 0
KIPPY_ID = 1592
PIZZASHILL_ID = 0
PIZZA_VOTERS = ()
GIFT_NOTIF_ID = 1592
IDIO_ID = 0
CARP_ID = 0
JOAN_ID = 0
MOOSE_ID = 0
AEVANN_ID = 1
HOMO_ID = 0
SOREN_ID = 0
Q_ID = 0
LAWLZ_ID = 0
LLM_ID = 0
DAD_ID = 0
MOM_ID = 0
DONGER_ID = 0
SNAKES_ID = 2279
BUG_THREAD = 4103
WELCOME_MSG = "Welcome to pcmemes.net! Don't forget to turn off the slur filter [here](/settings/content#slurreplacer)"
ROLES={}
elif SITE == 'cringetopia.org':
HOLE_COST = 10000
NOTIFICATIONS_ID = 1
AUTOJANNY_ID = 2
SNAPPY_ID = 3
LONGPOSTBOT_ID = 4
ZOZBOT_ID = 5
AUTOPOLLER_ID = 6
AUTOBETTER_ID = 7
AUTOCHOICE_ID = 8
BASEDBOT_ID = 0
SCHIZO_ID = 0
A_ID = 0
KIPPY_ID = 0
GIFT_NOTIF_ID = 18
PIZZASHILL_ID = 0
PIZZA_VOTERS = ()
IDIO_ID = 0
CARP_ID = 18
JOAN_ID = 0
MOOSE_ID = 0
AEVANN_ID = 9
HOMO_ID = 0
SOREN_ID = 0
Q_ID = 0
LAWLZ_ID = 0
LLM_ID = 0
DAD_ID = 0
MOM_ID = 0
DONGER_ID = 0
BUG_THREAD = 0
SNAKES_ID = 3284
WELCOME_MSG = "Hi there! It's me, your soon-to-be favorite Cringetopia user @carpathianflorist here to give you a brief rundown on some of the sick features we have here. You'll probably want to start by following me, though. So go ahead and click my name and then smash that Follow button. This is actually really important, so go on. Hurry.\n\nThanks!\n\nNext up: If you're a member of the media, similarly just shoot me a DM and I'll set about verifying you and then we can take care of your sad journalism stuff.\n\n**FOR EVERYONE ELSE**\n\n Begin by navigating to [the settings page](/settings/profile) (we'll be prettying this up so it's less convoluted soon, don't worry) and getting some basic customization done.\n\n### Themes\n\nDefinitely change your theme right away, the default one (Midnight) is pretty enough, but why not use something *exotic* like Win98, or *flashy* like Tron? Even Coffee is super tasteful and way more fun than the default. More themes to come when we get around to it!\n\n### Avatar/pfp\n\nYou'll want to set this pretty soon. Set the banner too while you're at it. Your profile is important!\n\n### Flairs\n\nSince you're already on the settings page, you may as well set a flair, too. As with your username, you can - obviously - choose the color of this, either with a hex value or just from the preset colors. And also like your username, you can change this at any time.\n\n### PROFILE ANTHEMS\n\nSpeaking of profiles, hey, remember MySpace? Do you miss autoplaying music assaulting your ears every time you visited a friend's page? Yeah, we brought that back. Enter a YouTube URL, wait a few seconds for it to process, and then BAM! you've got a profile anthem which people cannot mute. Unless they spend 20,000 coins in the shop for a mute button. Which you can then remove from your profile by spending 40,000 coins on an unmuteable anthem. Get fucked poors!\n\n### Coins?\n\nCoins is basically our take on the karma system. Except unlike the karma system, it's not gay and boring and stupid and useless. Coins can be spent at [Marsey's Dramacoin Emporium](/shop) on upgrades to your user experience (many more coming than what's already listed there), and best of all on tremendously annoying awards to fuck with your fellow autists. We're always adding more, so check back regularly in case you happen to miss one of the announcement posts.\n\nLike karma, Coins is obtained by getting upvotes on your threads and comments. *Unlike* karma, it's also obtained by getting downvotes on your threads and comments. Downvotes don't really do anything here - they pay the same amount of Coins and they increase thread/comment ranking just the same as an upvote. You just use them to express petty disapproval and hopefully start a fight. Because all votes are visible here. To hell with your anonymity.\n\nCoins can also be traded amongst users from their profiles. Note that there is a 3% transaction fee.\n\n### Badges\n\nRemember all those neat little metallic icons you saw on my profile when you were following me? If not, scroll back up and go have a look. And doublecheck to make sure you pressed the Follow button. Anyway, those are badges. You earn them by doing a variety of things. Some of them even offer benefits, like discounts at the shop. A [complete list of badges and their requirements can be found here](/badges), though I add more pretty regularly, so keep an eye on the changelog.\n\n### Other stuff\n\nWe're always adding new features, and we take a fun-first approach to development. If you have a suggestion for something that would be fun, funny, annoying - or best of all, some combination of all three - definitely make a thread about it. Or just DM me if you're shy. Weirdo. Anyway there's also the [leaderboards](/leaderboard), boring stuff like two-factor authentication you can toggle on somewhere in the settings page (psycho), the ability to save posts and comments, more than a thousand emojis, and on and on and on and on. This is just the basics, mostly to help you get acquainted with some of the things you can do here to make it more easy on the eyes, customizable, and enjoyable. If you don't enjoy it, just go away! We're not changing things to suit you! Get out of here loser! And no, you can't delete your account :na:\n\nI love you.<BR>*xoxo Carp* 💋"
ROLES={
"owner": "809580734578819072",
@ -263,73 +267,13 @@ elif SITE == 'cringetopia.org':
}
elif SITE == 'watchpeopledie.co':
HOLE_COST = 10000
NOTIFICATIONS_ID = 1
AUTOJANNY_ID = 2
SNAPPY_ID = 3
LONGPOSTBOT_ID = 4
ZOZBOT_ID = 5
AUTOPOLLER_ID = 6
AUTOBETTER_ID = 7
AUTOCHOICE_ID = 8
BASEDBOT_ID = 0
SCHIZO_ID = 0
A_ID = 0
KIPPY_ID = 0
GIFT_NOTIF_ID = 13
PIZZASHILL_ID = 0
PIZZA_VOTERS = ()
IDIO_ID = 0
CARP_ID = 13
JOAN_ID = 0
MOOSE_ID = 0
AEVANN_ID = 9
HOMO_ID = 0
SOREN_ID = 0
Q_ID = 0
LAWLZ_ID = 0
LLM_ID = 0
DAD_ID = 0
MOM_ID = 0
DONGER_ID = 0
BUG_THREAD = 0
WELCOME_MSG = f"Welcome to {SITE_NAME}!"
ROLES={}
else:
HOLE_COST = 0
NOTIFICATIONS_ID = 1
AUTOJANNY_ID = 2
SNAPPY_ID = 3
LONGPOSTBOT_ID = 4
ZOZBOT_ID = 5
AUTOPOLLER_ID = 6
AUTOBETTER_ID = 7
AUTOCHOICE_ID = 8
BASEDBOT_ID = 0
SCHIZO_ID = 0
A_ID = 0
KIPPY_ID = 0
GIFT_NOTIF_ID = 9
PIZZASHILL_ID = 0
PIZZA_VOTERS = ()
IDIO_ID = 0
CARP_ID = 0
JOAN_ID = 0
MOOSE_ID = 0
AEVANN_ID = 9
HOMO_ID = 0
SOREN_ID = 0
Q_ID = 0
LAWLZ_ID = 0
LLM_ID = 0
DAD_ID = 0
MOM_ID = 0
DONGER_ID = 0
BUG_THREAD = 0
WELCOME_MSG = f"Welcome to {SITE_NAME}!"
ROLES={}
SNAKES_ID = 32
else: # localhost or testing environment implied
pass
bots = {NOTIFICATIONS_ID, AUTOJANNY_ID, SNAPPY_ID, LONGPOSTBOT_ID, ZOZBOT_ID, AUTOPOLLER_ID, AUTOBETTER_ID, AUTOCHOICE_ID, BASEDBOT_ID}
@ -791,6 +735,8 @@ NOTIFIED_USERS = {
'swagman': SOREN_ID,
'schizocel': SCHIZO_ID,
'scitzocel': SCHIZO_ID,
'snakes': SNAKES_ID,
'sneks': SNAKES_ID,
}
FORTUNE_REPLIES = ('<b style="color:#6023f8">Your fortune: Allah Wills It</b>','<b style="color:#d302a7">Your fortune: Inshallah, Only Good Things Shall Come To Pass</b>','<b style="color:#e7890c">Your fortune: Allah Smiles At You This Day</b>','<b style="color:#7fec11">Your fortune: Your Bussy Is In For A Blasting</b>','<b style="color:#43fd3b">Your fortune: You Will Be Propositioned By A High-Tier Twink</b>','<b style="color:#9d05da">Your fortune: Repent, You Have Displeased Allah And His Vengeance Is Nigh</b>','<b style="color:#f51c6a">Your fortune: Reply Hazy, Try Again</b>','<b style="color:#00cbb0">Your fortune: lmao you just lost 100 coins</b>','<b style="color:#2a56fb">Your fortune: Yikes 😬</b>','<b style="color:#0893e1">Your fortune: You Will Be Blessed With Many Black Bulls</b>','<b style="color:#16f174">Your fortune: NEETmax, The Day Is Lost If You Venture Outside</b>','<b style="color:#fd4d32">Your fortune: A Taste Of Jannah Awaits You Today</b>','<b style="color:#bac200">Your fortune: Watch Your Back</b>','<b style="color:#6023f8">Your fortune: Outlook good</b>','<b style="color:#d302a7">Your fortune: Godly Luck</b>','<b style="color:#e7890c">Your fortune: Good Luck</b>','<b style="color:#7fec11">Your fortune: Bad Luck</b>','<b style="color:#43fd3b">Your fortune: Good news will come to you by mail</b>','<b style="color:#9d05da">Your fortune: Very Bad Luck</b>','<b style="color:#00cbb0">Your fortune: キタ━━━━━━(゚∀゚)━━━━━━ !!!!</b>','<b style="color:#2a56fb">Your fortune: Better not tell you now</b>','<b style="color:#0893e1">Your fortune: You will meet a dark handsome stranger</b>','<b style="color:#16f174">Your fortune:  ´_ゝ`)フーン</b>','<b style="color:#fd4d32">Your fortune: Excellent Luck</b>','<b style="color:#bac200">Your fortune: Average Luck</b>')
@ -853,7 +799,10 @@ WORDLE_LIST = ('aaron','about','above','abuse','acids','acres','actor','acute','
dues = int(environ.get("DUES").strip())
christian_emojis = (':#marseyjesus:',':#marseyimmaculate:',':#marseymothermary:',':#marseyfatherjoseph:',':#gigachadorthodox:',':#marseyorthodox:',':#marseyorthodoxpat:')
christian_emojis = [':#marseyjesus:',':#marseyimmaculate:',':#marseymothermary:',
':#marseyfatherjoseph:',':#gigachadorthodox:',':#marseyorthodox:',':#marseyorthodoxpat:',
':#marseycrucified:',':#chadjesus:',':#marseyandjesus:',':#marseyjesus2:',
':#marseyorthodoxsmug:',':#marseypastor:',':#marseypope:',]
db = db_session()
marseys_const = [x[0] for x in db.query(Marsey.name).filter(Marsey.name!='chudsey').all()]
@ -1055,6 +1004,3 @@ linefeeds_regex = re.compile("([^\n])\n([^\n])", flags=re.A)
def make_name(*args, **kwargs): return request.base_url
LOTTERY_ENABLED = True
LOTTERY_TICKET_COST = 12
LOTTERY_SINK_RATE = 3

View File

@ -32,7 +32,7 @@ TLDS = ( # Original gTLDs and ccTLDs
'vu','wf','ws','xn','xxx','ye','yt','yu','za','zm','zw',
# New gTLDs
'app','cleaning','club','florist','fun','gay','lgbt','life','lol',
'moe','mom','monster','pics','win','wtf','xyz',
'moe','mom','monster','pics','pub','win','wtf','xyz',
)
allowed_tags = ('b','blockquote','br','code','del','em','h1','h2','h3','h4','h5','h6','hr','i',

View File

@ -169,6 +169,10 @@ def log_item(id, v):
return render_template("log.html", v=v, actions=[action], next_exists=False, page=1, action=action, admins=admins, types=types)
@app.get("/directory")
@auth_required
def static_megathread_index(v):
return render_template("megathread_index.html", v=v)
@app.get("/api")
@auth_required

View File

@ -68,7 +68,7 @@
{% if v %}
{% if v.notifications_count %}
<a class="mobile-nav-icon d-md-none" href="/notifications{% if v.do_posts %}?posts=true{% elif v.do_reddit %}?reddit=true{% endif %}" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Notifications"><i class="fas fa-bell align-middle text-danger" {% if v.do_posts %}style="color:blue!important"{% elif v.do_reddit %}style="color:#805ad5!important"{% endif %}></i><span class="notif-count ml-1" style="padding-left: 4.5px;{% if v.do_posts %}background:blue{% elif v.do_reddit %}background:#805ad5{% endif %}">{{v.notifications_count}}</span></a>
<a class="mobile-nav-icon d-md-none" href="/notifications{% if v.notifications_do %}?{{v.notifications_do}}=true{% endif %}" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Notifications"><i class="fas fa-bell align-middle" style="color: {{v.notifications_color}}"></i><span class="notif-count ml-1" style="padding-left: 4.5px;{% if v.notifications_do %}background:{{v.notifications_color}}{% endif %}">{{v.notifications_count}}</span></a>
{% else %}
<a class="mobile-nav-icon d-md-none" href="/notifications" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Notifications"><i class="fas fa-bell align-middle text-gray-500 black"></i></a>
{% endif %}
@ -108,7 +108,7 @@
{% if v.notifications_count %}
<li class="nav-item d-flex align-items-center text-center justify-content-center mx-1">
<a class="nav-link position-relative" href="/notifications{% if v.do_posts %}?posts=true{% elif v.do_reddit %}?reddit=true{% endif %}" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Notifications"><i class="fas fa-bell text-danger" {% if v.do_posts %}style="color:blue!important"{% elif v.do_reddit %}style="color:#805ad5!important"{% endif %}></i><span class="notif-count ml-1" style="padding-left: 4.5px;{% if v.do_posts %}background:blue{% elif v.do_reddit %}background:#805ad5{% endif %}">{{v.notifications_count}}</span></a>
<a class="nav-link position-relative" href="/notifications{% if v.notifications_do %}?{{v.notifications_do}}=true{% endif %}" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Notifications"><i class="fas fa-bell" style="color: {{v.notifications_color}}"></i><span class="notif-count ml-1" style="padding-left: 4.5px;{% if v.notifications_do %}background:{{v.notifications_color}}{% endif %}">{{v.notifications_count}}</span></a>
</li>
{% else %}
<li class="nav-item d-flex align-items-center text-center justify-content-center mx-1">
@ -195,6 +195,7 @@
{% if SITE_NAME == 'rDrama' %}
<a class="dropdown-item" href="/discord"><i class="fab fa-discord fa-fw mr-3"></i>Discord</a>
<a class="dropdown-item" href="/post/75863/"><i class="fas fa-square-share-nodes fa-fw mr-3"></i>Fediverse</a>
{% endif %}
{% if SITE_NAME not in ('Cringetopia', 'WPD') %}
<a class="dropdown-item" rel="nofollow noopener noreferrer" href="{{config('GUMROAD_LINK')}}"><i class="fas fa-dollar-sign fa-fw mr-3"></i>Donate</a>
@ -253,6 +254,7 @@
{% if SITE_NAME == 'rDrama' %}
<a class="nav-item nav-link" href="/discord"><i class="fab fa-discord fa-fw mr-3"></i>Discord</a>
<a class="nav-item nav-link" href="/post/75863/"><i class="fas fa-square-share-nodes fa-fw mr-3"></i>Fediverse</a>
{% endif %}
{% if SITE_NAME not in ('Cringetopia', 'WPD') %}
<a class="nav-item nav-link" rel="nofollow noopener noreferrer" href="{{config('GUMROAD_LINK')}}"><i class="fas fa-dollar-sign fa-fw mr-3"></i>Donate</a>

View File

@ -0,0 +1,64 @@
{% extends "default.html" %}
{# Title (~25char max), Description (~80char max),
Icon (fa-foo-bar), Color (#ff0000), URL (/post/12345/) #}
{%-
set MEGATHREAD_INDEX = [
(
'Bugs / Suggestions',
'Something broken? Improvements?',
'fa-bug', '#6b8e23',
'/post/18459',
),
(
'Submit Marseys',
'For original Marseys or other emoji.',
'fa-cat', '#ffa500',
'/post/16583',
),
(
'Submit Sidebar Art',
'Original rDrama-themed works.',
'fa-sidebar', '#f5fffa',
'/post/75878',
),
(
'Submit Banner Art',
'Original chud-repellant works.',
'fa-panorama', '#87cefa',
'/post/35835',
),
(
'Submit Snappy Quotes',
'Sentient.',
'fa-robot', '#adff2f',
'/post/33652',
),
(
'Marsey Commissions',
'Request a Marsey to be made.',
'fa-coins', '#ffd700',
'/post/37677',
),
(
'Gambling Spam',
'Goomble without bothering people.',
'fa-dice-six', '#c9d1d9',
'/post/39413',
),
]
-%}
{% block content %}
<div id="directory--wrapper">
{% for thread in MEGATHREAD_INDEX %}
<a role="button" class="directory--link" href="{{thread[4]}}">
<div class="directory--link-content">
<i class="directory--link--icon fas {{thread[2]}}" style="color:{{thread[3]}}"></i>
<div class="directory--link--title">{{thread[0]|safe}}</div>
<div class="directory--link--description">{{thread[1]|safe}}</div>
</div>
</a>
{% endfor %}
</div>
{% endblock %}

View File

@ -17,12 +17,12 @@
<ul class="nav settings-nav" style="padding:0 0 0 20px" id="notifications--nav-list">
<li class="nav-item">
<a class="nav-link py-3{% if not '=true' in request.full_path %} active{% endif %}" href="/notifications">
All {% if v.normal_count %} <span class="font-weight-bold" style="color:red">({{v.normal_count}})</span>{% endif %}
All {% if v.normal_notifications_count %}<span class="font-weight-bold" style="color:#ff0000">({{v.normal_notifications_count}})</span>{% endif %}
</a>
</li>
<li class="nav-item">
<a class="nav-link py-3{% if '/notifications?posts=true' in request.full_path %} active{% endif %}" href="/notifications?posts=true">
Posts {% if v.post_notifications_count %}<span class="font-weight-bold" style="color:blue">({{v.post_notifications_count}})</span>{% endif %}
Posts {% if v.post_notifications_count %}<span class="font-weight-bold" style="color:#0000ff">({{v.post_notifications_count}})</span>{% endif %}
</a>
</li>
<li class="nav-item">

View File

@ -73,24 +73,21 @@ set VISITORS_HERE_FLAVOR = [
<a class="btn btn-primary btn-block mb-3" href="/h/{{sub.name}}/followers">HOLE FOLLOWERS</a>
<a class="btn btn-primary btn-block mb-3" href="/h/{{sub.name}}/blockers">HOLE BLOCKERS</a>
{% else %}
<a id="sidebar--directory--btn" class="btn btn-primary btn-block mb-3" href="/directory">
<span id="sidebar--directory--head">DIRECTORY</span>
<span id="sidebar--directory--subhead">Submit Marseys & Art | Info Megathreads</span>
</a>
<a class="btn btn-primary btn-block mb-3" href="/holes">BROWSE HOLES</a>
{% if v %}
<a class="btn btn-primary btn-block mb-3" href="/create_hole">CREATE HOLE</a>
{% endif %}
<a class="btn btn-primary btn-block mb-3" href="/post/16583">EMOJI MEGATHREAD</a>
<a class="btn btn-primary btn-block mb-3" href="/post/18459">BUGS/SUGGESTIONS MEGATHREAD</a>
<a class="btn btn-primary btn-block mb-3" href="/post/75878">SIDEBAR ARTWORK MEGATHREAD</a>
<a class="btn btn-primary btn-block mb-3" href="/post/33652">SNAPPY QUOTES MEGATHREAD</a>
<a class="btn btn-primary btn-block mb-3" href="/post/35835">BANNER ARTWORK MEGATHREAD</a>
<a class="btn btn-primary btn-block mb-3" href="/post/37677">EMOJI REQUESTS MEGATHREAD</a>
<a class="btn btn-primary btn-block mb-3" href="/post/39413">GAMBLING MEGATHREAD</a>
<div class="rules mt-5">
<h3>Rules:</h3><br>
<a href="/post/19711/a-short-guide-on-how-to" style="color:red;font-weight:bold">- NO RIGHTWING AGENDAPOSTING.</a><br><br>
- Don't post anything illegal.<br><br>
- Dont post anything illegal.<br><br>
- No sexualizing minors even as a “joke”.<br><br>

View File

@ -11,6 +11,8 @@
{% set voted=-2 %}
{% endif %}
{% set v_forbid_deleted = (p.deleted_utc != 0) and not (v and v.admin_level >= 2) and not (v and v.id == p.author_id) %}
{% block title %}
<style>
@ -590,19 +592,23 @@
{% if p.author %}<meta property="og:article:author" content="{{'@'+p.author_name}}">{% endif %}
<meta property="article:published_time" content="{{p.created_datetime}}">
{% if p.edited_utc %}<meta property="article:modified_time" content="{{p.edited_string}}">{% endif %}
<meta property="og:description" name="description" content="{{p.plainbody(v)}}">
{% if p.author %}<meta property="og:author" name="author" content="{{'@'+p.author_name}}">{% endif %}
{% if not v_forbid_deleted -%}
<meta property="og:description" name="description" content="{{p.plainbody(v)}}">
<meta property="og:title" content="{{p.plaintitle(v)}} - {{SITE_NAME}}">
<meta property="og:image" content="{% if p.is_image %}{{p.realurl(v)}}{% elif p.has_thumb%}{{p.thumb_url}}{% else %}{{SITE_NAME}}/assets/images/{{SITE_NAME}}/site_preview.webp?v=1016{% endif %}">
<meta property="og:url" content="{{p.permalink}}">
{%- endif %}
<meta property="og:site_name" content="{{request.host}}">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="{{SITE_FULL}}">
<meta name="twitter:title" content="{{p.plaintitle(v)}} - {{SITE_NAME}}">
{% if not v_forbid_deleted -%}
{% if p.author %}<meta name="twitter:creator" content="{{'@'+p.author_name}}">{% endif %}
<meta name="twitter:description" content="{{p.plainbody(v)}}">
<meta name="twitter:image" content="{% if p.is_image %}{{p.realurl(v)}}{% elif p.has_thumb %}{{p.thumb_url}}{% else %}{{SITE_NAME}}/assets/images/{{SITE_NAME}}/site_preview.webp?v=1016{% endif %}">
{%- endif %}
<meta name="twitter:url" content="{{p.permalink}}">
{% endif %}
@ -740,7 +746,7 @@
</ul>
</div>
{% endif %}
{% if p.realurl(v) %}
{% if p.realurl(v) and not v_forbid_deleted %}
<h1 id="post-title" class="card-title post-title text-left mb-md-3 {% if p.author.agendaposter %}agendaposter{% endif %}"><a {% if not v or v.newtabexternal %}target="_blank"{% endif %} rel="nofollow noopener noreferrer" href="{{p.realurl(v)}}">
{% if p.club %}<span class="patron font-weight-bolder mr-1" style="background-color:red; font-size:12px; line-height:2;">{{CC}}</span>{% endif %}
{% if p.flair %}<span class="patron font-weight-bolder mr-1" style="background-color:var(--primary); font-size:12px; line-height:2;">{{p.flair | safe}}</span>{% endif %}
@ -754,6 +760,7 @@
</h1>
{% endif %}
{% if not v_forbid_deleted %}
<div id="post-body" class="post-body mt-3">
{% if p.realurl(v) %}
{% if not p.embed_url and not p.is_image and not p.is_video and not p.is_audio %}
@ -816,6 +823,11 @@
</div>
</div>
{% else %}
<div id="post-body" class="post-body mt-3">
<div id="post-text"><code>[Deleted by author.]</code></div>
</div>
{% endif %}
{% if v and (v.id==p.author_id or v.admin_level > 2) and not v.is_suspended %}
<div id="edit-post-body-{{p.id}}" class="d-none comment-write collapsed child">
@ -875,7 +887,7 @@
<a class="list-inline-item" role="button" onclick="togglePostEdit('{{p.id}}')"><i class="fas fa-edit"></i>Edit</a>
{% endif %}
{% if v and v.id != p.author_id and p.body %}
{% if v and v.id != p.author_id and p.body and not v_forbid_deleted %}
<a class="list-inline-item" role="button" onclick="expandMarkdown(this,'{{p.id}}')"><i class="fas text-expand-icon-{{p.id}} fa-expand-alt"></i><span>View source</span></a>
{% endif %}
@ -978,7 +990,7 @@
</div>
{% if v and v.id != p.author_id and p.body %}
{% if v and v.id != p.author_id and p.body and not v_forbid_deleted %}
<textarea autocomplete="off" class="d-none card border my-2 p-3 comment-box form-control rounded" id="markdown-{{p.id}}" readonly>{{p.body.strip()}}</textarea>
{% endif %}

View File

@ -429,7 +429,7 @@
<br><span id="profile--joined">joined <span data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{u.created_datetime}}" class="font-weight-bold">{{u.created_date}}</span></span>
</div>
{% if u.bio_html %}
<p class="text-muted text-break" id="profile--bio">{{u.bio_html | safe}}</p>
<div class="text-muted text-break" id="profile--bio">{{u.bio_html | safe}}</div>
{% endif %}
{% if u.friends_html %}

View File

@ -1,6 +1,6 @@
{%-
set CACHE_VER = {
'css/main.css': 312,
'css/main.css': 316,
'css/4chan.css': 60,
'css/classic.css': 59,