filebrowser/_assets/templates/base.tmpl

129 lines
4.5 KiB
Cheetah
Raw Normal View History

2017-06-25 08:11:25 +00:00
<!DOCTYPE html>
<html>
2017-06-25 13:24:26 +00:00
{{ $absURL := .BaseURL }}
2017-06-25 08:11:25 +00:00
<head>
<title>{{.Name}}</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">
<meta charset="utf-8">
2017-06-25 13:24:26 +00:00
<link rel="stylesheet" href="{{ .BaseURL }}/_internal/css/normalize.css">
<link rel="stylesheet" href="{{ .BaseURL }}/_internal/css/fonts.css">
<link rel="stylesheet" href="{{ .BaseURL }}/_internal/css/styles.css">
2017-06-25 08:11:25 +00:00
{{- if ne .User.StyleSheet "" -}}
<style>{{ CSS .User.StyleSheet }}</style>
{{- end -}}
2017-06-26 20:09:03 +00:00
<script>
var data = {
user: JSON.parse('{{ Marshal .User }}'),
webdavURL: "{{ .WebDavURL }}",
baseURL: "{{.BaseURL}}",
prefixURL:"{{ .PrefixURL }}"
}
</script>
<!-- TODO: remove this one after moving the JS to ^^ -->
2017-06-25 08:11:25 +00:00
<script>
var user = JSON.parse('{{ Marshal .User }}'),
2017-06-25 13:24:26 +00:00
webdavURL = "{{ .WebDavURL }}",
baseURL = "{{.BaseURL}}",
prefixURL = "{{ .PrefixURL }}";
2017-06-25 08:11:25 +00:00
</script>
2017-06-26 20:09:03 +00:00
2017-06-25 13:24:26 +00:00
<script src="{{ .BaseURL }}/_internal/js/common.js" defer></script>
2017-06-25 08:11:25 +00:00
{{- if .IsDir }}
2017-06-25 13:24:26 +00:00
<script src="{{ .BaseURL }}/_internal/js/listing.js" defer></script>
2017-06-25 08:11:25 +00:00
{{- else }}
2017-06-25 13:24:26 +00:00
<script src="{{ .BaseURL }}/_internal/js/vendor/ace/src-min/ace.js" defer></script>
<script src="{{ .BaseURL }}/_internal/js/vendor/form2js.js" defer></script>
<script src="{{ .BaseURL }}/_internal/js/editor.js" defer></script>
2017-06-25 08:11:25 +00:00
{{- end }}
</head>
<body>
<header>
<div id="top-bar">
2017-06-26 20:09:03 +00:00
<svg id="content" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 144 144">
<circle cx="72" cy="72" r="72" fill="#2979ff"/>
<circle cx="72" cy="72" r="48" fill="#40c4ff"/>
<circle cx="72" cy="72" r="24" fill="#fff"/>
</svg>
2017-06-25 08:11:25 +00:00
<div id="search">
<i class="material-icons" title="Search">search</i>
<input type="text" aria-label="Write here to search" placeholder="Search or execute a command...">
<div>
<div>Loading...</div>
<p><i class="material-icons spin">autorenew</i></p>
</div>
</div>
2017-06-26 20:09:03 +00:00
2017-06-25 08:11:25 +00:00
</div>
<div id="bottom-bar">
<div>
{{- if ne .Name "/"}}
<div data-dropdown tabindex="0" aria-label="Previous" role="button" class="action" id="previous">
<i class="material-icons" title="Previous">subdirectory_arrow_left</i>
<ul class="dropdown" id="breadcrumbs">
{{- range $item := .BreadcrumbMap }}
<a tabindex="0" href="{{ $absURL }}{{ $item.URL }}"><li>{{ $item.Name }}</li></a>
{{- end }}
</ul>
</div>
{{- end }}
{{ if ne .Name "/"}}<p id="current-file">{{ .Name }}</p>{{ end }}
</div>
<div class="actions{{ if .IsDir }} disabled{{ end }}" id="file-only">
2017-06-26 19:38:40 +00:00
{{- template "left-side-actions" . -}}
2017-06-25 08:11:25 +00:00
</div>
2017-06-26 19:38:40 +00:00
<button aria-label="More" class="action mobile-only" id="more">
2017-06-25 08:11:25 +00:00
<i class="material-icons">more_vert</i>
2017-06-26 19:38:40 +00:00
</button>
2017-06-25 08:11:25 +00:00
<div class="actions" id="main-actions">
2017-06-26 19:38:40 +00:00
{{- template "right-side-actions" . -}}
2017-06-25 08:11:25 +00:00
</div>
</div>
<div id="click-overlay"></div>
</header>
<div id="multiple-selection" class="mobile-only">
<p>Multiple selection enabled</p>
<div tabindex="0" role="button" class="action" id="multiple-selection-cancel">
<i class="material-icons" title="Clear">clear</i>
</div>
</div>
2017-06-26 19:38:40 +00:00
<nav id="sidebar">
2017-06-26 20:09:03 +00:00
<a class="action" href="{{ .BaseURL }}/">
2017-06-26 19:38:40 +00:00
<i class="material-icons">folder</i>
<span>My Files</span>
</a>
2017-06-26 20:09:03 +00:00
<div class="action" id="logout" tabindex="0" role="button" aria-label="Log out">
<i class="material-icons" title="Logout">exit_to_app</i>
<span>Logout</span>
</div>
2017-06-26 19:38:40 +00:00
</nav>
2017-06-25 08:11:25 +00:00
<main>
{{- template "content" . }}
</main>
<div class="overlay"></div>
{{- if and (.User.AllowNew) (.IsDir) }}
<div class="floating">
<div tabindex="0" role="button" class="action" id="new">
<i class="material-icons" title="New file or directory">add</i>
</div>
</div>
{{- end }}
2017-06-25 21:43:43 +00:00
{{ template "templates" . }}
2017-06-25 08:11:25 +00:00
2017-06-26 20:09:03 +00:00
<footer>Served with <a rel="noopener noreferrer" href="https://github.com/hacdias/caddy-filemanager">File Manager</a>.</footer>
2017-06-25 08:11:25 +00:00
</body>
2017-06-26 20:17:52 +00:00
</html>