Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d3b19befc0 | ||
|
|
cb79e64ca1 | ||
|
|
5f1e8da6e1 |
BIN
assets/pasted-20260122-195030-9e85f2f0.png
Normal file
BIN
assets/pasted-20260122-195030-9e85f2f0.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,3 +1,14 @@
|
||||
from django.contrib import admin
|
||||
from .models import Category, Product
|
||||
|
||||
# Register your models here.
|
||||
@admin.register(Category)
|
||||
class CategoryAdmin(admin.ModelAdmin):
|
||||
list_display = ('name', 'slug')
|
||||
prepopulated_fields = {'slug': ('name',)}
|
||||
|
||||
@admin.register(Product)
|
||||
class ProductAdmin(admin.ModelAdmin):
|
||||
list_display = ('name', 'category', 'price', 'stock', 'is_active')
|
||||
list_filter = ('category', 'is_active')
|
||||
search_fields = ('name', 'description')
|
||||
prepopulated_fields = {'slug': ('name',)}
|
||||
43
core/migrations/0001_initial.py
Normal file
43
core/migrations/0001_initial.py
Normal file
@ -0,0 +1,43 @@
|
||||
# Generated by Django 5.2.7 on 2026-01-22 19:11
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Category',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('name', models.CharField(max_length=100)),
|
||||
('slug', models.SlugField(blank=True, unique=True)),
|
||||
('description', models.TextField(blank=True)),
|
||||
('image_url', models.URLField(blank=True, help_text='Placeholder image URL')),
|
||||
],
|
||||
options={
|
||||
'verbose_name_plural': 'Categories',
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Product',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('name', models.CharField(max_length=200)),
|
||||
('slug', models.SlugField(blank=True, unique=True)),
|
||||
('description', models.TextField()),
|
||||
('price', models.DecimalField(decimal_places=2, max_digits=10)),
|
||||
('stock', models.PositiveIntegerField(default=0)),
|
||||
('image_url', models.URLField(blank=True, help_text='Placeholder image URL')),
|
||||
('is_active', models.BooleanField(default=True)),
|
||||
('created_at', models.DateTimeField(auto_now_add=True)),
|
||||
('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='products', to='core.category')),
|
||||
],
|
||||
),
|
||||
]
|
||||
BIN
core/migrations/__pycache__/0001_initial.cpython-311.pyc
Normal file
BIN
core/migrations/__pycache__/0001_initial.cpython-311.pyc
Normal file
Binary file not shown.
@ -1,3 +1,38 @@
|
||||
from django.db import models
|
||||
from django.utils.text import slugify
|
||||
|
||||
# Create your models here.
|
||||
class Category(models.Model):
|
||||
name = models.CharField(max_length=100)
|
||||
slug = models.SlugField(unique=True, blank=True)
|
||||
description = models.TextField(blank=True)
|
||||
image_url = models.URLField(blank=True, help_text="Placeholder image URL")
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
if not self.slug:
|
||||
self.slug = slugify(self.name)
|
||||
super().save(*args, **kwargs)
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
||||
class Meta:
|
||||
verbose_name_plural = "Categories"
|
||||
|
||||
class Product(models.Model):
|
||||
category = models.ForeignKey(Category, related_name='products', on_delete=models.CASCADE)
|
||||
name = models.CharField(max_length=200)
|
||||
slug = models.SlugField(unique=True, blank=True)
|
||||
description = models.TextField()
|
||||
price = models.DecimalField(max_digits=10, decimal_places=2)
|
||||
stock = models.PositiveIntegerField(default=0)
|
||||
image_url = models.URLField(blank=True, help_text="Placeholder image URL")
|
||||
is_active = models.BooleanField(default=True)
|
||||
created_at = models.DateTimeField(auto_now_add=True)
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
if not self.slug:
|
||||
self.slug = slugify(self.name)
|
||||
super().save(*args, **kwargs)
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
@ -1,25 +1,103 @@
|
||||
{% load static %}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>{% block title %}Knowledge Base{% endblock %}</title>
|
||||
{% if project_description %}
|
||||
<meta name="description" content="{{ project_description }}">
|
||||
<meta property="og:description" content="{{ project_description }}">
|
||||
<meta property="twitter:description" content="{{ project_description }}">
|
||||
{% endif %}
|
||||
{% if project_image_url %}
|
||||
<meta property="og:image" content="{{ project_image_url }}">
|
||||
<meta property="twitter:image" content="{{ project_image_url }}">
|
||||
{% endif %}
|
||||
{% load static %}
|
||||
<link rel="stylesheet" href="{% static 'css/custom.css' %}?v={{ deployment_timestamp }}">
|
||||
{% block head %}{% endblock %}
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{% block title %}GiftShop Polska - Authentic Polish Gifts{% endblock %}</title>
|
||||
|
||||
{% if project_description %}
|
||||
<meta name="description" content="{{ project_description }}">
|
||||
<meta property="og:description" content="{{ project_description }}">
|
||||
<meta property="twitter:description" content="{{ project_description }}">
|
||||
{% endif %}
|
||||
{% if project_image_url %}
|
||||
<meta property="og:image" content="{{ project_image_url }}">
|
||||
<meta property="twitter:image" content="{{ project_image_url }}">
|
||||
{% endif %}
|
||||
|
||||
<!-- Fonts -->
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Playfair+Display:wght@700&display=swap" rel="stylesheet">
|
||||
|
||||
<!-- Bootstrap 5 CSS -->
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
|
||||
<!-- Bootstrap Icons -->
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1/font/bootstrap-icons.css">
|
||||
|
||||
<!-- Custom CSS -->
|
||||
<link rel="stylesheet" href="{% static 'css/custom.css' %}?v=1.3">
|
||||
|
||||
{% block head %}{% endblock %}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
{% block content %}{% endblock %}
|
||||
</body>
|
||||
|
||||
</html>
|
||||
<nav class="navbar navbar-expand-lg sticky-top">
|
||||
<div class="container">
|
||||
<a class="navbar-brand" href="{% url 'home' %}">GiftShop Polska</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarNav">
|
||||
<ul class="navbar-nav ms-auto align-items-center">
|
||||
<li class="nav-item"><a class="nav-link" href="{% url 'home' %}">Home</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="{% url 'catalog' %}">Shop</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="{% url 'constructor' %}">Constructor</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="{% url 'blog' %}">Blog</a></li>
|
||||
<li class="nav-item ms-lg-3 d-none d-lg-block">
|
||||
<a class="nav-link py-1" href="{% url 'favorites' %}" title="Favorites">
|
||||
<i class="bi bi-heart fs-5"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item ms-lg-1 d-none d-lg-block">
|
||||
<a class="nav-link py-1 position-relative" href="{% url 'cart' %}" title="Cart">
|
||||
<i class="bi bi-cart3 fs-5"></i>
|
||||
</a>
|
||||
</li>
|
||||
<!-- Mobile only Favorites/Cart -->
|
||||
<li class="nav-item d-lg-none"><a class="nav-link" href="{% url 'favorites' %}">Favorites</a></li>
|
||||
<li class="nav-item d-lg-none"><a class="nav-link" href="{% url 'cart' %}">Cart</a></li>
|
||||
|
||||
<li class="nav-item ms-lg-3">
|
||||
<a href="/admin/" class="btn btn-outline-dark btn-sm px-3 rounded-pill">Admin</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<main>
|
||||
{% block content %}{% endblock %}
|
||||
</main>
|
||||
|
||||
<footer class="footer">
|
||||
<div class="container text-center">
|
||||
<div class="row text-start text-md-center">
|
||||
<div class="col-md-4 mb-4">
|
||||
<h5 class="mb-3">GiftShop Polska</h5>
|
||||
<p class="text-muted">Curated gifts from the heart of Poland. Candles, books, and memories in a box.</p>
|
||||
</div>
|
||||
<div class="col-md-4 mb-4">
|
||||
<h5 class="mb-3">Quick Links</h5>
|
||||
<ul class="list-unstyled">
|
||||
<li><a href="{% url 'catalog' %}" class="text-decoration-none text-muted">All Products</a></li>
|
||||
<li><a href="{% url 'constructor' %}" class="text-decoration-none text-muted">Box Constructor</a></li>
|
||||
<li><a href="{% url 'blog' %}" class="text-decoration-none text-muted">Gift Shop Blog</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-md-4 mb-4">
|
||||
<h5 class="mb-3">Contact</h5>
|
||||
<p class="text-muted">Warsaw, Poland<br>hello@giftshop.pl</p>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="my-4 opacity-25">
|
||||
<p class="text-muted small">© 2026 GiftShop Polska. All rights reserved.</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<!-- Bootstrap 5 JS Bundle -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
35
core/templates/core/blog.html
Normal file
35
core/templates/core/blog.html
Normal file
@ -0,0 +1,35 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block title %}Blog - GiftShop Polska{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<section class="py-5">
|
||||
<div class="container py-5">
|
||||
<h1 class="display-5 font-playfair mb-5">Gift Shop Blog</h1>
|
||||
<div class="row g-4">
|
||||
<div class="col-md-6 col-lg-4">
|
||||
<div class="card border-0 shadow-sm h-100 rounded-4 overflow-hidden">
|
||||
<div style="height: 200px; background-color: #A8B196;"></div>
|
||||
<div class="card-body p-4">
|
||||
<small class="text-muted text-uppercase fw-bold">Traditions</small>
|
||||
<h4 class="card-title mt-2">The Magic of Polish Beeswax Candles</h4>
|
||||
<p class="card-text text-muted">Discover why natural candles are a staple in every Polish home during winter.</p>
|
||||
<a href="#" class="text-primary fw-bold text-decoration-none">Read More →</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 col-lg-4">
|
||||
<div class="card border-0 shadow-sm h-100 rounded-4 overflow-hidden">
|
||||
<div style="height: 200px; background-color: #D2765E;"></div>
|
||||
<div class="card-body p-4">
|
||||
<small class="text-muted text-uppercase fw-bold">Gifting Tips</small>
|
||||
<h4 class="card-title mt-2">How to Build the Perfect Gift Box</h4>
|
||||
<p class="card-text text-muted">A step-by-step guide to choosing items that tell a story.</p>
|
||||
<a href="#" class="text-primary fw-bold text-decoration-none">Read More →</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{% endblock %}
|
||||
40
core/templates/core/cart.html
Normal file
40
core/templates/core/cart.html
Normal file
@ -0,0 +1,40 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block title %}Your Cart - GiftShop Polska{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<section class="py-5">
|
||||
<div class="container py-5">
|
||||
<h1 class="display-5 font-playfair mb-5">Shopping Cart</h1>
|
||||
<div class="row">
|
||||
<div class="col-lg-8">
|
||||
<div class="p-5 bg-light rounded-4 text-center">
|
||||
<i class="bi bi-cart3 display-1 text-muted mb-3"></i>
|
||||
<h3>Your cart is empty</h3>
|
||||
<p class="text-muted">Looks like you haven't added anything to your cart yet.</p>
|
||||
<a href="{% url 'catalog' %}" class="btn btn-primary mt-3 text-white">Start Shopping</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<div class="card border-0 shadow-sm p-4 rounded-4">
|
||||
<h4 class="mb-4">Summary</h4>
|
||||
<div class="d-flex justify-content-between mb-2">
|
||||
<span>Subtotal</span>
|
||||
<span>0,00 zł</span>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between mb-4">
|
||||
<span>Delivery</span>
|
||||
<span class="text-muted">Calculated at next step</span>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="d-flex justify-content-between mb-4">
|
||||
<span class="h5">Total</span>
|
||||
<span class="h5">0,00 zł</span>
|
||||
</div>
|
||||
<button class="btn btn-primary w-100 py-3 text-white disabled">Checkout</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{% endblock %}
|
||||
95
core/templates/core/catalog.html
Normal file
95
core/templates/core/catalog.html
Normal file
@ -0,0 +1,95 @@
|
||||
{% extends 'base.html' %}
|
||||
{% load static %}
|
||||
|
||||
{% block title %}Catalog - GiftShop Polska{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<section class="py-5" style="background-color: #fff;">
|
||||
<div class="container">
|
||||
<nav aria-label="breadcrumb">
|
||||
<ol class="breadcrumb mb-4">
|
||||
<li class="breadcrumb-item"><a href="{% url 'home' %}">Home</a></li>
|
||||
<li class="breadcrumb-item active">Catalog</li>
|
||||
</ol>
|
||||
</nav>
|
||||
|
||||
<div class="row">
|
||||
<!-- Sidebar -->
|
||||
<div class="col-lg-3 mb-4">
|
||||
<div class="card border-0 shadow-sm p-4 sticky-top" style="top: 100px;">
|
||||
<h5 class="mb-4">Categories</h5>
|
||||
<div class="list-group list-group-flush">
|
||||
<a href="{% url 'catalog' %}" class="list-group-item list-group-item-action border-0 {% if not selected_category %}fw-bold text-primary{% endif %}">
|
||||
All Products
|
||||
</a>
|
||||
{% for category in categories %}
|
||||
<a href="{% url 'catalog' %}?category={{ category.slug }}" class="list-group-item list-group-item-action border-0 {% if selected_category.slug == category.slug %}fw-bold text-primary{% endif %}">
|
||||
{{ category.name }}
|
||||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Product Grid -->
|
||||
<div class="col-lg-9">
|
||||
<div class="d-flex justify-content-between align-items-center mb-4">
|
||||
<h2 class="h3 mb-0">{% if selected_category %}{{ selected_category.name }}{% else %}All Products{% endif %}</h2>
|
||||
<p class="text-muted mb-0 small">{{ products.count }} items found</p>
|
||||
</div>
|
||||
|
||||
<div class="row g-4">
|
||||
{% for product in products %}
|
||||
<div class="col-md-4">
|
||||
<div class="card border-0 shadow-sm h-100 product-card">
|
||||
<div class="position-relative overflow-hidden">
|
||||
<img src="{{ product.image_url|default:'https://via.placeholder.com/400x300?text=Gift+Product' }}" class="card-img-top" alt="{{ product.name }}" style="height: 250px; object-fit: cover; transition: transform 0.5s ease;">
|
||||
<div class="product-overlay">
|
||||
<a href="{% url 'product_detail' product.slug %}" class="btn btn-light btn-sm rounded-pill px-3">Quick View</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<p class="text-muted small mb-1">{{ product.category.name }}</p>
|
||||
<h5 class="card-title h6 mb-2">{{ product.name }}</h5>
|
||||
<p class="text-primary fw-bold mb-0">{{ product.price }} PLN</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% empty %}
|
||||
<div class="col-12 text-center py-5">
|
||||
<div class="mb-3 fs-1 text-muted">🥀</div>
|
||||
<h4>No products found</h4>
|
||||
<p class="text-muted">Try selecting a different category or check back later.</p>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<style>
|
||||
.product-card:hover .card-img-top {
|
||||
transform: scale(1.05);
|
||||
}
|
||||
.product-card .position-relative {
|
||||
overflow: hidden;
|
||||
}
|
||||
.product-overlay {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(0,0,0,0.1);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
opacity: 0;
|
||||
transition: opacity 0.3s ease;
|
||||
}
|
||||
.product-card:hover .product-overlay {
|
||||
opacity: 1;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
17
core/templates/core/constructor.html
Normal file
17
core/templates/core/constructor.html
Normal file
@ -0,0 +1,17 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block title %}Gift Box Constructor - GiftShop Polska{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<section class="py-5">
|
||||
<div class="container text-center py-5">
|
||||
<h1 class="display-4 font-playfair mb-4">Box Constructor</h1>
|
||||
<p class="lead text-muted mb-5">Build your perfect gift box. Choose items, add a card, and we'll pack it with love.</p>
|
||||
<div class="p-5 bg-light rounded-4 border border-dashed">
|
||||
<h3 class="text-muted">Coming Soon</h3>
|
||||
<p>Our interactive gift box builder is currently under development.</p>
|
||||
<a href="{% url 'catalog' %}" class="btn btn-primary mt-3 text-white">Browse Items</a>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{% endblock %}
|
||||
17
core/templates/core/favorites.html
Normal file
17
core/templates/core/favorites.html
Normal file
@ -0,0 +1,17 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block title %}Favorites - GiftShop Polska{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<section class="py-5">
|
||||
<div class="container py-5">
|
||||
<h1 class="display-5 font-playfair mb-5">Your Favorites</h1>
|
||||
<div class="p-5 bg-light rounded-4 text-center">
|
||||
<i class="bi bi-heart display-1 text-muted mb-3"></i>
|
||||
<h3>No favorites yet</h3>
|
||||
<p class="text-muted">Save your favorite items here to find them easily later.</p>
|
||||
<a href="{% url 'catalog' %}" class="btn btn-primary mt-3 text-white">Browse Products</a>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{% endblock %}
|
||||
@ -1,145 +1,106 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}{{ project_name }}{% endblock %}
|
||||
|
||||
{% block head %}
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap" rel="stylesheet">
|
||||
<style>
|
||||
: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);
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
body::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'><path d='M-10 10L110 10M10 -10L10 110' stroke-width='1' stroke='rgba(255,255,255,0.05)'/></svg>");
|
||||
animation: bg-pan 20s linear infinite;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
@keyframes bg-pan {
|
||||
0% {
|
||||
background-position: 0% 0%;
|
||||
}
|
||||
|
||||
100% {
|
||||
background-position: 100% 100%;
|
||||
}
|
||||
}
|
||||
|
||||
main {
|
||||
padding: 2rem;
|
||||
}
|
||||
|
||||
.card {
|
||||
background: var(--card-bg-color);
|
||||
border: 1px solid var(--card-border-color);
|
||||
border-radius: 16px;
|
||||
padding: 2.5rem 2rem;
|
||||
backdrop-filter: blur(20px);
|
||||
-webkit-backdrop-filter: blur(20px);
|
||||
box-shadow: 0 12px 36px rgba(0, 0, 0, 0.25);
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: clamp(2.2rem, 3vw + 1.2rem, 3.2rem);
|
||||
font-weight: 700;
|
||||
margin: 0 0 1.2rem;
|
||||
letter-spacing: -0.02em;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0.5rem 0;
|
||||
font-size: 1.1rem;
|
||||
opacity: 0.92;
|
||||
}
|
||||
|
||||
.loader {
|
||||
margin: 1.5rem auto;
|
||||
width: 56px;
|
||||
height: 56px;
|
||||
border: 4px solid rgba(255, 255, 255, 0.25);
|
||||
border-top-color: #fff;
|
||||
border-radius: 50%;
|
||||
animation: spin 1s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
.runtime code {
|
||||
background: rgba(0, 0, 0, 0.25);
|
||||
padding: 0.15rem 0.45rem;
|
||||
border-radius: 4px;
|
||||
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
||||
}
|
||||
|
||||
.sr-only {
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
padding: 0;
|
||||
margin: -1px;
|
||||
overflow: hidden;
|
||||
clip: rect(0, 0, 0, 0);
|
||||
border: 0;
|
||||
}
|
||||
|
||||
footer {
|
||||
position: absolute;
|
||||
bottom: 1rem;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-size: 0.85rem;
|
||||
opacity: 0.75;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
{% extends 'base.html' %}
|
||||
{% load static %}
|
||||
|
||||
{% block content %}
|
||||
<main>
|
||||
<div class="card">
|
||||
<h1>Analyzing your requirements and generating your app…</h1>
|
||||
<div class="loader" role="status" aria-live="polite" aria-label="Applying initial changes">
|
||||
<span class="sr-only">Loading…</span>
|
||||
<!-- Hero Section -->
|
||||
<section class="hero-section py-5 mb-5" style="background: linear-gradient(135deg, #FCF8F3 0%, #F5E8DD 100%); min-height: 80vh; display: flex; align-items: center;">
|
||||
<div class="container">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-lg-6">
|
||||
<h1 class="display-3 mb-4">Thoughtful Gifts, <br><span style="color: var(--primary-color);">Authentically Polish</span></h1>
|
||||
<p class="lead mb-5 text-muted">Create a personalized gift box filled with handpicked candles, books, postcards, and stationary. We deliver the warmth of Poland to your doorstep.</p>
|
||||
<div class="d-flex gap-3">
|
||||
<a href="{% url 'catalog' %}" class="btn btn-primary btn-lg">Browse Shop</a>
|
||||
<a href="#" class="btn btn-outline-dark btn-lg rounded-pill px-4">Build a Box</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6 d-none d-lg-block">
|
||||
<div class="position-relative">
|
||||
<div style="width: 450px; height: 450px; background-color: var(--accent-color); border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; opacity: 0.2; position: absolute; top: -50px; right: -50px; z-index: 1;"></div>
|
||||
<img src="https://images.unsplash.com/photo-1549465220-1a8b9238cd48?auto=format&fit=crop&w=800&q=80" alt="Gift Box" class="img-fluid rounded-4 shadow-lg position-relative" style="z-index: 2;">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p class="hint">AppWizzy AI is collecting your requirements and applying the first changes.</p>
|
||||
<p class="hint">This page will refresh automatically as the plan is implemented.</p>
|
||||
<p class="runtime">
|
||||
Runtime: Django <code>{{ django_version }}</code> · Python <code>{{ python_version }}</code>
|
||||
— UTC <code>{{ current_time|date:"Y-m-d H:i:s" }}</code>
|
||||
</p>
|
||||
</div>
|
||||
</main>
|
||||
<footer>
|
||||
Page updated: {{ current_time|date:"Y-m-d H:i:s" }} (UTC)
|
||||
</footer>
|
||||
</section>
|
||||
|
||||
<!-- Categories Section -->
|
||||
<section class="py-5 bg-white">
|
||||
<div class="container">
|
||||
<div class="text-center mb-5">
|
||||
<h2 class="display-5">The Little Wonders</h2>
|
||||
<p class="text-muted">Explore our curated collections</p>
|
||||
</div>
|
||||
<div class="row g-4">
|
||||
{% for category in categories %}
|
||||
<div class="col-md-3">
|
||||
<a href="{% url 'catalog' %}?category={{ category.slug }}" class="text-decoration-none">
|
||||
<div class="card border-0 h-100 shadow-sm text-center p-4 hover-lift">
|
||||
<div class="mb-3">
|
||||
{% if category.image_url %}
|
||||
<img src="{{ category.image_url }}" alt="{{ category.name }}" class="img-fluid rounded-circle" style="width: 100px; height: 100px; object-fit: cover;">
|
||||
{% else %}
|
||||
<div class="bg-light rounded-circle mx-auto d-flex align-items-center justify-content-center" style="width: 100px; height: 100px;">
|
||||
<span class="fs-1 text-muted">📦</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<h4 class="h5 mb-0 text-dark">{{ category.name }}</h4>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
{% empty %}
|
||||
<div class="col-12 text-center">
|
||||
<p class="text-muted">No categories available yet. Please add some in the <a href="/admin/">Admin panel</a>.</p>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Featured Products -->
|
||||
<section class="py-5">
|
||||
<div class="container">
|
||||
<div class="d-flex justify-content-between align-items-end mb-5">
|
||||
<div>
|
||||
<h2 class="display-5">Staff Favorites</h2>
|
||||
<p class="text-muted mb-0">Our most loved items this month</p>
|
||||
</div>
|
||||
<a href="{% url 'catalog' %}" class="text-primary text-decoration-none fw-semibold">View All →</a>
|
||||
</div>
|
||||
<div class="row g-4">
|
||||
{% for product in featured_products %}
|
||||
<div class="col-md-4">
|
||||
<div class="card border-0 shadow-sm h-100">
|
||||
<img src="{{ product.image_url|default:'https://via.placeholder.com/400x300?text=Gift+Product' }}" class="card-img-top" alt="{{ product.name }}" style="height: 250px; object-fit: cover;">
|
||||
<div class="card-body">
|
||||
<span class="badge bg-light text-muted mb-2">{{ product.category.name }}</span>
|
||||
<h5 class="card-title">{{ product.name }}</h5>
|
||||
<p class="text-primary fw-bold">{{ product.price }} PLN</p>
|
||||
<a href="{% url 'product_detail' product.slug %}" class="btn btn-outline-primary btn-sm w-100">View Details</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Constructor CTA -->
|
||||
<section class="py-5 mb-5 mt-5">
|
||||
<div class="container">
|
||||
<div class="bg-dark text-white p-5 rounded-5 overflow-hidden position-relative">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-lg-7 position-relative" style="z-index: 2;">
|
||||
<h2 class="display-4 mb-4">The Gift Box Constructor</h2>
|
||||
<p class="lead mb-4">Can't decide? Build your own box! Pick the items, choose a card, and we'll pack it beautifully with a handwritten note.</p>
|
||||
<a href="#" class="btn btn-primary btn-lg px-5">Start Building</a>
|
||||
</div>
|
||||
<div class="col-lg-5">
|
||||
<img src="https://images.unsplash.com/photo-1513201099705-a9746e1e201f?auto=format&fit=crop&w=600&q=80" alt="Box Packing" class="img-fluid rounded-4 opacity-75">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{% endblock %}
|
||||
63
core/templates/core/product_detail.html
Normal file
63
core/templates/core/product_detail.html
Normal file
@ -0,0 +1,63 @@
|
||||
{% extends 'base.html' %}
|
||||
{% load static %}
|
||||
|
||||
{% block title %}{{ product.name }} - GiftShop Polska{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<section class="py-5">
|
||||
<div class="container">
|
||||
<nav aria-label="breadcrumb">
|
||||
<ol class="breadcrumb mb-4">
|
||||
<li class="breadcrumb-item"><a href="{% url 'home' %}">Home</a></li>
|
||||
<li class="breadcrumb-item"><a href="{% url 'catalog' %}">Shop</a></li>
|
||||
<li class="breadcrumb-item"><a href="{% url 'catalog' %}?category={{ product.category.slug }}">{{ product.category.name }}</a></li>
|
||||
<li class="breadcrumb-item active">{{ product.name }}</li>
|
||||
</ol>
|
||||
</nav>
|
||||
|
||||
<div class="row g-5">
|
||||
<div class="col-lg-6">
|
||||
<img src="{{ product.image_url|default:'https://via.placeholder.com/600x600?text=Gift+Product' }}" alt="{{ product.name }}" class="img-fluid rounded-4 shadow-sm">
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<div class="ps-lg-4">
|
||||
<span class="badge bg-light text-primary mb-3">{{ product.category.name }}</span>
|
||||
<h1 class="display-5 mb-3">{{ product.name }}</h1>
|
||||
<p class="h3 text-primary mb-4">{{ product.price }} PLN</p>
|
||||
|
||||
<div class="mb-4">
|
||||
<h5 class="mb-3">Description</h5>
|
||||
<p class="text-muted lead">{{ product.description }}</p>
|
||||
</div>
|
||||
|
||||
<div class="d-flex align-items-center gap-3 mb-5">
|
||||
<div class="input-group" style="width: 130px;">
|
||||
<button class="btn btn-outline-secondary" type="button">-</button>
|
||||
<input type="text" class="form-control text-center" value="1">
|
||||
<button class="btn btn-outline-secondary" type="button">+</button>
|
||||
</div>
|
||||
<button class="btn btn-primary btn-lg px-5 flex-grow-1">Add to Box</button>
|
||||
</div>
|
||||
|
||||
<div class="p-4 bg-white rounded-4 border-0 shadow-sm">
|
||||
<div class="d-flex align-items-center mb-3">
|
||||
<span class="fs-4 me-3">🚚</span>
|
||||
<div>
|
||||
<h6 class="mb-0">Delivery to Poland</h6>
|
||||
<p class="text-muted small mb-0">Ships within 1-2 business days</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex align-items-center">
|
||||
<span class="fs-4 me-3">🎁</span>
|
||||
<div>
|
||||
<h6 class="mb-0">Gift Wrap Included</h6>
|
||||
<p class="text-muted small mb-0">Every item is packed with care</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{% endblock %}
|
||||
@ -1,7 +1,12 @@
|
||||
from django.urls import path
|
||||
|
||||
from .views import home
|
||||
from .views import home, catalog, product_detail, constructor, cart, favorites, blog
|
||||
|
||||
urlpatterns = [
|
||||
path("", home, name="home"),
|
||||
path("catalog/", catalog, name="catalog"),
|
||||
path("product/<slug:slug>/", product_detail, name="product_detail"),
|
||||
path("constructor/", constructor, name="constructor"),
|
||||
path("cart/", cart, name="cart"),
|
||||
path("favorites/", favorites, name="favorites"),
|
||||
path("blog/", blog, name="blog"),
|
||||
]
|
||||
|
||||
@ -1,25 +1,55 @@
|
||||
import os
|
||||
import platform
|
||||
|
||||
from django import get_version as django_version
|
||||
from django.shortcuts import render
|
||||
from django.utils import timezone
|
||||
|
||||
from django.shortcuts import render, get_object_or_404
|
||||
from .models import Category, Product
|
||||
|
||||
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()
|
||||
|
||||
"""Landing page with featured categories and products."""
|
||||
categories = Category.objects.all()[:4]
|
||||
featured_products = Product.objects.filter(is_active=True)[:6]
|
||||
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", ""),
|
||||
"categories": categories,
|
||||
"featured_products": featured_products,
|
||||
"project_name": "GiftShop Polska",
|
||||
}
|
||||
return render(request, "core/index.html", context)
|
||||
|
||||
def catalog(request):
|
||||
"""Product catalog with category filtering."""
|
||||
category_slug = request.GET.get('category')
|
||||
categories = Category.objects.all()
|
||||
products = Product.objects.filter(is_active=True)
|
||||
|
||||
selected_category = None
|
||||
if category_slug:
|
||||
selected_category = get_object_or_404(Category, slug=category_slug)
|
||||
products = products.filter(category=selected_category)
|
||||
|
||||
context = {
|
||||
"categories": categories,
|
||||
"products": products,
|
||||
"selected_category": selected_category,
|
||||
}
|
||||
return render(request, "core/catalog.html", context)
|
||||
|
||||
def product_detail(request, slug):
|
||||
"""Individual product detail page."""
|
||||
product = get_object_or_404(Product, slug=slug, is_active=True)
|
||||
context = {
|
||||
"product": product,
|
||||
}
|
||||
return render(request, "core/product_detail.html", context)
|
||||
|
||||
def constructor(request):
|
||||
"""Gift box constructor page."""
|
||||
return render(request, "core/constructor.html", {"title": "Box Constructor"})
|
||||
|
||||
def cart(request):
|
||||
"""Shopping cart page."""
|
||||
return render(request, "core/cart.html", {"title": "Your Cart"})
|
||||
|
||||
def favorites(request):
|
||||
"""Favorites/Wishlist page."""
|
||||
return render(request, "core/favorites.html", {"title": "Your Favorites"})
|
||||
|
||||
def blog(request):
|
||||
"""Blog index page."""
|
||||
return render(request, "core/blog.html", {"title": "Gift Shop Blog"})
|
||||
@ -1,4 +1,96 @@
|
||||
/* Custom styles for the application */
|
||||
body {
|
||||
font-family: system-ui, -apple-system, sans-serif;
|
||||
:root {
|
||||
--primary-color: #D2765E; /* Warm Terracotta */
|
||||
--accent-color: #A8B196; /* Soft Sage */
|
||||
--bg-color: #FCF8F3; /* Cream */
|
||||
--text-color: #2C2C2C; /* Deep Charcoal */
|
||||
--font-heading: 'Playfair Display', serif;
|
||||
--font-body: 'Inter', sans-serif;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: var(--font-body);
|
||||
background-color: var(--bg-color);
|
||||
color: var(--text-color);
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
font-family: var(--font-heading);
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.navbar {
|
||||
background-color: #fff;
|
||||
border-bottom: 1px solid rgba(0,0,0,0.05);
|
||||
padding: 1rem 0;
|
||||
}
|
||||
|
||||
.navbar-brand {
|
||||
font-family: var(--font-heading);
|
||||
font-weight: 700;
|
||||
font-size: 1.5rem;
|
||||
color: var(--primary-color) !important;
|
||||
}
|
||||
|
||||
.nav-link {
|
||||
font-weight: 600;
|
||||
color: var(--text-color) !important;
|
||||
margin: 0 10px;
|
||||
}
|
||||
|
||||
.nav-link:hover {
|
||||
color: var(--primary-color) !important;
|
||||
}
|
||||
|
||||
/* Bold icons in navbar to match font weight */
|
||||
.navbar-nav .nav-link i.bi {
|
||||
-webkit-text-stroke: 1px currentColor;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background-color: var(--primary-color);
|
||||
border-color: var(--primary-color);
|
||||
padding: 10px 25px;
|
||||
font-weight: 600;
|
||||
border-radius: 50px;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.btn-primary:hover {
|
||||
background-color: #bc654e;
|
||||
border-color: #bc654e;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.btn-outline-primary {
|
||||
color: var(--primary-color);
|
||||
border-color: var(--primary-color);
|
||||
border-radius: 50px;
|
||||
}
|
||||
|
||||
.btn-outline-primary:hover {
|
||||
background-color: var(--primary-color);
|
||||
border-color: var(--primary-color);
|
||||
}
|
||||
|
||||
.footer {
|
||||
background-color: #fff;
|
||||
padding: 4rem 0 2rem;
|
||||
margin-top: 5rem;
|
||||
border-top: 1px solid rgba(0,0,0,0.05);
|
||||
}
|
||||
|
||||
.hover-lift {
|
||||
transition: transform 0.3s ease, box-shadow 0.3s ease;
|
||||
}
|
||||
|
||||
.hover-lift:hover {
|
||||
transform: translateY(-10px);
|
||||
box-shadow: 0 1rem 3rem rgba(0,0,0,.1) !important;
|
||||
}
|
||||
|
||||
.card {
|
||||
border-radius: 1rem;
|
||||
overflow: hidden;
|
||||
}
|
||||
@ -1,21 +1,96 @@
|
||||
|
||||
: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: #D2765E; /* Warm Terracotta */
|
||||
--accent-color: #A8B196; /* Soft Sage */
|
||||
--bg-color: #FCF8F3; /* Cream */
|
||||
--text-color: #2C2C2C; /* Deep Charcoal */
|
||||
--font-heading: 'Playfair Display', serif;
|
||||
--font-body: 'Inter', sans-serif;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: 'Inter', sans-serif;
|
||||
background: linear-gradient(45deg, var(--bg-color-start), var(--bg-color-end));
|
||||
font-family: var(--font-body);
|
||||
background-color: var(--bg-color);
|
||||
color: var(--text-color);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
min-height: 100vh;
|
||||
text-align: center;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
font-family: var(--font-heading);
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.navbar {
|
||||
background-color: #fff;
|
||||
border-bottom: 1px solid rgba(0,0,0,0.05);
|
||||
padding: 1rem 0;
|
||||
}
|
||||
|
||||
.navbar-brand {
|
||||
font-family: var(--font-heading);
|
||||
font-weight: 700;
|
||||
font-size: 1.5rem;
|
||||
color: var(--primary-color) !important;
|
||||
}
|
||||
|
||||
.nav-link {
|
||||
font-weight: 600;
|
||||
color: var(--text-color) !important;
|
||||
margin: 0 10px;
|
||||
}
|
||||
|
||||
.nav-link:hover {
|
||||
color: var(--primary-color) !important;
|
||||
}
|
||||
|
||||
/* Bold icons in navbar to match font weight */
|
||||
.navbar-nav .nav-link i.bi {
|
||||
-webkit-text-stroke: 1px currentColor;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background-color: var(--primary-color);
|
||||
border-color: var(--primary-color);
|
||||
padding: 10px 25px;
|
||||
font-weight: 600;
|
||||
border-radius: 50px;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.btn-primary:hover {
|
||||
background-color: #bc654e;
|
||||
border-color: #bc654e;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.btn-outline-primary {
|
||||
color: var(--primary-color);
|
||||
border-color: var(--primary-color);
|
||||
border-radius: 50px;
|
||||
}
|
||||
|
||||
.btn-outline-primary:hover {
|
||||
background-color: var(--primary-color);
|
||||
border-color: var(--primary-color);
|
||||
}
|
||||
|
||||
.footer {
|
||||
background-color: #fff;
|
||||
padding: 4rem 0 2rem;
|
||||
margin-top: 5rem;
|
||||
border-top: 1px solid rgba(0,0,0,0.05);
|
||||
}
|
||||
|
||||
.hover-lift {
|
||||
transition: transform 0.3s ease, box-shadow 0.3s ease;
|
||||
}
|
||||
|
||||
.hover-lift:hover {
|
||||
transform: translateY(-10px);
|
||||
box-shadow: 0 1rem 3rem rgba(0,0,0,.1) !important;
|
||||
}
|
||||
|
||||
.card {
|
||||
border-radius: 1rem;
|
||||
overflow: hidden;
|
||||
}
|
||||
BIN
staticfiles/pasted-20260122-195030-9e85f2f0.png
Normal file
BIN
staticfiles/pasted-20260122-195030-9e85f2f0.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
Loading…
x
Reference in New Issue
Block a user