Overhauled the complete user interface

This commit is contained in:
ChaoticByte 2025-09-07 22:32:38 +02:00
parent 5fefee2282
commit 7fa405a957
No known key found for this signature in database
11 changed files with 229 additions and 173 deletions

View file

@ -1,4 +1,4 @@
/* Font */
/* Fonts */
@font-face {
font-family: "Inter";
@ -18,26 +18,37 @@
:root {
--font-family: "Inter";
--color: #fafafa;
--color-error: #ff682c;
--bg-page: linear-gradient(#18151a, #060a0e);
--bg-color: #ffffff2c;
--color-disabled: #ffffff50;
--color-error: #ff817c;
--bg-page: linear-gradient(
-10deg,
#071c29 10%,
#4a8897
);
--bg-color: #ffffff35;
--bg-color2: #ffffff25;
--bg-hover-color: #ffffff50;
--bg-color2: #ffffff44;
--bg-dropdown-color: #3a3a3f;
--bg-dropdown-hover-color: #59595c;
--border-color: #ffffff67;
--border-color: #ffffff50;
--bg-globalmessage: #161616;
--border-radius: .25rem;
--border-radius: .6rem;
--element-padding: .6rem .8rem;
}
/* General */
body,
input,
select,
button, .button
{
font-family: var(--font-family);
}
body {
margin: 0;
padding: 0;
width: 100vw;
min-height: 100vh;
font-family: var(--font-family);
font-size: 17px;
background: var(--bg-page);
color: var(--color);
@ -67,29 +78,36 @@ input[type="number"]::-webkit-inner-spin-button {
display: none;
}
input[type="text"], input[type="password"], input[type="number"], select {
padding: .5rem .8rem;
text-align: center;
input[type="text"],
input[type="password"],
input[type="number"],
select {
padding: var(--element-padding);
text-align: center !important;
font-size: 16px;
color: var(--color);
border: none;
outline: none;
border-bottom: 1px solid var(--border-color);
border: 1px solid var(--border-color);
border-radius: var(--border-radius);
background: var(--bg-color);
font-family: "Inter";
}
input[type="text"]::placeholder,
input[type="password"]::placeholder,
input[type="number"]::placeholder,
select > option:disabled {
color: var(--color-disabled);
}
select {
appearance: none;
-webkit-appearance: none;
-moz-appearance: none;
height: 2.2rem;
background-image: url("/static/material-icons/arrow-drop-down.svg");
background-repeat: no-repeat;
background-position: right;
background-size: 1.5rem;
padding-right: 1.8rem;
}
table {
@ -108,12 +126,6 @@ tr:nth-child(2n+2) > td {
background: var(--bg-color2);
}
/*
Rounded corners on table cells apparently don't work with
Firefox, so Firefox users won't have rounded corners
on tables. Can't fix that by myself.
*/
table tr:first-child th:first-child {
border-top-left-radius: var(--border-radius);
}
@ -274,15 +286,6 @@ main {
gap: 1rem;
}
.fill {
height: 100%;
width: 100%;
}
.fill-vertical {
height: 100%;
}
.buttons {
display: flex;
flex-direction: row;
@ -295,24 +298,26 @@ main {
display: flex;
align-items: center;
justify-content: center;
font-family: var(--font-family);
text-decoration: none;
text-align: center !important;
background: var(--bg-color);
color: var(--color);
font-size: 16px;
padding: .5rem .8rem;
outline: none;
border: none;
border-bottom: 1px solid var(--border-color);
border: 1px solid var(--border-color);
border-radius: var(--border-radius);
cursor: pointer;
user-select: none;
box-sizing: content-box;
width: fit-content;
}
.button:hover, button:hover, .button:active, button:active {
.button, button, .dropdownchoice {
padding: var(--element-padding);
font-size: 16px;
text-align: center !important;
text-decoration: none;
color: var(--color);
box-sizing: content-box;
cursor: pointer;
user-select: none;
background: var(--bg-color);
}
.button:hover, button:hover,
.button:active, button:active {
background: var(--bg-hover-color);
}
@ -320,30 +325,55 @@ main {
opacity: 40%;
}
.appform > .forminfo {
width: 100%;
.formheading {
margin-bottom: 2rem;
}
.forminfo {
width: fit-content;
min-width: 16rem;
text-align: left;
display: flex;
flex-direction: row;
justify-content: space-between;
gap: 2rem;
padding-bottom: .15rem;
border-bottom: 1px solid #ffffff20;
}
.forminfo > span:last-child {
float: right;
}
.appform, .appform > * {
max-width: 90vw;
}
.appform > .forminput {
width: 100%;
flex-direction: row;
justify-content: space-between;
align-items: flex-end;
align-items: center;
flex-wrap: wrap;
gap: 1rem;
}
.appform > .statusinfo {
margin-top: .5rem;
.forminput > input, .forminput > select {
width: 100% !important;
}
.forminput > .keyboard-input, #transfer-recipient {
/* the keyboard has a 5px padding */
margin-left: 5px !important;
margin-right: 5px !important;
}
.appform > .buttons {
margin-top: 1rem;
}
#statusinfo {
margin-top: 1rem;
}
.dropdownmenu {
@ -354,6 +384,16 @@ main {
border-radius: var(--border-radius);
}
#dropdownnope {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
margin: 0;
padding: 0;
}
.dropdownbutton {
z-index: 190;
}
@ -368,64 +408,65 @@ main {
position: absolute;
display: flex;
flex-direction: column;
pointer-events: none;
gap: .5rem;
border-radius: var(--border-radius);
box-shadow: 0 0 .5rem #00000025;
}
.dropdownlist, #dropdownnope {
visibility: hidden;
opacity: 0%;
pointer-events: none;
}
.dropdownvisible .dropdownlist,
.dropdownvisible #dropdownnope {
opacity: 100%;
background: #00000020;
visibility: visible;
pointer-events: visible;
z-index: 100;
}
.dropdownchoice {
z-index: 200;
border-radius: var(--border-radius) !important;
margin: 0;
text-align: center;
justify-content: center;
background: var(--bg-dropdown-color) !important;
text-decoration: none;
width: initial;
box-shadow: 0 0 1.5rem #00000090;
min-width: max-content;
border-bottom: 1px solid var(--border-color);
border-left: 1px solid var(--border-color);
border-right: 1px solid var(--border-color);
}
.dropdownchoice:first-child {
border-top: 1px solid var(--border-color);
border-top-left-radius: var(--border-radius);
border-top-right-radius: var(--border-radius);
}
.dropdownchoice:last-child {
border-bottom: 1px solid var(--border-color);
border-bottom-left-radius: var(--border-radius);
border-bottom-right-radius: var(--border-radius);
}
.dropdownchoice:hover {
background: var(--bg-dropdown-hover-color) !important;
}
.dropdownlist :first-child {
border-top-left-radius: var(--border-radius) !important;
border-top-right-radius: var(--border-radius) !important;
}
.dropdownlist :last-child {
border-bottom-left-radius: var(--border-radius) !important;
border-bottom-right-radius: var(--border-radius) !important;
}
.dropdownvisible .dropdownlist {
opacity: 100%;
visibility: visible;
pointer-events: visible;
background: var(--bg-hover-color);
}
.customnumberinput {
height: 2.2rem;
display: flex;
flex-direction: row;
align-items: center;
gap: .25rem;
}
.customnumberinput button {
min-width: 2.5rem !important;
width: 2.5rem !important;
width: 2.2rem !important;
height: 2.2rem !important;
padding: 0;
margin: 0;
height: 100%;
}
.customnumberinput-minus {
border-bottom-right-radius: 0;
border-top-right-radius: 0;
z-index: 10;
}
.customnumberinput-plus {
border-bottom-left-radius: 0;
border-top-left-radius: 0;
z-index: 10;
}
.customnumberinput input[type="number"] {
@ -434,13 +475,13 @@ main {
padding: 0;
margin: 0;
background: var(--bg-color2);
border-radius: 0 !important;
-webkit-appearance: textfield;
-moz-appearance: textfield;
appearance: textfield;
}
.errortext {
font-weight: bold;
color: var(--color-error);
}
@ -450,6 +491,11 @@ main {
/* Login */
.userlist-container {
flex-grow: 1;
padding-bottom: 10vh;
}
.userlist {
width: 60%;
list-style: none;
@ -459,8 +505,7 @@ main {
}
.userlist > li {
margin-bottom: .5rem;
padding: 0 .5rem;
padding: .1rem .6rem;
}
.userlist > li > img {
@ -485,6 +530,18 @@ main {
margin-top: 0;
}
#passwordoverlay-container {
position: fixed;
width: 100vw;
height: 100vh;
top: 0;
right: 0;
background: var(--bg-page);
align-items: center;
padding-top: 10vh;
z-index: 200;
}
/* Drinks List */
.drinks-list {
@ -524,12 +581,13 @@ main {
/* Blur */
@supports (backdrop-filter: blur()) {
:root {
--bg-dropdown-color: var(--bg-color);
--bg-dropdown-hover-color: var(--bg-hover-color);
.dropdownvisible #dropdownnope {
backdrop-filter: blur(16px);
}
.dropdownchoice {
backdrop-filter: blur(32px);
#passwordoverlay-container {
background: #00000020;
backdrop-filter: blur(64px); /* fallback */
backdrop-filter: blur(128px);
}
}
@ -553,9 +611,10 @@ main {
}
}
@media only screen and (max-width: 700px) {
@media only screen and (max-width: 860px) {
.userpanel {
flex-direction: column;
gap: 1rem;
}
.userlist {
gap: 0.25rem;
@ -574,7 +633,10 @@ main {
}
.dropdownlist {
width: 14rem;
right: calc(50vw - 7rem);
right: calc(50vw - 7rem); /* regard width */
left: auto;
}
#keyboard {
display: none !important;
}
}

View file

@ -15,8 +15,8 @@
align-items: center;
background: var(--bg-color);
color: white;
border: none;
border-bottom: 1px solid var(--border-color);
border: 1px solid var(--border-color);
border-radius: var(--border-radius);
}
.simple-keyboard.darkTheme .hg-button:active,
.simple-keyboard.darkTheme .hg-button:hover {