v2
This commit is contained in:
parent
dff90ca5a2
commit
5acb599929
152
assets/css/custom.css
Normal file
152
assets/css/custom.css
Normal file
@ -0,0 +1,152 @@
|
|||||||
|
/* Aperture - Custom Styles */
|
||||||
|
:root {
|
||||||
|
--bg-dark: #0D1117;
|
||||||
|
--surface: #161B22;
|
||||||
|
--primary: #58A6FF;
|
||||||
|
--primary-darker: #3081F7;
|
||||||
|
--text-primary: #C9D1D9;
|
||||||
|
--text-headings: #F0F6FC;
|
||||||
|
--border-color: #30363d;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
background-color: var(--bg-dark);
|
||||||
|
color: var(--text-primary);
|
||||||
|
font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1, h2, h3, h4, h5, h6 {
|
||||||
|
color: var(--text-headings);
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar {
|
||||||
|
background-color: rgba(13, 17, 23, 0.8);
|
||||||
|
backdrop-filter: blur(10px);
|
||||||
|
border-bottom: 1px solid var(--border-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-brand {
|
||||||
|
font-weight: 700;
|
||||||
|
color: var(--text-headings);
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav-link {
|
||||||
|
color: var(--text-primary);
|
||||||
|
}
|
||||||
|
.nav-link:hover {
|
||||||
|
color: var(--text-headings);
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-primary {
|
||||||
|
background-image: linear-gradient(45deg, var(--primary), var(--primary-darker));
|
||||||
|
border: none;
|
||||||
|
border-radius: 0.75rem;
|
||||||
|
font-weight: 600;
|
||||||
|
padding: 0.75rem 1.5rem;
|
||||||
|
transition: transform 0.2s ease-in-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-primary:hover {
|
||||||
|
transform: translateY(-2px);
|
||||||
|
box-shadow: 0 4px 20px rgba(88, 166, 255, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-secondary {
|
||||||
|
background-color: var(--surface);
|
||||||
|
border: 1px solid var(--border-color);
|
||||||
|
color: var(--text-headings);
|
||||||
|
border-radius: 0.75rem;
|
||||||
|
font-weight: 600;
|
||||||
|
padding: 0.75rem 1.5rem;
|
||||||
|
}
|
||||||
|
.btn-secondary:hover {
|
||||||
|
background-color: #21262d;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hero {
|
||||||
|
padding: 8rem 0;
|
||||||
|
background-image: url('https://picsum.photos/seed/aperture-hero/1600/900');
|
||||||
|
background-size: cover;
|
||||||
|
background-position: center;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hero::before {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
background: rgba(13, 17, 23, 0.7);
|
||||||
|
}
|
||||||
|
|
||||||
|
.hero .container {
|
||||||
|
position: relative;
|
||||||
|
z-index: 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.section {
|
||||||
|
padding: 6rem 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.feature-card, .offer-explorer-card {
|
||||||
|
background-color: var(--surface);
|
||||||
|
border: 1px solid var(--border-color);
|
||||||
|
border-radius: 0.75rem;
|
||||||
|
padding: 2rem;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-proof img {
|
||||||
|
filter: grayscale(100%) contrast(0.5);
|
||||||
|
opacity: 0.6;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
max-height: 40px;
|
||||||
|
}
|
||||||
|
.social-proof img:hover {
|
||||||
|
filter: none;
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-control, .form-select {
|
||||||
|
background-color: var(--bg-dark);
|
||||||
|
border-color: var(--border-color);
|
||||||
|
color: var(--text-primary);
|
||||||
|
}
|
||||||
|
.form-control:focus, .form-select:focus {
|
||||||
|
background-color: var(--bg-dark);
|
||||||
|
border-color: var(--primary);
|
||||||
|
color: var(--text-primary);
|
||||||
|
box-shadow: 0 0 0 0.25rem rgba(88, 166, 255, 0.25);
|
||||||
|
}
|
||||||
|
|
||||||
|
.table {
|
||||||
|
--bs-table-bg: var(--surface);
|
||||||
|
--bs-table-striped-bg: #21262d;
|
||||||
|
--bs-table-color: var(--text-primary);
|
||||||
|
--bs-table-border-color: var(--border-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer {
|
||||||
|
background-color: var(--surface);
|
||||||
|
padding: 3rem 0;
|
||||||
|
border-top: 1px solid var(--border-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Contact Form Status */
|
||||||
|
#contact-form-status p {
|
||||||
|
margin-bottom: 0;
|
||||||
|
text-align: center;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
.text-success {
|
||||||
|
color: #28a745 !important;
|
||||||
|
}
|
||||||
|
.text-danger {
|
||||||
|
color: #dc3545 !important;
|
||||||
|
}
|
||||||
|
.text-info {
|
||||||
|
color: #0dcaf0 !important;
|
||||||
|
}
|
||||||
97
assets/js/main.js
Normal file
97
assets/js/main.js
Normal file
@ -0,0 +1,97 @@
|
|||||||
|
document.addEventListener('DOMContentLoaded', function () {
|
||||||
|
const offerForm = document.getElementById('offer-explorer-form');
|
||||||
|
const resultsTableBody = document.getElementById('offer-results-body');
|
||||||
|
|
||||||
|
const mockOffers = [
|
||||||
|
{ provider: 'AWS', gpu: 'H100', region: 'us-east-1', price: 2.10, spot: true },
|
||||||
|
{ provider: 'GCP', gpu: 'H100', region: 'us-central1', price: 2.25, spot: true },
|
||||||
|
{ provider: 'Azure', gpu: 'H100', region: 'eastus', price: 2.30, spot: false },
|
||||||
|
{ provider: 'CoreWeave', gpu: 'H100', region: 'us-east', price: 1.89, spot: false },
|
||||||
|
{ provider: 'RunPod', gpu: 'H100', region: 'us-east', price: 1.79, spot: true },
|
||||||
|
{ provider: 'AWS', gpu: 'A100', region: 'us-west-2', price: 1.10, spot: true },
|
||||||
|
{ provider: 'GCP', gpu: 'A100', region: 'us-east4', price: 1.20, spot: true },
|
||||||
|
{ provider: 'Vast.ai', gpu: 'A100', region: 'us-west', price: 0.95, spot: true },
|
||||||
|
{ provider: 'AWS', gpu: 'RTX 4090', region: 'eu-west-1', price: 0.70, spot: true },
|
||||||
|
{ provider: 'RunPod', gpu: 'RTX 4090', region: 'eu-central-1', price: 0.65, spot: true },
|
||||||
|
];
|
||||||
|
|
||||||
|
if (offerForm) {
|
||||||
|
offerForm.addEventListener('submit', function (e) {
|
||||||
|
e.preventDefault();
|
||||||
|
|
||||||
|
const gpuType = document.getElementById('gpuType').value;
|
||||||
|
const spotOk = document.getElementById('spotOk').checked;
|
||||||
|
|
||||||
|
const filteredOffers = mockOffers.filter(offer => {
|
||||||
|
const gpuMatch = gpuType === 'any' || offer.gpu === gpuType;
|
||||||
|
const spotMatch = !spotOk || offer.spot === true;
|
||||||
|
return gpuMatch && spotMatch;
|
||||||
|
});
|
||||||
|
|
||||||
|
renderResults(filteredOffers);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function renderResults(offers) {
|
||||||
|
if (!resultsTableBody) return;
|
||||||
|
|
||||||
|
resultsTableBody.innerHTML = '';
|
||||||
|
|
||||||
|
if (offers.length === 0) {
|
||||||
|
resultsTableBody.innerHTML = '<tr><td colspan="5" class="text-center">No matching offers found.</td></tr>';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
offers.forEach(offer => {
|
||||||
|
const row = `
|
||||||
|
<tr>
|
||||||
|
<td>${offer.provider}</td>
|
||||||
|
<td>${offer.gpu}</td>
|
||||||
|
<td>${offer.region}</td>
|
||||||
|
<td>$${offer.price.toFixed(2)}</td>
|
||||||
|
<td>${offer.spot ? '<span class="badge bg-success">Yes</span>' : '<span class="badge bg-warning text-dark">No</span>'}</td>
|
||||||
|
</tr>
|
||||||
|
`;
|
||||||
|
resultsTableBody.innerHTML += row;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// Initial render with all offers
|
||||||
|
renderResults(mockOffers);
|
||||||
|
|
||||||
|
// Contact Form Handler
|
||||||
|
const contactForm = document.getElementById('contact-form');
|
||||||
|
if (contactForm) {
|
||||||
|
contactForm.addEventListener('submit', function (e) {
|
||||||
|
e.preventDefault();
|
||||||
|
const statusDiv = document.getElementById('contact-form-status');
|
||||||
|
const submitButton = contactForm.querySelector('button[type="submit"]');
|
||||||
|
|
||||||
|
statusDiv.innerHTML = '<p class="text-info">Sending...</p>';
|
||||||
|
submitButton.disabled = true;
|
||||||
|
|
||||||
|
const formData = new FormData(this);
|
||||||
|
|
||||||
|
fetch('contact.php', {
|
||||||
|
method: 'POST',
|
||||||
|
body: formData
|
||||||
|
})
|
||||||
|
.then(response => response.json().then(data => ({ ok: response.ok, data })))
|
||||||
|
.then(({ ok, data }) => {
|
||||||
|
if (ok) {
|
||||||
|
statusDiv.innerHTML = `<p class="text-success">${data.success}</p>`;
|
||||||
|
contactForm.reset();
|
||||||
|
} else {
|
||||||
|
statusDiv.innerHTML = `<p class="text-danger">${data.error || 'An unknown error occurred.'}</p>`;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(error => {
|
||||||
|
console.error('Error:', error);
|
||||||
|
statusDiv.innerHTML = '<p class="text-danger">A network error occurred. Please try again.</p>';
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
submitButton.disabled = false;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
41
contact.php
Normal file
41
contact.php
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
<?php
|
||||||
|
header('Content-Type: application/json');
|
||||||
|
|
||||||
|
// Allow only POST requests
|
||||||
|
if ($_SERVER['REQUEST_METHOD'] !== 'POST') {
|
||||||
|
http_response_code(405);
|
||||||
|
echo json_encode(['error' => 'Method Not Allowed']);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Include the MailService
|
||||||
|
require_once __DIR__ . '/mail/MailService.php';
|
||||||
|
|
||||||
|
// Get and sanitize inputs
|
||||||
|
$name = trim($_POST['name'] ?? '');
|
||||||
|
$email = trim($_POST['email'] ?? '');
|
||||||
|
$message = trim($_POST['message'] ?? '');
|
||||||
|
|
||||||
|
// Basic validation
|
||||||
|
if (empty($name) || empty($email) || !filter_var($email, FILTER_VALIDATE_EMAIL) || empty($message)) {
|
||||||
|
http_response_code(400);
|
||||||
|
echo json_encode(['error' => 'Please fill out all fields correctly.']);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Prepare email details
|
||||||
|
$subject = 'New Contact Form Submission from Aperture Website';
|
||||||
|
|
||||||
|
// Send the email using the MailService.
|
||||||
|
// The `$to` address is omitted to use the default from the .env configuration.
|
||||||
|
$res = MailService::sendContactMessage($name, $email, $message, null, $subject);
|
||||||
|
|
||||||
|
// Respond to the client
|
||||||
|
if (!empty($res['success'])) {
|
||||||
|
echo json_encode(['success' => 'Thank you for your message! We will get back to you shortly.']);
|
||||||
|
} else {
|
||||||
|
http_response_code(500);
|
||||||
|
// Note: In a real app, you would log the detailed error.
|
||||||
|
// error_log('MailService Error: ' . ($res['error'] ?? 'Unknown error'));
|
||||||
|
echo json_encode(['error' => 'Sorry, there was an error sending your message. Please try again later.']);
|
||||||
|
}
|
||||||
42
dashboard.php
Normal file
42
dashboard.php
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
<?php
|
||||||
|
session_start();
|
||||||
|
|
||||||
|
if (!isset($_SESSION['user_id'])) {
|
||||||
|
header('Location: login.php');
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Dashboard - Aperture</title>
|
||||||
|
<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>
|
||||||
|
<header class="app-header">
|
||||||
|
<div class="container">
|
||||||
|
<div class="header-content">
|
||||||
|
<a href="index.php" class="logo">Aperture</a>
|
||||||
|
<nav class="main-nav">
|
||||||
|
<a href="logout.php">Logout</a>
|
||||||
|
</nav>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<main class="container page-section">
|
||||||
|
<h2>Welcome, <?php echo htmlspecialchars($_SESSION['username']); ?>!</h2>
|
||||||
|
<p>This is your dashboard. You are successfully logged in.</p>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<footer class="app-footer">
|
||||||
|
<div class="container">
|
||||||
|
<p>© <?php echo date('Y'); ?> Aperture. All rights reserved. | <a href="privacy.php">Privacy Policy</a></p>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
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();
|
||||||
|
$migrationsDir = __DIR__ . '/migrations';
|
||||||
|
$migrationFiles = glob($migrationsDir . '/*.sql');
|
||||||
|
|
||||||
|
foreach ($migrationFiles as $file) {
|
||||||
|
echo "Running migration: " . basename($file) . "\n";
|
||||||
|
$sql = file_get_contents($file);
|
||||||
|
$pdo->exec($sql);
|
||||||
|
echo "Success.\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (PDOException $e) {
|
||||||
|
die("Database migration failed: " . $e->getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
7
db/migrations/001_create_users_table.sql
Normal file
7
db/migrations/001_create_users_table.sql
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
CREATE TABLE IF NOT EXISTS users (
|
||||||
|
id INT AUTO_INCREMENT PRIMARY KEY,
|
||||||
|
username VARCHAR(50) NOT NULL UNIQUE,
|
||||||
|
email VARCHAR(100) NOT NULL UNIQUE,
|
||||||
|
password VARCHAR(255) NOT NULL,
|
||||||
|
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
|
||||||
|
);
|
||||||
343
index.php
343
index.php
@ -1,131 +1,224 @@
|
|||||||
<?php
|
<!DOCTYPE html>
|
||||||
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>
|
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>New Style</title>
|
<title>Aperture – The Intelligent Compute Fabric</title>
|
||||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
<meta name="description" content="Aperture is the unified compute layer for AI: submit once, run anywhere—cheapest, fastest, compliant.">
|
||||||
<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">
|
<!-- Open Graph -->
|
||||||
<style>
|
<meta property="og:title" content="Aperture – The Intelligent Compute Fabric">
|
||||||
:root {
|
<meta property="og:description" content="Submit AI workloads once, run anywhere on the globally optimal compute.">
|
||||||
--bg-color-start: #6a11cb;
|
<meta property="og:image" content="https://picsum.photos/seed/aperture-og/1200/630">
|
||||||
--bg-color-end: #2575fc;
|
<meta property="og:url" content="[YOUR_APP_URL]">
|
||||||
--text-color: #ffffff;
|
<meta property="og:type" content="website">
|
||||||
--card-bg-color: rgba(255, 255, 255, 0.01);
|
|
||||||
--card-border-color: rgba(255, 255, 255, 0.1);
|
<!-- Styles -->
|
||||||
}
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||||
body {
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||||
margin: 0;
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||||
font-family: 'Inter', sans-serif;
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap" rel="stylesheet">
|
||||||
background: linear-gradient(45deg, var(--bg-color-start), var(--bg-color-end));
|
<link rel="stylesheet" href="assets/css/custom.css?v=<?php echo time(); ?>">
|
||||||
color: var(--text-color);
|
<script src="https://unpkg.com/feather-icons"></script>
|
||||||
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>
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<main>
|
|
||||||
<div class="card">
|
<!-- Navbar -->
|
||||||
<h1>Analyzing your requirements and generating your website…</h1>
|
<nav class="navbar navbar-expand-lg navbar-dark fixed-top">
|
||||||
<div class="loader" role="status" aria-live="polite" aria-label="Applying initial changes">
|
<div class="container">
|
||||||
<span class="sr-only">Loading…</span>
|
<a class="navbar-brand" href="#">
|
||||||
</div>
|
<i data-feather="aperture" class="me-2"></i> Aperture
|
||||||
<p class="hint"><?= ($_SERVER['HTTP_HOST'] ?? '') === 'appwizzy.com' ? 'AppWiZZy' : 'Flatlogic' ?> AI is collecting your requirements and applying the first changes.</p>
|
</a>
|
||||||
<p class="hint">This page will update automatically as the plan is implemented.</p>
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
<p>Runtime: PHP <code><?= htmlspecialchars($phpVersion) ?></code> — UTC <code><?= htmlspecialchars($now) ?></code></p>
|
<span class="navbar-toggler-icon"></span>
|
||||||
</div>
|
</button>
|
||||||
</main>
|
<div class="collapse navbar-collapse" id="navbarNav">
|
||||||
<footer>
|
<ul class="navbar-nav ms-auto">
|
||||||
Page updated: <?= htmlspecialchars($now) ?> (UTC)
|
<li class="nav-item"><a class="nav-link" href="#features">Features</a></li>
|
||||||
</footer>
|
<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-3"><a class="btn btn-primary" href="register.php">Register</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<!-- Hero -->
|
||||||
|
<header class="hero text-white text-center">
|
||||||
|
<div class="container">
|
||||||
|
<h1 class="display-3 fw-bold mb-4">Unified Compute, Unlocked.</h1>
|
||||||
|
<p class="lead mb-5 col-lg-8 mx-auto">Aperture is the intelligent compute layer for AI. Submit once, run anywhere—cheapest, fastest, compliant.</p>
|
||||||
|
<div>
|
||||||
|
<a href="#" class="btn btn-primary btn-lg">Get Started</a>
|
||||||
|
<a href="#" class="btn btn-secondary btn-lg ms-3">View Docs</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<!-- Social Proof -->
|
||||||
|
<section class="py-5">
|
||||||
|
<div class="container text-center">
|
||||||
|
<p class="text-uppercase small text-muted mb-4">Routing workloads across the world's best providers</p>
|
||||||
|
<div class="d-flex flex-wrap justify-content-center align-items-center">
|
||||||
|
<img src="https://upload.wikimedia.org/wikipedia/commons/9/93/Amazon_Web_Services_Logo.svg" alt="AWS Logo" class="mx-4 my-2">
|
||||||
|
<img src="https://upload.wikimedia.org/wikipedia/commons/2/2f/Google_Cloud_logo.svg" alt="Google Cloud Logo" class="mx-4 my-2">
|
||||||
|
<img src="https://upload.wikimedia.org/wikipedia/commons/e/e5/Microsoft_Azure_Logo.svg" alt="Azure Logo" class="mx-4 my-2">
|
||||||
|
<img src="https://upload.wikimedia.org/wikipedia/commons/4/4b/Cloudflare_Logo.svg" alt="Cloudflare Logo" class="mx-4 my-2" style="max-height: 30px;">
|
||||||
|
<img src="https://images.g2crowd.com/uploads/product/image/social_landscape/social_landscape_bf039841426276a8238599575e7043d5/coreweave.png" alt="CoreWeave Logo" class="mx-4 my-2">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<!-- Main Content -->
|
||||||
|
<main>
|
||||||
|
<!-- Feature 1: Offer Explorer -->
|
||||||
|
<section id="features" class="section">
|
||||||
|
<div class="container">
|
||||||
|
<div class="row align-items-center g-5">
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<h2>Find Optimal Compute, Instantly.</h2>
|
||||||
|
<p class="lead text-muted">Query our global index of compute providers to find the perfect balance of price, performance, and availability for your workload. Stop overpaying for idle instances.</p>
|
||||||
|
<img src="https://picsum.photos/seed/aperture-f1/800/600" class="img-fluid rounded-3 mt-4" alt="Diagram showing a job being routed to multiple cloud providers">
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<div class="offer-explorer-card">
|
||||||
|
<h4 class="mb-4">Compute Offer Explorer</h4>
|
||||||
|
<form id="offer-explorer-form">
|
||||||
|
<div class="row g-3">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<label for="gpuType" class="form-label">GPU Type</label>
|
||||||
|
<select id="gpuType" class="form-select">
|
||||||
|
<option value="any">Any</option>
|
||||||
|
<option value="H100">NVIDIA H100</option>
|
||||||
|
<option value="A100">NVIDIA A100</option>
|
||||||
|
<option value="RTX 4090">NVIDIA RTX 4090</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6 d-flex align-items-end">
|
||||||
|
<div class="form-check form-switch">
|
||||||
|
<input class="form-check-input" type="checkbox" role="switch" id="spotOk" checked>
|
||||||
|
<label class="form-check-label" for="spotOk">Spot Instances OK</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<button type="submit" class="btn btn-primary mt-4 w-100">Search Offers</button>
|
||||||
|
</form>
|
||||||
|
<div class="mt-4">
|
||||||
|
<table class="table table-hover">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Provider</th>
|
||||||
|
<th>GPU</th>
|
||||||
|
<th>Region</th>
|
||||||
|
<th>Price/hr</th>
|
||||||
|
<th>Spot</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody id="offer-results-body">
|
||||||
|
<!-- JS will populate this -->
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<!-- Feature 2: How it works -->
|
||||||
|
<section class="section bg-darker">
|
||||||
|
<div class="container">
|
||||||
|
<div class="text-center col-lg-8 mx-auto">
|
||||||
|
<h2 class="mb-3">A Smarter Way to Run AI</h2>
|
||||||
|
<p class="lead text-muted">Aperture decouples your workload from the underlying infrastructure, so you can focus on building, not billing.</p>
|
||||||
|
</div>
|
||||||
|
<div class="row g-4 mt-5 text-center">
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="feature-card">
|
||||||
|
<i data-feather="upload-cloud" class="text-primary mb-3" style="width: 48px; height: 48px;"></i>
|
||||||
|
<h4>1. Submit Job</h4>
|
||||||
|
<p>Define your workload, data, and constraints using our simple API or web console.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="feature-card">
|
||||||
|
<i data-feather="cpu" class="text-primary mb-3" style="width: 48px; height: 48px;"></i>
|
||||||
|
<h4>2. Orchestrate</h4>
|
||||||
|
<p>Aperture's intelligent scheduler finds the globally optimal compute to run your job.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="feature-card">
|
||||||
|
<i data-feather="terminal" class="text-primary mb-3" style="width: 48px; height: 48px;"></i>
|
||||||
|
<h4>3. Run & Monitor</h4>
|
||||||
|
<p>We deploy your job, monitor its status, and stream logs and metrics back to you.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="text-center mt-5">
|
||||||
|
<img src="https://picsum.photos/seed/aperture-f2/800/600" class="img-fluid rounded-3 mt-4" alt="A dashboard showing cost savings and performance metrics">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<!-- Contact Section -->
|
||||||
|
<section id="contact" class="section">
|
||||||
|
<div class="container">
|
||||||
|
<div class="text-center col-lg-8 mx-auto">
|
||||||
|
<h2 class="mb-3">Get in Touch</h2>
|
||||||
|
<p class="lead text-muted">Have questions about pricing, features, or anything else? Our team is ready to answer all your questions.</p>
|
||||||
|
</div>
|
||||||
|
<div class="row justify-content-center mt-5">
|
||||||
|
<div class="col-lg-8">
|
||||||
|
<div class="feature-card">
|
||||||
|
<form id="contact-form">
|
||||||
|
<div class="row g-3">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<label for="name" class="form-label">Full Name</label>
|
||||||
|
<input type="text" class="form-control" id="name" name="name" required>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<label for="email" class="form-label">Email Address</label>
|
||||||
|
<input type="email" class="form-control" id="email" name="email" required>
|
||||||
|
</div>
|
||||||
|
<div class="col-12">
|
||||||
|
<label for="message" class="form-label">Message</label>
|
||||||
|
<textarea class="form-control" id="message" name="message" rows="5" required></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<button type="submit" class="btn btn-primary mt-4 w-100">Send Message</button>
|
||||||
|
</form>
|
||||||
|
<div id="contact-form-status" class="mt-3"></div>
|
||||||
|
<p class="text-muted small mt-3 text-center">
|
||||||
|
<strong>Note:</strong> This is for testing purposes only. Flatlogic does not guarantee usage of the mail server. Please set up your own SMTP in <code>.env</code>.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<!-- Footer -->
|
||||||
|
<footer class="footer">
|
||||||
|
<div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<p>© <?php echo date("Y"); ?> Aperture, Inc. All rights reserved.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6 text-md-end">
|
||||||
|
<a href="privacy.php" class="text-decoration-none me-3">Privacy Policy</a>
|
||||||
|
<a href="#" class="text-decoration-none">Terms of Service</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</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>
|
||||||
|
<script>
|
||||||
|
feather.replace()
|
||||||
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
88
login.php
Normal file
88
login.php
Normal file
@ -0,0 +1,88 @@
|
|||||||
|
<?php
|
||||||
|
require_once 'db/config.php';
|
||||||
|
session_start();
|
||||||
|
|
||||||
|
if (isset($_SESSION['user_id'])) {
|
||||||
|
header('Location: dashboard.php');
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
$error = '';
|
||||||
|
|
||||||
|
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
||||||
|
$email = $_POST['email'] ?? '';
|
||||||
|
$password = $_POST['password'] ?? '';
|
||||||
|
|
||||||
|
if (empty($email) || empty($password)) {
|
||||||
|
$error = 'Please fill in all fields.';
|
||||||
|
} else {
|
||||||
|
try {
|
||||||
|
$pdo = db();
|
||||||
|
$stmt = $pdo->prepare("SELECT * FROM users WHERE email = ?");
|
||||||
|
$stmt->execute([$email]);
|
||||||
|
$user = $stmt->fetch();
|
||||||
|
|
||||||
|
if ($user && password_verify($password, $user['password'])) {
|
||||||
|
$_SESSION['user_id'] = $user['id'];
|
||||||
|
$_SESSION['username'] = $user['username'];
|
||||||
|
header('Location: dashboard.php');
|
||||||
|
exit;
|
||||||
|
} else {
|
||||||
|
$error = 'Invalid email or password.';
|
||||||
|
}
|
||||||
|
} catch (PDOException $e) {
|
||||||
|
$error = 'Database error: ' . $e->getMessage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Login - Aperture</title>
|
||||||
|
<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>
|
||||||
|
<header class="app-header">
|
||||||
|
<div class="container">
|
||||||
|
<div class="header-content">
|
||||||
|
<a href="index.php" class="logo">Aperture</a>
|
||||||
|
<nav class="main-nav">
|
||||||
|
<a href="index.php#features">Features</a>
|
||||||
|
<a href="index.php#contact">Contact</a>
|
||||||
|
<a href="register.php">Register</a>
|
||||||
|
</nav>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<main class="container page-section">
|
||||||
|
<section class="auth-form">
|
||||||
|
<h2>Login</h2>
|
||||||
|
<?php if ($error): ?>
|
||||||
|
<div class="form-message error-message"><?php echo $error; ?></div>
|
||||||
|
<?php endif; ?>
|
||||||
|
<form action="login.php" method="POST">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="email">Email</label>
|
||||||
|
<input type="email" id="email" name="email" required>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="password">Password</label>
|
||||||
|
<input type="password" id="password" name="password" required>
|
||||||
|
</div>
|
||||||
|
<button type="submit" class="btn btn-primary">Login</button>
|
||||||
|
</form>
|
||||||
|
</section>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<footer class="app-footer">
|
||||||
|
<div class="container">
|
||||||
|
<p>© <?php echo date('Y'); ?> Aperture. All rights reserved. | <a href="privacy.php">Privacy Policy</a></p>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
6
logout.php
Normal file
6
logout.php
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?php
|
||||||
|
session_start();
|
||||||
|
session_unset();
|
||||||
|
session_destroy();
|
||||||
|
header('Location: index.php');
|
||||||
|
exit;
|
||||||
18
privacy.php
Normal file
18
privacy.php
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Privacy Policy - Aperture</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 class="bg-dark text-light">
|
||||||
|
<div class="container py-5">
|
||||||
|
<h1 class="display-4">Privacy Policy</h1>
|
||||||
|
<p class="lead">This is a placeholder for the Privacy Policy.</p>
|
||||||
|
<p>Details about data collection, usage, and protection will be provided here.</p>
|
||||||
|
<a href="/" class="btn btn-primary">Go back home</a>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
91
register.php
Normal file
91
register.php
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
<?php
|
||||||
|
require_once 'db/config.php';
|
||||||
|
|
||||||
|
session_start();
|
||||||
|
|
||||||
|
$error = '';
|
||||||
|
$success = '';
|
||||||
|
|
||||||
|
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
||||||
|
$username = $_POST['username'] ?? '';
|
||||||
|
$email = $_POST['email'] ?? '';
|
||||||
|
$password = $_POST['password'] ?? '';
|
||||||
|
|
||||||
|
if (empty($username) || empty($email) || empty($password)) {
|
||||||
|
$error = 'Please fill in all fields.';
|
||||||
|
} else {
|
||||||
|
try {
|
||||||
|
$pdo = db();
|
||||||
|
$stmt = $pdo->prepare("SELECT * FROM users WHERE username = ? OR email = ?");
|
||||||
|
$stmt->execute([$username, $email]);
|
||||||
|
if ($stmt->fetch()) {
|
||||||
|
$error = 'Username or email already exists.';
|
||||||
|
} else {
|
||||||
|
$hashed_password = password_hash($password, PASSWORD_DEFAULT);
|
||||||
|
$stmt = $pdo->prepare("INSERT INTO users (username, email, password) VALUES (?, ?, ?)");
|
||||||
|
$stmt->execute([$username, $email, $hashed_password]);
|
||||||
|
$success = 'Registration successful! You can now log in.';
|
||||||
|
}
|
||||||
|
} catch (PDOException $e) {
|
||||||
|
$error = 'Database error: ' . $e->getMessage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Register - Aperture</title>
|
||||||
|
<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>
|
||||||
|
<header class="app-header">
|
||||||
|
<div class="container">
|
||||||
|
<div class="header-content">
|
||||||
|
<a href="index.php" class="logo">Aperture</a>
|
||||||
|
<nav class="main-nav">
|
||||||
|
<a href="index.php#features">Features</a>
|
||||||
|
<a href="index.php#contact">Contact</a>
|
||||||
|
<a href="login.php">Login</a>
|
||||||
|
</nav>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<main class="container page-section">
|
||||||
|
<section class="auth-form">
|
||||||
|
<h2>Create an Account</h2>
|
||||||
|
<?php if ($error): ?>
|
||||||
|
<div class="form-message error-message"><?php echo $error; ?></div>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php if ($success): ?>
|
||||||
|
<div class="form-message success-message"><?php echo $success; ?></div>
|
||||||
|
<?php endif; ?>
|
||||||
|
<form action="register.php" method="POST">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="username">Username</label>
|
||||||
|
<input type="text" id="username" name="username" required>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="email">Email</label>
|
||||||
|
<input type="email" id="email" name="email" required>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="password">Password</label>
|
||||||
|
<input type="password" id="password" name="password" required>
|
||||||
|
</div>
|
||||||
|
<button type="submit" class="btn btn-primary">Register</button>
|
||||||
|
</form>
|
||||||
|
</section>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<footer class="app-footer">
|
||||||
|
<div class="container">
|
||||||
|
<p>© <?php echo date('Y'); ?> Aperture. All rights reserved. | <a href="privacy.php">Privacy Policy</a></p>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Loading…
x
Reference in New Issue
Block a user