51 lines
2.1 KiB
PHP
51 lines
2.1 KiB
PHP
|
|
<?php
|
||
|
|
// Dynamisk hero-seksjon som viser PHP-muligheter
|
||
|
|
$features = [
|
||
|
|
['icon' => '📁', 'title' => 'Filbasert', 'description' => 'Mapper blir URL-er automatisk', 'url' => '/examples/file-based-routing/'],
|
||
|
|
['icon' => '⚡', 'title' => 'Uten byggesteg', 'description' => 'Rediger og oppdater—det er alt', 'url' => '/examples/no-build-step/'],
|
||
|
|
['icon' => '🎨', 'title' => 'Bland formater', 'description' => 'Kombiner .md, .html og .php', 'url' => '/examples/mix-formats/'],
|
||
|
|
['icon' => '🌍', 'title' => 'Flerspråklig', 'description' => 'Innebygd i18n-støtte', 'url' => '/multilingual/'],
|
||
|
|
['icon' => '📝', 'title' => 'Markdown', 'description' => 'Skriv innhold i markdown', 'url' => '/examples/2024-12-15-markdown-demo/'],
|
||
|
|
['icon' => '🎭', 'title' => 'Maler', 'description' => 'Egendefinerte layout og stiler', 'url' => '/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>
|