diff options
author | Linnnus <[email protected]> | 2024-03-20 15:28:32 +0100 |
---|---|---|
committer | Linnnus <[email protected]> | 2024-03-20 15:29:17 +0100 |
commit | fed658657935022a489515f3cb387bd9a63c82c6 (patch) | |
tree | 71ed327f266a0db14e6343d3cc2816223f5b0334 | |
parent | db93ff98409fac1c1a3742d0f81484c985d6d55c (diff) |
Add global CSS
-rw-r--r-- | app.py | 6 | ||||
-rw-r--r-- | static/global.css | 9 | ||||
-rw-r--r-- | views/base.html | 1 |
3 files changed, 15 insertions, 1 deletions
@@ -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") [email protected]("/static/<filename>") +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 @@ <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <link href="/static/global.css" rel="stylesheet"> </head> <body> <header> |