[static assets] finally bloddy django finds and serves pico.min.css
also includes a favicon because the browser kept asking for one
This commit is contained in:
parent
7028a03f5c
commit
2b7e478a40
5 changed files with 17 additions and 4 deletions
BIN
assets/favicon-32x32.png
Normal file
BIN
assets/favicon-32x32.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
4
assets/pico.min.css
vendored
Normal file
4
assets/pico.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -1,14 +1,19 @@
|
|||
{% load static %}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="color-scheme" content="light dark">
|
||||
<link href="{% static 'pico.min.css' %}" rel="stylesheet">
|
||||
<link rel="icon" type="image/png" href="{% static 'favicon-32x32.png' %}">
|
||||
<title>Teilchensammler</title>
|
||||
<!-- <link href="css/style.css" rel="stylesheet"> -->
|
||||
</head>
|
||||
<body>
|
||||
{% block content %}
|
||||
<main class="container">
|
||||
{% block content %}
|
||||
|
||||
{% endblock content %}
|
||||
{% endblock content %}
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -105,6 +105,9 @@ USE_TZ = True
|
|||
# Static files (CSS, JavaScript, Images)
|
||||
# https://docs.djangoproject.com/en/5.1/howto/static-files/
|
||||
STATIC_URL = "static/"
|
||||
STATIC_ROOT = BASE_DIR / "static"
|
||||
STATICFILES_DIRS = [BASE_DIR / "assets"]
|
||||
|
||||
|
||||
# Default primary key field type
|
||||
# https://docs.djangoproject.com/en/5.1/ref/settings/#default-auto-field
|
||||
|
|
|
|||
|
|
@ -16,13 +16,14 @@ Including another URLconf
|
|||
"""
|
||||
|
||||
from django.conf import settings
|
||||
from django.conf.urls.static import static
|
||||
from django.contrib import admin
|
||||
from django.urls import include, path
|
||||
|
||||
urlpatterns = [
|
||||
path("", include("collector.urls")),
|
||||
path("admin/", admin.site.urls),
|
||||
]
|
||||
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
|
||||
|
||||
if settings.DEBUG:
|
||||
from debug_toolbar.toolbar import debug_toolbar_urls
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue