Compare commits

..

1 Commits

Author SHA1 Message Date
Flatlogic Bot
6bbcab2491 wolf 2025-09-10 10:18:07 +00:00
5 changed files with 481 additions and 126 deletions

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

@ -0,0 +1,152 @@
:root {
--primary-color: #6f42c1;
--secondary-color: #0df2c9;
--dark-bg: #1a1a2e;
--card-bg: #1f203a;
--light-text: #f0f0f0;
--muted-text: #a0a0b0;
}
body {
background-color: var(--dark-bg);
color: var(--light-text);
font-family: 'Poppins', sans-serif;
}
.navbar {
transition: background-color 0.3s ease, padding 0.3s ease;
background-color: transparent;
}
.navbar.scrolled {
background-color: rgba(26, 26, 46, 0.9);
backdrop-filter: blur(10px);
padding-top: 0.5rem;
padding-bottom: 0.5rem;
}
.navbar-brand {
font-weight: bold;
color: var(--light-text);
}
.nav-link {
color: var(--muted-text);
transition: color 0.2s;
}
.nav-link:hover, .nav-link.active {
color: var(--light-text);
}
.btn-primary {
background-color: var(--primary-color);
border-color: var(--primary-color);
transition: background-color 0.2s, transform 0.2s;
}
.btn-primary:hover {
background-color: #5a35a1;
transform: translateY(-2px);
}
.hero {
padding: 10rem 0;
background: linear-gradient(45deg, #1a1a2e, #16213e);
text-align: center;
}
.hero h1 {
font-size: 3.5rem;
font-weight: 700;
}
.hero p {
font-size: 1.25rem;
color: var(--muted-text);
}
.store-buttons .btn {
background-color: #333;
color: white;
border: none;
margin: 0.5rem;
padding: 0.75rem 1.5rem;
}
.phone-mockup {
margin-top: 4rem;
max-width: 300px;
}
.section {
padding: 6rem 0;
}
.section-title {
text-align: center;
margin-bottom: 4rem;
font-weight: 700;
}
.feature-card, .review-card {
background-color: var(--card-bg);
border-radius: 1rem;
padding: 2rem;
margin-bottom: 2rem;
border: 1px solid #3a3b5c;
transition: transform 0.3s, box-shadow 0.3s;
}
.feature-card:hover, .review-card:hover {
transform: translateY(-10px);
box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}
.feature-card .icon {
font-size: 3rem;
color: var(--secondary-color);
margin-bottom: 1rem;
}
.review-card img {
width: 80px;
height: 80px;
border-radius: 50%;
margin-bottom: 1rem;
}
#newsletter {
background-color: var(--card-bg);
padding: 4rem 0;
border-radius: 1rem;
}
.form-control {
background-color: #2a2b4a;
border: 1px solid #3a3b5c;
color: var(--light-text);
}
.form-control:focus {
background-color: #2a2b4a;
border-color: var(--primary-color);
color: var(--light-text);
box-shadow: none;
}
.footer {
background-color: #16213e;
padding: 3rem 0;
margin-top: 6rem;
}
.footer a {
color: var(--muted-text);
text-decoration: none;
transition: color 0.2s;
}
.footer a:hover {
color: var(--light-text);
}

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

@ -0,0 +1,54 @@
document.addEventListener('DOMContentLoaded', function () {
// Shrinking navbar on scroll
const navbar = document.querySelector('.navbar');
if (navbar) {
window.addEventListener('scroll', function () {
if (window.scrollY > 50) {
navbar.classList.add('scrolled');
} else {
navbar.classList.remove('scrolled');
}
});
}
// Smooth scrolling for anchor links
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener('click', function (e) {
e.preventDefault();
const targetId = this.getAttribute('href');
const targetElement = document.querySelector(targetId);
if(targetElement){
targetElement.scrollIntoView({ behavior: 'smooth' });
}
});
});
// Newsletter form validation
const newsletterForm = document.getElementById('newsletter-form');
const newsletterSuccess = document.getElementById('newsletter-success');
if (newsletterForm) {
newsletterForm.addEventListener('submit', function (e) {
e.preventDefault();
const emailInput = newsletterForm.querySelector('input[type="email"]');
if (emailInput.checkValidity()) {
// Here you would typically send the email to your server
newsletterSuccess.style.display = 'block';
emailInput.value = ''; // Clear input
setTimeout(() => { newsletterSuccess.style.display = 'none'; }, 5000);
} else {
emailInput.classList.add('is-invalid');
}
});
// Remove validation error on input
const emailInput = newsletterForm.querySelector('input[type="email"]');
if(emailInput) {
emailInput.addEventListener('input', () => {
if (emailInput.classList.contains('is-invalid')) {
emailInput.classList.remove('is-invalid');
}
});
}
}
});

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 KiB

96
contact.php Normal file
View File

@ -0,0 +1,96 @@
<?php
$successMessage = '';
$errorMessage = '';
if ($_SERVER["REQUEST_METHOD"] == "POST") {
// Include the MailService
require_once __DIR__ . '/mail/MailService.php';
// Sanitize and validate inputs
$name = filter_var(trim($_POST['name']), FILTER_SANITIZE_STRING);
$email = filter_var(trim($_POST['email']), FILTER_SANITIZE_EMAIL);
$message = filter_var(trim($_POST['message']), FILTER_SANITIZE_STRING);
if (empty($name) || !filter_var($email, FILTER_VALIDATE_EMAIL) || empty($message)) {
$errorMessage = 'Please fill out all fields correctly.';
} else {
// Use the MailService to send the email
// The 'to' address will be picked up from the .env configuration (MAIL_TO)
$result = MailService::sendContactMessage($name, $email, $message);
if (!empty($result['success'])) {
$successMessage = "Thank you for your message! We'll get back to you shortly.";
} else {
// Do not echo the raw error to the user for security.
// In a real app, you would log $result['error'].
$errorMessage = 'Sorry, there was an error sending your message. Please try again later.';
}
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Contact Us - TrailGo</title>
<!-- Bootstrap 5 CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
<style>
body {
background-color: #F8F9FA;
}
.contact-form {
max-width: 600px;
margin: 50px auto;
padding: 30px;
background-color: #FFFFFF;
border-radius: .5rem;
box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}
</style>
</head>
<body>
<div class="container">
<div class="contact-form">
<h2 class="text-center mb-4">Contact Us</h2>
<?php if ($successMessage): ?>
<div class="alert alert-success" role="alert">
<?php echo $successMessage; ?>
</div>
<?php endif; ?>
<?php if ($errorMessage): ?>
<div class="alert alert-danger" role="alert">
<?php echo $errorMessage; ?>
</div>
<?php endif; ?>
<form action="contact.php" method="post">
<div class="mb-3">
<label for="name" class="form-label">Name</label>
<input type="text" class="form-control" id="name" name="name" required>
</div>
<div class="mb-3">
<label for="email" class="form-label">Email address</label>
<input type="email" class="form-control" id="email" name="email" required>
</div>
<div class="mb-3">
<label for="message" class="form-label">Message</label>
<textarea class="form-control" id="message" name="message" rows="5" required></textarea>
</div>
<div class="d-grid">
<button type="submit" class="btn btn-primary">Send Message</button>
</div>
</form>
<div class="text-center mt-3">
<a href="/">Back to Home</a>
</div>
</div>
</div>
<!-- Bootstrap 5 JS -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous"></script>
</body>
</html>

305
index.php
View File

@ -1,131 +1,184 @@
<?php <!DOCTYPE html>
declare(strict_types=1);
@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"> <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> <title>TrailGo - Explore the World</title>
<link rel="preconnect" href="https://fonts.googleapis.com"> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap" rel="stylesheet"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1/font/bootstrap-icons.css">
<style> <link rel="stylesheet" href="assets/css/custom.css">
: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"> <!-- Navbar -->
<h1>Analyzing your requirements and generating your website…</h1> <nav class="navbar navbar-expand-lg navbar-dark fixed-top">
<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="#">TrailGo</a>
</div> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
<p class="hint">Flatlogic AI is collecting your requirements and applying the first changes.</p> <span class="navbar-toggler-icon"></span>
<p class="hint">This page will update automatically as the plan is implemented.</p> </button>
<p>Runtime: PHP <code><?= htmlspecialchars($phpVersion) ?></code> — UTC <code><?= htmlspecialchars($now) ?></code></p> <div class="collapse navbar-collapse" id="navbarNav">
</div> <ul class="navbar-nav mx-auto">
</main> <li class="nav-item"><a class="nav-link" href="#how-it-works">How It Works</a></li>
<footer> <li class="nav-item"><a class="nav-link" href="#features">Features</a></li>
Page updated: <?= htmlspecialchars($now) ?> (UTC) <li class="nav-item"><a class="nav-link" href="#reviews">Reviews</a></li>
</footer> <li class="nav-item"><a class="nav-link" href="/contact.php">Contact</a></li>
</ul>
<a href="#download" class="btn btn-primary">Download</a>
</div>
</div>
</nav>
<!-- Hero Section -->
<header class="hero">
<div class="container">
<div class="row">
<div class="col-12">
<h1 class="display-4 fw-bold">Explore the World, One Trail at a Time</h1>
<p class="lead my-4">The ultimate companion for hikers, bikers, and adventurers.</p>
<div class="store-buttons">
<a href="#" class="btn btn-lg"><i class="bi bi-apple"></i> App Store</a>
<a href="#" class="btn btn-lg"><i class="bi bi-google-play"></i> Google Play</a>
</div>
<img src="https://picsum.photos/seed/trailgo-hero/300/600" alt="A smartphone displaying the TrailGo app's map interface on a scenic trail background." class="img-fluid phone-mockup">
</div>
</div>
</div>
</header>
<!-- How It Works Section -->
<section id="how-it-works" class="section">
<div class="container">
<h2 class="section-title">How It Works</h2>
<div class="row text-center">
<div class="col-md-4">
<div class="feature-card">
<div class="icon">1</div>
<h3>Discover Trails</h3>
<p>Find the best trails near you with our curated map.</p>
</div>
</div>
<div class="col-md-4">
<div class="feature-card">
<div class="icon">2</div>
<h3>Track Your Journey</h3>
<p>Record your progress with real-time GPS tracking.</p>
</div>
</div>
<div class="col-md-4">
<div class="feature-card">
<div class="icon">3</div>
<h3>Share Your Adventures</h3>
<p>Share your completed trails with friends and the community.</p>
</div>
</div>
</div>
</div>
</section>
<!-- Features Section -->
<section id="features" class="section bg-dark-alt">
<div class="container">
<h2 class="section-title">App Features</h2>
<div class="row">
<div class="col-md-6 col-lg-3">
<div class="feature-card">
<div class="icon"><i class="bi bi-map"></i></div>
<h5>Offline Maps</h5>
<p>Download maps for offline use and never get lost.</p>
</div>
</div>
<div class="col-md-6 col-lg-3">
<div class="feature-card">
<div class="icon"><i class="bi bi-compass"></i></div>
<h5>Trail Discovery</h5>
<p>Find new trails filtered by difficulty, length, and rating.</p>
</div>
</div>
<div class="col-md-6 col-lg-3">
<div class="feature-card">
<div class="icon"><i class="bi bi-person-check"></i></div>
<h5>Community Reviews</h5>
<p>Read reviews from other hikers to pick the perfect trail.</p>
</div>
</div>
<div class="col-md-6 col-lg-3">
<div class="feature-card">
<div class="icon"><i class="bi bi-graph-up"></i></div>
<h5>Progress Tracking</h5>
<p>Monitor your stats like distance, elevation, and speed.</p>
</div>
</div>
</div>
</div>
</section>
<!-- Reviews Section -->
<section id="reviews" class="section">
<div class="container">
<h2 class="section-title">What Our Users Say</h2>
<div class="row">
<div class="col-md-4">
<div class="review-card">
<img src="https://picsum.photos/seed/trailgo-avatar1/96/96" alt="Avatar of a happy TrailGo user.">
<p>"TrailGo has changed the way I hike. The offline maps are a lifesaver!"</p>
<small class="text-muted">- Alex Johnson</small>
</div>
</div>
<div class="col-md-4">
<div class="review-card">
<img src="https://picsum.photos/seed/trailgo-avatar2/96/96" alt="Avatar of a happy TrailGo user.">
<p>"I love discovering new trails and seeing my progress. Highly recommend!"</p>
<small class="text-muted">- Maria Garcia</small>
</div>
</div>
<div class="col-md-4">
<div class="review-card">
<img src="https://picsum.photos/seed/trailgo-avatar3/96/96" alt="Avatar of a happy TrailGo user.">
<p>"A must-have app for any outdoor enthusiast. The community features are fantastic."</p>
<small class="text-muted">- Chris Lee</small>
</div>
</div>
</div>
</div>
</section>
<!-- Newsletter Section -->
<section id="newsletter" class="mt-5">
<div class="container">
<div class="row justify-content-center">
<div class="col-md-8 text-center">
<h2 class="section-title">Stay in the Loop</h2>
<p>Sign up for our newsletter to get the latest updates and trail news.</p>
<form id="newsletter-form" class="row justify-content-center mt-4">
<div class="col-md-6">
<input type="email" class="form-control form-control-lg" placeholder="Enter your email" required>
<div class="invalid-feedback">Please enter a valid email address.</div>
</div>
<div class="col-md-3">
<button type="submit" class="btn btn-primary btn-lg w-100">Subscribe</button>
</div>
</form>
<div id="newsletter-success" class="mt-3" style="display:none; color: var(--secondary-color);">Thank you for subscribing!</div>
</div>
</div>
</div>
</section>
<!-- Footer -->
<footer class="footer">
<div class="container text-center">
<p>&copy; <?php echo date("Y"); ?> TrailGo. All Rights Reserved.</p>
<div>
<a href="#" class="mx-2"><i class="bi bi-twitter"></i></a>
<a href="#" class="mx-2"><i class="bi bi-instagram"></i></a>
<a href="#" class="mx-2"><i class="bi bi-facebook"></i></a>
</div>
</div>
</footer>
<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>