Made a lot of small changes in the frontend

This commit is contained in:
Michael House 2022-06-04 07:48:26 -05:00
parent 0d489d9dd7
commit f3f2aa3935
13 changed files with 75 additions and 178 deletions

View file

@ -120,10 +120,23 @@ pre {
blockquote {
color: var(--gray-400);
}
#account-menu {
left: -6px;
}
#main-navigation {
max-width: 2000px;
margin-left: auto;
margin-right: auto;
}
#profilestuff > * {
color: var(--gray-400) !important;
}
#profilestuff a {
color: var(--primary-light2) !important;
}
#profilestuff h1 {
color: var(--primary-light1) !important;
}
div.deleted {
background-color: var(--gray-400) !important;
}
@ -139,16 +152,24 @@ div.deleted.banned {
#frontpage .posts .card, #userpage .posts .card, #search .posts .card {
border: none;
}
#search .post-info,
#userpage .post-info,
#frontpage .post-info {
display:flex;
}
#search .post-actions,
#userpage .post-actions,
#frontpage .post-actions {
margin-left:auto;
}
#search .post-actions .list-inline,
#userpage .post-actions .list-inline,
#frontpage .post-actions .list-inline {
align-items: center;
height:100%;
}
#search .post-title a:hover,
#userpage .post-title a:hover,
#frontpage .post-title a:hover {
text-decoration: underline;
}
@ -164,6 +185,12 @@ a.visited,
#search .post-title a:visited {
color: var(--primary-dark1);
}
.comment .comment-collapse-desktop {
border-left: 2px solid var(--primary-dark1) !important;
}
.comment .comment-collapse-desktop:hover {
border-left: 2px solid var(--primary-light2) !important;
}
.usernote-link {
color: var(--primary);

View file

@ -283,7 +283,7 @@ mark, .mark {
}
code {
font-size: 87.5%;
color: #e83e8c;
color: var(--primary-dark1);
word-wrap: break-word;
}
a > code {
@ -2151,9 +2151,18 @@ a.bg-light:hover, a.bg-light:focus, button.bg-light:hover, button.bg-light:focus
}
.shadow-sm {
box-shadow: 0 0.1px 3px 0 rgba(0, 0, 0, 0.05), 0 0.1px 2px 0 rgba(0, 0, 0, 0.03) !important;
-webkit-box-shadow: 0 0.1px 3px 0 rgba(0, 0, 0, 0.05), 0 0.1px 2px 0 rgba(0, 0, 0, 0.03) !important;
-moz-box-shadow: 0 0.1px 3px 0 rgba(0, 0, 0, 0.05), 0 0.1px 2px 0 rgba(0, 0, 0, 0.03) !important;
}
.shadow-lg {
box-shadow: -20px 20px 28px -20px rgba(0,0,0,0.51);
-webkit-box-shadow: -20px 20px 28px -20px rgba(0,0,0,0.51);
-moz-box-shadow: -20px 20px 28px -20px rgba(0,0,0,0.51);
}
.shadow {
box-shadow: 0 0.1px 3px rgba(190, 113, 113, 0.05), 0 0 0 0.1px rgba(0, 0, 0, 0.05) !important;
-webkit-box-shadow: 0 0.1px 3px rgba(190, 113, 113, 0.05), 0 0 0 0.1px rgba(0, 0, 0, 0.05) !important;
-moz-box-shadow: 0 0.1px 3px rgba(190, 113, 113, 0.05), 0 0 0 0.1px rgba(0, 0, 0, 0.05) !important;
}
.shadow-none {
box-shadow: none !important;

View file

@ -188,15 +188,13 @@ function safeMarkdown(input) {
setTimeout(() => markdown('post-text','preview'), 200);
function markdown(first, second) {
var input = document.getElementById(first).value;
var input = document.getElementById(first);
var dest = document.getElementById(second);
if(input && dest){
if(dest && input && input.value.trim() !== ''){
for (var i = 0; i < dest.children.length; i++) {
dest.removeChild(dest.children[i]);
}
document
.getElementById(second)
.appendChild(safeMarkdown(input));
dest.appendChild(safeMarkdown(input.value));
}
}

View file

@ -392,8 +392,6 @@ def frontlist(v=None, sort="hot", page=1, t="all", ids_only=True, ccmode="false"
@app.get("/changelog")
@auth_required
def changelog(v):
try: page = max(int(request.values.get("page", 1)), 1)
except: page = 1

View file

@ -287,10 +287,14 @@ def contact(v):
@auth_required
def submit_contact(v):
body = request.values.get("message")
email = request.values.get("email")
if not body: abort(400)
if not email: email = None
body = f'This message has been sent automatically to all admins via [/contact](/contact)\n\nMessage:\n\n' + body
body_html = sanitize(body)
header = "This message has been sent automatically to all admins via [/contact](/contact)\n"
email = f"<strong>Email</strong>: {email}\n"
message = f"<strong>Message</strong>:\n{body}\n\n"
html = sanitize(f"{header}\n{email}\n{message}")
if request.files.get("file") and request.headers.get("cf-ipcountry") != "T1":
file=request.files["file"]
@ -298,7 +302,7 @@ def submit_contact(v):
name = f'/images/{time.time()}'.replace('.','') + '.webp'
file.save(name)
url = process_image(name)
body_html += f'<img data-bs-target="#expandImageModal" data-bs-toggle="modal" onclick="expandDesktopImage(this.src)" class="img" src="{url}" loading="lazy">'
html += f'<img data-bs-target="#expandImageModal" data-bs-toggle="modal" onclick="expandDesktopImage(this.src)" class="img" src="{url}" loading="lazy">'
elif file.content_type.startswith('video/'):
file.save("video.mp4")
with open("video.mp4", 'rb') as f:
@ -310,15 +314,13 @@ def submit_contact(v):
if error == 'File exceeds max duration': error += ' (60 seconds)'
return {"error": error}, 400
if url.endswith('.'): url += 'mp4'
body_html += f"<p>{url}</p>"
html += f"<p>{url}</p>"
else: return {"error": "Image/Video files only"}, 400
new_comment = Comment(author_id=v.id,
parent_submission=None,
level=1,
body_html=body_html,
body_html=html,
sentto=2
)
g.db.add(new_comment)

View file

@ -275,7 +275,7 @@ def upvoters(v, username):
pos = (pos+1, users[pos][1])
except: pos = (len(users)+1, 0)
return render_template("voters.html", v=v, users=users[:25], pos=pos, name='Up', name2=f'@{username} biggest simps')
return render_template("voters.html", v=v, users=users[:25], pos=pos, name='Up', name2=f'Who upvotes @{username}')
@ -301,7 +301,7 @@ def downvoters(v, username):
pos = (pos+1, users[pos][1])
except: pos = (len(users)+1, 0)
return render_template("voters.html", v=v, users=users[:25], pos=pos, name='Down', name2=f'@{username} biggest haters')
return render_template("voters.html", v=v, users=users[:25], pos=pos, name='Down', name2=f'Who downvotes @{username}')
@app.get("/@<username>/upvoting")
@auth_required
@ -325,7 +325,7 @@ def upvoting(v, username):
pos = (pos+1, users[pos][1])
except: pos = (len(users)+1, 0)
return render_template("voters.html", v=v, users=users[:25], pos=pos, name='Up', name2=f'Who @{username} simps for')
return render_template("voters.html", v=v, users=users[:25], pos=pos, name='Up', name2=f'Who @{username} upvotes')
@app.get("/@<username>/downvoting")
@auth_required
@ -349,7 +349,7 @@ def downvoting(v, username):
pos = (pos+1, users[pos][1])
except: pos = (len(users)+1, 0)
return render_template("voters.html", v=v, users=users[:25], pos=pos, name='Down', name2=f'Who @{username} hates')
return render_template("voters.html", v=v, users=users[:25], pos=pos, name='Down', name2=f'Who @{username} downvotes')

View file

@ -61,7 +61,7 @@
{% if (c.is_banned or c.deleted_utc or c.is_blocking) and not (v and v.admin_level > 1) and not (v and v.id==c.author_id) %}
<div id="comment-{{c.id}}" class="comment">
<span class="comment-collapse-desktop d-none d-md-block" style="border-left: 2px solid #{{c.author.namecolor}}"onclick="collapse_comment('{{c.id}}', this.parentElement)"></span>
<span class="comment-collapse-desktop d-none d-md-block" onclick="collapse_comment('{{c.id}}', this.parentElement)"></span>
<div class="comment-body">
@ -158,7 +158,7 @@
<div id="comment-{{c.id}}" class="anchor comment {% if standalone and level==1 %} mt-0{% endif %} {% if c.collapse_for_user(v,request.path) %}collapsed{% endif %}" style="{% if isreply %}padding-left:0!important;{% else %}border-left: 2px solid {% if c.ghost %}var(--primary){% else %}#{{c.author.namecolor}};{% endif %}{% endif %}">
{% if not isreply %}
<span class="comment-collapse-desktop d-none d-md-block" style="border-left: 2px solid {% if c.ghost %}var(--primary){% else %}#{{c.author.namecolor}}{% endif %}" onclick="collapse_comment('{{c.id}}', this.parentElement)"></span>
<span class="comment-collapse-desktop d-none d-md-block" onclick="collapse_comment('{{c.id}}', this.parentElement)"></span>
{% endif %}
<div class="comment-body">

View file

@ -22,12 +22,13 @@
<h1 class="article-title">Contact {{SITE_NAME}} Admins</h1>
<p>Use this form to contact {{SITE_NAME}} Admins.</p>
<label class="mt-3">Your Email</label>
<input autocomplete="off" class="form-control" value="{{v.email}}" readonly="readonly" disabled>
<form id="contactform" action="/send_admin" method="post" enctype="multipart/form-data">
<label class="mt-3">Your Email</label>
{% if v and v.email %}
<input autocomplete="off" class="form-control" name="email" value="{{v.email}}" placeholder="(optional)">
{% else %}
<input autocomplete="off" class="form-control" name="email" value="" placeholder="(optional)">
{% endif %}
<label for="input-message" class="mt-3">Your message</label>
<input type="hidden" name="formkey" value="{{v.formkey}}">
<textarea autocomplete="off" maxlength="10000" id="input-message" form="contactform" name="message" class="form-control" required></textarea>

View file

@ -1,5 +1,5 @@
<nav class="shadow shadow-md fixed-top">
<nav id="main-navigation" class="shadow shadow-md fixed-top">
<style>
body {padding-top: 60.89px !important}
@media (max-width: 767.98px) {
@ -130,12 +130,12 @@
aria-haspopup="true" aria-expanded="false">
<div class="d-flex">
<div><img alt="your profile picture" loading="lazy" src="{{v.profile_url}}" class="profile-pic-35"></div>
<div class="text-left pl-2">
<div class="text-left pl-2 d-flex align-items-center">
<div style="color: var(--primary-light1)" class="text-small font-weight-bold {% if v.patron %}patron{% endif %}"><span {% if v.patron %}class="patron" style="background-color:#{{v.namecolor}}"{% endif %}>{{v.username}}</span></div>
</div>
</div>
</a>
<div class="dropdown-menu dropdown-menu-right dropdown-menu-lg-left border-0 shadow fade px-0">
<div id="account-menu" class="dropdown-menu dropdown-menu-right dropdown-menu-lg-left border-0 shadow fade px-0">
<div class="px-2">
<a class="dropdown-item" href="{{v.url}}"><i class="fas fa-user-circle fa-fw mr-3"></i>My
profile</a>
@ -149,8 +149,6 @@
<a class="dropdown-item" rel="nofollow noopener noreferrer" href="https://github.com/themotte/rDrama"><i class="fab fa-github fa-fw mr-3"></i>Source code</a>
<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>
<a class="dropdown-item" href="/contact"><i class="fas fa-file-signature fa-fw mr-3"></i>Contact us</a>
</div>
<div class="px-2">

View file

@ -37,26 +37,7 @@
</a>
</button>
{% endif %}
{% if v %}
<button class="col px-0 btn btn-dead m-0" style="background: None !important; border: None;">
<a href="/chat" class="text-decoration-none" role="button">
<div class="text-center {% if request.path=='/chat' %}text-primary{% else %}text-muted{% endif %}">
<i class="fas fa-messages text-lg"></i>
<div class="text-small">Chat</div>
</div>
</a>
</button>
{% if v and v.admin_level > 1 %}
<button class="col px-0 mr-3 btn btn-dead m-0" style="background: None !important; border: None;">
<a href="/shop" class="text-decoration-none" role="button">
<div class="text-center {% if request.path=='/shop' %}text-primary{% else %}text-muted{% endif %}">
<i class="fas fa-store text-lg"></i>
<div class="text-small">Shop</div>
</div>
</a>
</button>
{% endif %}
{% else %}
{% if not v %}
<button class="col px-0 mr-3 btn btn-dead m-0" style="background: None !important; border: None;">
<a href="/signup" class="text-decoration-none" role="button">
<div class="text-center text-muted">

View file

@ -90,43 +90,7 @@
</div>
</div>
<div class="body d-lg-flex border-bottom">
<label class="text-black w-lg-25">Theme Color</label>
<div class="d-flex">
<form action="/settings/themecolor" id="themecolor-form" method="post" class="color-picker" style="line-height: 0">
<input type="hidden" name="formkey" value="{{v.formkey}}">
{% for themecolor in COLORS %}
<input autocomplete="off" type="radio" name="themecolor" id="themecolor-{{themecolor}}" value="{{themecolor}}" {% if v.themecolor == themecolor %}checked{% endif %} onclick="document.getElementById('themecolor-form').submit()">
<label class="color-radio" for="themecolor-{{themecolor}}">
<span style="background-color: #{{themecolor}}">
{% if v.themecolor.lower() == themecolor %}
<i class="fas fa-check text-white"></i>
{% else %}
&nbsp;
{% endif %}
</span>
</label>
{% endfor %}
</form>
</div>
<p class="text-small mb-2">Or type a color code:</p>
<div class="d-flex">
<form action="/settings/themecolor" id="color-code-form" method="post">
<input type="hidden" name="formkey" value="{{v.formkey}}">
<input class="form-control" type="text" name="themecolor" id="color-code" value="{% if v.themecolor %}{{v.themecolor}}{% endif %}">
<label class="btn btn-secondary text-capitalize mr-2 mt-2 mb-0">Update<input type="text" for="color-code" onclick="form.submit()" hidden=""></label>
</form>
</div>
</div>
<div class="d-lg-flex border-bottom">
<div class="title w-lg-25">
<label for="theme">Website Backgrounds</label>
@ -297,60 +261,7 @@
</form>
</div>
</div>
<div class="body d-lg-flex border-bottom">
<label class="text-black w-lg-25">Profile Anthem</label>
<div class="w-lg-100">
<p>Must be a youtube video link.</p>
<form action="/settings/song_change" method="post">
<input type="hidden" name="formkey" value="{{v.formkey}}">
<input autocomplete="off" type="text" name="song" class="form-control" value="{% if v.song %}https://youtu.be/{{v.song}}{% endif %}" placeholder='Enter a youtube video link here'>
<br><small>In some browsers, users have to click at least once anywhere in the profile page for the anthem to play.</small>
<div class="d-flex mt-2">
<input autocomplete="off" class="btn btn-primary ml-auto" type="submit" value="Change Profile Anthem">
</div>
</form>
</div>
</div>
<div class="body d-lg-flex border-bottom">
<label class="text-black w-lg-25">Name Color</label>
<div class="d-flex">
<form action="/settings/namecolor" id="color-form" method="post" class="color-picker" style="line-height: 0">
<input type="hidden" name="formkey" value="{{v.formkey}}">
{% for color in COLORS %}
<input autocomplete="off" type="radio" name="color" id="color-{{color}}" value="{{color}}" {% if v.namecolor == color %}checked{% endif %} onclick="document.getElementById('color-form').submit()">
<label class="color-radio" for="color-{{color}}">
<span style="background-color: #{{color}}">
{% if v.namecolor.lower() == color %}
<i class="fas fa-check text-white"></i>
{% else %}
&nbsp;
{% endif %}
</span>
</label>
{% endfor %}
</form>
</div>
<p class="text-small mb-2">Or type a color code:</p>
<div class="d-flex">
<form action="/settings/namecolor" id="color-code-form" method="post">
<input type="hidden" name="formkey" value="{{v.formkey}}">
<input autocomplete="off" class="form-control" type="text" name="color" id="color-code" maxlength="6" value="{% if v.namecolor %}{{v.namecolor}}{% endif %}">
<label class="btn btn-secondary text-capitalize mr-2 mt-2 mb-0">Update<input autocomplete="off" type="text" for="color-code" onclick="form.submit()" hidden=""></label>
</form>
</div>
</div>
</div>
<div class="body d-lg-flex border-bottom">
@ -509,28 +420,6 @@
</div>
</div>
<div class="body d-lg-flex border-bottom">
<label class="text-black w-lg-25">Enemies</label>
<div class="w-lg-100">
<form id="profile-enemies" action="/settings/profile" method="post" enctype="multipart/form-data">
<input type="hidden" name="formkey" value="{{v.formkey}}">
<div class="input-group mb-2">
<textarea autocomplete="off" id="enemies-text" class="form-control rounded" aria-label="With textarea" placeholder="Enter your enemies on the site..." rows="3" name="enemies" form="profile-enemies" maxlength="1500">{% if v.enemies %}{{v.enemies}}{% endif %}</textarea>
</div>
<pre></pre>
<div class="d-flex">
<small>Limit of 500 characters</small>
<input autocomplete="off" class="btn btn-primary ml-auto" id="enemiesSave" type="submit" value="Save Changes">
</div>
</form>
</div>
</div>
{% if v.patron or v.id == MOOSE_ID %}
<div class="body d-lg-flex border-bottom">

View file

@ -44,14 +44,12 @@
</div>
<div class="footer">
<div class="d-flex">
<a class="btn btn-success" role="button" onclick="post_toast(this,'/settings/gumroad')">Claim paypig rewards</a>
{% if v.email %}
<input autocomplete="off" class="btn btn-primary ml-auto" type="submit" value="Update email">
{% else %}
<input autocomplete="off" class="btn btn-primary ml-auto" type="submit" value="Add email">
{% endif %}
</div>
<span class="text-small-extra text-muted pl-1">Must be same email as gumroad</span>
</div>
</form>
</div>

View file

@ -13,7 +13,7 @@
<meta property="og:article:author" content="@{{u.username}}">
<meta property="article:section" content="{{u.username}}'s profile - {{SITE_NAME}}">
<meta property="article:published_time" content="{{u.created_date}}">
<meta property="og:description" name="description" content="{{u.coins}} coins - Joined {{u.created_date}} - {% if u.stored_subscriber_count >=1 and not u.is_private and not u.is_nofollow %}{{u.stored_subscriber_count}} Followers - {% endif %}{% if not u.is_private %} {{0 if u.shadowbanned else u.post_count}} Posts - {{0 if u.shadowbanned else u.comment_count}} Comments - {% endif %}{{u.bio}}">
<meta property="og:description" name="description" content="Joined {{u.created_date}} - {% if u.stored_subscriber_count >=1 and not u.is_private and not u.is_nofollow %}{{u.stored_subscriber_count}} Followers - {% endif %}{% if not u.is_private %} {{0 if u.shadowbanned else u.post_count}} Posts - {{0 if u.shadowbanned else u.comment_count}} Comments - {% endif %}{{u.bio}}">
<meta property="og:author" name="author" content="@{{u.username}}">
<meta property="og:title" content="{{u.username}}">
<meta property="og:image" content="{{u.banner_url}}">
@ -24,7 +24,7 @@
<meta name="twitter:site" content="{{SITE_FULL}}">
<meta name="twitter:title" content="{{u.username}}'s profile - {{SITE_NAME}}">
<meta name="twitter:creator" content="@{{u.username}}">
<meta name="twitter:description" content="{{u.coins}} coins - Joined {{u.created_date}} - {% if u.stored_subscriber_count >=1 and not u.is_private and not u.is_nofollow %}{{u.stored_subscriber_count}} Followers -{% endif %} {% if not u.is_private %} {{0 if u.shadowbanned else u.post_count}} Posts - {{0 if u.shadowbanned else u.comment_count}} Comments - {% endif %}{{u.bio}}">
<meta name="twitter:description" content="Joined {{u.created_date}} - {% if u.stored_subscriber_count >=1 and not u.is_private and not u.is_nofollow %}{{u.stored_subscriber_count}} Followers -{% endif %} {% if not u.is_private %} {{0 if u.shadowbanned else u.post_count}} Posts - {{0 if u.shadowbanned else u.comment_count}} Comments - {% endif %}{{u.bio}}">
<meta name="twitter:image" content="{{u.banner_url}}">
<meta name="twitter:url" content="{{u.url}}">
{% endblock %}
@ -51,7 +51,7 @@
{% if u.unban_utc %}<h5 class="text-primary">>{{u.unban_string}}</h5>{% endif %}
{% endif %}
<div class="d-flex align-items-center mt-1 mb-2">
<h1 class="font-weight-bolder h3 mb-0" style="color: var(--primary-light1)"><span {% if u.patron %}class="patron" style="background-color:#{{u.namecolor}}"{% endif %}>{{u.username}}</span></h1>
<h1 class="font-weight-bolder h3 mb-0"><span {% if u.patron %}class="patron" style="background-color:#{{u.namecolor}}"{% endif %}>{{u.username}}</span></h1>
{% if u.username != u.original_username %}
<span>
@ -104,7 +104,7 @@
{% else %}<pre></pre>
{% endif %}
<div class="font-weight-bolder mb-2"><a class="mr-1" href="/@{{u.username}}/upvoters">Simps</a> | <a class="mx-1" href="/@{{u.username}}/downvoters">Haters</a> | <a class="mx-1" href="/@{{u.username}}/upvoting">Simps for</a> | <a class="ml-1" href="/@{{u.username}}/downvoting">Hates</a></div>
<div class="font-weight-bolder mb-2"><a class="mr-1" href="/@{{u.username}}/upvoters">Upvoters</a> | <a class="mx-1" href="/@{{u.username}}/downvoters">Downvoters</a> | <a class="mx-1" href="/@{{u.username}}/upvoting">Upvoted</a> | <a class="ml-1" href="/@{{u.username}}/downvoting">Downvoted</a></div>
<div class="font-weight-bolder">
<a href="/@{{u.username}}/followers">{{u.stored_subscriber_count}} follower{{'s' if u.stored_subscriber_count != 1 else ''}}</a>&nbsp;&nbsp;
@ -113,12 +113,12 @@
joined <span data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{u.created_datetime}}">{{u.created_date}}</span>
</div>
{% if u.basedcount %}<p class="text-muted">Based Count: {{u.basedcount}}</p>{% endif %}
{% if u.bio_html %}
<pre></pre>
<div class="text-muted font-weight-bolder">{{u.bio_html | safe}}</div>
{% else %}
<pre></pre>
<p class="text-muted">No bio...</p>
{% endif %}
@ -276,9 +276,7 @@
{% endif %}
<pre></pre>
<p>User ID: {{u.id}}</p>
<p>Coins spent: {{u.coins_spent}}</p>
<p>True score: {{u.truecoins}}</p>
<p>Winnings: {{u.winnings}}</p>
{% if u.is_private %}
<p>User has private mode enabled.</p>
{% endif %}
@ -365,7 +363,7 @@
<pre></pre>
{% endif %}
<div class="font-weight-bolder mb-2"><a class="mr-1" href="/@{{u.username}}/upvoters">Simps</a> | <a class="mx-1" href="/@{{u.username}}/downvoters">Haters</a> | <a class="mx-1" href="/@{{u.username}}/upvoting">Simps for</a> | <a class="ml-1" href="/@{{u.username}}/downvoting">Hates</a></div>
<div class="font-weight-bolder mb-2"><a class="mr-1" href="/@{{u.username}}/upvoters">Upvoters</a> | <a class="mx-1" href="/@{{u.username}}/downvoters">Downvoters</a> | <a class="mx-1" href="/@{{u.username}}/upvoting">Upvoted</a> | <a class="ml-1" href="/@{{u.username}}/downvoting">Downvoted</a></div>
<div class="font-weight-normal">
<a href="/@{{u.username}}/followers" class="font-weight-bold">{{u.stored_subscriber_count}} follower{{'s' if u.stored_subscriber_count != 1 else ''}}</a>&nbsp;&nbsp;
@ -547,9 +545,7 @@
{% endif %}
<pre></pre>
<p>User ID: {{u.id}}</p>
<p>Coins spent: {{u.coins_spent}}</p>
<p>True score: {{u.truecoins}}</p>
<p>Winnings: {{u.winnings}}</p>
{% if u.is_private %}
<p>User has private mode enabled.</p>
{% endif %}