This commit is contained in:
Flatlogic Bot 2025-09-19 15:59:19 +00:00
parent 2ee49ee606
commit c31e51171e
5 changed files with 355 additions and 124 deletions

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

@ -0,0 +1,117 @@
:root {
--primary-color: #6366F1;
--secondary-color: #EC4899;
--background-color: #F9FAFB;
--surface-color: #FFFFFF;
--text-color: #1F2937;
--border-radius: 0.5rem;
}
body {
font-family: 'Lato', sans-serif;
color: var(--text-color);
background-color: var(--background-color);
}
h1, h2, h3, h4, h5, h6 {
font-family: 'Poppins', sans-serif;
font-weight: 700;
}
.navbar-brand, .nav-link {
font-family: 'Poppins', sans-serif;
}
.btn-primary {
background-color: var(--primary-color);
border-color: var(--primary-color);
border-radius: var(--border-radius);
padding: 0.75rem 1.5rem;
font-weight: 600;
}
.btn-primary:hover {
background-color: #4F46E5;
border-color: #4F46E5;
}
.btn-secondary {
background-color: var(--secondary-color);
border-color: var(--secondary-color);
border-radius: var(--border-radius);
padding: 0.75rem 1.5rem;
font-weight: 600;
}
.btn-secondary:hover {
background-color: #DB2777;
border-color: #DB2777;
}
.hero {
color: white;
padding: 10rem 0;
}
.hero h1 {
font-size: 3.5rem;
}
section {
padding: 5rem 0;
}
.section-title {
text-align: center;
margin-bottom: 3rem;
font-size: 2.5rem;
}
.card {
border: none;
border-radius: var(--border-radius);
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
transition: transform 0.3s;
}
.card:hover {
transform: translateY(-5px);
}
.portfolio-item img {
border-radius: var(--border-radius) var(--border-radius) 0 0;
}
.testimonial-card {
background-color: var(--surface-color);
padding: 2rem;
border-radius: var(--border-radius);
text-align: center;
}
.testimonial-card img {
width: 80px;
height: 80px;
border-radius: 50%;
margin-bottom: 1rem;
}
.form-control {
border-radius: var(--border-radius);
}
footer {
background-color: var(--text-color);
color: var(--background-color);
padding: 3rem 0;
}
footer a {
color: var(--background-color);
text-decoration: none;
}
footer a:hover {
color: var(--primary-color);
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 KiB

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

@ -0,0 +1,12 @@
document.addEventListener('DOMContentLoaded', function () {
// Smooth scrolling for anchor links
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener('click', function (e) {
e.preventDefault();
document.querySelector(this.getAttribute('href')).scrollIntoView({
behavior: 'smooth'
});
});
});
});

29
includes/pexels.php Normal file
View File

@ -0,0 +1,29 @@
<?php
function pexels_key() {
$k = getenv('PEXELS_KEY');
return $k && strlen($k) > 0 ? $k : 'Vc99rnmOhHhJAbgGQoKLZtsaIVfkeownoQNbTj78VemUjKh08ZYRbf18';
}
function pexels_get($url) {
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [ 'Authorization: '. pexels_key() ],
CURLOPT_TIMEOUT => 15,
]);
$resp = curl_exec($ch);
$code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($code >= 200 && $code < 300 && $resp) return json_decode($resp, true);
return null;
}
function download_to($srcUrl, $destPath) {
$data = file_get_contents($srcUrl);
if ($data === false) return false;
if (!is_dir(dirname($destPath))) {
mkdir(dirname($destPath), 0775, true);
}
return file_put_contents($destPath, $data) !== false;
}

321
index.php
View File

@ -1,131 +1,204 @@
<?php
declare(strict_types=1);
@ini_set('display_errors', '1');
@error_reporting(E_ALL);
@date_default_timezone_set('UTC');
require_once __DIR__ . '/includes/pexels.php';
$phpVersion = PHP_VERSION;
$now = date('Y-m-d H:i:s');
// 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>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>New Style</title>
<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;700&display=swap" rel="stylesheet">
<style>
: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>
<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>
<main>
<div class="card">
<h1>Analyzing your requirements and generating your website…</h1>
<div class="loader" role="status" aria-live="polite" aria-label="Applying initial changes">
<span class="sr-only">Loading…</span>
</div>
<p class="hint"><?= ($_SERVER['HTTP_HOST'] ?? '') === 'appwizzy.com' ? 'AppWiZZy' : 'Flatlogic' ?> AI is collecting your requirements and applying the first changes.</p>
<p class="hint">This page will update automatically as the plan is implemented.</p>
<p>Runtime: PHP <code><?= htmlspecialchars($phpVersion) ?></code> — UTC <code><?= htmlspecialchars($now) ?></code></p>
</div>
</main>
<footer>
Page updated: <?= htmlspecialchars($now) ?> (UTC)
</footer>
<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">&copy; <?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>
</html>