Browse Source

[webconsole] update stylesheet

Signed-off-by: R4SAS <r4sas@i2pmail.org>
pull/1705/head
R4SAS 3 years ago
parent
commit
fdde197c58
Signed by: r4sas
GPG Key ID: 66F6C87B98EBCFE2
  1. 12
      contrib/webconsole/style.css
  2. 10
      daemon/HTTPServerResources.h

12
contrib/webconsole/style.css

@ -7,7 +7,7 @@
* *
****************************************************************** ******************************************************************
* *
* This is styles heet for webconsole, with @media selectors for adaptive * This is style sheet for webconsole, with @media selectors for adaptive
* view on desktop and mobile devices, respecting preferred user's color * view on desktop and mobile devices, respecting preferred user's color
* scheme used in system/browser. * scheme used in system/browser.
* *
@ -22,7 +22,7 @@
@media (prefers-color-scheme: dark) { @media (prefers-color-scheme: dark) {
:root { :root {
--main-bg-color: #121212; --main-bg-color: #181818;
--main-text-color: #156A3D; --main-text-color: #156A3D;
--main-link-color: #894C84; --main-link-color: #894C84;
} }
@ -63,7 +63,7 @@ a.button {
.wrapper { .wrapper {
margin: 0 auto; margin: 0 auto;
padding: 1em; padding: 1em;
max-width: 64em; max-width: 60em;
} }
.menu { .menu {
@ -92,7 +92,7 @@ a.button {
.content { .content {
float: left; float: left;
font-size: 1em; font-size: 1em;
margin-left: 2em; margin-left: 4em;
padding: 4px; padding: 4px;
max-width: 50em; max-width: 50em;
overflow: auto; overflow: auto;
@ -192,7 +192,7 @@ input[type=number]::-webkit-inner-spin-button {
@media screen and (max-width: 1150px) { /* adaptive style */ @media screen and (max-width: 1150px) { /* adaptive style */
.wrapper { .wrapper {
max-width: 60em; max-width: 56em;
} }
.menu { .menu {
@ -201,7 +201,7 @@ input[type=number]::-webkit-inner-spin-button {
.content { .content {
margin-left: 2em; margin-left: 2em;
max-width: 46em; max-width: 44em;
} }
} }

10
daemon/HTTPServerResources.h

@ -35,17 +35,17 @@ namespace http
const std::string internalCSS = const std::string internalCSS =
"<style>\r\n" "<style>\r\n"
":root { --main-bg-color: #FAFAFA; --main-text-color: #103456; --main-link-color: #894C84; }\r\n" ":root { --main-bg-color: #FAFAFA; --main-text-color: #103456; --main-link-color: #894C84; }\r\n"
"@media (prefers-color-scheme: dark) { :root { --main-bg-color: #121212; --main-text-color: #156A3D; --main-link-color: #894C84; } }\r\n" "@media (prefers-color-scheme: dark) { :root { --main-bg-color: #181818; --main-text-color: #156A3D; --main-link-color: #894C84; } }\r\n"
"body { font: 100%/1.5em sans-serif; margin: 0; padding: 1.5em; background: var(--main-bg-color); color: var(--main-text-color); }\r\n" "body { font: 100%/1.5em sans-serif; margin: 0; padding: 1.5em; background: var(--main-bg-color); color: var(--main-text-color); }\r\n"
"a, .slide label { text-decoration: none; color: var(--main-link-color)}\r\n" "a, .slide label { text-decoration: none; color: var(--main-link-color)}\r\n"
"a:hover, .slide label:hover, button[type=submit]:hover { color: #FAFAFA; background: var(--main-link-color)}\r\n" "a:hover, .slide label:hover, button[type=submit]:hover { color: #FAFAFA; background: var(--main-link-color)}\r\n"
"a.button { appearance: button; text-decoration: none; padding: 0 5px; border: 1px solid var(--main-link-color)}\r\n" "a.button { appearance: button; text-decoration: none; padding: 0 5px; border: 1px solid var(--main-link-color)}\r\n"
".header { font-size: 2.5em; text-align: center; margin: 1em 0; color: var(--main-link-color)}\r\n" ".header { font-size: 2.5em; text-align: center; margin: 1em 0; color: var(--main-link-color)}\r\n"
".wrapper { margin: 0 auto; padding: 1em; max-width: 64em}\r\n" ".wrapper { margin: 0 auto; padding: 1em; max-width: 60em}\r\n"
".menu { display: block; float: left; overflow: hidden; padding: 4px; max-width: 12em; white-space: nowrap; text-overflow: ellipsis}\r\n" ".menu { display: block; float: left; overflow: hidden; padding: 4px; max-width: 12em; white-space: nowrap; text-overflow: ellipsis}\r\n"
".listitem { display: block; font-family: monospace; font-size: 1.2em; white-space: nowrap}\r\n" ".listitem { display: block; font-family: monospace; font-size: 1.2em; white-space: nowrap}\r\n"
".tableitem { font-family: monospace; font-size: 1.2em; white-space: nowrap}\r\n" ".tableitem { font-family: monospace; font-size: 1.2em; white-space: nowrap}\r\n"
".content { float: left; font-size: 1em; margin-left: 2em; padding: 4px; max-width: 50em; overflow: auto}\r\n" ".content { float: left; font-size: 1em; margin-left: 4em; padding: 4px; max-width: 50em; overflow: auto}\r\n"
".tunnel.established { color: #56B734}\r\n" ".tunnel.established { color: #56B734}\r\n"
".tunnel.expiring { color: #D3AE3F}\r\n" ".tunnel.expiring { color: #D3AE3F}\r\n"
".tunnel.failed { color: #D33F3F}\r\n" ".tunnel.failed { color: #D33F3F}\r\n"
@ -67,9 +67,9 @@ namespace http
"input:focus, select:focus, select option:focus { outline: none}\r\n" "input:focus, select:focus, select option:focus { outline: none}\r\n"
"input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none}\r\n" "input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none}\r\n"
"@media screen and (max-width: 1150px) { /* adaptive style */\r\n" "@media screen and (max-width: 1150px) { /* adaptive style */\r\n"
" .wrapper { max-width: 60em; }\r\n" " .wrapper { max-width: 56em; }\r\n"
" .menu { max-width: 10em; }\r\n" " .menu { max-width: 10em; }\r\n"
" .content { margin-left: 2em; max-width: 46em; }\r\n" " .content { margin-left: 2em; max-width: 44em; }\r\n"
"}\r\n" "}\r\n"
"@media screen and (max-width: 980px) { body { font: 100%/1.2em sans-serif; padding: 1.2em 0 0 0; }\r\n" "@media screen and (max-width: 980px) { body { font: 100%/1.2em sans-serif; padding: 1.2em 0 0 0; }\r\n"
" .menu { width: 100%; max-width: unset; display: block; float: none; position: unset; font-size: 16px; text-align: center; }\r\n" " .menu { width: 100%; max-width: unset; display: block; float: none; position: unset; font-size: 16px; text-align: center; }\r\n"

Loading…
Cancel
Save