get-sources/templates/index_template.html
Pierre-Olivier Mercier 459388fe60
All checks were successful
continuous-integration/drone/push Build is passing
Add S3 static page generator for bucket browsing
Implement Python-based generator that creates static HTML index pages for browsing S3 bucket contents. The generator produces nginx-style directory listings with hierarchical navigation.
2026-01-06 17:04:05 +07:00

53 lines
1.6 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="me" href="https://floss.social/@happyDomain">
<title>Index of {{ current_path }} - happyDomain downloads</title>
<style>
body {
font-family: monospace;
margin: 2em;
background: #fff;
color: #000;
}
h1 {
font-size: 1.2em;
font-weight: normal;
}
hr {
border: 0;
border-top: 1px solid #aaa;
margin: 1em 0;
}
pre {
line-height: 1.6;
margin: 0;
}
a {
color: #0066cc;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
address {
font-style: normal;
font-size: 0.9em;
color: #666;
}
</style>
</head>
<body>
<h1>Index of {{ current_path }}</h1>
<hr>
<pre>{% if parent_link %}<a href="../">../</a> -
{% endif %}{% for dir in directories %}<a href="{{ dir.name }}/">{{ dir.name }}/</a>{{ ' ' * (50 - dir.name|length) }}{{ dir.last_modified }} -
{% endfor %}{% for file in files %}<a href="{{ file.url }}">{{ file.name }}</a>{{ ' ' * (51 - file.name|length) }}{{ file.last_modified }}{{ ' ' * (20 - file.size|length) }}{{ file.size }}
{% endfor %}</pre>
<hr>
<address>Generated by happyDomain static index generator</address>
</body>
</html>