From 9f836801f2d3bd1ce623cce30032c26041adbff5 Mon Sep 17 00:00:00 2001 From: Wim Brand Date: Tue, 17 Sep 2019 23:38:40 +0200 Subject: [PATCH] Convert every page to new layout --- res/static/script/history.js | 2 +- res/static/style/layout.css | 148 +++++++--------- res/template/404.html | 11 +- res/template/500.html | 11 +- res/template/about.html | 119 +++++++++++++ res/template/account/file_manager.html | 4 +- res/template/account/lists.html | 77 -------- res/template/account/logout.html | 44 ++--- res/template/account/user_files.html | 95 +++++----- res/template/account/user_home.html | 10 +- res/template/account/user_lists.html | 89 +++++----- res/template/account/user_settings.html | 11 +- res/template/admin.html | 224 ++++++++++++------------ res/template/apidoc.html | 12 +- res/template/donation.html | 8 +- res/template/file_not_found.html | 22 ++- res/template/file_viewer.html | 2 - res/template/fragments/bgpattern.html | 3 - res/template/fragments/form.html | 13 +- res/template/fragments/meta_tags.html | 3 +- res/template/fragments/page_wrap.html | 64 ++++--- res/template/fragments/user_style.html | 9 + res/template/history.html | 20 ++- res/template/home.html | 206 +++++++--------------- res/template/paste.html | 3 +- webcontroller/user_account.go | 14 -- webcontroller/user_style.go | 2 +- webcontroller/web_controller.go | 2 +- 28 files changed, 586 insertions(+), 642 deletions(-) create mode 100644 res/template/about.html delete mode 100644 res/template/account/lists.html delete mode 100644 res/template/fragments/bgpattern.html diff --git a/res/static/script/history.js b/res/static/script/history.js index 2049203..e8492b6 100644 --- a/res/static/script/history.js +++ b/res/static/script/history.js @@ -58,5 +58,5 @@ function historyAddItem(json) { + ("00" + date.getDate()).slice(-2) + ""; - $("#uploadedFiles").append($(uploadItem).hide().fadeIn(2000)); + $("#uploadedFiles").append($(uploadItem).hide().fadeIn(500)); } diff --git a/res/static/style/layout.css b/res/static/style/layout.css index 3fd4eef..f255443 100644 --- a/res/static/style/layout.css +++ b/res/static/style/layout.css @@ -72,71 +72,81 @@ body{ .page_wrapper { position: absolute; - display: flex; - flex-direction: column; top: 0; right: 0; bottom: 0; left: 0; overflow: hidden; } -.page_wrapper > .page_header { - flex-grow: 0; - flex-shrink: 0; - display: flex; - flex-direction: row; - line-height: 2em; - z-index: 101; -} -.page_wrapper > .page_header > span { - margin: 0 0.5em 0 0.5em; -} -.page_wrapper > .page_content_wrapper { - flex-grow: 1; - flex-shrink: 1; - position: relative; - display: inline-block; - width: auto; - height: auto; - margin: 0; -} -.page_wrapper > .page_content_wrapper > .page_navigation { +.button_toggle_navigation { + position: absolute; + z-index: 300; + top: 0; + left: 0; + padding: 10px 20px 15px 10px; + font-size: 2em; + margin: 0; + background: var(--input_color); + border-radius: 0; + border-bottom-right-radius: 90%; + box-shadow: 2px 2px 8px -3px var(--shadow_color); +} +.page_wrapper > .page_navigation { position: absolute; - width: 200px; z-index: 100; + width: 250px; float: left; background-color: var(--layer_1_color); left: 0; bottom: 0; top: 0; - padding: 0.5em 0 0.5em 0; + padding: 20px 0 0.5em 0; + overflow-y: auto; + overflow-x: hidden; text-align: left; - box-shadow: 2px 2px 8px var(--shadow_color); + box-shadow: inset -10px 0px 10px -10px var(--shadow_color); transition: left 0.5s; } -.page_wrapper > .page_content_wrapper > .page_content { +.page_wrapper > .page_body { position: absolute; + z-index: 200; top: 0; right: 0; bottom: 0; - left: 200px; + left: 250px; min-width: 300px; display: inline-block; text-align: center; /* Center the header and body */ - overflow-y: scroll; + overflow-y: auto; + overflow-x: hidden; z-index: 50; transition: left 0.5s; + padding-top: 40px; + background-image: var(--background_pattern); + background-attachment: local; } -@media (max-width: 500px) { - .page_wrapper > .page_content_wrapper > .page_navigation { - left: -210px; +@media (max-width: 600px) { + .page_wrapper > .page_navigation { + left: -250px; } - .page_wrapper > .page_content_wrapper > .page_content { + .page_wrapper > .page_body { left: 0; } } -.page_wrapper > .page_content_wrapper > .page_content > .centered { + +.page_wrapper > .page_body > .page_content { + position: relative; + display: inline-block; + width: 100%; + height: auto; + padding: 20px 0 20px 0; + background-color: var(--layer_2_color); + box-shadow: 1px 1px 20px 0 var(--shadow_color); + box-sizing: border-box; + clear: both; +} +.page_wrapper > .page_body > .page_content > .limit_width { position: relative; display: inline-block; max-width: 1000px; @@ -148,6 +158,9 @@ body{ word-break: break-word; clear: both; } +.page_wrapper > .page_body > h1 { + text-shadow: 1px 1px 25px #000000; +} /* Page contents */ @@ -158,59 +171,34 @@ body{ margin-bottom: 30px; } -.page_wrapper > .page_content_wrapper > .page_navigation a { +.page_wrapper > .page_navigation a { float: none; - display: inline-block; + display: block; box-sizing: border-box; color: #bfbfbf; /* Fallback */ color: var(--text_color); text-align: center; padding: 4px 6px; - margin: 0.1em 0 0.1em 0; - width: 100%; - text-decoration: none; + margin: 0.3em 15px 0.3em 15px; font-family: "Lato Thin", sans-serif; font-weight: bold; - font-size: 1.8em; - transition: box-shadow 5s; + font-size: 1.5em; + overflow: hidden; + text-overflow: ellipsis; + transition: background-color 0.5s; + border-radius: 5px; } -.page_wrapper > .page_content_wrapper > .page_navigation a:hover { - background: linear-gradient(#82c13e, #6da234); - background: linear-gradient(var(--highlight_color), var(--highlight_color_dark)); - box-shadow: #82c13e, 1px 1px 4px #000000; - box-shadow: var(--highlight_border), 1px 1px 4px var(--shadow_color); - color: #000000; - color: var(--highlight_text_color); - transition: box-shadow 0.5s; +.page_wrapper > .page_navigation a:hover { + background-color: var(--input_color); text-decoration: none; } -.page_wrapper > .page_content_wrapper > .page_navigation .icon { - display: none; -} -@media screen and (max-width: 35em) { - .navigation a:not(:first-child) {display: none;} - .navigation a.icon { - float: right; - display: block; - } - .navigation.responsive {position: relative;} - .navigation.responsive .icon { - position: absolute; - right: 0; - top: 0; - } - .navigation.responsive a { - float: none; - display: block; - text-align: left; - } -} .inset { - box-shadow: inset 1px 1px 10px -1px var(--shadow_color); + box-shadow: inset 1px 1px 20px 0 var(--shadow_color); } .checkers { text-shadow: 0 0 20px #000000; + padding: 30px 10px 30px 10px; } .highlight_dark, @@ -223,7 +211,7 @@ body{ position: relative; width: auto; height: auto; - margin: 0; + /* margin: 0; */ box-sizing: border-box; overflow: hidden; text-align: center; @@ -231,16 +219,16 @@ body{ } .highlight_dark { background-color: var(--layer_1_color); - box-shadow: 1px 1px var(--layer_1_shadow) -2px var(--shadow_color);} + box-shadow: 1px 1px var(--layer_1_shadow) 0 var(--shadow_color);} .highlight_middle { background-color: var(--layer_2_color); - box-shadow: 1px 1px var(--layer_2_shadow) -2px var(--shadow_color);} + box-shadow: 1px 1px var(--layer_2_shadow) 0 var(--shadow_color);} .highlight_light { background-color: var(--layer_3_color); - box-shadow: 1px 1px var(--layer_3_shadow) -2px var(--shadow_color);} + box-shadow: 1px 1px var(--layer_3_shadow) 0 var(--shadow_color);} .highlight_headerbar { background-color: var(--layer_4_color); - box-shadow: 1px 1px var(--layer_4_shadow) -2px var(--shadow_color);} + box-shadow: 1px 1px var(--layer_4_shadow) 0 var(--shadow_color);} .highlight_green { background-color: rgba(0, 255, 0, 0.05); border-color: #00d000;} @@ -280,10 +268,10 @@ p, .indent { } hr{ - height: 8px; + height: 1px; border: none; - background: linear-gradient(var(--layer_1_color), var(--layer_3_color)); - margin: 16px 0 16px 0; + background-color: var(--input_color); + margin: 16px 16px 16px 16px; } ::-webkit-scrollbar{ @@ -307,7 +295,7 @@ a:hover {color: var(--highlight_color); text-decoration: underline;} margin-left: auto; margin-right: auto; text-align: left; - max-width: 35em; + max-width: 40em; } table:not(.form) {border-collapse: collapse; width: 100%;} tr:not(.form) {border-bottom: 1px var(--layer_2_color_border) solid;} diff --git a/res/template/404.html b/res/template/404.html index a246a1c..734dd26 100644 --- a/res/template/404.html +++ b/res/template/404.html @@ -6,10 +6,9 @@ -
- {{template "menu" .}} - -

This page does not exist!

+ {{template "page_top" .}} +

This page does not exist!

+

If you came here by a link from this very same website you can tell me about it on @@ -22,8 +21,8 @@

Bye!

- {{template "footer"}} -
+
+ {{template "page_bottom"}} {{template "analytics"}} diff --git a/res/template/500.html b/res/template/500.html index 9374acb..7e71874 100644 --- a/res/template/500.html +++ b/res/template/500.html @@ -6,10 +6,9 @@ -
- {{template "menu" .}} -
-

You broke pixeldrain

+

You broke pixeldrain

+ {{template "page_top" .}} +

Great job.

@@ -19,8 +18,8 @@ take a look at it. You can try again in a few minutes (or hours), or go back to the home page and start over.

- {{template "footer"}} -
+
+ {{template "page_bottom" .}} {{template "analytics"}} diff --git a/res/template/about.html b/res/template/about.html new file mode 100644 index 0000000..273b4fe --- /dev/null +++ b/res/template/about.html @@ -0,0 +1,119 @@ +{{define "about"}} + + + {{template "meta_tags" "About"}} + {{template "user_style" .}} + + + + {{template "page_top" .}} +

About Pixeldrain

+
+

Questions and Answers

+ +

For how long will my files be stored?

+

+ Files will be removed if they have not been viewed for 60 days. + A view is counted when someone visits the file's download page + (pixeldrain.com/u/somefile) or views the file through a list the + file is included in (pixeldrain.com/l/somelist). +

+

+ You cannot delete files yourself. Once a file has been uploaded + to pixeldrain it will stay there for at least 60 days. If you + accidentally upload something you shouldn't have, just don't + share the link. The file will expire eventually. File links are + not indexed or published anywhere. As long as you don't share it + nobody will see it. +

+ +

Does pixeldrain cost any money?

+

+ No, pixeldrain is completely free at the moment. While there is + an advertisement on the file downloading page, it doesn't + generate nearly enough revenue to pay for maintaining this + service. That's why I'd really appreciate it if you could spare + some coins. Possible methods for donating are: +

+
    +
  • Bitcoin: 1Ne7hGuvnfz9EFTRD3PLWVeaJTX9oA1QUr
  • +
  • + BasicAttentionToken: Donate BAT by clicking the BAT icon in + your address bar. If you don't have Brave browser yet you + can download it here: + Install Brave. + Installing and using Brave with this referral link also + counts as a 5$ donation. +
  • +
  • + Siacoin: + 26117c19ca3975b315d663dcbbc19cf9c07274f441689d4392ed380b2337589ef1aacfbdc93f + (this address points directly at the storage backend. + Donations will be used for paying storage contracts with Sia + hosts) +
  • +
  • + PayPal: + Donate with PayPal +
  • +
+ +

Do I need to register an account?

+

+ Not if you don't want to. You're free to use pixeldrain + completely anonymously. Without a pixeldrain account you can + upload files, download files and create lists of files. And view + your uploaded files on the history page. + This page only shows files which were uploaded anonymously in + this web browser. +

+

+ By registering an account on pixeldrain you will be able to + access your files from any device with a web browser. Files you + upload and lists you create will be linked to your pixeldrain + account and will show up on your personal home + page. +

+ +

What cookies does pixeldrain use?

+

+ When uploading a file pixeldrain will install a cookie named + 'pduploads'. This cookie keeps a dot-separated list of all files + you have uploaded anonymously in this browser. This cookie is + only used for viewing your upload history. +

+

+ When logging in to a pixeldrain account a cookie named + 'pd_auth_key' will be installed. This cookie keeps your login + session active. When you delete it you will be logged out of + your account. +

+

+ When you use the style selector at the bottom of this page a + cookie called 'style' will be set. This cookie controls the + appearance of the website for you. +

+ +

Legality

+

+ I cannot be held liable for any illegal and / or copyrighted + material that's uploaded by the users of this application. + Files uploaded to this website are subjected to local laws. If + laws are being broken, and I've been notified of the fact I'll + have to delete the offending content (as the server does not + support geo filtering yet). If you find any files on this domain + that break the law, please contact me at + abuse@pixeldrain.com, + and I'll take care of it. +
Please share responsibly. +

+

+ For other questions you can reach me at + support@pixeldrain.com +

+
+ {{template "page_bottom"}} + {{template "analytics"}} + + +{{end}} diff --git a/res/template/account/file_manager.html b/res/template/account/file_manager.html index ff2a990..ed723a6 100644 --- a/res/template/account/file_manager.html +++ b/res/template/account/file_manager.html @@ -44,7 +44,7 @@ - {{template "menu" .}} + {{template "page_top" .}}
- + {{template "page_bottom" .}} {{template "analytics"}} diff --git a/res/template/account/lists.html b/res/template/account/lists.html deleted file mode 100644 index 33dab30..0000000 --- a/res/template/account/lists.html +++ /dev/null @@ -1,77 +0,0 @@ - - - - List Browser ~ PixelDrain - - - - - - - - - - - - - - - - - - - -
-
-
- -
- Previous -   <--  0  -->   - Nextious -
- - - -
- Previous -   <--  0  -->   - Nextious -
-
- - - - - diff --git a/res/template/account/logout.html b/res/template/account/logout.html index defbbd1..30cb557 100644 --- a/res/template/account/logout.html +++ b/res/template/account/logout.html @@ -5,31 +5,33 @@ {{template "user_style" .}} -
- {{template "menu" .}} + {{template "page_top" .}} +

Please confirm that you want to log out of your pixeldrain account

-

Please confirm that you want to log out of your pixeldrain account

-
+
+
+ -
-

Why do I need to confirm my logout?

-

- We need you to confirm your action so we can be sure that you - really requested a logout. If we didn't do this, anyone (or any - website) would be able to send you to this page and you would - automatically get logged out of pixeldrain, which would be very - annoying. -

-

- To prevent this from happening we're verifying that you actually - want to log out by making you click this button. Because this - logout button triggers a different request type than normal - page visit we can confirm that you really want to log out. -

- - {{template "footer"}} +
+
+

Why do I need to confirm my logout?

+

+ We need you to confirm your action so we can be sure that you + really requested a logout. If we didn't do this, anyone (or any + website) would be able to send you to this page and you would + automatically get logged out of pixeldrain, which would be very + annoying. +

+

+ To prevent this from happening we're verifying that you actually + want to log out by making you click this button. Because this + logout button triggers a different request type than normal + page visit we can confirm that you really want to log out. +

+
+ {{template "page_bottom" .}} {{template "analytics"}} diff --git a/res/template/account/user_files.html b/res/template/account/user_files.html index e44daae..abab0f8 100644 --- a/res/template/account/user_files.html +++ b/res/template/account/user_files.html @@ -8,55 +8,56 @@ {{template "page_top" .}} -
-
- These files were uploaded while logged in to your pixeldrain account, - click here to view files uploaded anonymously - in this browser. -
-
-
- - {{$limit := 200}} - {{$page := .URLQuery.Get "page" | pageNr}} - {{$files := .PixelAPI.UserFiles $page $limit}} -
- {{if ne $page 0}} - 🡄 4 Pages - ⬅ 2 Pages - ← Last Page - {{end}} - Page {{$page}} - {{if len $files.Files | eq $limit}} - Next Page → - 2 Pages ⮕ - 4 Pages 🡆 - {{end}} -
-
- - {{range $files.Files}} - {{.Name}} - {{.Name}} +

My Files

+
+

+ These files were uploaded while logged in to your pixeldrain account, + click here to view files uploaded anonymously + in this browser. +


- {{.DateUpload.Format "2006-01-02 15:04:05"}} - {{end}} -
-
- {{if ne $page 0}} - 🡄 4 Pages - ⬅ 2 Pages - ← Last Page - {{end}} - Page {{$page}} - {{if len $files.Files | eq $limit}} - Next Page → - 2 Pages ⮕ - 4 Pages 🡆 - {{end}} + {{$limit := 200}} + {{$page := .URLQuery.Get "page" | pageNr}} + {{$files := .PixelAPI.UserFiles $page $limit}} +
+ {{if ne $page 0}} + 🡄 4 Pages + ⬅ 2 Pages + ← Last Page + {{end}} + Page {{$page}} + {{if len $files.Files | eq $limit}} + Next Page → + 2 Pages ⮕ + 4 Pages 🡆 + {{end}} +
+
+ + {{range $files.Files}} + {{.Name}} + {{.Name}} +
+ {{.DateUpload.Format "2006-01-02 15:04:05"}} +
{{end}} + +
+
+ {{if ne $page 0}} + 🡄 4 Pages + ⬅ 2 Pages + ← Last Page + {{end}} + Page {{$page}} + {{if len $files.Files | eq $limit}} + Next Page → + 2 Pages ⮕ + 4 Pages 🡆 + {{end}} +
{{template "page_bottom" .}} diff --git a/res/template/account/user_home.html b/res/template/account/user_home.html index 1204d2b..21c6fba 100644 --- a/res/template/account/user_home.html +++ b/res/template/account/user_home.html @@ -9,12 +9,9 @@ {{template "page_top" .}} -
-

Welcome home, {{.Username}}!

-
- -
+

Welcome home, {{.Username}}!

+

Actions

-
+

+
{{template "page_bottom" .}} diff --git a/res/template/account/user_lists.html b/res/template/account/user_lists.html index 4c005fd..9545d2e 100644 --- a/res/template/account/user_lists.html +++ b/res/template/account/user_lists.html @@ -7,50 +7,53 @@ - {{template "menu" .}} - {{$limit := 200}} - {{$page := .URLQuery.Get "page" | pageNr}} - {{$lists := .PixelAPI.UserLists $page $limit}} -
- {{if ne $page 0}} - 🡄 4 Pages - ⬅ 2 Pages - ← Last Page - {{end}} - Page {{$page}} - {{if len $lists.Lists | eq $limit}} - Next Page → - 2 Pages ⮕ - 4 Pages 🡆 - {{end}} + {{template "page_top" .}} +

My Lists

+
+ {{$limit := 200}} + {{$page := .URLQuery.Get "page" | pageNr}} + {{$lists := .PixelAPI.UserLists $page $limit}} +
+ {{if ne $page 0}} + 🡄 4 Pages + ⬅ 2 Pages + ← Last Page + {{end}} + Page {{$page}} + {{if len $lists.Lists | eq $limit}} + Next Page → + 2 Pages ⮕ + 4 Pages 🡆 + {{end}} +
+
+ + {{range $lists.Lists}} + {{.Title}} + {{.Title}} + ({{.FileCount}} Files) +
+ {{.DateCreated.Format "2006-01-02 15:04:05"}} +
{{end}} + +
+
+ {{if ne $page 0}} + 🡄 4 Pages + ⬅ 2 Pages + ← Last Page + {{end}} + Page {{$page}} + {{if len $lists.Lists | eq $limit}} + Next Page → + 2 Pages ⮕ + 4 Pages 🡆 + {{end}} +
-
- - {{range $lists.Lists}} - {{.Title}} - {{.Title}} - ({{.FileCount}} Files) -
- {{.DateCreated.Format "2006-01-02 15:04:05"}} -
{{end}} - -
-
- {{if ne $page 0}} - 🡄 4 Pages - ⬅ 2 Pages - ← Last Page - {{end}} - Page {{$page}} - {{if len $lists.Lists | eq $limit}} - Next Page → - 2 Pages ⮕ - 4 Pages 🡆 - {{end}} -
- + {{template "page_bottom" .}} {{template "analytics"}} diff --git a/res/template/account/user_settings.html b/res/template/account/user_settings.html index eb7e8e0..f4af7ef 100644 --- a/res/template/account/user_settings.html +++ b/res/template/account/user_settings.html @@ -7,16 +7,17 @@ -
- {{template "menu" .}} -

User configuration

+ {{template "page_top" .}} +

User configuration

+
+

What would you like to do?

- {{template "footer"}} -
+
+ {{template "page_bottom" .}} {{template "analytics"}} diff --git a/res/template/admin.html b/res/template/admin.html index 2b47162..72de30c 100644 --- a/res/template/admin.html +++ b/res/template/admin.html @@ -8,130 +8,130 @@ {{$isAdmin := .PixelAPI.UserIsAdmin}} -
- {{template "menu" .}} + {{template "page_top" .}} +
{{if $isAdmin.IsAdmin}} +

Bandwidth and views

+
+ + + + + + +
+
+ +
-

Bandwidth and views

-
- - - - - - -
-
- -
+ + + - - - setData(); - - - {{else}} -

;)

- {{end}} - {{template "footer"}} + {{else}} +

;)

+ {{end}} +
+ {{template "page_bottom" .}}
diff --git a/res/template/apidoc.html b/res/template/apidoc.html index f32473f..34d1810 100644 --- a/res/template/apidoc.html +++ b/res/template/apidoc.html @@ -30,9 +30,10 @@ -
- {{template "menu" .}} -

Pixeldrain API Documentation

+ {{template "page_top" .}} +

Pixeldrain API Documentation

+ +

Welcome to the Pixeldrain API documentation.
@@ -83,9 +84,8 @@ {{template "api-filesystem-path-post"}} {{template "api-filesystem-path-get"}} {{template "api-filesystem-path-delete"}} - - {{template "footer"}} -

+
+ {{template "page_bottom" .}} {{template "analytics"}} diff --git a/res/template/donation.html b/res/template/donation.html index cbdf54e..01b547e 100644 --- a/res/template/donation.html +++ b/res/template/donation.html @@ -6,8 +6,8 @@ {{template "user_style" .}} -
- {{template "menu" .}} + {{template "page_top" .}} +

{{$success := .URLQuery.Get "success"}} {{if eq $success "true"}} @@ -33,8 +33,8 @@ Sincerely,
Fornax {{end}} - {{template "footer"}} -
+
+ {{template "page_bottom"}} {{template "analytics"}} diff --git a/res/template/file_not_found.html b/res/template/file_not_found.html index 24ee6f2..d66b922 100644 --- a/res/template/file_not_found.html +++ b/res/template/file_not_found.html @@ -6,10 +6,9 @@ -
- {{template "menu" .}} -
-

404, File Not Found!

+ {{template "page_top" .}} +

404, File Not Found!

+

This file does not exist, or it has been removed. Possible reasons for this are: @@ -24,8 +23,8 @@ I'm sorry for the inconvenience.

- {{template "footer"}} -
+
+ {{template "page_bottom" .}} {{template "analytics"}} @@ -38,10 +37,9 @@ -
- {{template "menu" .}} -
-

404, List Not Found!

+ {{template "page_top" .}} +

404, List Not Found!

+

This list does not exist, or it has been removed. Possible reasons for this are: @@ -56,8 +54,8 @@ I'm sorry for the inconvenience.

- {{template "footer"}} -
+
+ {{template "page_bottom" .}} {{template "analytics"}} diff --git a/res/template/file_viewer.html b/res/template/file_viewer.html index 86c8615..6de9a03 100644 --- a/res/template/file_viewer.html +++ b/res/template/file_viewer.html @@ -13,8 +13,6 @@ - {{template "bgpattern"}} - {{.OGData}} diff --git a/res/template/fragments/user_style.html b/res/template/fragments/user_style.html index 7eb0e1e..3c85a4a 100644 --- a/res/template/fragments/user_style.html +++ b/res/template/fragments/user_style.html @@ -1,5 +1,14 @@ {{define "user_style"}} {{end}} diff --git a/res/template/history.html b/res/template/history.html index da07081..3283e83 100644 --- a/res/template/history.html +++ b/res/template/history.html @@ -11,16 +11,18 @@
- {{template "menu" .}} -

- Here are all files you have previously uploaded to PixelDrain using this computer. - This data is saved locally in your web browser and gets updated every time you upload a file through your current browser. -

-
+ {{template "page_top" .}} +

Upload History

+
+

+ Here are all files you have previously uploaded to PixelDrain using this computer. + This data is saved locally in your web browser and gets updated every time you upload a file through your current browser. +

+
-
- {{template "footer"}} -
+
+
+ {{template "page_bottom" .}} {{template "analytics"}} diff --git a/res/template/home.html b/res/template/home.html index 22cfb9c..f3f4ae5 100644 --- a/res/template/home.html +++ b/res/template/home.html @@ -9,153 +9,75 @@ {{template "page_top" .}} -
- Header image -
+ Header image
- - - -

- - By uploading files to Pixeldrain you accept that a cookie will be - placed in your web browser. More information below. - -

-
-
- - - - -
-
-

What is Pixeldrain?

+
+ + + +

- Pixeldrain is a file sharing website built for speed and ease of - use. -

+ By uploading files to Pixeldrain you accept that a cookie will + be placed in your web browser. More information on the about page

- The file size limit is 10 GB. There is no limit on the number of - files you can upload. A list can contain up to 10000 files. -

-

Style selector

-
-
-
-
-
- - (Inspired by Canta GTK)
- - (Inspired by Arc GTK)
- +
+
+ + + + +
+
+

What is Pixeldrain?

+

+ Pixeldrain is a file sharing website built for speed and + ease of use. Pixeldrain does not cost any money, though + donations are appreciated. For donation methods see the + about page. +

+

How to use pixeldrain

+

+ Files can be uploaded by clicking the big green upload + button, or by dragging them onto this page from your file + manager. You can not upload directories at this time, only + files. The maximum file size you can upload is 10 GB. +

+

+ You can also create lists, which are a collection of files. + Like a photo album, a music record or a video compilation. + To do this you need to upload a bunch of files at once. The + files will be saved in the order you upload them in. When + all files have finished uploading you click the "Create list + with uploaded files" button and you will be asked to enter a + name for your list. After picking a name the list will be + created and opened in a new window. If your browser blocks + the window you can also find a link to the list at the + bottom of your uploaded files. +

+

+ For more information see the about + page. +

+ +

Style selector

+

+ You can change how pixeldrain looks! Your theme choice will + be saved in a cookie. +

+
+
+
+
+
+ + (Inspired by Canta GTK)
+ + (Inspired by Arc GTK)
+ +
- -

Questions and Answers

- -

For how long will my files be stored?

-

- Files will be removed if they have not been viewed for 60 days. - A view is counted when someone visits the file's download page - (pixeldrain.com/u/somefile) or views the file through a list the - file is included in (pixeldrain.com/l/somelist). -

-

- You cannot delete files yourself. Once a file has been uploaded - to pixeldrain it will stay there for at least 60 days. If you - accidentally upload something you shouldn't have, just don't - share the link. The file will expire eventually. File links are - not indexed or published anywhere. As long as you don't share it - nobody will see it. -

- -

Does pixeldrain cost any money?

-

- No, pixeldrain is completely free at the moment. While there is - an advertisement on the file downloading page, it doesn't - generate nearly enough revenue to pay for maintaining this - service. That's why I'd really appreciate it if you could spare - some coins. Possible methods for donating are: -

-
    -
  • Bitcoin: 1Ne7hGuvnfz9EFTRD3PLWVeaJTX9oA1QUr
  • -
  • - BasicAttentionToken: Donate BAT by clicking the BAT icon in - your address bar. If you don't have Brave browser yet you - can download it here: - Install Brave. - Installing and using Brave with this referral link also - counts as a 5$ donation. -
  • -
  • - Siacoin: - 26117c19ca3975b315d663dcbbc19cf9c07274f441689d4392ed380b2337589ef1aacfbdc93f - (this address points directly at the storage backend. - Donations will be used for paying storage contracts with Sia - hosts) -
  • -
  • - PayPal: - Donate with PayPal -
  • -
- -

Do I need to register an account?

-

- Not if you don't want to. You're free to use pixeldrain - completely anonymously. Without a pixeldrain account you can - upload files, download files and create lists of files. And view - your uploaded files on the history page. - This page only shows files which were uploaded anonymously in - this web browser. -

-

- By registering an account on pixeldrain you will be able to - access your files from any device with a web browser. Files you - upload and lists you create will be linked to your pixeldrain - account and will show up on your personal home - page. -

- -

What cookies does pixeldrain use?

-

- When uploading a file pixeldrain will install a cookie named - 'pduploads'. This cookie keeps a dot-separated list of all files - you have uploaded anonymously in this browser. This cookie is - only used for viewing your upload history. -

-

- When logging in to a pixeldrain account a cookie named - 'pd_auth_key' will be installed. This cookie keeps your login - session active. When you delete it you will be logged out of - your account. -

-

- When you use the style selector at the bottom of this page a - cookie called 'style' will be set. This cookie controls the - appearance of the website for you. -

- -

Legality

-

- I cannot be held liable for any illegal and / or copyrighted - material that's uploaded by the users of this application. - Files uploaded to this website are subjected to local laws. If - laws are being broken, and I've been notified of the fact I'll - have to delete the offending content (as the server does not - support geo filtering yet). If you find any files on this domain - that break the law, please contact me at - abuse@pixeldrain.com, - and I'll take care of it. -
Please share responsibly. -

-

- For other questions you can reach me at - support@pixeldrain.com -

-
{{template "page_bottom"}} diff --git a/res/template/paste.html b/res/template/paste.html index ba37976..a318c65 100644 --- a/res/template/paste.html +++ b/res/template/paste.html @@ -11,7 +11,8 @@ position: absolute; width: 8em; height: 100%; - background-color: var(--layer_2_color) + background-color: var(--layer_2_color); + text-align: center; } .textarea_container { position: absolute; diff --git a/webcontroller/user_account.go b/webcontroller/user_account.go index b07ebb8..62eb36f 100644 --- a/webcontroller/user_account.go +++ b/webcontroller/user_account.go @@ -11,20 +11,6 @@ import ( "github.com/julienschmidt/httprouter" ) -func (wc *WebController) serveRegister( - w http.ResponseWriter, - r *http.Request, - p httprouter.Params, -) { - var tpld = wc.newTemplateData(w, r) - tpld.Other = wc.captchaKey() - - err := wc.templates.Get().ExecuteTemplate(w, "register", tpld) - if err != nil { - log.Error("Error executing template '%s': %s", "register", err) - } -} - func (wc *WebController) serveLogout( w http.ResponseWriter, r *http.Request, diff --git a/webcontroller/user_style.go b/webcontroller/user_style.go index c467207..561c35a 100644 --- a/webcontroller/user_style.go +++ b/webcontroller/user_style.go @@ -260,7 +260,7 @@ var maroonStyle = pixeldrainStyleSheet{ BodyColor: hsl{0, .6, .1}, Layer1Color: hsl{0, .5, .07}, Layer1Shadow: 4, - Layer2Color: hsl{0, .8, .15}, + Layer2Color: hsl{0, .6, .1}, // hsl{0, .8, .15}, Layer2Shadow: 7, Layer3Color: hsl{0, .9, .2}, Layer3Shadow: 10, diff --git a/webcontroller/web_controller.go b/webcontroller/web_controller.go index 0f688f9..22f99d8 100644 --- a/webcontroller/web_controller.go +++ b/webcontroller/web_controller.go @@ -70,9 +70,9 @@ func New(r *httprouter.Router, prefix string, conf *conf.PixelWebConfig) *WebCon r.GET(p+"/t" /* */, wc.serveTemplate("paste", false)) r.GET(p+"/donation" /* */, wc.serveTemplate("donation", false)) r.GET(p+"/widgets" /* */, wc.serveTemplate("widgets", false)) + r.GET(p+"/about" /* */, wc.serveTemplate("about", false)) // User account pages - r.GET(p+"/register_old" /* */, wc.serveRegister) r.GET(p+"/register" /* */, wc.serveForm(wc.registerForm, false)) r.POST(p+"/register" /* */, wc.serveForm(wc.registerForm, false)) r.GET(p+"/login" /* */, wc.serveForm(wc.loginForm, false))