Initial commit
This commit is contained in:
commit
2994f7cf6d
16 changed files with 2766 additions and 0 deletions
29
app/default/templates/base.php
Normal file
29
app/default/templates/base.php
Normal 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>© <?= date('Y') ?></p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
18
app/default/templates/list.php
Normal file
18
app/default/templates/list.php
Normal 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>
|
||||
Loading…
Add table
Add a link
Reference in a new issue