diff --git a/core/__pycache__/admin.cpython-311.pyc b/core/__pycache__/admin.cpython-311.pyc index cd6f855..470043b 100644 Binary files a/core/__pycache__/admin.cpython-311.pyc and b/core/__pycache__/admin.cpython-311.pyc differ diff --git a/core/__pycache__/models.cpython-311.pyc b/core/__pycache__/models.cpython-311.pyc index 9aa598b..54eb752 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..e637f39 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..07f10f8 100644 Binary files a/core/__pycache__/views.cpython-311.pyc and b/core/__pycache__/views.cpython-311.pyc differ diff --git a/core/admin.py b/core/admin.py index 8c38f3f..8c916c8 100644 --- a/core/admin.py +++ b/core/admin.py @@ -1,3 +1,5 @@ from django.contrib import admin +from .models import Skill # Register your models here. +admin.site.register(Skill) diff --git a/core/models.py b/core/models.py index 71a8362..d9fb7aa 100644 --- a/core/models.py +++ b/core/models.py @@ -1,3 +1,13 @@ from django.db import models +from django.contrib.auth.models import User -# Create your models here. +class Skill(models.Model): + title = models.CharField(max_length=200) + description = models.TextField() + creator = models.ForeignKey(User, on_delete=models.CASCADE, related_name='skills') + price = models.DecimalField(max_digits=10, decimal_places=2, default=0.00) + created_at = models.DateTimeField(auto_now_add=True) + updated_at = models.DateTimeField(auto_now=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 788576e..9c5aa0c 100644 --- a/core/templates/base.html +++ b/core/templates/base.html @@ -1,11 +1,59 @@ +{% load static %} - + - {% block title %}Knowledge Base{% endblock %} - {% block head %}{% endblock %} - - - {% block content %}{% endblock %} - - + + SkillXchange - Share Your Skills + + + + + + + + + + + + + + + + + +
+ {% block content %} + {% endblock %} +
+ + + + + + + \ No newline at end of file diff --git a/core/templates/core/index.html b/core/templates/core/index.html index 0a3f404..2d8f2cc 100644 --- a/core/templates/core/index.html +++ b/core/templates/core/index.html @@ -1,154 +1,47 @@ {% extends "base.html" %} - -{% block title %}{{ project_name }}{% endblock %} - -{% block head %} -{% if project_description %} - - - -{% endif %} -{% if project_image_url %} - - -{% endif %} - - - - -{% endblock %} +{% load static %} {% block content %} -
-
-

Analyzing your requirements and generating your app…

-
- Loading… +
+
+
+
+

Share Your Passion. Shape the Future.

+

Join a community of creators and learners. Upload your skills, share your knowledge, and start earning today.

+ Explore Skills +
+
-

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" }} -

-
-
- + + +
+
+

Latest Skills

+ {% if skills %} +
+ {% for skill in skills %} +
+
+
+
{{ skill.title }}
+

{{ skill.description|truncatewords:20 }}

+

By {{ skill.creator.get_full_name|default:skill.creator.username }}

+
+ +
+
+ {% endfor %} +
+ {% else %} +
+

The Stage is Set!

+

No skills have been shared yet. Be the first to inspire others.

+ Become a Creator +
+ {% endif %} +
+
{% endblock %} \ No newline at end of file diff --git a/core/urls.py b/core/urls.py index 6299e3d..492129b 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, article_detail urlpatterns = [ - path("", home, name="home"), + path("", index, name="index"), + path("skill//", article_detail, name="article_detail"), ] diff --git a/core/views.py b/core/views.py index c9aed12..a03c6d0 100644 --- a/core/views.py +++ b/core/views.py @@ -1,25 +1,14 @@ -import os -import platform - -from django import get_version as django_version from django.shortcuts import render -from django.utils import timezone - - -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() +from .models import Skill +def index(request): + """Render the landing screen with a list of skills.""" + skills = Skill.objects.all().order_by('-created_at') 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", ""), + 'skills': skills, } - return render(request, "core/index.html", context) + return render(request, 'core/index.html', context) + +def article_detail(request, pk): + # This is a placeholder for a future skill detail page + return render(request, 'core/article_detail.html') diff --git a/static/css/custom.css b/static/css/custom.css new file mode 100644 index 0000000..66fe762 --- /dev/null +++ b/static/css/custom.css @@ -0,0 +1,144 @@ +/* +SkillXchange Custom Stylesheet +------------------------------ +Palette: +- Primary: #1A2E4C (Deep Blue) +- Secondary: #FFFFFF (White) +- Accent: #FFC107 (Vibrant Yellow) +- Background/Neutral: #F8F9FA (Light Gray) +- Text: #212529 + +Typography: +- Headings: 'Poppins', sans-serif +- Body: 'Roboto', sans-serif +*/ + +body { + font-family: 'Roboto', sans-serif; + color: #212529; + background-color: #FFFFFF; +} + +h1, h2, h3, h4, h5, h6, .navbar-brand, .hero-title, .section-title, .card-title { + font-family: 'Poppins', sans-serif; + font-weight: 600; +} + +/* Navbar */ +.navbar { + border-bottom: 1px solid #eee; +} + +.navbar-brand { + font-weight: 700; + font-size: 1.5rem; + color: #1A2E4C !important; +} + +.btn-primary { + background-color: #1A2E4C; + border-color: #1A2E4C; +} + +.btn-primary:hover { + background-color: #2E4A6E; + border-color: #2E4A6E; +} + +.btn-accent { + background-color: #FFC107; + border-color: #FFC107; + color: #1A2E4C; + font-weight: 500; +} + +.btn-accent:hover { + background-color: #ffca2c; + border-color: #ffca2c; + color: #1A2E4C; +} + + +/* Hero Section */ +.hero-section { + background: linear-gradient(to right, #1A2E4C, #2E4A6E); + color: white; + padding: 6rem 0; + text-align: center; +} + +.hero-title { + font-size: 3.5rem; + font-weight: 700; + margin-bottom: 1rem; +} + +.hero-subtitle { + font-size: 1.25rem; + font-weight: 400; + color: rgba(255, 255, 255, 0.8); + margin-bottom: 2rem; +} + +/* Skills Section */ +.section-title { + color: #1A2E4C; + font-weight: 700; +} + +.skill-card { + border: 1px solid #e9ecef; + border-radius: 0.5rem; + transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out; + box-shadow: 0 4px 6px rgba(0,0,0,0.05); +} + +.skill-card:hover { + transform: translateY(-5px); + box-shadow: 0 12px 20px rgba(0,0,0,0.08); +} + +.skill-card .card-body { + padding: 1.5rem; +} + +.skill-card .card-title { + color: #1A2E4C; + margin-bottom: 0.75rem; +} + +.skill-card .card-creator { + font-size: 0.9rem; + color: #6c757d; + margin-bottom: 1rem; +} + +.skill-card .card-footer { + background-color: #f8f9fa; + border-top: 1px solid #e9ecef; + padding: 0.75rem 1.5rem; + display: flex; + justify-content: space-between; + align-items: center; +} + +.skill-price { + font-weight: 700; + font-size: 1.1rem; + color: #1A2E4C; +} + +.btn-primary-outline { + border: 1px solid #1A2E4C; + color: #1A2E4C; +} + +.btn-primary-outline:hover { + background-color: #1A2E4C; + color: white; +} + +/* Footer */ +footer { + background-color: #f8f9fa !important; +}