diff --git a/core/__pycache__/urls.cpython-311.pyc b/core/__pycache__/urls.cpython-311.pyc index 5a69659..445d5c5 100644 Binary files a/core/__pycache__/urls.cpython-311.pyc and b/core/__pycache__/urls.cpython-311.pyc differ diff --git a/core/__pycache__/views.cpython-311.pyc b/core/__pycache__/views.cpython-311.pyc index 2a36fd6..480556e 100644 Binary files a/core/__pycache__/views.cpython-311.pyc and b/core/__pycache__/views.cpython-311.pyc differ diff --git a/core/templates/base.html b/core/templates/base.html index 1e7e5fb..7446b87 100644 --- a/core/templates/base.html +++ b/core/templates/base.html @@ -1,25 +1,73 @@ +{% load static %} - - - {% block title %}Knowledge Base{% endblock %} - {% if project_description %} - - - - {% endif %} - {% if project_image_url %} - - - {% endif %} - {% load static %} - - {% block head %}{% endblock %} + + + {% block title %}Weather Forecast Pro{% endblock %} + + + + + + + + + + + + {% block extra_css %}{% endblock %} + + - - {% block content %}{% endblock %} +
+ {% block content %}{% endblock %} +
+ + + + + {% block extra_js %}{% endblock %} - - + \ No newline at end of file diff --git a/core/templates/core/index.html b/core/templates/core/index.html index faec813..2352c38 100644 --- a/core/templates/core/index.html +++ b/core/templates/core/index.html @@ -1,145 +1,104 @@ -{% extends "base.html" %} - -{% block title %}{{ project_name }}{% endblock %} - -{% block head %} - - - - -{% endblock %} +{% extends 'base.html' %} +{% load static %} {% block content %} -
-
-

Analyzing your requirements and generating your app…

-
- Loading… + +
+
+
+
+

Current Conditions

+

{{ current.city }}

+
+ {{ current.icon }} + {{ current.temp }}° +
+

{{ current.condition }}

+
+ H: {{ current.high }}° + L: {{ current.low }}° +
+
+
-

AppWizzy AI is collecting your requirements and applying the first changes.

-

This page will refresh automatically as the plan is implemented.

-

- Runtime: Django {{ django_version }} · Python {{ python_version }} - — UTC {{ current_time|date:"Y-m-d H:i:s" }} -

-
-
- -{% endblock %} \ No newline at end of file + + + +
+
+
+
+ + +
+
+
+
+ + +
+
+ +
+
+

Hourly Forecast

+
+ {% for item in hourly %} +
+
{{ item.time }}
+
{{ item.icon }}
+
{{ item.temp }}°
+
+ {% endfor %} +
+
+ +
+
+
+
Feels Like
+
{{ current.feels_like }}°
+

Similar to current

+
+
+
+
+
Humidity
+
{{ current.humidity }}%
+
+
+
+
+
+
+
+
Wind Speed
+
{{ current.wind_speed }} km/h
+

North West

+
+
+
+
+ + +
+
+

7-Day Forecast

+
+ {% for day in daily %} +
+
{{ day.day }}
+
{{ day.icon }}
+
+ {{ day.high }}° + {{ day.low }}° +
+
+ {% endfor %} +
+ +
+
+
+
+{% endblock %} diff --git a/core/urls.py b/core/urls.py index 6299e3d..9bfa68a 100644 --- a/core/urls.py +++ b/core/urls.py @@ -1,7 +1,7 @@ from django.urls import path -from .views import home +from .views import index urlpatterns = [ - path("", home, name="home"), -] + path("", index, name="index"), +] \ No newline at end of file diff --git a/core/views.py b/core/views.py index c9aed12..6ce8775 100644 --- a/core/views.py +++ b/core/views.py @@ -1,25 +1,53 @@ -import os -import platform - -from django import get_version as django_version from django.shortcuts import render -from django.utils import timezone +from datetime import datetime, timedelta - -def home(request): - """Render the landing screen with loader and environment details.""" - host_name = request.get_host().lower() - agent_brand = "AppWizzy" if host_name == "appwizzy.com" else "Flatlogic" - now = timezone.now() - - context = { - "project_name": "New Style", - "agent_brand": agent_brand, - "django_version": django_version(), - "python_version": platform.python_version(), - "current_time": now, - "host_name": host_name, - "project_description": os.getenv("PROJECT_DESCRIPTION", ""), - "project_image_url": os.getenv("PROJECT_IMAGE_URL", ""), +def index(request): + city = request.GET.get('city', 'London') + + # High-quality demo data + current_weather = { + 'city': city, + 'temp': 22, + 'condition': 'Partly Cloudy', + 'icon': '⛅', + 'high': 24, + 'low': 16, + 'humidity': 64, + 'wind_speed': 12, + 'feels_like': 21, + 'uv_index': 4, + 'visibility': 10, + 'pressure': 1012, + 'updated_at': datetime.now().strftime("%H:%M") } - return render(request, "core/index.html", context) + + hourly_forecast = [] + start_time = datetime.now() + for i in range(12): + time = (start_time + timedelta(hours=i)).strftime("%H:00") + temp = 22 - (i % 3) + hourly_forecast.append({ + 'time': 'Now' if i == 0 else time, + 'temp': temp, + 'icon': '☀️' if temp > 20 else '⛅' + }) + + daily_forecast = [] + days = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'] + today_idx = datetime.now().weekday() + for i in range(7): + day_name = days[(today_idx + i) % 7] + daily_forecast.append({ + 'day': 'Today' if i == 0 else day_name, + 'high': 24 - i, + 'low': 16 - (i % 2), + 'condition': 'Sunny' if i < 3 else 'Cloudy', + 'icon': '☀️' if i < 3 else '☁️' + }) + + context = { + 'current': current_weather, + 'hourly': hourly_forecast, + 'daily': daily_forecast, + } + return render(request, 'core/index.html', context) \ No newline at end of file diff --git a/static/css/custom.css b/static/css/custom.css index 925f6ed..d7cb1a8 100644 --- a/static/css/custom.css +++ b/static/css/custom.css @@ -1,4 +1,111 @@ -/* Custom styles for the application */ -body { - font-family: system-ui, -apple-system, sans-serif; +:root { + --primary-color: #0984E3; + --secondary-color: #2D3436; + --accent-color: #FDCB6E; + --bg-light: #F5F6FA; + --text-dark: #2D3436; + --glass-bg: rgba(255, 255, 255, 0.7); + --glass-border: rgba(255, 255, 255, 0.3); } + +body { + font-family: 'Inter', sans-serif; + color: var(--text-dark); + background-color: var(--bg-light); + line-height: 1.6; +} + +h1, h2, h3, h4, h5, .navbar-brand { + font-family: 'Outfit', sans-serif; +} + +/* Glassmorphism Card */ +.weather-card { + background: var(--glass-bg); + backdrop-filter: blur(12px); + -webkit-backdrop-filter: blur(12px); + border: 1px solid var(--glass-border); + border-radius: 24px; + box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07); + transition: transform 0.3s ease; +} + +.weather-card:hover { + transform: translateY(-5px); +} + +/* Hero Section */ +.hero-weather { + background: linear-gradient(135deg, #0984E3 0%, #74b9ff 100%); + color: white; + padding: 80px 0; + border-radius: 0 0 50px 50px; + margin-bottom: -60px; +} + +.current-temp { + font-size: 5rem; + font-weight: 700; + line-height: 1; +} + +/* Search Input */ +.search-wrapper { + max-width: 600px; + margin: 0 auto; + position: relative; + z-index: 10; +} + +.search-input { + height: 60px; + border-radius: 30px; + padding-left: 30px; + border: none; + box-shadow: 0 10px 30px rgba(0,0,0,0.1); + font-size: 1.1rem; +} + +.search-btn { + position: absolute; + right: 5px; + top: 5px; + height: 50px; + border-radius: 25px; + padding: 0 25px; + background-color: var(--primary-color); + border: none; + color: white; + font-weight: 600; +} + +/* Forecast Grids */ +.hourly-item { + min-width: 100px; + text-align: center; + padding: 15px; +} + +.day-item { + display: flex; + align-items: center; + justify-content: space-between; + padding: 15px 20px; + border-bottom: 1px solid rgba(0,0,0,0.05); +} + +.day-item:last-child { + border-bottom: none; +} + +/* Badges */ +.badge-soft { + padding: 6px 12px; + border-radius: 8px; + font-weight: 500; +} + +.badge-soft-info { + background-color: rgba(9, 132, 227, 0.1); + color: var(--primary-color); +} \ No newline at end of file diff --git a/staticfiles/css/custom.css b/staticfiles/css/custom.css index 108056f..d7cb1a8 100644 --- a/staticfiles/css/custom.css +++ b/staticfiles/css/custom.css @@ -1,21 +1,111 @@ - :root { - --bg-color-start: #6a11cb; - --bg-color-end: #2575fc; - --text-color: #ffffff; - --card-bg-color: rgba(255, 255, 255, 0.01); - --card-border-color: rgba(255, 255, 255, 0.1); + --primary-color: #0984E3; + --secondary-color: #2D3436; + --accent-color: #FDCB6E; + --bg-light: #F5F6FA; + --text-dark: #2D3436; + --glass-bg: rgba(255, 255, 255, 0.7); + --glass-border: rgba(255, 255, 255, 0.3); } + body { - margin: 0; font-family: 'Inter', sans-serif; - background: linear-gradient(45deg, var(--bg-color-start), var(--bg-color-end)); - color: var(--text-color); - display: flex; - justify-content: center; - align-items: center; - min-height: 100vh; - text-align: center; - overflow: hidden; - position: relative; + color: var(--text-dark); + background-color: var(--bg-light); + line-height: 1.6; } + +h1, h2, h3, h4, h5, .navbar-brand { + font-family: 'Outfit', sans-serif; +} + +/* Glassmorphism Card */ +.weather-card { + background: var(--glass-bg); + backdrop-filter: blur(12px); + -webkit-backdrop-filter: blur(12px); + border: 1px solid var(--glass-border); + border-radius: 24px; + box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07); + transition: transform 0.3s ease; +} + +.weather-card:hover { + transform: translateY(-5px); +} + +/* Hero Section */ +.hero-weather { + background: linear-gradient(135deg, #0984E3 0%, #74b9ff 100%); + color: white; + padding: 80px 0; + border-radius: 0 0 50px 50px; + margin-bottom: -60px; +} + +.current-temp { + font-size: 5rem; + font-weight: 700; + line-height: 1; +} + +/* Search Input */ +.search-wrapper { + max-width: 600px; + margin: 0 auto; + position: relative; + z-index: 10; +} + +.search-input { + height: 60px; + border-radius: 30px; + padding-left: 30px; + border: none; + box-shadow: 0 10px 30px rgba(0,0,0,0.1); + font-size: 1.1rem; +} + +.search-btn { + position: absolute; + right: 5px; + top: 5px; + height: 50px; + border-radius: 25px; + padding: 0 25px; + background-color: var(--primary-color); + border: none; + color: white; + font-weight: 600; +} + +/* Forecast Grids */ +.hourly-item { + min-width: 100px; + text-align: center; + padding: 15px; +} + +.day-item { + display: flex; + align-items: center; + justify-content: space-between; + padding: 15px 20px; + border-bottom: 1px solid rgba(0,0,0,0.05); +} + +.day-item:last-child { + border-bottom: none; +} + +/* Badges */ +.badge-soft { + padding: 6px 12px; + border-radius: 8px; + font-weight: 500; +} + +.badge-soft-info { + background-color: rgba(9, 132, 227, 0.1); + color: var(--primary-color); +} \ No newline at end of file