treehouse/template/_history.hbs
liquidex c58c07d846 version history MVP
implement basic version history support; there's now an icon in the footer that lets you see the previous versions and their sources
I'm a bit worried about spoilers but honestly it's yet another way to hint yourself at the cool secrets so I don't mind
2024-09-28 23:45:06 +02:00

43 lines
1.1 KiB
Handlebars

<!DOCTYPE html>
<html lang="en-US" prefix="og: https://ogp.me/ns#">
<head>
{{> components/_head.hbs }}
<link rel="stylesheet" href="{{ asset 'css/history.css' }}">
</head>
<body>
{{#> components/_nav.hbs }}
{{/ components/_nav.hbs }}
{{> components/_noscript.hbs }}
<main class="version-history">
<p>{{ len page.commits }} commits</p>
<ul class="commits">
{{#each page.commits}}
<li>
<a class="revision-number" href="{{ ../config.site }}/{{ ../page.tree_path }}@{{ revision_number }}">#{{ revision_number }}</a>
<a href="{{ ../config.commit_base_url }}/{{ hash }}/content/{{ ../page.tree_path }}.tree"><code>{{ hash_short }}</code></a>
{{#if body}}
<details>
<summary class="summary">{{ summary }}</summary>
{{ body }}
</details>
{{else}}
<span class="summary">{{ summary }}</span>
{{/if}}
</li>
{{/each}}
</ul>
</main>
{{> components/_footer.hbs }}
</body>
</html>