filebrowser/assets/templates/base.tmpl

43 lines
1.1 KiB
Cheetah
Raw Normal View History

2016-06-10 21:18:44 +00:00
<!DOCTYPE html>
<html>
<head>
<title>{{.Name}}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
2016-06-11 09:37:36 +00:00
<script src="https://use.fontawesome.com/ede56571a0.js"></script>
2016-06-11 09:08:33 +00:00
<link rel="stylesheet" href="/_filemanagerinternal/css/styles.css">
2016-06-10 21:18:44 +00:00
<style>
2016-06-11 09:08:33 +00:00
2016-06-10 21:18:44 +00:00
</style>
</head>
<body>
<header>
<h1>
{{range $url, $name := .BreadcrumbMap}}<a href="{{$url}}">{{$name}}</a>{{if ne $url "/"}}/{{end}}{{end}}
</h1>
</header>
<main>
2016-06-11 09:08:33 +00:00
{{ template "content" .Data }}
2016-06-10 21:18:44 +00:00
</main>
<footer>
Served with <a rel="noopener noreferrer" href="https://caddyserver.com">Caddy</a>.
</footer>
<script type="text/javascript">
function localizeDatetime(e, index, ar) {
if (e.textContent === undefined) {
return;
}
var d = new Date(e.getAttribute('datetime'));
if (isNaN(d)) {
d = new Date(e.textContent);
if (isNaN(d)) {
return;
}
}
e.textContent = d.toLocaleString();
}
var timeList = Array.prototype.slice.call(document.getElementsByTagName("time"));
timeList.forEach(localizeDatetime);
</script>
</body>
</html>