Files
fnx_web/res/template/account/user_home.html
2020-01-17 20:32:21 +01:00

60 lines
1.7 KiB
HTML

{{define "user_home"}}<!DOCTYPE html>
<html lang="en">
<head>
{{template "meta_tags" .Username}}
{{template "user_style" .}}
<script>var apiEndpoint = '{{.APIEndpoint}}';</script>
</head>
<body>
{{template "page_top" .}}
<h1>Welcome home, {{.Username}}!</h1>
<div class="page_content"><div class="limit_width">
<h2>Account information</h2>
<ul>
<li>Username: {{.Username}}</li>
<li>E-mail address: {{.Email}}</li>
</ul>
<a href="/user/settings" class="button">Update account settings</a>
<h2>Your most recently uploaded files:</h2>
<div class="highlight_dark">
{{$files := .PixelAPI.UserFiles 0 15}}
{{range $files.Files}}<!--
--><a class="file_button" href="/u/{{.ID}}" target="_blank">
<img src="{{$.APIEndpoint}}/file/{{.ID}}/thumbnail?width=80&height=80" alt="{{.Name}}" />
<span style="color: var(--highlight_color);">{{.Name}}</span>
<br/>
{{.DateUpload.Format "2006-01-02 15:04:05"}}
</a><!--
-->{{end}}
<br/>
<a href="/user/files" class="button">...All my files</a>
</div>
<h2>Your most recently created lists:</h2>
<div class="highlight_dark">
{{$lists := .PixelAPI.UserLists 0 15}}
{{range $lists.Lists}}<!--
--><a class="file_button" href="/l/{{.ID}}" target="_blank">
<img src="{{$.APIEndpoint}}/list/{{.ID}}/thumbnail?width=80&height=80" alt="{{.Title}}" />
<span style="color: var(--highlight_color);">{{.Title}}</span>
({{.FileCount}} Files)
<br/>
{{.DateCreated.Format "2006-01-02 15:04:05"}}
</a><!--
-->{{end}}
<br/>
<a href="/user/lists" class="button">...All my lists</a>
</div>
<br/><br/>
</div></div>
{{template "page_bottom" .}}
{{template "analytics"}}
</body>
</html>
{{end}}