Initial commit

This commit is contained in:
Ruben 2025-10-02 16:54:47 +02:00
commit 2994f7cf6d
16 changed files with 2766 additions and 0 deletions

3
app/default/config.ini Normal file
View file

@ -0,0 +1,3 @@
[languages]
default = "en"
available = "en"

View file

@ -0,0 +1,214 @@
/* MINIMAL RESET */
* { margin: 0; padding: 0; box-sizing: border-box; }
/* VARIABLES */
:root {
--font-body: Georgia, "Times New Roman", serif;
--font-heading: system-ui, -apple-system, sans-serif;
--color-primary: #2563eb;
--color-primary-dark: #1e40af;
--color-bg: #f8fafc;
--color-bg-alt: #ffffff;
--color-text: #1e293b;
--color-text-light: #64748b;
--color-border: #e2e8f0;
}
/* GLOBAL */
html {
font-family: var(--font-body);
font-size: 18px;
line-height: 1.7;
}
body {
margin: 0;
color: var(--color-text);
background-color: var(--color-bg);
}
img { max-width: 100%; height: auto; }
a {
color: var(--color-primary);
text-decoration: none;
}
a:hover {
color: var(--color-primary-dark);
text-decoration: underline;
}
/* LAYOUT */
.docs-container {
max-width: 1200px;
margin: 0 auto;
display: grid;
grid-template-columns: 250px 1fr;
gap: 2rem;
padding: 2rem 1rem;
}
@media (max-width: 768px) {
.docs-container {
grid-template-columns: 1fr;
}
}
/* HEADER */
header {
grid-column: 1 / -1;
border-bottom: 2px solid var(--color-border);
padding-bottom: 1rem;
margin-bottom: 1rem;
}
header h1 {
font-family: var(--font-heading);
font-size: 1.8rem;
color: var(--color-primary);
font-weight: 600;
}
/* SIDEBAR */
.sidebar {
font-size: 0.9rem;
}
.sidebar h2 {
font-family: var(--font-heading);
font-size: 0.85rem;
text-transform: uppercase;
letter-spacing: 0.05em;
color: var(--color-text-light);
margin-bottom: 0.5rem;
margin-top: 1.5rem;
}
.sidebar h2:first-child {
margin-top: 0;
}
.sidebar ul {
list-style: none;
margin-bottom: 1rem;
}
.sidebar li {
margin-bottom: 0.25rem;
}
.sidebar a {
display: block;
padding: 0.25rem 0.5rem;
border-radius: 0.25rem;
}
.sidebar a:hover {
background-color: var(--color-bg);
text-decoration: none;
}
/* MAIN CONTENT */
main {
background-color: var(--color-bg-alt);
padding: 2rem;
border-radius: 0.5rem;
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
article h1 {
font-family: var(--font-heading);
font-size: 2.2rem;
margin-bottom: 1rem;
color: var(--color-text);
font-weight: 600;
line-height: 1.2;
}
article h2 {
font-family: var(--font-heading);
font-size: 1.6rem;
margin-top: 2rem;
margin-bottom: 0.75rem;
color: var(--color-text);
font-weight: 600;
}
article h3 {
font-family: var(--font-heading);
font-size: 1.2rem;
margin-top: 1.5rem;
margin-bottom: 0.5rem;
color: var(--color-text);
font-weight: 600;
}
article p {
margin-bottom: 1rem;
}
article ul, article ol {
margin-bottom: 1rem;
padding-left: 2rem;
}
article li {
margin-bottom: 0.5rem;
}
article code {
background-color: var(--color-bg);
padding: 0.2rem 0.4rem;
border-radius: 0.25rem;
font-size: 0.9em;
font-family: 'Courier New', monospace;
}
article pre {
background-color: var(--color-bg);
padding: 1rem;
border-radius: 0.5rem;
overflow-x: auto;
margin-bottom: 1rem;
border: 1px solid var(--color-border);
}
article pre code {
background: none;
padding: 0;
}
article blockquote {
border-left: 4px solid var(--color-primary);
padding-left: 1rem;
margin: 1rem 0;
color: var(--color-text-light);
font-style: italic;
}
/* LIST VIEW */
.doc-list article h1 {
font-size: 1.4rem;
margin-top: 1.5rem;
margin-bottom: 0.5rem;
}
.doc-list article h1:first-of-type {
margin-top: 0;
}
.doc-list p {
color: var(--color-text-light);
font-size: 0.95rem;
}
/* FOOTER */
footer {
grid-column: 1 / -1;
border-top: 2px solid var(--color-border);
padding-top: 1rem;
margin-top: 2rem;
text-align: center;
font-size: 0.85rem;
color: var(--color-text-light);
}

46
app/default/docs/templates/base.php vendored Normal file
View file

@ -0,0 +1,46 @@
<!DOCTYPE html>
<html lang="<?= $currentLang ?? 'en' ?>">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="/app/docs-styles/base.css">
<title><?= $pageTitle ?? 'Documentation' ?></title>
</head>
<body>
<div class="docs-container">
<header>
<h1><a href="/docs">PnP Documentation</a></h1>
</header>
<aside class="sidebar">
<h2>Tutorials</h2>
<ul>
<li><a href="/docs/tutorials/getting-started">Getting Started</a></li>
</ul>
<h2>How-To Guides</h2>
<ul>
<li><a href="/docs/how-to/customize-templates">Customize Templates</a></li>
</ul>
<h2>Explanation</h2>
<ul>
<li><a href="/docs/explanation/routing">Routing System</a></li>
</ul>
<h2>Reference</h2>
<ul>
<li><a href="/docs/reference/metadata">Metadata</a></li>
</ul>
</aside>
<main>
<?= $content ?>
</main>
<footer>
<p>PnP Framework Documentation</p>
</footer>
</div>
</body>
</html>

14
app/default/docs/templates/list.php vendored Normal file
View file

@ -0,0 +1,14 @@
<div class="doc-list">
<?php foreach ($items as $item): ?>
<article>
<h1>
<a href="<?= htmlspecialchars($item['url']) ?>">
<?= htmlspecialchars($item['title']) ?>
</a>
</h1>
<?php if ($item['summary']): ?>
<p><?= htmlspecialchars($item['summary']) ?></p>
<?php endif; ?>
</article>
<?php endforeach; ?>
</div>

View file

@ -0,0 +1,47 @@
/* MINIMAL RESET */
* { margin: 0; padding: 0; box-sizing: border-box; }
/* GLOBAL */
body {
font-family: system-ui, sans-serif;
line-height: 1.6;
color: #333;
max-width: 800px;
margin: 0 auto;
padding: 1rem;
}
img { max-width: 100%; height: auto; }
a { color: #0066cc; text-decoration: none; }
a:hover { text-decoration: underline; }
/* HEADER */
header {
border-bottom: 2px solid #eee;
padding-bottom: 1rem;
margin-bottom: 2rem;
}
header h1 { font-size: 1.5rem; }
/* MAIN */
main { margin-bottom: 2rem; }
article { margin-bottom: 2rem; }
h1 {
font-size: 1.8rem;
margin-bottom: 0.5rem;
}
p { margin-bottom: 1rem; }
/* FOOTER */
footer {
border-top: 2px solid #eee;
padding-top: 1rem;
text-align: center;
font-size: 0.9rem;
color: #666;
}

View file

@ -0,0 +1,29 @@
<!DOCTYPE html>
<html lang="<?= $currentLang ?? 'en' ?>">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="<?= file_exists(dirname(dirname(__DIR__)) . '/custom/styles/base.css') ? '/app/styles/base.css' : '/app/default-styles/base.css' ?>">
<title><?= htmlspecialchars($pageTitle ?? 'Site') ?></title>
</head>
<body>
<header>
<h1><a href="/">Webfolder demo</a></h1>
<?php if (!empty($navigation)): ?>
<nav>
<ul>
<?php foreach ($navigation as $item): ?>
<li><a href="<?= htmlspecialchars($item['url']) ?>"><?= htmlspecialchars($item['title']) ?></a></li>
<?php endforeach; ?>
</ul>
</nav>
<?php endif; ?>
</header>
<main>
<?= $content ?>
</main>
<footer>
<p>&copy; <?= date('Y') ?></p>
</footer>
</body>
</html>

View file

@ -0,0 +1,18 @@
<article>
<?php foreach ($items as $item): ?>
<article>
<?php if ($item['cover']): ?>
<img src="<?= htmlspecialchars($item['cover']) ?>" alt="<?= htmlspecialchars($item['title']) ?>">
<?php endif; ?>
<h1>
<a href="<?= htmlspecialchars($item['url']) ?>">
<?= htmlspecialchars($item['title']) ?>
</a>
</h1>
<p><?= htmlspecialchars($item['date']) ?></p>
<?php if ($item['summary']): ?>
<p><?= htmlspecialchars($item['summary']) ?></p>
<?php endif; ?>
</article>
<?php endforeach; ?>
</article>