Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aa3b01e956 |
67
assets/css/custom.css
Normal file
67
assets/css/custom.css
Normal file
@ -0,0 +1,67 @@
|
||||
|
||||
:root {
|
||||
--primary-color: #6366F1;
|
||||
--secondary-color: #EC4899;
|
||||
--background-color: #F8FAFC;
|
||||
--surface-color: #FFFFFF;
|
||||
--text-color: #0F172A;
|
||||
--heading-font: 'Georgia', serif;
|
||||
--body-font: 'Inter', sans-serif;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: var(--body-font);
|
||||
background-color: var(--background-color);
|
||||
color: var(--text-color);
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
font-family: var(--heading-font);
|
||||
}
|
||||
|
||||
.gradient-text {
|
||||
background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background-color: var(--primary-color);
|
||||
border-color: var(--primary-color);
|
||||
padding: 0.75rem 1.5rem;
|
||||
border-radius: 9999px;
|
||||
font-weight: 600;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.btn-primary:hover {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 10px 20px -10px var(--primary-color);
|
||||
}
|
||||
|
||||
.section {
|
||||
padding: 6rem 0;
|
||||
}
|
||||
|
||||
.glassmorphism {
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
border-radius: 16px;
|
||||
box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
|
||||
backdrop-filter: blur(5px);
|
||||
-webkit-backdrop-filter: blur(5px);
|
||||
border: 1px solid rgba(255, 255, 255, 0.3);
|
||||
}
|
||||
|
||||
.nav-link {
|
||||
transition: color 0.3s;
|
||||
}
|
||||
|
||||
.nav-link:hover {
|
||||
color: var(--primary-color) !important;
|
||||
}
|
||||
|
||||
.card {
|
||||
border: none;
|
||||
border-radius: 0.5rem;
|
||||
box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
|
||||
}
|
||||
13
assets/js/main.js
Normal file
13
assets/js/main.js
Normal file
@ -0,0 +1,13 @@
|
||||
|
||||
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'
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
19
db/migrate.php
Normal file
19
db/migrate.php
Normal file
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
require_once __DIR__ . '/config.php';
|
||||
|
||||
try {
|
||||
$pdo = db();
|
||||
$sql = "
|
||||
CREATE TABLE IF NOT EXISTS `contact_submissions` (
|
||||
`id` INT AUTO_INCREMENT PRIMARY KEY,
|
||||
`name` VARCHAR(255) NOT NULL,
|
||||
`email` VARCHAR(255) NOT NULL,
|
||||
`message` TEXT NOT NULL,
|
||||
`created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||
) ENGINE=INNODB;
|
||||
";
|
||||
$pdo->exec($sql);
|
||||
echo "Table 'contact_submissions' created successfully." . PHP_EOL;
|
||||
} catch (PDOException $e) {
|
||||
die("DB ERROR: " . $e->getMessage());
|
||||
}
|
||||
335
index.php
335
index.php
@ -1,150 +1,219 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
@ini_set('display_errors', '1');
|
||||
@error_reporting(E_ALL);
|
||||
@date_default_timezone_set('UTC');
|
||||
session_start();
|
||||
$message = '';
|
||||
if (isset($_SESSION['message'])) {
|
||||
$message = $_SESSION['message'];
|
||||
unset($_SESSION['message']);
|
||||
}
|
||||
|
||||
$phpVersion = PHP_VERSION;
|
||||
$now = date('Y-m-d H:i:s');
|
||||
if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
||||
require_once __DIR__ . '/db/config.php';
|
||||
require_once __DIR__ . '/mail/MailService.php';
|
||||
|
||||
$name = filter_input(INPUT_POST, 'name', FILTER_SANITIZE_STRING);
|
||||
$email = filter_input(INPUT_POST, 'email', FILTER_VALIDATE_EMAIL);
|
||||
$message_body = filter_input(INPUT_POST, 'message', FILTER_SANITIZE_STRING);
|
||||
|
||||
if ($name && $email && $message_body) {
|
||||
try {
|
||||
$pdo = db();
|
||||
$sql = "INSERT INTO contact_submissions (name, email, message) VALUES (?, ?, ?)";
|
||||
$stmt = $pdo->prepare($sql);
|
||||
$stmt->execute([$name, $email, $message_body]);
|
||||
|
||||
// Send email notification
|
||||
$to = getenv('MAIL_TO') ?: null;
|
||||
$subject = 'New Contact Form Submission';
|
||||
$htmlBody = "
|
||||
<h1>New Contact Form Submission</h1>
|
||||
<p><strong>Name:</strong> {$name}</p>
|
||||
<p><strong>Email:</strong> {$email}</p>
|
||||
<p><strong>Message:</strong></p>
|
||||
<p>{$message_body}</p>
|
||||
";
|
||||
$textBody = "Name: {$name}\nEmail: {$email}\nMessage:\n{$message_body}";
|
||||
|
||||
MailService::sendMail($to, $subject, $htmlBody, $textBody, ['reply_to' => $email]);
|
||||
|
||||
$_SESSION['message'] = '<div class="alert alert-success">Thank you for your message. It has been sent.</div>';
|
||||
} catch (PDOException $e) {
|
||||
$_SESSION['message'] = '<div class="alert alert-danger">There was a database error. Please try again later.</div>';
|
||||
} catch (Exception $e) {
|
||||
$_SESSION['message'] = '<div class="alert alert-danger">There was an error sending the email. Please try again later.</div>';
|
||||
}
|
||||
} else {
|
||||
$_SESSION['message'] = '<div class="alert alert-danger">Please fill out all fields correctly.</div>';
|
||||
}
|
||||
header("Location: index.php#contact");
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
<!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>
|
||||
<?php
|
||||
// Read project preview data from environment
|
||||
$projectDescription = $_SERVER['PROJECT_DESCRIPTION'] ?? '';
|
||||
$projectImageUrl = $_SERVER['PROJECT_IMAGE_URL'] ?? '';
|
||||
?>
|
||||
<?php if ($projectDescription): ?>
|
||||
<!-- Meta description -->
|
||||
<meta name="description" content='<?= htmlspecialchars($projectDescription) ?>' />
|
||||
<!-- Open Graph meta tags -->
|
||||
<meta property="og:description" content="<?= htmlspecialchars($projectDescription) ?>" />
|
||||
<!-- Twitter meta tags -->
|
||||
<meta property="twitter:description" content="<?= htmlspecialchars($projectDescription) ?>" />
|
||||
<?php endif; ?>
|
||||
<?php if ($projectImageUrl): ?>
|
||||
<!-- Open Graph image -->
|
||||
<meta property="og:image" content="<?= htmlspecialchars($projectImageUrl) ?>" />
|
||||
<!-- Twitter image -->
|
||||
<meta property="twitter:image" content="<?= htmlspecialchars($projectImageUrl) ?>" />
|
||||
<?php endif; ?>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<!-- SEO Meta Tags -->
|
||||
<title>new lamp stack</title>
|
||||
<meta name="description" content="New Lamp Stack: Streamline your web development projects with an efficient, integrated solution for dynamic websites.">
|
||||
<meta name="keywords" content="lamp stack development, web application development, personal landing page, php development, dynamic websites, modern web design, responsive design, web development solution, portfolio website, contact form integration">
|
||||
|
||||
<!-- Open Graph / Facebook -->
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:title" content="new lamp stack">
|
||||
<meta property="og:description" content="New Lamp Stack: Streamline your web development projects with an efficient, integrated solution for dynamic websites.">
|
||||
<meta property="og:image" content="https://project-screens.s3.amazonaws.com/screenshots/34548/app-hero-20251001-095254.png">
|
||||
|
||||
<!-- Twitter -->
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:image" content="https://project-screens.s3.amazonaws.com/screenshots/34548/app-hero-20251001-095254.png">
|
||||
|
||||
<!-- Stylesheets -->
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
<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>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&family=Georgia&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="assets/css/custom.css?v=<?php echo time(); ?>">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- Header -->
|
||||
<header class="navbar navbar-expand-lg navbar-light bg-light sticky-top">
|
||||
<div class="container">
|
||||
<a class="navbar-brand fw-bold" href="#">MyProject</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="#home">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>
|
||||
</header>
|
||||
|
||||
<main>
|
||||
<!-- Hero Section -->
|
||||
<section id="home" class="section text-center" style="background-image: url('https://picsum.photos/seed/hero/1600/900'); background-size: cover; background-position: center; min-height: 90vh; display: flex; align-items: center;">
|
||||
<div class="container glassmorphism p-5">
|
||||
<h1 class="display-3 fw-bold">Welcome to <span class="gradient-text">My New App</span></h1>
|
||||
<p class="lead my-4">A modern, responsive landing page built on the LAMP stack.</p>
|
||||
<a href="#contact" class="btn btn-primary btn-lg">Get in Touch</a>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- About Section -->
|
||||
<section id="about" class="section">
|
||||
<div class="container">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-lg-6">
|
||||
<h2 class="mb-4">About Me</h2>
|
||||
<p>This is a space to tell your story. Who are you? What do you do? What are you passionate about? Keep it concise and engaging.</p>
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
|
||||
</div>
|
||||
<div class="col-lg-6 text-center">
|
||||
<img src="https://picsum.photos/seed/about/500/500" class="img-fluid rounded-circle" alt="A portrait of the site owner.">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Portfolio Section -->
|
||||
<section id="portfolio" class="section bg-light">
|
||||
<div class="container">
|
||||
<h2 class="text-center mb-5">My Work</h2>
|
||||
<div class="row">
|
||||
<div class="col-md-6 mb-4">
|
||||
<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>
|
||||
<img src="https://picsum.photos/seed/work1/800/600" class="card-img-top" alt="Placeholder for a portfolio project.">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">Project One</h5>
|
||||
<p class="card-text">A brief description of the project, its purpose, and the technologies used.</p>
|
||||
</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>
|
||||
</div>
|
||||
<div class="col-md-6 mb-4">
|
||||
<div class="card">
|
||||
<img src="https://picsum.photos/seed/work2/800/600" class="card-img-top" alt="Placeholder for another portfolio project.">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">Project Two</h5>
|
||||
<p class="card-text">A brief description of the project, its purpose, and the technologies used.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Testimonials Section -->
|
||||
<section id="testimonials" class="section">
|
||||
<div class="container">
|
||||
<h2 class="text-center mb-5">What People Are Saying</h2>
|
||||
<div class="row">
|
||||
<div class="col-md-4 text-center">
|
||||
<img src="https://picsum.photos/seed/face1/100/100" class="rounded-circle mb-3" alt="A testimonial provider's face.">
|
||||
<p class="fst-italic">"This is a fantastic service! Highly recommended."</p>
|
||||
<p class="fw-bold">- Jane Doe</p>
|
||||
</div>
|
||||
<div class="col-md-4 text-center">
|
||||
<img src="https://picsum.photos/seed/face2/100/100" class="rounded-circle mb-3" alt="A testimonial provider's face.">
|
||||
<p class="fst-italic">"Incredible results and a pleasure to work with."</p>
|
||||
<p class="fw-bold">- John Smith</p>
|
||||
</div>
|
||||
<div class="col-md-4 text-center">
|
||||
<img src="https://picsum.photos/seed/face3/100/100" class="rounded-circle mb-3" alt="A testimonial provider's face.">
|
||||
<p class="fst-italic">"A game-changer for our business."</p>
|
||||
<p class="fw-bold">- Sam Wilson</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Contact Section -->
|
||||
<section id="contact" class="section bg-light">
|
||||
<div class="container">
|
||||
<h2 class="text-center mb-5">Contact Me</h2>
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-lg-6">
|
||||
<?php if ($message): ?>
|
||||
<?php echo $message; ?>
|
||||
<?php endif; ?>
|
||||
<form method="POST" action="index.php#contact">
|
||||
<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</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>
|
||||
<button type="submit" class="btn btn-primary">Send Message</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
<footer>
|
||||
Page updated: <?= htmlspecialchars($now) ?> (UTC)
|
||||
|
||||
<!-- Footer -->
|
||||
<footer class="py-4 bg-dark text-white text-center">
|
||||
<div class="container">
|
||||
<p class="mb-0">Copyright © <?php echo date('Y'); ?> MyProject. All Rights Reserved.</p>
|
||||
<a href="privacy.php" class="text-white">Privacy Policy</a>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<!-- Scripts -->
|
||||
<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>
|
||||
|
||||
19
privacy.php
Normal file
19
privacy.php
Normal file
@ -0,0 +1,19 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Privacy Policy - new lamp stack</title>
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="assets/css/custom.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container py-5">
|
||||
<h1>Privacy Policy</h1>
|
||||
<p>This is a placeholder for your privacy policy.</p>
|
||||
<p>Information on how you collect, use, and disclose user data should be detailed here.</p>
|
||||
<a href="/" class="btn btn-primary">Go back home</a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
x
Reference in New Issue
Block a user