2019-02-24 08:25:39 +00:00
|
|
|
{{ $path := .Path }}
|
|
|
|
{{ $prev := .Previous }}
|
|
|
|
{{ $prefix := .Prefix }}
|
|
|
|
{{ $singleprefix := .SinglePrefix }}
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<title>{{ $path }} | PiNas</title>
|
|
|
|
<link rel="stylesheet" href="/assets/styles.css">
|
|
|
|
</head>
|
|
|
|
<body>
|
2019-02-24 10:59:16 +00:00
|
|
|
<header>
|
|
|
|
<a href="/" class="back-button">
|
2019-02-24 18:10:08 +00:00
|
|
|
<img src="/assets/svgs/back.svg" alt="">
|
2019-02-24 10:59:16 +00:00
|
|
|
</a>
|
|
|
|
<h1 style="display: inline-block">PiNas</h1>
|
|
|
|
</header>
|
2019-02-24 08:25:39 +00:00
|
|
|
<main>
|
|
|
|
<div>
|
2019-02-24 09:02:03 +00:00
|
|
|
<h1>{{$prefix}}/{{$path}}</h1>
|
2019-02-24 08:25:39 +00:00
|
|
|
</div>
|
|
|
|
<div class="content">
|
2019-02-24 22:42:21 +00:00
|
|
|
{{ if eq $prefix "files" }}
|
|
|
|
<form action="/upload" method="post" enctype="multipart/form-data">
|
|
|
|
<input type="value" value="{{$path}}" name="path">
|
|
|
|
<input type="file" data-multiple-caption="{count} files selected" multiple name="file">
|
|
|
|
<input type="submit" value="Upload">
|
|
|
|
</form>
|
|
|
|
{{end}}
|
2019-02-24 09:02:03 +00:00
|
|
|
<p class="directory"><a href="/{{$prefix}}/{{$prev}}">..</a></p>
|
2019-02-24 08:25:39 +00:00
|
|
|
{{range $file := .Files}}
|
|
|
|
{{ if $file.IsDir }}
|
2019-02-24 10:59:16 +00:00
|
|
|
<p class="directory"><a href="/{{$prefix}}/{{$path}}/{{$file.Name}}">
|
2019-02-24 18:10:08 +00:00
|
|
|
<img src="/assets/svgs/directory.svg" alt="">
|
|
|
|
{{$file.Name}}</a>
|
2019-02-24 10:59:16 +00:00
|
|
|
</p>
|
2019-02-24 08:25:39 +00:00
|
|
|
{{ end }}
|
|
|
|
{{ if not $file.IsDir }}
|
2019-02-24 10:59:16 +00:00
|
|
|
<p class="file"><a href="/{{$singleprefix}}/{{$path}}/{{$file.Name}}">
|
2019-02-24 18:10:08 +00:00
|
|
|
<img src="/assets/svgs/file.svg" alt="">
|
2019-02-24 10:59:16 +00:00
|
|
|
{{$file.Name}}</a>
|
|
|
|
</p>
|
2019-02-24 08:25:39 +00:00
|
|
|
{{end}}
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
</main>
|
|
|
|
</body>
|
|
|
|
</html>
|