Comment cleanup
This commit is contained in:
parent
c6cbc8fe70
commit
f18276ab01
7 changed files with 336 additions and 97 deletions
|
|
@ -3,7 +3,7 @@ The estate skeleton. Every service's own base.html extends this and fills the
|
|||
blocks; nothing here is meant to be copied into a service.
|
||||
|
||||
The navbar is written out here rather than {% include %}d because blocks inside
|
||||
an included template cannot be overridden — and the navbar's layout has to be
|
||||
an included template cannot be overridden, and the navbar's layout has to be
|
||||
identical everywhere while its items differ per service. Same for the footer's
|
||||
position. Fill `navbar_items` and `navbar_tools`; change nothing else.
|
||||
|
||||
|
|
@ -38,7 +38,13 @@ Blocks a service normally fills:
|
|||
<link rel="stylesheet" href="{% static 'yksa/css/kit.css' %}">
|
||||
{% block extra_head %}{% endblock extra_head %}
|
||||
</head>
|
||||
<body class="d-flex flex-column min-vh-100 bg-light">
|
||||
{% comment %}
|
||||
`bg-body-tertiary`, not `bg-light`. `bg-light` is a fixed near-white that does
|
||||
not follow `data-bs-theme`, so it was the one element standing between the
|
||||
estate and a working dark theme: every card and control below it recoloured
|
||||
and the page they sat on did not.
|
||||
{% endcomment %}
|
||||
<body class="d-flex flex-column min-vh-100 bg-body-tertiary">
|
||||
<nav class="navbar navbar-expand-lg custom-navbar border-bottom sticky-top">
|
||||
<div class="{% block navbar_container_class %}container{% endblock navbar_container_class %}">
|
||||
<a class="navbar-brand nav-full-height" href="{% block brand_url %}/{% endblock brand_url %}">
|
||||
|
|
@ -163,7 +169,6 @@ Blocks a service normally fills:
|
|||
{% include "yksa/includes/_footer.html" %}
|
||||
<script src="{% static 'yksa/src/bootstrap.bundle.min.js' %}"></script>
|
||||
<script src="{% static 'yksa/src/cookie-banner.js' %}"></script>
|
||||
{% comment %}Shows the toasts yksa/includes/_messages.html renders.{% endcomment %}
|
||||
<script src="{% static 'yksa/src/toast.js' %}"></script>
|
||||
{% block extra_js %}{% endblock extra_js %}
|
||||
</body>
|
||||
|
|
|
|||
|
|
@ -17,10 +17,14 @@ Optional context:
|
|||
* empty_message: text shown when ``chips`` is empty (defaults to a generic
|
||||
placeholder via {{ empty_message|default:_("No options yet.") }}).
|
||||
|
||||
Each chip is a real <button>, so it is focusable and answers to Enter/Space; a
|
||||
<span> was reachable by mouse only.
|
||||
|
||||
The accompanying JS (static/src/chip-filters.js) toggles ``.filter-chip.active``
|
||||
on click and re-emits the comma-separated value into the hidden input keyed by
|
||||
``data-filter-csv``. Submitting the form sends the result; servers split on
|
||||
comma. No XHR -- keeps URLs bookmarkable.
|
||||
``data-filter-csv``, then fires `change` on it so a live table can redraw without
|
||||
a submit. Submitting the form sends the result; servers split on comma. No XHR by
|
||||
default -- keeps URLs bookmarkable.
|
||||
{% endcomment %}
|
||||
{% load i18n %}
|
||||
<div class="card mb-3">
|
||||
|
|
@ -29,8 +33,9 @@ comma. No XHR -- keeps URLs bookmarkable.
|
|||
{% if chips %}
|
||||
<div class="d-flex flex-wrap gap-1" data-filter-group="{{ name }}">
|
||||
{% for chip in chips %}
|
||||
<span class="badge bg-secondary filter-chip {% if chip.selected %}active{% endif %}"
|
||||
data-value="{{ chip.value }}">{{ chip.label }}</span>
|
||||
<button type="button" class="filter-chip {% if chip.selected %}active{% endif %}"
|
||||
aria-pressed="{% if chip.selected %}true{% else %}false{% endif %}"
|
||||
data-value="{{ chip.value }}">{{ chip.label }}</button>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% else %}
|
||||
|
|
|
|||
|
|
@ -5,9 +5,14 @@ fixed. Never pick a heading level for its size.
|
|||
{% trans "Widgets" as parent %}{% url 'public:widget-list' as parent_url %}
|
||||
{% include "yksa/ui/_page_title.html" with title=widget.name parent=parent parent_url=parent_url %}
|
||||
|
||||
A page one level deeper names its grandparent too, so the trail reaches the
|
||||
section root rather than starting halfway down it:
|
||||
|
||||
{% include "yksa/ui/_page_title.html" with title=_("Status") parent=widget.name parent_url=... grandparent=_("Widgets") grandparent_url=... %}
|
||||
|
||||
Put it inside the page header's flex row; the row owns the actions on the right.
|
||||
{% endcomment %}
|
||||
<h1 class="h3 mb-0">
|
||||
{% if parent %}<a class="text-decoration-none" href="{{ parent_url }}">{{ parent }}</a> / {% endif %}{{ title }}
|
||||
{% if grandparent %}<a class="text-decoration-none" href="{{ grandparent_url }}">{{ grandparent }}</a> / {% endif %}{% if parent %}<a class="text-decoration-none" href="{{ parent_url }}">{{ parent }}</a> / {% endif %}{{ title }}
|
||||
</h1>
|
||||
{% if subtitle %}<span class="text-body-secondary small">{{ subtitle }}</span>{% endif %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue