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 href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
|
|
|
<link href='https://fonts.googleapis.com/css?family=Roboto:400,500' rel='stylesheet' type='text/css'>
|
|
|
|
<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-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-06-22 21:18:21 +00:00
|
|
|
<div>
|
2016-10-25 20:08:26 +00:00
|
|
|
<div class="action" id="back">
|
|
|
|
<i class="material-icons" title="Back">arrow_back</i>
|
|
|
|
</div>
|
|
|
|
<p>
|
|
|
|
<span id="selected-number">0</span>
|
|
|
|
selected.</p>
|
2016-06-22 21:18:21 +00:00
|
|
|
</div>
|
|
|
|
<div>
|
2016-10-25 20:08:26 +00:00
|
|
|
{{ template "actions" . }}
|
2016-06-26 17:30:08 +00:00
|
|
|
</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-01 12:30:59 +00:00
|
|
|
|
2016-10-25 20:08:26 +00:00
|
|
|
{{ template "content" . }}
|
|
|
|
</main>
|
|
|
|
|
|
|
|
<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>
|
|
|
|
|
|
|
|
<!-- SCRIPTS -->
|
|
|
|
<!-- User Data and Permissions; WebDavURL -->
|
|
|
|
<script>var user = JSON.parse('{{ Marshal .User }}'), webdavURL = "{{.Config.WebDavURL}}", baseURL = "{{.Config.BaseURL}}";</script>
|
|
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.3/ace.js"></script>
|
|
|
|
<script src="{{ .Config.AbsoluteURL }}/_filemanagerinternal/js/form2js.js"></script>
|
|
|
|
<script src="{{ .Config.AbsoluteURL }}/_filemanagerinternal/js/application.js"></script>
|
|
|
|
{{ if .Config.HugoEnabled }}<script src="{{ .Config.AbsoluteURL }}/_hugointernal/js/application.js"></script>{{ end }}
|
|
|
|
</body>
|
2016-06-23 15:10:31 +00:00
|
|
|
</html>
|