From cfc1900291e7beb8ff8412afe8ff2a0d43b98c7b Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Mon, 26 May 2025 12:39:40 +1000 Subject: [PATCH] feat: Add better formatting and style --- Dockerfile | 2 +- templates/assets/css/index.css | 164 +++++++++++++++++++++++++++++++-- templates/index.html | 50 ++-------- 3 files changed, 165 insertions(+), 51 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8bccc44..f57355d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,7 @@ RUN --mount=type=cache,target=/root/.cache/pip \ COPY . /app # Optionally mount /data to store the data -# VOLUME /data +VOLUME /data ENTRYPOINT ["python3"] CMD ["main.py"] diff --git a/templates/assets/css/index.css b/templates/assets/css/index.css index b122db8..0ce6eb0 100644 --- a/templates/assets/css/index.css +++ b/templates/assets/css/index.css @@ -1,10 +1,13 @@ body { - background-color: #000000; + background-color: #121212; color: #ffffff; - font-family: Arial, sans-serif; + font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; margin: 0; padding: 0; line-height: 1.6; + min-height: 100vh; + display: flex; + flex-direction: column; } h1 { @@ -46,7 +49,7 @@ h2 { } .form-group { - margin-bottom: 1rem; + margin-bottom: 1.5rem; } label { @@ -54,7 +57,8 @@ label { margin-bottom: 0.5rem; } -input, textarea { +input, +textarea { width: 100%; padding: 0.75rem; background-color: #222; @@ -65,6 +69,13 @@ input, textarea { box-sizing: border-box; } +input:focus, +textarea:focus { + outline: none; + border-color: #4dabf7; + box-shadow: 0 0 0 2px rgba(77, 171, 247, 0.25); +} + textarea { min-height: 100px; resize: vertical; @@ -79,11 +90,13 @@ button { font-weight: bold; cursor: pointer; border-radius: 4px; - transition: background-color 0.2s; + transition: all 0.2s ease-in-out; } button:hover { background-color: #74c0fc; + transform: translateY(-2px); + box-shadow: 0 4px 8px rgba(77, 171, 247, 0.3); } button:disabled { @@ -94,6 +107,11 @@ button:disabled { .location-item { border-bottom: 1px solid #333; padding: 1rem 0; + transition: transform 0.2s ease; +} + +.location-item:hover { + transform: translateX(5px); } .location-item:last-child { @@ -130,17 +148,149 @@ a:hover { text-decoration: underline; } +/* Rating display styling */ +.rating { + display: flex; + align-items: center; + margin-top: 0.5rem; +} + +.rating::before { + content: "★ "; + color: #ffd700; + margin-right: 5px; +} + +/* Footer styling */ +.footer { + background-color: #111; + text-align: center; + padding: 1.5rem 0; + margin-top: auto; + border-top: 2px solid #4dabf7; +} + +.footer-content { + max-width: 800px; + margin: 0 auto; +} + +.footer a { + color: #4dabf7; + transition: color 0.2s; +} + +.footer a:hover { + color: #74c0fc; + text-decoration: none; +} + +/* Enhanced form styling */ +.rating-container { + margin-top: 10px; +} + +#rating { + height: 8px; + accent-color: #4dabf7; +} + +/* Notification enhancements */ +.notification { + padding: 12px 18px; + border-radius: 6px; + margin-bottom: 20px; + box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); + animation: fadeIn 0.3s ease-in-out; +} + +@keyframes fadeIn { + from { + opacity: 0; + transform: translateY(-10px); + } + + to { + opacity: 1; + transform: translateY(0); + } +} + /* Responsive adjustments */ @media (max-width: 600px) { h1 { font-size: 36px; } - + .container { padding: 0 0.5rem; } - + .card { padding: 1rem; } +} + +.rating-container { + display: flex; + align-items: center; +} + +#rating { + flex: 1; + margin-right: 10px; +} + +#rating-value { + font-weight: bold; + width: 20px; + text-align: center; +} + +/* Notification styling */ +.notification { + padding: 10px 15px; + border-radius: 4px; + margin-bottom: 15px; + transition: opacity 0.3s ease; +} + +.notification.success { + background-color: #d4edda; + color: #155724; + border: 1px solid #c3e6cb; +} + +.notification.error { + background-color: #f8d7da; + color: #721c24; + border: 1px solid #f5c6cb; +} + +.notification.hidden { + display: none; +} + +.footer { + background-color: #000000; + padding: 10px 0; + text-align: center; + position: relative; + bottom: 0; + width: 100%; +} + +.footer-content { + max-width: 800px; + margin: 0 auto; + padding: 0 15px; +} + +.footer a { + color: #007bff; + text-decoration: none; +} + +.footer a:hover { + text-decoration: underline; } \ No newline at end of file diff --git a/templates/index.html b/templates/index.html index fadf07b..4226f71 100644 --- a/templates/index.html +++ b/templates/index.html @@ -4,7 +4,7 @@ - Kite Watch - Nathan.Woodburn/ + Kite Watch @@ -47,6 +47,12 @@ + + - - \ No newline at end of file