diff options
author | Linnnus <[email protected]> | 2024-03-27 14:20:24 +0100 |
---|---|---|
committer | Linnnus <[email protected]> | 2024-03-31 15:40:19 +0200 |
commit | 7a7b2a6415e09fcaf596bad5c52fd9572633b073 (patch) | |
tree | 11b36261214bf9bbd39a418c6c64d33dafe36e56 /README.md | |
parent | 05394a2be90a0fdf8c9ab571d07ed6c4a82ce89d (diff) |
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.
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -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/`. |