Add site builder service to Docker Compose and remove obsolete scripts

- Introduced a new service `igny8_site_builder` in `docker-compose.app.yml` for site building functionality, including environment variables and volume mappings.
- Deleted several outdated scripts: `create_test_users.py`, `test_image_write_access.py`, `update_free_plan.py`, and the database file `db.sqlite3` to clean up the backend.
- Updated Django settings and URL configurations to integrate the new site builder module.
This commit is contained in:
IGNY8 VPS (Salman)
2025-11-17 16:08:51 +00:00
parent e3d4ba2c02
commit 5a36686844
74 changed files with 7217 additions and 374 deletions

View File

@@ -0,0 +1,30 @@
import './blocks.css';
export interface FeatureGridBlockProps {
heading?: string;
features: Array<{
title: string;
description?: string;
icon?: string;
}>;
columns?: 2 | 3 | 4;
}
export function FeatureGridBlock({ heading, features, columns = 3 }: FeatureGridBlockProps) {
return (
<section className="shared-card">
{heading && <h3>{heading}</h3>}
<div className={`shared-grid shared-grid--${columns}`}>
{features.map((feature) => (
<article key={feature.title} className="shared-feature">
{feature.icon && <span className="shared-feature__icon">{feature.icon}</span>}
<h4>{feature.title}</h4>
{feature.description && <p>{feature.description}</p>}
</article>
))}
</div>
</section>
);
}

View File

@@ -0,0 +1,29 @@
import type { ReactNode } from 'react';
import './blocks.css';
export interface HeroBlockProps {
eyebrow?: string;
title: string;
subtitle?: string;
ctaLabel?: string;
onCtaClick?: () => void;
supportingContent?: ReactNode;
}
export function HeroBlock({ eyebrow, title, subtitle, ctaLabel, onCtaClick, supportingContent }: HeroBlockProps) {
return (
<section className="shared-hero">
{eyebrow && <p className="shared-hero__eyebrow">{eyebrow}</p>}
<h2 className="shared-hero__title">{title}</h2>
{subtitle && <p className="shared-hero__subtitle">{subtitle}</p>}
{supportingContent && <div className="shared-hero__support">{supportingContent}</div>}
{ctaLabel && (
<button type="button" className="shared-button" onClick={onCtaClick}>
{ctaLabel}
</button>
)}
</section>
);
}

View File

@@ -0,0 +1,31 @@
import './blocks.css';
export interface StatItem {
label: string;
value: string;
description?: string;
}
export interface StatsPanelProps {
heading?: string;
stats: StatItem[];
}
export function StatsPanel({ heading, stats }: StatsPanelProps) {
return (
<section className="shared-card">
{heading && <h3>{heading}</h3>}
<div className="shared-stats">
{stats.map((stat) => (
<div key={stat.label} className="shared-stat">
<strong>{stat.value}</strong>
<span>{stat.label}</span>
{stat.description && <p>{stat.description}</p>}
</div>
))}
</div>
</section>
);
}

View File

@@ -0,0 +1,123 @@
.shared-hero {
padding: 2.5rem;
border-radius: 24px;
background: linear-gradient(135deg, #4c1d95, #312e81);
color: #fff;
display: flex;
flex-direction: column;
gap: 1rem;
}
.shared-hero__eyebrow {
text-transform: uppercase;
letter-spacing: 0.12em;
font-size: 0.75rem;
margin: 0;
opacity: 0.8;
}
.shared-hero__title {
margin: 0;
font-size: clamp(2rem, 5vw, 3rem);
font-weight: 700;
}
.shared-hero__subtitle {
margin: 0;
color: rgba(255, 255, 255, 0.85);
font-size: 1.05rem;
}
.shared-button {
border: none;
border-radius: 999px;
padding: 0.9rem 1.8rem;
font-size: 0.95rem;
font-weight: 600;
color: #0f172a;
background: #fff;
align-self: flex-start;
cursor: pointer;
}
.shared-card {
padding: 2rem;
border-radius: 22px;
background: #fff;
box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
display: flex;
flex-direction: column;
gap: 1.25rem;
}
.shared-card h3 {
margin: 0;
font-size: 1.35rem;
color: #0f172a;
}
.shared-grid {
display: grid;
gap: 1rem;
}
.shared-grid--2 {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.shared-grid--3 {
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.shared-grid--4 {
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.shared-feature {
padding: 1rem;
border-radius: 16px;
border: 1px solid rgba(15, 23, 42, 0.08);
background: #f8fafc;
}
.shared-feature h4 {
margin: 0;
font-size: 1.05rem;
color: #0f172a;
}
.shared-feature p {
margin: 0.5rem 0 0;
color: #475569;
}
.shared-stats {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
gap: 0.75rem;
}
.shared-stat {
padding: 1rem;
border-radius: 16px;
background: rgba(15, 23, 42, 0.03);
}
.shared-stat strong {
display: block;
font-size: 1.6rem;
color: #0f172a;
}
.shared-stat span {
display: block;
color: #475569;
}
.shared-stat p {
margin: 0.35rem 0 0;
color: #64748b;
font-size: 0.9rem;
}

View File

@@ -0,0 +1,8 @@
export { HeroBlock } from './HeroBlock';
export type { HeroBlockProps } from './HeroBlock';
export { FeatureGridBlock } from './FeatureGridBlock';
export type { FeatureGridBlockProps } from './FeatureGridBlock';
export { StatsPanel } from './StatsPanel';
export type { StatsPanelProps, StatItem } from './StatsPanel';

View File

@@ -0,0 +1,9 @@
export * from './blocks';
export * from './layouts';
export * from './templates';
export * from './blocks';
export * from './layouts';
export * from './templates';

View File

@@ -0,0 +1,28 @@
import type { ReactNode } from 'react';
import './layouts.css';
export interface DefaultLayoutProps {
hero?: ReactNode;
sections: ReactNode[];
sidebar?: ReactNode;
}
export function DefaultLayout({ hero, sections, sidebar }: DefaultLayoutProps) {
return (
<div className="shared-layout">
{hero && <div className="shared-layout__hero">{hero}</div>}
<div className="shared-layout__body">
<div className="shared-layout__main">
{sections.map((section, index) => (
<div key={index} className="shared-layout__section">
{section}
</div>
))}
</div>
{sidebar && <aside className="shared-layout__sidebar">{sidebar}</aside>}
</div>
</div>
);
}

View File

@@ -0,0 +1,13 @@
import type { ReactNode } from 'react';
import './layouts.css';
export interface MinimalLayoutProps {
children: ReactNode;
background?: 'light' | 'dark';
}
export function MinimalLayout({ children, background = 'light' }: MinimalLayoutProps) {
return <div className={`shared-layout__minimal shared-layout__minimal--${background}`}>{children}</div>;
}

View File

@@ -0,0 +1,6 @@
export { DefaultLayout } from './DefaultLayout';
export type { DefaultLayoutProps } from './DefaultLayout';
export { MinimalLayout } from './MinimalLayout';
export type { MinimalLayoutProps } from './MinimalLayout';

View File

@@ -0,0 +1,65 @@
.shared-layout {
display: flex;
flex-direction: column;
gap: 1.5rem;
}
.shared-layout__hero {
min-height: 320px;
}
.shared-layout__body {
display: grid;
grid-template-columns: minmax(0, 1fr);
gap: 1.25rem;
}
@media (min-width: 1024px) {
.shared-layout__body {
grid-template-columns: minmax(0, 2.3fr) minmax(0, 1fr);
}
}
.shared-layout__section {
margin-bottom: 1.25rem;
}
.shared-layout__sidebar {
position: sticky;
top: 3rem;
align-self: flex-start;
background: #0f172a;
color: #fff;
border-radius: 24px;
padding: 1.75rem;
box-shadow: 0 20px 45px rgba(15, 23, 42, 0.35);
}
.shared-layout__minimal {
border-radius: 30px;
padding: 2.5rem;
}
.shared-layout__minimal--light {
background: #f8fafc;
border: 1px solid rgba(15, 23, 42, 0.06);
}
.shared-layout__minimal--dark {
background: #0f172a;
color: #fff;
}
.shared-landing {
display: flex;
flex-direction: column;
gap: 1.5rem;
}
.shared-landing__highlights {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
gap: 1rem;
}

View File

@@ -0,0 +1,26 @@
import type { ReactNode } from 'react';
import { MinimalLayout } from '../layouts/MinimalLayout';
export interface LandingTemplateProps {
hero: ReactNode;
highlights: ReactNode[];
background?: 'light' | 'dark';
}
export function LandingTemplate({ hero, highlights, background }: LandingTemplateProps) {
return (
<MinimalLayout background={background}>
<div className="shared-landing">
<div className="shared-landing__hero">{hero}</div>
<div className="shared-landing__highlights">
{highlights.map((highlight, index) => (
// eslint-disable-next-line react/no-array-index-key
<div key={index}>{highlight}</div>
))}
</div>
</div>
</MinimalLayout>
);
}

View File

@@ -0,0 +1,14 @@
import type { ReactNode } from 'react';
import { DefaultLayout } from '../layouts/DefaultLayout';
export interface MarketingTemplateProps {
hero: ReactNode;
sections: ReactNode[];
sidebar?: ReactNode;
}
export function MarketingTemplate(props: MarketingTemplateProps) {
return <DefaultLayout {...props} />;
}

View File

@@ -0,0 +1,6 @@
export { MarketingTemplate } from './MarketingTemplate';
export type { MarketingTemplateProps } from './MarketingTemplate';
export { LandingTemplate } from './LandingTemplate';
export type { LandingTemplateProps } from './LandingTemplate';