{% extends "CHRISTMAS/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 %}