indir/templates/dir.html

191 lines
4.9 KiB
HTML
Raw Normal View History

<!doctype html>
2025-06-08 21:15:39 +01:00
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
2025-06-08 21:15:39 +01:00
<title>Files in {{.Name}}</title>
<style>
html {
background: #101010;
color: #f0f0f0;
font-family: "Monaspace Argon", monospace;
font-size: 16px;
}
body {
width: min(calc(100% - 1em), 1000px);
margin: 0 auto;
}
table {
width: 100%;
border-collapse: collapse;
}
tr:hover {
background-color: #80808040;
}
th {
text-align: left;
}
td {
width: 1%;
max-width: 500px;
padding: 0.2em 0;
}
table a {
display: block;
line-break: anywhere;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
a {
color: #b7fd49;
text-decoration: none;
}
a:hover {
color: white;
text-decoration: underline;
}
.readme {
margin-top: 2rem;
}
2026-03-16 21:01:53 +01:00
.readme h1, .readme h2, .readme h3,
.readme h4, .readme h5, .readme h6 {
color: #f0f0f0;
margin-top: 1.2rem;
}
2026-03-16 21:01:53 +01:00
.readme p, .readme li {
line-height: 1.7;
color: #d0d0d0;
}
2026-03-16 21:01:53 +01:00
.readme a {
color: #b7fd49;
}
2026-03-16 21:01:53 +01:00
.readme a:hover {
color: white;
text-decoration: underline;
}
2026-03-16 21:01:53 +01:00
.readme code {
background: #1e1e1e;
border: 1px solid #333;
border-radius: 3px;
2026-03-16 21:01:53 +01:00
padding: .1em, .4em;
font-family: 'Monaspace Argon', monospace;
font-size: .9em;
color: #b7fd79;
}
2026-03-16 21:01:53 +01:00
.readme pre {
background: #1e1e1e;
border: 3px solid #333;
border-radius: 6px;
padding: 1em;
overflow-x: auto;
}
2026-03-16 21:01:53 +01:00
.readme pre code {
border: none;
padding: 0;
background: transparent;
}
2026-03-16 21:01:53 +01:00
.readme blockquote {
border-left: 3px solid #b7fd49;
margin: 0;
padding-left: 1em;
color: #a0a0a0;
}
2026-03-16 21:01:53 +01:00
.readme hr {
border-color: #333;
}
2026-03-16 21:01:53 +01:00
.readme table {
width: auto;
}
2026-03-16 21:01:53 +01:00
.readme table td,
.readme table th {
border: 1px solid #333;
2026-03-16 21:01:53 +01:00
padding: .3em .6em;
width: auto;
}
2026-03-16 21:01:53 +01:00
footer {
padding: 1em 0;
}
@media screen and (max-width: 700px) {
body {
font-size: 12px;
}
td {
width: auto;
}
td:last-of-type,
th:last-of-type {
display: none;
}
}
2025-06-08 21:15:39 +01:00
</style>
</head>
<body>
<main>
<h1>Files in {{.Name}}</h1>
<hr />
2025-06-08 21:15:39 +01:00
<table>
<tr>
<th>Name</th>
<th>Size</th>
<th>Modified</th>
</tr>
{{if not .Root}}
<tr>
<td><a href="./..">../</a></td>
<td>&mdash;</td>
<td>&mdash;</td>
</tr>
{{end}} {{range .Files}}
2025-06-08 21:15:39 +01:00
<tr>
<td><a href="{{.URI}}">{{.Name}}</a></td>
<td>{{if .IsDir}}&mdash;{{else}}{{.Size}}{{end}}</td>
<td>{{.ModifiedDate}}</td>
</tr>
{{end}}
</table>
<hr />
{{if .Readme}}
<article class="readme">
<h2>README</h2>
<hr />
{{.Readme}}
</article>
{{end}}
2025-06-08 21:15:39 +01:00
</main>
<footer>
<em
>made with <span aria-label="love"></span> by ari, 2025
<a
href="https://forge.arimelody.space/ari/indir"
target="_blank"
>[source]</a
></em
>
2025-06-08 21:15:39 +01:00
</footer>
</body>
</html>