teampltes update
parent
a22bc751ec
commit
f2846ebde5
|
@ -1,6 +1,16 @@
|
||||||
{{ define "actions" }}
|
{{ define "actions" }}
|
||||||
<div class="action" id="open"><i class="material-icons">open_in_new</i></div>
|
<div class="action" id="open">
|
||||||
{{ if .IsDir }}<div class="action" id="rename"><i class="material-icons">mode_edit</i></div>{{ end }}
|
<i class="material-icons">open_in_new</i>
|
||||||
<div class="action" id="download"><i class="material-icons">file_download</i></div>
|
</div>
|
||||||
<div class="action" id="delete"><i class="material-icons">delete</i></div>
|
{{ if .IsDir }}
|
||||||
|
<div class="action" id="rename">
|
||||||
|
<i class="material-icons">mode_edit</i>
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
<div class="action" id="download">
|
||||||
|
<i class="material-icons">file_download</i>
|
||||||
|
</div>
|
||||||
|
<div class="action" id="delete">
|
||||||
|
<i class="material-icons">delete</i>
|
||||||
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
@ -1,62 +1,101 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>{{.Name}}</title>
|
<title>{{.Name}}</title>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<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/icon?family=Material+Icons" rel="stylesheet">
|
||||||
<link href='https://fonts.googleapis.com/css?family=Roboto:400,500' rel='stylesheet' type='text/css'>
|
<link href='https://fonts.googleapis.com/css?family=Roboto:400,500' rel='stylesheet' type='text/css'>
|
||||||
<link rel="stylesheet" href="{{ .Config.BaseURL }}/_filemanagerinternal/css/styles.css">
|
<link rel="stylesheet" href="{{ .Config.BaseURL }}/_filemanagerinternal/css/styles.css">
|
||||||
<script src="{{ .Config.BaseURL }}/_filemanagerinternal/js/application.js"></script>
|
<script src="{{ .Config.BaseURL }}/_filemanagerinternal/js/application.js"></script>
|
||||||
{{ if ne .Config.StyleSheet "" }}<style>{{ .Config.StyleSheet}}</style>{{ end }}
|
{{ if ne .Config.StyleSheet "" }}
|
||||||
{{ if .Config.HugoEnabled }}
|
<style>
|
||||||
<!-- Hugo plugin stuff -->
|
{{.Config.StyleSheet}}
|
||||||
<link rel="stylesheet" href="{{ .Config.BaseURL }}/_hugointernal/css/styles.css">
|
</style>
|
||||||
<script src="{{ .Config.BaseURL }}/_hugointernal/js/application.js"></script>
|
{{ end }}
|
||||||
{{ end }}
|
{{ if .Config.HugoEnabled }}
|
||||||
</head>
|
<!-- Hugo plugin stuff -->
|
||||||
<body>
|
<link rel="stylesheet" href="{{ .Config.BaseURL }}/_hugointernal/css/styles.css">
|
||||||
<header>
|
<script src="{{ .Config.BaseURL }}/_hugointernal/js/application.js"></script>
|
||||||
<div>
|
{{ end }}
|
||||||
{{ $lnk := .PreviousLink }}
|
</head>
|
||||||
{{ if ne $lnk ""}}<a href="{{ if eq $lnk "/" }}/{{else }}../../{{.PreviousLink}}{{ end }}"><div class="action" id="prev"><i class="material-icons">subdirectory_arrow_left</i></div></a>{{ else }}
|
<body>
|
||||||
<div class="action disabled" id="prev"><i class="material-icons">subdirectory_arrow_left</i></div>{{ end }}
|
<header>
|
||||||
<p><a href="{{ if eq .Config.BaseURL "" }}/{{ else }}{{ .Config.BaseURL }}{{ end }}">{{ if .Config.HugoEnabled }}Hugo{{ else }}File Manager{{ end }}</a> {{ if ne .Name "/"}}<i class="material-icons">chevron_right</i> {{ .Name }}</p>{{ end }}
|
<div>
|
||||||
</div>
|
{{ $lnk := .PreviousLink }}
|
||||||
<div>
|
{{ if ne $lnk ""}}
|
||||||
{{ if .IsDir}}
|
<a href="{{ if eq $lnk " /" }}/{{else }}../../{{.PreviousLink}}{{ end }}">
|
||||||
<form>
|
<div class="action" id="prev">
|
||||||
<i class="material-icons">search</i> <input type="text" placeholder="Search">
|
<i class="material-icons">subdirectory_arrow_left</i>
|
||||||
</form>
|
</div>
|
||||||
<div class="action" id="view"><i class="material-icons">view_headline</i></div>
|
</a>{{ else }}
|
||||||
<div class="action" id="upload"><i class="material-icons">file_upload</i></div>
|
<div class="action disabled" id="prev">
|
||||||
{{ else }}
|
<i class="material-icons">subdirectory_arrow_left</i>
|
||||||
{{ template "actions" . }}
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
<p>
|
||||||
|
<a href="{{ if eq .Config.BaseURL " " }}/{{ else }}{{ .Config.BaseURL }}{{ end }}">
|
||||||
|
{{ if .Config.HugoEnabled }}Hugo{{ else }}File Manager{{ end }}
|
||||||
|
</a>
|
||||||
|
{{ if ne .Name "/"}}
|
||||||
|
<i class="material-icons">chevron_right</i>
|
||||||
|
{{ .Name }}</p>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
{{ if .IsDir}}
|
||||||
|
<form>
|
||||||
|
<i class="material-icons">search</i>
|
||||||
|
<input type="text" placeholder="Search">
|
||||||
|
</form>
|
||||||
|
<div class="action" id="view">
|
||||||
|
<i class="material-icons">view_headline</i>
|
||||||
|
</div>
|
||||||
|
<div class="action" id="upload">
|
||||||
|
<i class="material-icons">file_upload</i>
|
||||||
|
</div>
|
||||||
|
{{ else }}
|
||||||
|
{{ template "actions" . }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
{{ if .Config.HugoEnabled }}
|
{{ if .Config.HugoEnabled }}
|
||||||
<!-- Hugo plugin stuff -->
|
<!-- Hugo plugin stuff -->
|
||||||
<a href="{{ .Config.BaseURL }}/settings"><div class="action"><i class="material-icons">settings</i></div></a>
|
<a href="{{ .Config.BaseURL }}/settings">
|
||||||
<div class="action" id="logout"><i class="material-icons">exit_to_app</i></div>
|
<div class="action">
|
||||||
{{ end }}
|
<i class="material-icons">settings</i>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</a>
|
||||||
|
<div class="action" id="logout">
|
||||||
|
<i class="material-icons">exit_to_app</i>
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
{{ if .IsDir }}
|
{{ if .IsDir }}
|
||||||
<div id="toolbar">
|
<div id="toolbar">
|
||||||
<div>
|
<div>
|
||||||
<div class="action" id="back"><i class="material-icons">arrow_back</i></div>
|
<div class="action" id="back">
|
||||||
<p><span id="selected-number">0</span> selected.</p>
|
<i class="material-icons">arrow_back</i>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<p>
|
||||||
{{ template "actions" . }}
|
<span id="selected-number">0</span>
|
||||||
</div>
|
selected.</p>
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
<div>
|
||||||
<main>
|
{{ template "actions" . }}
|
||||||
{{ template "content" .Data }}
|
</div>
|
||||||
</main>
|
</div>
|
||||||
<footer>
|
{{ end }}
|
||||||
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 }}
|
<main>
|
||||||
</footer>
|
{{ template "content" .Data }}
|
||||||
</body>
|
</main>
|
||||||
</html>
|
<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>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -1,30 +1,32 @@
|
||||||
{{ define "content" }}
|
{{ define "content" }}
|
||||||
<div class="listing">
|
<div class="listing">
|
||||||
<div class="container" id="listing">
|
<div class="container" id="listing">
|
||||||
{{- range .Items}}
|
{{- range .Items}}
|
||||||
<div class="item" id="{{.URL}}">
|
<div class="item" id="{{.URL}}">
|
||||||
<div>
|
<div>
|
||||||
<a href="{{.URL}}">
|
<a href="{{.URL}}">
|
||||||
{{- if .IsDir}}
|
{{- if .IsDir}}
|
||||||
<i class="material-icons">folder</i>
|
<i class="material-icons">folder</i>
|
||||||
{{- else}}
|
{{- else}}
|
||||||
<i class="material-icons">insert_drive_file</i>
|
<i class="material-icons">insert_drive_file</i>
|
||||||
{{- end}}
|
{{- end}}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<a href="{{.URL}}">
|
<a href="{{.URL}}">
|
||||||
<span class="name">{{.Name}}</span>
|
<span class="name">{{.Name}}</span>
|
||||||
{{- if .IsDir}}
|
{{- if .IsDir}}
|
||||||
<p data-order="-1">—</p>
|
<p data-order="-1">—</p>
|
||||||
{{- else}}
|
{{- else}}
|
||||||
<p data-order="{{.Size}}">{{.HumanSize}}</p>
|
<p data-order="{{.Size}}">{{.HumanSize}}</p>
|
||||||
{{- end}}
|
{{- end}}
|
||||||
<p class="hideable"><time datetime="{{.HumanModTime "2006-01-02T15:04:05Z"}}">{{.HumanModTime "01/02/2006 03:04:05 PM -07:00"}}</time></p>
|
<p class="hideable">
|
||||||
</a>
|
<time datetime="{{.HumanModTime " 2006-01-02T15:04:05Z"}}">{{.HumanModTime "01/02/2006 03:04:05 PM -07:00"}}</time>
|
||||||
</div>
|
</p>
|
||||||
</div>
|
</a>
|
||||||
{{- end}}
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{{- end}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
@ -1,18 +1,15 @@
|
||||||
{{ define "content" }}
|
{{ define "content" }}
|
||||||
|
|
||||||
<main class="container">
|
<main class="container">
|
||||||
|
|
||||||
{{ if eq .Type "image" }}
|
{{ if eq .Type "image" }}
|
||||||
<img src="{{ .URL }}?raw=true">
|
<img src="{{ .URL }}?raw=true">
|
||||||
{{ else if eq .Type "audio" }}
|
{{ else if eq .Type "audio" }}
|
||||||
<audio src="{{ .URL }}?raw=true">
|
<audio src="{{ .URL }}?raw=true"></audio>
|
||||||
</audio>
|
{{ else if eq .Type "video" }}
|
||||||
{{ else if eq .Type "video" }}
|
|
||||||
|
|
||||||
{{ else}}
|
{{ else}}
|
||||||
<pre>{{ .Content }}</pre>
|
<pre>{{ .Content }}</pre>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
</main>
|
||||||
</main>
|
|
||||||
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
Loading…
Reference in New Issue