55 lines
2.3 KiB
HTML
55 lines
2.3 KiB
HTML
{% extends "settings.html" %}
|
|
{% block pagetitle %}Custom CSS{% endblock %}
|
|
{% block content %}
|
|
<div class="row">
|
|
<div class="settings col col-md-8">
|
|
<section>
|
|
<h5>Custom CSS</h5>
|
|
<div id="settings-custom-css" class="settings-section rounded mb-0">
|
|
<p class="text-small text-muted pt-2 pl-3">Edit your custom CSS for the site</p>
|
|
<div class="body d-lg-flex border-bottom">
|
|
<div class="w-lg-100">
|
|
<form id="profile-settings-css" action="/settings/css" method="post">
|
|
<input type="hidden" name="formkey" value="{{v|formkey}}">
|
|
<textarea autocomplete="off" class="form-control rounded" id="css-textarea" placeholder="Custom CSS" rows="3" name="css" form="profile-settings-css" maxlength="{{CSS_LENGTH_LIMIT}}">{% if v.css %}{{v.csslazy}}{% endif %}</textarea>
|
|
<small>Limit of {{CSS_LENGTH_LIMIT}} characters</small>
|
|
<div class="d-flex mt-2">
|
|
<input autocomplete="off" id="submit-btn" class="btn btn-primary ml-auto" type="submit" onclick="disable(this)" value="Save">
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
<section>
|
|
<h5>Profile CSS</h5>
|
|
<div id="settings-profile-css" class="settings-section rounded mb-0">
|
|
<p class="text-small text-muted pt-2 pl-3">Edit your profile CSS</p>
|
|
<div class="body d-lg-flex border-bottom">
|
|
<div class="w-lg-100">
|
|
<form id="profile-settings-profilecss" action="/settings/profilecss" method="post">
|
|
<input type="hidden" name="formkey" value="{{v|formkey}}">
|
|
<textarea autocomplete="off" class="form-control rounded" id="profilecss-textarea" placeholder="Custom profile CSS" rows="3" name="profilecss" form="profile-settings-profilecss" maxlength="{{CSS_LENGTH_LIMIT}}">{% if v.profilecss %}{{v.profilecss}}{% endif %}</textarea>
|
|
<small>Limit of {{CSS_LENGTH_LIMIT}} characters</small>
|
|
<div class="d-flex mt-2">
|
|
<input autocomplete="off" class="btn btn-primary ml-auto" type="submit" onclick="disable(this)" value="Save">
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</div>
|
|
|
|
<script nonce="{{g.nonce}}">
|
|
document.addEventListener('load', function() {
|
|
for (const x of ['css','profilecss']) {
|
|
const ta = document.getElementById(`${x}-textarea`);
|
|
autoExpand(ta);
|
|
}
|
|
})
|
|
</script>
|
|
|
|
{% endblock %}
|