folderweb/app/default/content/00-hero.no.php

52 lines
2.2 KiB
PHP
Raw Normal View History

<?php
// Dynamisk hero-seksjon som viser PHP-muligheter
$prefix = $langPrefix ?? '';
$features = [
['icon' => '📁', 'title' => 'Filbasert', 'description' => 'Mapper blir URL-er automatisk', 'url' => $prefix . '/examples/file-based-routing/'],
['icon' => '⚡', 'title' => 'Uten byggesteg', 'description' => 'Rediger og oppdater—det er alt', 'url' => $prefix . '/examples/no-build-step/'],
['icon' => '🎨', 'title' => 'Bland formater', 'description' => 'Kombiner .md, .html og .php', 'url' => $prefix . '/examples/mix-formats/'],
['icon' => '🌍', 'title' => 'Flerspråklig', 'description' => 'Innebygd i18n-støtte', 'url' => $prefix . '/multilingual/'],
['icon' => '📝', 'title' => 'Markdown', 'description' => 'Skriv innhold i markdown', 'url' => $prefix . '/examples/2024-12-15-markdown-demo/'],
['icon' => '🎭', 'title' => 'Maler', 'description' => 'Egendefinerte layout og stiler', 'url' => $prefix . '/examples/templates-demo/'],
];
$stats = [
'files' => count(glob(__DIR__ . '/**/*', GLOB_BRACE)) ?: 0,
'generated' => number_format((microtime(true) - $_SERVER['REQUEST_TIME_FLOAT']) * 1000, 2) . 'ms',
'php_version' => PHP_VERSION,
];
?>
<section class="hero">
<h1 class="hero-title">FolderWeb</h1>
<p class="hero-subtitle">
Slipp filer i mapper. De rendres umiddelbart.
Ingen konfigurasjon, ingen byggesteg, ingen kompleksitet.
</p>
<div class="features">
<?php foreach ($features as $feature): ?>
<a href="<?= htmlspecialchars($feature['url']) ?>" class="feature-card">
<span class="feature-icon"><?= $feature['icon'] ?></span>
<h3 class="feature-title"><?= htmlspecialchars($feature['title']) ?></h3>
<p class="feature-description"><?= htmlspecialchars($feature['description']) ?></p>
</a>
<?php endforeach; ?>
</div>
<div class="stats">
<div class="stat">
<span class="stat-value"><?= $stats['files'] ?></span>
<span class="stat-label">Filer i innhold</span>
</div>
<div class="stat">
<span class="stat-value"><?= $stats['generated'] ?></span>
<span class="stat-label">Side generert</span>
</div>
<div class="stat">
<span class="stat-value">PHP <?= $stats['php_version'] ?></span>
<span class="stat-label">Runtime</span>
</div>
</div>
</section>