0.2.0 add footer, flag image and date updated
This commit is contained in:
parent
3a74901fb8
commit
7b41a1d395
6 changed files with 68 additions and 6 deletions
39
index.php
39
index.php
|
|
@ -7,13 +7,18 @@ $link = $_GET['link'] ?? 'index';
|
|||
$pl = new PageLoader();
|
||||
$pl->load($link);
|
||||
|
||||
if ($pl->getError() !== false) {
|
||||
$error = $pl->getError();
|
||||
http_response_code($error['status']);
|
||||
}
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Caluta, Inc.</title>
|
||||
<title><?= htmlspecialchars($pl->getTitle()); ?> | Caluta, Inc.</title>
|
||||
<style>
|
||||
:root {
|
||||
--fg-main: #e8eef2;
|
||||
|
|
@ -42,19 +47,49 @@ $pl->load($link);
|
|||
margin: auto;
|
||||
max-width: 1000px;
|
||||
}
|
||||
|
||||
article header :is(h1, h2, .meta) {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
img.logo {
|
||||
height: 1em;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
#site__footer {
|
||||
text-align: center;
|
||||
font-size: 85%;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<header id="site__header">
|
||||
<h1><img src="/caluta_flag.png" alt="" /> Caluta, Inc.</h1>
|
||||
<h1><img src="/caluta_flag.png" alt="" class="logo" /> Caluta, Inc.</h1>
|
||||
</header>
|
||||
<main>
|
||||
<article>
|
||||
<header>
|
||||
<?php if($pl->getError() === false): ?>
|
||||
<h1><?= htmlspecialchars($pl->getTitle()); ?></h1>
|
||||
<?php if($pl->getUpdatedAt() !== false): ?>
|
||||
<p class="meta">Last update: <?= htmlspecialchars(date('F j, Y', $pl->getUpdatedAt())); ?></p>
|
||||
<?php endif; ?>
|
||||
<?php else: ?>
|
||||
<h1><?= "{$pl->getError()['status']}" ?></h1>
|
||||
<h2><?= "{$pl->getError()['message']}" ?></h2>
|
||||
<?php endif; ?>
|
||||
</header>
|
||||
<?php if($pl->getError() === false): ?>
|
||||
<?= $pl->getHtml(); ?>
|
||||
<?php endif; ?>
|
||||
</article>
|
||||
</main>
|
||||
<footer id="site__footer">
|
||||
<p>© 2026 yusurko</p>
|
||||
<p>Engine is licensed under GNU Affero General Public License (<a href="https://nekode.yusur.moe/yusur/caluta7">source code</a>)</p>
|
||||
<p>Content is licensed under CC BY-NC-SA 4.0.</p>
|
||||
<p>Caluta, Inc. does not store your information nor use cookies.</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue