From fed658657935022a489515f3cb387bd9a63c82c6 Mon Sep 17 00:00:00 2001 From: Linnnus Date: Wed, 20 Mar 2024 15:28:32 +0100 Subject: Add global CSS --- app.py | 6 +++++- static/global.css | 9 +++++++++ views/base.html | 1 + 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 static/global.css diff --git a/app.py b/app.py index e8bbc8b..3d36d99 100644 --- a/app.py +++ b/app.py @@ -1,4 +1,4 @@ -from bottle import Bottle, run +from bottle import Bottle, run, static_file from bottle import jinja2_template as template app = Bottle() @@ -7,4 +7,8 @@ app = Bottle() def hello(): return template("index") +@app.route("/static/") +def server_static(filename): + return static_file(filename, root="./static/") + run(app, host='localhost', port=8080) diff --git a/static/global.css b/static/global.css new file mode 100644 index 0000000..2c1f553 --- /dev/null +++ b/static/global.css @@ -0,0 +1,9 @@ +/* + * This file will contain the styles that are to be applied to the WHOLE site. + * + * No page-specific settings should go in this file. + */ + +html { + background-color: red; +} diff --git a/views/base.html b/views/base.html index 9b364a8..f4f8ab5 100644 --- a/views/base.html +++ b/views/base.html @@ -2,6 +2,7 @@ +
-- cgit v1.2.3