diff --git a/assets/vm-shot-2025-12-17T18-33-07-698Z.jpg b/assets/vm-shot-2025-12-17T18-33-07-698Z.jpg new file mode 100644 index 0000000..51fde12 Binary files /dev/null and b/assets/vm-shot-2025-12-17T18-33-07-698Z.jpg differ diff --git a/core/__pycache__/forms.cpython-311.pyc b/core/__pycache__/forms.cpython-311.pyc new file mode 100644 index 0000000..054082f Binary files /dev/null and b/core/__pycache__/forms.cpython-311.pyc differ diff --git a/core/__pycache__/models.cpython-311.pyc b/core/__pycache__/models.cpython-311.pyc index 9aa598b..9b59ba3 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..fca779b 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..e9ce815 100644 Binary files a/core/__pycache__/views.cpython-311.pyc and b/core/__pycache__/views.cpython-311.pyc differ diff --git a/core/forms.py b/core/forms.py new file mode 100644 index 0000000..81f090e --- /dev/null +++ b/core/forms.py @@ -0,0 +1,14 @@ +from django import forms +from .models import Project + +class ProjectForm(forms.ModelForm): + class Meta: + model = Project + fields = ['name', 'client', 'start_date', 'end_date', 'status'] + widgets = { + 'name': forms.TextInput(attrs={'class': 'form-control'}), + 'client': forms.TextInput(attrs={'class': 'form-control'}), + 'start_date': forms.DateInput(attrs={'class': 'form-control', 'type': 'date'}), + 'end_date': forms.DateInput(attrs={'class': 'form-control', 'type': 'date'}), + 'status': forms.Select(attrs={'class': 'form-select'}), + } diff --git a/core/migrations/0001_initial.py b/core/migrations/0001_initial.py new file mode 100644 index 0000000..3fb1d2a --- /dev/null +++ b/core/migrations/0001_initial.py @@ -0,0 +1,25 @@ +# Generated by Django 5.2.7 on 2025-12-17 18:30 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='Project', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=200, verbose_name='Nazwa projektu')), + ('client', models.CharField(max_length=200, verbose_name='Kontrahent')), + ('start_date', models.DateField(verbose_name='Data rozpoczęcia')), + ('end_date', models.DateField(verbose_name='Data zakończenia')), + ('status', models.CharField(choices=[('planowany', 'Planowany'), ('realizowany', 'Realizowany'), ('zakonczony', 'Zakończony')], default='planowany', max_length=20, verbose_name='Status')), + ], + ), + ] 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..3b19edf 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..1aa45a7 100644 --- a/core/models.py +++ b/core/models.py @@ -1,3 +1,17 @@ from django.db import models -# Create your models here. +class Project(models.Model): + STATUS_CHOICES = [ + ('planowany', 'Planowany'), + ('realizowany', 'Realizowany'), + ('zakonczony', 'Zakończony'), + ] + + name = models.CharField(max_length=200, verbose_name="Nazwa projektu") + client = models.CharField(max_length=200, verbose_name="Kontrahent") + start_date = models.DateField(verbose_name="Data rozpoczęcia") + end_date = models.DateField(verbose_name="Data zakończenia") + status = models.CharField(max_length=20, choices=STATUS_CHOICES, default='planowany', verbose_name="Status") + + def __str__(self): + return self.name \ No newline at end of file diff --git a/core/templates/base.html b/core/templates/base.html index 1e7e5fb..f8c91ef 100644 --- a/core/templates/base.html +++ b/core/templates/base.html @@ -14,7 +14,10 @@ {% endif %} {% load static %} - + + + + {% block head %}{% endblock %} diff --git a/core/templates/core/add_project.html b/core/templates/core/add_project.html new file mode 100644 index 0000000..b7656a1 --- /dev/null +++ b/core/templates/core/add_project.html @@ -0,0 +1,28 @@ +{% extends 'base.html' %} +{% load static %} + +{% block title %}Dodaj Nowy Projekt - webFirma{% endblock %} + +{% block content %} +
+
+
+
+
+

Dodaj Nowy Projekt

+
+
+
+ {% csrf_token %} + {{ form.as_p }} +
+ Anuluj + +
+
+
+
+
+
+
+{% endblock %} diff --git a/core/templates/core/index.html b/core/templates/core/index.html index faec813..0695ca6 100644 --- a/core/templates/core/index.html +++ b/core/templates/core/index.html @@ -1,145 +1,58 @@ -{% extends "base.html" %} +{% extends 'base.html' %} +{% load static %} -{% block title %}{{ project_name }}{% endblock %} - -{% block head %} - - - - -{% endblock %} +{% block title %}Pulpit - webFirma{% endblock %} {% block content %} -
-
-

Analyzing your requirements and generating your app…

-
- Loading… +
+
+

Witaj w webFirma

+

Kompleksowe zarządzanie firmą w jednym miejscu.

-

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 + + +
+
+
+

Projekty

+ Dodaj projekt +
+ +
+
+ {% if projects %} +
+ + + + + + + + + + + + {% for project in projects %} + + + + + + + + {% endfor %} + +
Nazwa projektuKontrahentData rozpoczęciaData zakończeniaStatus
{{ project.name }}{{ project.client }}{{ project.start_date|date:"Y-m-d" }}{{ project.end_date|date:"Y-m-d" }}{{ project.get_status_display }}
+
+ {% else %} +
+

Brak projektów do wyświetlenia.

+

Utwórz swój pierwszy projekt, aby zacząć zarządzać pracą.

+
+ {% endif %} +
+
+
+
+{% endblock %} diff --git a/core/urls.py b/core/urls.py index 6299e3d..ffbdf8e 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, add_project urlpatterns = [ - path("", home, name="home"), -] + path('', index, name='index'), + path('add-project/', add_project, name='add_project'), +] \ No newline at end of file diff --git a/core/views.py b/core/views.py index c9aed12..0bb211f 100644 --- a/core/views.py +++ b/core/views.py @@ -1,25 +1,17 @@ -import os -import platform +from django.shortcuts import render, redirect +from .models import Project +from .forms import ProjectForm -from django import get_version as django_version -from django.shortcuts import render -from django.utils import timezone +def index(request): + projects = Project.objects.all().order_by('-start_date') + return render(request, 'core/index.html', {'projects': projects}) - -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) +def add_project(request): + if request.method == 'POST': + form = ProjectForm(request.POST) + if form.is_valid(): + form.save() + return redirect('index') + else: + form = ProjectForm() + return render(request, 'core/add_project.html', {'form': form}) \ No newline at end of file diff --git a/static/css/custom.css b/static/css/custom.css index 925f6ed..5846dab 100644 --- a/static/css/custom.css +++ b/static/css/custom.css @@ -1,4 +1,66 @@ -/* Custom styles for the application */ -body { - font-family: system-ui, -apple-system, sans-serif; +:root { + --bs-primary: #1A237E; + --bs-secondary: #6c757d; + --bs-success: #198754; + --bs-info: #0dcaf0; + --bs-warning: #ffc107; + --bs-danger: #dc3545; + --bs-light: #F5F5F5; + --bs-dark: #212121; + --bs-primary-rgb: 26, 35, 126; + --bs-font-sans-serif: 'Lato', sans-serif; } + +h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { + font-family: 'Poppins', sans-serif; + font-weight: 600; +} + +body { + background-color: var(--bs-light); + color: var(--bs-dark); +} + +.hero-section { + background: linear-gradient(to right, #1A237E, #2962FF); + padding: 4rem 0; + margin-bottom: -1px; /* Overlap to avoid gap */ +} + +.section-title { + color: var(--bs-primary); + font-weight: 700; +} + +.btn-primary { + background-color: #2962FF; + border-color: #2962FF; + transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out; +} + +.btn-primary:hover { + background-color: #1A237E; + border-color: #1A237E; +} + +.card { + border: none; +} + +.card-header.bg-primary { + background-color: var(--bs-primary) !important; +} + +.table { + margin-bottom: 0; +} + +.table th { + font-weight: 600; + color: var(--bs-dark); +} + +.badge.bg-primary-soft { + color: var(--bs-primary); + background-color: rgba(var(--bs-primary-rgb), 0.1); +} \ No newline at end of file diff --git a/staticfiles/css/custom.css b/staticfiles/css/custom.css index 108056f..5846dab 100644 --- a/staticfiles/css/custom.css +++ b/staticfiles/css/custom.css @@ -1,21 +1,66 @@ - :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); + --bs-primary: #1A237E; + --bs-secondary: #6c757d; + --bs-success: #198754; + --bs-info: #0dcaf0; + --bs-warning: #ffc107; + --bs-danger: #dc3545; + --bs-light: #F5F5F5; + --bs-dark: #212121; + --bs-primary-rgb: 26, 35, 126; + --bs-font-sans-serif: 'Lato', sans-serif; } + +h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { + font-family: 'Poppins', sans-serif; + font-weight: 600; +} + 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(--bs-light); + color: var(--bs-dark); } + +.hero-section { + background: linear-gradient(to right, #1A237E, #2962FF); + padding: 4rem 0; + margin-bottom: -1px; /* Overlap to avoid gap */ +} + +.section-title { + color: var(--bs-primary); + font-weight: 700; +} + +.btn-primary { + background-color: #2962FF; + border-color: #2962FF; + transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out; +} + +.btn-primary:hover { + background-color: #1A237E; + border-color: #1A237E; +} + +.card { + border: none; +} + +.card-header.bg-primary { + background-color: var(--bs-primary) !important; +} + +.table { + margin-bottom: 0; +} + +.table th { + font-weight: 600; + color: var(--bs-dark); +} + +.badge.bg-primary-soft { + color: var(--bs-primary); + background-color: rgba(var(--bs-primary-rgb), 0.1); +} \ No newline at end of file