first commit

This commit is contained in:
Nixietab 2026-08-22 08:22:53 -03:00
commit 581d3e6da5
11 changed files with 987 additions and 0 deletions

64
assets/about.html Normal file
View file

@ -0,0 +1,64 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>about · kaidan</title>
<link rel="icon" href="/favicon.ico">
<style>
body {
background: #1a1a1a;
color: #e0e0e0;
font: 14px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
margin: 0;
padding: 24px;
max-width: 1200px;
margin-inline: auto;
}
a {
color: #8ab4f8;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
h1 {
font-size: 16px;
color: #e0e0e0;
margin: 0 0 16px;
}
p {
color: #666;
line-height: 1.6;
}
code {
background: #2a2a2a;
border: 1px solid #333;
padding: 2px 6px;
color: #e0e0e0;
}
footer {
margin-top: 32px;
color: #666;
letter-spacing: .08em;
}
</style>
</head>
<body>
<h1>kaidan</h1>
<p>as "stairs" in japanese.</p>
<p>a minimal, fast file index server. serves a directory tree over http.
every listing includes a ready-to-run <code>wget</code> command that
mirrors that directory recursively into your current folder.</p>
<p>licensed under the <a href="https://www.gnu.org/licenses/old-licenses/gpl-2.0.html">GPL 2.0</a>.
source available <a href="https://git.stairs.lat/nix/kaidan">here</a>.</p>
<p><a href="/">back to index</a></p>
<footer>kaidan 1.0</footer>
</body>
</html>

BIN
assets/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

166
assets/index.html Normal file
View file

@ -0,0 +1,166 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>{{.Path}} kaidan</title>
<link rel="icon" href="/favicon.ico">
<style>
body {
background: #1a1a1a;
color: #e0e0e0;
font: 14px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
margin: 0;
padding: 24px;
max-width: 1200px;
margin-inline: auto;
}
a {
color: inherit;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
.dir a {
color: #8ab4f8;
}
.crumbs {
margin-bottom: 12px;
color: #666;
}
.crumbs b {
color: #e0e0e0;
font-weight: normal;
}
table {
border-collapse: collapse;
width: 100%;
}
th {
text-align: left;
padding: 6px 10px;
border-bottom: 1px solid #333;
white-space: nowrap;
}
th a {
color: #666;
}
th a:hover {
color: #e0e0e0;
text-decoration: none;
}
td {
padding: 6px 10px;
border-bottom: 1px solid #333;
}
tr.dir:hover td {
background: #2a2a2a;
}
.num {
text-align: right;
color: #666;
white-space: nowrap;
}
td:first-child a {
overflow-wrap: anywhere;
}
.wrap {
overflow-x: auto;
}
.wget {
margin-top: 8px;
background: #2a2a2a;
border: 1px solid #333;
padding: 10px 14px;
color: #e0e0e0;
user-select: all;
overflow-wrap: anywhere;
}
.lbl {
color: #666;
font-size: 12px;
margin-top: 20px;
letter-spacing: .08em;
}
footer {
margin-top: 32px;
color: #666;
letter-spacing: .08em;
}
footer a {
color: #666;
}
footer a:hover {
color: #8ab4f8;
text-decoration: none;
}
.empty {
color: #666;
padding: 16px 10px;
}
@media (max-width: 600px) {
body {
padding: 12px;
font-size: 13px;
}
td,
th {
padding: 5px 6px;
}
.mod {
display: none;
}
.wget {
font-size: 12px;
}
}
</style>
</head>
<body>
<nav class="crumbs">{{range $i, $c := .Crumbs}}{{if $i}} / {{end}}<a href="{{$c.URL}}">{{$c.Name}}</a>{{end}}</nav>
<div class="wrap">
<table>
<thead><tr>{{range .Headers}}<th><a href="{{.URL}}">{{.Label}}{{if .Active}}{{if .Desc}} ▼{{else}} ▲{{end}}{{end}}</a></th>{{end}}</tr></thead>
<tbody>
{{if .HasParent}}<tr><td><a href="../">../</a></td><td class="num">-</td><td class="num"></td><td class="num mod"></td></tr>{{end}}
{{range .Rows}}
<tr{{if .IsDir}} class="dir"{{end}}>
<td><a href="{{.URL}}"{{if not .IsDir}} download{{end}}>{{.Name}}</a></td>
<td class="num">{{.Type}}</td>
<td class="num">{{if .IsDir}}-{{else}}{{.SizeS}}{{end}}</td>
<td class="num mod">{{.ModS}}</td>
</tr>
{{else}}<tr><td colspan="4" class="empty">empty directory</td></tr>{{end}}
</tbody>
</table>
</div>
<div class="lbl">Download this directory</div>
<div class="wget">{{.Wget}}</div>
<footer><a href="/about">{{.Footer}}</a></footer>
</body>
</html>