From c8d11d0d11378f4d530474c92947ee70578caa2b Mon Sep 17 00:00:00 2001 From: sairaj mote Date: Sun, 10 Apr 2022 23:06:45 +0530 Subject: [PATCH 1/8] major UI update --- css/main.css | 269 +++++++++++++++-------------- css/main.min.css | 2 +- css/main.scss | 266 ++++++++++++++--------------- index.html | 385 ++++++++++++++++++++++++------------------ scripts/components.js | 14 +- scripts/fn_ui.js | 175 +++++++++++++------ scripts/std_ui.js | 132 +++------------ 7 files changed, 637 insertions(+), 606 deletions(-) diff --git a/css/main.css b/css/main.css index bc2ec5a..d310320 100644 --- a/css/main.css +++ b/css/main.css @@ -17,8 +17,8 @@ body { body { --accent-color: #256eff; --text-color: 20, 20, 20; - --background-color: 240, 240, 240; - --foreground-color: 250, 250, 250; + --foreground-color: 252, 253, 255; + --background-color: 241, 243, 248; --danger-color: rgb(255, 75, 75); --green: #1cad59; scrollbar-width: thin; @@ -28,16 +28,13 @@ body { transition: background-color 0.3s; display: flex; flex-direction: column; - align-items: center; - justify-content: center; - overflow: hidden; } body[data-theme=dark] { - --accent-color: #86afff; + --accent-color: #90b8f8; --text-color: 220, 220, 220; - --background-color: 10, 10, 10; - --foreground-color: 24, 24, 24; + --foreground-color: 27, 28, 29; + --background-color: 21, 22, 22; --danger-color: rgb(255, 106, 106); --green: #00e676; } @@ -65,6 +62,14 @@ a:focus-visible { box-shadow: 0 0 0 0.1rem rgba(var(--text-color), 1) inset; } +a.button { + padding: 0.4rem 0.6rem; + border-radius: 0.3rem; + font-size: 0.9rem; + font-weight: 500; + color: inherit; +} + button { -webkit-user-select: none; -moz-user-select: none; @@ -458,6 +463,20 @@ h3 { fill: var(--accent-color); } +.page { + height: 100%; +} + +.page-layout { + display: grid; + gap: 1.5rem 0; + grid-template-columns: 1.5rem minmax(0, 1fr) 1.5rem; + align-content: flex-start; +} +.page-layout > * { + grid-column: 2/3; +} + #confirmation_popup, #prompt_popup { flex-direction: column; @@ -492,7 +511,6 @@ h3 { width: 100%; padding: 0 1.5rem; align-items: center; - grid-auto-flow: column; } .popup__header__close { @@ -501,17 +519,51 @@ h3 { cursor: pointer; } +#landing > section { + justify-content: center; + justify-items: center; + align-items: center; + text-align: center; + padding: 8vw 0; +} +#landing h1 { + font-size: clamp(2rem, 5vw, 5rem); +} + +#sign_in, +#sign_up { + justify-items: center; + align-content: center; +} +#sign_in section, +#sign_up section { + margin-top: -8rem; + width: min(24rem, 100%); +} +#sign_in sm-form, +#sign_up sm-form { + margin: 2rem 0; +} + +#sign_up .h2 { + margin-bottom: 0.5rem; +} +#sign_up .card { + margin: 1.5rem 0; +} +#sign_up h5 { + font-weight: 500; + color: rgba(var(--text-color), 0.8); +} +#sign_up .warning { + margin-top: 2rem; +} + #main_header { padding: 1rem 1.5rem; } - -#main_card { - display: flex; - flex-direction: column; - height: 100%; - width: 100%; - background-color: rgba(var(--foreground-color), 1); - transition: background-color 0.3s; +#main_header a { + color: rgba(var(--text-color), 1); } #pages_container { @@ -519,63 +571,6 @@ h3 { overflow-y: auto; } -#main_navbar { - display: flex; - background: rgba(var(--text-color), 0.03); -} -#main_navbar.hide-away { - position: absolute; -} -#main_navbar ul { - display: flex; - height: 100%; - width: 100%; -} -#main_navbar ul li { - width: 100%; -} - -.nav-item { - position: relative; - display: flex; - flex: 1; - width: 100%; - flex-direction: column; - align-items: center; - justify-content: center; - padding: 0.5rem 0.3rem; - color: var(--text-color); - font-size: 0.7rem; - border-radius: 0.3rem; -} -.nav-item .icon { - transition: transform 0.2s; -} -.nav-item__title { - margin-top: 0.3rem; - transition: opacity 0.2s, transform 0.2s; -} -.nav-item--active { - color: var(--accent-color); -} -.nav-item--active .icon { - fill: var(--accent-color); - transform: translateY(50%); -} -.nav-item--active .nav-item__title { - transform: translateY(100%); - opacity: 0; -} -.nav-item__indicator { - position: absolute; - bottom: 0; - width: 2rem; - height: 0.3rem; - background: var(--accent-color); - border-radius: 1rem 1rem 0 0; - z-index: 1; -} - .password-field label { display: flex; } @@ -605,37 +600,70 @@ h3 { .primary-action { display: flex; + flex-direction: column; + align-items: center; padding: 0.8rem 1rem; gap: 0.5rem; white-space: normal; font-size: 0.8rem; border-radius: 0.5rem; background-color: transparent; - border: thin solid rgba(var(--text-color), 0.3); + min-width: 5rem; + max-width: 6rem; + text-align: center; } .primary-action .icon { fill: var(--accent-color); } -.primary-action:not(:last-of-type) { - margin-right: 0.5rem; + +#user { + padding: 1rem 1.5rem; } -.page { - position: relative; +#saved_ids_list { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); + gap: 1rem; + margin-top: 1.5rem; +} + +.saved-id { + display: grid; + gap: 1rem; + grid-template-columns: auto 1fr; + align-items: center; + color: inherit; + padding: 0.5rem 0; +} +.saved-id__initials { display: flex; - flex-direction: column; - overflow-y: auto; - align-content: flex-start; - padding: 1.5rem; + align-items: center; + justify-content: center; + height: 2.5rem; + width: 2.5rem; + color: rgba(var(--background-color), 1); + background-color: var(--accent-color); + border-radius: 1rem; + text-transform: uppercase; + font-weight: 700; +} +.saved-id__title { + font-size: 0.9rem; } -#wallet_section { - background-color: rgba(var(--text-color), 0.03); +.card { + background-color: rgba(var(--foreground-color), 1); border-radius: 0.5rem; padding: 1.5rem; } -#transactions_list { +#history > *, +#wallet_history > * { + width: min(60ch, 100%); + justify-self: center; +} + +#token_transactions { flex-direction: column; padding-bottom: 4rem; } @@ -681,6 +709,9 @@ h3 { .transaction__amount.sent::before { content: "-"; } +.transaction__amount.received { + color: var(--green); +} .transaction__amount.received::before { content: "+"; } @@ -814,67 +845,31 @@ h3 { --width: 24rem; } + .page-layout { + grid-template-columns: 1fr 90vw 1fr; + } + .popup__header { grid-column: 1/-1; padding: 1rem 1.5rem 0 1.5rem; } - #main_card { - display: grid; - grid-template-columns: auto 1fr; - grid-template-rows: auto 1fr; - grid-template-areas: "nav header" "nav main"; - position: relative; - border-radius: 0.5rem; - overflow: hidden; - box-shadow: 0 0.1rem 0.2rem rgba(0, 0, 0, 0.05), 0 1rem 3rem rgba(0, 0, 0, 0.2); - background-color: rgba(var(--foreground-color), 0.9); - } - - #main_header { - grid-area: header; - } - - #pages_container { - grid-area: main; - } - - #main_navbar { - grid-area: nav; - border-top: none; - flex-direction: column; - height: 100%; - } - #main_navbar ul { - flex-direction: column; - gap: 0.5rem; - padding: 0.3rem; - } - #main_navbar ul li:last-of-type { - margin-top: auto; - } - - .nav-item { - aspect-ratio: 1/1; - } - .nav-item__indicator { - width: 0.25rem; - height: 50%; - left: 0; - border-radius: 0 1rem 1rem 0; - bottom: auto; - } - #user { + padding: 1.5rem 8vmax; grid-template-columns: 1fr 20rem; align-content: flex-start; align-items: flex-start; } -} -@media screen and (min-width: 56rem) { - #main_card { - height: 80vh; - width: 56rem; + + .saved-id { + padding: 1rem; + border-radius: 0.5rem; + background-color: rgba(var(--text-color), 0.03); + grid-template-columns: minmax(0, 1fr); + } + + #wallet_section { + grid-area: 1/2/3/3; } } @media (any-hover: hover) { diff --git a/css/main.min.css b/css/main.min.css index f425764..b9af1e7 100644 --- a/css/main.min.css +++ b/css/main.min.css @@ -1 +1 @@ -*{padding:0;margin:0;box-sizing:border-box;font-family:"Roboto",sans-serif}:root{font-size:clamp(1rem,1.2vmax,1.2rem)}html,body{height:100%}body{--accent-color: #256eff;--text-color: 20, 20, 20;--background-color: 240, 240, 240;--foreground-color: 250, 250, 250;--danger-color: rgb(255, 75, 75);--green: #1cad59;scrollbar-width:thin;scrollbar-gutter:stable;color:rgba(var(--text-color), 1);background-color:rgba(var(--background-color), 1);transition:background-color .3s;display:flex;flex-direction:column;align-items:center;justify-content:center;overflow:hidden}body[data-theme=dark]{--accent-color: #86afff;--text-color: 220, 220, 220;--background-color: 10, 10, 10;--foreground-color: 24, 24, 24;--danger-color: rgb(255, 106, 106);--green: #00e676}body[data-theme=dark] sm-popup::part(popup){background-color:rgba(var(--foreground-color), 1)}p,strong{font-size:.9rem;max-width:65ch;line-height:1.7;color:rgba(var(--text-color), 0.9)}p:not(:last-of-type),strong:not(:last-of-type){margin-bottom:1.5rem}a{text-decoration:none;color:var(--accent-color)}a:focus-visible{box-shadow:0 0 0 .1rem rgba(var(--text-color), 1) inset}button{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;display:inline-flex;border:none;background-color:transparent;overflow:hidden;color:inherit;-webkit-tap-highlight-color:transparent;align-items:center;font-size:.9rem;font-weight:500;white-space:nowrap;padding:.8rem;border-radius:.3rem;justify-content:center}button:focus-visible{outline:var(--accent-color) solid medium}button:not(:disabled){cursor:pointer}.button{background-color:rgba(var(--text-color), 0.06)}.button--primary,.button--danger{color:rgba(var(--background-color), 1)}.button--primary .icon,.button--danger .icon{fill:rgba(var(--background-color), 1)}.button--primary{background-color:var(--accent-color)}.button--danger{background-color:var(--danger-color)}.cta{text-transform:uppercase;font-size:.8rem;font-weight:700;letter-spacing:.05em;padding:1rem}.icon-only{padding:.5rem;border-radius:.3rem}button:disabled{opacity:.5}a:-webkit-any-link:focus-visible{outline:rgba(var(--text-color), 1) .1rem solid}a:-moz-any-link:focus-visible{outline:rgba(var(--text-color), 1) .1rem solid}a:any-link:focus-visible{outline:rgba(var(--text-color), 1) .1rem solid}details{padding:1rem 0}details summary{display:flex;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;align-items:center;justify-content:space-between;color:var(--accent-color)}details[open] summary{margin-bottom:1rem}details[open]>summary .down-arrow{transform:rotate(180deg)}sm-input,sm-textarea{font-size:.9rem;--border-radius: 0.3rem;--background-color: rgba(var(--foreground-color), 1)}sm-input button .icon,sm-textarea button .icon{fill:var(--accent-color)}sm-button{--padding: 0.6rem 0.8rem}sm-button[variant=primary] .icon{fill:rgba(var(--background-color), 1)}sm-button[disabled] .icon{fill:rgba(var(--text-color), 0.6)}sm-button.danger{--background: var(--danger-color);color:rgba(var(--background-color), 1)}sm-spinner{--size: 1rem;--stroke-width: 0.1rem}sm-form{--gap: 1rem}strip-select{--gap: 0;background-color:rgba(var(--text-color), 0.06);border-radius:.3rem;padding:.3rem}strip-option{font-size:.8rem;--border-radius: 0.2rem;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}ul{list-style:none}.overflow-ellipsis{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.breakable{overflow-wrap:break-word;word-wrap:break-word;word-break:break-word;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto}.full-bleed{grid-column:1/-1}.h1{font-size:1.5rem}.h2{font-size:1.2rem}h3{font-size:1.2rem;line-height:1.3}.h4{font-size:.9rem}.h5{font-size:.75rem}.uppercase{text-transform:uppercase}.capitalize{text-transform:capitalize}.sticky{position:-webkit-sticky;position:sticky}.top-0{top:0}.flex{display:flex}.flex-wrap{flex-wrap:wrap}.flex-1{flex:1}.grid{display:grid}.flow-column{grid-auto-flow:column}.gap-0-5{gap:.5rem}.gap-1{gap:1rem}.gap-1-5{gap:1.5rem}.gap-2{gap:2rem}.gap-3{gap:3rem}.text-align-right{text-align:right}.align-start{align-content:flex-start}.align-center{align-items:center}.align-end{align-items:flex-end}.text-center{text-align:center}.justify-start{justify-content:start}.justify-center{justify-content:center}.justify-right{margin-left:auto}.align-self-center{align-self:center}.justify-self-center{justify-self:center}.justify-self-start{justify-self:start}.justify-self-end{justify-self:end}.direction-column{flex-direction:column}.space-between{justify-content:space-between}.w-100{width:100%}.h-100{height:100%}.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}.button--primary .ripple,.button--danger .ripple{background:radial-gradient(circle, rgba(var(--background-color), 0.3) 0%, rgba(0, 0, 0, 0) 50%)}.interact{position:relative;overflow:hidden;cursor:pointer;-webkit-tap-highlight-color:transparent}.empty-state{display:grid;width:100%;padding:1.5rem 0}.observe-empty-state:empty{display:none}.observe-empty-state:not(:empty)+.empty-state{display:none}.bullet-point{display:flex;align-items:center;justify-content:center;margin:0 .8ch}.bullet-point::after{content:"";height:.4ch;width:.4ch;border-radius:.5em;background-color:var(--accent-color)}.icon{width:1.2rem;height:1.2rem;fill:rgba(var(--text-color), 0.8);flex-shrink:0}.margin-right-0-5{margin-right:.5rem}.margin-left-0-5{margin-left:.5rem}.icon-button{padding:.6rem;border-radius:.8rem;background-color:rgba(var(--text-color), 0.1);height:-webkit-max-content;height:-moz-max-content;height:max-content}.icon-button .icon{fill:var(--accent-color)}#confirmation_popup,#prompt_popup{flex-direction:column}#confirmation_popup h4,#prompt_popup h4{font-weight:500;margin-bottom:.5rem}#confirmation_popup sm-button,#prompt_popup sm-button{margin:0}#confirmation_popup .flex,#prompt_popup .flex{padding:0;margin-top:1rem}#confirmation_popup .flex sm-button:first-of-type,#prompt_popup .flex sm-button:first-of-type{margin-right:.6rem;margin-left:auto}#prompt_message{margin-bottom:1.5rem}.popup__header{display:grid;gap:.5rem;width:100%;padding:0 1.5rem;align-items:center;grid-auto-flow:column}.popup__header__close{padding:.5rem;margin-left:-0.5rem;cursor:pointer}#main_header{padding:1rem 1.5rem}#main_card{display:flex;flex-direction:column;height:100%;width:100%;background-color:rgba(var(--foreground-color), 1);transition:background-color .3s}#pages_container{flex:1;overflow-y:auto}#main_navbar{display:flex;background:rgba(var(--text-color), 0.03)}#main_navbar.hide-away{position:absolute}#main_navbar ul{display:flex;height:100%;width:100%}#main_navbar ul li{width:100%}.nav-item{position:relative;display:flex;flex:1;width:100%;flex-direction:column;align-items:center;justify-content:center;padding:.5rem .3rem;color:var(--text-color);font-size:.7rem;border-radius:.3rem}.nav-item .icon{transition:transform .2s}.nav-item__title{margin-top:.3rem;transition:opacity .2s,transform .2s}.nav-item--active{color:var(--accent-color)}.nav-item--active .icon{fill:var(--accent-color);transform:translateY(50%)}.nav-item--active .nav-item__title{transform:translateY(100%);opacity:0}.nav-item__indicator{position:absolute;bottom:0;width:2rem;height:.3rem;background:var(--accent-color);border-radius:1rem 1rem 0 0;z-index:1}.password-field label{display:flex}.password-field label input:checked~.visible{display:none}.password-field label input:not(:checked)~.invisible{display:none}.multi-state-button{display:grid;text-align:center;align-items:center}.multi-state-button>*{grid-area:1/1/2/2}.multi-state-button button{z-index:1}.clip{-webkit-clip-path:circle(0);clip-path:circle(0)}.primary-action{display:flex;padding:.8rem 1rem;gap:.5rem;white-space:normal;font-size:.8rem;border-radius:.5rem;background-color:transparent;border:thin solid rgba(var(--text-color), 0.3)}.primary-action .icon{fill:var(--accent-color)}.primary-action:not(:last-of-type){margin-right:.5rem}.page{position:relative;display:flex;flex-direction:column;overflow-y:auto;align-content:flex-start;padding:1.5rem}#wallet_section{background-color:rgba(var(--text-color), 0.03);border-radius:.5rem;padding:1.5rem}#transactions_list{flex-direction:column;padding-bottom:4rem}.transaction{grid-template-columns:auto 1fr auto;gap:.5rem 1rem;padding:.8rem;align-items:center;background-color:rgba(var(--text-color), 0.03);border-radius:.3rem}.transaction:not(:last-of-type){margin-bottom:.5rem}.transaction__icon{display:flex;align-items:center;justify-content:center;grid-area:1/1/3/2;width:2.5rem;height:2.5rem;background-color:rgba(var(--text-color), 0.03);border-radius:.5rem}.transaction__icon .icon{fill:var(--accent-color)}.transaction__receiver{font-size:.9rem;font-weight:500;color:rgba(var(--text-color), 0.8)}.transaction__time{font-size:.8rem;color:rgba(var(--text-color), 0.8)}.transaction__amount{font-size:1rem;font-weight:700;grid-area:1/3/3/4}.transaction__amount.sent::before{content:"-"}.transaction__amount.received::before{content:"+"}.fab{position:absolute;right:0;bottom:0;margin:1.5rem;box-shadow:0 .5rem 1rem rgba(0,0,0,.2);z-index:2}#scroll_to_top{border-radius:3rem;background-color:rgba(var(--foreground-color), 1)}#transaction_result{display:grid;gap:.5rem;height:max(40vh,24rem);align-items:center;justify-content:center;text-align:center;align-content:center}#transaction_result.success .icon--failed{display:none}#transaction_result.failed .icon--success{display:none}#transaction_result h3{text-align:center;width:100%}#transaction_result .icon{justify-self:center;height:4rem;width:4rem;border-radius:5rem;margin-bottom:1rem;-webkit-animation:popup 1s;animation:popup 1s}#transaction_result .icon--success{fill:rgba(var(--background-color), 1);padding:1rem;background-color:#0bbe56}#transaction_result .icon--failed{background-color:rgba(var(--text-color), 0.03);fill:var(--danger-color)}#transaction_result sm-copy{font-size:.8rem}@-webkit-keyframes popup{0%{opacity:0;transform:scale(0.2) translateY(600%)}10%{transform:scale(0.2) translateY(5rem);opacity:1}40%{transform:scale(0.2) translateY(0)}80%{transform:scale(1.1) translateY(0)}100%{transform:scale(1) translateY(0)}}@keyframes popup{0%{opacity:0;transform:scale(0.2) translateY(600%)}10%{transform:scale(0.2) translateY(5rem);opacity:1}40%{transform:scale(0.2) translateY(0)}80%{transform:scale(1.1) translateY(0)}100%{transform:scale(1) translateY(0)}}.cashier-request,.wallet-request,.payment-request{display:flex;gap:1rem;align-items:center;padding:.8rem;border-radius:.3rem;background-color:rgba(var(--text-color), 0.06)}.cashier-request:not(:last-of-type),.wallet-request:not(:last-of-type),.payment-request:not(:last-of-type){margin-bottom:1rem}.cashier-request__time,.wallet-request__time,.payment-request__time{font-size:.8rem}.payment-request{display:grid;grid-template-columns:1fr auto}.payment-request__amount{font-weight:700;text-align:right}@media screen and (min-width: 40rem){sm-popup{--width: 24rem}.popup__header{grid-column:1/-1;padding:1rem 1.5rem 0 1.5rem}#main_card{display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto 1fr;grid-template-areas:"nav header" "nav main";position:relative;border-radius:.5rem;overflow:hidden;box-shadow:0 .1rem .2rem rgba(0,0,0,.05),0 1rem 3rem rgba(0,0,0,.2);background-color:rgba(var(--foreground-color), 0.9)}#main_header{grid-area:header}#pages_container{grid-area:main}#main_navbar{grid-area:nav;border-top:none;flex-direction:column;height:100%}#main_navbar ul{flex-direction:column;gap:.5rem;padding:.3rem}#main_navbar ul li:last-of-type{margin-top:auto}.nav-item{aspect-ratio:1/1}.nav-item__indicator{width:.25rem;height:50%;left:0;border-radius:0 1rem 1rem 0;bottom:auto}#user{grid-template-columns:1fr 20rem;align-content:flex-start;align-items:flex-start}}@media screen and (min-width: 56rem){#main_card{height:80vh;width:56rem}}@media(any-hover: hover){::-webkit-scrollbar{width:.5rem;height:.5rem}::-webkit-scrollbar-thumb{background:rgba(var(--text-color), 0.3);border-radius:1rem}::-webkit-scrollbar-thumb:hover{background:rgba(var(--text-color), 0.5)}.interact:not([disabled]){transition:background-color .3s}.interact:not([disabled]):hover{background-color:rgba(var(--text-color), 0.06)}.button:not([disabled]){transition:background-color .3s,filter .3s}.button:not([disabled]):hover{filter:contrast(2)}}@supports(overflow: overlay){body{overflow:overlay}}.hide{display:none !important} \ No newline at end of file +*{padding:0;margin:0;box-sizing:border-box;font-family:"Roboto",sans-serif}:root{font-size:clamp(1rem,1.2vmax,1.2rem)}html,body{height:100%}body{--accent-color: #256eff;--text-color: 20, 20, 20;--foreground-color: 252, 253, 255;--background-color: 241, 243, 248;--danger-color: rgb(255, 75, 75);--green: #1cad59;scrollbar-width:thin;scrollbar-gutter:stable;color:rgba(var(--text-color), 1);background-color:rgba(var(--background-color), 1);transition:background-color .3s;display:flex;flex-direction:column}body[data-theme=dark]{--accent-color: #90b8f8;--text-color: 220, 220, 220;--foreground-color: 27, 28, 29;--background-color: 21, 22, 22;--danger-color: rgb(255, 106, 106);--green: #00e676}body[data-theme=dark] sm-popup::part(popup){background-color:rgba(var(--foreground-color), 1)}p,strong{font-size:.9rem;max-width:65ch;line-height:1.7;color:rgba(var(--text-color), 0.9)}p:not(:last-of-type),strong:not(:last-of-type){margin-bottom:1.5rem}a{text-decoration:none;color:var(--accent-color)}a:focus-visible{box-shadow:0 0 0 .1rem rgba(var(--text-color), 1) inset}a.button{padding:.4rem .6rem;border-radius:.3rem;font-size:.9rem;font-weight:500;color:inherit}button{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;display:inline-flex;border:none;background-color:transparent;overflow:hidden;color:inherit;-webkit-tap-highlight-color:transparent;align-items:center;font-size:.9rem;font-weight:500;white-space:nowrap;padding:.8rem;border-radius:.3rem;justify-content:center}button:focus-visible{outline:var(--accent-color) solid medium}button:not(:disabled){cursor:pointer}.button{background-color:rgba(var(--text-color), 0.06)}.button--primary,.button--danger{color:rgba(var(--background-color), 1)}.button--primary .icon,.button--danger .icon{fill:rgba(var(--background-color), 1)}.button--primary{background-color:var(--accent-color)}.button--danger{background-color:var(--danger-color)}.cta{text-transform:uppercase;font-size:.8rem;font-weight:700;letter-spacing:.05em;padding:1rem}.icon-only{padding:.5rem;border-radius:.3rem}button:disabled{opacity:.5}a:-webkit-any-link:focus-visible{outline:rgba(var(--text-color), 1) .1rem solid}a:-moz-any-link:focus-visible{outline:rgba(var(--text-color), 1) .1rem solid}a:any-link:focus-visible{outline:rgba(var(--text-color), 1) .1rem solid}details{padding:1rem 0}details summary{display:flex;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;align-items:center;justify-content:space-between;color:var(--accent-color)}details[open] summary{margin-bottom:1rem}details[open]>summary .down-arrow{transform:rotate(180deg)}sm-input,sm-textarea{font-size:.9rem;--border-radius: 0.3rem;--background-color: rgba(var(--foreground-color), 1)}sm-input button .icon,sm-textarea button .icon{fill:var(--accent-color)}sm-button{--padding: 0.6rem 0.8rem}sm-button[variant=primary] .icon{fill:rgba(var(--background-color), 1)}sm-button[disabled] .icon{fill:rgba(var(--text-color), 0.6)}sm-button.danger{--background: var(--danger-color);color:rgba(var(--background-color), 1)}sm-spinner{--size: 1rem;--stroke-width: 0.1rem}sm-form{--gap: 1rem}strip-select{--gap: 0;background-color:rgba(var(--text-color), 0.06);border-radius:.3rem;padding:.3rem}strip-option{font-size:.8rem;--border-radius: 0.2rem;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}ul{list-style:none}.overflow-ellipsis{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.breakable{overflow-wrap:break-word;word-wrap:break-word;word-break:break-word;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto}.full-bleed{grid-column:1/-1}.h1{font-size:1.5rem}.h2{font-size:1.2rem}h3{font-size:1.2rem;line-height:1.3}.h4{font-size:.9rem}.h5{font-size:.75rem}.uppercase{text-transform:uppercase}.capitalize{text-transform:capitalize}.sticky{position:-webkit-sticky;position:sticky}.top-0{top:0}.flex{display:flex}.flex-wrap{flex-wrap:wrap}.flex-1{flex:1}.grid{display:grid}.flow-column{grid-auto-flow:column}.gap-0-5{gap:.5rem}.gap-1{gap:1rem}.gap-1-5{gap:1.5rem}.gap-2{gap:2rem}.gap-3{gap:3rem}.text-align-right{text-align:right}.align-start{align-content:flex-start}.align-center{align-items:center}.align-end{align-items:flex-end}.text-center{text-align:center}.justify-start{justify-content:start}.justify-center{justify-content:center}.justify-right{margin-left:auto}.align-self-center{align-self:center}.justify-self-center{justify-self:center}.justify-self-start{justify-self:start}.justify-self-end{justify-self:end}.direction-column{flex-direction:column}.space-between{justify-content:space-between}.w-100{width:100%}.h-100{height:100%}.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}.button--primary .ripple,.button--danger .ripple{background:radial-gradient(circle, rgba(var(--background-color), 0.3) 0%, rgba(0, 0, 0, 0) 50%)}.interact{position:relative;overflow:hidden;cursor:pointer;-webkit-tap-highlight-color:transparent}.empty-state{display:grid;width:100%;padding:1.5rem 0}.observe-empty-state:empty{display:none}.observe-empty-state:not(:empty)+.empty-state{display:none}.bullet-point{display:flex;align-items:center;justify-content:center;margin:0 .8ch}.bullet-point::after{content:"";height:.4ch;width:.4ch;border-radius:.5em;background-color:var(--accent-color)}.icon{width:1.2rem;height:1.2rem;fill:rgba(var(--text-color), 0.8);flex-shrink:0}.margin-right-0-5{margin-right:.5rem}.margin-left-0-5{margin-left:.5rem}.icon-button{padding:.6rem;border-radius:.8rem;background-color:rgba(var(--text-color), 0.1);height:-webkit-max-content;height:-moz-max-content;height:max-content}.icon-button .icon{fill:var(--accent-color)}.page{height:100%}.page-layout{display:grid;gap:1.5rem 0;grid-template-columns:1.5rem minmax(0, 1fr) 1.5rem;align-content:flex-start}.page-layout>*{grid-column:2/3}#confirmation_popup,#prompt_popup{flex-direction:column}#confirmation_popup h4,#prompt_popup h4{font-weight:500;margin-bottom:.5rem}#confirmation_popup sm-button,#prompt_popup sm-button{margin:0}#confirmation_popup .flex,#prompt_popup .flex{padding:0;margin-top:1rem}#confirmation_popup .flex sm-button:first-of-type,#prompt_popup .flex sm-button:first-of-type{margin-right:.6rem;margin-left:auto}#prompt_message{margin-bottom:1.5rem}.popup__header{display:grid;gap:.5rem;width:100%;padding:0 1.5rem;align-items:center}.popup__header__close{padding:.5rem;margin-left:-0.5rem;cursor:pointer}#landing>section{justify-content:center;justify-items:center;align-items:center;text-align:center;padding:8vw 0}#landing h1{font-size:clamp(2rem,5vw,5rem)}#sign_in,#sign_up{justify-items:center;align-content:center}#sign_in section,#sign_up section{margin-top:-8rem;width:min(24rem,100%)}#sign_in sm-form,#sign_up sm-form{margin:2rem 0}#sign_up .h2{margin-bottom:.5rem}#sign_up .card{margin:1.5rem 0}#sign_up h5{font-weight:500;color:rgba(var(--text-color), 0.8)}#sign_up .warning{margin-top:2rem}#main_header{padding:1rem 1.5rem}#main_header a{color:rgba(var(--text-color), 1)}#pages_container{flex:1;overflow-y:auto}.password-field label{display:flex}.password-field label input:checked~.visible{display:none}.password-field label input:not(:checked)~.invisible{display:none}.multi-state-button{display:grid;text-align:center;align-items:center}.multi-state-button>*{grid-area:1/1/2/2}.multi-state-button button{z-index:1}.clip{-webkit-clip-path:circle(0);clip-path:circle(0)}.primary-action{display:flex;flex-direction:column;align-items:center;padding:.8rem 1rem;gap:.5rem;white-space:normal;font-size:.8rem;border-radius:.5rem;background-color:transparent;min-width:5rem;max-width:6rem;text-align:center}.primary-action .icon{fill:var(--accent-color)}#user{padding:1rem 1.5rem}#saved_ids_list{display:grid;grid-template-columns:repeat(auto-fill, minmax(10rem, 1fr));gap:1rem;margin-top:1.5rem}.saved-id{display:grid;gap:1rem;grid-template-columns:auto 1fr;align-items:center;color:inherit;padding:.5rem 0}.saved-id__initials{display:flex;align-items:center;justify-content:center;height:2.5rem;width:2.5rem;color:rgba(var(--background-color), 1);background-color:var(--accent-color);border-radius:1rem;text-transform:uppercase;font-weight:700}.saved-id__title{font-size:.9rem}.card{background-color:rgba(var(--foreground-color), 1);border-radius:.5rem;padding:1.5rem}#history>*,#wallet_history>*{width:min(60ch,100%);justify-self:center}#token_transactions{flex-direction:column;padding-bottom:4rem}.transaction{grid-template-columns:auto 1fr auto;gap:.5rem 1rem;padding:.8rem;align-items:center;background-color:rgba(var(--text-color), 0.03);border-radius:.3rem}.transaction:not(:last-of-type){margin-bottom:.5rem}.transaction__icon{display:flex;align-items:center;justify-content:center;grid-area:1/1/3/2;width:2.5rem;height:2.5rem;background-color:rgba(var(--text-color), 0.03);border-radius:.5rem}.transaction__icon .icon{fill:var(--accent-color)}.transaction__receiver{font-size:.9rem;font-weight:500;color:rgba(var(--text-color), 0.8)}.transaction__time{font-size:.8rem;color:rgba(var(--text-color), 0.8)}.transaction__amount{font-size:1rem;font-weight:700;grid-area:1/3/3/4}.transaction__amount.sent::before{content:"-"}.transaction__amount.received{color:var(--green)}.transaction__amount.received::before{content:"+"}.fab{position:absolute;right:0;bottom:0;margin:1.5rem;box-shadow:0 .5rem 1rem rgba(0,0,0,.2);z-index:2}#scroll_to_top{border-radius:3rem;background-color:rgba(var(--foreground-color), 1)}#transaction_result{display:grid;gap:.5rem;height:max(40vh,24rem);align-items:center;justify-content:center;text-align:center;align-content:center}#transaction_result.success .icon--failed{display:none}#transaction_result.failed .icon--success{display:none}#transaction_result h3{text-align:center;width:100%}#transaction_result .icon{justify-self:center;height:4rem;width:4rem;border-radius:5rem;margin-bottom:1rem;-webkit-animation:popup 1s;animation:popup 1s}#transaction_result .icon--success{fill:rgba(var(--background-color), 1);padding:1rem;background-color:#0bbe56}#transaction_result .icon--failed{background-color:rgba(var(--text-color), 0.03);fill:var(--danger-color)}#transaction_result sm-copy{font-size:.8rem}@-webkit-keyframes popup{0%{opacity:0;transform:scale(0.2) translateY(600%)}10%{transform:scale(0.2) translateY(5rem);opacity:1}40%{transform:scale(0.2) translateY(0)}80%{transform:scale(1.1) translateY(0)}100%{transform:scale(1) translateY(0)}}@keyframes popup{0%{opacity:0;transform:scale(0.2) translateY(600%)}10%{transform:scale(0.2) translateY(5rem);opacity:1}40%{transform:scale(0.2) translateY(0)}80%{transform:scale(1.1) translateY(0)}100%{transform:scale(1) translateY(0)}}.cashier-request,.wallet-request,.payment-request{display:flex;gap:1rem;align-items:center;padding:.8rem;border-radius:.3rem;background-color:rgba(var(--text-color), 0.06)}.cashier-request:not(:last-of-type),.wallet-request:not(:last-of-type),.payment-request:not(:last-of-type){margin-bottom:1rem}.cashier-request__time,.wallet-request__time,.payment-request__time{font-size:.8rem}.payment-request{display:grid;grid-template-columns:1fr auto}.payment-request__amount{font-weight:700;text-align:right}@media screen and (min-width: 40rem){sm-popup{--width: 24rem}.page-layout{grid-template-columns:1fr 90vw 1fr}.popup__header{grid-column:1/-1;padding:1rem 1.5rem 0 1.5rem}#user{padding:1.5rem 8vmax;grid-template-columns:1fr 20rem;align-content:flex-start;align-items:flex-start}.saved-id{padding:1rem;border-radius:.5rem;background-color:rgba(var(--text-color), 0.03);grid-template-columns:minmax(0, 1fr)}#wallet_section{grid-area:1/2/3/3}}@media(any-hover: hover){::-webkit-scrollbar{width:.5rem;height:.5rem}::-webkit-scrollbar-thumb{background:rgba(var(--text-color), 0.3);border-radius:1rem}::-webkit-scrollbar-thumb:hover{background:rgba(var(--text-color), 0.5)}.interact:not([disabled]){transition:background-color .3s}.interact:not([disabled]):hover{background-color:rgba(var(--text-color), 0.06)}.button:not([disabled]){transition:background-color .3s,filter .3s}.button:not([disabled]):hover{filter:contrast(2)}}@supports(overflow: overlay){body{overflow:overlay}}.hide{display:none !important} \ No newline at end of file diff --git a/css/main.scss b/css/main.scss index 52d52af..22019df 100644 --- a/css/main.scss +++ b/css/main.scss @@ -17,8 +17,8 @@ body { body { --accent-color: #256eff; --text-color: 20, 20, 20; - --background-color: 240, 240, 240; - --foreground-color: 250, 250, 250; + --foreground-color: 252, 253, 255; + --background-color: 241, 243, 248; --danger-color: rgb(255, 75, 75); --green: #1cad59; scrollbar-width: thin; @@ -28,16 +28,13 @@ body { transition: background-color 0.3s; display: flex; flex-direction: column; - align-items: center; - justify-content: center; - overflow: hidden; } body[data-theme="dark"] { - --accent-color: #86afff; + --accent-color: #90b8f8; --text-color: 220, 220, 220; - --background-color: 10, 10, 10; - --foreground-color: 24, 24, 24; + --foreground-color: 27, 28, 29; + --background-color: 21, 22, 22; --danger-color: rgb(255, 106, 106); --green: #00e676; sm-popup::part(popup) { @@ -63,6 +60,13 @@ a { box-shadow: 0 0 0 0.1rem rgba(var(--text-color), 1) inset; } } +a.button { + padding: 0.4rem 0.6rem; + border-radius: 0.3rem; + font-size: 0.9rem; + font-weight: 500; + color: inherit; +} button { user-select: none; @@ -426,6 +430,18 @@ h3 { fill: var(--accent-color); } } +.page { + height: 100%; +} +.page-layout { + display: grid; + gap: 1.5rem 0; + grid-template-columns: 1.5rem minmax(0, 1fr) 1.5rem; + align-content: flex-start; + & > * { + grid-column: 2/3; + } +} #confirmation_popup, #prompt_popup { flex-direction: column; @@ -455,7 +471,6 @@ h3 { width: 100%; padding: 0 1.5rem; align-items: center; - grid-auto-flow: column; } .popup__header__close { @@ -463,78 +478,57 @@ h3 { margin-left: -0.5rem; cursor: pointer; } +#landing { + & > section { + justify-content: center; + justify-items: center; + align-items: center; + text-align: center; + padding: 8vw 0; + } + h1 { + font-size: clamp(2rem, 5vw, 5rem); + } +} + +#sign_in, +#sign_up { + justify-items: center; + align-content: center; + section { + margin-top: -8rem; + width: min(24rem, 100%); + } + sm-form { + margin: 2rem 0; + } +} +#sign_up { + .h2 { + margin-bottom: 0.5rem; + } + .card { + margin: 1.5rem 0; + } + h5 { + font-weight: 500; + color: rgba(var(--text-color), 0.8); + } + .warning { + margin-top: 2rem; + } +} #main_header { padding: 1rem 1.5rem; -} -#main_card { - display: flex; - flex-direction: column; - height: 100%; - width: 100%; - background-color: rgba(var(--foreground-color), 1); - transition: background-color 0.3s; + a { + color: rgba(var(--text-color), 1); + } } #pages_container { flex: 1; overflow-y: auto; } -#main_navbar { - display: flex; - background: rgba(var(--text-color), 0.03); - &.hide-away { - position: absolute; - } - ul { - display: flex; - height: 100%; - width: 100%; - li { - width: 100%; - } - } -} -.nav-item { - position: relative; - display: flex; - flex: 1; - width: 100%; - flex-direction: column; - align-items: center; - justify-content: center; - padding: 0.5rem 0.3rem; - color: var(--text-color); - font-size: 0.7rem; - border-radius: 0.3rem; - .icon { - transition: transform 0.2s; - } - &__title { - margin-top: 0.3rem; - transition: opacity 0.2s, transform 0.2s; - } - &--active { - color: var(--accent-color); - .icon { - fill: var(--accent-color); - transform: translateY(50%); - } - .nav-item__title { - transform: translateY(100%); - opacity: 0; - } - } - &__indicator { - position: absolute; - bottom: 0; - width: 2rem; - height: 0.3rem; - background: var(--accent-color); - border-radius: 1rem 1rem 0 0; - z-index: 1; - } -} - .password-field { label { display: flex; @@ -562,37 +556,68 @@ h3 { } .primary-action { display: flex; + flex-direction: column; + align-items: center; padding: 0.8rem 1rem; gap: 0.5rem; white-space: normal; font-size: 0.8rem; border-radius: 0.5rem; + // background-color: rgba(var(--text-color), 0.06); background-color: transparent; - border: thin solid rgba(var(--text-color), 0.3); + min-width: 5rem; + max-width: 6rem; + text-align: center; .icon { fill: var(--accent-color); } - &:not(:last-of-type) { - margin-right: 0.5rem; +} +#user { + padding: 1rem 1.5rem; +} +#saved_ids_list { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); + gap: 1rem; + margin-top: 1.5rem; +} +.saved-id { + display: grid; + gap: 1rem; + grid-template-columns: auto 1fr; + align-items: center; + color: inherit; + padding: 0.5rem 0; + &__initials { + display: flex; + align-items: center; + justify-content: center; + height: 2.5rem; + width: 2.5rem; + color: rgba(var(--background-color), 1); + background-color: var(--accent-color); + border-radius: 1rem; + text-transform: uppercase; + font-weight: 700; + } + &__title { + font-size: 0.9rem; } } -.page { - position: relative; - display: flex; - flex-direction: column; - overflow-y: auto; - align-content: flex-start; - padding: 1.5rem; -} - -#wallet_section { - background-color: rgba(var(--text-color), 0.03); +.card { + background-color: rgba(var(--foreground-color), 1); border-radius: 0.5rem; padding: 1.5rem; } - -#transactions_list { +#history, +#wallet_history { + & > * { + width: min(60ch, 100%); + justify-self: center; + } +} +#token_transactions { flex-direction: column; padding-bottom: 4rem; } @@ -638,6 +663,7 @@ h3 { } } &.received { + color: var(--green); &::before { content: "+"; } @@ -751,65 +777,27 @@ h3 { sm-popup { --width: 24rem; } + .page-layout { + grid-template-columns: 1fr 90vw 1fr; + } .popup__header { grid-column: 1/-1; padding: 1rem 1.5rem 0 1.5rem; } - #main_card { - display: grid; - grid-template-columns: auto 1fr; - grid-template-rows: auto 1fr; - grid-template-areas: "nav header" "nav main"; - position: relative; - border-radius: 0.5rem; - overflow: hidden; - box-shadow: 0 0.1rem 0.2rem rgba(0, 0, 0, 0.05), - 0 1rem 3rem rgba(0, 0, 0, 0.2); - // backdrop-filter: blur(2rem); - background-color: rgba(var(--foreground-color), 0.9); - } - #main_header { - grid-area: header; - } - #pages_container { - grid-area: main; - } - - #main_navbar { - grid-area: nav; - border-top: none; - flex-direction: column; - height: 100%; - ul { - flex-direction: column; - gap: 0.5rem; - padding: 0.3rem; - - li:last-of-type { - margin-top: auto; - } - } - } - .nav-item { - aspect-ratio: 1/1; - &__indicator { - width: 0.25rem; - height: 50%; - left: 0; - border-radius: 0 1rem 1rem 0; - bottom: auto; - } - } #user { + padding: 1.5rem 8vmax; grid-template-columns: 1fr 20rem; align-content: flex-start; align-items: flex-start; } -} -@media screen and (min-width: 56rem) { - #main_card { - height: 80vh; - width: 56rem; + .saved-id { + padding: 1rem; + border-radius: 0.5rem; + background-color: rgba(var(--text-color), 0.03); + grid-template-columns: minmax(0, 1fr); + } + #wallet_section { + grid-area: 1/2/3/3; } } diff --git a/index.html b/index.html index 31e0463..8cd467a 100644 --- a/index.html +++ b/index.html @@ -45,7 +45,7 @@ - +

@@ -55,16 +55,11 @@ OK
-
- -

Loading RanchiMall Pay

-
-
-
-
- - + + + - -

RanchiMall Pay

+ +

RanchiMall Pay

+ + + + + + + + +
+
+ + +
+
+

FLO credentials

+

Get your FLO credentials to use RanchiMall Pay and all RanchiMall FLO apps.

+
+
+
FLO ID
+ +
+
+
Private key
+ +
+
+ Sign in with these credentials + + Keep your private key secure and don't share with anyone. + Once lost there is no way to recover private key. + +
+
+
+
+ +

Loading RanchiMall Pay

- - -
-
-
+
+
+
+
+
+

Quick actions

+ + See history + +
-
+
+
+

Wallet

-
-
Balance
-

-
-
- See History +
+
+
Balance
+

+
+
+ +
+ -
+ d="M19.83,7.5l-2.27-2.27c0.07-0.42,0.18-0.81,0.32-1.15C17.96,3.9,18,3.71,18,3.5C18,2.67,17.33,2,16.5,2 c-1.64,0-3.09,0.79-4,2l-5,0C4.46,4,2,6.46,2,9.5S4.5,21,4.5,21l5.5,0v-2h2v2l5.5,0l1.68-5.59L22,14.47V7.5H19.83z M13,9H8V7h5V9z M16,11c-0.55,0-1-0.45-1-1c0-0.55,0.45-1,1-1s1,0.45,1,1C17,10.55,16.55,11,16,11z" /> + + + Deposit + +
-
-
-
-

Requests

-
    +
    +
    +
    +
    +

    Saved IDs

    + +
    +
      -

      No requests to process

      +

      No saved FLO IDs

      - - -
      -

      Transactions history

      -
        -
      -
      -

      No transactions

      -
      -
      -

      Activity

      - - Wallet transactions - Payment requests - - -
      -
        -
        -

        No transactions

        -
        -
        -
        -
          -
          -

          No requests

          -
          -
          -
          -
          -
          -

          Settings

          -
          -
          -
          My FLO ID
          - -
          - Sign out -
          -
          -

          Change UPI ID

          - - - - -
          +
          +
          +

          Requests

          +
            +
            +

            No requests to process

            +
            - -
            +
            +

            No transactions

            +
            + +
            +
            + + + + + + +

            Wallet history

            +
            + +
            +

            No transactions

            +
            +
            +
            +

            Activity

            + +
            +

            No requests

            +
            +
            +
            +

            Settings

            +
            +
            +
            My FLO ID
            + +
            + Sign out +
            +
            +

            Change UPI ID

            + + + + +
            +
            + + + + + + + + + +