commit basic

This commit is contained in:
2026-03-02 00:50:14 +01:00
parent a56501bc63
commit a543a79c83
38 changed files with 2663 additions and 1 deletions

39
partials/landing/main/home.php Executable file
View File

@@ -0,0 +1,39 @@
<?php
$app = app();
// Example: register assets from inside a landing template
$app->assets()->addStyle('/assets/app.css', 'early');
$app->assets()->addScript('/assets/app.js', 'footer', true);
$flash = $app->flash()->get();
?>
<div class="card">
<div class="pill">env: <?= htmlspecialchars($app->config()->env, ENT_QUOTES) ?></div>
<h1 style="margin-top: .75rem;"><?= htmlspecialchars(t('common.title'), ENT_QUOTES) ?></h1>
<p class="muted"><?= htmlspecialchars(t('common.intro'), ENT_QUOTES) ?></p>
<?php if ($flash): ?>
<div style="margin: 1rem 0; padding: .75rem 1rem; border: 1px solid #ddd; border-radius: 12px;">
<strong><?= htmlspecialchars($flash['type'], ENT_QUOTES) ?>:</strong>
<?= htmlspecialchars($flash['message'], ENT_QUOTES) ?>
</div>
<?php endif; ?>
<div class="grid" style="margin-top: 1rem;">
<div>
<h3 style="margin: 0 0 .5rem 0;">Runtime</h3>
<div><strong>Current URL:</strong> <?= htmlspecialchars($app->request()->currentUrl(), ENT_QUOTES) ?></div>
<div><strong>Client-ID:</strong> <code><?= htmlspecialchars($GLOBALS['client_id'] ?? '', ENT_QUOTES) ?></code></div>
</div>
<div>
<h3 style="margin: 0 0 .5rem 0;">Actions</h3>
<form method="post" action="/action/flash">
<button type="submit" style="padding:.6rem 1rem; border-radius: 12px; border: 1px solid #ddd; background: white; cursor:pointer;">
Set flash message
</button>
</form>
<p class="muted" style="margin-top:.5rem;">Flash uses SessionManager, no direct globals.</p>
</div>
</div>
</div>

View File

@@ -0,0 +1,3 @@
<?php asset_scripts('footer'); ?>
</body>
</html>

View File

@@ -0,0 +1,22 @@
<?php
/** @var \App\App $app */
$app = app();
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title><?= htmlspecialchars(t('common.title'), ENT_QUOTES) ?></title>
<?php asset_styles(); ?>
<?php asset_scripts('header'); ?>
<style>
body { font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; margin: 2rem; }
.card { border: 1px solid #ddd; border-radius: 12px; padding: 1.25rem; max-width: 820px; }
.muted { color: #555; }
.pill { display: inline-block; padding: .25rem .5rem; border-radius: 999px; border: 1px solid #ddd; font-size: .9rem; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 720px) { .grid { grid-template-columns: 1fr; } }
</style>
</head>
<body>