diff options
Diffstat (limited to 'webmentions_ssg')
| -rw-r--r-- | webmentions_ssg/templates/.djlintrc | 14 | ||||
| -rw-r--r-- | webmentions_ssg/templates/base.html | 24 | ||||
| -rw-r--r-- | webmentions_ssg/templates/login.html | 2 | ||||
| -rw-r--r-- | webmentions_ssg/templates/received.html | 3 | ||||
| -rw-r--r-- | webmentions_ssg/templates/sent.html | 5 | ||||
| -rw-r--r-- | webmentions_ssg/templates/sent_source.html | 7 | ||||
| -rw-r--r-- | webmentions_ssg/templates/status.html | 2 |
7 files changed, 43 insertions, 14 deletions
diff --git a/webmentions_ssg/templates/.djlintrc b/webmentions_ssg/templates/.djlintrc new file mode 100644 index 0000000..75c02c7 --- /dev/null +++ b/webmentions_ssg/templates/.djlintrc @@ -0,0 +1,14 @@ +{ + "blank_line_before_tag": "macro,block", + "blank_line_after_tag": "endmacro,extends", + "profile": "jinja", + "format_css": true, + "css": { + "indent_size": 2 + }, + "format_js": true, + "js": { + "indent_size": 2 + }, + "indent": "2" +} diff --git a/webmentions_ssg/templates/base.html b/webmentions_ssg/templates/base.html index 15739ab..19412ed 100644 --- a/webmentions_ssg/templates/base.html +++ b/webmentions_ssg/templates/base.html @@ -20,6 +20,7 @@ SPDX-License-Identifier: BSD-3-Clause type="image/png" sizes="32x32" href="{{ url_for('static', filename='images/favicon.png') }}"> + {% block styles %} <!-- Bootstrap CSS --> {{ bootstrap.load_css() }} @@ -31,7 +32,7 @@ SPDX-License-Identifier: BSD-3-Clause <header> <nav class="navbar bg-primary py-1"> <div class="container-fluid px-3"> - <a class="navbar-brand fs-6 mb-0" href="{{ url_for("root.index") }}"> + <a class="navbar-brand fs-6 mb-0" href="{{ url_for('root.index') }}"> <img src="{{ url_for('static', filename='images/logo.svg') }}" width="30" height="30" @@ -45,7 +46,7 @@ SPDX-License-Identifier: BSD-3-Clause href='{{ url_for("root.received") }}'>Received</a> <a class="nav-link{% if request.endpoint == 'root.sent' %} active{% endif %}" href='{{ url_for("root.sent") }}'>Sent</a> - <form action="{{ url_for("root.logout") }}" method="post" class="m-0"> + <form action="{{ url_for('root.logout') }}" method="post" class="m-0"> <input type="hidden" name="csrf_token" value="{{ csrf_token() }}"> <button type="submit" class="nav-link border-0 bg-transparent">Logout</button> </form> @@ -54,13 +55,14 @@ SPDX-License-Identifier: BSD-3-Clause </div> </nav> </header> - <div class="mt-4">{{ render_messages(container=True) }}</div> - <div class="container py-4"> - {% block content %}{% endblock %} - </div> - {% block scripts %} - <!-- Optional JavaScript --> - {{ bootstrap.load_js() }} - {% endblock %} -</body> + <div class="mt-4">{{ render_messages(container=True) }}</div> + <div class="container py-4"> + {% block content %}{% endblock %} + </div> + + {% block scripts %} + <!-- Optional JavaScript --> + {{ bootstrap.load_js() }} + {% endblock %} + </body> </html> diff --git a/webmentions_ssg/templates/login.html b/webmentions_ssg/templates/login.html index 3c40ea6..0431c96 100644 --- a/webmentions_ssg/templates/login.html +++ b/webmentions_ssg/templates/login.html @@ -4,8 +4,10 @@ SPDX-FileCopyrightText: 2026 Dennis Fink <me+coding@dennisfink.me> SPDX-License-Identifier: BSD-3-Clause --> {% extends "base.html" %} + {% set title = "Login" %} {% from "bootstrap5/form.html" import render_form %} + {% block content %} <div class="row justify-content-center"> <div class="col-12 col-sm-8 col-md-6 col-lg-4">{{ render_form(form) }}</div> diff --git a/webmentions_ssg/templates/received.html b/webmentions_ssg/templates/received.html index e4064b5..1ff3690 100644 --- a/webmentions_ssg/templates/received.html +++ b/webmentions_ssg/templates/received.html @@ -4,7 +4,9 @@ SPDX-FileCopyrightText: 2026 Dennis Fink <me+coding@dennisfink.me> SPDX-License-Identifier: BSD-3-Clause --> {% extends "base.html" %} + {% from "bootstrap5/pagination.html" import render_pagination %} + {% block content %} <div class="d-flex justify-content-between align-items-center mb-3"> <h1 class="mb-0">Received Webmentions</h1> @@ -95,6 +97,7 @@ SPDX-License-Identifier: BSD-3-Clause <p class="text-body-secondary">No Webmentions have been received yet.</p> {% endif %} {% endblock %} + {% block scripts %} {{ super() }} <script src="{{ url_for('static', filename='js/confirmation-modal.js') }}"></script> diff --git a/webmentions_ssg/templates/sent.html b/webmentions_ssg/templates/sent.html index 844a243..c9662b9 100644 --- a/webmentions_ssg/templates/sent.html +++ b/webmentions_ssg/templates/sent.html @@ -4,7 +4,9 @@ SPDX-FileCopyrightText: 2026 Dennis Fink <me+coding@dennisfink.me> SPDX-License-Identifier: BSD-3-Clause --> {% extends "base.html" %} + {% from "bootstrap5/pagination.html" import render_pagination %} + {% block content %} <div class="d-flex justify-content-between align-items-center mb-3"> <h1 class="mb-0">Sources</h1> @@ -14,7 +16,7 @@ SPDX-License-Identifier: BSD-3-Clause class="btn btn-sm btn-primary" data-bs-toggle="modal" data-bs-target="#confirmation-modal" - data-action="{{ url_for("root.rescan_sent_sources") }}" + data-action="{{ url_for('root.rescan_sent_sources') }}" data-title="Rescan sources?" data-message="All sources will be scanned again for changes and webmentions." data-confirm-label="Rescan" @@ -79,6 +81,7 @@ SPDX-License-Identifier: BSD-3-Clause <p class="text-body-secondary">No Webmention sources have been discovered yet.</p> {% endif %} {% endblock %} + {% block scripts %} {{ super() }} <script src="{{ url_for('static', filename='js/confirmation-modal.js') }}"></script> diff --git a/webmentions_ssg/templates/sent_source.html b/webmentions_ssg/templates/sent_source.html index 8d22068..689c651 100644 --- a/webmentions_ssg/templates/sent_source.html +++ b/webmentions_ssg/templates/sent_source.html @@ -4,10 +4,12 @@ SPDX-FileCopyrightText: 2026 Dennis Fink <me+coding@dennisfink.me> SPDX-License-Identifier: BSD-3-Clause --> {% extends "base.html" %} + {% from "bootstrap5/pagination.html" import render_pagination %} + {% block content %} <div class="mb-3"> - <a href="{{ url_for("root.sent") }}">← Back to sources</a> + <a href="{{ url_for('root.sent') }}">← Back to sources</a> </div> <div class="d-flex justify-content-between align-items-start mb-3"> <h1 class="mb-0">Source Details</h1> @@ -191,7 +193,7 @@ SPDX-License-Identifier: BSD-3-Clause class="btn btn-sm btn-primary" data-bs-toggle="modal" data-bs-target="#confirmation-modal" - data-action="{{ url_for("root.resend_sent_webmention", source_identifier=source.uuid, webmention_identifier=webmention.uuid) }}" + data-action="{{ url_for('root.resend_sent_webmention', source_identifier=source.uuid, webmention_identifier=webmention.uuid) }}" data-title="Resend Webmention?" data-message="This Webmention will be queued again for delivery to {{ webmention.target }}." data-confirm-label="Resend" @@ -209,6 +211,7 @@ SPDX-License-Identifier: BSD-3-Clause <p class="text-body-secondary">No Webmentions have been discovered for this source.</p> {% endif %} {% endblock %} + {% block scripts %} {{ super() }} <script src="{{ url_for('static', filename='js/confirmation-modal.js') }}"></script> diff --git a/webmentions_ssg/templates/status.html b/webmentions_ssg/templates/status.html index 437a507..2db2741 100644 --- a/webmentions_ssg/templates/status.html +++ b/webmentions_ssg/templates/status.html @@ -4,7 +4,9 @@ SPDX-FileCopyrightText: 2026 Dennis Fink <me+coding@dennisfink.me> SPDX-License-Identifier: BSD-3-Clause --> {% extends "base.html" %} + {% from "bootstrap5/utils.html" import render_icon %} + {% block content %} <main class="py-5"> <div class="text-center mb-5"> |
