fdsfsd
This commit is contained in:
parent
84e82b9a65
commit
1e74386573
4 changed files with 94 additions and 1 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -7,7 +7,7 @@ cache/
|
|||
/songs/
|
||||
__pycache__/
|
||||
disablesignups
|
||||
*rules.html
|
||||
*_rules.html
|
||||
.idea/
|
||||
**/.pytest_cache/
|
||||
venv/
|
||||
|
|
31
files/templates/CHRISTMAS/admin/rules.html
Normal file
31
files/templates/CHRISTMAS/admin/rules.html
Normal file
|
@ -0,0 +1,31 @@
|
|||
{% extends "default.html" %}
|
||||
|
||||
{% block pagetitle %}Edit {{'SITE_NAME' | app_config}} rules{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="row my-5">
|
||||
<div class="col col-md-8">
|
||||
<div class="settings">
|
||||
<div id="description">
|
||||
<h2>Edit rules</h2>
|
||||
<p>Your rules page will be publicly visible at <a href="/rules">{{'/rules'|full_link}}</a>.</p>
|
||||
<p class="text-small text-muted">Supports <a href="https://www.markdownguide.org/basic-syntax">markdown syntax</a>.</p>
|
||||
</div>
|
||||
<div class="body d-lg-flex">
|
||||
<div class="w-lg-100">
|
||||
<form id="profile-settings" action="/admin/rules" method="post">
|
||||
<input type="hidden" name="formkey" value="{{v.formkey}}">
|
||||
<textarea maxlength="10000" class="form-control rounded" id="bio-text" aria-label="With textarea" placeholder="Site rules" rows="50" name="rules" form="profile-settings">{% if rules %}{{ rules }}{% endif %}</textarea>
|
||||
|
||||
<div class="d-flex mt-2">
|
||||
<input class="btn btn-primary ml-auto" type="submit" value="Save">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
26
files/templates/CHRISTMAS/norules.html
Normal file
26
files/templates/CHRISTMAS/norules.html
Normal file
|
@ -0,0 +1,26 @@
|
|||
{% extends "default.html" %}
|
||||
|
||||
{% block title %}
|
||||
<title>Not configured</title>
|
||||
{% endblock %}
|
||||
|
||||
{% block pagetype %}message{% endblock %}
|
||||
|
||||
{% block customPadding %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-10 col-md-5">
|
||||
<div class="text-center py-7 py-md-8">
|
||||
|
||||
<div class="mb-3">
|
||||
<i class="fas text-gray-600 fa-exclamation-triangle" style="font-size: 5rem!important;"></i>
|
||||
</div>
|
||||
|
||||
<h1 class="h5">You haven't set up your rules page yet</h1>
|
||||
<div class="text-small text-muted mb-3">Your rules will be publicly available here.</div>
|
||||
<a href="/admin/rules" class="btn btn-primary ">Set up rules</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
36
files/templates/CHRISTMAS/rules.html
Normal file
36
files/templates/CHRISTMAS/rules.html
Normal file
|
@ -0,0 +1,36 @@
|
|||
{% extends "default.html" %}
|
||||
|
||||
{% block title %}
|
||||
<title>{{'SITE_NAME' | app_config}} Rules</title>
|
||||
<meta name="description" content="{{'SITE_NAME' | app_config}} Rules">
|
||||
{% endblock %}
|
||||
|
||||
{% block subHeader %}
|
||||
<div class="relative max-w-screen-2xl mx-auto px-4 py-4 grid grid-cols-12 rounded-t">
|
||||
<div class="absolute top-0 left-0 w-full h-full bg-gradient-to-t from-gray-300 to-gray-200 rounded-t sub-header-shadow"></div>
|
||||
<div class="relative col-span-full flex items-center">
|
||||
<div>
|
||||
<h1 class="font-bold text-xl font-heading leading-normal mb-0">
|
||||
Rules
|
||||
</h1>
|
||||
<small class="block text-gray-700">
|
||||
How to save yourself from the mop.
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="col-span-full">
|
||||
<h5 class="text-muted text-uppercase">
|
||||
{{'SITE_NAME'|app_config}} Rules{% if v and v.admin_level == 6 %} <a href="/admin/rules" class="btn btn-link text-lowercase">
|
||||
<i class="far fa-fw fa-pencil"></i> Edit rules
|
||||
</a>{% endif %}
|
||||
</h5>
|
||||
|
||||
<div id="rules" class="my-3">
|
||||
{{ rules | safe }}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
Loading…
Add table
Add a link
Reference in a new issue