diff --git a/res/include/script/Toolbar.js b/res/include/script/Toolbar.js
index bcca60e..a307e5a 100644
--- a/res/include/script/Toolbar.js
+++ b/res/include/script/Toolbar.js
@@ -173,6 +173,19 @@ function loadCaptcha(){
});
}
+function formatDataVolume(amt) {
+ if (amt > 1e12) {
+ return Math.round(amt/1e9)/1e3 + " TB";
+ } else if (amt > 1e9) {
+ return Math.round(amt/1e6)/1e3 + " GB";
+ } else if (amt > 1e6) {
+ return Math.round(amt/1e3)/1e3 + " MB";
+ } else if (amt > 1e3) {
+ return Math.round(amt)/1e3 + " kB";
+ }
+ return amt + " B"
+}
+
var DetailsWindow = {
visible: false,
fileID: "",
@@ -218,8 +231,8 @@ var DetailsWindow = {
+ "
URL | | /u/" + data.id + " |
"
+ "Mime Type | | " + escapeHTML(data.mime_type) + " |
"
+ "ID | | " + data.id + " |
"
- + "Size | | " + data.size + " |
"
- + "Bandwidth | | " + data.bandwidth_used + " |
"
+ + "Size | | " + formatDataVolume(data.size) + " |
"
+ + "Bandwidth | | " + formatDataVolume(data.bandwidth_used) + " |
"
+ "Upload Date | | " + data.date_upload + " |
"
+ "Description | | " + escapeHTML(file.description) + " |
"
+ ""
@@ -237,8 +250,8 @@ var DetailsWindow = {
+ "Name | | " + escapeHTML(file.name) + " |
"
+ "Mime Type | | " + escapeHTML(file.mime_type) + " |
"
+ "ID | | " + file.id + " |
"
- + "Size | | " + file.size + " |
"
- + "Bandwidth | | " + file.bandwidth_used + " |
"
+ + "Size | | " + formatDataVolume(file.size) + " |
"
+ + "Bandwidth | | " + formatDataVolume(file.bandwidth_used) + " |
"
+ "Upload Date | | " + file.date_upload + " |
"
+ ""
);
diff --git a/res/include/style/layout.css b/res/include/style/layout.css
index 9e6aad2..2c46385 100644
--- a/res/include/style/layout.css
+++ b/res/include/style/layout.css
@@ -248,7 +248,7 @@ h3{font-size: 1.5em; font-family: "light"; font-weight: normal;}
h4{font-size: 1.25em; font-family: "default"; font-weight: normal;}
h5{font-size: 1em; font-family: "default"; font-weight: normal;}
h6{font-size: .75em; font-family: "default"; font-weight: normal;}
-h3, h2{border-bottom: 1px var(--layer_3_color_border) solid;} /* Differentiate it a bit, else it just looks like bold text */
+h2, h3{border-bottom: 1px var(--layer_3_color_border) solid;} /* Differentiate it a bit, else it just looks like bold text */
p, .indent {
margin: 10px;
@@ -289,7 +289,7 @@ a:hover {color: var(--highlight_color); text-decoration: underline;}
}
table:not(.form) {border-collapse: collapse; width: 100%;}
tr:not(.form) {border-bottom: 1px var(--layer_2_color_border) solid;}
-tr > td {padding: 0.5em;}
+tr > td {padding: 0.3em;}
@media(max-width: 30em) {
tr > td {
box-sizing: border-box;
diff --git a/res/include/style/viewer.css b/res/include/style/viewer.css
index 1f611e5..517e67d 100644
--- a/res/include/style/viewer.css
+++ b/res/include/style/viewer.css
@@ -312,7 +312,6 @@
}
table {width: auto !important;}
-table > tbody > tr {border: none !important;}
.corner-popup{
position: fixed;
@@ -328,21 +327,6 @@ table > tbody > tr {border: none !important;}
z-index: 200;
}
-.bytecounter{
- color: var(--text_color);
- font-size: 16px;
- font-family: monospace, monospace;
- line-height: 20px;
- text-align: right;
- display: inline-block;
- background-image: url("/res/img/bytecounter.png");
- background-position: top right;
- width: 136px;
- height: 36px;
- padding: 0;
- padding-right: 1px;
-}
-
/* ====================
|| LIST NAVIGATOR ||
==================== */
diff --git a/res/static/img/bytecounter.png b/res/static/img/bytecounter.png
deleted file mode 100644
index d3024d8..0000000
Binary files a/res/static/img/bytecounter.png and /dev/null differ
diff --git a/res/static/img/bytecounter.xcf b/res/static/img/bytecounter.xcf
deleted file mode 100644
index 51a212a..0000000
Binary files a/res/static/img/bytecounter.xcf and /dev/null differ
diff --git a/res/template/file_viewer.html b/res/template/file_viewer.html
index 59624e7..894951a 100644
--- a/res/template/file_viewer.html
+++ b/res/template/file_viewer.html
@@ -99,7 +99,6 @@
-
{{template "spinner.svg" .}}
@@ -141,19 +140,6 @@
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.
-
diff --git a/res/template/home.html b/res/template/home.html
index ae3eb81..58a3ca2 100644
--- a/res/template/home.html
+++ b/res/template/home.html
@@ -29,7 +29,7 @@
-
What is pixeldrain?
+
What is pixeldrain?
Pixeldrain is a file sharing website built for speed and
ease of use. Pixeldrain does not cost any money, though
diff --git a/webcontroller/user_style.go b/webcontroller/user_style.go
index 6b577e3..2ab9cf8 100644
--- a/webcontroller/user_style.go
+++ b/webcontroller/user_style.go
@@ -85,14 +85,18 @@ func (s pixeldrainStyleSheet) String() string {
--background_color: #%s;
--body_color: #%s;
- --layer_1_color: #%s;
- --layer_1_shadow: %s;
- --layer_2_color: #%s;
- --layer_2_shadow: %s;
- --layer_3_color: #%s;
- --layer_3_shadow: %s;
- --layer_4_color: #%s;
- --layer_4_shadow: %s;
+ --layer_1_color: #%s;
+ --layer_1_color_border: #%s;
+ --layer_1_shadow: %s;
+ --layer_2_color: #%s;
+ --layer_2_color_border: #%s;
+ --layer_2_shadow: %s;
+ --layer_3_color: #%s;
+ --layer_3_color_border: #%s;
+ --layer_3_shadow: %s;
+ --layer_4_color: #%s;
+ --layer_4_color_border: #%s;
+ --layer_4_shadow: %s;
--shadow_color: #%s;
--shadow_spread: %s;
@@ -114,12 +118,16 @@ func (s pixeldrainStyleSheet) String() string {
s.BackgroundColor.RGB(),
s.BodyColor.RGB(),
s.Layer1Color.RGB(),
+ s.Layer1Color.add(0, 0, .05).RGB(),
fmt.Sprintf("%dpx", s.Layer1Shadow),
s.Layer2Color.RGB(),
+ s.Layer2Color.add(0, 0, .05).RGB(),
fmt.Sprintf("%dpx", s.Layer2Shadow),
s.Layer3Color.RGB(),
+ s.Layer3Color.add(0, 0, .05).RGB(),
fmt.Sprintf("%dpx", s.Layer3Shadow),
s.Layer4Color.RGB(),
+ s.Layer4Color.add(0, 0, .05).RGB(),
fmt.Sprintf("%dpx", s.Layer4Shadow),
s.ShadowColor.RGB(),
fmt.Sprintf("%dpx", s.ShadowSpread),