From 616fe14ba3a76edcec8ea244191d11f45c5b0960 Mon Sep 17 00:00:00 2001 From: Wim Brand Date: Tue, 18 Sep 2018 19:59:53 +0200 Subject: [PATCH] some style tweaks --- res/static/res/script/compiled/home.js | 8 ++++---- res/static/res/script/history.js | 2 +- res/static/res/style/layout.css | 9 +-------- res/static/res/typescript/home/home.ts | 8 ++++---- res/template/history.html | 2 +- res/template/home.html | 4 ++-- webcontroller/style.go | 2 +- 7 files changed, 14 insertions(+), 21 deletions(-) diff --git a/res/static/res/script/compiled/home.js b/res/static/res/script/compiled/home.js index 1eb74d8..2331843 100644 --- a/res/static/res/script/compiled/home.js +++ b/res/static/res/script/compiled/home.js @@ -17,13 +17,13 @@ var UploadProgressBar = /** @class */ (function () { this.uploadDiv.innerText = "Uploading... " + Math.round(progress * 1000) / 10 + "%\n" + this.file.name; this.uploadDiv.setAttribute('style', 'background: linear-gradient(' + 'to right, ' - + '#111 0%, ' + + 'var(--file_background_color) 0%, ' + 'var(--highlight_color) ' + ((progress * 100)) + '%, ' - + '#111 ' + ((progress * 100) + 1) + '%)'); + + 'var(--file_background_color) ' + ((progress * 100) + 1) + '%)'); }; UploadProgressBar.prototype.onFinished = function (id) { finishedUploads[this.queueNum] = id; - this.uploadDiv.setAttribute('style', 'background: #111'); + this.uploadDiv.setAttribute('style', 'background: var(--file_background_color)'); this.uploadDiv.setAttribute('href', '/u/' + id); this.uploadDiv.setAttribute("target", "_blank"); this.uploadDivJQ.html('' + this.file.name + '' @@ -31,7 +31,7 @@ var UploadProgressBar = /** @class */ (function () { + '' + window.location.hostname + '/u/' + id + ''); }; UploadProgressBar.prototype.onFailure = function (response, error) { - this.uploadDiv.setAttribute('style', 'background: #821C40'); + this.uploadDiv.setAttribute('style', 'background: var(--danger_color)'); this.uploadDivJQ.html(this.file.name + '
' + 'Upload failed after three tries!
' + "Message: " + error); diff --git a/res/static/res/script/history.js b/res/static/res/script/history.js index 3549438..c83a3e6 100644 --- a/res/static/res/script/history.js +++ b/res/static/res/script/history.js @@ -58,5 +58,5 @@ function historyAddItem(json) { + ("00" + date.getDate()).slice(-2) + ""; - $("#uploadedFiles").append($(uploadItem).hide().fadeIn(400)); + $("#uploadedFiles").append($(uploadItem).hide().fadeIn(2000)); } diff --git a/res/static/res/style/layout.css b/res/static/res/style/layout.css index 1208b29..2f6bedd 100644 --- a/res/static/res/style/layout.css +++ b/res/static/res/style/layout.css @@ -207,13 +207,6 @@ pre{ overflow-x: hidden; overflow-y: scroll; } -.files_container{ - position: relative; - width: 100%; - margin: 0; - height: auto; - display: inline-block; -} .file_button, .file_button:hover{ position: relative; @@ -224,7 +217,7 @@ pre{ margin: 6px; padding: 0; overflow: hidden; - box-shadow: 0px 0px 6px 2px var(--shadow_color); + box-shadow: 0px 0px 6px 2px var(--file_background_color); background-color: var(--file_background_color); color: var(--text_color); word-break: break-all; diff --git a/res/static/res/typescript/home/home.ts b/res/static/res/typescript/home/home.ts index 633563e..8b0a060 100644 --- a/res/static/res/typescript/home/home.ts +++ b/res/static/res/typescript/home/home.ts @@ -33,15 +33,15 @@ class UploadProgressBar implements FileUpload { 'style', 'background: linear-gradient(' +'to right, ' - +'#111 0%, ' + +'var(--file_background_color) 0%, ' +'var(--highlight_color) '+ ((progress*100)) +'%, ' - +'#111 '+ ((progress*100)+1) +'%)' + +'var(--file_background_color) '+ ((progress*100)+1) +'%)' ) } public onFinished(id: string){ finishedUploads[this.queueNum] = id - this.uploadDiv.setAttribute('style', 'background: #111') + this.uploadDiv.setAttribute('style', 'background: var(--file_background_color)') this.uploadDiv.setAttribute('href', '/u/'+id) this.uploadDiv.setAttribute("target", "_blank"); this.uploadDivJQ.html( @@ -51,7 +51,7 @@ class UploadProgressBar implements FileUpload { ) } public onFailure(response: JQuery.Ajax.ErrorTextStatus, error: string) { - this.uploadDiv.setAttribute('style', 'background: #821C40') + this.uploadDiv.setAttribute('style', 'background: var(--danger_color)') this.uploadDivJQ.html( this.file.name+'
' + 'Upload failed after three tries!
' diff --git a/res/template/history.html b/res/template/history.html index 2ac3f4f..a8c4dd7 100644 --- a/res/template/history.html +++ b/res/template/history.html @@ -16,7 +16,7 @@ This data is saved locally in your web browser and gets updated every time you upload a file through your current browser.

-
+
{{template "footer"}} diff --git a/res/template/home.html b/res/template/home.html index 892d460..7c1f98d 100644 --- a/res/template/home.html +++ b/res/template/home.html @@ -12,7 +12,7 @@
{{template "menu" .}} -
+

@@ -61,7 +61,7 @@
Please share responsibly.

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

Funding

diff --git a/webcontroller/style.go b/webcontroller/style.go index 9f4645f..5d7cd32 100644 --- a/webcontroller/style.go +++ b/webcontroller/style.go @@ -188,7 +188,7 @@ var SolarizedDarkStyle = PixeldrainStyleSheet{ AccentColorMedium: HSL{192, .81, .14}, AccentColorLight: HSL{192, .95, .17}, - ShadowColor: HSL{192, .87, .05}, + ShadowColor: HSL{192, .87, 0}, ShadowSpread: 50, ShadowIntensity: 5, }