aboutsummaryrefslogtreecommitdiffstats
path: root/changelog/latest.php
blob: 434246a97898504fa03cc13ca4a090a66a2a90dd (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
<?php
require_once __DIR__ . '/api/parser.php';
$latest = get_changelog_entries(5);
?>
<div class="changelog-container">
  <?php foreach ($latest as $e): ?>
    <div class="changelog-entry">
      <b>Site update</b><br>
      <span style="font-size:13px;">
        <time datetime="<?= htmlspecialchars($e['date']) ?>"><?= htmlspecialchars($e['display_date']) ?></time>
      </span><br>
      <span class="text"><?= htmlspecialchars($e['text']) ?></span><br>
      <a class="changelog-more" href="https://www.sillylaird.ca/changelog/#year-<?= (int)$e['year'] ?>">more (<?= (int)$e['year'] ?>) &rarr;</a>
    </div>
  <?php endforeach; ?>
</div>

<div class="changelog-files-section">
  <p><strong>Raw Log Files:</strong></p>
  <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>
</div>

<a href="https://www.sillylaird.ca/changelog/">Full changelog &rarr;</a>