diff --git a/res/static/misc/Lato-Regular.ttf b/res/static/misc/Lato-Regular.ttf new file mode 100644 index 0000000..74decd9 Binary files /dev/null and b/res/static/misc/Lato-Regular.ttf differ diff --git a/res/static/misc/LatoLatin-Hairline.ttf b/res/static/misc/LatoLatin-Hairline.ttf new file mode 100644 index 0000000..5984ab0 Binary files /dev/null and b/res/static/misc/LatoLatin-Hairline.ttf differ diff --git a/res/static/misc/LatoLatin-Thin.ttf b/res/static/misc/LatoLatin-Thin.ttf new file mode 100644 index 0000000..7752047 Binary files /dev/null and b/res/static/misc/LatoLatin-Thin.ttf differ diff --git a/res/static/script/DetailsWindow.js b/res/static/script/DetailsWindow.js index 6f34ea1..85de62c 100644 --- a/res/static/script/DetailsWindow.js +++ b/res/static/script/DetailsWindow.js @@ -13,9 +13,9 @@ var DetailsWindow = { }, setDetails: function (file) { if (Viewer.isList) { - // Lists give incomplete file information, so we have to request - // more details in the background. File descriptions only exist in - // lists, so for that we use the data provided in the page source + // Lists give incomplete file information, so we have to request + // more details in the background. File descriptions only exist in + // lists, so for that we use the data provided in the page source $.ajax({ dataType: "json", url: apiEndpoint + "/file/" + file.id + "/info", @@ -25,7 +25,7 @@ var DetailsWindow = { + "Name" + escapeHTML(data.name) + "" + "Url/u/" + data.id + "" + "Mime Type" + escapeHTML(data.mime_type) + "" - + "Id" + data.id + "" + + "IS" + data.id + "" + "Size" + data.size + "" + "Upload Date" + data.date_upload + "" + "Description" + escapeHTML(file.description) + "" @@ -38,7 +38,7 @@ var DetailsWindow = { "" + "" + "" - + "" + + "" + "" + "" + "
Name" + escapeHTML(file.name) + "
Mime Type" + escapeHTML(file.mime_type) + "
Id" + file.id + "
ID" + file.id + "
Size" + file.size + "
Upload Date" + file.date_upload + "
" diff --git a/res/static/script/Toolbar.js b/res/static/script/Toolbar.js index d1ef902..6802ff8 100644 --- a/res/static/script/Toolbar.js +++ b/res/static/script/Toolbar.js @@ -16,15 +16,17 @@ var Toolbar = { Sharebar.toggle(); } - $("#toolbar").animate({left: "-132"}, 400); - $("#filepreview").animate({left: "0"}, 400); + $("#toolbar").animate( {left: "-132"}, 400); + $("#filepreview").animate({left: "0"}, 400); + $("#info_popup").animate( {left: "20"}, 400); $("#button-expand-toolbar").css("visibility", "visible"); this.visible = false; } else { - $("#toolbar").animate({left: "0"}, 400); + $("#toolbar").animate( {left: "0"}, 400); $("#filepreview").animate({left: "122"}, 400); + $("#info_popup").animate( {left: "142"}, 400); setTimeout(function(){ if(this.visible){ diff --git a/res/static/style/layout.css b/res/static/style/layout.css index bc109bf..0c24fbd 100644 --- a/res/static/style/layout.css +++ b/res/static/style/layout.css @@ -13,7 +13,8 @@ font-family: 'Ubuntu'; font-style: normal; font-weight: 400; - font-display: auto; + font-display: fallback; + text-rendering: optimizeLegibility; src: local('Ubuntu'), local('Ubuntu Regular'), @@ -22,10 +23,11 @@ url(/res/misc/Ubuntu-R.ttf) format('truetype'); } @font-face { - font-family: 'Lato'; - font-style: normal; - font-weight: 100; - font-display: auto; + font-family: 'Lato Thin'; + font-display: fallback; + font-style: normal; + font-weight: normal; + text-rendering: optimizeLegibility; src: local('Lato Thin'), local('Lato, Thin'), @@ -33,7 +35,19 @@ local('Lato Hairline'), local('Lato, Hairline'), local('Lato-Hairline'), - url(/res/misc/Lato-Hairline.ttf) format('truetype'); + url(/res/misc/LatoLatin-Thin.ttf) format('truetype'); +} +@font-face { + font-family: 'Lato'; + font-display: fallback; + font-style: normal; + font-weight: normal; + text-rendering: optimizeLegibility; + src: + local('Lato Regular'), + local('Lato, Regular'), + local('Lato-Regular'), + url(/res/misc/Lato-Regular.ttf) format('truetype'); } /* Page rendering configuration */ @@ -87,7 +101,7 @@ body{ padding: 4px 6px; margin: 0 4px; text-decoration: none; - font-family: "Lato", sans-serif; + font-family: "Lato Thin", sans-serif; font-weight: bold; font-size: 26px; } @@ -148,6 +162,12 @@ body{ /* Common elements */ h1, h2, h3, h4, h5, h6 {line-height: 1em;} +h1{font-size: 2em; font-family: "Lato Thin";} +h2{font-size: 1.75em; font-family: "Lato Thin";} +h3{font-size: 1.5em; font-family: "Lato Thin";} +h4{font-size: 1.25em; font-family: "Lato";} +h5{font-size: 1em; font-family: "Lato";} +h6{font-size: .75em; font-family: "Lato";} h3{border-bottom: 1px var(--accent_color_light_border) solid;} /* Differentiate it a bit, else it just looks like bold text */ hr{ diff --git a/res/template/apidoc.html b/res/template/apidoc.html index 71655d5..2eb7023 100644 --- a/res/template/apidoc.html +++ b/res/template/apidoc.html @@ -32,7 +32,7 @@
{{template "menu" .}} -

PixelDrain API Documentation

+

Pixeldrain API Documentation

Welcome to the Pixeldrain API documentation.
diff --git a/res/template/donation.html b/res/template/donation.html index 777a7c2..cbdf54e 100644 --- a/res/template/donation.html +++ b/res/template/donation.html @@ -1,86 +1,41 @@ +{{define "donation"}} - + - Thank you for supporting Pixeldrain! - - - - - - - - - - - - - - - - - - - - + {{template "meta_tags" "Thank you for supporting Pixeldrain!"}} + {{template "user_style" .}} -

-
-

- - - - - Thank you for your donation! You are amazing. -

- Sincerely,
- Fornax -
- - Dear , -

- Thank you for your donation. I really appreciate it! -

- Sincerely,
- Fornax -
-
-
- - - It seems you have canceled your donation. I don't blame you, money is expensive :) + {{template "menu" .}} +
+ {{$success := .URLQuery.Get "success"}} + {{if eq $success "true"}} + {{if .Authenticated}} + Dear {{.Username}}, +

+ Thank you for your donation. I really appreciate it!

Sincerely,
- Fornax
-
+ Fornax + {{else}} + Thank you for your donation! You are amazing. +

+ Sincerely,
+ Fornax + {{end}} + {{else}} + It seems you have canceled your donation. I don't blame you, money is expensive :) +

+ If this was not your intention, you're welcome to try again by clicking this button: + Donate with PayPal +

+ Sincerely,
+ Fornax + {{end}} {{template "footer"}}
- - - + {{template "analytics"}} +{{end}} diff --git a/res/template/file_info_popup.html b/res/template/file_info_popup.html deleted file mode 100644 index 8203198..0000000 --- a/res/template/file_info_popup.html +++ /dev/null @@ -1,36 +0,0 @@ -{{define "file_info_popup"}} -

About

-PixelDrain is a file sharing platform. -Visit the main site for more information. - -

Keyboard Controls

- - - - - - - - - - -
File Shortcuts
c = Copy URL of this page
i = Toggle details window (this window)
s = Download the file you are currently viewing
List Shortcuts
a or ← = View previous item in list
d or → = View next item in list
r = Toggle shuffle (random)
SHIFT + s = Download all the files in the list as a zip archive
- -

Credits

-All server side code written by -Fornax (me). - -

- -Code syntax highlighting is by - - Google Code-prettify -. - -

- -Thanks to the Mozilla team for their wonderful PDF viewer -pdf.js. - -

-{{end}} \ No newline at end of file diff --git a/res/template/file_viewer.html b/res/template/file_viewer.html index 74373cd..2350ad5 100644 --- a/res/template/file_viewer.html +++ b/res/template/file_viewer.html @@ -122,11 +122,12 @@
- Close - Click the help button again to close this overlay.
- + Close

File Info

diff --git a/res/template/home.html b/res/template/home.html index 24967b3..25c23a8 100644 --- a/res/template/home.html +++ b/res/template/home.html @@ -4,7 +4,6 @@ {{template "meta_tags" "Free file sharing service"}} {{template "user_style" .}} - @@ -105,14 +104,7 @@ Donations will be used for paying storage contracts with Sia hosts) -
  • PayPal: -
    - - - - -
    -
  • +
  • Donate with PayPal
  • Legality

    @@ -140,6 +132,7 @@ {{template "footer"}}
    + {{template "analytics"}} diff --git a/webcontroller/web_controller.go b/webcontroller/web_controller.go index 6e8c301..8439c1e 100644 --- a/webcontroller/web_controller.go +++ b/webcontroller/web_controller.go @@ -55,6 +55,7 @@ func New(r *httprouter.Router, prefix string, conf *conf.PixelWebConfig) *WebCon r.GET(p+"/u/:id/preview" /* */, wc.serveFilePreview) r.GET(p+"/l/:id" /* */, wc.serveListViewer) r.GET(p+"/t" /* */, wc.serveTemplate("paste", false)) + r.GET(p+"/donation" /* */, wc.serveTemplate("donation", false)) // User account pages r.GET(p+"/register" /* */, wc.serveRegister)