Cybrkyd's Git Repositories

python-budget - commit: 6f4b824

commit 6f4b8248ee22f7f398e7a6fd37f357440d4e92def77434cba79848f06d1474ce
author Cybrkyd <git@cybrkyd.com> 2026-05-29 15:20:17 +0100
committer Cybrkyd <git@cybrkyd.com> 2026-05-29 15:20:17 +0100

Commit Message

Styling and threading.Timer trim

📊 Diffstat

budget.py 25
1 files changed, 24 insertions(+), 1 deletions(-)

Diff

diff --git a/budget.py b/budget.py
index 5da6299..7983e11 100644
--- a/budget.py
+++ b/budget.py
@@ -41,6 +41,25 @@ HTML = """
<head>
<meta charset="utf-8">
<title>Budget Tracker</title>
+ <style>
+ body {{
+ font-family: sans-serif;
+ max-width: 600px;
+ margin: 40px auto;
+ }}
+
+ input, button {{
+ padding: 8px;
+ font-size: 16px;
+ }}
+
+ .card {{
+ border: 1px solid #ccc;
+ padding: 16px;
+ margin-top: 20px;
+ max-width: 50%;
+ }}
+ </style>
</head>
<body>
@@ -51,11 +70,15 @@ HTML = """
<button type="submit">Add</button>
</form>
+ <div class="card">
<h2>All Time Balance</h2>
<p>{balance:.2f}</p>
+ </div>
+ <div class="card">
<h2>This Month</h2>
<p>{month:.2f}</p>
+ </div>
</body>
</html>
@@ -107,7 +130,7 @@ def run():
print("Running on http://localhost:8080")
- threading.Timer(0.5, open_browser).start()
+ threading.Timer(0.2, open_browser).start()
try:
server.serve_forever()