filebrowser/assets/templates/base.tmpl
2016-06-11 14:32:50 +01:00

46 lines
1.3 KiB
Cheetah

<!DOCTYPE html>
<html>
<head>
<title>{{.Name}}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://use.fontawesome.com/ede56571a0.js"></script>
<link href='https://fonts.googleapis.com/css?family=Roboto:400,500' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="/_filemanagerinternal/css/styles.css">
<style>
</style>
</head>
<body>
<header>
<div class="container">
<h1>
{{range $url, $name := .BreadcrumbMap}}{{if eq $url "/"}}<a href="{{$url}}">Home</a>{{end}}{{if ne $url "/"}}<i>></i><a href="{{$url}}">{{$name}}</a>{{end}}{{end}}
</h1>
</div>
</header>
<main>
{{ template "content" .Data }}
</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>