From 0976345e9cd03a32ba6737776057ed8315cf736b Mon Sep 17 00:00:00 2001 From: nyx Date: Sun, 9 Mar 2025 23:41:26 -0500 Subject: [PATCH] some css stuff, wip --- app/app.py | 10 ++++++++- app/static/assets/css/index.css | 37 +++++++++++++++++++++++++++++++++ app/templates/index.j2 | 2 ++ 3 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 app/static/assets/css/index.css diff --git a/app/app.py b/app/app.py index 1d3c17a..d8930ce 100644 --- a/app/app.py +++ b/app/app.py @@ -3,15 +3,23 @@ from os import path, walk app = Flask(__name__) + @app.route('/') def home(): return render_template('index.j2', instanceName="nyxask.nixos.internal") + @app.route('/auth/login/') def login(): return render_template('login.j2', instanceName="nyxask.nixos.internal") -extra_dirs = ['app/templates',] + +@app.route('/assets/css/index.css') +def index_css(): + return send_from_directory('static/assets/css', 'index.css') + + +extra_dirs = ['app/templates', 'static/assets/css'] extra_files = extra_dirs[:] for extra_dir in extra_dirs: for dirname, dirs, files in walk(extra_dir): diff --git a/app/static/assets/css/index.css b/app/static/assets/css/index.css new file mode 100644 index 0000000..49844a5 --- /dev/null +++ b/app/static/assets/css/index.css @@ -0,0 +1,37 @@ +@media (prefers-color-scheme: dark) { + body { + background: #563446; + color: white; + } + a { + color: #ffffff; + background-color: #562F39; + font-size: 0.9em; + text-decoration: none; + border-radius: 6px; + padding: 0.2em 0.7em; + transition: 0.2s; + } + a:hover { + color: #000000; + background-color: #ffffff; + } + input { + color: #ffffff; + background-color: #562F39; + font-size: 0.9em; + text-decoration: none; + border-radius: 6px; + padding: 0.2em 0.7em; + border: none; + } + textarea { + color: #ffffff; + background-color: #562F39; + font-size: 0.9em; + text-decoration: none; + border-radius: 6px; + padding: 0.2em 0.7em; + border: none; + } +} \ No newline at end of file diff --git a/app/templates/index.j2 b/app/templates/index.j2 index 8d1d0b7..4ad1e27 100644 --- a/app/templates/index.j2 +++ b/app/templates/index.j2 @@ -1,6 +1,7 @@ {% from 'header.j2' import header_home %} + {{ header_home() }} @@ -15,6 +16,7 @@ name="name" size="10" />
+