From 7a7b2a6415e09fcaf596bad5c52fd9572633b073 Mon Sep 17 00:00:00 2001 From: Linnnus Date: Wed, 27 Mar 2024 14:20:24 +0100 Subject: Move styles and images into subfolder See the updates to the README for a description of the new layout. Note that the /static/ prefix has also been removed from URLs. It felt kind of like we were leaking implementation details. The fact that these files are staic doesn't concern the consumer of the service. --- README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index ee899b7..d133a1a 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,12 @@ This repository contains a web server which implements some guild management stu The main server is implemented in `app.py`. `views/` contains Jinja2 templates. -These are rendered using the `template()` function. +These are rendered using the `bottle#template_jinja()` function, +imported as `template()` in `app.py`. +Every view `views/X.html` has a corresponding `static/styles/X.css` +containing styles specific to that view. +Global styles are thus contained in `static/styles/base.css` +since that template forms the base for all other views. `static/` is for files that never change. -All HTTP requests that begin with `/static/` will be resolved relative to this file. +All HTTP requests that begin with `/images/` or `/styles/` will be resolved relative to their corresponding subfolder in `static/`. -- cgit v1.2.3