diff --git a/core/__pycache__/models.cpython-311.pyc b/core/__pycache__/models.cpython-311.pyc index 9aa598b..76378c2 100644 Binary files a/core/__pycache__/models.cpython-311.pyc and b/core/__pycache__/models.cpython-311.pyc differ diff --git a/core/__pycache__/urls.cpython-311.pyc b/core/__pycache__/urls.cpython-311.pyc index 1f807fa..30a8f92 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 6867ddf..49f2ce6 100644 Binary files a/core/__pycache__/views.cpython-311.pyc and b/core/__pycache__/views.cpython-311.pyc differ diff --git a/core/migrations/0001_initial.py b/core/migrations/0001_initial.py new file mode 100644 index 0000000..3317c46 --- /dev/null +++ b/core/migrations/0001_initial.py @@ -0,0 +1,25 @@ +# Generated by Django 5.2.7 on 2025-11-28 22:05 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='Story', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('title', models.CharField(max_length=200)), + ('content', models.TextField()), + ('author_name', models.CharField(max_length=100)), + ('author_avatar', models.CharField(max_length=100)), + ('created_at', models.DateTimeField(auto_now_add=True)), + ], + ), + ] diff --git a/core/migrations/__pycache__/0001_initial.cpython-311.pyc b/core/migrations/__pycache__/0001_initial.cpython-311.pyc new file mode 100644 index 0000000..368142b Binary files /dev/null and b/core/migrations/__pycache__/0001_initial.cpython-311.pyc differ diff --git a/core/models.py b/core/models.py index 71a8362..a87eaac 100644 --- a/core/models.py +++ b/core/models.py @@ -1,3 +1,11 @@ from django.db import models -# Create your models here. +class Story(models.Model): + title = models.CharField(max_length=200) + content = models.TextField() + author_name = models.CharField(max_length=100) + author_avatar = models.CharField(max_length=100) + created_at = models.DateTimeField(auto_now_add=True) + + def __str__(self): + return self.title \ No newline at end of file diff --git a/core/templates/base.html b/core/templates/base.html index 1e7e5fb..8779ee4 100644 --- a/core/templates/base.html +++ b/core/templates/base.html @@ -14,8 +14,30 @@ {% endif %} {% load static %} - - {% block head %}{% endblock %} + + + + + {{ project_name }} + + + + + diff --git a/core/templates/core/index.html b/core/templates/core/index.html index faec813..65b03a0 100644 --- a/core/templates/core/index.html +++ b/core/templates/core/index.html @@ -1,145 +1,45 @@ -{% 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… +
+

Wellness Stories

+ +
+ {% for story in stories %} +
+
+
+
+ +
{{ story.title }}
+
+

{{ story.content|truncatewords:50 }}

+
+ {{ story.created_at|date:"F d, Y" }} +
+ - + - +
+
+
+
+
+ {% endfor %}
-

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 + + + +{% endblock %} + +{% block extra_js %} + +{% endblock %} diff --git a/core/urls.py b/core/urls.py index 6299e3d..8e0d0ae 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"), ] diff --git a/core/views.py b/core/views.py index c9aed12..930e74b 100644 --- a/core/views.py +++ b/core/views.py @@ -1,25 +1,32 @@ -import os -import platform - -from django import get_version as django_version from django.shortcuts import render -from django.utils import timezone +from .models import Story +def index(request): + # Create sample stories if they don't exist + if not Story.objects.exists(): + stories_data = [ + { + 'title': 'Feeling Overwhelmed', + 'content': 'Lately, I\'ve been feeling really overwhelmed with work and personal life. It feels like I\'m constantly juggling a million things and I\'m afraid I\'m going to drop the ball on something important.', + 'author_name': 'Anxious Panda', + 'author_avatar': '🐼' + }, + { + 'title': 'Struggling to find motivation', + 'content': 'I used to be so passionate about my hobbies, but now I can\'t seem to find the motivation to do anything. I just feel kind of empty and I don\'t know how to get that spark back.', + 'author_name': 'Lazy Lion', + 'author_avatar': '🦁' + }, + { + 'title': 'Dealing with a difficult friendship', + 'content': 'I have a friend who is constantly negative and it\'s starting to bring me down. I want to be there for them, but I also need to protect my own mental health. How do I find that balance?', + 'author_name': 'Confused Cat', + 'author_avatar': '🐱' + } + ] -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", ""), - } - return render(request, "core/index.html", context) + for story_data in stories_data: + Story.objects.create(**story_data) + + stories = Story.objects.all().order_by('-created_at') + return render(request, 'core/index.html', {'stories': stories}) \ No newline at end of file diff --git a/static/css/custom.css b/static/css/custom.css index 925f6ed..f1e0848 100644 --- a/static/css/custom.css +++ b/static/css/custom.css @@ -1,4 +1,19 @@ -/* Custom styles for the application */ body { - font-family: system-ui, -apple-system, sans-serif; + background-color: var(--bg-light); } + +.card { + border: none; + border-radius: 15px; + box-shadow: 0 4px 6px rgba(0,0,0,0.1); +} + +.card-title { + color: var(--dark-color); + font-weight: 600; +} + +.story-author { + font-size: 1.2rem; + font-weight: bold; +} \ No newline at end of file diff --git a/staticfiles/css/custom.css b/staticfiles/css/custom.css index 108056f..f1e0848 100644 --- a/staticfiles/css/custom.css +++ b/staticfiles/css/custom.css @@ -1,21 +1,19 @@ - -: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); -} 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; + background-color: var(--bg-light); } + +.card { + border: none; + border-radius: 15px; + box-shadow: 0 4px 6px rgba(0,0,0,0.1); +} + +.card-title { + color: var(--dark-color); + font-weight: 600; +} + +.story-author { + font-size: 1.2rem; + font-weight: bold; +} \ No newline at end of file