From b3c7dd7c415b913647348058073da1494909bfcc Mon Sep 17 00:00:00 2001 From: CronyAkatsuki Date: Tue, 19 Dec 2023 21:17:59 +0100 Subject: [PATCH] Serve basic files page. --- main.go | 6 ++++ public/views/files.html | 17 +++++++++++ static/css/files.css | 66 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 89 insertions(+) create mode 100644 public/views/files.html create mode 100644 static/css/files.css diff --git a/main.go b/main.go index e034d48..068c291 100644 --- a/main.go +++ b/main.go @@ -35,6 +35,8 @@ func main() { e.GET("/", Index) + e.GET("/files/", Files) + e.Logger.Fatal(e.Start(":1323")) } @@ -52,3 +54,7 @@ func Index(c echo.Context) error { "upload_only": true, }) } + +func Files(c echo.Context) error { + return c.Render(http.StatusOK, "files", "test") +} diff --git a/public/views/files.html b/public/views/files.html new file mode 100644 index 0000000..adb4f18 --- /dev/null +++ b/public/views/files.html @@ -0,0 +1,17 @@ +{{define "files"}} + + + + + Files - UpFast + + + + + + +

File List

+ + + +{{end}} diff --git a/static/css/files.css b/static/css/files.css new file mode 100644 index 0000000..538d2ea --- /dev/null +++ b/static/css/files.css @@ -0,0 +1,66 @@ +html { + padding-bottom: 10%; +} + +body { + max-width: 900px; + margin: auto; + background: #303446; + color: #c6d0f5; +} + +h1 { + font-size: 250%; + text-align: center; +} + +hr { + margin: 40px; + color: #626880; +} + +img { + display: block; + margin: auto; + max-width: 800px; + max-height: 800px; +} + +video { + display: block; + margin: auto; + max-width: 800px; + max-height: 800px; +} + +a { + color: #f2d5cf; + text-decoration: none; + font-weight: bold; + padding: 5px; +} + +a:hover { + text-decoration: underline; +} + +pre { + background: #292c3c; + font-size: 1am; + padding: 10px; + max-width: 800; + max-height: 10rem; + overflow-y: auto; + overflow-x: auto; + border: none; + border-radius: 1rem; +} + +.file { + display: block; +} + +.info { + display: block; + text-align: center; +}