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
This commit is contained in:
parent
46dee56331
commit
c58c07d846
28 changed files with 1066 additions and 330 deletions
42
template/_history.hbs
Normal file
42
template/_history.hbs
Normal file
|
@ -0,0 +1,42 @@
|
|||
<!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>
|
Loading…
Add table
Add a link
Reference in a new issue