]> git.bts.cx Git - cx.git/blob - cx/templates/public/pages/base.php
Add meta data for YT embeds to work
[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         <meta name="referrer" content="strict-origin-when-cross-origin" />
26
27         <?php if (isset($cx_post_meta)): ?>
28         
29         <meta property="og:type" content="article" />
30
31         <?php if (isset($cx_post_meta->hero_image)): ?>
32         <meta property="og:image" content="<?= $cx_post_meta->hero_image; ?>">
33         <?php endif; ?>
34
35         <meta property="og:url" content="<?= cx_url_site($cx_post_permalink); ?>">
36         <meta name="twitter:card" content="summary_large_image">
37
38         <?php if (isset($cx_post_meta->hero_image_alt)): ?>
39         <meta name="twitter:image:alt" content="<?= $cx_post_meta->hero_image_alt; ?>">
40         <?php endif; ?>
41
42         <?php endif; ?>
43 </head>
44
45 <body>
46 <header>
47   <h1><a href="<?= cx_url('/'); ?>"><?= cx_site_name(); ?></a></h1>
48   <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>
49 </header>
50
51 <nav>
52
53 <ul role="list">
54 <li><a href="<?= cx_url('/'); ?>">Home</a></li>
55
56 <?php foreach (cx_pages_get() as $page): ?>
57 <li><a href="<?= cx_url($page->get_permalink_path()); ?>"><?= $page->title ?></a></li>
58 <?php endforeach; ?>
59 </ul>
60
61 </nav>
62
63 <?= cx_template_content(); ?>
64
65 <footer>
66
67 <div>
68 <p>&copy; <?= date('Y'); ?> <?= cx_site_name(); ?> &middot; <?= cx_site_author(); ?></p>
69 </div>
70
71 </footer>
72
73 </body>
74 </html>