318 lines
16 KiB
PHP
318 lines
16 KiB
PHP
<?php
|
||
declare(strict_types=1);
|
||
@ini_set('display_errors', '1');
|
||
@error_reporting(E_ALL);
|
||
@date_default_timezone_set('UTC');
|
||
|
||
$now = date('Y-m-d H:i:s');
|
||
$projectName = $_SERVER['PROJECT_NAME'] ?? 'Personal Portfolio';
|
||
$projectDescription = $_SERVER['PROJECT_DESCRIPTION'] ?? '';
|
||
$projectImageUrl = $_SERVER['PROJECT_IMAGE_URL'] ?? '';
|
||
|
||
$successMessage = '';
|
||
$errorMessage = '';
|
||
$formErrors = [];
|
||
|
||
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||
$name = trim($_POST['name'] ?? '');
|
||
$email = trim($_POST['email'] ?? '');
|
||
$message = trim($_POST['message'] ?? '');
|
||
|
||
if ($name === '') {
|
||
$formErrors['name'] = 'Please enter your name.';
|
||
}
|
||
if ($email === '' || !filter_var($email, FILTER_VALIDATE_EMAIL)) {
|
||
$formErrors['email'] = 'Please enter a valid email address.';
|
||
}
|
||
if ($message === '' || mb_strlen($message) < 10) {
|
||
$formErrors['message'] = 'Please share at least 10 characters about your request.';
|
||
}
|
||
|
||
if (!$formErrors) {
|
||
require_once __DIR__ . '/mail/MailService.php';
|
||
$result = MailService::sendContactMessage($name, $email, $message, null, 'Portfolio contact request');
|
||
if (!empty($result['success'])) {
|
||
$successMessage = 'Thanks for reaching out! Your message was sent successfully.';
|
||
$_POST = [];
|
||
} else {
|
||
$errorMessage = 'Sorry, we could not send your message right now. Please try again later.';
|
||
}
|
||
} else {
|
||
$errorMessage = 'Please fix the highlighted fields and try again.';
|
||
}
|
||
}
|
||
?>
|
||
<!doctype html>
|
||
<html lang="en">
|
||
<head>
|
||
<meta charset="utf-8" />
|
||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||
<title><?= htmlspecialchars($projectName) ?></title>
|
||
<?php if ($projectDescription): ?>
|
||
<meta name="description" content="<?= htmlspecialchars($projectDescription) ?>" />
|
||
<meta property="og:description" content="<?= htmlspecialchars($projectDescription) ?>" />
|
||
<meta property="twitter:description" content="<?= htmlspecialchars($projectDescription) ?>" />
|
||
<?php endif; ?>
|
||
<?php if ($projectImageUrl): ?>
|
||
<meta property="og:image" content="<?= htmlspecialchars($projectImageUrl) ?>" />
|
||
<meta property="twitter:image" content="<?= htmlspecialchars($projectImageUrl) ?>" />
|
||
<?php endif; ?>
|
||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
|
||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
|
||
<link rel="stylesheet" href="assets/css/custom.css?v=<?= htmlspecialchars((string) time()) ?>">
|
||
</head>
|
||
<body class="bg-surface">
|
||
<header class="sticky-top border-bottom bg-white">
|
||
<nav class="navbar navbar-expand-lg navbar-light py-3">
|
||
<div class="container">
|
||
<a class="navbar-brand fw-semibold" href="#top"><?= htmlspecialchars($projectName) ?></a>
|
||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#portfolioNav" aria-controls="portfolioNav" aria-expanded="false" aria-label="Toggle navigation">
|
||
<span class="navbar-toggler-icon"></span>
|
||
</button>
|
||
<div class="collapse navbar-collapse" id="portfolioNav">
|
||
<ul class="navbar-nav ms-auto mb-2 mb-lg-0 gap-lg-3">
|
||
<li class="nav-item"><a class="nav-link" href="#portfolio">Portfolio</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 btn btn-dark text-white px-3" href="#contact">Email me</a></li>
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
</nav>
|
||
</header>
|
||
|
||
<main id="top">
|
||
<section class="hero-section py-5">
|
||
<div class="container">
|
||
<div class="row align-items-center g-4">
|
||
<div class="col-lg-6">
|
||
<p class="text-uppercase text-muted small mb-2">Product Designer • Frontend Developer</p>
|
||
<h1 class="display-5 fw-semibold">I design calm, conversion-ready experiences for modern brands.</h1>
|
||
<p class="lead text-muted mt-3">Specialized in web product design, UI systems, and responsive build-outs that ship fast and feel premium.</p>
|
||
<div class="d-flex flex-column flex-sm-row gap-3 mt-4">
|
||
<a class="btn btn-dark btn-lg px-4" href="#contact">Email me</a>
|
||
<a class="btn btn-outline-dark btn-lg px-4" href="#portfolio">View work</a>
|
||
</div>
|
||
<div class="d-flex gap-4 mt-4 text-muted small">
|
||
<div>
|
||
<div class="fw-semibold text-dark">8+</div>
|
||
<div>Years shipping</div>
|
||
</div>
|
||
<div>
|
||
<div class="fw-semibold text-dark">40+</div>
|
||
<div>Projects delivered</div>
|
||
</div>
|
||
<div>
|
||
<div class="fw-semibold text-dark">12</div>
|
||
<div>Teams supported</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="col-lg-6">
|
||
<div class="hero-card p-4 p-lg-5">
|
||
<p class="text-uppercase small text-muted mb-2">Currently</p>
|
||
<h2 class="h4 fw-semibold mb-3">Building thoughtful digital products for SaaS & wellness brands.</h2>
|
||
<ul class="list-unstyled mb-4">
|
||
<li class="d-flex align-items-start gap-2 mb-2">
|
||
<span class="icon-pill">✓</span>
|
||
<span>End-to-end UX: discovery → design → build.</span>
|
||
</li>
|
||
<li class="d-flex align-items-start gap-2 mb-2">
|
||
<span class="icon-pill">✓</span>
|
||
<span>Clean systems: design tokens + component libraries.</span>
|
||
</li>
|
||
<li class="d-flex align-items-start gap-2">
|
||
<span class="icon-pill">✓</span>
|
||
<span>Weekly async updates and clear handoff docs.</span>
|
||
</li>
|
||
</ul>
|
||
<a class="text-decoration-none fw-semibold" href="#contact">Let’s talk about your next launch →</a>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
|
||
<section id="portfolio" class="section-spacing border-top">
|
||
<div class="container">
|
||
<div class="d-flex flex-column flex-md-row justify-content-between align-items-md-end gap-3 mb-4">
|
||
<div>
|
||
<p class="text-uppercase text-muted small mb-2">Selected work</p>
|
||
<h2 class="h3 fw-semibold mb-0">Portfolio highlights</h2>
|
||
</div>
|
||
<p class="text-muted mb-0">Focused on measurable outcomes, from onboarding conversion to retention.</p>
|
||
</div>
|
||
<div class="row g-4">
|
||
<?php
|
||
$projects = [
|
||
['title' => 'Aurora Health Platform', 'desc' => 'Patient onboarding redesign and responsive build.', 'tags' => ['UX Strategy', 'UI System', 'Frontend']],
|
||
['title' => 'Northwind Commerce', 'desc' => 'B2B ordering portal with pricing insights dashboard.', 'tags' => ['Product Design', 'Data Viz']],
|
||
['title' => 'Cascade Studio', 'desc' => 'Brand refresh + marketing site launch in 4 weeks.', 'tags' => ['Web Design', 'Launch']],
|
||
['title' => 'Relay Analytics', 'desc' => 'Retention dashboards and stakeholder reporting hub.', 'tags' => ['Dashboard', 'Research']],
|
||
];
|
||
foreach ($projects as $project): ?>
|
||
<div class="col-md-6">
|
||
<div class="card h-100 border-0 shadow-sm">
|
||
<div class="card-body p-4">
|
||
<h3 class="h5 fw-semibold"><?= htmlspecialchars($project['title']) ?></h3>
|
||
<p class="text-muted"><?= htmlspecialchars($project['desc']) ?></p>
|
||
<div class="d-flex flex-wrap gap-2">
|
||
<?php foreach ($project['tags'] as $tag): ?>
|
||
<span class="badge text-bg-light border"><?= htmlspecialchars($tag) ?></span>
|
||
<?php endforeach; ?>
|
||
</div>
|
||
</div>
|
||
<div class="card-footer bg-white border-0 px-4 pb-4">
|
||
<a class="text-decoration-none fw-semibold" href="#contact">Request details →</a>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<?php endforeach; ?>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
|
||
<section id="about" class="section-spacing border-top">
|
||
<div class="container">
|
||
<div class="row g-4 align-items-center">
|
||
<div class="col-lg-5">
|
||
<p class="text-uppercase text-muted small mb-2">About</p>
|
||
<h2 class="h3 fw-semibold">Design partner for teams that value clarity.</h2>
|
||
</div>
|
||
<div class="col-lg-7">
|
||
<p class="text-muted">I help teams translate complex ideas into calm, high-converting experiences. My workflow blends product strategy, UX research, and front-end build so every launch feels cohesive.</p>
|
||
<div class="row g-3 mt-3">
|
||
<div class="col-sm-6">
|
||
<div class="info-card p-3">
|
||
<p class="fw-semibold mb-1">Core services</p>
|
||
<ul class="text-muted small mb-0">
|
||
<li>Product discovery & UX audits</li>
|
||
<li>Design systems & component libraries</li>
|
||
<li>Responsive build (HTML/CSS/JS)</li>
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
<div class="col-sm-6">
|
||
<div class="info-card p-3">
|
||
<p class="fw-semibold mb-1">Typical engagement</p>
|
||
<ul class="text-muted small mb-0">
|
||
<li>2–6 week sprints</li>
|
||
<li>Async-first collaboration</li>
|
||
<li>Clear handoffs + launch support</li>
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
|
||
<section id="testimonials" class="section-spacing border-top">
|
||
<div class="container">
|
||
<div class="d-flex flex-column flex-md-row justify-content-between align-items-md-end gap-3 mb-4">
|
||
<div>
|
||
<p class="text-uppercase text-muted small mb-2">Testimonials</p>
|
||
<h2 class="h3 fw-semibold mb-0">Clients value the calm process.</h2>
|
||
</div>
|
||
<p class="text-muted mb-0">Short, actionable updates keep projects moving.</p>
|
||
</div>
|
||
<div class="row g-4">
|
||
<?php
|
||
$testimonials = [
|
||
['quote' => 'Their design system made every team faster. The handoff was flawless.', 'name' => 'Marina Lopez', 'role' => 'VP Product, Axon Labs'],
|
||
['quote' => 'We doubled onboarding completion in three weeks with the new flow.', 'name' => 'Jamie Chen', 'role' => 'Head of Growth, Meridian'],
|
||
['quote' => 'Clear communication, fast iteration, and a polished final build.', 'name' => 'Alex Reed', 'role' => 'Founder, Northwind'],
|
||
];
|
||
foreach ($testimonials as $item): ?>
|
||
<div class="col-md-4">
|
||
<div class="card h-100 border-0 shadow-sm">
|
||
<div class="card-body p-4">
|
||
<p class="text-muted">“<?= htmlspecialchars($item['quote']) ?>”</p>
|
||
<p class="fw-semibold mb-0"><?= htmlspecialchars($item['name']) ?></p>
|
||
<p class="text-muted small mb-0"><?= htmlspecialchars($item['role']) ?></p>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<?php endforeach; ?>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
|
||
<section id="contact" class="section-spacing border-top">
|
||
<div class="container">
|
||
<div class="row g-4 align-items-start">
|
||
<div class="col-lg-5">
|
||
<p class="text-uppercase text-muted small mb-2">Contact</p>
|
||
<h2 class="h3 fw-semibold">Let’s build your next launch.</h2>
|
||
<p class="text-muted">Share a few details and I’ll reply within 1–2 business days. For urgent requests, mention your timeline.</p>
|
||
<div class="alert alert-light border small mt-4" role="alert">
|
||
This form uses your SMTP settings. If email is not configured yet, please add MAIL_/SMTP_ values in <code>.env</code>.
|
||
</div>
|
||
</div>
|
||
<div class="col-lg-7">
|
||
<?php if ($successMessage): ?>
|
||
<div class="alert alert-success" role="alert"><?= htmlspecialchars($successMessage) ?></div>
|
||
<?php elseif ($errorMessage): ?>
|
||
<div class="alert alert-danger" role="alert"><?= htmlspecialchars($errorMessage) ?></div>
|
||
<?php endif; ?>
|
||
<form class="card border-0 shadow-sm p-4" method="post" action="#contact" novalidate>
|
||
<div class="row g-3">
|
||
<div class="col-md-6">
|
||
<label class="form-label" for="name">Name</label>
|
||
<input class="form-control <?= isset($formErrors['name']) ? 'is-invalid' : '' ?>" type="text" id="name" name="name" value="<?= htmlspecialchars($_POST['name'] ?? '') ?>" required>
|
||
<?php if (isset($formErrors['name'])): ?>
|
||
<div class="invalid-feedback"><?= htmlspecialchars($formErrors['name']) ?></div>
|
||
<?php endif; ?>
|
||
</div>
|
||
<div class="col-md-6">
|
||
<label class="form-label" for="email">Email</label>
|
||
<input class="form-control <?= isset($formErrors['email']) ? 'is-invalid' : '' ?>" type="email" id="email" name="email" value="<?= htmlspecialchars($_POST['email'] ?? '') ?>" required>
|
||
<?php if (isset($formErrors['email'])): ?>
|
||
<div class="invalid-feedback"><?= htmlspecialchars($formErrors['email']) ?></div>
|
||
<?php endif; ?>
|
||
</div>
|
||
<div class="col-12">
|
||
<label class="form-label" for="message">Project details</label>
|
||
<textarea class="form-control <?= isset($formErrors['message']) ? 'is-invalid' : '' ?>" id="message" name="message" rows="5" required><?= htmlspecialchars($_POST['message'] ?? '') ?></textarea>
|
||
<?php if (isset($formErrors['message'])): ?>
|
||
<div class="invalid-feedback"><?= htmlspecialchars($formErrors['message']) ?></div>
|
||
<?php endif; ?>
|
||
</div>
|
||
<div class="col-12 d-flex flex-column flex-sm-row gap-3 align-items-sm-center">
|
||
<button class="btn btn-dark px-4" type="submit">Email me</button>
|
||
<p class="text-muted small mb-0">By submitting, you agree to be contacted about your request.</p>
|
||
</div>
|
||
</div>
|
||
</form>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
</main>
|
||
|
||
<footer class="border-top py-4">
|
||
<div class="container d-flex flex-column flex-md-row justify-content-between align-items-md-center gap-2">
|
||
<p class="text-muted small mb-0">Available for select freelance projects in 2026.</p>
|
||
<p class="text-muted small mb-0">Last updated <?= htmlspecialchars($now) ?> UTC</p>
|
||
</div>
|
||
</footer>
|
||
|
||
<div class="toast-container position-fixed bottom-0 end-0 p-3">
|
||
<div id="statusToast" class="toast align-items-center text-bg-dark border-0" role="alert" aria-live="assertive" aria-atomic="true" data-show="<?= $successMessage ? 'true' : 'false' ?>">
|
||
<div class="d-flex">
|
||
<div class="toast-body">
|
||
<?= $successMessage ? htmlspecialchars($successMessage) : 'Thanks for reaching out!' ?>
|
||
</div>
|
||
<button type="button" class="btn-close btn-close-white me-2 m-auto" data-bs-dismiss="toast" aria-label="Close"></button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
|
||
<script src="assets/js/main.js?v=<?= htmlspecialchars((string) time()) ?>"></script>
|
||
</body>
|
||
</html>
|