From 44ffcf34a8ce012bb017a9b45456eec31703dcec Mon Sep 17 00:00:00 2001 From: Flatlogic Bot Date: Mon, 26 Jan 2026 00:50:09 +0000 Subject: [PATCH] 1 --- core/__pycache__/urls.cpython-311.pyc | Bin 347 -> 348 bytes core/__pycache__/views.cpython-311.pyc | Bin 1364 -> 2251 bytes core/templates/base.html | 86 +++++++-- core/templates/core/index.html | 243 ++++++++++--------------- core/urls.py | 6 +- core/views.py | 72 +++++--- static/css/custom.css | 113 +++++++++++- staticfiles/css/custom.css | 122 +++++++++++-- 8 files changed, 437 insertions(+), 205 deletions(-) diff --git a/core/__pycache__/urls.cpython-311.pyc b/core/__pycache__/urls.cpython-311.pyc index 5a69659f6c6e0ae848e54157af197c543a09315f..445d5c5b03343967ef94867ab1b02c29e613f7fa 100644 GIT binary patch delta 86 zcmcc3bccy|IWI340}y=KUY40Nk+*=2H8U?IwPIq^Vl#;g3@GRW8v`q6gG+}{N9YXk a3oMEkSro6ZD1KmO;%92$2Eig8pg{naiy1xu delta 85 zcmcb^beoBHIWI340}xbw%g@Z3$Xme5l98XAI Z7Ws=T@>f{oKQJ@#Gc|C7U=a_{8~|R)7;FFl diff --git a/core/__pycache__/views.cpython-311.pyc b/core/__pycache__/views.cpython-311.pyc index 2a36fd69370b38a98d8b01bf8eb9817c42f16ed6..480556eaa163a22ed0c48e4b229b7f4409e885fd 100644 GIT binary patch literal 2251 zcma)7-A@}w5a09N*=HN$55Slt7-+t*O5&ssBx$3jO(3CFLW)AufK*wI_rMoypSyPl z7@Z|oYNe!#6eA(UNvUMHJM)|0 z&W?Ze`8){5&L6YNMJGakvdR8%>?yDNL3xTW!dwPrxk-*=x+CMrIwl=iev*ed{{xy7 zuy6;(#5&s++w;y|e)#e5du>6?r^rMP*s49M z@7nDz0ut<41>3cKjHt+&9OkirMeM{bEMYhHU@vaLK3zQ6h90me_E-hEwx=Uh6%N#Q z6x_NB(boJk-47;0s4WVx*ilQm#zC#;R{5{ZYwE!Rg2V1b& zvgp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%5y(&3}_ - - - {% 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 %} +
+ +
+
+
+
+

© 2026 Weather Forecast Pro. Precision in every cloud.

+
+
+ Privacy + Terms +
+
+
+
+ + + {% 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" }} -

-
-
-
- Page updated: {{ current_time|date:"Y-m-d H:i:s" }} (UTC) -
-{% 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