From 2165fe99f022326d81cd19a352fab64b445df23c Mon Sep 17 00:00:00 2001 From: Flatlogic Bot Date: Sun, 16 Nov 2025 18:33:17 +0000 Subject: [PATCH] Revert to version 5841ed7 --- core/__pycache__/urls.cpython-311.pyc | Bin 401 -> 347 bytes core/__pycache__/views.cpython-311.pyc | Bin 2693 -> 1364 bytes core/templates/base.html | 35 +---- core/templates/core/index.html | 201 ++++++++++++++++++------- core/urls.py | 7 +- core/views.py | 92 +++-------- static/css/custom.css | 98 ------------ 7 files changed, 178 insertions(+), 255 deletions(-) delete mode 100644 static/css/custom.css diff --git a/core/__pycache__/urls.cpython-311.pyc b/core/__pycache__/urls.cpython-311.pyc index 623856529455f54b4d685036cac6bbdbf744b7c4..1f807fae1897c89361c99c5e868a26d00799b73f 100644 GIT binary patch delta 177 zcmbQpe4B}PIWI340}vcY|CNz7kynz@W}>>XL@IL%>l(IY%nS^xffxeP8KYPx)<}!9 zWaQ_j-eM?X1qy32-eSp1%uV&vWSzKGe&Su97(SpVBM=vR0f`UHjEsyo7-TM>q6ZA( q7f{g$HU?JC2A2+@j*uB_7g*#kvdCXyk^jKV#Lv{g4T42HK;r-r@GMLK delta 282 zcmcc3G?AHiIWI340}!kgl*+7~$ScVhHc?%B2rk_uq|T- ziU2VLq%%gbrmzPyXmY#+31~9jVkt;0$#}^K;c$B9rKDDbWu}(jVz|Yc3F3g1WUg4Fy$g6OLS7AZ<1s45_Ec#bi^gl2&@iR4W KgJ2OK&}abdU`KZV diff --git a/core/__pycache__/views.cpython-311.pyc b/core/__pycache__/views.cpython-311.pyc index b1607bdeeb5584d6b3d5204ff6623f31fcbc5f66..6867ddf286a519cf1754ac97038f9f1e4605fbf2 100644 GIT binary patch literal 1364 zcmZ`(&1)M+6ra_{dS%J>I!@|TuH%hUh$T{~CE!96oTjQ1oHkCdQ%ZHHPf-Q6#oP5Eq{V!1Q7#*Ku^61OfEk4%~~s}guETzy!YnKoA>c! z|CpMZL_mL+PRlpL2>m0JfI>sz+l$S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J@6wREq3>O?;Yb&@(es|j( zJk<=tMQiS9tnK;pSU%Nq{}px$I`HwciU6>p9M>Sj-oe};N4$f%$)Dpm@bb5Dga0|` L`Q>-|14sS?lRu|i diff --git a/core/templates/base.html b/core/templates/base.html index 29d8d2a..788576e 100644 --- a/core/templates/base.html +++ b/core/templates/base.html @@ -1,30 +1,11 @@ -{% load static %} - + - - {{ page_title|default:"Unit Converter" }} - - - - - - - - - - - - - - - -
- {% block content %}{% endblock %} -
- - - - - \ No newline at end of file + {% block title %}Knowledge Base{% endblock %} + {% block head %}{% endblock %} + + + {% block content %}{% endblock %} + + diff --git a/core/templates/core/index.html b/core/templates/core/index.html index e8849db..0a3f404 100644 --- a/core/templates/core/index.html +++ b/core/templates/core/index.html @@ -1,65 +1,154 @@ {% extends "base.html" %} -{% block content %} -
-
-

Unit Converter

-

A modern, fast, and free engineering unit converter.

-
-
- {% csrf_token %} -
- -
- - -
+{% block title %}{{ project_name }}{% endblock %} - -
- - -
+{% block head %} +{% if project_description %} + + + +{% endif %} +{% if project_image_url %} + + +{% endif %} + + + + {% endblock %} + +{% block content %} +
+
+

Analyzing your requirements and generating your app…

+
+ Loading… +
+

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 diff --git a/core/urls.py b/core/urls.py index 5f9bb72..6299e3d 100644 --- a/core/urls.py +++ b/core/urls.py @@ -1,6 +1,7 @@ from django.urls import path -from .views import IndexView + +from .views import home urlpatterns = [ - path('', IndexView.as_view(), name='index'), -] \ No newline at end of file + path("", home, name="home"), +] diff --git a/core/views.py b/core/views.py index ccbf5d8..c9aed12 100644 --- a/core/views.py +++ b/core/views.py @@ -1,75 +1,25 @@ +import os +import platform + +from django import get_version as django_version from django.shortcuts import render -from django.views import View +from django.utils import timezone -class IndexView(View): - def get(self, request, *args, **kwargs): - # For now, units are hardcoded. This will be moved to the database later. - units = { - 'Length': ['meters', 'feet', 'inches'], - 'Mass': ['kilograms', 'pounds', 'ounces'], - 'Temperature': ['Celsius', 'Fahrenheit', 'Kelvin'] - } - context = { - 'units': units, - 'page_title': 'Engineering Unit Converter', - } - return render(request, 'core/index.html', context) - def post(self, request, *args, **kwargs): - # Hardcoded units and conversion factors for the first iteration - units = { - 'Length': ['meters', 'feet', 'inches'], - 'Mass': ['kilograms', 'pounds', 'ounces'], - 'Temperature': ['Celsius', 'Fahrenheit', 'Kelvin'] - } - - value_in = request.POST.get('value_in') - unit_in = request.POST.get('unit_in') - unit_out = request.POST.get('unit_out') - - result = None - error = None +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() - try: - value_in_float = float(value_in) - - # Basic, non-comprehensive conversion logic - # This should be replaced with a more robust library or model-driven approach - - # Length - if unit_in == 'meters' and unit_out == 'feet': - result = value_in_float * 3.28084 - elif unit_in == 'feet' and unit_out == 'meters': - result = value_in_float / 3.28084 - - # Mass - elif unit_in == 'kilograms' and unit_out == 'pounds': - result = value_in_float * 2.20462 - elif unit_in == 'pounds' and unit_out == 'kilograms': - result = value_in_float / 2.20462 - - # Temperature - elif unit_in == 'Celsius' and unit_out == 'Fahrenheit': - result = (value_in_float * 9/5) + 32 - elif unit_in == 'Fahrenheit' and unit_out == 'Celsius': - result = (value_in_float - 32) * 5/9 - - elif unit_in == unit_out: - result = value_in_float - else: - # Placeholder for conversions not yet implemented - error = f"Conversion from {unit_in} to {unit_out} is not yet supported." - - except (ValueError, TypeError): - error = "Invalid input value. Please enter a number." - - context = { - 'units': units, - 'result': round(result, 4) if result is not None else None, - 'error': error, - 'value_in': value_in, - 'unit_in': unit_in, - 'unit_out': unit_out, - 'page_title': 'Engineering Unit Converter', - } - return render(request, 'core/index.html', context) \ No newline at end of file + 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", ""), + } + return render(request, "core/index.html", context) diff --git a/static/css/custom.css b/static/css/custom.css deleted file mode 100644 index e10eda2..0000000 --- a/static/css/custom.css +++ /dev/null @@ -1,98 +0,0 @@ -/* -Engineering Unit Converter - Custom Stylesheet -*/ - -:root { - --background-color: #1a1a2e; - --primary-text-color: #ffffff; - --secondary-text-color: #dcdcdc; - --accent-color-1: #e94560; - --accent-color-2: #0f3460; - --card-background: #16213e; - --border-color: #0f3460; -} - -body { - background-color: var(--background-color); - color: var(--secondary-text-color); - font-family: 'Roboto', sans-serif; - display: flex; - justify-content: center; - align-items: center; - min-height: 100vh; - padding: 2rem; -} - -h1, h2, h3, h4, h5, h6 { - font-family: 'Poppins', sans-serif; - color: var(--primary-text-color); - font-weight: 600; -} - -.converter-wrapper { - max-width: 600px; - width: 100%; - background-color: var(--card-background); - padding: 2.5rem; - border-radius: 15px; - border: 1px solid var(--border-color); - box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2); -} - -.form-control, .form-select { - background-color: var(--accent-color-2); - color: var(--primary-text-color); - border: 1px solid var(--border-color); - padding: 0.75rem 1rem; - font-size: 1rem; -} - -.form-control::placeholder { - color: #a0a0c0; -} - -.form-control:focus, .form-select:focus { - background-color: var(--accent-color-2); - color: var(--primary-text-color); - border-color: var(--accent-color-1); - box-shadow: 0 0 0 0.25rem rgba(233, 69, 96, 0.25); -} - -.form-label { - font-family: 'Poppins', sans-serif; - font-weight: 500; - color: var(--primary-text-color); -} - -.btn-convert { - background-color: var(--accent-color-1); - color: var(--primary-text-color); - border: none; - padding: 0.75rem 1.5rem; - font-weight: 600; - font-family: 'Poppins', sans-serif; - transition: background-color 0.3s ease; -} - -.btn-convert:hover { - background-color: #d43d51; - color: var(--primary-text-color); -} - -.result-box { - background-color: var(--accent-color-2); - color: var(--primary-text-color); - padding: 1.5rem; - border-radius: 10px; - margin-top: 1.5rem; - text-align: center; - font-size: 1.5rem; - font-weight: 700; - font-family: 'Poppins', sans-serif; -} - -.error-box { - color: var(--accent-color-1); - font-weight: 500; - margin-top: 1rem; -}