From d30254d49d98f312d115e2be28d4f76153bb2796 Mon Sep 17 00:00:00 2001 From: Christian Isaman Date: Mon, 13 May 2024 16:27:17 +0800 Subject: [PATCH 1/4] ignore .vscode --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index efa407c..c7950c5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +.vscode + # Byte-compiled / optimized / DLL files __pycache__/ *.py[cod] From 99c2afe3dcd207f3b5cc9a9d1ef2420af1f41826 Mon Sep 17 00:00:00 2001 From: Christian Isaman Date: Mon, 13 May 2024 16:27:52 +0800 Subject: [PATCH 2/4] add frontend server domain to env --- backend/app.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/backend/app.py b/backend/app.py index f844cf7..b751f43 100644 --- a/backend/app.py +++ b/backend/app.py @@ -11,7 +11,7 @@ def handle_send_email(): This function emulates traditional (1990s) handling of form POST requests. """ send_email(request.form.get("message"), request.form.get("email")) - return redirect("http://www.christianisaman.com") + return redirect(os.getenv("FRONTEND_SERVER_DOMAIN")) def send_email(message, user): @@ -31,6 +31,12 @@ def send_email(message, user): if __name__ == "__main__": import os + from os import path from dotenv import load_dotenv - load_dotenv() + + env_file = path.join(path.dirname(path.realpath(__file__)), "env/.env") + + load_dotenv(env_file) + + print(os.getenv("FRONTEND_SERVER_DOMAIN")) app.run(debug=True, port=5001) From 13ea8de9a28443404f55a95042e063455de6c2c1 Mon Sep 17 00:00:00 2001 From: Christian Isaman Date: Mon, 13 May 2024 16:29:53 +0800 Subject: [PATCH 3/4] fix os import --- backend/app.py | 1 - 1 file changed, 1 deletion(-) diff --git a/backend/app.py b/backend/app.py index b751f43..8cef537 100644 --- a/backend/app.py +++ b/backend/app.py @@ -30,7 +30,6 @@ def send_email(message, user): if __name__ == "__main__": - import os from os import path from dotenv import load_dotenv From 242e96ab56efa37cd1870f7ec9f71d24357e7ad1 Mon Sep 17 00:00:00 2001 From: Christian Isaman Date: Mon, 13 May 2024 16:45:41 +0800 Subject: [PATCH 4/4] more dark mode, fix specificity --- style.css | 50 ++++++++++++++++++++++++++++---------------------- 1 file changed, 28 insertions(+), 22 deletions(-) diff --git a/style.css b/style.css index 8caf37a..8c0c35a 100644 --- a/style.css +++ b/style.css @@ -1,21 +1,5 @@ * { - box-sizing: border-box; - } -/* use dark/light based on users web browser settings */ -@media (prefers-color-scheme: dark) { - body { - background-color: #121212; - color: #fff; - } - textarea, - input { - background-color: #333; - color: #fff; - border: solid 1px #a2a2a2; - } - a { - color: #73ffd0; - } + box-sizing: border-box; } body { margin: 0; @@ -23,10 +7,6 @@ body { .flex { display: flex; } -/* Don't change clicked link color */ -/* a:visited { - color: none; -} */ .center { justify-content: center; align-items: center; @@ -34,6 +14,10 @@ body { main { height: 100vh; } +a, +a:visited { + color: #ff00ff; +} article { padding: 3rem; text-align: center; @@ -54,7 +38,8 @@ input { } button { padding: 0.5rem 1rem; - background-color: #73ffd0; + background-color: #ff00ff; + color: white; border: none; cursor: pointer; width: 100px; @@ -62,3 +47,24 @@ button { margin-top: 1rem; border-radius: 3%; } +/* use dark/light based on users web browser settings */ +@media (prefers-color-scheme: dark) { + body { + background-color: #121212; + color: #fff; + } + textarea, + input { + background-color: #333; + color: #fff; + border: solid 1px #a2a2a2; + } + a, + a:visited { + color: #73ffd0; + } + button { + background-color: #73ffd0; + color: black; + } +}