Merge pull request #5 from ranchimall/ui-testing

UI update
This commit is contained in:
sairaj mote 2022-04-03 16:15:57 +05:30 committed by GitHub
commit 5589dc681e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 1918 additions and 1813 deletions

1
args/app-config.json Normal file
View File

@ -0,0 +1 @@
{"secret":"9qWGMLljSaHWGfm4tfXMxukjig43fBtafjZ","port":"8080","sql_user":"user","sql_pwd":"Qwerty@123","sql_db":"exchange","sql_host":"localhost","backup-port":"8081","backup-floIDs":[]}

File diff suppressed because it is too large Load Diff

View File

@ -16,38 +16,29 @@ body {
} }
body { body {
color: rgba(var(--text-color), 1);
background: rgba(var(--background-color), 1);
}
body,
body * {
--accent-color: #504dff; --accent-color: #504dff;
--accent-color--light: #eeeeff; --text-color: 20, 20, 20;
--text-color: 36, 36, 36; --background-color: 240, 240, 240;
--background-color: 255, 255, 255; --foreground-color: 250, 250, 250;
--foreground-color: rgb(250, 252, 255);
--danger-color: rgb(255, 75, 75); --danger-color: rgb(255, 75, 75);
--green: #1cad59; --green: #1cad59;
--yellow: #f3a600;
--loan-color: rgb(255, 171, 93);
scrollbar-width: thin; scrollbar-width: thin;
scrollbar-gutter: stable;
color: rgba(var(--text-color), 1);
background-color: rgba(var(--background-color), 1);
transition: background-color 0.3s;
} }
body[data-theme=dark], body[data-theme=dark] {
body[data-theme=dark] * {
--accent-color: #a3a1ff; --accent-color: #a3a1ff;
--accent-color--light: rgba(142, 140, 255, 0.06); --text-color: 220, 220, 220;
--text-color: 230, 230, 230;
--text-color-light: 170, 170, 170;
--background-color: 10, 10, 10; --background-color: 10, 10, 10;
--foreground-color: rgb(24, 24, 24); --foreground-color: 24, 24, 24;
--danger-color: rgb(255, 106, 106); --danger-color: rgb(255, 106, 106);
--green: #00e676; --green: #00e676;
--yellow: #ffd13a;
--loan-color: rgb(255, 232, 170);
} }
body[data-theme=dark] sm-popup::part(popup) { body[data-theme=dark] sm-popup::part(popup) {
background-color: var(--foreground-color); background-color: rgba(var(--foreground-color), 1);
} }
p, p,
@ -128,7 +119,6 @@ a:any-link:focus-visible {
sm-input { sm-input {
font-size: 0.9rem; font-size: 0.9rem;
--border-radius: 0.3rem; --border-radius: 0.3rem;
--background: var(--accent-color--light);
} }
sm-button { sm-button {
@ -149,6 +139,10 @@ sm-button.danger {
color: rgba(var(--background-color), 1); color: rgba(var(--background-color), 1);
} }
sm-form {
--gap: 1rem;
}
ul { ul {
list-style: none; list-style: none;
} }
@ -166,7 +160,7 @@ ul {
pointer-events: none; pointer-events: none;
} }
.hide-completely { .hide {
display: none !important; display: none !important;
} }
@ -313,11 +307,21 @@ ul {
.interact { .interact {
position: relative; position: relative;
overflow: hidden;
cursor: pointer; cursor: pointer;
transition: transform 0.3s;
-webkit-tap-highlight-color: transparent; -webkit-tap-highlight-color: transparent;
} }
.ripple {
height: 8rem;
width: 8rem;
position: absolute;
border-radius: 50%;
transform: scale(0);
background: radial-gradient(circle, rgba(var(--text-color), 0.3) 0%, rgba(0, 0, 0, 0) 50%);
pointer-events: none;
}
.empty-state { .empty-state {
display: grid; display: grid;
justify-content: center; justify-content: center;
@ -328,23 +332,19 @@ ul {
} }
.observe-empty-state:empty { .observe-empty-state:empty {
display: none; display: none !important;
} }
.observe-empty-state:not(:empty) + .empty-state { .observe-empty-state:not(:empty) + .empty-state {
display: none; display: none !important;
} }
.icon { .icon {
width: 1.5rem; width: 1.2rem;
height: 1.5rem; height: 1.2rem;
fill: rgba(var(--text-color), 0.8); fill: rgba(var(--text-color), 0.8);
} }
.button__icon {
height: 1.2rem;
width: 1.2rem;
}
.button__icon--left { .button__icon--left {
margin-right: 0.5rem; margin-right: 0.5rem;
} }
@ -352,6 +352,12 @@ ul {
margin-left: 0.5rem; margin-left: 0.5rem;
} }
.icon-only {
padding: 0.6rem;
aspect-ratio: 1/1;
background-color: transparent;
}
.icon-button { .icon-button {
padding: 0.6rem; padding: 0.6rem;
border-radius: 0.8rem; border-radius: 0.8rem;
@ -392,12 +398,6 @@ ul {
margin-bottom: 1.5rem; margin-bottom: 1.5rem;
} }
button:active,
.button:active,
.interact:active {
transform: scale(0.96);
}
.popup__header { .popup__header {
display: grid; display: grid;
gap: 0.5rem; gap: 0.5rem;
@ -457,8 +457,8 @@ details[open] > summary .icon {
strip-select { strip-select {
--gap: 0; --gap: 0;
background-color: var(--accent-color--light); background-color: rgba(var(--text-color), 0.06);
border-radius: 0.3rem; border-radius: 0.2rem;
} }
strip-option { strip-option {
@ -469,10 +469,10 @@ strip-option {
--active-option-background-color: var(--accent-color); --active-option-background-color: var(--accent-color);
} }
strip-option:first-of-type { strip-option:first-of-type {
--border-radius: 0.3rem 0 0 0.3rem; --border-radius: 0.2rem 0 0 0.2rem;
} }
strip-option:last-of-type { strip-option:last-of-type {
--border-radius: 0 0.3rem 0.3rem 0; --border-radius: 0 0.2rem 0.2rem 0;
} }
sm-select, sm-select,
@ -506,6 +506,10 @@ sm-checkbox {
height: 100%; height: 100%;
} }
.mobile-page {
align-items: flex-start;
}
#landing { #landing {
grid-template-rows: auto 1fr; grid-template-rows: auto 1fr;
} }
@ -547,10 +551,15 @@ sm-checkbox {
#home { #home {
height: 100%; height: 100%;
display: grid; display: flex;
flex-direction: column;
align-items: flex-start; align-items: flex-start;
align-content: flex-start; align-content: flex-start;
grid-template-columns: minmax(0, 1fr); }
#login_form {
width: min(24rem, 100%);
margin: 0 auto;
} }
#login_form__priv_key { #login_form__priv_key {
@ -558,28 +567,84 @@ sm-checkbox {
} }
#main_header { #main_header {
margin-top: 1.5rem;
margin-bottom: 1rem;
display: grid; display: grid;
gap: 1rem; gap: 1rem;
padding: 1.5rem;
width: 100%;
align-items: center; align-items: center;
grid-template-columns: 1fr auto auto; grid-template-columns: 1fr auto auto;
grid-column: 1/-1; grid-column: 1/-1;
} }
.rate-card { #main_navbar {
grid-template-columns: auto 1fr auto; width: 100%;
gap: 1rem;
padding: 1rem;
border-radius: 0.5rem;
border: solid rgba(var(--text-color), 0.2) thin;
background-color: rgba(var(--background-color), 1);
} }
#trade_form, .main_navbar__item {
#login_form { display: flex;
align-self: flex-start; flex-direction: column;
padding: 1rem 1.5rem 1.5rem 1.5rem; align-items: center;
flex: 1;
padding: 0.5rem 0;
}
.main_navbar__item .item__title,
.main_navbar__item .icon {
transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s;
}
.main_navbar__item .item__title {
color: rgba(var(--text-color), 0.8);
font-size: 0.8rem;
font-weight: 500;
}
.main_navbar__item .icon {
height: 1.2rem;
margin-bottom: 0.3rem;
}
.main_navbar__item--active .item__title {
color: var(--accent-color);
}
.main_navbar__item--active .icon {
fill: var(--accent-color);
}
#pages_container {
display: flex;
flex: 1;
width: 100%;
justify-content: center;
overflow-y: auto;
}
#pages_container > * {
padding: 0 1.5rem;
width: min(42rem, 100%);
}
.listed-asset {
position: relative;
grid-template-columns: auto 1fr auto;
gap: 0.5rem;
padding: 1rem 0;
border-radius: 0.5rem;
opacity: 0.8;
font-weight: 400;
transition: background-color 0.3s;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
color: inherit;
}
.listed-asset__icon {
display: flex;
}
.listed-asset__icon .icon {
height: 1.5rem;
width: 1.5rem;
}
#flo_rate {
font-weight: 700;
} }
.quantity-selector .button { .quantity-selector .button {
@ -600,34 +665,55 @@ sm-checkbox {
min-width: 8ch; min-width: 8ch;
} }
#my_orders_section, #exchange {
#market_orders_section { padding: 0;
padding-top: 1rem;
} }
#my_orders_section .icon,
#market_orders_section .icon { #exchange_wrapper {
display: flex;
flex-direction: column;
height: 100%;
}
#asset_page {
height: 100%;
}
#asset_page__nav {
padding: 1rem 0;
}
#asset_page__nav .icon-only {
margin-left: -0.7rem;
}
#trade_form {
height: 100%;
}
#trade_form::part(form) {
display: flex;
flex-direction: column;
gap: 0;
}
#trade_form > * {
margin-bottom: 1rem;
}
#trade_form > :last-child {
margin-top: auto;
}
#my_orders,
#market {
width: min(42rem, 100%);
grid-template-rows: auto 1fr;
}
#my_orders .icon,
#market .icon {
height: 1.2rem; height: 1.2rem;
width: 1.2rem; width: 1.2rem;
} }
.orders_section__header {
padding: 0 1.5rem;
}
#my_orders_section__header {
height: 2.4rem;
}
#orders_section__header--primary sm-tab-header {
--gap: 1.5rem;
}
#orders_section__header--primary sm-tab {
font-size: 0.9rem;
--padding: 0.8rem 0;
}
.list__item { .list__item {
padding: 0.5rem 1.5rem; padding: 0.5rem 0;
display: grid; display: grid;
} }
@ -716,14 +802,13 @@ sm-checkbox {
} }
#market_orders_list .list__header { #market_orders_list .list__header {
margin-bottom: 0.5rem; margin-bottom: 0.5rem;
padding: 0 1.5rem;
grid-template-columns: repeat(3, 1fr) 2rem; grid-template-columns: repeat(3, 1fr) 2rem;
} }
#user_section { #wallet {
gap: 1.5rem; gap: 1.5rem;
padding: 1.5rem;
align-content: flex-start; align-content: flex-start;
width: min(24rem, 100%);
} }
.wallet_actions__wrapper { .wallet_actions__wrapper {
@ -744,8 +829,7 @@ sm-checkbox {
.balance-card { .balance-card {
display: grid; display: grid;
align-items: center; align-items: center;
gap: 0.3rem 1rem; gap: 0.3rem 0.5rem;
padding: 0.5rem 0;
border-radius: 0.5rem; border-radius: 0.5rem;
} }
.balance-card.is-locked { .balance-card.is-locked {
@ -935,61 +1019,48 @@ sm-checkbox {
} }
@media screen and (max-width: 40rem) and (any-hover: none) { @media screen and (max-width: 40rem) and (any-hover: none) {
.cancel-order span { .cancel-order span {
display: none; display: none !important;
} }
} }
@media screen and (max-width: 40rem) { @media screen and (max-width: 40rem) {
#main_header {
padding: 0 1.5rem;
}
sm-button { sm-button {
--padding: 0.9rem 1.6rem; --padding: 0.9rem 1.6rem;
} }
#home > :last-child { .main_navbar__item--active .item__title {
padding-bottom: 5rem;
}
#bottom_nav {
position: fixed;
bottom: 0;
background-color: var(--foreground-color);
width: 100%;
}
.bottom_nav__item {
display: flex;
flex-direction: column;
align-items: center;
flex: 1;
padding: 0.5rem 0;
}
.bottom_nav__item .item__title,
.bottom_nav__item .icon {
transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.bottom_nav__item .item__title {
color: rgba(var(--text-color), 0.8);
font-size: 0.8rem;
font-weight: 500;
}
.bottom_nav__item .icon {
height: 1.2rem;
margin-bottom: 0.3rem;
}
.bottom_nav__item--active .item__title {
color: var(--accent-color);
transform: translateY(100%); transform: translateY(100%);
opacity: 0; opacity: 0;
} }
.bottom_nav__item--active .icon { .main_navbar__item--active .icon {
transform: translateY(50%) scale(1.2); transform: translateY(50%) scale(1.2);
fill: var(--accent-color);
} }
.hide-on-mobile { .hide-on-mobile {
display: none; display: none !important;
}
#asset_page__nav {
padding: 1rem 1.5rem 1.5rem 1.5rem;
}
#trade_form,
#asset_list_wrapper,
#chart_header {
padding: 0 1.5rem;
}
#asset_page {
display: flex;
flex-direction: column;
}
.listed-asset {
border-radius: 0;
border-bottom: solid thin rgba(var(--text-color), 0.1);
}
#price_chart_container {
flex: 1;
} }
} }
@media screen and (min-width: 40rem) { @media screen and (min-width: 40rem) {
@ -1025,45 +1096,118 @@ sm-checkbox {
grid-template-columns: 1fr 90vw 1fr; grid-template-columns: 1fr 90vw 1fr;
} }
#home {
padding: 0 4vmax;
gap: 1rem;
}
.hide-on-desktop { .hide-on-desktop {
display: none; display: none !important;
} }
.card { #home {
display: grid;
grid-template-columns: auto 1fr;
grid-template-rows: auto 1fr;
grid-template-areas: "header header" "nav pages";
}
#main_header {
grid-area: header;
}
#main_navbar {
grid-area: nav;
flex-direction: column;
height: 100%;
padding: 0 0.5rem;
}
.main_navbar__item {
padding: 1.5rem 1rem;
width: 100%;
flex: 0;
flex-direction: row;
border-radius: 0.5rem; border-radius: 0.5rem;
background-color: var(--foreground-color); transition: background-color 0.3s;
border: solid thin rgba(var(--text-color), 0.1); }
.main_navbar__item .icon {
margin-bottom: 0;
margin-right: 0.5rem;
}
.main_navbar__item .item__title {
font-size: 0.9rem;
}
.main_navbar__item--active {
background-color: rgba(var(--text-color), 0.06);
}
#pages_container {
grid-area: pages;
}
.is-signed-in #exchange {
display: flex;
width: 100%;
padding: 0 1.5rem;
}
.is-signed-in #exchange_wrapper {
display: grid;
width: 100%;
height: 100%;
gap: 1.5rem;
grid-template-columns: 16rem minmax(0, 1fr);
align-items: flex-start;
}
#price_history_chart {
overflow: hidden;
border-radius: 0.5rem;
height: 20rem;
}
#asset_list_wrapper {
grid-row: 1/3;
}
.listed-asset {
padding: 1rem;
}
.listed-asset--active {
opacity: 1;
background-color: rgba(var(--text-color), 0.06);
}
.listed-asset--active::before {
content: "";
position: absolute;
width: 0.25rem;
border-radius: 0 0.2rem 0.2rem 0;
height: 50%;
background-color: var(--accent-color);
} }
} }
@media screen and (min-width: 48rem) { @media screen and (max-width: 64rem) and (min-width: 40rem) {
#home { .main_navbar__item .icon {
grid-template-rows: -webkit-min-content 1fr; margin-right: 0;
grid-template-rows: min-content 1fr;
grid-template-columns: 24rem minmax(0, 1fr);
} }
#home.signed-in #orders_list, .main_navbar__item .item__title {
#home.signed-in #market_orders_list { display: none !important;
height: 32vmin; }
overflow-y: auto; }
@media screen and (min-width: 64rem) {
#home {
grid-template-columns: 10rem 1fr;
} }
#orders_section { #asset_page {
grid-row: span 2; display: grid;
gap: 1.5rem;
grid-template-columns: minmax(0, 1fr) 20rem;
}
#asset_page__nav {
grid-column: 1/-1;
} }
} }
@media screen and (min-width: 72rem) { @media screen and (min-width: 72rem) {
.page-layout { .page-layout {
grid-template-columns: 1fr 80vw 1fr; grid-template-columns: 1fr 80vw 1fr;
} }
#home.signed-in {
grid-template-columns: 24rem minmax(0, 1fr) 20rem;
}
} }
@media screen and (min-width: 120rem) { @media screen and (min-width: 120rem) {
.page-layout { .page-layout {
@ -1084,15 +1228,6 @@ sm-checkbox {
background: rgba(var(--text-color), 0.5); background: rgba(var(--text-color), 0.5);
} }
.interact,
button {
transition: background-color 0.3s, transform 0.3s;
}
.interact:hover,
button:hover {
background-color: var(--accent-color--light);
}
.order-card .cancel-order { .order-card .cancel-order {
justify-self: flex-end; justify-self: flex-end;
overflow: hidden; overflow: hidden;

File diff suppressed because one or more lines are too long

View File

@ -16,40 +16,28 @@ body {
} }
body { body {
&, --accent-color: #504dff;
* { --text-color: 20, 20, 20;
--accent-color: #504dff; --background-color: 240, 240, 240;
--accent-color--light: #eeeeff; --foreground-color: 250, 250, 250;
--text-color: 36, 36, 36; --danger-color: rgb(255, 75, 75);
--background-color: 255, 255, 255; --green: #1cad59;
--foreground-color: rgb(250, 252, 255); scrollbar-width: thin;
--danger-color: rgb(255, 75, 75); scrollbar-gutter: stable;
--green: #1cad59;
--yellow: #f3a600;
--loan-color: rgb(255, 171, 93);
scrollbar-width: thin;
}
color: rgba(var(--text-color), 1); color: rgba(var(--text-color), 1);
background: rgba(var(--background-color), 1); background-color: rgba(var(--background-color), 1);
transition: background-color 0.3s;
} }
body[data-theme="dark"] { body[data-theme="dark"] {
&, --accent-color: #a3a1ff;
* { --text-color: 220, 220, 220;
--accent-color: #a3a1ff; --background-color: 10, 10, 10;
--accent-color--light: rgba(142, 140, 255, 0.06); --foreground-color: 24, 24, 24;
--text-color: 230, 230, 230; --danger-color: rgb(255, 106, 106);
--text-color-light: 170, 170, 170; --green: #00e676;
--background-color: 10, 10, 10;
--foreground-color: rgb(24, 24, 24);
--danger-color: rgb(255, 106, 106);
--green: #00e676;
--yellow: #ffd13a;
--loan-color: rgb(255, 232, 170);
}
sm-popup::part(popup) { sm-popup::part(popup) {
background-color: var(--foreground-color); background-color: rgba(var(--foreground-color), 1);
} }
} }
@ -119,7 +107,6 @@ a:any-link:focus-visible {
sm-input { sm-input {
font-size: 0.9rem; font-size: 0.9rem;
--border-radius: 0.3rem; --border-radius: 0.3rem;
--background: var(--accent-color--light);
} }
sm-button { sm-button {
text-transform: uppercase; text-transform: uppercase;
@ -143,6 +130,9 @@ sm-button {
color: rgba(var(--background-color), 1); color: rgba(var(--background-color), 1);
} }
} }
sm-form {
--gap: 1rem;
}
ul { ul {
list-style: none; list-style: none;
} }
@ -160,7 +150,7 @@ ul {
pointer-events: none; pointer-events: none;
} }
.hide-completely { .hide {
display: none !important; display: none !important;
} }
@ -308,10 +298,23 @@ ul {
.interact { .interact {
position: relative; position: relative;
overflow: hidden;
cursor: pointer; cursor: pointer;
transition: transform 0.3s;
-webkit-tap-highlight-color: transparent; -webkit-tap-highlight-color: transparent;
} }
.ripple {
height: 8rem;
width: 8rem;
position: absolute;
border-radius: 50%;
transform: scale(0);
background: radial-gradient(
circle,
rgba(var(--text-color), 0.3) 0%,
rgba(0, 0, 0, 0) 50%
);
pointer-events: none;
}
.empty-state { .empty-state {
display: grid; display: grid;
justify-content: center; justify-content: center;
@ -322,23 +325,20 @@ ul {
} }
.observe-empty-state:empty { .observe-empty-state:empty {
display: none; display: none !important;
} }
.observe-empty-state:not(:empty) + .empty-state { .observe-empty-state:not(:empty) + .empty-state {
display: none; display: none !important;
} }
.icon { .icon {
width: 1.5rem; width: 1.2rem;
height: 1.5rem; height: 1.2rem;
fill: rgba(var(--text-color), 0.8); fill: rgba(var(--text-color), 0.8);
} }
.button__icon { .button__icon {
height: 1.2rem;
width: 1.2rem;
&--left { &--left {
margin-right: 0.5rem; margin-right: 0.5rem;
} }
@ -347,6 +347,11 @@ ul {
margin-left: 0.5rem; margin-left: 0.5rem;
} }
} }
.icon-only {
padding: 0.6rem;
aspect-ratio: 1/1;
background-color: transparent;
}
.icon-button { .icon-button {
padding: 0.6rem; padding: 0.6rem;
@ -379,13 +384,6 @@ ul {
#prompt_message { #prompt_message {
margin-bottom: 1.5rem; margin-bottom: 1.5rem;
} }
button:active,
.button:active,
.interact:active {
transform: scale(0.96);
}
.popup__header { .popup__header {
display: grid; display: grid;
gap: 0.5rem; gap: 0.5rem;
@ -445,8 +443,8 @@ details {
} }
strip-select { strip-select {
--gap: 0; --gap: 0;
background-color: var(--accent-color--light); background-color: rgba(var(--text-color), 0.06);
border-radius: 0.3rem; border-radius: 0.2rem;
} }
strip-option { strip-option {
font-weight: 500; font-weight: 500;
@ -455,10 +453,10 @@ strip-option {
--active-option-color: rgba(var(--background-color), 1); --active-option-color: rgba(var(--background-color), 1);
--active-option-background-color: var(--accent-color); --active-option-background-color: var(--accent-color);
&:first-of-type { &:first-of-type {
--border-radius: 0.3rem 0 0 0.3rem; --border-radius: 0.2rem 0 0 0.2rem;
} }
&:last-of-type { &:last-of-type {
--border-radius: 0 0.3rem 0.3rem 0; --border-radius: 0 0.2rem 0.2rem 0;
} }
} }
sm-select, sm-select,
@ -487,6 +485,9 @@ sm-checkbox {
.page { .page {
height: 100%; height: 100%;
} }
.mobile-page {
align-items: flex-start;
}
#landing { #landing {
grid-template-rows: auto 1fr; grid-template-rows: auto 1fr;
header { header {
@ -527,38 +528,94 @@ sm-checkbox {
} }
#home { #home {
height: 100%; height: 100%;
display: grid; display: flex;
flex-direction: column;
align-items: flex-start; align-items: flex-start;
align-content: flex-start; align-content: flex-start;
grid-template-columns: minmax(0, 1fr); }
#login_form {
width: min(24rem, 100%);
margin: 0 auto;
} }
#login_form__priv_key { #login_form__priv_key {
margin-top: 1rem; margin-top: 1rem;
} }
#main_header { #main_header {
margin-top: 1.5rem;
margin-bottom: 1rem;
display: grid; display: grid;
gap: 1rem; gap: 1rem;
padding: 1.5rem;
width: 100%;
align-items: center; align-items: center;
grid-template-columns: 1fr auto auto; grid-template-columns: 1fr auto auto;
grid-column: 1/-1; grid-column: 1/-1;
} }
#main_navbar {
.rate-card { width: 100%;
grid-template-columns: auto 1fr auto;
gap: 1rem;
padding: 1rem;
border-radius: 0.5rem;
border: solid rgba(var(--text-color), 0.2) thin;
background-color: rgba(var(--background-color), 1);
} }
.main_navbar__item {
display: flex;
flex-direction: column;
align-items: center;
flex: 1;
padding: 0.5rem 0;
.item__title,
.icon {
transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275),
opacity 0.3s;
}
.item__title {
color: rgba(var(--text-color), 0.8);
font-size: 0.8rem;
font-weight: 500;
}
.icon {
height: 1.2rem;
margin-bottom: 0.3rem;
}
&--active {
.item__title {
color: var(--accent-color);
}
.icon {
fill: var(--accent-color);
}
}
}
#pages_container {
display: flex;
flex: 1;
width: 100%;
justify-content: center;
overflow-y: auto;
& > * {
padding: 0 1.5rem;
width: min(42rem, 100%);
}
}
.listed-asset {
position: relative;
grid-template-columns: auto 1fr auto;
gap: 0.5rem;
padding: 1rem 0;
border-radius: 0.5rem;
opacity: 0.8;
font-weight: 400;
transition: background-color 0.3s;
user-select: none;
color: inherit;
&__icon {
display: flex;
.icon {
height: 1.5rem;
width: 1.5rem;
}
}
}
#flo_rate {
font-weight: 700;
#trade_form,
#login_form {
align-self: flex-start;
padding: 1rem 1.5rem 1.5rem 1.5rem;
} }
.quantity-selector { .quantity-selector {
.button { .button {
@ -578,32 +635,50 @@ sm-checkbox {
font-weight: 500; font-weight: 500;
min-width: 8ch; min-width: 8ch;
} }
#my_orders_section, #exchange {
#market_orders_section { padding: 0;
padding-top: 1rem; }
#exchange_wrapper {
display: flex;
flex-direction: column;
height: 100%;
}
#asset_page {
height: 100%;
}
#asset_page__nav {
padding: 1rem 0;
.icon-only {
margin-left: -0.7rem;
}
}
#trade_form {
height: 100%;
&::part(form) {
display: flex;
flex-direction: column;
gap: 0;
}
& > * {
margin-bottom: 1rem;
}
& > :last-child {
margin-top: auto;
}
}
#my_orders,
#market {
width: min(42rem, 100%);
grid-template-rows: auto 1fr;
.icon { .icon {
height: 1.2rem; height: 1.2rem;
width: 1.2rem; width: 1.2rem;
} }
} }
.orders_section__header {
padding: 0 1.5rem;
}
#my_orders_section__header {
height: 2.4rem;
}
#orders_section__header--primary {
sm-tab-header {
--gap: 1.5rem;
}
sm-tab {
font-size: 0.9rem;
--padding: 0.8rem 0;
}
}
.list__item { .list__item {
padding: 0.5rem 1.5rem; padding: 0.5rem 0;
display: grid; display: grid;
} }
.order-card { .order-card {
@ -694,14 +769,13 @@ sm-checkbox {
} }
.list__header { .list__header {
margin-bottom: 0.5rem; margin-bottom: 0.5rem;
padding: 0 1.5rem;
grid-template-columns: repeat(3, 1fr) 2rem; grid-template-columns: repeat(3, 1fr) 2rem;
} }
} }
#user_section { #wallet {
gap: 1.5rem; gap: 1.5rem;
padding: 1.5rem;
align-content: flex-start; align-content: flex-start;
width: min(24rem, 100%);
} }
.wallet_actions__wrapper { .wallet_actions__wrapper {
grid-column: span 3; grid-column: span 3;
@ -719,8 +793,7 @@ sm-checkbox {
.balance-card { .balance-card {
display: grid; display: grid;
align-items: center; align-items: center;
gap: 0.3rem 1rem; gap: 0.3rem 0.5rem;
padding: 0.5rem 0;
border-radius: 0.5rem; border-radius: 0.5rem;
&.is-locked { &.is-locked {
grid-template-columns: auto 1fr; grid-template-columns: auto 1fr;
@ -871,61 +944,44 @@ sm-checkbox {
@media screen and (max-width: 40rem) and (any-hover: none) { @media screen and (max-width: 40rem) and (any-hover: none) {
.cancel-order { .cancel-order {
span { span {
display: none; display: none !important;
} }
} }
} }
@media screen and (max-width: 40rem) { @media screen and (max-width: 40rem) {
#main_header {
padding: 0 1.5rem;
}
sm-button { sm-button {
--padding: 0.9rem 1.6rem; --padding: 0.9rem 1.6rem;
} }
#home { .main_navbar__item--active {
& > :last-child {
padding-bottom: 5rem;
}
}
#bottom_nav {
position: fixed;
bottom: 0;
background-color: var(--foreground-color);
width: 100%;
}
.bottom_nav__item {
display: flex;
flex-direction: column;
align-items: center;
flex: 1;
padding: 0.5rem 0;
.item__title,
.icon {
transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.item__title { .item__title {
color: rgba(var(--text-color), 0.8); transform: translateY(100%);
font-size: 0.8rem; opacity: 0;
font-weight: 500;
} }
.icon { .icon {
height: 1.2rem; transform: translateY(50%) scale(1.2);
margin-bottom: 0.3rem;
}
&--active {
.item__title {
color: var(--accent-color);
transform: translateY(100%);
opacity: 0;
}
.icon {
transform: translateY(50%) scale(1.2);
fill: var(--accent-color);
}
} }
} }
.hide-on-mobile { .hide-on-mobile {
display: none; display: none !important;
}
#asset_page__nav {
padding: 1rem 1.5rem 1.5rem 1.5rem;
}
#trade_form,
#asset_list_wrapper,
#chart_header {
padding: 0 1.5rem;
}
#asset_page {
display: flex;
flex-direction: column;
}
.listed-asset {
border-radius: 0;
border-bottom: solid thin rgba(var(--text-color), 0.1);
}
#price_chart_container {
flex: 1;
} }
} }
@media screen and (min-width: 40rem) { @media screen and (min-width: 40rem) {
@ -956,44 +1012,112 @@ sm-checkbox {
.page-layout { .page-layout {
grid-template-columns: 1fr 90vw 1fr; grid-template-columns: 1fr 90vw 1fr;
} }
#home {
padding: 0 4vmax;
gap: 1rem;
}
.hide-on-desktop { .hide-on-desktop {
display: none; display: none !important;
} }
.card {
border-radius: 0.5rem;
background-color: var(--foreground-color);
border: solid thin rgba(var(--text-color), 0.1);
}
}
@media screen and (min-width: 48rem) {
#home { #home {
grid-template-rows: min-content 1fr; display: grid;
grid-template-columns: 24rem minmax(0, 1fr); grid-template-columns: auto 1fr;
&.signed-in { grid-template-rows: auto 1fr;
#orders_list, grid-template-areas: "header header" "nav pages";
#market_orders_list { }
height: 32vmin; #main_header {
overflow-y: auto; grid-area: header;
}
#main_navbar {
grid-area: nav;
flex-direction: column;
height: 100%;
padding: 0 0.5rem;
}
.main_navbar__item {
padding: 1.5rem 1rem;
width: 100%;
flex: 0;
flex-direction: row;
border-radius: 0.5rem;
transition: background-color 0.3s;
.icon {
margin-bottom: 0;
margin-right: 0.5rem;
}
.item__title {
font-size: 0.9rem;
}
&--active {
background-color: rgba(var(--text-color), 0.06);
}
}
#pages_container {
grid-area: pages;
}
.is-signed-in {
#exchange {
display: flex;
width: 100%;
padding: 0 1.5rem;
}
#exchange_wrapper {
display: grid;
width: 100%;
height: 100%;
gap: 1.5rem;
grid-template-columns: 16rem minmax(0, 1fr);
align-items: flex-start;
}
}
#price_history_chart {
overflow: hidden;
border-radius: 0.5rem;
height: 20rem;
// grid-column: 1/-1;
}
#asset_list_wrapper {
grid-row: 1/3;
}
.listed-asset {
padding: 1rem;
&--active {
opacity: 1;
background-color: rgba(var(--text-color), 0.06);
&::before {
content: "";
position: absolute;
width: 0.25rem;
border-radius: 0 0.2rem 0.2rem 0;
height: 50%;
background-color: var(--accent-color);
} }
} }
} }
#orders_section { }
grid-row: span 2; @media screen and (max-width: 64rem) and (min-width: 40rem) {
.main_navbar__item {
.icon {
margin-right: 0;
}
.item__title {
display: none !important;
}
} }
} }
@media screen and (max-width: 64rem) { @media screen and (min-width: 64rem) {
#home {
grid-template-columns: 10rem 1fr;
}
#asset_page {
display: grid;
gap: 1.5rem;
grid-template-columns: minmax(0, 1fr) 20rem;
}
#asset_page__nav {
grid-column: 1/-1;
}
} }
@media screen and (min-width: 72rem) { @media screen and (min-width: 72rem) {
.page-layout { .page-layout {
grid-template-columns: 1fr 80vw 1fr; grid-template-columns: 1fr 80vw 1fr;
} }
#home.signed-in {
grid-template-columns: 24rem minmax(0, 1fr) 20rem;
}
} }
@media screen and (min-width: 120rem) { @media screen and (min-width: 120rem) {
.page-layout { .page-layout {
@ -1014,13 +1138,6 @@ sm-checkbox {
background: rgba(var(--text-color), 0.5); background: rgba(var(--text-color), 0.5);
} }
} }
.interact,
button {
transition: background-color 0.3s, transform 0.3s;
&:hover {
background-color: var(--accent-color--light);
}
}
.order-card { .order-card {
.cancel-order { .cancel-order {
justify-self: flex-end; justify-self: flex-end;

File diff suppressed because one or more lines are too long