aboutsummaryrefslogtreecommitdiffstats
path: root/changelog/index.php
blob: bc011ac894e78758d5312ce2779d96f6919ca2ee (plain) (blame)
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
66
67
<?php
require_once __DIR__ . '/api/parser.php';
$by_year = get_changelog_by_year();
?>
<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8" />
  <meta name="viewport" content="width=device-width,initial-scale=1" />
  <?php
  $meta = [
    'lang'      => 'en',
    'title'     => 'ChangeLog -- SillyLaird',
    'desc'      => 'SillyLaird change log.',
    'base'      => 'changelog/index',
    'self_url'  => 'https://www.sillylaird.ca/changelog/',
    'en_url'    => 'https://www.sillylaird.ca/changelog/',
    'ja_url'    => 'https://www.sillylaird.ca/changelog/index_jp.php',
    'zh_url'    => 'https://www.sillylaird.ca/changelog/index_zh.php',
    'x_default' => 'https://www.sillylaird.ca/changelog/',
  ];
  include __DIR__ . '/../partials/head_meta.php';
?>
  <title>ChangeLog — SillyLaird</title>
  <link rel="alternate" type="application/atom+xml" title="Changelog Atom feed" href="/changelog/feed.xml.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" />
  <link rel="stylesheet" href="/assets/css/pages/changelog.css?v=<?= @filemtime(dirname(__DIR__)."/assets/css/pages/changelog.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="changelog-title">
      <h1 id="changelog-title" class="changelog-title">ChangeLog</h1>
      <p class="muted">All notes are copied verbatim.</p>

      <?php foreach ($by_year as $year => $entries): ?>
        <h2 id="year-<?= (int)$year ?>"><?= $year ?></h2>
        <?= render_changelog_list($entries) ?>
      <?php endforeach; ?>

      <hr />
      <section>
        <h2>Raw Log Files</h2>
        <ul class="changelog-files">
          <?php
          $files = glob(__DIR__ . '/*-changelog.txt');
          rsort($files);
          foreach ($files as $file):
            $base = basename($file);
            $size = filesize($file);
            if ($size <= 0) continue;
          ?>
            <li><a href="https://www.sillylaird.ca/changelog/<?= htmlspecialchars($base) ?>"><?= htmlspecialchars($base) ?></a> (<?= $size ?> bytes)</li>
          <?php endforeach; ?>
        </ul>
      </section>
    </section>
  </main>

  <?php include '../partials/footer.php'; ?>
</body>
</html>