204 lines
10 KiB
PHP
204 lines
10 KiB
PHP
<?php
|
|
require_once __DIR__ . '/includes/pexels.php';
|
|
|
|
// Fetch a professional hero image
|
|
$hero_image_query = 'modern workspace';
|
|
$hero_image_orientation = 'landscape';
|
|
$api_url = 'https://api.pexels.com/v1/search?query=' . urlencode($hero_image_query) . '&orientation=' . urlencode($hero_image_orientation) . '&per_page=1&page=1';
|
|
|
|
$hero_image_data = pexels_get($api_url);
|
|
$hero_image_url = 'https://picsum.photos/seed/hero/1600/900'; // Default fallback
|
|
|
|
if ($hero_image_data && !empty($hero_image_data['photos'])) {
|
|
$photo = $hero_image_data['photos'][0];
|
|
$src = $photo['src']['large2x'] ?? ($photo['src']['large'] ?? $photo['src']['original']);
|
|
$target_dir = __DIR__ . '/assets/images/pexels/';
|
|
$target_file = $target_dir . $photo['id'] . '.jpg';
|
|
|
|
// Download if it doesn't exist
|
|
if (!file_exists($target_file)) {
|
|
download_to($src, $target_file);
|
|
}
|
|
|
|
$hero_image_url = 'assets/images/pexels/' . $photo['id'] . '.jpg';
|
|
}
|
|
?>
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>John Doe - Personal Portfolio</title>
|
|
<meta name="description" content="A personal portfolio website for John Doe, showcasing work and providing a way to get in touch.">
|
|
<meta name="robots" content="index, follow">
|
|
|
|
<!-- Open Graph / Facebook -->
|
|
<meta property="og:type" content="website">
|
|
<meta property="og:url" content="https://your-domain.com/">
|
|
<meta property="og:title" content="John Doe - Personal Portfolio">
|
|
<meta property="og:description" content="A personal portfolio website for John Doe, showcasing work and providing a way to get in touch.">
|
|
<meta property="og:image" content="https://picsum.photos/seed/og/1200/630">
|
|
|
|
<!-- Twitter -->
|
|
<meta property="twitter:card" content="summary_large_image">
|
|
<meta property="twitter:url" content="https://your-domain.com/">
|
|
<meta property="twitter:title" content="John Doe - Personal Portfolio">
|
|
<meta property="twitter:description" content="A personal portfolio website for John Doe, showcasing work and providing a way to get in touch.">
|
|
<meta property="twitter:image" content="https://picsum.photos/seed/og/1200/630">
|
|
|
|
<!-- Favicon -->
|
|
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>JD</text></svg>">
|
|
|
|
<!-- Google Fonts -->
|
|
<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=Lato:wght@400;700&family=Poppins:wght@600;700&display=swap" rel="stylesheet">
|
|
|
|
<!-- Bootstrap CSS -->
|
|
<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">
|
|
|
|
<!-- Custom CSS -->
|
|
<link rel="stylesheet" href="assets/css/custom.css?v=<?php echo time(); ?>">
|
|
</head>
|
|
<body data-bs-spy="scroll" data-bs-target="#mainNav" data-bs-offset="56">
|
|
|
|
<!-- Navigation -->
|
|
<nav class="navbar navbar-expand-lg navbar-light bg-light fixed-top shadow-sm" id="mainNav">
|
|
<div class="container">
|
|
<a class="navbar-brand" href="#">John Doe</a>
|
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
|
|
<span class="navbar-toggler-icon"></span>
|
|
</button>
|
|
<div class="collapse navbar-collapse" id="navbarResponsive">
|
|
<ul class="navbar-nav ms-auto">
|
|
<li class="nav-item"><a class="nav-link" href="#hero">Home</a></li>
|
|
<li class="nav-item"><a class="nav-link" href="#about">About</a></li>
|
|
<li class="nav-item"><a class="nav-link" href="#portfolio">Portfolio</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="hero text-center" id="hero" style="background: linear-gradient(45deg, rgba(99, 102, 241, 0.8), rgba(236, 72, 153, 0.8)), url('<?php echo $hero_image_url; ?>') no-repeat center center; background-size: cover;">
|
|
<div class="container">
|
|
<h1 class="display-3 fw-bold">I'm John Doe</h1>
|
|
<p class="lead">A Creative Developer & Designer</p>
|
|
<a href="#portfolio" class="btn btn-light btn-lg">View My Work</a>
|
|
</div>
|
|
</header>
|
|
|
|
<!-- About Section -->
|
|
<section id="about">
|
|
<div class="container">
|
|
<h2 class="section-title">About Me</h2>
|
|
<div class="row align-items-center">
|
|
<div class="col-lg-4 text-center">
|
|
<img src="https://picsum.photos/seed/me/500/500" class="img-fluid rounded-circle shadow-lg" alt="A placeholder image for the site owner, John Doe.">
|
|
</div>
|
|
<div class="col-lg-8">
|
|
<p class="lead">Hello! I'm John Doe, a passionate and creative developer with a love for building beautiful and functional web applications. I specialize in front-end development and have a keen eye for design.</p>
|
|
<p>With over 5 years of experience in the industry, I have had the pleasure of working on a wide range of projects, from small business websites to large-scale enterprise applications. My goal is to create user-friendly interfaces that provide a seamless and enjoyable experience.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<!-- Portfolio Section -->
|
|
<section id="portfolio" class="bg-light">
|
|
<div class="container">
|
|
<h2 class="section-title">Portfolio</h2>
|
|
<div class="row g-4">
|
|
<div class="col-md-6 col-lg-4">
|
|
<div class="card portfolio-item">
|
|
<img src="https://picsum.photos/seed/p1/600/400" class="card-img-top" alt="Placeholder for portfolio project 1.">
|
|
<div class="card-body">
|
|
<h5 class="card-title">Project One</h5>
|
|
<p class="card-text">A brief description of the project, highlighting the technologies used and the problem it solves.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-6 col-lg-4">
|
|
<div class="card portfolio-item">
|
|
<img src="https://picsum.photos/seed/p2/600/400" class="card-img-top" alt="Placeholder for portfolio project 2.">
|
|
<div class="card-body">
|
|
<h5 class="card-title">Project Two</h5>
|
|
<p class="card-text">A brief description of the project, highlighting the technologies used and a problem it solves.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-6 col-lg-4">
|
|
<div class="card portfolio-item">
|
|
<img src="https://picsum.photos/seed/p3/600/400" class="card-img-top" alt="Placeholder for portfolio project 3.">
|
|
<div class="card-body">
|
|
<h5 class="card-title">Project Three</h5>
|
|
<p class="card-text">A brief description of the project, highlighting the technologies used and the problem it solves.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<!-- Testimonials Section -->
|
|
<section id="testimonials">
|
|
<div class="container">
|
|
<h2 class="section-title">Testimonials</h2>
|
|
<div class="row">
|
|
<div class="col-md-6 col-lg-4 mx-auto">
|
|
<div class="testimonial-card text-center">
|
|
<img src="https://picsum.photos/seed/t1/200/200" class="rounded-circle mx-auto mb-3" alt="Testimonial from Jane Smith.">
|
|
<p class="fst-italic">"John is an exceptional developer. He delivered a high-quality product on time and was a pleasure to work with."</p>
|
|
<p class="fw-bold">- Jane Smith, CEO of TechCorp</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<!-- Contact Section -->
|
|
<section id="contact" class="bg-light">
|
|
<div class="container">
|
|
<h2 class="section-title">Get In Touch</h2>
|
|
<div class="row">
|
|
<div class="col-lg-8 mx-auto">
|
|
<form id="contactForm">
|
|
<div class="mb-3">
|
|
<input type="text" class="form-control" placeholder="Your Name" required>
|
|
</div>
|
|
<div class="mb-3">
|
|
<input type="email" class="form-control" placeholder="Your Email" required>
|
|
</div>
|
|
<div class="mb-3">
|
|
<textarea class="form-control" rows="5" placeholder="Your Message" required></textarea>
|
|
</div>
|
|
<div class="text-center">
|
|
<button type="submit" class="btn btn-primary btn-lg">Send Message</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<!-- Footer -->
|
|
<footer class="text-center">
|
|
<div class="container">
|
|
<div class="mb-3">
|
|
<a href="#" class="fs-4 mx-2"><i class="bi bi-twitter"></i></a>
|
|
<a href="#" class="fs-4 mx-2"><i class="bi bi-linkedin"></i></a>
|
|
<a href="#" class="fs-4 mx-2"><i class="bi bi-github"></i></a>
|
|
</div>
|
|
<p class="mb-0">© <?php echo date("Y"); ?> John Doe. All Rights Reserved.</p>
|
|
</div>
|
|
</footer>
|
|
|
|
<!-- Bootstrap JS -->
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
|
|
<!-- Custom JS -->
|
|
<script src="assets/js/main.js?v=<?php echo time(); ?>"></script>
|
|
</body>
|
|
</html>
|