filebrowser/assets/embed/templates/base.tmpl

132 lines
4.1 KiB
Cheetah
Raw Normal View History

2016-06-10 21:18:44 +00:00
<!DOCTYPE html>
<html>
2016-06-28 09:01:00 +00:00
<head>
<title>{{.Name}}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<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">
2016-06-26 17:30:08 +00:00
{{ if ne .User.StyleSheet "" }}
2016-06-28 09:01:00 +00:00
<style>
{{ CSS .User.StyleSheet }}
2016-06-28 09:01:00 +00:00
</style>
{{ end }}
</head>
<body>
<header>
<div>
{{ $lnk := .PreviousLink }}
{{ if ne $lnk ""}}
<a href="{{ $lnk }}">
{{ end }}
2016-06-30 20:28:44 +00:00
<div class="action{{ if eq $lnk ""}} disabled{{ end }}" id="prev">
<i class="material-icons" title="Previous">subdirectory_arrow_left</i>
2016-06-28 09:01:00 +00:00
</div>
{{ if ne $lnk ""}}
</a>
{{ end }}
2016-06-26 15:52:15 +00:00
2016-07-01 09:01:31 +00:00
<div class="action" id="open-nav">
<i class="material-icons" title="Menu">menu</i>
2016-07-01 09:01:31 +00:00
</div>
2016-06-28 09:01:00 +00:00
<p>
<a href="{{ if eq .Config.AbsoluteURL "" }}/{{ else }}{{ .Config.AbsoluteURL }}{{ end }}">
2016-06-28 09:01:00 +00:00
{{ if .Config.HugoEnabled }}Hugo{{ else }}File Manager{{ end }}
</a>
{{ if ne .Name "/"}}
<i class="material-icons">chevron_right</i>{{ .Name }}
</p>
{{ end }}
</div>
2016-06-22 20:03:48 +00:00
2016-06-28 09:01:00 +00:00
<div>
2016-07-01 09:46:09 +00:00
<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>
2016-07-01 09:46:09 +00:00
</div>
{{ if ne $lnk ""}}
</a>
{{ end }}
<p>
<a href="{{ if eq .Config.AbsoluteURL "" }}/{{ else }}{{ .Config.AbsoluteURL }}{{ end }}">
2016-07-01 09:46:09 +00:00
{{ if .Config.HugoEnabled }}Hugo{{ else }}File Manager{{ end }}
</a>
</p>
</div>
{{ if .IsDir}}
2016-08-21 19:10:12 +00:00
{{ if .User.AllowCommands }}
2016-07-01 09:46:09 +00:00
<div id="search">
<i class="material-icons" title="Storage">storage</i>
2016-07-01 09:46:09 +00:00
<input type="text" placeholder="Execute a command...">
<div>Write your git, mercurial or svn command and press enter.</div>
</div>
2016-08-21 19:10:12 +00:00
{{ end }}
2016-07-01 09:46:09 +00:00
<div class="action" id="view">
<i class="material-icons" title="Switch view">view_headline</i> <span>Switch view</span>
2016-07-01 09:46:09 +00:00
</div>
2016-08-21 19:10:12 +00:00
{{ if .User.AllowNew }}
2016-07-01 09:46:09 +00:00
<div class="action" id="upload">
<i class="material-icons" title="Upload">file_upload</i> <span>Upload</span>
2016-07-01 09:46:09 +00:00
</div>
2016-08-21 19:10:12 +00:00
{{ end }}
2016-07-01 09:46:09 +00:00
{{ else }}
{{ template "actions" . }}
{{ end }}
<div class="action" id="logout">
<i class="material-icons" title="Logout">exit_to_app</i> <span>Logout</span>
2016-07-01 09:46:09 +00:00
</div>
2016-06-28 09:01:00 +00:00
</div>
2016-07-01 09:46:09 +00:00
<div id="overlay"></div>
2016-06-28 09:01:00 +00:00
</header>
2016-06-14 19:33:59 +00:00
2016-06-28 09:01:00 +00:00
{{ if .IsDir }}
<div id="toolbar">
2016-06-22 21:18:21 +00:00
<div>
2016-06-28 09:01:00 +00:00
<div class="action" id="back">
<i class="material-icons" title="Back">arrow_back</i>
2016-06-28 09:01:00 +00:00
</div>
<p>
<span id="selected-number">0</span>
selected.</p>
2016-06-22 21:18:21 +00:00
</div>
<div>
2016-06-28 09:01:00 +00:00
{{ template "actions" . }}
2016-06-26 17:30:08 +00:00
</div>
2016-06-28 09:01:00 +00:00
</div>
{{ end }}
2016-06-26 17:30:08 +00:00
2016-06-28 09:01:00 +00:00
<main>
2016-08-21 19:10:12 +00:00
{{ template "content" . }}
2016-07-05 16:46:45 +00:00
<span id="token">{{ .Config.Token }}</span>
2016-06-28 09:01:00 +00:00
</main>
2016-06-26 17:30:08 +00:00
2016-06-28 09:01:00 +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>.
{{ if .Config.HugoEnabled }}With a flavour of
<a rel="noopener noreferrer" href="https://github.com/hacdias/caddy-filemanager">Hugo</a>.{{ end }}
</footer>
2016-06-23 21:27:13 +00:00
2016-06-28 09:01:00 +00:00
<!-- SCRIPTS -->
<!-- User Data and Permissions -->
<script>var user = JSON.parse('{{ Marshal .User }}');</script>
2016-06-28 09:01:00 +00:00
<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 }}
2016-06-28 09:01:00 +00:00
</body>
2016-06-23 15:10:31 +00:00
</html>