feat(dgsi/js): Add htmx

This commit is contained in:
Tom Hubrecht 2025-02-01 17:33:17 +01:00
parent c51f391938
commit e89f0e4ae5
Signed by: thubrecht
SSH key fingerprint: SHA256:r+nK/SIcWlJ0zFZJGHtlAoRwq1Rm+WcKAm5ADYMoQPc
4 changed files with 28 additions and 7 deletions

View file

@ -68,6 +68,7 @@ in
ps.django-bulma-forms
ps.django-compressor
ps.django-debug-toolbar
ps.django-htmx
ps.django-import-export
ps.django-sass-processor
ps.django-sass-processor-dart-sass

View file

@ -43,6 +43,7 @@ INSTALLED_APPS = [
"sass_processor",
"bulma",
"import_export",
"django_htmx",
# Authentication
"allauth",
"allauth.account",
@ -67,6 +68,7 @@ MIDDLEWARE = [
"django.contrib.auth.middleware.AuthenticationMiddleware",
"django.contrib.messages.middleware.MessageMiddleware",
"django.middleware.clickjacking.XFrameOptionsMiddleware",
"django_htmx.middleware.HtmxMiddleware",
"django_browser_reload.middleware.BrowserReloadMiddleware",
"allauth.account.middleware.AccountMiddleware",
]

1
src/shared/static/js/htmx.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View file

@ -1,16 +1,33 @@
{% load sass_tags static %}
{% load django_htmx sass_tags static %}
<!-- Icons -->
<link href="{% static 'favicon.ico' %}" rel="icon" />
<link href="{% static 'apple-touch-icon.png' %}" rel="apple-touch-icon" />
<link rel="icon" type="image/png" href="{% static 'favicon-16x16.png' %}" sizes="16x16" />
<link rel="icon" type="image/png" href="{% static 'favicon-32x32.png' %}" sizes="32x32" />
<link rel="icon" type="image/png" href="{% static 'android-chrome-192x192.png' %}" sizes="192x192" />
<link rel="icon"
type="image/png"
href="{% static 'favicon-16x16.png' %}"
sizes="16x16" />
<link rel="icon"
type="image/png"
href="{% static 'favicon-32x32.png' %}"
sizes="32x32" />
<link rel="icon"
type="image/png"
href="{% static 'android-chrome-192x192.png' %}"
sizes="192x192" />
<!-- CSS -->
<link href="{% sass_src 'bulma/bulma.scss' %}" rel="stylesheet" type="text/css" />
<link href="{% static 'tabler-icons/tabler-icons.min.css' %}" rel="stylesheet" type="text/css" />
<link href="{% sass_src 'bulma/bulma.scss' %}"
rel="stylesheet"
type="text/css" />
<link href="{% static 'tabler-icons/tabler-icons.min.css' %}"
rel="stylesheet"
type="text/css" />
<!-- JS -->
<script src="{% static 'js/dgsi.js' %}"></script>
<script defer data-domain="profil.dgnum.eu" src="https://analytics.dgnum.eu/js/script.js"></script>
<script defer src="{% static 'js/htmx.min.js' %}"></script>
<script defer
data-domain="profil.dgnum.eu"
src="https://analytics.dgnum.eu/js/script.js"></script>
{% django_htmx_script %}