Files
fnx_web/res/template/account/user_files.html

63 lines
2.2 KiB
HTML
Raw Normal View History

2018-07-09 21:41:17 +02:00
{{define "user_files"}}<!DOCTYPE html>
<html>
<head>
2018-07-09 21:41:17 +02:00
{{template "meta_tags" "Files"}}
{{template "user_style" .}}
<script type="text/javascript">var apiEndpoint = '{{.APIEndpoint}}';</script>
</head>
<body>
{{template "menu" .}}
2019-07-17 23:19:57 +02:00
<div class="highlight_middle">
These files were uploaded while logged in to your pixeldrain account,
<a href="/history">click here</a> to view files uploaded anonymously
in this browser.
</div>
2019-02-18 22:42:20 +01:00
{{$limit := 200}}
2019-02-07 23:09:54 +01:00
{{$page := .URLQuery.Get "page" | pageNr}}
{{$files := .PixelAPI.UserFiles $page $limit}}
<div class="highlight_dark">
{{if ne $page 0}}
<a href="?page={{sub $page 4}}" class="button">🡄 4 Pages</a>
<a href="?page={{sub $page 2}}" class="button">⬅ 2 Pages</a>
<a href="?page={{sub $page 1}}" class="button button_highlight" style="margin-right: 2em;">← Last Page</a>
{{end}}
Page {{$page}}
{{if len $files.Files | eq $limit}}
<a href="?page={{add $page 1}}" class="button button_highlight" style="margin-left: 2em;">Next Page →</a>
<a href="?page={{add $page 2}}" class="button">2 Pages ⮕</a>
<a href="?page={{add $page 4}}" class="button">4 Pages 🡆</a>
{{end}}
</div>
2018-07-08 14:40:20 +02:00
<br/>
2019-02-07 23:09:54 +01:00
2019-08-11 17:16:18 +02:00
{{range $files.Files}}<!--
--><a class="file_button" href="/u/{{.ID}}" target="_blank">
2018-10-04 23:36:34 +02:00
<img src="{{$.APIEndpoint}}/file/{{.ID}}/thumbnail" alt="{{.Name}}" />
<span style="color: var(--highlight_color);">{{.Name}}</span>
2018-07-08 14:40:20 +02:00
<br/>
2018-09-10 22:55:31 +02:00
{{.DateUpload.Format "2006-01-02 15:04:05"}}
2019-08-11 17:16:18 +02:00
</a><!--
-->{{end}}
2019-02-07 23:09:54 +01:00
<br/>
<div class="highlight_dark">
{{if ne $page 0}}
<a href="?page={{sub $page 4}}" class="button">🡄 4 Pages</a>
<a href="?page={{sub $page 2}}" class="button">⬅ 2 Pages</a>
<a href="?page={{sub $page 1}}" class="button button_highlight" style="margin-right: 2em;">← Last Page</a>
{{end}}
Page {{$page}}
{{if len $files.Files | eq $limit}}
<a href="?page={{add $page 1}}" class="button button_highlight" style="margin-left: 2em;">Next Page →</a>
<a href="?page={{add $page 2}}" class="button">2 Pages ⮕</a>
<a href="?page={{add $page 4}}" class="button">4 Pages 🡆</a>
{{end}}
</div>
{{template "analytics"}}
</body>
</html>
{{end}}