Versão inicial

This commit is contained in:
Flatlogic Bot 2025-10-20 23:05:07 +00:00
parent e1ce58715e
commit c8b398ee15
5 changed files with 345 additions and 145 deletions

130
assets/css/custom.css Normal file
View File

@ -0,0 +1,130 @@
/* PicklePRO Custom Styles */
body {
font-family: 'Inter', sans-serif;
background-color: #f8f9fa; /* Light grey background */
color: #333;
}
.navbar-brand {
font-weight: 700;
font-size: 1.5rem;
}
.navbar-brand .text-primary {
color: #0d6efd !important; /* Bootstrap Primary */
}
.nav-link {
color: #6c757d; /* Muted text for nav links */
font-weight: 500;
}
.nav-link:hover, .nav-link.active {
color: #0d6efd;
}
.btn-primary {
background-color: #0d6efd;
border-color: #0d6efd;
font-weight: 500;
padding: 0.5rem 1.25rem;
}
.btn-primary:hover {
background-color: #0b5ed7;
border-color: #0a58ca;
}
.btn-outline-primary {
border-color: #0d6efd;
color: #0d6efd;
}
.btn-outline-primary:hover {
background-color: #0d6efd;
color: white;
}
.btn-link {
color: #333;
font-weight: 500;
}
.card {
border: none;
border-radius: 0.75rem;
box-shadow: 0 4px 12px rgba(0,0,0,0.05);
height: 100%;
}
.carousel-indicators-custom {
text-align: center;
margin-top: 1rem;
}
.carousel-indicators-custom button {
background-color: #d1d1d1;
width: 8px;
height: 8px;
border-radius: 50%;
border: none;
margin: 0 4px;
transition: background-color 0.3s;
}
.carousel-indicators-custom button.active {
background-color: #0d6efd;
}
.tournament-item:not(:last-child) {
margin-bottom: 1rem;
}
.calendar-grid {
display: grid;
grid-template-columns: repeat(7, 1fr);
gap: 0.5rem;
text-align: center;
}
.day-name {
font-weight: 600;
font-size: 0.8rem;
color: #6c757d;
}
.day {
padding: 0.5rem 0;
border-radius: 50%;
font-size: 0.9rem;
position: relative;
}
.day.event {
background-color: #eaf2ff;
color: #0d6efd;
font-weight: 500;
}
.day.event::after {
content: '';
position: absolute;
bottom: 4px;
left: 50%;
transform: translateX(-50%);
width: 4px;
height: 4px;
border-radius: 50%;
background-color: #0d6efd;
}
.day.empty {
visibility: hidden;
}
.event-dot {
width: 10px;
height: 10px;
border-radius: 50%;
flex-shrink: 0;
}

0
assets/js/main.js Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 228 KiB

59
db/setup.php Normal file
View File

@ -0,0 +1,59 @@
<?php
// Simple, one-time setup script
require_once 'config.php';
try {
$pdo = db();
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
// Create users table
$pdo->exec("
CREATE TABLE IF NOT EXISTS `users` (
`id` INT AUTO_INCREMENT PRIMARY KEY,
`username` VARCHAR(255) NOT NULL UNIQUE,
`password` VARCHAR(255) NOT NULL,
`role` VARCHAR(50) NOT NULL,
`created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
");
// Create clubs table
$pdo->exec("
CREATE TABLE IF NOT EXISTS `clubs` (
`id` INT AUTO_INCREMENT PRIMARY KEY,
`name` VARCHAR(255) NOT NULL,
`address` VARCHAR(255) NOT NULL,
`number` VARCHAR(50),
`neighborhood` VARCHAR(100),
`city` VARCHAR(100) NOT NULL,
`description` TEXT,
`created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
");
// Check if superadmin exists
$stmt = $pdo->prepare("SELECT id FROM users WHERE username = 'superadmin'");
$stmt->execute();
if ($stmt->fetch()) {
echo "Superadmin user already exists.<br>";
} else {
// Insert default superadmin user
$username = 'superadmin';
$password = 'superadmin'; // Default password, you should change this
$hashed_password = password_hash($password, PASSWORD_DEFAULT);
$role = 'superadmin';
$stmt = $pdo->prepare("INSERT INTO users (username, password, role) VALUES (:username, :password, :role)");
$stmt->bindParam(':username', $username);
$stmt->bindParam(':password', $hashed_password);
$stmt->bindParam(':role', $role);
$stmt->execute();
echo "Superadmin user created successfully with username 'superadmin' and password 'superadmin'.<br>";
}
echo "Database setup completed successfully!<br>";
echo "You can now delete this file (db/setup.php) for security reasons.";
} catch (PDOException $e) {
die("Database setup failed: " . $e->getMessage());
}

289
index.php
View File

@ -1,150 +1,161 @@
<?php <!DOCTYPE html>
declare(strict_types=1); <html lang="pt-BR">
@ini_set('display_errors', '1');
@error_reporting(E_ALL);
@date_default_timezone_set('UTC');
$phpVersion = PHP_VERSION;
$now = date('Y-m-d H:i:s');
?>
<!doctype html>
<html lang="en">
<head> <head>
<meta charset="utf-8" /> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>New Style</title>
<?php <!-- SEO & Meta Tags -->
// Read project preview data from environment <title>PicklePRO - Seu Portal Completo de Pickleball</title>
$projectDescription = $_SERVER['PROJECT_DESCRIPTION'] ?? ''; <meta name="description" content="Gerencie e participe de torneios de pickleball. Agende quadras, aulas e mais com o PicklePRO.">
$projectImageUrl = $_SERVER['PROJECT_IMAGE_URL'] ?? ''; <meta name="keywords" content="pickleball, torneios de pickleball, agendamento de quadras, liga de pickleball, gerenciamento esportivo, aulas de pickleball">
?>
<?php if ($projectDescription): ?> <!-- Open Graph / Facebook -->
<!-- Meta description --> <meta property="og:type" content="website">
<meta name="description" content='<?= htmlspecialchars($projectDescription) ?>' /> <meta property="og:title" content="PicklePRO - Seu Portal Completo de Pickleball">
<!-- Open Graph meta tags --> <meta property="og:description" content="Gerencie e participe de torneios de pickleball. Agende quadras, aulas e mais com o PicklePRO.">
<meta property="og:description" content="<?= htmlspecialchars($projectDescription) ?>" /> <meta property="og:image" content="https://flatlogic-blog-pictures.s3.us-east-1.amazonaws.com/misc/defult-thumbnail.png">
<!-- Twitter meta tags -->
<meta property="twitter:description" content="<?= htmlspecialchars($projectDescription) ?>" /> <!-- Twitter -->
<?php endif; ?> <meta property="twitter:card" content="summary_large_image">
<?php if ($projectImageUrl): ?> <meta property="twitter:title" content="PicklePRO - Seu Portal Completo de Pickleball">
<!-- Open Graph image --> <meta property="twitter:description" content="Gerencie e participe de torneios de pickleball. Agende quadras, aulas e mais com o PicklePRO.">
<meta property="og:image" content="<?= htmlspecialchars($projectImageUrl) ?>" /> <meta property="twitter:image" content="https://flatlogic-blog-pictures.s3.us-east-1.amazonaws.com/misc/defult-thumbnail.png">
<!-- Twitter image -->
<meta property="twitter:image" content="<?= htmlspecialchars($projectImageUrl) ?>" /> <!-- Stylesheets -->
<?php endif; ?> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
<link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <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"> <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
<style> <link rel="stylesheet" href="assets/css/custom.css?v=<?php echo time(); ?>">
: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;
}
body::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
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: 2rem;
backdrop-filter: blur(20px);
-webkit-backdrop-filter: blur(20px);
box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
}
.loader {
margin: 1.25rem auto 1.25rem;
width: 48px;
height: 48px;
border: 3px solid rgba(255, 255, 255, 0.25);
border-top-color: #fff;
border-radius: 50%;
animation: spin 1s linear infinite;
}
@keyframes spin {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}
.hint {
opacity: 0.9;
}
.sr-only {
position: absolute;
width: 1px; height: 1px;
padding: 0; margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap; border: 0;
}
h1 {
font-size: 3rem;
font-weight: 700;
margin: 0 0 1rem;
letter-spacing: -1px;
}
p {
margin: 0.5rem 0;
font-size: 1.1rem;
}
code {
background: rgba(0,0,0,0.2);
padding: 2px 6px;
border-radius: 4px;
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
footer {
position: absolute;
bottom: 1rem;
font-size: 0.8rem;
opacity: 0.7;
}
</style>
</head> </head>
<body> <body>
<main>
<div class="card"> <!-- Header -->
<h1>Analyzing your requirements and generating your website…</h1> <header class="navbar navbar-expand-lg navbar-light bg-white">
<div class="loader" role="status" aria-live="polite" aria-label="Applying initial changes"> <div class="container">
<span class="sr-only">Loading…</span> <a class="navbar-brand" href="#">
<img src="https://www.svgrepo.com/show/494426/pickleball-paddle.svg" alt="PicklePRO Logo" width="30" height="30" class="d-inline-block align-text-top me-2">
Pickle<span class="text-primary">PRO</span>
</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav mx-auto">
<li class="nav-item"><a class="nav-link" href="#">Home</a></li>
<li class="nav-item"><a class="nav-link" href="#">Torneios</a></li>
<li class="nav-item"><a class="nav-link" href="#">Reservas</a></li>
</ul>
<div class="d-flex">
<a href="#" class="btn btn-link text-decoration-none me-2">Entrar</a>
<a href="#" class="btn btn-primary">Cadastrar</a>
</div>
</div>
</div>
</header>
<!-- Main Content -->
<main class="container my-4">
<div class="text-center mb-5">
<h1 class="display-5 fw-bold">Seu Portal Completo de <span class="text-primary">Pickleball</span></h1>
</div>
<div class="row g-4">
<!-- Coluna Clubes Parceiros -->
<div class="col-lg-4">
<h5 class="mb-3"><i class="bi bi-building me-2 text-primary"></i>Clubes Parceiros</h5>
<div class="card card-body">
<!-- Slider aqui -->
<div id="clubsCarousel" class="carousel slide" data-bs-ride="carousel">
<div class="carousel-inner">
<div class="carousel-item active">
<h6 class="fw-bold">Santa Cecília Pickleball</h6>
<p class="small text-muted">Clube tradicional com excelente estrutura para prática de Pickleball</p>
<p class="small mb-1"><i class="bi bi-geo-alt me-2"></i>Av. Santa Cecília, 456 - São Paulo, SP</p>
<p class="small mb-1"><i class="bi bi-telephone me-2"></i>(11) 97654-3210</p>
<p class="small"><i class="bi bi-envelope me-2"></i>contato@santacecilia.com.br</p>
<a href="#" class="btn btn-primary mt-3">Ver Agendamentos Disponíveis</a>
</div>
<div class="carousel-item">
<h6 class="fw-bold">Smash Club</h6>
<p class="small text-muted">O melhor lugar para jogar e fazer amigos.</p>
<p class="small mb-1"><i class="bi bi-geo-alt me-2"></i>Rua dos Atletas, 123 - Rio de Janeiro, RJ</p>
<p class="small mb-1"><i class="bi bi-telephone me-2"></i>(21) 98765-4321</p>
<p class="small"><i class="bi bi-envelope me-2"></i>contato@smashclub.com.br</p>
<a href="#" class="btn btn-primary mt-3">Ver Agendamentos Disponíveis</a>
</div>
</div>
<div class="carousel-indicators-custom">
<button type="button" data-bs-target="#clubsCarousel" data-bs-slide-to="0" class="active" aria-current="true" aria-label="Slide 1"></button>
<button type="button" data-bs-target="#clubsCarousel" data-bs-slide-to="1" aria-label="Slide 2"></button>
</div>
</div>
</div>
</div>
<!-- Coluna Próximos Torneios -->
<div class="col-lg-4">
<h5 class="mb-3"><i class="bi bi-trophy me-2 text-primary"></i>Próximos Torneios</h5>
<div class="card card-body">
<div class="tournament-item">
<p class="fw-bold mb-1">1º COPA DINK DE PICKLEBALL</p>
<p class="small text-muted mb-1"><i class="bi bi-tag me-2"></i>Dink Pickleball</p>
<p class="small text-muted"><i class="bi bi-calendar-event me-2"></i>15/10/2025</p>
</div>
<hr>
<div class="tournament-item">
<p class="fw-bold mb-1">1ª COPA DE PICKLEBALL</p>
<p class="small text-muted mb-1"><i class="bi bi-tag me-2"></i>Smash Pickleball</p>
<p class="small text-muted"><i class="bi bi-calendar-event me-2"></i>25/10/2025</p>
</div>
</div>
</div>
<!-- Coluna Calendário -->
<div class="col-lg-4">
<h5 class="mb-3"><i class="bi bi-calendar3 me-2 text-primary"></i>Calendário</h5>
<div class="card card-body">
<div class="calendar-header d-flex justify-content-between align-items-center mb-3">
<button class="btn btn-link text-decoration-none"><i class="bi bi-chevron-left"></i></button>
<h6 class="fw-bold mb-0">Outubro 2025</h6>
<button class="btn btn-link text-decoration-none"><i class="bi bi-chevron-right"></i></button>
</div>
<div class="calendar-grid">
<div class="day-name">Dom</div><div class="day-name">Seg</div><div class="day-name">Ter</div><div class="day-name">Qua</div><div class="day-name">Qui</div><div class="day-name">Sex</div><div class="day-name">Sáb</div>
<div class="day empty"></div><div class="day empty"></div><div class="day empty"></div><div class="day">1</div><div class="day">2</div><div class="day">3</div><div class="day">4</div>
<div class="day">5</div><div class="day">6</div><div class="day">7</div><div class="day">8</div><div class="day">9</div><div class="day">10</div><div class="day">11</div>
<div class="day">12</div><div class="day">13</div><div class="day">14</div><div class="day event">15</div><div class="day event">16</div><div class="day event">17</div><div class="day event">18</div>
<div class="day event">19</div><div class="day">20</div><div class="day">21</div><div class="day">22</div><div class="day">23</div><div class="day">24</div><div class="day event">25</div>
<div class="day event">26</div><div class="day">27</div><div class="day">28</div><div class="day">29</div><div class="day">30</div><div class="day">31</div>
</div>
<hr>
<div class="tournaments-of-month">
<p class="fw-bold small">Torneios do Mês</p>
<div class="d-flex align-items-center mb-2">
<span class="event-dot bg-primary me-2"></span>
<span class="small">1º COPA DINK DE PICKLEBALL 14 de out. - 18 de out.</span>
</div>
<div class="d-flex align-items-center">
<span class="event-dot bg-success me-2"></span>
<span class="small">1ª COPA DE PICKLEBALL 24 de out. - 25 de out.</span>
</div>
</div>
<a href="#" class="btn btn-outline-primary mt-3">Ver Todos os Torneios</a>
</div>
</div> </div>
<p class="hint"><?= ($_SERVER['HTTP_HOST'] ?? '') === 'appwizzy.com' ? 'AppWizzy' : 'Flatlogic' ?> AI is collecting your requirements and applying the first changes.</p>
<p class="hint">This page will update automatically as the plan is implemented.</p>
<p>Runtime: PHP <code><?= htmlspecialchars($phpVersion) ?></code> — UTC <code><?= htmlspecialchars($now) ?></code></p>
</div> </div>
</main> </main>
<footer>
Page updated: <?= htmlspecialchars($now) ?> (UTC) <!-- Footer -->
<footer class="footer mt-5 py-4 bg-light">
<div class="container text-center">
<p class="mb-1 text-muted small">&copy; <?php echo date("Y"); ?> PicklePRO. Todos os direitos reservados.</p>
</div>
</footer> </footer>
<!-- Scripts -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
<script src="assets/js/main.js?v=<?php echo time(); ?>"></script>
</body> </body>
</html> </html>