filebrowser/_embed/templates/base.tmpl

122 lines
4.7 KiB
Cheetah
Raw Normal View History

2016-06-10 21:18:44 +00:00
<!DOCTYPE html>
<html>
2016-10-25 20:08:26 +00:00
{{ $absURL := .Config.AbsoluteURL }}
<head>
<title>{{.Name}}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
2016-11-01 12:30:59 +00:00
<meta name="token" content="{{ .Token }}">
2016-10-25 20:08:26 +00:00
<link rel="stylesheet" href="{{ .Config.AbsoluteURL }}/_filemanagerinternal/css/styles.css">
{{ if ne .User.StyleSheet "" }}
<style>{{ CSS .User.StyleSheet }}</style>
2016-06-28 09:01:00 +00:00
{{ end }}
2016-12-29 18:01:28 +00:00
<!-- SCRIPTS -->
<!-- User Data and Permissions; WebDavURL -->
<script>var user = JSON.parse('{{ Marshal .User }}'), webdavURL = "{{.Config.AbsoluteURL}}{{.Config.WebDavURL}}", baseURL = "{{.Config.AbsoluteURL}}";</script>
<script src="{{ .Config.AbsoluteURL }}/_filemanagerinternal/js/ace/ace.js" defer></script>
<script src="{{ .Config.AbsoluteURL }}/_filemanagerinternal/js/form2js.js" defer></script>
<script src="{{ .Config.AbsoluteURL }}/_filemanagerinternal/js/application.js" defer></script>
2016-10-25 20:08:26 +00:00
</head>
<body>
<header>
<div>
{{ $lnk := .PreviousLink }}
2016-07-01 09:46:09 +00:00
<div class="action{{ if eq $lnk ""}} disabled{{ end }}" id="prev">
2016-10-25 20:08:26 +00:00
{{ if ne $lnk ""}}<a href="{{ $lnk }}">{{ end }}
<i class="material-icons" title="Previous">subdirectory_arrow_left</i>
{{ if ne $lnk ""}}</a>{{ end }}
{{ if ne $lnk ""}}
<ul class="prev-links">
{{ range $link, $name := .BreadcrumbMap }}<a href="{{ $absURL }}{{ $link }}"><li>{{ $name }}</li></a>{{ end }}
</ul>
{{ end }}
2016-07-01 09:46:09 +00:00
</div>
2016-08-26 20:59:06 +00:00
2016-10-25 20:08:26 +00:00
<div class="action" id="open-nav">
<i class="material-icons" title="Menu">menu</i>
</div>
2016-07-01 09:46:09 +00:00
2016-10-25 20:08:26 +00:00
{{ if ne .Name "/"}}<p>{{ .Name }}</p>{{ end }}
</div>
2016-07-01 09:46:09 +00:00
2016-10-25 20:08:26 +00:00
<div>
<div class="only-side">
{{ $lnk := .PreviousLink }}
{{ if ne $lnk ""}}<a href="{{ $lnk }}">{{ end }}
<div class="action{{ if eq $lnk ""}} disabled{{ end }}" id="prev">
<i class="material-icons" title="Previous">subdirectory_arrow_left</i>
</div>
{{ if ne $lnk ""}}</a>{{ end }}
2016-07-01 09:46:09 +00:00
2016-10-25 20:08:26 +00:00
<p><a href="{{ if eq .Config.AbsoluteURL "" }}/{{ else }}{{ .Config.AbsoluteURL }}{{ end }}">File Manager</a></p>
</div>
2016-07-01 09:46:09 +00:00
2016-10-25 20:08:26 +00:00
{{ if .IsDir}}
{{ if .User.AllowCommands }}
<div id="search">
<i class="material-icons" title="Storage">storage</i>
2016-11-01 15:06:44 +00:00
<input type="text" placeholder="Search or execute a command...">
2016-11-01 15:00:36 +00:00
<div>
<div>Write your git, mercurial or svn command and press enter.</div>
<p><i class="material-icons spin">autorenew</i></p>
</div>
2016-10-25 20:08:26 +00:00
</div>
{{ end }}
<div class="action" id="view">
<i class="material-icons" title="Switch view">view_headline</i> <span>Switch view</span>
</div>
{{ if .User.AllowNew }}
<div class="action" id="upload">
<i class="material-icons" title="Upload">file_upload</i> <span>Upload</span>
</div>
{{ end }}
<div class="action">
<a href="?download=true">
<i class="material-icons" title="Download">file_download</i> <span>Download</span>
</a>
<ul class="prev-links">
<a href="?download=tarbz2"><li>tar.bz2</li></a>
<a href="?download=targz"><li>tar.gz</li></a>
<a href="?download=tar"><li>tar</li></a>
<a href="?download=zip"><li>zip</li></a>
</ul>
</div>
{{ else }}
{{ template "actions" . }}
{{ end }}
2016-07-01 09:46:09 +00:00
2016-10-25 20:08:26 +00:00
<div class="action" id="logout">
<i class="material-icons" title="Logout">exit_to_app</i> <span>Logout</span>
</div>
</div>
<div id="overlay"></div>
</header>
2016-06-14 19:33:59 +00:00
2016-10-25 20:08:26 +00:00
{{ if .IsDir }}
<div id="toolbar">
2016-11-02 19:29:29 +00:00
<div>
<div class="action" id="back">
<i class="material-icons" title="Back">arrow_back</i>
</div>
<p><span id="selected-number">0</span> selected.</p>
</div>
<div>
{{ template "actions" . }}
</div>
2016-10-25 20:08:26 +00:00
</div>
{{ end }}
2016-06-23 21:27:13 +00:00
2016-10-25 20:08:26 +00:00
<main>
2016-11-02 19:29:29 +00:00
{{ template "content" . }}
2016-10-25 20:08:26 +00:00
</main>
2016-11-02 19:29:29 +00:00
<footer>Served with <a rel="noopener noreferrer" href="https://caddyserver.com">Caddy</a> and <a rel="noopener noreferrer" href="https://github.com/hacdias/caddy-filemanager">File Manager</a>.</footer>
2016-10-25 20:08:26 +00:00
2016-12-29 18:01:28 +00:00
2016-10-25 20:08:26 +00:00
</body>
2016-06-23 15:10:31 +00:00
</html>