]> git.bts.cx Git - cx.git/blob - cx/templates/public/pages/base.php
Hide date on pages
[cx.git] / cx / templates / public / pages / base.php
1 <!DOCTYPE html>
2 <html lang="en">
3
4 <head>
5         <meta charset="UTF-8">
6         <meta http-equiv="X-UA-Compatible" content="IE=edge">
7         <meta name="viewport" content="width=device-width, initial-scale=1.0">
8
9         <?php if (isset($cx_post_title)): ?>
10         <title><?= cx_site_name(); ?> - <?= $cx_post_title; ?></title>
11         <?php else: ?>
12         <title><?= cx_site_name(); ?></title>
13         <?php endif; ?>
14
15         <link rel="stylesheet" href="<?= cx_url('/css/style.css') ?>">
16         <link rel="alternate" type="application/atom+xml" title="bts.cx" href="<?= cx_url('/feed/') ?>" />
17
18         <meta property="og:site_name" content="<?= cx_site_name(); ?>">
19         <?php if (isset($cx_post_title)): ?>
20         <meta property="og:title" content="<?= $cx_post_title; ?>">
21         <?php else: ?>
22         <meta property="og:title" content="<?= cx_site_name(); ?>">
23         <?php endif; ?>
24
25         <?php if (isset($cx_post_meta)): ?>
26         
27         <meta property="og:type" content="article" />
28
29         <?php if (isset($cx_post_meta->hero_image)): ?>
30         <meta property="og:image" content="<?= $cx_post_meta->hero_image; ?>">
31         <?php endif; ?>
32
33         <meta property="og:url" content="<?= cx_url_site($cx_post_permalink); ?>">
34         <meta name="twitter:card" content="summary_large_image">
35
36         <?php if (isset($cx_post_meta->hero_image_alt)): ?>
37         <meta name="twitter:image:alt" content="<?= $cx_post_meta->hero_image_alt; ?>">
38         <?php endif; ?>
39
40         <?php endif; ?>
41 </head>
42
43 <body>
44 <header>
45   <h1><a href="<?= cx_url('/'); ?>"><?= cx_site_name(); ?></a></h1>
46   <p>Find me <a href="https://mastodon.gamedev.place/@btsherratt" rel="me">@btsherratt</a> or on <a href="https://bts.itch.io/">itch.io</a></p>
47 </header>
48
49 <nav>
50
51 <ul role="list">
52 <li><a href="<?= cx_url('/'); ?>">Home</a></li>
53
54 <?php foreach (cx_pages_get() as $page): ?>
55 <li><a href="<?= cx_url('/' . $page->slug); ?>"><?= $page->title ?></a></li>
56 <?php endforeach; ?>
57 </ul>
58
59 </nav>
60
61 <?= cx_template_content(); ?>
62
63 <footer>
64
65 <div>
66 <p>&copy; <?= date('Y'); ?> <?= cx_site_name(); ?> &middot; <?= cx_site_author(); ?></p>
67 </div>
68
69 </footer>
70
71 </body>
72 </html>