forked from MarseyWorld/MarseyWorld
marsey UI stuff
parent
500c1ba3c1
commit
5076859817
|
@ -4,7 +4,7 @@ from random import choice, choices
|
||||||
|
|
||||||
valid_username_chars = 'a-zA-Z0-9_\-'
|
valid_username_chars = 'a-zA-Z0-9_\-'
|
||||||
valid_username_regex = re.compile("^[a-zA-Z0-9_\-]{3,25}$", flags=re.A)
|
valid_username_regex = re.compile("^[a-zA-Z0-9_\-]{3,25}$", flags=re.A)
|
||||||
mention_regex = re.compile('(^|\s|>)@(([a-zA-Z0-9_\-]){1,25})(?![^<]*<\/(code|pre|a)>)', flags=re.A)
|
mention_regex = re.compile('(^|\s|>)@(([a-zA-Z0-9_\-]){1,30})(?![^<]*<\/(code|pre|a)>)', flags=re.A)
|
||||||
|
|
||||||
valid_password_regex = re.compile("^.{8,100}$", flags=re.A)
|
valid_password_regex = re.compile("^.{8,100}$", flags=re.A)
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ sub_regex = re.compile('(^|\s|<p>)\/?(h\/(\w|-){3,25})(?![^<]*<\/(code|pre|a)>)'
|
||||||
|
|
||||||
strikethrough_regex = re.compile('(^|\s|>)~{1,2}([^~]+)~{1,2}', flags=re.A)
|
strikethrough_regex = re.compile('(^|\s|>)~{1,2}([^~]+)~{1,2}', flags=re.A)
|
||||||
|
|
||||||
mute_regex = re.compile("\/mute @([a-z0-9_\-]{3,25}) ([0-9]+)", flags=re.A|re.I)
|
mute_regex = re.compile("\/mute @([a-z0-9_\-]{3,30}) ([0-9]+)", flags=re.A|re.I)
|
||||||
|
|
||||||
emoji_regex = re.compile(f"<p>\s*(:[!#@]{{0,3}}[{valid_username_chars}]+:\s*)+<\/p>", flags=re.A)
|
emoji_regex = re.compile(f"<p>\s*(:[!#@]{{0,3}}[{valid_username_chars}]+:\s*)+<\/p>", flags=re.A)
|
||||||
emoji_regex2 = re.compile(f'(?<!"):([!#@{valid_username_chars}]{{1,36}}?):', flags=re.A)
|
emoji_regex2 = re.compile(f'(?<!"):([!#@{valid_username_chars}]{{1,36}}?):', flags=re.A)
|
||||||
|
|
|
@ -6,6 +6,12 @@
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
<style>
|
||||||
|
input {
|
||||||
|
text-transform: lowercase;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
<div class="mx-4">
|
<div class="mx-4">
|
||||||
<h2 class="mt-5">Submit Marsey</h2>
|
<h2 class="mt-5">Submit Marsey</h2>
|
||||||
<div class="settings-section rounded">
|
<div class="settings-section rounded">
|
||||||
|
@ -25,13 +31,13 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<label class="mt-3" for="name">Name</label>
|
<label class="mt-3" for="name">Name</label>
|
||||||
<input autocomplete="off" type="text" id="name" class="form-control" name="name" maxlength="30" required>
|
<input autocomplete="off" type="text" id="name" class="form-control" name="name" maxlength="30" pattern='[a-z0-9]{1,30}' required>
|
||||||
|
|
||||||
<label class="mt-3" for="author">Author</label>
|
<label class="mt-3" for="author">Author</label>
|
||||||
<input autocomplete="off" type="text" id="author" class="form-control" name="author" value="{{v.username}}" maxlength="30" required>
|
<input autocomplete="off" type="text" id="author" class="form-control" name="author" value="{{v.username}}" maxlength="30" pattern='[a-z0-9_\-]{3,30}' required>
|
||||||
|
|
||||||
<label class="mt-3" for="tags">Tags</label>
|
<label class="mt-3" for="tags">Tags (must be separated by spaces)</label>
|
||||||
<input autocomplete="off" type="text" id="tags" class="form-control" name="tags" maxlength="200" required>
|
<input autocomplete="off" type="text" id="tags" class="form-control" name="tags" maxlength="200" pattern='[a-z0-9: ]{1,200}' required>
|
||||||
|
|
||||||
<div class="footer mt-5">
|
<div class="footer mt-5">
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
|
|
Loading…
Reference in New Issue