37666-vm/index.php
Flatlogic Bot f8ac1e502b 1.0
2026-01-21 14:14:15 +00:00

175 lines
8.5 KiB
PHP

<?php
declare(strict_types=1);
require_once 'db/config.php';
// Fetch members for the directory
try {
$pdo = db();
$stmt = $pdo->query("SELECT * FROM members ORDER BY created_at DESC LIMIT 12");
$members = $stmt->fetchAll(PDO::FETCH_ASSOC);
} catch (PDOException $e) {
$members = [];
$error = $e->getMessage();
}
// SEO and Meta
$projectName = "F1 Girls Community";
$projectDescription = $_SERVER['PROJECT_DESCRIPTION'] ?? "A global community for girls who love Formula 1. Connect, share, and meet other fans.";
$projectImageUrl = $_SERVER['PROJECT_IMAGE_URL'] ?? "";
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><?= htmlspecialchars($projectName) ?></title>
<meta name="description" content="<?= htmlspecialchars($projectDescription) ?>">
<meta property="og:title" content="<?= htmlspecialchars($projectName) ?>">
<meta property="og:description" content="<?= htmlspecialchars($projectDescription) ?>">
<meta property="og:image" content="<?= htmlspecialchars($projectImageUrl) ?>">
<meta name="twitter:card" content="summary_large_image">
<!-- Bootstrap 5 CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
<!-- Custom CSS -->
<link href="assets/css/custom.css?v=<?= time() ?>" rel="stylesheet">
</head>
<body>
<!-- Navbar -->
<nav class="navbar navbar-expand-lg navbar-light bg-white sticky-top">
<div class="container">
<a class="navbar-brand" href="/">F1 GIRLS <span class="text-danger">COMMUNITY</span></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">
<li class="nav-item"><a class="nav-link" href="#directory">Directory</a></li>
<li class="nav-item"><a class="nav-link" href="#join">Join Us</a></li>
<li class="nav-item ms-lg-3">
<a href="#join" class="btn btn-f1">Become a Member</a>
</li>
</ul>
</div>
</div>
</nav>
<!-- Hero Section -->
<header class="hero-section text-center">
<div class="container">
<div class="row justify-content-center">
<div class="col-lg-8">
<h1 class="display-4 mb-4">Connecting Female F1 Fans Globally</h1>
<p class="lead mb-5 text-muted">A space for girls who love the roar of the engines, the strategy of the pits, and the thrill of the podium. Meet others who share your passion.</p>
<div class="d-flex justify-content-center gap-3">
<a href="#directory" class="btn btn-f1">Explore Community</a>
<a href="#join" class="btn btn-outline-dark px-4 py-2 fw-bold" style="border-radius: 4px;">Join the Pit Wall</a>
</div>
</div>
</div>
</div>
</header>
<!-- Community Directory -->
<section id="directory" class="py-5">
<div class="container">
<div class="section-title">
<h2 class="h3">Community Members</h2>
<p class="text-muted">Meet the latest girls to join the Pit Wall.</p>
</div>
<div class="row g-4">
<?php if (empty($members)): ?>
<div class="col-12 text-center py-5">
<p class="text-muted">Be the first to join our growing community!</p>
</div>
<?php else: ?>
<?php foreach ($members as $member): ?>
<div class="col-md-6 col-lg-3">
<div class="card-member">
<span class="team-badge"><?= htmlspecialchars($member['favorite_team'] ?: 'F1 Fan') ?></span>
<h3 class="h5 mb-1"><?= htmlspecialchars($member['name']) ?></h3>
<p class="small text-muted mb-3"><i class="bi bi-geo-alt"></i> <?= htmlspecialchars($member['location']) ?></p>
<p class="small mb-0 text-truncate"><?= htmlspecialchars($member['bio']) ?></p>
</div>
</div>
<?php endforeach; ?>
<?php endif; ?>
</div>
</div>
</section>
<!-- Join Form -->
<section id="join" class="py-5 bg-light">
<div class="container">
<div class="row justify-content-center">
<div class="col-lg-6">
<div class="bg-white p-4 p-md-5 shadow-sm border rounded">
<div class="section-title">
<h2 class="h3">Join the Community</h2>
<p class="text-muted">Create your profile and start connecting.</p>
</div>
<form id="joinForm">
<div class="mb-3">
<label class="form-label small fw-bold">Full Name</label>
<input type="text" name="name" class="form-control" placeholder="Jane Doe" required>
</div>
<div class="row mb-3">
<div class="col-md-6">
<label class="form-label small fw-bold">Location (City, Country)</label>
<input type="text" name="location" class="form-control" placeholder="London, UK" required>
</div>
<div class="col-md-6">
<label class="form-label small fw-bold">Favorite Team</label>
<select name="favorite_team" class="form-control">
<option value="">Select Team</option>
<option value="Mercedes">Mercedes</option>
<option value="Red Bull">Red Bull</option>
<option value="Ferrari">Ferrari</option>
<option value="McLaren">McLaren</option>
<option value="Aston Martin">Aston Martin</option>
<option value="Alpine">Alpine</option>
<option value="Williams">Williams</option>
<option value="VCARB">VCARB</option>
<option value="Haas">Haas</option>
<option value="Sauber">Sauber</option>
</select>
</div>
</div>
<div class="mb-4">
<label class="form-label small fw-bold">A little about you</label>
<textarea name="bio" class="form-control" rows="3" placeholder="I've been a fan since..."></textarea>
</div>
<button type="submit" class="btn btn-f1 w-100">Join the Pit Wall</button>
</form>
</div>
</div>
</div>
</div>
</section>
<!-- Footer -->
<footer>
<div class="container">
<div class="row">
<div class="col-md-6 mb-4">
<h5 class="navbar-brand">F1 GIRLS <span class="text-danger">COMMUNITY</span></h5>
<p class="small text-muted mt-2">A passionate community for female Formula 1 fans globally. Join us on the track and off.</p>
</div>
<div class="col-md-6 text-md-end">
<p class="small text-muted">&copy; <?= date('Y') ?> F1 Girls Community. For fans, by fans.</p>
</div>
</div>
</div>
</footer>
<!-- Toast Container -->
<div id="toastContainer" class="toast-container position-fixed bottom-0 end-0 p-3"></div>
<!-- Scripts -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
<script src="assets/js/main.js?v=<?= time() ?>"></script>
</body>
</html>