This commit is contained in:
Ross
2025-12-14 09:30:23 +00:00
parent e4eaca378b
commit 1dd7c8d19e
3 changed files with 23 additions and 2 deletions
+4 -2
View File
@@ -121,9 +121,11 @@ USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/6.0/howto/static-files/
STATIC_URL = "static/"
# Project-level output directory (app-level) plus repo-level `output` for legacy layout
STATIC_URL = "/static/"
# Project-level static directories so the dev server serves files from these locations.
# Include the repository `static/` (project-level) and legacy `output/` directories.
STATICFILES_DIRS = [
BASE_DIR / "static",
BASE_DIR / "output",
# also look for output/ at the repository root (BASE_DIR.parent)
BASE_DIR.parent / "output",
@@ -6,6 +6,15 @@
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>{% block title %}Proc Rota{% endblock %}</title>
<link rel="stylesheet" href="{% static 'output/timetable.css' %}">
<!-- Inline fallback for critical layout in case static file serving is unavailable -->
<style>
/* minimal critical styles from timetable.css to avoid broken layout when static not found */
body { font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial; margin:0; padding:0 }
.container { max-width: 1100px; margin: 0 auto; padding: 1rem }
.button { display:inline-block; padding:0.4rem 0.6rem; border-radius:4px; border:1px solid #ccc; background:#f5f5f5 }
</style>
<!-- simple SVG favicon embedded to avoid 404 on /favicon.ico -->
<link rel="icon" href='data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><rect width="100" height="100" fill="%230074d9"/><text x="50" y="55" font-size="50" text-anchor="middle" fill="white" font-family="Arial,Helvetica,sans-serif">R</text></svg>'>
{% block head %}{% endblock %}
</head>
<body>
+10
View File
@@ -0,0 +1,10 @@
/* Project-level static copy of timetable.css to increase chance of being served by Django staticfinders */
html {}
body { font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial; }
/* minimal rules copied from original timetable.css */
.table-div { overflow-x: auto; }
#main-table th { text-align: center; }
/* keep the rest in app static */