2022-06-27 23:26:33 +04:00
:go:func Index(mainSite, currentPath string, stats *files.DirStats, items *[]files.DirEntry, r *http.Request)
2022-06-27 04:38:09 +04:00
:go:import "dwelling-files/pkg/files"
:go:import "dwelling-files/pkg/utils"
doctype html
html(lang='en')
head
title Arav's dwelling / Files
meta(charset='utf-8')
meta(http-equiv='X-UA-Compatible' content='IE=edge')
meta(name='viewport' content='width=device-width, initial-scale=1.0')
meta(name='theme-color' content='#cd2682')
meta(name='description' content='My file share.')
2022-06-27 23:46:53 +04:00
link(rel='icon' type='image/svg+xml' href='/assets/img/favicon.svg' sizes='any')
2022-06-27 04:38:09 +04:00
link(href='/assets/css/main.css' rel='stylesheet')
script(src='/assets/js/main.js' defer='')
body
header
svg#logo(viewBox='0 -25 216 40')
text.logo Arav's dwelling
text.under(y='11') Welcome to my sacred place, wanderer
nav
a(href=mainSite) Back to main website
h1 Files
section#files
2022-07-07 02:15:51 +04:00
span!= currentPath
2022-06-27 23:26:33 +04:00
p Files: #{stats.Files} (#{stats.FilesSize}); Directories: #{stats.Directories}.
2022-10-31 01:40:59 +04:00
input.hidden(type="text", name="filter" placeholder="Type in to filter this directory (case insensitive)")
2022-06-27 04:38:09 +04:00
table
thead
tr
th Name
th Date
th Size
2022-10-31 01:40:59 +04:00
tr(tabindex=0)
2022-06-27 04:38:09 +04:00
td #[a(href="../") ../]
2022-06-28 04:19:54 +04:00
tbody
2022-10-31 01:40:59 +04:00
each item, i in *items
tr(tabindex=i+1)
2022-06-27 04:38:09 +04:00
td #[a(href=item.Link) #{item.Name}]
td!= utils.ToClientTimezone(item.Datetime, r).Format(files.FileDateFormat)
td= item.Size
2022-07-07 02:15:51 +04:00
section
span!= currentPath
2022-06-28 01:58:53 +04:00
section#usage
2022-10-31 01:40:59 +04:00
p On a page use up and down arrow keys to navigate through list. Use home and end keys to go to the start and end of a list. Use Ctrl+Backspace to return to a parent directory.
p In an overlay use a mouse wheel to change a scale of a video or a picture. Use left and right arrow keys to go through media. Use space key to toggle pause. Use escape key to close an overlay, or click outside a media. An audio volume is being kept across site using LocalStorage API.
2022-06-27 04:38:09 +04:00
footer
2023-06-12 23:16:46 +04:00
| 2017—2023 Arav <#[a(href='mailto:me@arav.su') me@arav.su]> #[a(href=mainSite+'/privacy') Privacy statements]
2022-09-20 03:37:43 +04:00
div#overlay
button(name='prev') ❰
div
div
span
button(name='next') ❱