33960-vm/index.php
2025-09-10 11:16:37 +00:00

237 lines
13 KiB
PHP

<?php
$message_sent = null;
if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST['contact_form'])) {
require_once __DIR__ . '/mail/MailService.php';
$name = filter_var($_POST['name'] ?? '', FILTER_SANITIZE_STRING);
$email = filter_var($_POST['email'] ?? '', FILTER_SANITIZE_EMAIL);
$message = filter_var($_POST['message'] ?? '', FILTER_SANITIZE_STRING);
if (!empty($name) && !empty($email) && !empty($message) && filter_var($email, FILTER_VALIDATE_EMAIL)) {
// The recipient is determined by MailService, using MAIL_TO from .env
$res = MailService::sendContactMessage($name, $email, $message, null, 'Contact Form Submission');
if (!empty($res['success'])) {
$message_sent = true;
} else {
$message_sent = false;
}
} else {
$message_sent = false;
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Ava Reed | Designer & Developer</title>
<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="stylesheet" href="assets/css/custom.css?v=<?php echo time(); ?>">
</head>
<body>
<!-- Navbar -->
<nav class="navbar navbar-expand-lg navbar-light bg-transparent fixed-top">
<div class="container">
<a class="navbar-brand fw-bold" href="#">Ava Reed</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 ms-auto">
<li class="nav-item"><a class="nav-link" href="#work">Work</a></li>
<li class="nav-item"><a class="nav-link" href="#services">Services</a></li>
<li class="nav-item"><a class="nav-link" href="#about">About</a></li>
<li class="nav-item"><a class="nav-link" href="#testimonials">Testimonials</a></li>
<li class="nav-item"><a class="nav-link" href="#contact">Contact</a></li>
</ul>
</div>
</div>
</nav>
<!-- Hero Section -->
<header class="vh-100 d-flex align-items-center text-center text-white" style="background: url('https://picsum.photos/seed/ava-hero/1600/900') no-repeat center center; background-size: cover;">
<div class="container" style="background-color: rgba(0,0,0,0.5); padding: 2rem; border-radius: 1rem;">
<h1 class="display-4 fw-bold">Design & Development by Ava Reed.</h1>
<p class="lead my-4">Crafting elegant and effective digital solutions.</p>
<a href="#work" class="btn btn-primary btn-lg mx-2">View My Work</a>
<a href="#contact" class="btn btn-outline-light btn-lg mx-2">Contact Me</a>
</div>
</header>
<!-- Work Gallery -->
<section id="work" class="section">
<div class="container">
<h2 class="text-center mb-5">My Work</h2>
<div class="text-center mb-4">
<button type="button" class="btn btn-outline-primary active" data-filter="all">All</button>
<button type="button" class="btn btn-outline-primary" data-filter="web">Web Development</button>
<button type="button" class="btn btn-outline-primary" data-filter="uiux">UI/UX Design</button>
<button type="button" class="btn btn-outline-primary" data-filter="branding">Brand Identity</button>
</div>
<div class="row g-4 portfolio-container">
<?php
$projects = [
['category' => 'web', 'title' => 'Corporate Website Redesign'],
['category' => 'uiux', 'title' => 'Mobile App UI/UX'],
['category' => 'branding', 'title' => 'Startup Branding'],
['category' => 'uiux', 'title' => 'E-commerce Platform Design'],
['category' => 'web', 'title' => 'Portfolio Website'],
['category' => 'branding', 'title' => 'Logo & Identity Pack'],
];
$i = 1;
foreach ($projects as $project): ?>
<div class="col-md-6 col-lg-4 portfolio-item" data-category="<?php echo $project['category']; ?>">
<div class="card">
<img src="https://picsum.photos/seed/ava-work-<?php echo $i; ?>/600/400" class="card-img-top" alt="A sample of Ava Reed's design and development work.">
<div class="card-body">
<h5 class="card-title"><?php echo $project['title']; ?></h5>
<p class="card-text">A brief description of the project, its goals, and the technologies used.</p>
</div>
</div>
</div>
<?php $i++; endforeach; ?>
</div>
</div>
</section>
<!-- Services -->
<section id="services" class="section bg-light">
<div class="container">
<h2 class="text-center mb-5">Services</h2>
<div class="row text-center">
<div class="col-md-4">
<div class="card p-4 mb-4">
<i class="bi bi-palette-fill fs-1 text-primary mb-3"></i>
<h4>UI/UX Design</h4>
<p>Creating intuitive and beautiful user interfaces that provide a seamless user experience.</p>
</div>
</div>
<div class="col-md-4">
<div class="card p-4 mb-4">
<i class="bi bi-code-slash fs-1 text-primary mb-3"></i>
<h4>Web Development</h4>
<p>Building responsive, high-performance websites from the ground up.</p>
</div>
</div>
<div class="col-md-4">
<div class="card p-4 mb-4">
<i class="bi bi-vector-pen fs-1 text-primary mb-3"></i>
<h4>Brand Identity</h4>
<p>Developing strong and memorable brand identities that tell a story.</p>
</div>
</div>
</div>
</div>
</section>
<!-- About -->
<section id="about" class="section">
<div class="container">
<div class="row align-items-center">
<div class="col-md-4 text-center">
<img src="https://picsum.photos/seed/ava-avatar/256/256" class="img-fluid rounded-circle mb-4" alt="A portrait of Ava Reed.">
</div>
<div class="col-md-8">
<h2 class="mb-4">About Me</h2>
<p class="lead">I'm Ava Reed, a passionate and creative designer and developer with a knack for building things that are both beautiful and functional. With over 5 years of experience, I help clients bring their ideas to life.</p>
<p>My approach is collaborative and user-centric, focusing on creating digital experiences that not only look good but also solve real-world problems and are a joy to use.</p>
</div>
</div>
</div>
</section>
<!-- Testimonials -->
<section id="testimonials" class="section bg-light">
<div class="container">
<h2 class="text-center mb-5">What My Clients Say</h2>
<div class="row g-4">
<div class="col-lg-4">
<div class="card h-100">
<div class="card-body text-center">
<img src="https://picsum.photos/seed/client-1/100/100" class="rounded-circle mb-3" alt="Client 1">
<p class="card-text fst-italic">"Ava is a true professional. The final product exceeded all our expectations. Her attention to detail is second to none."</p>
<footer class="blockquote-footer mt-3">John Doe, CEO of ExampleCorp</footer>
</div>
</div>
</div>
<div class="col-lg-4">
<div class="card h-100">
<div class="card-body text-center">
<img src="https://picsum.photos/seed/client-2/100/100" class="rounded-circle mb-3" alt="Client 2">
<p class="card-text fst-italic">"Working with Ava was a fantastic experience. She is not only a talented developer but also a great communicator."</p>
<footer class="blockquote-footer mt-3">Jane Smith, Marketing Director at Creative Inc.</footer>
</div>
</div>
</div>
<div class="col-lg-4">
<div class="card h-100">
<div class="card-body text-center">
<img src="https://picsum.photos/seed/client-3/100/100" class="rounded-circle mb-3" alt="Client 3">
<p class="card-text fst-italic">"The website Ava built for us is both beautiful and highly functional. We've seen a significant increase in user engagement."</p>
<footer class="blockquote-footer mt-3">Sam Wilson, Founder of TechStart</footer>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Contact Form -->
<section id="contact" class="section bg-light">
<div class="container">
<h2 class="text-center mb-5">Get In Touch</h2>
<div class="row justify-content-center">
<div class="col-lg-8">
<form action="index.php#contact" method="POST" class="needs-validation" novalidate>
<input type="hidden" name="contact_form" value="1">
<?php if ($message_sent === true): ?>
<div class="alert alert-success" role="alert">
Thank you! Your message has been sent successfully.
</div>
<?php elseif ($message_sent === false): ?>
<div class="alert alert-danger" role="alert">
Sorry, there was an error sending your message. Please try again later.
</div>
<?php endif; ?>
<div class="mb-3">
<label for="name" class="form-label">Name</label>
<input type="text" class="form-control" id="name" name="name" required>
<div class="invalid-feedback">Please enter your name.</div>
</div>
<div class="mb-3">
<label for="email" class="form-label">Email</label>
<input type="email" class="form-control" id="email" name="email" required>
<div class="invalid-feedback">Please enter a valid email address.</div>
</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 class="invalid-feedback">Please enter your message.</div>
</div>
<button type="submit" class="btn btn-primary btn-lg">Send Message</button>
</form>
</div>
</div>
</div>
</section>
<!-- Footer -->
<footer class="py-5 bg-dark text-white text-center">
<div class="container">
<div class="mb-3">
<a href="#" class="text-white mx-2"><i class="bi bi-linkedin fs-4"></i></a>
<a href="#" class="text-white mx-2"><i class="bi bi-github fs-4"></i></a>
<a href="#" class="text-white mx-2"><i class="bi bi-dribbble fs-4"></i></a>
</div>
<p class="mb-0">&copy; <?php echo date("Y"); ?> Ava Reed. All Rights Reserved.</p>
</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>
</html>