blindforge/templates/repo.html
2026-07-31 10:14:40 +02:00

52 lines
946 B
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>Repo - Blindforge</title>
<style type="text/css">
html, body {
margin: 0;
padding: 0;
}
.tree-dir {
list-style-type: "🗀";
}
.tree-file {
list-style-type: "🗋";
}
.giallo {
tab-size: 4;
}
.giallo-ln {
user-select: none;
margin-right: 2em;
}
</style>
</head>
<body>
<header>
<h1>Blindforge</h1>
</header>
<div id="tree">
<ul class="tree">
{% for (_, entry) in root.entries %}
{{ entry.render()?|safe }}
{% endfor %}
</ul>
</div>
<div id="page">
<h2>{{ title }}</h2>
<span>
{% for element in path %}/{{ element }}{% endfor %}
</span>
{% match current_entry %}
{% when Entry::Directory(dir) %}
{% when Entry::File(file) %}
<a href="/download/{{ repo_hash|safe }}/{{ file.path }}">Download file</a>
{% endmatch %}
<div id="content">
{{ content|safe }}
</div>
</div>
</body>
</html>