* remove backgrounds (fixes #379) * remove UI elements * remove gif modals lol * . * remove unused gif modal. * add alembic migration
This commit is contained in:
parent
7aa3dc373e
commit
56087f889e
11 changed files with 43 additions and 291 deletions
|
@ -1,76 +0,0 @@
|
|||
@charset "UTF-8";
|
||||
|
||||
:root {
|
||||
--dark: #383838;
|
||||
--secondary: #383838;
|
||||
--white: #E1E1E1;
|
||||
--black: #CFCFCF;
|
||||
--light: transparent;
|
||||
--muted: #E1E1E1;
|
||||
--gray: #383838;
|
||||
--gray-100: #E1E1E1;
|
||||
--gray-200: #E1E1E1;
|
||||
--gray-300: #383838;
|
||||
--gray-400: #303030;
|
||||
--gray-500: #21262d;
|
||||
--gray-600: transparent;
|
||||
--gray-700: transparent;
|
||||
--gray-800: transparent;
|
||||
--gray-900: transparent;
|
||||
--background: #21262d;
|
||||
}
|
||||
|
||||
|
||||
|
||||
* {
|
||||
border-color: var(--primary);
|
||||
}
|
||||
|
||||
.border {
|
||||
border-color: var(--primary) !important;
|
||||
}
|
||||
|
||||
.form-control {
|
||||
border-color: var(--primary) !important;
|
||||
}
|
||||
|
||||
.btn {
|
||||
border-color: var(--primary) !important;
|
||||
}
|
||||
|
||||
.form-control:disabled, .form-control[readonly] {
|
||||
border-color: var(--primary) !important;
|
||||
}
|
||||
|
||||
.btn-success {
|
||||
border-color: #38A169 !important;
|
||||
}
|
||||
|
||||
.btn-danger {
|
||||
border-color: #E53E3E !important;
|
||||
}
|
||||
|
||||
pre {
|
||||
color: #CFCFCF;
|
||||
}
|
||||
|
||||
.container {
|
||||
background: rgba(28, 34, 41, 0.90) !important;
|
||||
border-radius: 0 !important;
|
||||
}
|
||||
|
||||
.dropdown-menu {
|
||||
background-color: var(--gray-500);
|
||||
}
|
||||
|
||||
.form-inline.search .form-control:active, .form-inline.search .form-control:focus {
|
||||
background-color: var(--gray-500);
|
||||
}
|
||||
|
||||
.form-control:focus, .form-control:active {
|
||||
background-color: var(--gray-500);
|
||||
}
|
||||
|
||||
#frontpage .post-title a:visited, .visited {
|
||||
color: #7a7a7a !important;
|
||||
}
|
Binary file not shown.
Before Width: | Height: | Size: 85 KiB |
|
@ -41,7 +41,6 @@ class User(Base):
|
|||
id = Column(Integer, primary_key=True)
|
||||
username = Column(String(length=255), nullable=False)
|
||||
namecolor = Column(String(length=6), default=DEFAULT_COLOR, nullable=False)
|
||||
background = Column(String)
|
||||
customtitle = Column(String)
|
||||
customtitleplain = deferred(Column(String))
|
||||
titlecolor = Column(String(length=6), default=DEFAULT_COLOR, nullable=False)
|
||||
|
|
|
@ -37,8 +37,8 @@ ROLES={}
|
|||
|
||||
LEADERBOARD_LIMIT: Final[int] = 25
|
||||
|
||||
THEMES = {"TheMotte", "dramblr", "reddit", "transparent", "win98", "dark",
|
||||
"light", "coffee", "tron", "4chan", "midnight"}
|
||||
THEMES = ["TheMotte", "dramblr", "reddit", "win98", "dark",
|
||||
"light", "coffee", "tron", "4chan", "midnight"]
|
||||
SORTS_COMMON = {
|
||||
"top": 'fa-arrow-alt-circle-up',
|
||||
"bottom": 'fa-arrow-alt-circle-down',
|
||||
|
|
|
@ -22,26 +22,13 @@ tiers={
|
|||
"(LlamaBean)": 1,
|
||||
}
|
||||
|
||||
@app.post("/settings/removebackground")
|
||||
@limiter.limit("1/second;30/minute;200/hour;1000/day")
|
||||
@auth_required
|
||||
def removebackground(v):
|
||||
v.background = None
|
||||
g.db.add(v)
|
||||
g.db.commit()
|
||||
return {"message": "Background removed!"}
|
||||
|
||||
@app.post("/settings/profile")
|
||||
@limiter.limit("1/second;30/minute;200/hour;1000/day")
|
||||
@auth_required
|
||||
def settings_profile_post(v):
|
||||
updated = False
|
||||
|
||||
if request.values.get("background", v.background) != v.background:
|
||||
updated = True
|
||||
v.background = request.values.get("background")
|
||||
|
||||
elif request.values.get("reddit", v.reddit) != v.reddit:
|
||||
if request.values.get("reddit", v.reddit) != v.reddit:
|
||||
reddit = request.values.get("reddit")
|
||||
if reddit in {'old.reddit.com', 'reddit.com', 'i.reddit.com', 'teddit.net', 'libredd.it', 'unddit.com'}:
|
||||
updated = True
|
||||
|
@ -226,10 +213,11 @@ def settings_profile_post(v):
|
|||
theme = request.values.get("theme")
|
||||
if theme:
|
||||
if theme in THEMES:
|
||||
if theme == "transparent" and not v.background:
|
||||
abort(400, "You need to set a background to use the transparent theme!")
|
||||
v.theme = theme
|
||||
if theme == "win98": v.themecolor = "30409f"
|
||||
if theme == "win98":
|
||||
v.themecolor = "30409f"
|
||||
else:
|
||||
v.themecolor = "fff"
|
||||
updated = True
|
||||
else: abort(400)
|
||||
|
||||
|
@ -285,7 +273,6 @@ def changelogsub(v):
|
|||
@limiter.limit("1/second;30/minute;200/hour;1000/day")
|
||||
@auth_required
|
||||
def namecolor(v):
|
||||
|
||||
color = str(request.values.get("color", "")).strip()
|
||||
if color.startswith('#'): color = color[1:]
|
||||
if len(color) != 6: return render_template("settings_security.html", v=v, error="Invalid color code")
|
||||
|
@ -298,7 +285,6 @@ def namecolor(v):
|
|||
@limiter.limit("1/second;30/minute;200/hour;1000/day")
|
||||
@auth_required
|
||||
def themecolor(v):
|
||||
|
||||
themecolor = str(request.values.get("themecolor", "")).strip()
|
||||
if themecolor.startswith('#'): themecolor = themecolor[1:]
|
||||
if len(themecolor) != 6: return render_template("settings_security.html", v=v, error="Invalid color code")
|
||||
|
@ -311,7 +297,6 @@ def themecolor(v):
|
|||
@limiter.limit("1/second;30/minute;200/hour;1000/day")
|
||||
@auth_required
|
||||
def titlecolor(v):
|
||||
|
||||
titlecolor = str(request.values.get("titlecolor", "")).strip()
|
||||
if titlecolor.startswith('#'): titlecolor = titlecolor[1:]
|
||||
if len(titlecolor) != 6: return render_template("settings_profile.html", v=v, error="Invalid color code")
|
||||
|
|
|
@ -213,8 +213,7 @@
|
|||
|
||||
</head>
|
||||
|
||||
<body id="{% if request.path != '/comments' %}{% block pagetype %}frontpage{% endblock %}{% endif %}" {% if v and v.background %}style="{% if path != '/formatting' %}overflow-x: hidden; {% endif %} background:url(/assets/images/backgrounds/{{v.background}}?v=3) center center fixed; background-color: var(--background){% if 'anime' not in v.background %};background-size: cover{% endif %}"{% endif %}>
|
||||
|
||||
<body id="{% if request.path != '/comments' %}{% block pagetype %}frontpage{% endblock %}{% endif %}">
|
||||
{% include "header.html" %}
|
||||
|
||||
{% block Banner %}
|
||||
|
|
|
@ -43,15 +43,11 @@
|
|||
{% endif %}
|
||||
</head>
|
||||
|
||||
<body id="settings" {% if v and v.background %}style="overflow-x: hidden;background:url(/assets/images/backgrounds/{{v.background}}?v=3) center center fixed; background-color: var(--background){% if 'anime' not in v.background %};background-size: cover{% endif %}"{% endif %}>
|
||||
|
||||
<body id="settings">
|
||||
{% include "header.html" %}
|
||||
<div class="container">
|
||||
|
||||
<div class="row justify-content-around">
|
||||
|
||||
<div class="col h-100">
|
||||
|
||||
{% if error %}
|
||||
<div class="alert alert-danger alert-dismissible fade show my-3" role="alert">
|
||||
<i class="fas fa-exclamation-circle my-auto"></i>
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
|
@ -50,12 +49,9 @@
|
|||
{% endif %}
|
||||
</head>
|
||||
|
||||
<body id="settings2" {% if v and v.background %}style="overflow-x: hidden;background:url(/assets/images/backgrounds/{{v.background}}?v=3) center center fixed; background-color: var(--background){% if 'anime' not in v.background %};background-size: cover{% endif %}"{% endif %}>
|
||||
|
||||
<body id="settings2">
|
||||
{% include "header.html" %}
|
||||
|
||||
{% block subNav %}
|
||||
|
||||
{% set mod = (v and v.admin_level > 1) %}
|
||||
<div class="container-fluid bg-white d-none d-md-block" style="padding-top: 50px; padding-bottom: 0 !important;">
|
||||
<div class="row box-shadow-bottom">
|
||||
|
|
|
@ -1,69 +1,38 @@
|
|||
{% extends "settings.html" %}
|
||||
|
||||
{% block pagetitle %}Profile Settings - {{SITE_TITLE}}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<style>
|
||||
.bg-image {
|
||||
padding: 0.25rem;
|
||||
width: 15rem;
|
||||
height: 10rem;
|
||||
object-fit: cover;
|
||||
}
|
||||
.bg-button {
|
||||
margin: 0.25rem;
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="posts" class="row">
|
||||
|
||||
<div class="col col-lg-10">
|
||||
|
||||
<div class="settings">
|
||||
|
||||
<h2 class="h5" name="referral">Theme</h2>
|
||||
|
||||
<div class="settings-section rounded">
|
||||
|
||||
<div class="d-lg-flex border-bottom">
|
||||
|
||||
<div class="title w-lg-25">
|
||||
<label for="cardview">Card View</label>
|
||||
</div>
|
||||
|
||||
<div class="body w-lg-100">
|
||||
|
||||
<div class="custom-control custom-switch">
|
||||
<input autocomplete="off" type="checkbox" class="custom-control-input" id="cardview" name="cardview"{% if v.cardview %} checked{% endif %} onchange="post_toast(this,'/settings/profile?cardview='+document.getElementById('cardview').checked);">
|
||||
<label class="custom-control-label" for="cardview"></label>
|
||||
</div>
|
||||
|
||||
<span class="text-small-extra text-muted">Enable if you would like to display images and videos in full size on the frontpage.</span>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="d-lg-flex border-bottom">
|
||||
|
||||
<div class="title w-lg-25">
|
||||
<label for="highlightcomments">Highlight New Comments</label>
|
||||
</div>
|
||||
|
||||
<div class="body w-lg-100">
|
||||
|
||||
<div class="custom-control custom-switch">
|
||||
<input autocomplete="off" type="checkbox" class="custom-control-input" id="highlightcomments" name="highlightcomments"{% if v.highlightcomments %} checked{% endif %} onchange="post_toast(this,'/settings/profile?highlightcomments='+document.getElementById('highlightcomments').checked);">
|
||||
<label class="custom-control-label" for="highlightcomments"></label>
|
||||
</div>
|
||||
|
||||
<span class="text-small-extra text-muted">Enable if you would like to highlight comments made after the last time you visited a thread.</span>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -71,7 +40,6 @@
|
|||
<div class="title w-lg-25">
|
||||
<label for="theme">Website Theme</label>
|
||||
</div>
|
||||
|
||||
<div class="body w-lg-100">
|
||||
<p>Change the theme for the website.</p>
|
||||
<div class="input-group mb2">
|
||||
|
@ -83,51 +51,17 @@
|
|||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="d-lg-flex border-bottom">
|
||||
<div class="title w-lg-25">
|
||||
<label for="theme">Website Backgrounds</label>
|
||||
</div>
|
||||
<div class="body w-lg-100">
|
||||
<p>Change the background for the website.</p>
|
||||
<div class="input-group mb2">
|
||||
<select autocomplete="off" id='backgroundSelector' class="form-control" form="profile-settings" name="background" onchange="updatebgselection();">
|
||||
{% for entry in ["space"] %}
|
||||
<option value="{{entry}}" {% if v.background and v.background.startswith(entry) %}selected{% endif %}>
|
||||
{{entry}}
|
||||
</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
{% if v.background %}
|
||||
<div class="d-flex mt-2">
|
||||
<a class="btn btn-primary ml-auto" role="button" onclick="post_toast(this,'/settings/removebackground','1')">Remove Background</a>
|
||||
<pre></pre>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div id="bgcontainer"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2 class="h5">Profile Picture</h2>
|
||||
|
||||
<div class="settings-section rounded">
|
||||
|
||||
<div class="d-flex">
|
||||
|
||||
<div class="title w-lg-25 text-md-center">
|
||||
<img loading="lazy" alt="your profile picture" src="{{v.profile_url}}" class="profile-pic-75">
|
||||
</div>
|
||||
|
||||
<div class="body w-lg-100 my-auto">
|
||||
|
||||
<div class="d-flex">
|
||||
|
||||
<div>
|
||||
<form action="/settings/images/profile" method="post" enctype="multipart/form-data">
|
||||
<input type="hidden" name="formkey" value="{{v.formkey}}">
|
||||
|
@ -135,32 +69,21 @@
|
|||
Update<input autocomplete="off" type="file" accept="image/*" {% if request.headers.get('cf-ipcountry')=="T1" %}disabled{% endif %} hidden name="profile" onchange="form.submit()">
|
||||
</label>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="text-small-extra text-muted mt-3">JPG, PNG, GIF files are supported. Max file size is {% if v and v.patron %}8{% else %}4{% endif %} MB.</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<h2 class="h5">Profile Banner</h2>
|
||||
|
||||
<div class="settings-section rounded">
|
||||
|
||||
<div class="d-flex">
|
||||
|
||||
<div class="title w-lg-75 text-md-center">
|
||||
<img loading="lazy" alt="your banner" src="{{v.banner_url}}" class="banner-pic-135">
|
||||
</div>
|
||||
|
||||
<div class="body w-lg-100 my-auto">
|
||||
|
||||
<div class="d-flex">
|
||||
|
||||
<div>
|
||||
<form action="/settings/images/banner" method="post" enctype="multipart/form-data">
|
||||
<input type="hidden" name="formkey" value="{{v.formkey}}">
|
||||
|
@ -168,83 +91,49 @@
|
|||
Update<input autocomplete="off" type="file" {% if request.headers.get('cf-ipcountry')=="T1" %}disabled{% endif %} accept="image/*" hidden name="banner" onchange="form.submit()">
|
||||
</label>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="text-small-extra text-muted mt-3">JPG, PNG, GIF files are supported. Max file size is {% if v and v.patron %}8{% else %}4{% endif %} MB.</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<h2 class="h5" id="referral" name="referral">Referrals</h2>
|
||||
|
||||
<p class="text-small text-muted">Invite a friend.</p>
|
||||
|
||||
<div class="settings-section rounded">
|
||||
|
||||
<div class="d-lg-flex">
|
||||
|
||||
<div class="title w-lg-25">
|
||||
<label for="referral_code">Referral code</label>
|
||||
</div>
|
||||
|
||||
<div class="body w-lg-100">
|
||||
|
||||
<div class="input-group">
|
||||
|
||||
<input autocomplete="off" type="text" readonly="" class="form-control copy-link" id="referral_code" value="{{SITE_FULL}}/signup?ref={{v.username}}" data-clipboard-text="{{SITE_FULL}}/signup?ref={{v.username}}">
|
||||
|
||||
<span class="input-group-append" data-bs-toggle="tooltip" data-bs-placement="top" title="You have referred {{v.referral_count}} user{{'s' if v.referral_count != 1 else ''}} so far. {% if v.referral_count==0 %}¯\_(ツ)_/¯{% elif v.referral_count>10%}Wow!{% endif %}">
|
||||
<span class="input-group-text text-primary border-0">
|
||||
<i class="far fa-user mr-1" aria-hidden="true"></i>{{v.referral_count}}</span>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="text-small-extra text-muted mt-3">Share this link with a friend. {% if v.referral_count==0 %} When they sign up, you'll get the bronze recruitment badge.{% elif v.referral_count<10 %} When you refer 10 friends, you'll receive the silver recruitment badge.{% elif v.referral_count<100 %} When you refer 100 friends, you'll receive the gold recruitment badge.{% endif %}</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<h2 class="h5" name="referral">RSS Feed</h2>
|
||||
|
||||
<p class="text-small text-muted">Subscribe to the {{SITE_TITLE}} RSS feed.</p>
|
||||
|
||||
<div class="settings-section rounded">
|
||||
|
||||
<div class="d-lg-flex">
|
||||
|
||||
<div class="body w-lg-100">
|
||||
|
||||
<input autocomplete="off" type="text" readonly="" class="form-control copy-link" id="rss_feed" value="{{SITE_FULL}}/rss/new/all" data-clipboard-text="{{SITE_FULL}}/rss/new/all">
|
||||
|
||||
<div class="text-small-extra text-muted mt-3">You can change the feed by replacing "new" with whatever sorting you want and "all" with whatever time filter you want.</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<h2 class="h5" id="bio" name="bio">Your Profile</h2>
|
||||
|
||||
<p class="text-small text-muted">Edit how others see you on {{SITE_TITLE}}.</p>
|
||||
|
||||
<div class="settings-section rounded mb-0">
|
||||
|
||||
<div class="body d-lg-flex border-bottom">
|
||||
|
||||
<label class="text-black w-lg-25">Username</label>
|
||||
|
||||
<div class="w-lg-100">
|
||||
<p>Your original username will always stay reserved for you: <code>{{v.original_username}}</code></p>
|
||||
|
||||
|
@ -257,15 +146,11 @@
|
|||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="body d-lg-flex border-bottom">
|
||||
|
||||
<label class="text-black w-lg-25">Flair</label>
|
||||
|
||||
<div class="w-lg-100">
|
||||
|
||||
<form id="profile-settings" action="/settings/title_change" method="post">
|
||||
<input type="hidden" name="formkey" value="{{v.formkey}}">
|
||||
<input maxlength=100 {% if v.flairchanged %}disabled{% endif %} autocomplete="off" id="customtitlebody" type="text" name="title" class="form-control" placeholder='Enter a flair here' value="{% if v.flairchanged %}Your flair has been locked until {{ti}}{% elif v.customtitleplain %}{{v.customtitleplain}}{% endif %}">
|
||||
|
@ -275,15 +160,11 @@
|
|||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="body d-lg-flex border-bottom">
|
||||
|
||||
<label class="text-black w-lg-25">Flair Color</label>
|
||||
|
||||
<div class="d-flex">
|
||||
|
||||
<form action="/settings/titlecolor" id="titlecolor-form" method="post" class="color-picker" style="line-height: 0">
|
||||
<input type="hidden" name="formkey" value="{{v.formkey}}">
|
||||
|
||||
|
@ -299,12 +180,8 @@
|
|||
</span>
|
||||
</label>
|
||||
{% endfor %}
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<p class="text-small mb-2">Or type a color code:</p>
|
||||
<div class="d-flex">
|
||||
|
@ -317,18 +194,10 @@
|
|||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{% if v.verified %}
|
||||
|
||||
<div class="body d-lg-flex border-bottom">
|
||||
|
||||
<label class="text-black w-lg-25">Bluecheck Color</label>
|
||||
|
||||
<div class="d-flex">
|
||||
|
||||
<form action="/settings/verifiedcolor" id="verifiedcolor-form" method="post" class="color-picker" style="line-height: 0">
|
||||
<input type="hidden" name="formkey" value="{{v.formkey}}">
|
||||
|
||||
|
@ -361,12 +230,8 @@
|
|||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
|
||||
<div class="body d-lg-flex border-bottom">
|
||||
|
||||
<label class="text-black w-lg-25">Bio</label>
|
||||
|
||||
<div class="w-lg-100">
|
||||
<form id="profile-bio" action="/settings/profile" method="post" enctype="multipart/form-data">
|
||||
<input type="hidden" name="formkey" value="{{v.formkey}}">
|
||||
|
@ -394,14 +259,10 @@
|
|||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="body d-lg-flex border-bottom">
|
||||
|
||||
<label class="text-black w-lg-25">Friends</label>
|
||||
|
||||
<div class="w-lg-100">
|
||||
<form id="profile-friends" action="/settings/profile" method="post" enctype="multipart/form-data">
|
||||
<input type="hidden" name="formkey" value="{{v.formkey}}">
|
||||
|
@ -414,58 +275,39 @@
|
|||
<input autocomplete="off" class="btn btn-primary ml-auto" id="friendsSave" type="submit" value="Save Changes">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="d-lg-flex border-bottom">
|
||||
|
||||
<div class="title w-lg-25">
|
||||
<label for="privateswitch">Private Mode</label>
|
||||
</div>
|
||||
|
||||
<div class="body w-lg-100">
|
||||
|
||||
<div class="custom-control custom-switch">
|
||||
<input autocomplete="off" type="checkbox" class="custom-control-input" id="privateswitch" name="private"{% if v.is_private%} checked{% endif %} onchange="post_toast(this,'/settings/profile?private='+document.getElementById('privateswitch').checked)">
|
||||
<label class="custom-control-label" for="privateswitch"></label>
|
||||
</div>
|
||||
|
||||
<span class="text-small-extra text-muted">This will hide your post and comment history from others. We will also ask search engines to not index your profile page. (Your content will still be accessible via direct link.)</span>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="d-lg-flex border-bottom">
|
||||
|
||||
<div class="title w-lg-25">
|
||||
<label for="nofollowswitch">Disable Subscriptions</label>
|
||||
</div>
|
||||
|
||||
<div class="body w-lg-100">
|
||||
|
||||
<div class="custom-control custom-switch">
|
||||
<input autocomplete="off" type="checkbox" class="custom-control-input" id="nofollowswitch" name="nofollow"{% if v.is_nofollow%} checked{% endif %} onchange="post_toast(this,'/settings/profile?nofollow='+document.getElementById('nofollowswitch').checked)">
|
||||
<label class="custom-control-label" for="nofollowswitch"></label>
|
||||
</div>
|
||||
|
||||
<span class="text-small-extra text-muted">Prevent other users from following you.</span>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script src="{{ 'js/settings_profile.js' | asset }}"></script>
|
||||
{% endblock %}
|
||||
|
|
|
@ -34,31 +34,19 @@
|
|||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
<body id="submit" {% if v and v.background %}style="overflow-x: hidden; background:url(/assets/images/backgrounds/{{v.background}}?v=3) center center fixed; background-color: var(--background)display: block{% if 'anime' not in v.background %};background-size: cover{% endif %}"{% endif %}>
|
||||
|
||||
{% include "header.html" %}
|
||||
|
||||
{% block form %}
|
||||
|
||||
|
||||
<body id="submit">
|
||||
{% include "header.html" %}
|
||||
{% block form %}
|
||||
<div class="submit-grid-view">
|
||||
<form id="submitform" action="{% if sub %}/h/{{sub.name}}{% endif %}/submit" method="post" enctype="multipart/form-data" style="grid-column: 2">
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="row justify-content-center mb-5">
|
||||
|
||||
<div class="col p-3 py-md-0">
|
||||
|
||||
<h2 class="mt-3">Create a post</h2>
|
||||
|
||||
<div class="body">
|
||||
|
||||
<input type="hidden" name="formkey" value="{{v.formkey}}">
|
||||
|
||||
<label class='mt-4' for="title">Post Title</label>
|
||||
|
||||
|
||||
<input autocomplete="off" class="form-control" id="post-title" aria-describedby="titleHelpRegister" type="text" name="title" placeholder="Required" value="{{title}}" minlength="1" maxlength="500" required oninput="checkForRequired();savetext()">
|
||||
|
||||
<div id="urlblock">
|
||||
|
@ -140,11 +128,8 @@
|
|||
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<div class="row fixed-bottom bg-white border-top p-3" id="" style="z-index: 100; bottom: 0px; transition: bottom 220ms cubic-bezier(0, 0, 0.2, 1) 0s;">
|
||||
<div class="col">
|
||||
|
@ -156,9 +141,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
"""remove user backgrounds
|
||||
|
||||
Revision ID: d1e116e8eea5
|
||||
Revises: 85458909736a
|
||||
Create Date: 2023-02-25 20:38:21.249379+00:00
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = 'd1e116e8eea5'
|
||||
down_revision = '85458909736a'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# this first upgrade comand is non-reversible as some people may
|
||||
# intentionally choose the midnight theme. it isn't really that
|
||||
# destructive though as users can just... change it back.
|
||||
op.execute("UPDATE users SET theme='midnight' WHERE theme='transparent'")
|
||||
op.drop_column('users', 'background')
|
||||
|
||||
|
||||
def downgrade():
|
||||
op.add_column('users', sa.Column('background', sa.VARCHAR(length=20), autoincrement=False, nullable=True))
|
Loading…
Add table
Add a link
Reference in a new issue