From 4f17c71b56bef4ceb0710d277823a0bec96d163b Mon Sep 17 00:00:00 2001 From: Fornax Date: Mon, 3 Jan 2022 14:02:50 +0100 Subject: [PATCH] Make the UI flatter --- res/include/style/layout.css | 89 ++++++------------- res/static/ads.txt | 1 + res/template/404.html | 8 +- res/template/451.html | 8 +- res/template/500.html | 8 +- res/template/admin.html | 1 - res/template/appearance.html | 8 +- res/template/apps.html | 8 +- res/template/email_confirm.html | 12 ++- res/template/file_not_found.html | 30 ++++--- res/template/file_viewer_compat.html | 9 +- res/template/fragments/form.html | 9 +- res/template/fragments/markdown_wrapper.html | 8 +- res/template/fragments/page_wrap.html | 4 +- res/template/history.html | 10 ++- res/template/home.html | 25 +++--- res/template/server_status.html | 25 ------ res/template/user_buckets.html | 5 +- res/template/user_home.html | 2 - res/template/user_logout.html | 47 +++++----- res/template/widgets.html | 11 +-- svelte/src/admin_panel/Home.svelte | 11 ++- svelte/src/admin_panel/Router.svelte | 32 +++---- svelte/src/home_page/HomePage.svelte | 55 ++++++------ .../user_file_manager/DirectoryElement.svelte | 4 +- .../src/user_file_manager/FileManager.svelte | 19 +++- svelte/src/user_home/Router.svelte | 32 +++---- svelte/src/util/Modal.svelte | 2 +- webcontroller/user_style.go | 2 +- webcontroller/web_controller.go | 1 - 30 files changed, 239 insertions(+), 247 deletions(-) delete mode 100644 res/template/server_status.html diff --git a/res/include/style/layout.css b/res/include/style/layout.css index c75088f..14b8e48 100644 --- a/res/include/style/layout.css +++ b/res/include/style/layout.css @@ -7,19 +7,6 @@ --highlight_border: inset 0px 0px 5px 1px var(--highlight_color), 0px 0px 1px 0px var(--highlight_color); } -/* Fonts */ -@font-face { - font-family: 'light'; - font-display: fallback; - font-style: normal; - font-weight: normal; - src: - local('Cantarell Light'), - local('Cantarell, Light'), - local('Cantarell-Light'), - url(/res/misc/Cantarell-Light.otf) format("opentype"); -} - @font-face { font-family: 'Material Icons'; font-style: normal; @@ -65,18 +52,24 @@ body{ font-family: system-ui, sans-serif; font-size: 17px; line-height: 1.8em; - color: #b2b2b2; /* Fallback */ color: var(--text_color); + background-color: var(--layer_2_color); padding: 0; } -body, .checkers { +.checkers { background-image: url("{{bgPattern}}"); background-color: #111111; /* Fallback */ background-color: var(--layer_1_color); background-repeat: repeat; - background-attachment: fixed; background-blend-mode: luminosity; } +.inset { + padding-top: 70px; + box-shadow: inset 1px 1px 10px 0 var(--shadow_color); + border-radius: 16px; + text-align: center; + overflow: hidden; +} /* Page layout elements */ .page_wrapper { @@ -100,7 +93,7 @@ body, .checkers { background: var(--input_color); border-radius: 0; border-bottom-right-radius: 90%; - box-shadow: 2px 2px 8px -3px var(--shadow_color); + box-shadow: 0 0 6px -2px var(--shadow_color); } .button_toggle_navigation:active { padding: 15px 15px 10px 15px; @@ -109,23 +102,19 @@ body, .checkers { .page_navigation { position: fixed; backface-visibility: hidden; - z-index: 99; width: 18em; height: 100%; left: 0; float: left; - background-color: #1c1c1c; - background-color: var(--layer_1_color); - padding: 20px 0 0.5em 0; + background-color: var(--layer_2_color); + padding: 20px 10px 10px 0; overflow-y: auto; overflow-x: hidden; text-align: left; - box-shadow: inset -8px 0px 8px -8px var(--shadow_color); transition: left 0.5s; } .page_body { position: absolute; - z-index: 200; right: 0; height: auto; left: 18em; @@ -134,9 +123,8 @@ body, .checkers { text-align: center; /* Center the header and body */ overflow-y: auto; overflow-x: hidden; - z-index: 50; + background-color: var(--layer_2_color); transition: left 0.5s; - padding: 70px 0 100px 0; } @media (max-width: 1000px) { .page_navigation { @@ -147,18 +135,6 @@ body, .checkers { width: 100%; } } - -.page_body > .page_content { - position: relative; - display: inline-block; - width: 100%; - height: auto; - padding: 0 0 20px 0; - background-color: #212121; - background-color: var(--layer_2_color); - box-shadow: 1px 1px 12px 0 var(--shadow_color); - clear: both; -} .limit_width { position: relative; display: inline-block; @@ -184,8 +160,9 @@ body, .checkers { text-align: center; padding: 4px; margin: 0.3em 15px 0.3em 15px; - font-family: "light", sans-serif; - font-size: 1.6em; + font-family: sans-serif; + font-weight: lighter; + font-size: 1.5em; overflow: hidden; text-overflow: ellipsis; transition: background-color 0.5s; @@ -200,11 +177,6 @@ body, .checkers { text-decoration: none; } -.inset { - box-shadow: inset 1px 1px 20px 0 #000000; - box-shadow: inset 1px 1px 20px 0 var(--shadow_color); -} - .highlight_dark, .highlight_middle, .highlight_light, @@ -223,22 +195,19 @@ body, .checkers { overflow: hidden; text-align: center; padding: 4px; + border-radius: 8px; } .highlight_dark, .highlight_1 { background-color: var(--layer_1_color); - box-shadow: 1px 1px 6px -2px var(--shadow_color); } .highlight_middle, .highlight_2 { background-color: var(--layer_2_color); - box-shadow: 1px 1px 6px -2px var(--shadow_color); } .highlight_light, .highlight_3 { background-color: var(--layer_3_color); - box-shadow: 1px 1px 6px -2px var(--shadow_color); } .highlight_lighter, .highlight_4 { background-color: var(--layer_4_color); - box-shadow: 1px 1px 6px -2px var(--shadow_color); } .highlight_green { background-color: rgba(0, 255, 0, 0.05); @@ -273,43 +242,40 @@ h1, h2, h3, h4, h5, h6 { line-height: 1em; margin: 0.5em 10px; font-weight: normal; + font-weight: lighter; + font-family: sans-serif; } h1 { font-size: 2.5em; - font-family: "light", sans-serif; text-align: center; + margin-bottom: 50px; } h2 { font-size: 2em; - font-family: "light", sans-serif; border-bottom: 1px var(--layer_4_color_border) solid; } h3 { - font-size: 1.6em; - font-family: "light", sans-serif; + font-size: 1.75em; border-bottom: 1px var(--layer_3_color_border) solid; } h4 { - font-size: 1.25em; - font-family: "light", sans-serif; + font-size: 1.50em; border-bottom: 1px var(--layer_2_color_border) solid; } h5 { - font-size: 1em; - font-family: sans-serif; + font-size: 1.25em; border-bottom: 1px var(--layer_1_color_border) solid; } -h6{ - font-size: .75em; - font-family: sans-serif; +h6 { + font-size: 1em; } p, .indent { margin: 10px; } -hr{ +hr { height: 1px; border: none; background-color: var(--input_color); @@ -513,13 +479,12 @@ select:disabled , select.disabled { .tab_bar { display: block; width: 100%; - margin: 0 0 16px 0; overflow-x: auto; overflow-y: hidden; white-space: nowrap; text-align: center; background-color: var(--layer_1_color); - box-shadow: inset 0 -10px 8px -12px var(--shadow_color); + box-shadow: inset 0 -10px 8px -12px var(--shadow_color), 0 0 10px var(--shadow_color); } .tab_bar > button, .tab_bar > .button { diff --git a/res/static/ads.txt b/res/static/ads.txt index 4936902..2ca10c3 100644 --- a/res/static/ads.txt +++ b/res/static/ads.txt @@ -1407,3 +1407,4 @@ onetag.com, 5cd7fb62fac7ec9, DIRECT openx.com, 537133236, RESELLER, 6a698e2ec38604c6 pubmatic.com, 158685, RESELLER, 5d62403b186f2ace rubiconproject.com, 13380, RESELLER, 0bfd66d529a55807 +triplelift.com, 10992, RESELLER, 6c33edb13117fd86 diff --git a/res/template/404.html b/res/template/404.html index 00ca895..866cf93 100644 --- a/res/template/404.html +++ b/res/template/404.html @@ -7,8 +7,10 @@ {{template "page_top" .}} -

This page does not exist!

-
+
+

This page does not exist!

+
+

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

Bye!

-
+
{{template "page_bottom" .}} {{template "analytics"}} diff --git a/res/template/451.html b/res/template/451.html index 761c00f..552cd3c 100644 --- a/res/template/451.html +++ b/res/template/451.html @@ -7,13 +7,15 @@ {{template "page_top" .}} -

451, Unavailable For Legal Reasons

-
+
+

451, Unavailable For Legal Reasons

+
+

Hello. This file has received an abuse report and has been taken down. It cannot be shared anymore.

-
+
{{template "page_bottom" .}} {{template "analytics"}} diff --git a/res/template/500.html b/res/template/500.html index 2a00fc9..865e717 100644 --- a/res/template/500.html +++ b/res/template/500.html @@ -7,8 +7,10 @@ {{template "page_top" .}} -

You broke pixeldrain

-
+
+

You broke pixeldrain

+
+

Great job.

@@ -22,7 +24,7 @@ try again in a few minutes (or hours), or go back to the home page and start over.

-
+
{{template "page_bottom" .}} {{template "analytics"}} diff --git a/res/template/admin.html b/res/template/admin.html index a6ef80c..cf8b7b4 100644 --- a/res/template/admin.html +++ b/res/template/admin.html @@ -15,7 +15,6 @@ {{template "page_top" .}} -

Admin Panel

{{template "page_bottom" .}} diff --git a/res/template/appearance.html b/res/template/appearance.html index a23b388..adb9df3 100644 --- a/res/template/appearance.html +++ b/res/template/appearance.html @@ -7,8 +7,10 @@ {{template "page_top" .}} -

Change website appearance

-
+
+

Change website appearance

+
+

You can change how pixeldrain looks! Your theme choice will be saved in a cookie. @@ -26,7 +28,7 @@

-
+ -
+
+

Admin Panel

+ - - {#if page === "status"} - - {:else if page === "block_files"} - - {:else if page === "abuse_reports"} - - {:else if page === "abuse_reporters"} - - {:else if page === "ip_bans"} - - {:else if page === "subscriptions"} - - {/if}
+ +{#if page === "status"} + +{:else if page === "block_files"} + +{:else if page === "abuse_reports"} + +{:else if page === "abuse_reporters"} + +{:else if page === "ip_bans"} + +{:else if page === "subscriptions"} + +{/if} diff --git a/svelte/src/home_page/HomePage.svelte b/svelte/src/home_page/HomePage.svelte index 39637f1..6578ce6 100644 --- a/svelte/src/home_page/HomePage.svelte +++ b/svelte/src/home_page/HomePage.svelte @@ -391,15 +391,14 @@ const keydown = (e) => {
{/if} -
-
- 1 - Select files to upload -
- You can also drop files on this page from your file - manager or paste an image from your clipboard -
+
+ 1 + Select files to upload +
+ You can also drop files on this page from your file manager or + paste an image from your clipboard
+
@@ -521,11 +518,9 @@ const keydown = (e) => {
{#if window.user.subscription.name === ""} -
-
- 4 - Support me on Patreon! -
+
+ 4 + Support me on Patreon!

diff --git a/svelte/src/user_file_manager/DirectoryElement.svelte b/svelte/src/user_file_manager/DirectoryElement.svelte index b2f7bda..64b1359 100644 --- a/svelte/src/user_file_manager/DirectoryElement.svelte +++ b/svelte/src/user_file_manager/DirectoryElement.svelte @@ -325,7 +325,7 @@ const node_click = (index) => { {/each}

- @@ -382,6 +382,8 @@ const node_click = (index) => { #footer { flex-shrink: 0; text-align: left; + background-color: var(--layer_1_color); + padding: 4px; } .node { diff --git a/svelte/src/user_file_manager/FileManager.svelte b/svelte/src/user_file_manager/FileManager.svelte index 56b3526..7e9ba0a 100644 --- a/svelte/src/user_file_manager/FileManager.svelte +++ b/svelte/src/user_file_manager/FileManager.svelte @@ -256,8 +256,16 @@ onMount(() => { + + + +
-