{% extends "htmx/base.html" %} {% block main %}
All pages except the incident list (at /incidents/) should start with a <h1> heading.
<h1 class="text-center text-3xl font-semibold mt-3">
<h2 class="text-2xl">
<h3 class="text-xl">
The template htmx/components/_page_title.html will wrap
a
{% verbatim %}
{{ page_title }}
{% endverbatim %}
or
{% verbatim %}
{{ title }}
{% endverbatim %}
in context in the
correctly styled <h1>.
The card component is an exception to heading sizes.
Its font size is always set by the .card-title class to match .text-xl.
However, use the correct heading level inside the card title for semantic accuracy.
E.g. using <h2> inside a card that is a subsection of the page.
{% verbatim %}
<input type="button" class="btn btn-primary"..
{% endverbatim %}
{% verbatim %}
<input type="button" class="btn btn-primary"..
{% endverbatim %}
{% verbatim %}
<input type="button" class="btn btn-primary"..
{% endverbatim %}
{% verbatim %}
<input type="button" class="btn btn-secondary"..
{% endverbatim %}
{% verbatim %}
<button class="btn btn-secondary"..
{% endverbatim %}
{% verbatim %}
<a class="btn btn-secondary"..
{% endverbatim %}
{% verbatim %}
<input type="button" class="btn"..
{% endverbatim %}
{% verbatim %}
<button class="btn"..
{% endverbatim %}
{% verbatim %}
<a class="btn"..
{% endverbatim %}
We do not use other button types than these.
The form below is for testing the look and feel of autogenerated forms, made via the
{% verbatim %}
{{ form }}
{% endverbatim %}
Django template syntax. Submitting will re-render the form with the submitted values pre-filled. Click "Reset" to empty the fields.
The form has been submitted.
{% if form.is_valid %}The form is VALID!
The form is NOT VALID!
The form has not been submitted yet.
{% endif %}
This particular form is using tailwind grid classes to lay out the fields.
A single field can be auto-generated via the
{% verbatim %}
{{ form.FIELDNAME.as_field_group }}
{% endverbatim %}
Django template syntax. Below is the field named "Input" from the form above:
{{ form.input_.as_field_group }}
You get just the actual input part of the field via the
{% verbatim %}
{{ form.FIELDNAME }}
{% endverbatim %}
Django template syntax. Below is just the actual input-part of the field named "Input" from the form above:
{{ form.input_ }}
These are the available color names and colors as set by the current selected theme.
{% comment %}Also useful for making sure tailwind finds all used colors.{% endcomment %}