1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
<?php
$now_data = is_file(__DIR__ . '/now-data.php') ? (require __DIR__ . '/now-data.php') : ['updated' => '', 'sections' => []];
$now_updated = $now_data['updated'] ?: date('Y-m-d');
$now_sections = is_array($now_data['sections'] ?? null) ? $now_data['sections'] : [];
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>Now — SillyLaird</title>
<?php
$meta = [
'lang' => 'en',
'title' => 'Now — SillyLaird',
'desc' => 'What SillyLaird is up to right now.',
'base' => 'now/index',
'self_url' => 'https://www.sillylaird.ca/now/',
'en_url' => 'https://www.sillylaird.ca/now/',
'ja_url' => 'https://www.sillylaird.ca/now/',
'zh_url' => 'https://www.sillylaird.ca/now/',
'x_default' => 'https://www.sillylaird.ca/now/',
];
include __DIR__ . '/../partials/head_meta.php';
?>
<link rel="stylesheet" href="/assets/css/fonts.css" />
<link rel="stylesheet" href="/assets/css/site.css" />
<link rel="stylesheet" href="/assets/css/skeleton.css" />
</head>
<body>
<a class="skip-link" href="#main">Skip to content</a>
<?php include '../partials/header.php'; ?>
<main id="main" class="wrap">
<section aria-labelledby="now-title">
<h1 id="now-title">Now</h1>
<p class="muted">What I'm up to — updated <?= htmlspecialchars($now_updated, ENT_QUOTES, 'UTF-8') ?>. Inspired by <a href="https://nownownow.com/about" target="_blank" rel="noopener noreferrer">nownownow.com</a>.</p>
</section>
<?php foreach ($now_sections as $i => $sec):
$title = (string)($sec['title'] ?? '');
$items = is_array($sec['items'] ?? null) ? $sec['items'] : [];
if ($title === '' || $items === []) continue;
$slug = preg_replace('/[^a-z0-9]+/', '-', strtolower($title)) ?: 'section-' . $i;
?>
<section aria-labelledby="<?= htmlspecialchars($slug, ENT_QUOTES, 'UTF-8') ?>-title">
<h2 id="<?= htmlspecialchars($slug, ENT_QUOTES, 'UTF-8') ?>-title"><?= htmlspecialchars($title, ENT_QUOTES, 'UTF-8') ?></h2>
<ul class="contact-list">
<?php foreach ($items as $item): ?>
<li><?= htmlspecialchars((string)$item, ENT_QUOTES, 'UTF-8') ?></li>
<?php endforeach; ?>
</ul>
</section>
<?php endforeach; ?>
</main>
<?php include '../partials/footer.php'; ?>
</body>
</html>
|