mirror of
https://codeberg.org/catask-org/catask.git
synced 2025-04-20 13:53:42 -05:00
various rs layout improvements
This commit is contained in:
parent
e0e492211b
commit
650e402f84
1 changed files with 75 additions and 56 deletions
|
@ -1,6 +1,8 @@
|
||||||
{% include 'snippets/layout/description/retrospring.html' %}
|
<div class="row">
|
||||||
<div class="col-sm-9">
|
{% include 'snippets/layout/description/retrospring.html' %}
|
||||||
|
<div class="col-lg-9{% if not combined %} m-auto{% endif %}">
|
||||||
<div class="pt-3">
|
<div class="pt-3">
|
||||||
|
{% if not cfg.lockInbox %}
|
||||||
<div class="mb-4 card">
|
<div class="mb-4 card">
|
||||||
<div class="card-header d-flex justify-content-between align-items-center">
|
<div class="card-header d-flex justify-content-between align-items-center">
|
||||||
<span>Ask a question</span>
|
<span>Ask a question</span>
|
||||||
|
@ -9,8 +11,7 @@
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
{% if cfg.lockInbox == false %}
|
<form class="d-lg-block" hx-post="{{ url_for('api.addQuestion') }}" id="question-form" hx-target="#response-container" hx-swap="none" hx-disabled-elt="#ask-btn">
|
||||||
<form class="d-lg-block" hx-post="{{ url_for('api.addQuestion') }}" id="question-form" hx-target="#response-container" hx-swap="none">
|
|
||||||
<div class="collapse" id="cw-collapse">
|
<div class="collapse" id="cw-collapse">
|
||||||
<div class="form-group mb-2">
|
<div class="form-group mb-2">
|
||||||
<input class="form-control" type="text" name="cw" id="cw" placeholder="Content warning">
|
<input class="form-control" type="text" name="cw" id="cw" placeholder="Content warning">
|
||||||
|
@ -24,12 +25,30 @@
|
||||||
<div class="form-group mb-2">
|
<div class="form-group mb-2">
|
||||||
<textarea maxlength="{{ cfg.charLimit }}" class="form-control" required name="question" id="question" placeholder="Type your question here..."></textarea>
|
<textarea maxlength="{{ cfg.charLimit }}" class="form-control" required name="question" id="question" placeholder="Type your question here..."></textarea>
|
||||||
<label for="question" class="visually-hidden">Write your question here...</label>
|
<label for="question" class="visually-hidden">Write your question here...</label>
|
||||||
<p class="text-end mt-1 small d-flex align-itemcenter justify-content-between"><span class="text-body-secondary"><i class="bi bi-markdown me-1"></i> Markdown supported</span> <span id="charCount">{{ cfg.charLimit }}</span></p>
|
<p class="text-end mt-1 small d-flex align-items-center justify-content-between"><span class="text-body-secondary"><i class="bi bi-markdown me-1"></i> Markdown supported</span> <span id="charCount">{{ cfg.charLimit }}</span></p>
|
||||||
</div>
|
</div>
|
||||||
|
{% if cfg.antispam.enabled %}
|
||||||
|
{% if cfg.antispam.type == 'basic' %}
|
||||||
<div class="form-group mb-2">
|
<div class="form-group mb-2">
|
||||||
<label for="antispam">Anti-spam: please enter the word <code class="text-uppercase">{{ getRandomWord() }}</code> in lowercase</label>
|
<label for="antispam">Anti-spam: please enter the word <code class="text-uppercase">{{ getRandomWord() }}</code> in lowercase</label>
|
||||||
<input class="form-control" type="text" required name="antispam" id="antispam" autocomplete="off">
|
<input class="form-control" type="text" required name="antispam" id="antispam" autocomplete="off">
|
||||||
</div>
|
</div>
|
||||||
|
{% elif cfg.antispam.type == 'recaptcha' %}
|
||||||
|
<div class="form-group mb-2">
|
||||||
|
{% if cfg.antispam.recaptcha.sitekey %}
|
||||||
|
<div class="g-recaptcha" data-sitekey="{{ cfg.antispam.recaptcha.sitekey }}"></div>
|
||||||
|
{% else %}
|
||||||
|
<div class="alert alert-warning" role="alert"><b>Warning:</b> reCAPTCHA site key is not set!</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
{% elif cfg.antispam.type == 'turnstile' %}
|
||||||
|
<div class="cf-turnstile" data-sitekey="{{ cfg.antispam.turnstile.sitekey }}"></div>
|
||||||
|
{% elif cfg.antispam.type == 'frc' %}
|
||||||
|
<div class="frc-captcha" data-sitekey="{{ cfg.antispam.frc.sitekey }}"></div>
|
||||||
|
{% else %}
|
||||||
|
<div class="alert alert-warning"><b>Warning:</b> antispam type is not set!</div>
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
<div class="form-group d-grid d-lg-flex align-items-center justify-content-lg-end mt-3">
|
<div class="form-group d-grid d-lg-flex align-items-center justify-content-lg-end mt-3">
|
||||||
{#
|
{#
|
||||||
<div class="form-check mb-0 w-100">
|
<div class="form-check mb-0 w-100">
|
||||||
|
@ -51,12 +70,12 @@
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
<div id="response-container"></div>
|
<div id="response-container"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
<br>
|
|
||||||
<h2 class="text-center">New questions cannot be asked right now.</h2>
|
<h2 class="text-center">New questions cannot be asked right now.</h2>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% include 'snippets/layout/questions_list.html' %}
|
{% include 'snippets/layout/questions_list.html' %}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
Loading…
Add table
Reference in a new issue