diff --git a/res/include/script/file_viewer/EmbedWindow.js b/res/include/script/file_viewer/EmbedWindow.js index 38ef9ea..b814602 100644 --- a/res/include/script/file_viewer/EmbedWindow.js +++ b/res/include/script/file_viewer/EmbedWindow.js @@ -45,7 +45,7 @@ EmbedWindow.prototype.updateCode = function () { this.textarea.value = `` } diff --git a/res/include/style/layout.css b/res/include/style/layout.css index 0bc2066..b038daa 100644 --- a/res/include/style/layout.css +++ b/res/include/style/layout.css @@ -50,10 +50,6 @@ a > svg { vertical-align: middle; } /* Page rendering configuration */ html, body { overflow-x: hidden; } body{ - background-color: #111111; /* Fallback */ - background-color: var(--layer_1_color); - background-repeat: repeat; - background-blend-mode: luminosity; margin: 0; font-family: system-ui, sans-serif; font-size: 17px; @@ -62,6 +58,13 @@ body{ color: var(--text_color); padding: 0; } +body, .checkers { + background-image: url("{{bgPattern}}"); + background-color: #111111; /* Fallback */ + background-color: var(--layer_1_color); + background-repeat: repeat; + background-blend-mode: luminosity; +} /* Page layout elements */ .page_wrapper { @@ -181,7 +184,7 @@ body{ overflow: hidden; text-overflow: ellipsis; transition: background-color 0.5s; - border-radius: 5px; + border-radius: 24px; text-decoration: none; } .page_navigation a:hover { @@ -196,13 +199,6 @@ body{ box-shadow: inset 1px 1px 20px 0 #000000; box-shadow: inset 1px 1px 20px 0 var(--shadow_color); } -.checkers { - text-shadow: 0 0 20px #000000; - padding: 30px 10px 30px 10px; -} -body, .checkers { - background-image: url("{{bgPattern}}"); -} .highlight_dark, .highlight_middle, @@ -361,7 +357,7 @@ pre { margin: 10px; padding: 0; overflow: hidden; - border-radius: 2px; + border-radius: 6px; box-shadow: 2px 2px 8px -3px var(--shadow_color); background-color: var(--layer_3_color); color: #bfbfbf; /* Fallback */ @@ -431,12 +427,12 @@ input[type="color"], select { display: inline-block; box-sizing: border-box; - border-radius: 2px; + border-radius: 8px; border: none; margin: 3px; background: linear-gradient(var(--input_color), var(--input_color_dark)); - padding: 4px 5px 4px 5px; - box-shadow: 2px 2px 6px -3px var(--shadow_color); + padding: 6px 7px 6px 7px; + box-shadow: 1px 1px 5px -2px var(--shadow_color); line-height: 1em; overflow: hidden; font-size: 1em; /* Sometimes user-agents have different font sizes for buttons and links */ @@ -475,7 +471,7 @@ select:active{ background: linear-gradient(var(--input_color_dark), var(--input_color)); box-shadow: inset 4px 4px 8px var(--shadow_color); /* Exactly 4px offset compared to the inactive padding to give a depth effect */ - padding: 8px 1px 0px 9px; + padding: 10px 3px 2px 11px; } .button_full_width {width: calc(100% - 6px);} .button_highlight {background: linear-gradient(var(--highlight_color), var(--highlight_color_dark)) !important; color: var(--highlight_text_color) !important;} @@ -497,6 +493,10 @@ select:disabled , select.disabled { cursor: not-allowed; } +.round { + border-radius: 32px; +} + /* Dropdown list of the select tag */ option{ background-color: var(--input_color_dark); @@ -516,9 +516,9 @@ input[type="date"]{ margin: 3px; /* Same as button, to make them align nicely */ border: none; box-sizing: border-box; - border-radius: 3px; + border-radius: 8px; background: linear-gradient(var(--input_color_dark), var(--input_color)); - box-shadow: inset 2px 2px 6px -3px var(--shadow_color); + box-shadow: inset 1px 1px 4px -2px var(--shadow_color); padding: 3px 5px; color: var(--input_text_color); font-size: 1em; diff --git a/res/include/style/modal.css b/res/include/style/modal.css index 95248c8..9529f41 100644 --- a/res/include/style/modal.css +++ b/res/include/style/modal.css @@ -24,6 +24,8 @@ box-sizing: border-box; text-align: left; box-shadow: var(--shadow_color) 0px 0px 50px; + border-radius: 8px; + overflow: hidden; } .modal_header { diff --git a/res/include/style/viewer.css b/res/include/style/viewer.css index 2c9c0b8..9bc202c 100644 --- a/res/include/style/viewer.css +++ b/res/include/style/viewer.css @@ -13,6 +13,7 @@ bottom: 0; left: 0; overflow: hidden; + background-color: var(--layer_2_color); } /* Headerbar (row 1) */ @@ -24,6 +25,7 @@ text-align: left; z-index: 10; box-shadow: none; + padding: 6px; } .file_viewer > .file_viewer_headerbar_embedded { padding: 2px; @@ -51,7 +53,7 @@ .file_viewer > .file_viewer_headerbar > .button_home > svg { height: 1.6em; width: 1.6em; - margin: 0 0.2em 0 0; + margin: 0; } .file_viewer > .file_viewer_headerbar > .button_home::after { content: "pixeldrain"; @@ -81,7 +83,7 @@ z-index: 50; white-space: nowrap; } -.file_viewer > .list_navigator > .list_item{ +.file_viewer > .list_navigator > .list_item { height: 2.6em !important; width: 220px !important; } @@ -111,11 +113,11 @@ transition: left 0.5s; overflow: hidden; box-shadow: inset 2px 2px 10px 2px var(--shadow_color); + border-radius: 16px; } /* Sponsors (row 4) */ .file_viewer > .sponsors { - background-color: var(--layer_1_color); font-size: 0; line-height: 0; } @@ -139,15 +141,15 @@ z-index: 49; overflow: hidden; float: left; - background-color: var(--layer_1_color); left: -9em; bottom: 0; top: 0; padding: 0; text-align: left; transition: left 0.5s; + background-color: var(--layer_2_color); } -.file_viewer > .file_viewer_window > .file_viewer_sharebar{ +.file_viewer > .file_viewer_window > .file_viewer_sharebar { position: absolute; width: 7em; left: -8em; @@ -156,8 +158,9 @@ overflow-y: scroll; overflow-x: hidden; float: left; - background-color: var(--layer_1_color); box-shadow: inset 1px 1px var(--layer_1_shadow) var(--shadow_color); + background-color: var(--layer_1_color); + border-radius: 16px; text-align: center; z-index: 48; overflow: hidden; diff --git a/res/template/file_viewer.html b/res/template/file_viewer.html index 3e0da7e..aa9474a 100644 --- a/res/template/file_viewer.html +++ b/res/template/file_viewer.html @@ -29,9 +29,11 @@
-
- - +
+ + {{template `pixeldrain.svg` .}}
@@ -39,7 +41,7 @@
loading...
-
@@ -53,6 +55,7 @@
Size
N/A
+
-
+
{{template "spinner.svg" .}}
diff --git a/svelte/src/home_page/HomePage.svelte b/svelte/src/home_page/HomePage.svelte index 7f37357..476490f 100644 --- a/svelte/src/home_page/HomePage.svelte +++ b/svelte/src/home_page/HomePage.svelte @@ -520,7 +520,7 @@ const keydown = (e) => { min-width: 250px; max-width: 400px; margin: 10px !important; - border-radius: 5px; + border-radius: 32px; font-size: 1.8em; } .instruction { diff --git a/svelte/src/util/Modal.svelte b/svelte/src/util/Modal.svelte index 4ae311d..4618931 100644 --- a/svelte/src/util/Modal.svelte +++ b/svelte/src/util/Modal.svelte @@ -83,6 +83,8 @@ const keydown = e => { left: 50%; transform: translate(-50%, -20%); padding: 0; + border-radius: 8px; + overflow: hidden; box-sizing: border-box; text-align: left; box-shadow: var(--shadow_color) 0px 0px 50px; diff --git a/webcontroller/file_viewer.go b/webcontroller/file_viewer.go index 148bec4..093362a 100644 --- a/webcontroller/file_viewer.go +++ b/webcontroller/file_viewer.go @@ -78,10 +78,10 @@ func (vd *viewerData) adType(files []pixelapi.ListFile) { // Intn returns a number up to n, but never n itself. So to get a random 0 // or 1 we need to give it n=2. We can use this function to make other // splits like 1/3 1/4, etc - switch i := rand.Intn(4); i { - case 0: // 25% + switch i := rand.Intn(5); i { + case 0: // 20% vd.AdBannerType = brave - case 2, 3, 4: // 75% + case 1, 2, 3, 4: // 80% vd.AdBannerType = aAds default: panic(fmt.Errorf("random number generator returned unrecognised number: %d", i))