Compare commits

..

No commits in common. "ai-dev" and "master" have entirely different histories.

5 changed files with 136 additions and 243 deletions

View File

@ -1,105 +0,0 @@
body {
background: linear-gradient(to bottom right, #0f2027, #203a43, #2c5364);
color: #fff;
font-family: 'Poppins', sans-serif;
}
.card {
background: #1a2a45;
border: 1px solid #2c5364;
border-radius: 0.5rem;
}
.card-header {
background: #203a43;
border-bottom: 1px solid #2c5364;
}
.deck {
margin-left: 2rem;
position: relative;
}
.deck-header {
display: flex;
align-items: center;
gap: 0.5rem;
margin-bottom: 1rem;
cursor: pointer;
}
.deck-name {
background: linear-gradient(to right, #2c3e50, #34495e);
padding: 0.5rem 1rem;
border-radius: 0.5rem;
border: 1px solid #46637f;
box-shadow: 0 2px 4px rgba(0,0,0,0.2);
transition: all 0.3s ease;
}
.deck-name:hover {
box-shadow: 0 4px 8px rgba(0,0,0,0.3);
transform: translateY(-2px);
}
.deck-name .text-yellow-300 {
color: #facc15;
}
.deck-name .text-yellow-100 {
color: #fef08a;
}
.words {
margin-left: 2rem;
margin-bottom: 1rem;
display: none; /* Initially hidden */
}
.word {
display: flex;
align-items: center;
position: relative;
margin-bottom: 0.5rem;
}
.word-connector {
position: absolute;
left: -1.5rem;
top: 50%;
width: 1rem;
height: 1px;
background-color: rgba(70, 99, 127, 0.5);
}
.word-content {
background: linear-gradient(to right, rgba(44, 62, 80, 0.8), rgba(52, 73, 94, 0.8));
padding: 0.375rem 0.75rem;
border-radius: 0.25rem;
border: 1px solid rgba(70, 99, 127, 0.5);
transition: all 0.3s ease;
}
.word-content:hover {
border-color: rgba(250, 204, 21, 0.5);
}
.word .text-yellow-400 {
color: #fbbf24;
}
.word .text-yellow-100-80 {
color: rgba(254, 240, 138, 0.8);
}
.chevron {
background-color: #34495e;
border-radius: 50%;
padding: 0.25rem;
transition: transform 0.3s ease;
}
.chevron.expanded {
transform: rotate(90deg);
}

View File

@ -1,42 +0,0 @@
document.addEventListener('DOMContentLoaded', function () {
const deckHeaders = document.querySelectorAll('.deck-header');
deckHeaders.forEach(header => {
header.addEventListener('click', () => {
const words = header.nextElementSibling;
const chevron = header.querySelector('.chevron');
if (words.style.display === 'block') {
words.style.display = 'none';
chevron.classList.remove('expanded');
} else {
words.style.display = 'block';
chevron.classList.add('expanded');
}
});
});
const toggleAllButton = document.getElementById('toggle-all');
let allExpanded = true;
toggleAllButton.addEventListener('click', () => {
allExpanded = !allExpanded;
deckHeaders.forEach(header => {
const words = header.nextElementSibling;
const chevron = header.querySelector('.chevron');
if (allExpanded) {
words.style.display = 'block';
chevron.classList.add('expanded');
} else {
words.style.display = 'none';
chevron.classList.remove('expanded');
}
});
toggleAllButton.textContent = allExpanded ? 'Collapse All' : 'Expand All';
});
// Initially expand all
toggleAllButton.click();
});

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

232
index.php
View File

@ -4,107 +4,147 @@ declare(strict_types=1);
@error_reporting(E_ALL);
@date_default_timezone_set('UTC');
$vocabularyData = [
'title' => 'Quranic Vocabulary Master (85% Coverage)',
'decks' => [
[
'name' => 'Deck 1: Core Prepositions & Conjunctions',
'words' => [
['arabic' => "'Alā", 'english' => 'On'],
['arabic' => "'An", 'english' => 'About'],
['arabic' => 'Bi', 'english' => 'In, with, by'],
['arabic' => 'Fī', 'english' => 'In'],
['arabic' => 'Ilā', 'english' => 'To'],
['arabic' => 'Ka', 'english' => 'Like'],
['arabic' => 'Li', 'english' => 'To, for'],
['arabic' => 'Maa`', 'english' => 'With'],
['arabic' => 'Min', 'english' => 'From'],
['arabic' => 'Wa', 'english' => 'And'],
['arabic' => 'Fa', 'english' => 'Then, therefore, so'],
['arabic' => 'Thumma', 'english' => 'Then'],
['arabic' => 'Am', 'english' => 'Or'],
['arabic' => 'In', 'english' => 'If, indeed'],
['arabic' => 'An', 'english' => 'That'],
['arabic' => 'Law', 'english' => 'If']
]
],
[
'name' => 'Deck 2: Pronouns (Detached)',
'words' => [
['arabic' => 'Ana', 'english' => 'I'],
['arabic' => 'Nahnu', 'english' => 'We'],
['arabic' => 'Anta', 'english' => 'You (m. sing.)'],
['arabic' => 'Anti', 'english' => 'You (f. sing.)'],
['arabic' => 'Antum', 'english' => 'You all (m. pl.)'],
['arabic' => 'Huwa', 'english' => 'He'],
['arabic' => 'Hiya', 'english' => 'She'],
['arabic' => 'Hum', 'english' => 'They (m. pl.)']
]
],
]
];
$totalWords = array_reduce($vocabularyData['decks'], function ($sum, $deck) {
return $sum + count($deck['words']);
}, 0);
$phpVersion = PHP_VERSION;
$now = date('Y-m-d H:i:s');
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title><?= htmlspecialchars($vocabularyData['title']) ?></title>
<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">
<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=Poppins:wght@300;400;600&family=Lato:wght@400;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="assets/css/custom.css?v=<?php echo time(); ?>">
<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>
</head>
<body class="bg-light">
<div class="container my-5">
<div class="card shadow-lg mb-4">
<div class="card-body text-center p-5">
<h1 class="card-title display-4 text-warning">
<i class="bi bi-book-half me-2"></i>
<?= htmlspecialchars($vocabularyData['title']) ?>
</h1>
<p class="card-text text-white-50">
Total words: <?= $totalWords ?>
</p>
<button id="toggle-all" class="btn btn-warning">Collapse All</button>
</div>
<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>
<div class="main-content">
<?php foreach ($vocabularyData['decks'] as $deck): ?>
<div class="deck">
<div class="deck-header">
<div class="chevron">
<i class="bi bi-chevron-right text-warning"></i>
</div>
<div class="deck-name">
<span class="text-yellow-300 fw-bold"><?= htmlspecialchars($deck['name']) ?></span>
<span class="text-yellow-100 small ms-2">(<?= count($deck['words']) ?> words)</span>
</div>
</div>
<div class="words">
<?php foreach ($deck['words'] as $word): ?>
<div class="word">
<div class="word-connector"></div>
<div class="word-content">
<span class="text-yellow-400 fw-medium"><?= htmlspecialchars($word['arabic']) ?></span>
<span class="text-yellow-100-80 small ms-2">- <?= htmlspecialchars($word['english']) ?></span>
</div>
</div>
<?php endforeach; ?>
</div>
</div>
<?php endforeach; ?>
</div>
</div>
<script src="assets/js/main.js?v=<?php echo time(); ?>"></script>
</main>
<footer>
Page updated: <?= htmlspecialchars($now) ?> (UTC)
</footer>
</body>
</html>