Compare commits

...

1 Commits

Author SHA1 Message Date
Flatlogic Bot
d43c563e28 haki fine job raw version 2025-11-17 18:36:39 +00:00
6 changed files with 302 additions and 144 deletions

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

@ -0,0 +1,70 @@
body {
font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
background-color: #F8F9FA;
color: #343A40;
}
.navbar {
box-shadow: 0 2px 4px rgba(0,0,0,.05);
}
.hero {
background: linear-gradient(45deg, #0A74DA, #17A2B8);
color: white;
padding: 6rem 1rem;
}
.hero h1 {
font-weight: 700;
}
.btn-primary {
background-color: #0A74DA;
border-color: #0A74DA;
padding: 0.75rem 1.5rem;
border-radius: 0.5rem;
font-weight: 600;
}
.btn-primary:hover {
background-color: #085dab;
border-color: #085dab;
}
.section {
padding: 4rem 1rem;
}
.feature-icon {
font-size: 3rem;
color: #0A74DA;
}
.card {
border: none;
border-radius: 0.5rem;
box-shadow: 0 4px 12px rgba(0,0,0,.08);
transition: transform .2s;
}
.card:hover {
transform: translateY(-5px);
}
.form-control {
border-radius: 0.5rem;
padding: 0.75rem;
}
.form-control:focus {
box-shadow: 0 0 0 0.25rem rgba(10, 116, 218, 0.25);
border-color: #0A74DA;
}
.toast-container {
position: fixed;
top: 20px;
right: 20px;
z-index: 1090;
}

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

@ -0,0 +1 @@
// Custom JavaScript will go here

28
contact.php Normal file
View File

@ -0,0 +1,28 @@
<?php
require_once __DIR__ . '/mail/MailService.php';
$name = $_POST['name'] ?? 'Anonymous';
$school = $_POST['school'] ?? 'Not provided';
$email = $_POST['email'] ?? '';
$message = $_POST['message'] ?? '';
if (empty($email) || empty($message) || !filter_var($email, FILTER_VALIDATE_EMAIL)) {
header('Location: index.php?status=error');
exit;
}
$body = "New contact form submission:\n\nName: {$name}\nSchool: {$school}\nEmail: {$email}\n\nMessage:\n{$message}";
// The MAIL_TO environment variable should be set to the desired recipient.
// If not set, it will fall back to MAIL_FROM.
$res = MailService::sendMail(null, 'New Contact Form Submission', nl2br($body), $body, ['reply_to' => $email]);
if (!empty($res['success'])) {
header('Location: index.php?status=success#contact');
} else {
// In a real app, you would log the error.
// error_log('MailService Error: ' . $res['error']);
header('Location: index.php?status=error#contact');
}
exit;

303
index.php
View File

@ -1,150 +1,165 @@
<?php
declare(strict_types=1);
@ini_set('display_errors', '1');
@error_reporting(E_ALL);
@date_default_timezone_set('UTC');
$phpVersion = PHP_VERSION;
$now = date('Y-m-d H:i:s');
?>
<!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; ?>
<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>Haki Scheduling Master</title>
<meta name="description" content="The modern timetable solution for schools. Automated scheduling, easy administration, and teacher collaboration.">
<meta name="keywords" content="timetable app, school scheduling, class scheduler, teacher timetable, automated scheduling, subscription software, education technology, school administration, lesson planner, kenya schools, mpesa integration, Built with Flatlogic Generator">
<!-- Open Graph / Facebook -->
<meta property="og:type" content="website">
<meta property="og:title" content="Haki Scheduling Master">
<meta property="og:description" content="The modern timetable solution for schools. Automated scheduling, easy administration, and teacher collaboration.">
<meta property="og:image" content="<?php echo htmlspecialchars($_SERVER['PROJECT_IMAGE_URL'] ?? '', ENT_QUOTES, 'UTF-8'); ?>">
<!-- Twitter -->
<meta property="twitter:card" content="summary_large_image">
<meta property="twitter:title" content="Haki Scheduling Master">
<meta property="twitter:description" content="The modern timetable solution for schools. Automated scheduling, easy administration, and teacher collaboration.">
<meta property="twitter:image" content="<?php echo htmlspecialchars($_SERVER['PROJECT_IMAGE_URL'] ?? '', ENT_QUOTES, 'UTF-8'); ?>">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
<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;600;700&display=swap" rel="stylesheet">
<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>
<nav class="navbar navbar-expand-lg navbar-light bg-white sticky-top">
<div class="container">
<a class="navbar-brand fw-bold" href="#">Haki Scheduling Master</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="#features">Features</a></li>
<li class="nav-item"><a class="nav-link" href="#demo">Demo</a></li>
<li class="nav-item"><a class="nav-link" href="#contact">Contact</a></li>
<li class="nav-item"><a class="nav-link" href="login.php">Login</a></li>
<li class="nav-item ms-lg-2"><a class="btn btn-primary" href="register.php">Sign Up</a></li>
</ul>
</div>
</div>
</nav>
<header class="hero text-center">
<div class="container">
<h1 class="display-4">The Modern Timetable Solution for Schools</h1>
<p class="lead my-4">Automate scheduling, simplify administration, and empower your teachers. All in one place.</p>
<a href="register.php" class="btn btn-primary btn-lg">Get Started for Free</a>
</div>
</header>
<section id="features" class="section">
<div class="container text-center">
<h2 class="mb-5">Why Choose Us?</h2>
<div class="row">
<div class="col-md-4 mb-4">
<div class="card p-4 h-100">
<i class="bi bi-calendar-check feature-icon mb-3"></i>
<h4>Automated Scheduling</h4>
<p>Our intelligent engine generates conflict-free class and teacher timetables in minutes, not days.</p>
</div>
</div>
<div class="col-md-4 mb-4">
<div class="card p-4 h-100">
<i class="bi bi-person-badge feature-icon mb-3"></i>
<h4>Easy Administration</h4>
<p>Manage classes, subjects, teachers, and workloads from a simple, intuitive dashboard.</p>
</div>
</div>
<div class="col-md-4 mb-4">
<div class="card p-4 h-100">
<i class="bi bi-people feature-icon mb-3"></i>
<h4>Teacher Collaboration</h4>
<p>Allow teachers to view their schedules, manage workloads, and stay informed with in-app notifications.</p>
</div>
</div>
</div>
</div>
</section>
<section id="demo" class="section bg-white">
<div class="container text-center">
<h2 class="mb-4">See It in Action</h2>
<p class="lead mb-5">A full public demo and feature tour is coming soon.</p>
<div class="card p-5">
<i class="bi bi-camera-video" style="font-size: 4rem; color: #17A2B8;"></i>
<h4 class="mt-3">Demo Coming Soon</h4>
</div>
</div>
</section>
<section id="contact" class="section">
<div class="container">
<div class="row justify-content-center">
<div class="col-lg-8 text-center">
<h2 class="mb-4">Get in Touch</h2>
<p class="lead mb-5">Have questions? We'd love to hear from you. Fill out the form below and we'll get back to you shortly.</p>
<form action="contact.php" method="POST">
<div class="row">
<div class="col-md-6 mb-3">
<input type="text" class="form-control" name="name" placeholder="Your Name" required>
</div>
<div class="col-md-6 mb-3">
<input type="text" class="form-control" name="school" placeholder="School Name" required>
</div>
</div>
<div class="mb-3">
<input type="email" class="form-control" name="email" placeholder="Your Email Address" required>
</div>
<div class="mb-4">
<textarea class="form-control" name="message" rows="5" placeholder="Your Message" required></textarea>
</div>
<button type="submit" class="btn btn-primary btn-lg">Send Message</button>
</form>
</div>
</div>
</div>
</section>
<footer class="bg-white py-4 mt-auto">
<div class="container text-center">
<p class="text-muted mb-0">&copy; <?php echo date("Y"); ?> Haki Scheduling Master. All Rights Reserved.</p>
</div>
</footer>
<div class="toast-container">
<div id="notificationToast" class="toast" role="alert" aria-live="assertive" aria-atomic="true">
<div class="toast-header">
<strong class="me-auto">Notification</strong>
<button type="button" class="btn-close" data-bs-dismiss="toast" aria-label="Close"></button>
</div>
<div class="toast-body">
</div>
</div>
</div>
</main>
<footer>
Page updated: <?= htmlspecialchars($now) ?> (UTC)
</footer>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous"></script>
<script src="assets/js/main.js?v=<?php echo time(); ?>"></script>
<script>
document.addEventListener('DOMContentLoaded', function () {
const urlParams = new URLSearchParams(window.location.search);
const status = urlParams.get('status');
const toastEl = document.getElementById('notificationToast');
if (status && toastEl) {
const toast = new bootstrap.Toast(toastEl);
const toastBody = toastEl.querySelector('.toast-body');
if (status === 'success') {
toastBody.textContent = 'Thank you for your message! We will get back to you shortly.';
toastEl.classList.add('bg-success', 'text-white');
} else if (status === 'error') {
toastBody.textContent = 'There was an error sending your message. Please try again.';
toastEl.classList.add('bg-danger', 'text-white');
}
toast.show();
}
});
</script>
</body>
</html>
</html>

22
login.php Normal file
View File

@ -0,0 +1,22 @@
<?php
// Placeholder for login page
header('Content-Type: text/html; charset=utf-8');
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Login - Haki Scheduling Master</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="assets/css/custom.css?v=<?php echo time(); ?>">
</head>
<body>
<div class="d-flex flex-column justify-content-center align-items-center vh-100 text-center">
<h1 class="display-4">Login Page Coming Soon</h1>
<p class="lead">This is where school administrators and teachers will access their timetables.</p>
<a href="index.php" class="btn btn-primary mt-3">Go Back to Homepage</a>
</div>
</body>
</html>

22
register.php Normal file
View File

@ -0,0 +1,22 @@
<?php
// Placeholder for registration page
header('Content-Type: text/html; charset=utf-8');
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Register - Haki Scheduling Master</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="assets/css/custom.css?v=<?php echo time(); ?>">
</head>
<body>
<div class="d-flex flex-column justify-content-center align-items-center vh-100 text-center">
<h1 class="display-4">Registration Coming Soon</h1>
<p class="lead">We are putting the final touches on our self-serve registration system.</p>
<a href="index.php" class="btn btn-primary mt-3">Go Back to Homepage</a>
</div>
</body>
</html>