You've already forked framexEngine-pro
Firts up
This commit is contained in:
31
templates/clean.php
Normal file
31
templates/clean.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" class="scroll-smooth">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title><?= (isset($title) ? $title : 'Framex Engine') ?></title>
|
||||
<link rel="stylesheet" href="<?= asset('css/style.css') ?>">
|
||||
|
||||
<script>
|
||||
(function() {
|
||||
const stored = localStorage.getItem('theme');
|
||||
const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
|
||||
if (stored === 'dark' || (!stored && prefersDark)) {
|
||||
document.documentElement.classList.add('dark');
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body class="bg-gray-50 text-slate-900 dark:bg-slate-950 dark:text-slate-100">
|
||||
|
||||
<main class="wrp">
|
||||
<?= $view ?>
|
||||
</main>
|
||||
|
||||
<script src="<?= asset('js/init.js') ?>"></script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
57
templates/error404.php
Normal file
57
templates/error404.php
Normal file
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
$data['title'] = "Page Not Found — Framex Engine";
|
||||
$data['metaDescription'] = "The page you are looking for does not exist. Return to Framex Engine home.";
|
||||
$data['bodyClass'] = "bg-gray-50 text-slate-900 dark:bg-slate-950 dark:text-slate-100 antialiased";
|
||||
?>
|
||||
|
||||
<section class="relative isolate flex min-h-[80vh] items-center justify-center overflow-hidden">
|
||||
<!-- Background glow -->
|
||||
<div class="absolute inset-0 -z-10">
|
||||
<div class="absolute inset-0 bg-gray-50 dark:bg-slate-950"></div>
|
||||
<div class="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[600px] h-[600px] bg-indigo-600/10 rounded-full blur-[120px]"></div>
|
||||
<div class="absolute top-1/3 right-1/4 w-[300px] h-[300px] bg-violet-600/10 rounded-full blur-[80px]"></div>
|
||||
</div>
|
||||
|
||||
<div class="mx-auto max-w-2xl px-4 text-center">
|
||||
<!-- 404 Number -->
|
||||
<div class="relative inline-block">
|
||||
<h1 class="text-9xl font-black tracking-tighter text-black/5 dark:text-white/5 select-none sm:text-[12rem]">
|
||||
404
|
||||
</h1>
|
||||
<div class="absolute inset-0 flex items-center justify-center">
|
||||
<span class="text-7xl font-black tracking-tight bg-gradient-to-b from-white to-black/20 dark:to-white/20 bg-clip-text text-transparent sm:text-9xl">
|
||||
404
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Message -->
|
||||
<p class="mt-8 text-2xl font-bold tracking-tight text-slate-900 dark:text-white sm:text-3xl">
|
||||
Page not found
|
||||
</p>
|
||||
<p class="mt-4 text-lg text-slate-600 dark:text-slate-400 max-w-md mx-auto">
|
||||
The page you are looking for does not exist. It might have been moved, renamed, or maybe it never existed in the first place.
|
||||
</p>
|
||||
|
||||
<!-- Actions -->
|
||||
<div class="mt-10 flex flex-col sm:flex-row items-center justify-center gap-4">
|
||||
<a href="/" class="inline-flex items-center justify-center rounded-xl bg-white px-8 py-3.5 text-base font-semibold text-slate-950 shadow-lg shadow-black/10 dark:shadow-white/10 hover:bg-slate-200 transition-all">
|
||||
<svg class="mr-2 h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M10.5 19.5L3 12m0 0l7.5-7.5M3 12h18" />
|
||||
</svg>
|
||||
Back to Home
|
||||
</a>
|
||||
<a href="/pages/features" class="inline-flex items-center justify-center rounded-xl border border-black/10 dark:border-white/10 bg-black/5 dark:bg-white/5 px-8 py-3.5 text-base font-semibold text-slate-900 dark:text-white hover:bg-black/10 dark:hover:bg-white/10 transition-all">
|
||||
Explore Features
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<!-- File tree hint -->
|
||||
<div class="mt-12 inline-block rounded-xl border border-black/5 dark:border-white/5 bg-black/[0.02] dark:bg-white/[0.02] px-6 py-4 text-left">
|
||||
<p class="text-xs font-mono text-slate-500 dark:text-slate-500 mb-2">Did you mean to create this file?</p>
|
||||
<code class="block font-mono text-sm text-indigo-400">
|
||||
app/views<?= htmlspecialchars($_SERVER['REQUEST_URI']) ?>.php
|
||||
</code>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
57
templates/main.php
Normal file
57
templates/main.php
Normal file
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
$metaTitle = isset($title) ? $title : 'Framex Engine';
|
||||
$metaDescription = isset($metaDescription) ? $metaDescription : 'Framex Engine — A lightweight, high-performance PHP engine for building static sites and modern web applications.';
|
||||
$metaImage = isset($metaImage) ? $metaImage : image(1200, 630);
|
||||
$metaUrl = SITE_URI;
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" class="scroll-smooth">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title><?= $metaTitle ?></title>
|
||||
<meta name="description" content="<?= e($metaDescription) ?>">
|
||||
|
||||
<!-- Open Graph -->
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:url" content="<?= $metaUrl ?>">
|
||||
<meta property="og:title" content="<?= e($metaTitle) ?>">
|
||||
<meta property="og:description" content="<?= e($metaDescription) ?>">
|
||||
<meta property="og:image" content="<?= $metaImage ?>">
|
||||
|
||||
<!-- Twitter Card -->
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:url" content="<?= $metaUrl ?>">
|
||||
<meta name="twitter:title" content="<?= e($metaTitle) ?>">
|
||||
<meta name="twitter:description" content="<?= e($metaDescription) ?>">
|
||||
<meta name="twitter:image" content="<?= $metaImage ?>">
|
||||
|
||||
<script>
|
||||
(function () {
|
||||
var theme = null;
|
||||
try {
|
||||
theme = localStorage.getItem('framex-theme');
|
||||
} catch (error) {}
|
||||
var prefersDark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
|
||||
if (theme === 'dark' || (!theme && prefersDark)) {
|
||||
document.documentElement.classList.add('dark');
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
<link rel="stylesheet" href="<?= asset('css/style.css') ?>">
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body class="<?php echo (isset($bodyClass) && $bodyClass !== '' ? $bodyClass : 'bg-slate-50 text-slate-950 dark:bg-slate-950 dark:text-slate-100') ?>">
|
||||
<div class="wrap">
|
||||
<?= partial('topmenu') ?>
|
||||
<?= $view ?>
|
||||
</div>
|
||||
<?= partial('footer') ?>
|
||||
<script src="<?= asset('js/init.js', ['prefix' => 'framex', 'hash' => true]) ?>"></script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
39
templates/partials/footer.php
Normal file
39
templates/partials/footer.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php ?>
|
||||
<footer class="border-t border-slate-200 bg-white dark:border-slate-800 dark:bg-slate-950">
|
||||
<div class="contain grid gap-10 py-10 md:grid-cols-[1.4fr_1fr_1fr]">
|
||||
<div>
|
||||
<a href="/" class="inline-flex items-center gap-3 font-semibold text-slate-950 dark:text-white" aria-label="Framex home">
|
||||
<span class="grid size-9 place-items-center rounded-lg bg-blue-600 text-sm font-bold text-white uppercase">Fx</span>
|
||||
<span>Framex v1.0.0</span>
|
||||
</a>
|
||||
<p class="mt-4 max-w-md text-sm leading-6 text-slate-600 dark:text-slate-400">
|
||||
A lightweight PHP engine for fast static sites, markdown pages, and modern frontends powered by Tailwind CSS.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h2 class="text-sm font-semibold text-slate-950 dark:text-white">Build</h2>
|
||||
<div class="mt-4 grid gap-3 text-sm text-slate-600 dark:text-slate-400">
|
||||
<a class="hover:text-blue-600 dark:hover:text-blue-400" href="/#features">Features</a>
|
||||
<a class="hover:text-blue-600 dark:hover:text-blue-400" href="/#markdown">Markdown</a>
|
||||
<a class="hover:text-blue-600 dark:hover:text-blue-400" href="/#themes">Theme system</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h2 class="text-sm font-semibold text-slate-950 dark:text-white">Project</h2>
|
||||
<div class="mt-4 grid gap-3 text-sm text-slate-600 dark:text-slate-400">
|
||||
<a class="hover:text-blue-600 dark:hover:text-blue-400" href="/docs">Docs</a>
|
||||
<a class="hover:text-blue-600 dark:hover:text-blue-400" href="/#start">Get started</a>
|
||||
<a class="hover:text-blue-600 dark:hover:text-blue-400" href="/">Home</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="border-t border-slate-200 py-5 dark:border-slate-800">
|
||||
<div class="contain flex flex-col gap-2 text-sm text-slate-500 sm:flex-row sm:items-center sm:justify-between dark:text-slate-400">
|
||||
<p>© <?= date('Y') ?> Framex Engine. Built for practical PHP sites.</p>
|
||||
<p>Tailwind CSS 4 ready.</p>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
57
templates/partials/topmenu.php
Normal file
57
templates/partials/topmenu.php
Normal file
@@ -0,0 +1,57 @@
|
||||
<?php ?>
|
||||
<header class="sticky top-0 z-50 border-b border-slate-200/80 bg-white/85 backdrop-blur-xl dark:border-slate-800/80 dark:bg-slate-950/85">
|
||||
<nav class="contain flex min-h-16 items-center justify-between gap-4" aria-label="Main navigation">
|
||||
<a href="/" class="flex items-center gap-3 font-semibold text-slate-950 dark:text-white" aria-label="Framex home">
|
||||
<span class="grid size-9 place-items-center rounded-lg bg-blue-600 text-sm font-bold text-white shadow-sm shadow-blue-600/30">Fx</span>
|
||||
<span class="text-xl text-black dark:text-white/80 font-extrabold">FramexEngine</span>
|
||||
</a>
|
||||
|
||||
<div class="hidden items-center gap-1 md:flex">
|
||||
<a class="nav-link" href="/#features">Features</a>
|
||||
<a class="nav-link" href="/#markdown">Markdown</a>
|
||||
<a class="nav-link" href="/#themes">Themes</a>
|
||||
<a class="nav-link" href="/about">About</a>
|
||||
<a class="nav-link" href="/docs">Document</a>
|
||||
</div>
|
||||
|
||||
<div class="hidden items-center gap-2 md:flex">
|
||||
<button class="btn btn-ghost size-11 px-0" type="button" data-theme-toggle aria-label="Toggle dark mode" aria-pressed="false">
|
||||
<svg class="size-5 dark:hidden" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" aria-hidden="true">
|
||||
<circle cx="12" cy="12" r="4"></circle>
|
||||
<path d="M12 2v2M12 20v2M4 12H2M22 12h-2M19.1 4.9l-1.4 1.4M6.3 17.7l-1.4 1.4M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4"></path>
|
||||
</svg>
|
||||
<svg class="hidden size-5 dark:block" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" aria-hidden="true">
|
||||
<path d="M20 14.5A7.5 7.5 0 0 1 9.5 4 8.5 8.5 0 1 0 20 14.5Z"></path>
|
||||
</svg>
|
||||
</button>
|
||||
<a class="btn btn-primary" href="/#start">Start building</a>
|
||||
</div>
|
||||
|
||||
<div class="flex items-center gap-2 md:hidden">
|
||||
<button class="btn btn-ghost size-11 px-0" type="button" data-theme-toggle aria-label="Toggle dark mode" aria-pressed="false">
|
||||
<svg class="size-5 dark:hidden" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" aria-hidden="true">
|
||||
<circle cx="12" cy="12" r="4"></circle>
|
||||
<path d="M12 2v2M12 20v2M4 12H2M22 12h-2M19.1 4.9l-1.4 1.4M6.3 17.7l-1.4 1.4M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4"></path>
|
||||
</svg>
|
||||
<svg class="hidden size-5 dark:block" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" aria-hidden="true">
|
||||
<path d="M20 14.5A7.5 7.5 0 0 1 9.5 4 8.5 8.5 0 1 0 20 14.5Z"></path>
|
||||
</svg>
|
||||
</button>
|
||||
<button class="btn btn-secondary size-11 px-0" type="button" data-mobile-menu-toggle aria-label="Toggle navigation" aria-expanded="false">
|
||||
<svg class="size-5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" aria-hidden="true">
|
||||
<path d="M4 7h16M4 12h16M4 17h16"></path>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="contain hidden pb-4 md:hidden" data-mobile-menu>
|
||||
<div class="grid gap-1 rounded-lg border border-slate-200 bg-white p-2 shadow-lg shadow-slate-950/10 dark:border-slate-800 dark:bg-slate-900">
|
||||
<a class="nav-link" href="/#features">Features</a>
|
||||
<a class="nav-link" href="/#markdown">Markdown</a>
|
||||
<a class="nav-link" href="/#themes">Themes</a>
|
||||
<a class="nav-link" href="/docs">Docs</a>
|
||||
<a class="btn btn-primary mt-2" href="/#start">Start building</a>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
Reference in New Issue
Block a user