updates
This commit is contained in:
@@ -26,8 +26,7 @@
|
||||
<div class="main" id="container">
|
||||
{{ template "content" . }}
|
||||
</div>
|
||||
<footer>
|
||||
</footer>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -1,61 +1,69 @@
|
||||
{{ define "content" }}
|
||||
{{ define "content" }}{{ $path := .Path }}
|
||||
<header>
|
||||
<div class="content">
|
||||
<h1>{{.Path}}</h1>
|
||||
{{ $path := .Path }}
|
||||
</div>
|
||||
<h1>{{ $path }}</h1>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<main>
|
||||
<div class="content">
|
||||
{{if .CanGoUp}}
|
||||
<a href=".." class="up" title="Up one level">⬑</a>
|
||||
{{else}}
|
||||
<div class="up"> </div>
|
||||
{{end}}
|
||||
<main class="browse">
|
||||
<div class="actions">
|
||||
<div class="content">
|
||||
{{if .CanGoUp}}<a href=".." class="up" title="Up one level"><i class="fa fa-arrow-left fa-lg"></i></a>{{end}}
|
||||
<div class="go-right"><input type="file" value="Upload">
|
||||
<button id="upload">Upload <i class="fa fa-cloud-upload"></i></button>
|
||||
<button class="default">New <i class="fa fa-plus"></i></button></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>
|
||||
{{if and (eq .Sort "name") (ne .Order "desc")}}
|
||||
<a href="?sort=name&order=desc">Name ▲</a>
|
||||
{{else if and (eq .Sort "name") (ne .Order "asc")}}
|
||||
<a href="?sort=name&order=asc">Name ▼</a>
|
||||
{{else}}
|
||||
<a href="?sort=name&order=asc">Name</a>
|
||||
{{end}}
|
||||
</th>
|
||||
<th>
|
||||
{{if and (eq .Sort "size") (ne .Order "desc")}}
|
||||
<a href="?sort=size&order=desc">Size ▲</a>
|
||||
{{else if and (eq .Sort "size") (ne .Order "asc")}}
|
||||
<a href="?sort=size&order=asc">Size ▼</a>
|
||||
{{else}}
|
||||
<a href="?sort=size&order=asc">Size</a>
|
||||
{{end}}
|
||||
</th>
|
||||
<th class="hideable">
|
||||
{{if and (eq .Sort "time") (ne .Order "desc")}}
|
||||
<a href="?sort=time&order=desc">Modified ▲</a>
|
||||
{{else if and (eq .Sort "time") (ne .Order "asc")}}
|
||||
<a href="?sort=time&order=asc">Modified ▼</a>
|
||||
{{else}}
|
||||
<a href="?sort=time&order=asc">Modified</a>
|
||||
{{end}}
|
||||
</th>
|
||||
</tr>
|
||||
{{range .Items}}
|
||||
<tr>
|
||||
<td>
|
||||
{{if .IsDir}}📂<a href="{{.URL}}">{{.Name}}</a>{{else}}
|
||||
📄<a href="/admin/edit{{ $path }}{{.URL}}">{{.Name}}</a>{{end}}
|
||||
|
||||
</td>
|
||||
<td>{{.HumanSize}}</td>
|
||||
<td class="hideable">{{.HumanModTime "01/02/2006 3:04:05 PM -0700"}}</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</table>
|
||||
</div>
|
||||
<div class="content">
|
||||
<table>
|
||||
<tr>
|
||||
<th class="left">
|
||||
{{if and (eq .Sort "name") (ne .Order "desc")}}
|
||||
<a href="?sort=name&order=desc">Name <i class="fa fa-arrow-up"></i></a>
|
||||
{{else if and (eq .Sort "name") (ne .Order "asc")}}
|
||||
<a href="?sort=name&order=asc">Name <i class="fa fa-arrow-down"></i></a>
|
||||
{{else}}
|
||||
<a href="?sort=name&order=asc">Name</a>
|
||||
{{end}}
|
||||
</th>
|
||||
<th class="right">
|
||||
{{if and (eq .Sort "size") (ne .Order "desc")}}
|
||||
<a href="?sort=size&order=desc">Size <i class="fa fa-arrow-up"></i></a>
|
||||
{{else if and (eq .Sort "size") (ne .Order "asc")}}
|
||||
<a href="?sort=size&order=asc">Size <i class="fa fa-arrow-down"></i></a>
|
||||
{{else}}
|
||||
<a href="?sort=size&order=asc">Size</a>
|
||||
{{end}}
|
||||
</th>
|
||||
<th class="hideable right">
|
||||
{{if and (eq .Sort "time") (ne .Order "desc")}}
|
||||
<a href="?sort=time&order=desc">Modified <i class="fa fa-arrow-up"></i></a>
|
||||
{{else if and (eq .Sort "time") (ne .Order "asc")}}
|
||||
<a href="?sort=time&order=asc">Modified <i class="fa fa-arrow-down"></i></a>
|
||||
{{else}}
|
||||
<a href="?sort=time&order=asc">Modified</a>
|
||||
{{end}}
|
||||
</th>
|
||||
</tr>
|
||||
{{range .Items}}
|
||||
<tr>
|
||||
<td>
|
||||
{{if .IsDir}}
|
||||
<i class="fa fa-folder"></i> <a href="{{.URL}}">{{.Name}}</a>
|
||||
{{else}}
|
||||
{{ if isMarkdown .URL }}
|
||||
<i class="fa fa-file"></i> <a class="file" href="/admin/edit{{ $path }}{{.URL}}">{{.Name}}</a>
|
||||
{{ else }}
|
||||
<i class="fa fa-file"></i> {{.Name}}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</td>
|
||||
<td class="right">{{.HumanSize}}</td>
|
||||
<td class="right hideable">{{.HumanModTime "01/02/2006 3:04:05 PM -0700"}}</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</table>
|
||||
</div>
|
||||
</main>
|
||||
{{ end }}
|
||||
|
||||
Reference in New Issue
Block a user