bunbun/src/templates/list.hbs

63 lines
2.0 KiB
Handlebars

<!DOCTYPE html>
<html lang="en">
<head>
<title>Bunbun Command List</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Bunbun search multiplexer/jump service">
<style type="text/css">
body {
display: flex;
flex-direction: column;
align-items: center;
background-color: #212121;
color: #fff;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}
h1, p { margin: 0; }
table { margin-bottom: 1rem; }
header { display: flex; flex-wrap: wrap; align-items: baseline; margin-top: 2rem; }
header h2 { margin: 0 1rem 0 0; }
i { color: rgba(255, 255, 255, 0.5); }
td, th { padding: 0 0.5rem; }
.shortcut { text-align: right; }
.description { text-align: left; width: 100%; }
footer {
margin-top: 1rem;
color: #444;
}
</style>
</head>
<body>
<h1>Bunbun Command List</h1>
<p><i>To edit this list, edit your <code>bunbun.yaml</code> file.</i></p>
<main>
{{~#each this}} {{!-- Iterate over RouteGroup --}}
{{~#unless this.hidden}}
<header><h2>{{this.name}}</h2><i>{{this.description}}</i></header>
<table>
<tr>
<th>Shortcut</th>
<th class="description">Description</th>
</tr>
{{~#each this.routes}} {{!-- Iterate over Route --}}
{{~#unless this.hidden}}
<tr>
<td class="shortcut">{{@key}}</td>
{{~#if this.description~}}
<td class="description">{{this.description}}</td>
{{~else~}}
<td class="description">{{this.path}}</td>
{{~/if}}
</tr>
{{~/unless}}
{{~/each}}
</table>
{{~/unless}}
{{~/each}}
</main>
<footer>
<p>{{> bunbun_version}}</p>
</footer>
</body>
</html>