fjkit 0.4.1__tar.gz → 0.4.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {fjkit-0.4.1 → fjkit-0.4.2}/PKG-INFO +2 -2
- {fjkit-0.4.1 → fjkit-0.4.2}/README.md +1 -1
- {fjkit-0.4.1 → fjkit-0.4.2}/docs/workbench/assets/components.js +13 -13
- {fjkit-0.4.1 → fjkit-0.4.2}/docs/workbench/assets/learn.js +6 -6
- {fjkit-0.4.1 → fjkit-0.4.2}/docs/workbench/build.py +4 -4
- {fjkit-0.4.1 → fjkit-0.4.2}/docs/workbench/cheatsheet.py +20 -20
- {fjkit-0.4.1 → fjkit-0.4.2}/docs/workbench/templates/architecture.html +7 -8
- {fjkit-0.4.1 → fjkit-0.4.2}/docs/workbench/templates/cheatsheet.html +10 -10
- {fjkit-0.4.1 → fjkit-0.4.2}/docs/workbench/templates/components.html +22 -23
- {fjkit-0.4.1 → fjkit-0.4.2}/docs/workbench/templates/introduction.html +14 -11
- {fjkit-0.4.1 → fjkit-0.4.2}/docs/workbench/templates/learn.html +64 -64
- {fjkit-0.4.1 → fjkit-0.4.2}/docs/workbench/templates/plugins.html +52 -38
- {fjkit-0.4.1 → fjkit-0.4.2}/docs/workbench/templates/why.html +4 -4
- {fjkit-0.4.1 → fjkit-0.4.2}/docs/workbench/templates/zh/plugins.html +19 -5
- {fjkit-0.4.1 → fjkit-0.4.2}/pyproject.toml +1 -1
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/js/reveal.js +8 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/tests/test_rendering.py +3 -3
- {fjkit-0.4.1 → fjkit-0.4.2}/.gitignore +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/LICENSE +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/docs/README.md +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/docs/workbench/assets/brand.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/docs/workbench/assets/common.js +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/docs/workbench/assets/demo-dark.jpg +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/docs/workbench/assets/demo-light.jpg +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/docs/workbench/assets/mock-server.js +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/docs/workbench/build_data.py +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/docs/workbench/templates/_architecture.html +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/docs/workbench/templates/_diagram.html +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/docs/workbench/templates/_parts.html +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/docs/workbench/templates/_shell_diagram.html +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/docs/workbench/templates/base.html +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/docs/workbench/templates/zh/architecture.html +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/docs/workbench/templates/zh/cheatsheet.html +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/docs/workbench/templates/zh/components.html +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/docs/workbench/templates/zh/introduction.html +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/docs/workbench/templates/zh/learn.html +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/docs/workbench/templates/zh/why.html +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/scripts/vendor_icons.py +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/scripts/vendor_ui.py +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/__init__.py +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/auth/__init__.py +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/auth/csrf.py +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/auth/errors.py +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/auth/plugin.py +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/auth/sources.py +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/auth/stores.py +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/auth/types.py +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/cli/__init__.py +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/cli/build_css.py +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/cli/check.py +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/cli/eject.py +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/cli/ejected.py +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/cli/vocabulary.py +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/config.py +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/errors.py +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/flash.py +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/forms.py +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/htmx.py +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/icons.py +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/messages.py +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/mounting.py +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/plugins.py +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/py.typed +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/rendering.py +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/signing.py +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/sse.py +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/brand/torii-bolt.png +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/dist/fjkit-luma.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/dist/fjkit-lyra.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/dist/fjkit-maia.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/dist/fjkit-mira.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/dist/fjkit-nova.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/dist/fjkit-rhea.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/dist/fjkit-sera.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/dist/fjkit-vega.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/icons/lucide.json +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/js/errors.js +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/js/multiselect.js +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/js/resize.js +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/js/select.js +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/src/fjkit.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/vendor/basecoat/base/base.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/vendor/basecoat/basecoat-base.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/vendor/basecoat/basecoat-components.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/vendor/basecoat/basecoat-luma.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/vendor/basecoat/basecoat-lyra.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/vendor/basecoat/basecoat-maia.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/vendor/basecoat/basecoat-mira.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/vendor/basecoat/basecoat-nova.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/vendor/basecoat/basecoat-rhea.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/vendor/basecoat/basecoat-sera.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/vendor/basecoat/basecoat-vega.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/vendor/basecoat/basecoat.all.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/vendor/basecoat/basecoat.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/vendor/basecoat/components/accordion.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/vendor/basecoat/components/alert.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/vendor/basecoat/components/avatar.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/vendor/basecoat/components/badge.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/vendor/basecoat/components/breadcrumb.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/vendor/basecoat/components/button-group.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/vendor/basecoat/components/button.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/vendor/basecoat/components/card.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/vendor/basecoat/components/chart.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/vendor/basecoat/components/checkbox.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/vendor/basecoat/components/collapsible.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/vendor/basecoat/components/combobox.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/vendor/basecoat/components/command.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/vendor/basecoat/components/dialog.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/vendor/basecoat/components/drawer.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/vendor/basecoat/components/dropdown-menu.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/vendor/basecoat/components/empty.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/vendor/basecoat/components/field.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/vendor/basecoat/components/form.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/vendor/basecoat/components/input-group.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/vendor/basecoat/components/input.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/vendor/basecoat/components/item.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/vendor/basecoat/components/kbd.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/vendor/basecoat/components/label.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/vendor/basecoat/components/native-select.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/vendor/basecoat/components/popover.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/vendor/basecoat/components/progress.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/vendor/basecoat/components/radio.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/vendor/basecoat/components/range.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/vendor/basecoat/components/scrollbar.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/vendor/basecoat/components/select.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/vendor/basecoat/components/sidebar.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/vendor/basecoat/components/skeleton.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/vendor/basecoat/components/switch.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/vendor/basecoat/components/table.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/vendor/basecoat/components/tabs.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/vendor/basecoat/components/textarea.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/vendor/basecoat/components/toast.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/vendor/basecoat/components/tooltip.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/vendor/basecoat/js/all.min.js +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/vendor/basecoat/styles/luma.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/vendor/basecoat/styles/lyra.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/vendor/basecoat/styles/maia.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/vendor/basecoat/styles/mira.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/vendor/basecoat/styles/nova.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/vendor/basecoat/styles/rhea.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/vendor/basecoat/styles/sera.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/vendor/basecoat/styles/vega.css +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/vendor/htmx/htmx.min.js +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/vendor/htmx/idiomorph-ext.min.js +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/vendor/htmx/json-enc.js +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/static/vendor/htmx/sse.min.js +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/styles.py +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/templates/errors/page.html +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/templates/ui/attrs.html +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/templates/ui/button.html +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/templates/ui/data.html +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/templates/ui/disclosure.html +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/templates/ui/feedback.html +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/templates/ui/form.html +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/templates/ui/icon.html +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/templates/ui/layout.html +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/templates/ui/nav.html +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/templates/ui/overlay.html +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/templates/ui/shell.html +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/templates/ui/sidebar.html +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/templates/ui/swap.html +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/templates/ui/table.html +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/templates/ui/tabs.html +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/templating.py +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/src/fjkit/vendored.py +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/tests/conftest.py +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/tests/test_auth.py +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/tests/test_authority.py +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/tests/test_color_scheme.py +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/tests/test_components.py +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/tests/test_docs_site.py +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/tests/test_errors.py +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/tests/test_flash.py +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/tests/test_messages.py +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/tests/test_mounting.py +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/tests/test_plugins.py +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/tests/test_readme.py +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/tests/test_sse.py +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/tests/test_style_packs.py +0 -0
- {fjkit-0.4.1 → fjkit-0.4.2}/tests/test_vocabulary.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: fjkit
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.2
|
|
4
4
|
Summary: Server-rendered UI kit for FastAPI — Jinja2 + Basecoat + htmx, no front-end build
|
|
5
5
|
Project-URL: Homepage, https://liweicheng00.github.io/fjkit/
|
|
6
6
|
Project-URL: Documentation, https://liweicheng00.github.io/fjkit/
|
|
@@ -129,7 +129,7 @@ uv run fjkit check app/templates
|
|
|
129
129
|
|
|
130
130
|
**[Docs](https://liweicheng00.github.io/fjkit/)**
|
|
131
131
|
|
|
132
|
-
Status: 0.4.
|
|
132
|
+
Status: 0.4.2. Macro signatures can change before 1.0.
|
|
133
133
|
|
|
134
134
|
## License
|
|
135
135
|
|
|
@@ -291,7 +291,7 @@ const MACROS = {
|
|
|
291
291
|
: "";
|
|
292
292
|
return `{% from "ui/data.html" import card %}\n\n${pre}{% call card(${args}) %}\n <p>${p.body}</p>\n{% endcall %}`;
|
|
293
293
|
},
|
|
294
|
-
caption: "actions takes pre-rendered markup rather than a second slot
|
|
294
|
+
caption: "actions takes pre-rendered markup rather than a second slot. A two-slot call block runs its body once per slot, which is wrong for a heavy body. padded=false lets a table sit flush against the edges.",
|
|
295
295
|
},
|
|
296
296
|
|
|
297
297
|
table: {
|
|
@@ -664,7 +664,7 @@ const SHOWCASE = {
|
|
|
664
664
|
required=true, revealable=true) }}
|
|
665
665
|
|
|
666
666
|
{% block scripts %}{{ reveal_scripts() }}{% endblock %}`,
|
|
667
|
-
caption: "Live on this page — click Show. The button is markup and the script is four lines. Two things make it correct: the
|
|
667
|
+
caption: "Live on this page — click Show. The button is markup and the script is four lines. Two things make it correct: the script delegates the listener from document, because a 422 is most likely to swap out the form a password sits in and take a listener bound to the old button with it; and it finds the input through aria-controls, so nothing hard-codes the id the macro chose. reveal_scripts() is per page, never in the shell.",
|
|
668
668
|
},
|
|
669
669
|
|
|
670
670
|
section: {
|
|
@@ -719,7 +719,7 @@ const SHOWCASE = {
|
|
|
719
719
|
{% call list_item() %}Templates are compiled once per process.{% endcall %}
|
|
720
720
|
{% call list_item() %}A row costs a function call, not a lookup.{% endcall %}
|
|
721
721
|
{% endcall %}`,
|
|
722
|
-
caption: "Two blocks rather than a list argument, because an item is markup
|
|
722
|
+
caption: "Two blocks rather than a list argument, because an item is markup. It can hold a badge, a link or a kbd without the caller escaping anything.",
|
|
723
723
|
},
|
|
724
724
|
|
|
725
725
|
inline: {
|
|
@@ -824,7 +824,7 @@ const SHOWCASE = {
|
|
|
824
824
|
{% endcall %}
|
|
825
825
|
{{ progress(0, label="Upload", id="bar") }}
|
|
826
826
|
{% endcall %}`,
|
|
827
|
-
caption: "encoding=\"multipart\" is not optional — without it the route
|
|
827
|
+
caption: "encoding=\"multipart\" is not optional — without it the route gets the file's name as a string, and the POST succeeds having saved nothing. progress names the bar; htmx reports what it has sent and the form macro writes the number into the width, aria-valuenow and the printed percentage. No JavaScript file is added. file_field takes no value: a browser will not let a page refill a file input, so a 422 redraw returns this box empty while every other field keeps what was typed.",
|
|
828
828
|
},
|
|
829
829
|
|
|
830
830
|
description_list: {
|
|
@@ -836,7 +836,7 @@ const SHOWCASE = {
|
|
|
836
836
|
{{ description_item("Owner", "Ada Lovelace") }}
|
|
837
837
|
{% call description_item("Notes") %}<p>Two lines fit here without a clamp.</p>{% endcall %}
|
|
838
838
|
{% endcall %}`,
|
|
839
|
-
caption: "A native <dl>, so each value
|
|
839
|
+
caption: "A native <dl>, so a screen reader announces each value as the definition of its term — the relationship item_list does not carry. layout=\"rows\" puts the term beside the value once there is room for two columns; layout=\"stacked\" keeps it above at every width.",
|
|
840
840
|
},
|
|
841
841
|
|
|
842
842
|
alert: {
|
|
@@ -880,7 +880,7 @@ const SHOWCASE = {
|
|
|
880
880
|
("board", "Board"),
|
|
881
881
|
("settings", "Settings")]) }}
|
|
882
882
|
{% endblock %}`,
|
|
883
|
-
caption: "Route names, not URLs
|
|
883
|
+
caption: "Route names, not URLs. The active state compares routes rather than string-matching paths, so it stays right when a URL grows a query string. Past about six destinations this is the wrong component — fill the shell's sidebar block instead.",
|
|
884
884
|
},
|
|
885
885
|
|
|
886
886
|
theme_toggle: {
|
|
@@ -898,7 +898,7 @@ const SHOWCASE = {
|
|
|
898
898
|
{{ breadcrumb([("Board", "/"),
|
|
899
899
|
("Tasks", "/tasks"),
|
|
900
900
|
("Ship the vocabulary", none)]) }}`,
|
|
901
|
-
caption: "A pair whose href is none is the current page
|
|
901
|
+
caption: "A pair whose href is none is the current page. It renders as a span with aria-current, not a link. That is the shape of the argument, so a trail cannot be built with the current page linked to itself.",
|
|
902
902
|
},
|
|
903
903
|
|
|
904
904
|
avatar: {
|
|
@@ -942,7 +942,7 @@ const SHOWCASE = {
|
|
|
942
942
|
{% endcall %}
|
|
943
943
|
{% call collapsible("Can I edit a component?") %}…{% endcall %}
|
|
944
944
|
{% endcall %}`,
|
|
945
|
-
caption: "A native <details
|
|
945
|
+
caption: "A native <details>. Open state, keyboard operation and the disclosure role all come from the element. accordion adds the class Basecoat watches to close the siblings; multiple withholds it, so allowing several open panels ships no JS rather than JS asked to do nothing.",
|
|
946
946
|
},
|
|
947
947
|
|
|
948
948
|
tooltip: {
|
|
@@ -952,7 +952,7 @@ const SHOWCASE = {
|
|
|
952
952
|
{% call tooltip("Saves without leaving the page", side="top") %}
|
|
953
953
|
{{ button("Save", variant="outline") }}
|
|
954
954
|
{% endcall %}`,
|
|
955
|
-
caption: "Drawn from a data-tooltip attribute and CSS content() — no second element, no JavaScript. That also means the text is not in the accessibility tree
|
|
955
|
+
caption: "Drawn from a data-tooltip attribute and CSS content() — no second element, no JavaScript. That also means the text is not in the accessibility tree. A tooltip is a hint, never the only label a control has.",
|
|
956
956
|
},
|
|
957
957
|
|
|
958
958
|
popover: {
|
|
@@ -979,7 +979,7 @@ const SHOWCASE = {
|
|
|
979
979
|
{{ menu_item("Wrap long lines", checked=true) }}
|
|
980
980
|
{{ menu_item("Log out", variant="destructive") }}
|
|
981
981
|
{% endcall %}`,
|
|
982
|
-
caption: "menu_item switches role with the state it reports: menuitemcheckbox when
|
|
982
|
+
caption: "menu_item switches role with the state it reports: menuitemcheckbox when you pass checked, menuitemradio for radio. A menu is not a select — it runs commands and leaves nothing in a form submission.",
|
|
983
983
|
},
|
|
984
984
|
|
|
985
985
|
select_menu: {
|
|
@@ -988,7 +988,7 @@ const SHOWCASE = {
|
|
|
988
988
|
|
|
989
989
|
{{ select_menu("theme", [("light", "Light"), ("dark", "Dark")],
|
|
990
990
|
selected="dark", label="Theme") }}`,
|
|
991
|
-
caption: "Prefer select_field. A native <select> is correct
|
|
991
|
+
caption: "Prefer select_field. A native <select> is correct with no work and costs one element; this is thirty and needs JS. Reach for it when a row needs markup an <option> cannot hold. The value sits in a hidden input, pre-filled so an untouched form still posts.",
|
|
992
992
|
},
|
|
993
993
|
|
|
994
994
|
combobox: {
|
|
@@ -1019,7 +1019,7 @@ const SHOWCASE = {
|
|
|
1019
1019
|
|
|
1020
1020
|
{{ combobox("labels", label_options, selected=task.labels,
|
|
1021
1021
|
multiple=true, placeholder="Add a label", label="Labels") }}`,
|
|
1022
|
-
caption: "Same hidden input and the same script as select_menu; what differs is where the selection
|
|
1022
|
+
caption: "Same hidden input and the same script as select_menu; what differs is where the selection appears — Basecoat draws it as chips from JS, so this preview starts empty while the select's does not. Both are worth their cost only past about a dozen options; below that a checkbox group in a fieldset posts the same thing and needs no script at all.",
|
|
1023
1023
|
},
|
|
1024
1024
|
|
|
1025
1025
|
drawer: {
|
|
@@ -1099,7 +1099,7 @@ const SNIPPET = {
|
|
|
1099
1099
|
{% endcall %}
|
|
1100
1100
|
{% endcall %}
|
|
1101
1101
|
{% endblock %}`,
|
|
1102
|
-
caption: "The rail on the left of this page is this call. Route names again, so the current page
|
|
1102
|
+
caption: "The rail on the left of this page is this call. Route names again, so comparing routes decides the current page; open=false is the desktop starting state only, because a narrow screen renders the panel as a full-screen overlay and a page that opens under its own navigation is a bug. sidebar_submenu is a <details>, so the open state and the keyboard are the browser's.",
|
|
1103
1103
|
},
|
|
1104
1104
|
|
|
1105
1105
|
toaster: {
|
|
@@ -3,7 +3,7 @@ const WIRING = [
|
|
|
3
3
|
{
|
|
4
4
|
file: "app/main.py",
|
|
5
5
|
lang: "python",
|
|
6
|
-
why: "Two calls. FjkitConfig holds every
|
|
6
|
+
why: "Two calls. FjkitConfig holds every setting; mount_fjkit serves the kit's assets from inside the installed package and compiles the environment once, at construction.",
|
|
7
7
|
code: `from fastapi import FastAPI
|
|
8
8
|
from fjkit import FjkitConfig, mount_fjkit
|
|
9
9
|
|
|
@@ -528,7 +528,7 @@ const PATTERNS = [
|
|
|
528
528
|
tag: 'hx-trigger="keyup changed delay:400ms"',
|
|
529
529
|
doc: { label: "examples/active-search", href: "https://htmx.org/examples/active-search/" },
|
|
530
530
|
when: "<b>A list narrows while the user types</b> — and you want one request, not one per keystroke.",
|
|
531
|
-
caption: "changed drops the request when the value did not
|
|
531
|
+
caption: "changed drops the request when the value did not move: arrows, modifiers, a retyped character. delay:400ms restarts the countdown on every keystroke, so a fast typist sends one request instead of twelve. The extra search event catches the native clear button that type=\"search\" gets for free.",
|
|
532
532
|
files: [
|
|
533
533
|
{
|
|
534
534
|
label: "tasks/_search.html",
|
|
@@ -644,7 +644,7 @@ def board(service, status=None, owner=None) -> BoardResponse:
|
|
|
644
644
|
aria_label="Delete " ~ task.title,
|
|
645
645
|
hx_delete=url_for(request, "tasks_delete", task_id=task.id) ~ filter_query,
|
|
646
646
|
hx_target="#board", hx_swap="outerHTML",
|
|
647
|
-
hx_confirm="Delete
|
|
647
|
+
hx_confirm="Delete '" ~ task.title ~ "'?") }}`,
|
|
648
648
|
},
|
|
649
649
|
{
|
|
650
650
|
label: "router.py",
|
|
@@ -665,7 +665,7 @@ def delete_task(service: ServiceDep, task_id: int,
|
|
|
665
665
|
tag: 'hx-trigger="load delay:2s"',
|
|
666
666
|
doc: { label: "docs/#polling", href: "https://htmx.org/docs/#polling" },
|
|
667
667
|
when: "<b>A job, an import, a build.</b> Refresh while it runs, and stop when it finishes.",
|
|
668
|
-
caption: "Polling that ends when the work does
|
|
668
|
+
caption: "Polling that ends when the work does. While the job runs the partial re-arms itself, and the finished render carries no hx-trigger, so the last response is the one that stopped asking. hx-trigger=\"every 2s\" never stops on its own — the server has to answer 286, htmx's stop-polling status, or something has to remove the element. Either shape costs one request per interval per open tab, so keep the handler cheap and the interval honest. Below a couple of seconds, reach for SSE instead.",
|
|
669
669
|
files: [
|
|
670
670
|
{
|
|
671
671
|
label: "jobs/_job.html",
|
|
@@ -730,7 +730,7 @@ def tasks_report(service: ServiceDep) -> ReportResponse:
|
|
|
730
730
|
tag: 'hx-target="closest tr"',
|
|
731
731
|
doc: { label: "examples/click-to-load", href: "https://htmx.org/examples/click-to-load/" },
|
|
732
732
|
when: "<b>A long list, one page at a time</b> — with no page number living in the browser.",
|
|
733
|
-
caption: "The sentinel row replaces itself with the next page, which carries the next sentinel — or nothing, when the rows run out.
|
|
733
|
+
caption: "The sentinel row replaces itself with the next page, which carries the next sentinel — or nothing, when the rows run out. The client counts nothing. The only thing that advances is the cursor the server sent. Swap the trigger to revealed and the same endpoint becomes infinite scroll; keep the button and the list stays reachable from the keyboard.",
|
|
734
734
|
files: [
|
|
735
735
|
{
|
|
736
736
|
label: "tasks/_rows.html",
|
|
@@ -844,7 +844,7 @@ def update_task(service: ServiceDep, task_id: int, title: Annotated[str, Form()]
|
|
|
844
844
|
tag: "change — and hx-include",
|
|
845
845
|
doc: { label: "examples/value-select", href: "https://htmx.org/examples/value-select/" },
|
|
846
846
|
when: "<b>Pick a project, and the owner list narrows</b> to the people on it.",
|
|
847
|
-
caption: "A select fires on change by default, so there is no hx-trigger to write, and htmx sends the value of the element that fired — the query parameter is
|
|
847
|
+
caption: "A select fires on change by default, so there is no hx-trigger to write, and htmx sends the value of the element that fired — the query parameter is the field's name. When the endpoint needs more than that one field, hx-include names the rest. The options are (value, label) pairs built in the service; the template never maps a domain value to a label.",
|
|
848
848
|
files: [
|
|
849
849
|
{
|
|
850
850
|
label: "tasks/_form.html",
|
|
@@ -135,8 +135,8 @@ PAGES = [
|
|
|
135
135
|
"label": "Why fjkit",
|
|
136
136
|
"title": "Why fjkit, and when not",
|
|
137
137
|
"description": (
|
|
138
|
-
"Three ways to put a UI on a FastAPI app
|
|
139
|
-
"
|
|
138
|
+
"Three ways to put a UI on a FastAPI app, what each one costs, and what this one "
|
|
139
|
+
"gives up in exchange."
|
|
140
140
|
),
|
|
141
141
|
},
|
|
142
142
|
"zh": {
|
|
@@ -178,7 +178,7 @@ PAGES = [
|
|
|
178
178
|
"title": "Learn fjkit",
|
|
179
179
|
"description": (
|
|
180
180
|
"Build a FastAPI interface without a front-end toolchain: how the kit is wired, what "
|
|
181
|
-
"htmx actually sends, what a rejected form does, a
|
|
181
|
+
"htmx actually sends, what a rejected form does, a token override that repaints the "
|
|
182
182
|
"page, and the vocabulary checker."
|
|
183
183
|
),
|
|
184
184
|
},
|
|
@@ -343,7 +343,7 @@ STRINGS = {
|
|
|
343
343
|
#: gaps are filled with `kbd()`, which yields Markup, and splitting the
|
|
344
344
|
#: sentence keeps the template free of `|safe`.
|
|
345
345
|
"footer_note": [
|
|
346
|
-
"This site is a fjkit app
|
|
346
|
+
"This site is a fjkit app. It extends ",
|
|
347
347
|
" and passes ",
|
|
348
348
|
", so it cannot show you a component the package does not ship.",
|
|
349
349
|
],
|
|
@@ -117,7 +117,7 @@ GROUPS = [
|
|
|
117
117
|
"macros": [
|
|
118
118
|
_m(
|
|
119
119
|
"morph_scripts()",
|
|
120
|
-
en="Loads the idiomorph extension, which adds the morph:* swap styles
|
|
120
|
+
en="Loads the idiomorph extension, which adds the morph:* swap styles. The "
|
|
121
121
|
"reply patches the DOM instead of replacing it, so focus, scroll position, "
|
|
122
122
|
"an open details and a ticked box survive a sort. Two halves — the element "
|
|
123
123
|
'whose swaps should morph declares hx-ext="morph", and the swap itself is '
|
|
@@ -183,7 +183,7 @@ GROUPS = [
|
|
|
183
183
|
_m(
|
|
184
184
|
'split(aside="md", gap=6)',
|
|
185
185
|
block="slots",
|
|
186
|
-
en="Called as {% call(slot) split() %}, and the
|
|
186
|
+
en="Called as {% call(slot) split() %}, and the macro renders the block twice — "
|
|
187
187
|
'once with slot="main", once with slot="aside".',
|
|
188
188
|
zh="用 {% call(slot) split() %} 呼叫,區塊會被渲染兩次——"
|
|
189
189
|
'slot="main" 一次,slot="aside" 一次。',
|
|
@@ -255,7 +255,7 @@ GROUPS = [
|
|
|
255
255
|
),
|
|
256
256
|
_m(
|
|
257
257
|
"sidebar_item(label, href, active=false, icon_name=none, lead=none)",
|
|
258
|
-
en="For a URL that is not one route
|
|
258
|
+
en="For a URL that is not one route, such as the same route with a different "
|
|
259
259
|
"parameter per row. lead puts a badge in a fixed-width cell so labels align.",
|
|
260
260
|
zh="給不是單一路由的網址用:同一條路由、每列帶不同參數。"
|
|
261
261
|
"lead 把徽章放進固定寬度的格子,讓標籤對齊。",
|
|
@@ -338,7 +338,7 @@ GROUPS = [
|
|
|
338
338
|
"description_item(term, value=none)",
|
|
339
339
|
block="value",
|
|
340
340
|
optional=True,
|
|
341
|
-
en="A native <dl
|
|
341
|
+
en="A native <dl>. A screen reader announces the value as the definition of its term. "
|
|
342
342
|
"item_list is a list of things; this is a list of facts about one.",
|
|
343
343
|
zh="原生的 <dl>:值會被朗讀成該詞條的定義。item_list 是一串東西的清單,"
|
|
344
344
|
"這個是同一個東西的一串事實。",
|
|
@@ -353,7 +353,7 @@ GROUPS = [
|
|
|
353
353
|
_m(
|
|
354
354
|
"avatar(name, src=none, size=\"\", initials=none, badge_tone=none,\n"
|
|
355
355
|
" badge_icon=none)",
|
|
356
|
-
en="
|
|
356
|
+
en="The macro derives the initials from name unless you override them.",
|
|
357
357
|
zh="沒有另外指定時,縮寫由 name 推導。",
|
|
358
358
|
),
|
|
359
359
|
_m("avatar_group(overflow=none, label=none)", block="avatar()"),
|
|
@@ -390,7 +390,7 @@ GROUPS = [
|
|
|
390
390
|
"case; pass rows=none to always render the body yourself. A column with "
|
|
391
391
|
"a sort_url becomes a sortable header, and target turns those links into "
|
|
392
392
|
"htmx swaps. resizable=true puts a drag handle on each labelled column "
|
|
393
|
-
"and needs an id=, the key the widths
|
|
393
|
+
"and needs an id=, the key it stores the widths under. Columns sharing a "
|
|
394
394
|
"group get one heading above them in a second header row.",
|
|
395
395
|
zh="columns 是 dict 的清單——label,可選 align、width、sort、sort_url、select 或 group。"
|
|
396
396
|
"傳了 rows,空資料的情況就歸 macro 管;傳 rows=none 則永遠自己渲染 body。"
|
|
@@ -403,7 +403,7 @@ GROUPS = [
|
|
|
403
403
|
block="content",
|
|
404
404
|
optional=True,
|
|
405
405
|
en="Pass value for text, or omit it and use a block for markup. tone is a "
|
|
406
|
-
"closed lookup, so
|
|
406
|
+
"closed lookup, so you cannot pass a colour through.",
|
|
407
407
|
zh="文字用 value,標記則省略 value 改用區塊。tone 是封閉查表,顏色傳不進來。",
|
|
408
408
|
),
|
|
409
409
|
_m(
|
|
@@ -423,7 +423,7 @@ GROUPS = [
|
|
|
423
423
|
_m(
|
|
424
424
|
'select_count(name="selected", label="{n} selected",\n'
|
|
425
425
|
' zero="None selected")',
|
|
426
|
-
en="The live readout of how many rows are picked.
|
|
426
|
+
en="The live readout of how many rows are picked. You write both strings in "
|
|
427
427
|
"the markup, so a translated page translates them. Pass zero=none and it "
|
|
428
428
|
"hides while nothing is selected.",
|
|
429
429
|
zh="即時顯示選了幾列。兩個字串都寫在標記裡,所以翻譯頁面能翻譯它們。"
|
|
@@ -449,9 +449,9 @@ GROUPS = [
|
|
|
449
449
|
' param="per_page", keep=none, target=none,\n'
|
|
450
450
|
' label="Rows per page", apply_label="Apply")',
|
|
451
451
|
en="A GET form, because a select on its own cannot act on a change. url must "
|
|
452
|
-
"carry no query string — a native submit throws it away — so filters
|
|
452
|
+
"carry no query string — a native submit throws it away — so pass the filters "
|
|
453
453
|
"in keep as hidden fields. Never the page number. With a target the select "
|
|
454
|
-
"applies itself and the submit button
|
|
454
|
+
"applies itself, and the submit button renders only without scripting.",
|
|
455
455
|
zh="一個 GET form,因為單獨一個 select 沒有辦法對變更做出反應。"
|
|
456
456
|
"url 不能帶 query string——原生送出會把它整段丟掉——所以篩選要放在 keep,"
|
|
457
457
|
"以 hidden 欄位傳遞,但絕不放頁碼。給了 target,select 自己就會套用,"
|
|
@@ -525,7 +525,7 @@ GROUPS = [
|
|
|
525
525
|
" required=false, hint=none, error=none, id=none)",
|
|
526
526
|
en="type is where dates live: date, time, datetime-local, month and week "
|
|
527
527
|
"are native inputs, and there is no date_field because a macro around one "
|
|
528
|
-
"would add a name and nothing else. min/max/step
|
|
528
|
+
"would add a name and nothing else. min/max/step pass through as attributes. "
|
|
529
529
|
"Not file — an upload cannot be restored from value after a 422.",
|
|
530
530
|
zh="日期就在 type 裡:date、time、datetime-local、month、week 都是原生 "
|
|
531
531
|
"input,沒有 date_field,因為包一層只多一個名字。min/max/step 當一般屬性傳。"
|
|
@@ -538,10 +538,10 @@ GROUPS = [
|
|
|
538
538
|
_m(
|
|
539
539
|
"file_field(name, label=none, accept=none, multiple=false,\n"
|
|
540
540
|
" required=false, hint=none, error=none, id=none)",
|
|
541
|
-
en="No value parameter
|
|
542
|
-
"
|
|
543
|
-
"still typed in. The form needs encoding=\"multipart\" or the route
|
|
544
|
-
"
|
|
541
|
+
en="No value parameter, because a browser will not let a page refill a file "
|
|
542
|
+
"input. A 422 redraw comes back with this box empty and every other field "
|
|
543
|
+
"still typed in. The form needs encoding=\"multipart\" or the route gets "
|
|
544
|
+
"the file's name as a string.",
|
|
545
545
|
zh="沒有 value 參數:瀏覽器不允許頁面替 file input 填回內容,"
|
|
546
546
|
"所以 422 重畫時這一格是空的,其他欄位仍保留輸入。表單必須加 "
|
|
547
547
|
"encoding=\"multipart\",否則路由收到的是檔名字串。",
|
|
@@ -671,9 +671,9 @@ GROUPS = [
|
|
|
671
671
|
'tab_panel("detail", lazy=url_for(request, "detail"),\n'
|
|
672
672
|
' on=["task-selected"], include="[name=task_id]")',
|
|
673
673
|
block="the placeholder, or the open tab's body",
|
|
674
|
-
en="lazy is a URL
|
|
674
|
+
en="lazy is a URL. The panel fetches its own body when its tab is shown, "
|
|
675
675
|
"and the block is what stands in until it arrives. The open tab is the "
|
|
676
|
-
"exception
|
|
676
|
+
"exception. It does not fetch at load, so its block is the real body, "
|
|
677
677
|
"rendered by the page from the partial lazy returns. on lists the "
|
|
678
678
|
"broadcasts it follows while it is visible, include the selector for "
|
|
679
679
|
"what it sends. Not revealed — a panel hidden by display:none reports "
|
|
@@ -747,8 +747,8 @@ GROUPS = [
|
|
|
747
747
|
" visible_label=none, hint=none, error=none,\n"
|
|
748
748
|
' search=none, search_param="q", search_delay=250)',
|
|
749
749
|
en="select_menu with a filter box. Same multiple=true rule, same "
|
|
750
|
-
"visible_label. search=<url> moves the filter to the server
|
|
751
|
-
"
|
|
750
|
+
"visible_label. search=<url> moves the filter to the server. The route receives "
|
|
751
|
+
"?q=<typed> and answers with option rows only. To act on a pick, "
|
|
752
752
|
"listen for change on the root — hx_trigger=\"change target:#<id>\" — "
|
|
753
753
|
"because that is where Basecoat dispatches it.",
|
|
754
754
|
zh="加了篩選框的 select_menu。multiple=true 的規則相同,visible_label 也相同。"
|
|
@@ -1019,7 +1019,7 @@ HTMX = [
|
|
|
1019
1019
|
'hx-swap="beforeend" append (afterbegin prepends)\n'
|
|
1020
1020
|
'hx-swap="afterend" insert after (beforebegin: before)\n'
|
|
1021
1021
|
'hx-swap="delete" remove it (none: change nothing)',
|
|
1022
|
-
"en": "Modifiers
|
|
1022
|
+
"en": "Modifiers attach to the same string: swap:200ms, settle:100ms, scroll:top.",
|
|
1023
1023
|
"zh": "修飾詞接在同一個字串上:swap:200ms、settle:100ms、scroll:top。",
|
|
1024
1024
|
},
|
|
1025
1025
|
],
|
|
@@ -58,8 +58,8 @@
|
|
|
58
58
|
into your app, and nothing in it knows the shape of your data.
|
|
59
59
|
</p>
|
|
60
60
|
<p>
|
|
61
|
-
<code>brand.css</code> is the
|
|
62
|
-
No step compiles it.
|
|
61
|
+
<code>brand.css</code> is all the styling configuration there is, and it is plain CSS
|
|
62
|
+
variables. No step compiles it.
|
|
63
63
|
</p>
|
|
64
64
|
{% endcall %}
|
|
65
65
|
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
|
|
89
89
|
{% call prose() %}
|
|
90
90
|
<p>
|
|
91
|
-
Shadowing is the feature, not an accident
|
|
91
|
+
Shadowing is the feature, not an accident. <code>ChoiceLoader</code> puts your directory in
|
|
92
92
|
front of the package's.
|
|
93
93
|
</p>
|
|
94
94
|
<p>
|
|
@@ -145,8 +145,7 @@
|
|
|
145
145
|
{% call prose() %}
|
|
146
146
|
<p>
|
|
147
147
|
<code>_board.html</code> has two ways in and two ways out, and one definition in the middle.
|
|
148
|
-
|
|
149
|
-
the same source, so they cannot drift.
|
|
148
|
+
The first paint and the swap therefore render from the same source, so they cannot drift.
|
|
150
149
|
</p>
|
|
151
150
|
{% endcall %}
|
|
152
151
|
|
|
@@ -175,9 +174,9 @@ def tasks_page(service: TaskServiceDep) -> BoardResponse:
|
|
|
175
174
|
|
|
176
175
|
{% call prose() %}
|
|
177
176
|
<p>
|
|
178
|
-
This
|
|
179
|
-
|
|
180
|
-
|
|
177
|
+
This loop is the kit's only expansion mechanism, and the demo is its test case. Measured
|
|
178
|
+
when 0.1 was finished: the same screens written before fjkit produced 258 violations, and
|
|
179
|
+
the rewrite against the kit produced 0.
|
|
181
180
|
</p>
|
|
182
181
|
<p>
|
|
183
182
|
The check also blocks a utility that merely happens to exist today. An app that borrows
|
|
@@ -71,8 +71,8 @@
|
|
|
71
71
|
{% call stack(8) %}
|
|
72
72
|
|
|
73
73
|
{% set intro %}
|
|
74
|
-
Every macro the kit ships, grouped by what it is for
|
|
75
|
-
most often
|
|
74
|
+
Every macro the kit ships, grouped by what it is for. Each row answers the question an index
|
|
75
|
+
gets asked most often: does this take a block, and what goes inside it. The
|
|
76
76
|
<a href="{{ url_for(request, "components") }}">Components</a> page is where you see them
|
|
77
77
|
running; this is where you look one up.
|
|
78
78
|
{% endset %}
|
|
@@ -83,10 +83,10 @@
|
|
|
83
83
|
{% call band("reading", "How to read this", lead_reading) %}
|
|
84
84
|
{% call prose() %}
|
|
85
85
|
<p>
|
|
86
|
-
A Jinja macro is called in one of two ways, and the name does not tell you which.
|
|
87
|
-
|
|
88
|
-
<code>{% raw %}{% call %}{% endraw %}</code>, and whatever sits between that and
|
|
89
|
-
<code>{% raw %}{% endcall %}{% endraw %}</code>
|
|
86
|
+
A Jinja macro is called in one of two ways, and the name does not tell you which. You print a
|
|
87
|
+
macro that has nothing inside it. You call a macro that wraps something with
|
|
88
|
+
<code>{% raw %}{% call %}{% endraw %}</code>, and Jinja hands whatever sits between that and
|
|
89
|
+
<code>{% raw %}{% endcall %}{% endraw %}</code> to the macro to place. Jinja calls
|
|
90
90
|
that the caller block, and every macro below that wants one carries a badge saying what goes
|
|
91
91
|
in it.
|
|
92
92
|
</p>
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
|
|
97
97
|
{% call grid(cols=2, gap=4) %}
|
|
98
98
|
{% set c_macro %}the call, with every parameter and its default. The heading above each list is the file you <code>import</code> it from{% endset %}
|
|
99
|
-
{% set c_block %}on the right of a row, and only on the rows that have one
|
|
99
|
+
{% set c_block %}on the right of a row, and only on the rows that have one. Call this macro with <code>{% raw %}{% call %}{% endraw %}</code>, and the badge says what goes inside. No badge means print it with <code>{% raw %}{{ }}{% endraw %}</code>{% endset %}
|
|
100
100
|
{% set c_note %}what the signature does not say. Absent when the signature says all of it{% endset %}
|
|
101
101
|
{{ defs("What is on a row", [
|
|
102
102
|
("The signature", c_macro),
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
<code>ui/shell.html</code> carries the <code><head></code>, the theme flash-guard, the
|
|
129
129
|
asset links and the header/main/footer skeleton. An app extends it once, in its own
|
|
130
130
|
<code>base.html</code>, and fills the blocks it needs. Fill <code>sidebar</code> or
|
|
131
|
-
<code>nav</code>, never both
|
|
131
|
+
<code>nav</code>, never both. The shell lays the header out differently for each, and filling
|
|
132
132
|
both gives you two navigations.
|
|
133
133
|
</p>
|
|
134
134
|
{% endcall %}
|
|
@@ -151,7 +151,7 @@
|
|
|
151
151
|
<p>
|
|
152
152
|
Every one of these reaches the markup as an extra keyword on a macro:
|
|
153
153
|
<code>{% raw %}{{ button("Refresh", hx_get="/tasks/board", hx_target="#board") }}{% endraw %}</code>.
|
|
154
|
-
Underscores become dashes on the way through, and that is the whole integration
|
|
154
|
+
Underscores become dashes on the way through, and that is the whole integration. No macro has
|
|
155
155
|
an htmx-specific parameter, and none needs one. The full reference is
|
|
156
156
|
<a href="https://htmx.org/reference/">htmx.org/reference</a>; what follows is what a fjkit
|
|
157
157
|
page uses.
|
|
@@ -182,7 +182,7 @@
|
|
|
182
182
|
]) }}
|
|
183
183
|
|
|
184
184
|
{% set d_learn %}<a href="{{ url_for(request, "learn") }}">how the pieces fit, and what htmx sends</a>{% endset %}
|
|
185
|
-
{% set d_components %}<a href="{{ url_for(request, "components") }}">every macro running, with
|
|
185
|
+
{% set d_components %}<a href="{{ url_for(request, "components") }}">every macro running, with controls you can change</a>{% endset %}
|
|
186
186
|
{% set d_demo %}<a href="{{ repo("examples/fjkit-demo") }}">these macros inside a working app</a>{% endset %}
|
|
187
187
|
{% set d_tokens %}<a href="{{ repo("packages/fjkit/src/fjkit/static/src/fjkit.css") }}">the token table behind every variant</a>{% endset %}
|
|
188
188
|
{{ defs("Read next", [
|