diff --git a/components.js b/components.js
deleted file mode 100644
index 85f2fab..0000000
--- a/components.js
+++ /dev/null
@@ -1,2201 +0,0 @@
-/*jshint esversion: 6 */
-const smButton = document.createElement('template')
-smButton.innerHTML = `
-
-
-
-
`;
-customElements.define('sm-button',
- class extends HTMLElement {
- constructor() {
- super();
- this.attachShadow({
- mode: 'open'
- }).append(smButton.content.cloneNode(true));
- }
- static get observedAttributes() {
- return ['disabled'];
- }
-
- get disabled() {
- return this.hasAttribute('disabled');
- }
-
- set disabled(value) {
- if (value) {
- this.setAttribute('disabled', '');
- } else {
- this.removeAttribute('disabled');
- }
- }
-
- handleKeyDown(e) {
- if (!this.hasAttribute('disabled') && (e.key === 'Enter' || e.code === 'Space')) {
- e.preventDefault();
- this.click();
- }
- }
-
- connectedCallback() {
- if (!this.hasAttribute('disabled')) {
- this.setAttribute('tabindex', '0');
- }
- this.setAttribute('role', 'button');
- this.addEventListener('keydown', this.handleKeyDown);
- }
- attributeChangedCallback(name) {
- if (name === 'disabled') {
- this.removeAttribute('tabindex');
- this.setAttribute('aria-disabled', 'true');
- }
- else {
- this.setAttribute('tabindex', '0');
- this.setAttribute('aria-disabled', 'false');
- }
- }
- })
-const smForm = document.createElement('template');
-smForm.innerHTML = `
-
-
-`;
-
-customElements.define('sm-form', class extends HTMLElement {
- constructor() {
- super()
- this.attachShadow({
- mode: 'open'
- }).append(smForm.content.cloneNode(true))
-
- this.form = this.shadowRoot.querySelector('form');
- this.formElements
- this.requiredElements
- this.submitButton
- this.resetButton
- this.allRequiredValid = false;
-
- this.debounce = this.debounce.bind(this)
- this._checkValidity = this._checkValidity.bind(this)
- this.handleKeydown = this.handleKeydown.bind(this)
- this.reset = this.reset.bind(this)
- this.elementsChanged = this.elementsChanged.bind(this)
- }
- debounce(callback, wait) {
- let timeoutId = null;
- return (...args) => {
- window.clearTimeout(timeoutId);
- timeoutId = window.setTimeout(() => {
- callback.apply(null, args);
- }, wait);
- };
- }
- _checkValidity() {
- this.allRequiredValid = this.requiredElements.every(elem => elem.isValid)
- if (!this.submitButton) return;
- if (this.allRequiredValid) {
- this.submitButton.disabled = false;
- }
- else {
- this.submitButton.disabled = true;
- }
- }
- handleKeydown(e) {
- if (e.key === 'Enter' && e.target.tagName !== 'SM-TEXTAREA') {
- if (this.allRequiredValid) {
- if (this.submitButton && this.submitButton.tagName === 'SM-BUTTON') {
- this.submitButton.click()
- }
- this.dispatchEvent(new CustomEvent('submit', {
- bubbles: true,
- composed: true,
- }))
- }
- else {
- this.requiredElements.find(elem => !elem.isValid).vibrate()
- }
- }
- }
- reset() {
- this.formElements.forEach(elem => elem.reset())
- }
- elementsChanged() {
- this.formElements = [...this.querySelectorAll('sm-input, sm-textarea, sm-checkbox, tags-input, file-input, sm-switch, sm-radio')]
- this.requiredElements = this.formElements.filter(elem => elem.hasAttribute('required'));
- this.submitButton = this.querySelector('[variant="primary"], [type="submit"]');
- this.resetButton = this.querySelector('[type="reset"]');
- if (this.resetButton) {
- this.resetButton.addEventListener('click', this.reset);
- }
- this._checkValidity()
- }
- connectedCallback() {
- const slot = this.shadowRoot.querySelector('slot')
- slot.addEventListener('slotchange', this.elementsChanged)
- this.addEventListener('input', this.debounce(this._checkValidity, 100));
- this.addEventListener('keydown', this.debounce(this.handleKeydown, 100));
- }
- disconnectedCallback() {
- this.removeEventListener('input', this.debounce(this._checkValidity, 100));
- this.removeEventListener('keydown', this.debounce(this.handleKeydown, 100));
- }
-})
-
-const smInput = document.createElement('template')
-smInput.innerHTML = `
-
-
-`;
-customElements.define('sm-input',
- class extends HTMLElement {
-
- constructor() {
- super();
- this.attachShadow({
- mode: 'open'
- }).append(smInput.content.cloneNode(true));
-
- this.inputParent = this.shadowRoot.querySelector('.input');
- this.input = this.shadowRoot.querySelector('input');
- this.clearBtn = this.shadowRoot.querySelector('.clear');
- this.label = this.shadowRoot.querySelector('.label');
- this.feedbackText = this.shadowRoot.querySelector('.feedback-text');
- this.outerContainer = this.shadowRoot.querySelector('.outer-container');
- this._helperText = '';
- this._errorText = '';
- this.isRequired = false;
- this.validationFunction = undefined;
- this.reflectedAttributes = ['value', 'required', 'disabled', 'type', 'inputmode', 'readonly', 'min', 'max', 'pattern', 'minlength', 'maxlength', 'step'];
-
- this.reset = this.reset.bind(this);
- this.focusIn = this.focusIn.bind(this);
- this.focusOut = this.focusOut.bind(this);
- this.fireEvent = this.fireEvent.bind(this);
- this.checkInput = this.checkInput.bind(this);
- this.vibrate = this.vibrate.bind(this);
- }
-
- static get observedAttributes() {
- return ['value', 'placeholder', 'required', 'disabled', 'type', 'inputmode', 'readonly', 'min', 'max', 'pattern', 'minlength', 'maxlength', 'step', 'helper-text', 'error-text'];
- }
-
- get value() {
- return this.input.value;
- }
-
- set value(val) {
- this.input.value = val;
- this.checkInput();
- this.fireEvent();
- }
-
- get placeholder() {
- return this.getAttribute('placeholder');
- }
-
- set placeholder(val) {
- this.setAttribute('placeholder', val);
- }
-
- get type() {
- return this.getAttribute('type');
- }
-
- set type(val) {
- this.setAttribute('type', val);
- }
-
- get validity() {
- return this.input.validity;
- }
-
- get disabled() {
- return this.hasAttribute('disabled');
- }
- set disabled(value) {
- if (value)
- this.inputParent.classList.add('disabled');
- else
- this.inputParent.classList.remove('disabled');
- }
- get readOnly() {
- return this.hasAttribute('readonly');
- }
- set readOnly(value) {
- if (value) {
- this.setAttribute('readonly', '');
- } else {
- this.removeAttribute('readonly');
- }
- }
- set customValidation(val) {
- this.validationFunction = val;
- }
- set errorText(val) {
- this._errorText = val;
- }
- set helperText(val) {
- this._helperText = val;
- }
- get isValid() {
- if (this.input.value !== '') {
- const _isValid = this.input.checkValidity();
- let _customValid = true;
- if (this.validationFunction) {
- _customValid = Boolean(this.validationFunction(this.input.value));
- }
- if (_isValid && _customValid) {
- this.feedbackText.classList.remove('error');
- this.feedbackText.classList.add('success');
- this.feedbackText.textContent = '';
- } else {
- if (this._errorText) {
- this.feedbackText.classList.add('error');
- this.feedbackText.classList.remove('success');
- this.feedbackText.innerHTML = `
-
- ${this._errorText}
- `;
- }
- }
- return (_isValid && _customValid);
- }
- }
- reset() {
- this.value = '';
- }
-
- focusIn() {
- this.input.focus();
- }
-
- focusOut() {
- this.input.blur();
- }
-
- fireEvent() {
- let event = new Event('input', {
- bubbles: true,
- cancelable: true,
- composed: true
- });
- this.dispatchEvent(event);
- }
-
- checkInput(e) {
- if (!this.hasAttribute('readonly')) {
- if (this.input.value.trim() !== '') {
- this.clearBtn.classList.remove('hide');
- } else {
- this.clearBtn.classList.add('hide');
- if (this.isRequired) {
- this.feedbackText.textContent = '* required';
- }
- }
- }
- if (!this.hasAttribute('placeholder') || this.getAttribute('placeholder').trim() === '') return;
- if (this.input.value !== '') {
- if (this.animate)
- this.inputParent.classList.add('animate-label');
- else
- this.label.classList.add('hide');
- } else {
- if (this.animate)
- this.inputParent.classList.remove('animate-label');
- else
- this.label.classList.remove('hide');
- }
- }
- vibrate() {
- this.outerContainer.animate([
- { transform: 'translateX(-1rem)' },
- { transform: 'translateX(1rem)' },
- { transform: 'translateX(-0.5rem)' },
- { transform: 'translateX(0.5rem)' },
- { transform: 'translateX(0)' },
- ], {
- duration: 300,
- easing: 'ease'
- });
- }
-
-
- connectedCallback() {
- this.animate = this.hasAttribute('animate');
- this.setAttribute('role', 'textbox');
- this.input.addEventListener('input', this.checkInput);
- this.clearBtn.addEventListener('click', this.reset);
- }
-
- attributeChangedCallback(name, oldValue, newValue) {
- if (oldValue !== newValue) {
- if (this.reflectedAttributes.includes(name)) {
- if (this.hasAttribute(name)) {
- this.input.setAttribute(name, this.getAttribute(name) ? this.getAttribute(name) : '');
- }
- else {
- this.input.removeAttribute(name);
- }
- }
- if (name === 'placeholder') {
- this.label.textContent = newValue;
- this.setAttribute('aria-label', newValue);
- }
- else if (this.hasAttribute('value')) {
- this.checkInput();
- }
- else if (name === 'type') {
- if (this.hasAttribute('type') && this.getAttribute('type') === 'number') {
- this.input.setAttribute('inputmode', 'numeric');
- }
- }
- else if (name === 'helper-text') {
- this._helperText = this.getAttribute('helper-text');
- }
- else if (name === 'error-text') {
- this._errorText = this.getAttribute('error-text');
- }
- else if (name === 'required') {
- this.isRequired = this.hasAttribute('required');
- if (this.isRequired) {
- this.feedbackText.textContent = '* required';
- this.setAttribute('aria-required', 'true');
- }
- else {
- this.feedbackText.textContent = '';
- this.setAttribute('aria-required', 'false');
- }
- }
- else if (name === 'readonly') {
- if (this.hasAttribute('readonly')) {
- this.inputParent.classList.add('readonly');
- } else {
- this.inputParent.classList.remove('readonly');
- }
- }
- else if (name === 'disabled') {
- if (this.hasAttribute('disabled')) {
- this.inputParent.classList.add('disabled');
- }
- else {
- this.inputParent.classList.remove('disabled');
- }
- }
- }
- }
- disconnectedCallback() {
- this.input.removeEventListener('input', this.checkInput);
- this.clearBtn.removeEventListener('click', this.reset);
- }
- })
-const smNotifications = document.createElement('template')
-smNotifications.innerHTML = `
-
-
-`
-
-customElements.define('sm-notifications', class extends HTMLElement {
- constructor() {
- super();
- this.shadow = this.attachShadow({
- mode: 'open'
- }).append(smNotifications.content.cloneNode(true))
-
- this.notificationPanel = this.shadowRoot.querySelector('.notification-panel')
- this.animationOptions = {
- duration: 300,
- fill: "forwards",
- easing: "cubic-bezier(0.175, 0.885, 0.32, 1.275)"
- }
-
- this.push = this.push.bind(this)
- this.createNotification = this.createNotification.bind(this)
- this.removeNotification = this.removeNotification.bind(this)
- this.clearAll = this.clearAll.bind(this)
-
- }
-
- randString(length) {
- let result = '';
- const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
- for (let i = 0; i < length; i++)
- result += characters.charAt(Math.floor(Math.random() * characters.length));
- return result;
- }
-
- createNotification(message, options) {
- const { pinned = false, icon = '' } = options
- const notification = document.createElement('div')
- notification.id = this.randString(8)
- notification.classList.add('notification');
- let composition = ``;
- composition += `
- ${icon}
- ${message}
- `;
- if (pinned) {
- notification.classList.add('pinned');
- composition += `
-
-
-
- `;
- }
- notification.innerHTML = composition;
- return notification;
- }
-
- push(message, options = {}) {
- const notification = this.createNotification(message, options);
- this.notificationPanel.append(notification);
- notification.animate([
- {
- transform: `translateY(1rem)`,
- opacity: '0'
- },
- {
- transform: `none`,
- opacity: '1'
- },
- ], this.animationOptions);
- return notification.id;
- }
-
- removeNotification(notification) {
- notification.animate([
- {
- transform: `none`,
- opacity: '1'
- },
- {
- transform: `translateY(0.5rem)`,
- opacity: '0'
- }
- ], this.animationOptions).onfinish = () => {
- notification.remove();
- };
- }
-
- clearAll() {
- Array.from(this.notificationPanel.children).forEach(child => {
- this.removeNotification(child);
- });
- }
-
- connectedCallback() {
- this.notificationPanel.addEventListener('click', e => {
- if (e.target.closest('.close')) {
- this.removeNotification(e.target.closest('.notification'));
- }
- });
-
- const observer = new MutationObserver(mutationList => {
- mutationList.forEach(mutation => {
- if (mutation.type === 'childList') {
- if (mutation.addedNodes.length && !mutation.addedNodes[0].classList.contains('pinned')) {
- setTimeout(() => {
- this.removeNotification(mutation.addedNodes[0]);
- }, 5000);
- }
- }
- });
- });
- observer.observe(this.notificationPanel, {
- childList: true,
- });
- }
-});
-const smPopup = document.createElement('template');
-smPopup.innerHTML = `
-
-
-`;
-customElements.define('sm-popup', class extends HTMLElement {
- constructor() {
- super();
- this.attachShadow({
- mode: 'open'
- }).append(smPopup.content.cloneNode(true));
-
- this.allowClosing = false;
- this.isOpen = false;
- this.pinned = false;
- this.popupStack = undefined;
- this.offset = 0;
- this.touchStartY = 0;
- this.touchEndY = 0;
- this.touchStartTime = 0;
- this.touchEndTime = 0;
- this.touchEndAnimataion = undefined;
-
- this.popupContainer = this.shadowRoot.querySelector('.popup-container');
- this.popup = this.shadowRoot.querySelector('.popup');
- this.popupBodySlot = this.shadowRoot.querySelector('.popup-body slot');
- this.popupHeader = this.shadowRoot.querySelector('.popup-top');
-
- this.resumeScrolling = this.resumeScrolling.bind(this);
- this.show = this.show.bind(this);
- this.hide = this.hide.bind(this);
- this.handleTouchStart = this.handleTouchStart.bind(this);
- this.handleTouchMove = this.handleTouchMove.bind(this);
- this.handleTouchEnd = this.handleTouchEnd.bind(this);
- this.movePopup = this.movePopup.bind(this);
- }
-
- static get observedAttributes() {
- return ['open'];
- }
-
- get open() {
- return this.isOpen;
- }
-
- resumeScrolling() {
- const scrollY = document.body.style.top;
- window.scrollTo(0, parseInt(scrollY || '0') * -1);
- setTimeout(() => {
- document.body.style.overflow = 'auto';
- document.body.style.top = 'initial';
- }, 300);
- }
-
- show(options = {}) {
- const { pinned = false, popupStack } = options;
- if (popupStack)
- this.popupStack = popupStack;
- if (this.popupStack && !this.hasAttribute('open')) {
- this.popupStack.push({
- popup: this,
- permission: pinned
- });
- if (this.popupStack.items.length > 1) {
- this.popupStack.items[this.popupStack.items.length - 2].popup.classList.add('stacked');
- }
- this.dispatchEvent(
- new CustomEvent("popupopened", {
- bubbles: true,
- detail: {
- popup: this,
- popupStack: this.popupStack
- }
- })
- );
- this.setAttribute('open', '');
- this.pinned = pinned;
- this.isOpen = true;
- }
- this.popupContainer.classList.remove('hide');
- this.popup.style.transform = 'none';
- document.body.style.overflow = 'hidden';
- document.body.style.top = `-${window.scrollY}px`;
- return this.popupStack;
- }
- hide() {
- if (window.innerWidth < 640)
- this.popup.style.transform = 'translateY(100%)';
- else
- this.popup.style.transform = 'translateY(3rem)';
- this.popupContainer.classList.add('hide');
- this.removeAttribute('open');
- if (typeof this.popupStack !== 'undefined') {
- this.popupStack.pop();
- if (this.popupStack.items.length) {
- this.popupStack.items[this.popupStack.items.length - 1].popup.classList.remove('stacked');
- } else {
- this.resumeScrolling();
- }
- } else {
- this.resumeScrolling();
- }
-
- if (this.forms.length) {
- setTimeout(() => {
- this.forms.forEach(form => form.reset());
- }, 300);
- }
- setTimeout(() => {
- this.dispatchEvent(
- new CustomEvent("popupclosed", {
- bubbles: true,
- detail: {
- popup: this,
- popupStack: this.popupStack
- }
- })
- );
- this.isOpen = false;
- }, 300);
- }
-
- handleTouchStart(e) {
- this.touchStartY = e.changedTouches[0].clientY;
- this.popup.style.transition = 'transform 0.1s';
- this.touchStartTime = e.timeStamp;
- }
-
- handleTouchMove(e) {
- if (this.touchStartY < e.changedTouches[0].clientY) {
- this.offset = e.changedTouches[0].clientY - this.touchStartY;
- this.touchEndAnimataion = window.requestAnimationFrame(() => this.movePopup());
- }
- }
-
- handleTouchEnd(e) {
- this.touchEndTime = e.timeStamp;
- cancelAnimationFrame(this.touchEndAnimataion);
- this.touchEndY = e.changedTouches[0].clientY;
- this.popup.style.transition = 'transform 0.3s';
- this.threshold = this.popup.getBoundingClientRect().height * 0.3;
- if (this.touchEndTime - this.touchStartTime > 200) {
- if (this.touchEndY - this.touchStartY > this.threshold) {
- if (this.pinned) {
- this.show();
- return;
- } else
- this.hide();
- } else {
- this.show();
- }
- } else {
- if (this.touchEndY > this.touchStartY)
- if (this.pinned) {
- this.show();
- return;
- }
- else
- this.hide();
- }
- }
-
- movePopup() {
- this.popup.style.transform = `translateY(${this.offset}px)`;
- }
-
- connectedCallback() {
- this.popupBodySlot.addEventListener('slotchange', () => {
- this.forms = this.querySelectorAll('sm-form');
- });
- this.popupContainer.addEventListener('mousedown', e => {
- if (e.target === this.popupContainer && !this.pinned) {
- if (this.pinned) {
- this.show();
- } else
- this.hide();
- }
- });
-
- const resizeObserver = new ResizeObserver(entries => {
- for (let entry of entries) {
- if (entry.contentBoxSize) {
- // Firefox implements `contentBoxSize` as a single content rect, rather than an array
- const contentBoxSize = Array.isArray(entry.contentBoxSize) ? entry.contentBoxSize[0] : entry.contentBoxSize;
- this.threshold = contentBoxSize.blockSize.height * 0.3;
- } else {
- this.threshold = entry.contentRect.height * 0.3;
- }
- }
- });
- resizeObserver.observe(this);
-
-
- this.popupHeader.addEventListener('touchstart', this.handleTouchStart, { passive: true });
- this.popupHeader.addEventListener('touchmove', this.handleTouchMove, { passive: true });
- this.popupHeader.addEventListener('touchend', this.handleTouchEnd, { passive: true });
- }
- disconnectedCallback() {
- this.popupHeader.removeEventListener('touchstart', this.handleTouchStart, { passive: true });
- this.popupHeader.removeEventListener('touchmove', this.handleTouchMove, { passive: true });
- this.popupHeader.removeEventListener('touchend', this.handleTouchEnd, { passive: true });
- resizeObserver.unobserve();
- }
- attributeChangedCallback(name) {
- if (name === 'open') {
- if (this.hasAttribute('open')) {
- this.show();
- }
- }
- }
-});
-const spinner = document.createElement('template');
-spinner.innerHTML = `
-
-
-
-`;
-class SquareLoader extends HTMLElement {
- constructor() {
- super();
- this.attachShadow({
- mode: 'open'
- }).append(spinner.content.cloneNode(true));
- }
-}
-window.customElements.define('sm-spinner', SquareLoader);
-
-const themeToggle = document.createElement('template');
-themeToggle.innerHTML = `
-
-
-
-
-
-
-
-
-
-
-
-
-
-`;
-
-class ThemeToggle extends HTMLElement {
- constructor() {
- super();
-
- this.attachShadow({
- mode: 'open'
- }).append(themeToggle.content.cloneNode(true));
-
- this.isChecked = false;
- this.hasTheme = 'light';
-
- this.toggleState = this.toggleState.bind(this);
- this.fireEvent = this.fireEvent.bind(this);
- this.handleThemeChange = this.handleThemeChange.bind(this);
- }
- static get observedAttributes() {
- return ['checked'];
- }
-
- daylight() {
- this.hasTheme = 'light';
- document.body.dataset.theme = 'light';
- this.setAttribute('aria-checked', 'false');
- }
-
- nightlight() {
- this.hasTheme = 'dark';
- document.body.dataset.theme = 'dark';
- this.setAttribute('aria-checked', 'true');
- }
-
- toggleState() {
- this.toggleAttribute('checked');
- this.fireEvent();
- }
- handleKeyDown(e) {
- if (e.code === 'Space') {
- this.toggleState();
- }
- }
- handleThemeChange(e) {
- if (e.detail.theme !== this.hasTheme) {
- if (e.detail.theme === 'dark') {
- this.setAttribute('checked', '');
- }
- else {
- this.removeAttribute('checked');
- }
- }
- }
-
- fireEvent() {
- this.dispatchEvent(
- new CustomEvent('themechange', {
- bubbles: true,
- composed: true,
- detail: {
- theme: this.hasTheme
- }
- })
- );
- }
-
- connectedCallback() {
- this.setAttribute('role', 'switch');
- this.setAttribute('aria-label', 'theme toggle');
- if (localStorage.getItem(`${window.location.hostname}-theme`) === "dark") {
- this.nightlight();
- this.setAttribute('checked', '');
- } else if (localStorage.getItem(`${window.location.hostname}-theme`) === "light") {
- this.daylight();
- this.removeAttribute('checked');
- }
- else {
- if (window.matchMedia(`(prefers-color-scheme: dark)`).matches) {
- this.nightlight();
- this.setAttribute('checked', '');
- } else {
- this.daylight();
- this.removeAttribute('checked');
- }
- }
- this.addEventListener("click", this.toggleState);
- this.addEventListener("keydown", this.handleKeyDown);
- document.addEventListener('themechange', this.handleThemeChange);
- }
-
- disconnectedCallback() {
- this.removeEventListener("click", this.toggleState);
- this.removeEventListener("keydown", this.handleKeyDown);
- document.removeEventListener('themechange', this.handleThemeChange);
- }
-
- attributeChangedCallback(name, oldVal, newVal) {
- if (name === 'checked') {
- if (this.hasAttribute('checked')) {
- this.nightlight();
- localStorage.setItem(`${window.location.hostname}-theme`, "dark");
- } else {
- this.daylight();
- localStorage.setItem(`${window.location.hostname}-theme`, "light");
- }
- }
- }
-}
-
-window.customElements.define('theme-toggle', ThemeToggle);
-
-const smCopy = document.createElement('template');
-smCopy.innerHTML = `
-
-
-`;
-customElements.define('sm-copy',
- class extends HTMLElement {
- constructor() {
- super();
- this.attachShadow({
- mode: 'open'
- }).append(smCopy.content.cloneNode(true));
-
- this.copyContent = this.shadowRoot.querySelector('.copy-content');
- this.copyButton = this.shadowRoot.querySelector('.copy-button');
-
- this.copy = this.copy.bind(this);
- }
- static get observedAttributes() {
- return ['value'];
- }
- set value(val) {
- this.setAttribute('value', val);
- }
- get value() {
- return this.getAttribute('value');
- }
- fireEvent() {
- this.dispatchEvent(
- new CustomEvent('copy', {
- composed: true,
- bubbles: true,
- cancelable: true,
- })
- );
- }
- copy() {
- navigator.clipboard.writeText(this.copyContent.textContent)
- .then(res => this.fireEvent())
- .catch(err => console.error(err));
- }
- connectedCallback() {
- this.copyButton.addEventListener('click', this.copy);
- }
- attributeChangedCallback(name, oldValue, newValue) {
- if (name === 'value') {
- this.copyContent.textContent = newValue;
- }
- }
- disconnectedCallback() {
- this.copyButton.removeEventListener('click', this.copy);
- }
- });
-const stripSelect = document.createElement('template');
-stripSelect.innerHTML = `
-
-
-
-`;
-customElements.define('strip-select', class extends HTMLElement {
- constructor() {
- super();
- this.attachShadow({
- mode: 'open'
- }).append(stripSelect.content.cloneNode(true));
- this.stripSelect = this.shadowRoot.querySelector('.strip-select');
- this.slottedOptions = undefined;
- this._value = undefined;
- this.scrollDistance = 0;
-
- this.scrollLeft = this.scrollLeft.bind(this);
- this.scrollRight = this.scrollRight.bind(this);
- this.fireEvent = this.fireEvent.bind(this);
- }
- get value() {
- return this._value;
- }
- scrollLeft() {
- this.stripSelect.scrollBy({
- left: -this.scrollDistance,
- behavior: 'smooth'
- });
- }
-
- scrollRight() {
- this.stripSelect.scrollBy({
- left: this.scrollDistance,
- behavior: 'smooth'
- });
- }
- fireEvent() {
- this.dispatchEvent(
- new CustomEvent("change", {
- bubbles: true,
- composed: true,
- detail: {
- value: this._value
- }
- })
- );
- }
- connectedCallback() {
- this.setAttribute('role', 'listbox');
-
- const slot = this.shadowRoot.querySelector('slot');
- const coverLeft = this.shadowRoot.querySelector('.cover--left');
- const coverRight = this.shadowRoot.querySelector('.cover--right');
- const navButtonLeft = this.shadowRoot.querySelector('.nav-button--left');
- const navButtonRight = this.shadowRoot.querySelector('.nav-button--right');
- slot.addEventListener('slotchange', e => {
- const assignedElements = slot.assignedElements();
- assignedElements.forEach(elem => {
- if (elem.hasAttribute('selected')) {
- elem.setAttribute('active', '');
- this._value = elem.value;
- }
- });
- if (!this.hasAttribute('multiline')) {
- if (assignedElements.length > 0) {
- firstOptionObserver.observe(slot.assignedElements()[0]);
- lastOptionObserver.observe(slot.assignedElements()[slot.assignedElements().length - 1]);
- }
- else {
- navButtonLeft.classList.add('hide');
- navButtonRight.classList.add('hide');
- coverLeft.classList.add('hide');
- coverRight.classList.add('hide');
- firstOptionObserver.disconnect();
- lastOptionObserver.disconnect();
- }
- }
- });
- const resObs = new ResizeObserver(entries => {
- entries.forEach(entry => {
- if (entry.contentBoxSize) {
- // Firefox implements `contentBoxSize` as a single content rect, rather than an array
- const contentBoxSize = Array.isArray(entry.contentBoxSize) ? entry.contentBoxSize[0] : entry.contentBoxSize;
-
- this.scrollDistance = contentBoxSize.inlineSize * 0.6;
- } else {
- this.scrollDistance = entry.contentRect.width * 0.6;
- }
- });
- });
- resObs.observe(this);
- this.stripSelect.addEventListener('option-clicked', e => {
- if (this._value !== e.target.value) {
- this._value = e.target.value;
- slot.assignedElements().forEach(elem => elem.removeAttribute('active'));
- e.target.setAttribute('active', '');
- e.target.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "center" });
- this.fireEvent();
- }
- });
- const firstOptionObserver = new IntersectionObserver(entries => {
- entries.forEach(entry => {
- if (entry.isIntersecting) {
- navButtonLeft.classList.add('hide');
- coverLeft.classList.add('hide');
- }
- else {
- navButtonLeft.classList.remove('hide');
- coverLeft.classList.remove('hide');
- }
- });
- },
- {
- threshold: 0.9,
- root: this
- });
- const lastOptionObserver = new IntersectionObserver(entries => {
- entries.forEach(entry => {
- if (entry.isIntersecting) {
- navButtonRight.classList.add('hide');
- coverRight.classList.add('hide');
- }
- else {
- navButtonRight.classList.remove('hide');
- coverRight.classList.remove('hide');
- }
- });
- },
- {
- threshold: 0.9,
- root: this
- });
- navButtonLeft.addEventListener('click', this.scrollLeft);
- navButtonRight.addEventListener('click', this.scrollRight);
- }
- disconnectedCallback() {
- navButtonLeft.removeEventListener('click', this.scrollLeft);
- navButtonRight.removeEventListener('click', this.scrollRight);
- }
-});
-
-//Strip option
-const stripOption = document.createElement('template');
-stripOption.innerHTML = `
-
-
-
-
-`;
-customElements.define('strip-option', class extends HTMLElement {
- constructor() {
- super();
- this.attachShadow({
- mode: 'open'
- }).append(stripOption.content.cloneNode(true));
- this._value = undefined;
- this.radioButton = this.shadowRoot.querySelector('input');
-
- this.fireEvent = this.fireEvent.bind(this);
- this.handleKeyDown = this.handleKeyDown.bind(this);
- }
- get value() {
- return this._value;
- }
- fireEvent() {
- this.dispatchEvent(
- new CustomEvent("option-clicked", {
- bubbles: true,
- composed: true,
- detail: {
- value: this._value
- }
- })
- );
- }
- handleKeyDown(e) {
- if (e.key === 'Enter' || e.key === 'Space') {
- this.fireEvent();
- }
- }
- connectedCallback() {
- this.setAttribute('role', 'option');
- this.setAttribute('tabindex', '0');
- this._value = this.getAttribute('value');
- this.addEventListener('click', this.fireEvent);
- this.addEventListener('keydown', this.handleKeyDown);
- }
- disconnectedCallback() {
- this.removeEventListener('click', this.fireEvent);
- this.removeEventListener('keydown', this.handleKeyDown);
- }
-});
-
-const slideButton = document.createElement('template')
-slideButton.innerHTML = `
-
-
-`;
-class SlideButton extends HTMLElement {
- constructor() {
- super();
- this.attachShadow({
- mode: 'open'
- }).append(slideButton.content.cloneNode(true));
-
- this.handleTouchStart = this.handleTouchStart.bind(this);
- this.handleTouchMove = this.handleTouchMove.bind(this);
- this.handleTouchEnd = this.handleTouchEnd.bind(this);
- this.reset = this.reset.bind(this);
- this.fireEvent = this.fireEvent.bind(this);
- this.thumb = this.shadowRoot.querySelector('.slide-thumb');
-
- this.startX = 0;
- this.threshold = 0;
- this.bound = 0;
- }
- get disabled() {
- return this.hasAttribute('disabled');
- }
-
- set disabled(value) {
- if (value) {
- this.setAttribute('disabled', '');
- } else {
- this.removeAttribute('disabled');
- }
- }
-
- reset() {
- this.thumb.setAttribute('style', `transform: translateX(0)`);
- }
-
- fireEvent() {
- this.dispatchEvent(new CustomEvent('confirmed', {
- bubbles: true,
- composed: true,
- }));
- }
-
- handleTouchStart(e) {
- this.thumb.classList.remove('transition')
- const thumbDimensions = this.thumb.getBoundingClientRect();
- const buttonDimensions = this.getBoundingClientRect();
- this.bound = buttonDimensions.width - thumbDimensions.width;
- this.startX = e.clientX;
- this.threshold = this.bound / 2;
- this.thumb.setPointerCapture(e.pointerId);
- this.thumb.addEventListener('pointermove', this.handleTouchMove);
- this.thumb.addEventListener('pointerup', this.handleTouchEnd);
- }
- handleTouchMove(e) {
- requestAnimationFrame(() => {
- this.thumb.setAttribute('style', `transform: translateX(${Math.max(0, Math.min((this.bound), e.clientX - this.startX))}px)`);
- })
- }
- handleTouchEnd(e) {
- this.thumb.classList.add('transition');
- if (e.clientX > this.threshold) {
- this.fireEvent();
- this.thumb.setAttribute('style', `transform: translateX(${this.bound}px)`);
- } else {
- this.reset();
- }
- this.thumb.releasePointerCapture(e.pointerId);
- this.thumb.removeEventListener('pointermove', this.handleTouchMove);
- this.thumb.removeEventListener('pointerup', this.handleTouchEnd);
- }
-
- connectedCallback() {
- this.thumb.addEventListener('pointerdown', this.handleTouchStart);
- }
-
- disconnectedCallback() {
- this.thumb.removeEventListener('pointerdown', this.handleTouchStart);
- }
-}
-
-window.customElements.define('slide-button', SlideButton);
\ No newline at end of file
diff --git a/css/main.css b/css/main.css
index c69a0b6..37785a1 100644
--- a/css/main.css
+++ b/css/main.css
@@ -16,11 +16,6 @@ body {
}
body {
- color: rgba(var(--text-color), 1);
- background: rgba(var(--background-color), 1);
-}
-body,
-body * {
--accent-color: #2672ff;
--accent-color--light: rgba(38, 114, 255, 0.06);
--text-color: 20, 20, 20;
@@ -31,10 +26,11 @@ body * {
--yellow: rgb(220, 165, 0);
--loan-color: rgb(255, 171, 93);
scrollbar-width: thin;
+ color: rgba(var(--text-color), 1);
+ background: rgba(var(--background-color), 1);
}
-body[data-theme=dark],
-body[data-theme=dark] * {
+body[data-theme=dark] {
--accent-color: rgb(170, 190, 255);
--accent-color--light: rgba(231, 239, 255, 0.06);
--text-color: 200, 200, 200;
@@ -81,26 +77,71 @@ button,
background-color: transparent;
overflow: hidden;
color: inherit;
- cursor: pointer;
- transition: transform 0.3s;
-webkit-tap-highlight-color: transparent;
+ align-items: center;
+ font-size: 0.9rem;
+ font-weight: 500;
+ white-space: nowrap;
+ padding: 0.8rem;
+ border-radius: 0.3rem;
+ justify-content: center;
+}
+button:focus-visible,
+.button:focus-visible {
+ outline: var(--accent-color) solid medium;
+}
+button:not(:disabled),
+.button:not(:disabled) {
+ cursor: pointer;
}
.button {
- white-space: nowrap;
- padding: 0.6rem 1rem;
- border-radius: 0.3rem;
- font-weight: 500;
- font-size: 0.8rem;
- background-color: rgba(var(--text-color), 0.06);
+ background-color: rgba(var(--text-color), 0.02);
+ border: solid thin rgba(var(--text-color), 0.06);
}
.button--primary {
- background-color: var(--accent-color);
color: rgba(var(--background-color), 1);
+ background-color: var(--accent-color);
+}
+.button--primary .icon {
+ fill: rgba(var(--background-color), 1);
+}
+.button--colored {
+ color: var(--accent-color);
+}
+.button--colored .icon {
+ fill: var(--accent-color);
+}
+.button--danger {
+ background-color: rgba(255, 115, 115, 0.062745098);
+ color: var(--danger-color);
+}
+.button--danger .icon {
+ fill: var(--danger-color);
+}
+.button--small {
+ padding: 0.4rem 0.6rem;
+}
+.button--outlined {
+ border: solid rgba(var(--text-color), 0.3) 0.1rem;
+ background-color: rgba(var(--foreground-color), 1);
+}
+.button--transparent {
+ background-color: transparent;
}
button:disabled {
- opacity: 0.5;
+ opacity: 0.4;
+ cursor: not-allowed;
+ filter: saturate(0);
+}
+
+.cta {
+ text-transform: uppercase;
+ font-size: 0.8rem;
+ font-weight: 700;
+ letter-spacing: 0.05em;
+ padding: 0.8rem 1rem;
}
a:-webkit-any-link:focus-visible {
@@ -115,17 +156,6 @@ a:any-link:focus-visible {
outline: rgba(var(--text-color), 1) 0.1rem solid;
}
-sm-button {
- --border-radius: 0.5rem;
- --padding: 0.7rem 1rem;
-}
-sm-button[variant=primary] .icon {
- fill: rgba(var(--background-color), 1);
-}
-sm-button[disabled] .icon {
- fill: rgba(var(--text-color), 0.6);
-}
-
ul {
list-style: none;
}
@@ -143,7 +173,7 @@ ul {
pointer-events: none;
}
-.hide-completely {
+.hidden {
display: none !important;
}
@@ -335,23 +365,41 @@ ul {
fill: var(--accent-color);
}
-#confirmation_popup {
+#confirmation_popup,
+#prompt_popup {
flex-direction: column;
}
-#confirmation_popup h4 {
- font-weight: 500;
- margin-bottom: 0.5rem;
+#confirmation_popup h4,
+#prompt_popup h4 {
+ font-size: 1.2rem;
+ margin-bottom: 1rem;
}
-#confirmation_popup sm-button {
- margin: 0;
-}
-#confirmation_popup .flex {
- padding: 0;
+#confirmation_popup .flex,
+#prompt_popup .flex {
margin-top: 1rem;
}
-#confirmation_popup .flex sm-button:first-of-type {
- margin-right: 0.6rem;
- margin-left: auto;
+
+.popup__header {
+ position: relative;
+ display: grid;
+ gap: 0.5rem;
+ width: 100%;
+ padding: 0 1.5rem;
+ align-items: center;
+}
+.popup__header > * {
+ grid-row: 1;
+}
+.popup__header h3,
+.popup__header h4 {
+ grid-column: 1/-1;
+ justify-self: center;
+ align-self: center;
+}
+.popup__header__close {
+ grid-column: 1;
+ margin-left: -1rem;
+ justify-self: flex-start;
}
button:active,
@@ -484,6 +532,7 @@ details[open] > summary .icon {
text-align: center;
}
#loading sm-spinner {
+ justify-self: center;
margin-bottom: 1.5rem;
}
@@ -537,7 +586,15 @@ details[open] > summary .icon {
display: grid;
gap: 1rem;
align-items: center;
- grid-template-columns: 1fr auto auto;
+ grid-template-columns: 1fr auto;
+}
+
+#user_profile_button {
+ gap: 0.5rem;
+ background-color: rgba(var(--text-color), 0.06);
+ border-radius: 2rem;
+ font-size: 0.8rem;
+ padding: 0.6rem 0.8rem;
}
#subpage_container {
@@ -601,13 +658,13 @@ details[open] > summary .icon {
background-color: rgba(var(--text-color), 0.06);
}
-strip-select {
+sm-chips {
--gap: 0;
background-color: rgba(var(--text-color), 0.06);
border-radius: 0.3rem;
}
-strip-option {
+sm-chip {
text-transform: uppercase;
font-weight: 500;
letter-spacing: 0.05em;
@@ -616,10 +673,14 @@ strip-option {
--active-option-color: rgba(var(--background-color), 1);
--active-option-background-color: var(--accent-color);
}
-strip-option:first-of-type {
+sm-chip[selected] {
+ color: rgba(var(--background-color), 1);
+ --background: var(--accent-color);
+}
+sm-chip:first-of-type {
--border-radius: 0.3rem 0 0 0.3rem;
}
-strip-option:last-of-type {
+sm-chip:last-of-type {
--border-radius: 0 0.3rem 0.3rem 0;
}
@@ -1015,7 +1076,8 @@ strip-option:last-of-type {
#account_process__steps,
#transaction__steps {
- display: grid;
+ display: flex;
+ flex-direction: column;
gap: 1.5rem;
}
@@ -1140,7 +1202,7 @@ strip-option:last-of-type {
justify-content: center;
align-items: center;
}
-.loader-button-wrapper sm-button,
+.loader-button-wrapper button[type=submit],
.loader-button-wrapper slide-button {
width: 100%;
z-index: 1;
@@ -1150,7 +1212,7 @@ strip-option:last-of-type {
-webkit-clip-path: circle(100%);
clip-path: circle(100%);
}
-.loader-button-wrapper sm-button.clip,
+.loader-button-wrapper button[type=submit].clip,
.loader-button-wrapper slide-button.clip {
pointer-events: none;
-webkit-clip-path: circle(0);
@@ -1246,8 +1308,11 @@ strip-option:last-of-type {
}
@media screen and (max-width: 640px) {
- sm-button {
- --padding: 0.9rem 1.6rem;
+ #user_profile_button {
+ grid-area: 1/1/2/2;
+ }
+ theme-toggle {
+ grid-area: 1/2/2/3;
}
#dashboard {
padding: 0 1.5rem;
@@ -1298,8 +1363,14 @@ strip-option:last-of-type {
.activity-card--account .grid {
text-align: right;
}
+ .hide-on-mobile {
+ display: none;
+ }
}
@media screen and (min-width: 640px) {
+ sm-popup {
+ --width: 26rem;
+ }
.h1 {
font-size: 2rem;
}
@@ -1315,6 +1386,9 @@ strip-option:last-of-type {
#confirmation_popup {
--width: 24rem;
}
+ .popup__header {
+ padding: 1rem 1.5rem 0 1.5rem;
+ }
.page-layout {
grid-template-columns: 1fr 90vw 1fr;
}
@@ -1349,6 +1423,9 @@ strip-option:last-of-type {
.nav-item__title {
display: none;
}
+ #main_header {
+ grid-template-columns: 1fr auto auto;
+ }
#user_section {
grid-area: user-section;
background-color: rgba(var(--background-color), 1);
diff --git a/css/main.min.css b/css/main.min.css
index 92f7c90..eb0ed7f 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%;scroll-behavior:smooth}body{color:rgba(var(--text-color), 1);background:rgba(var(--background-color), 1)}body,body *{--accent-color: #2672ff;--accent-color--light: rgba(38, 114, 255, 0.06);--text-color: 20, 20, 20;--foreground-color: 252, 253, 255;--background-color: 241, 243, 248;--danger-color: rgb(255, 75, 75);--green: #1cad59;--yellow: rgb(220, 165, 0);--loan-color: rgb(255, 171, 93);scrollbar-width:thin}body[data-theme=dark],body[data-theme=dark] *{--accent-color: rgb(170, 190, 255);--accent-color--light: rgba(231, 239, 255, 0.06);--text-color: 200, 200, 200;--foreground-color: 27, 28, 29;--background-color: 21, 22, 22;--danger-color: rgb(255, 106, 106);--green: #00e676;--yellow: rgb(255, 213, 5);--loan-color: rgb(255, 232, 170)}p,strong{font-size:.9rem;max-width:70ch;line-height:1.7;color:rgba(var(--text-color), 0.8)}p:not(:last-of-type),strong:not(:last-of-type){margin-bottom:1.5rem}a:where([class]){color:inherit;text-decoration:none}a:where([class]):focus-visible{box-shadow:0 0 0 .1rem rgba(var(--text-color), 1) inset}a{color:var(--accent-color)}button,.button{-webkit-user-select:none;-moz-user-select:none;user-select:none;position:relative;display:inline-flex;border:none;background-color:rgba(0,0,0,0);overflow:hidden;color:inherit;cursor:pointer;transition:transform .3s;-webkit-tap-highlight-color:rgba(0,0,0,0)}.button{white-space:nowrap;padding:.6rem 1rem;border-radius:.3rem;font-weight:500;font-size:.8rem;background-color:rgba(var(--text-color), 0.06)}.button--primary{background-color:var(--accent-color);color:rgba(var(--background-color), 1)}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}sm-button{--border-radius: 0.5rem;--padding: 0.7rem 1rem}sm-button[variant=primary] .icon{fill:rgba(var(--background-color), 1)}sm-button[disabled] .icon{fill:rgba(var(--text-color), 0.6)}ul{list-style:none}.flex{display:flex}.grid{display:grid}.hide{opacity:0;pointer-events:none}.hide-completely{display:none !important}.overflow-ellipsis{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.breakable{overflow-wrap:break-word;word-wrap:break-word;-ms-word-break:break-all;word-break:break-word;-webkit-hyphens:auto;hyphens:auto}.full-bleed{grid-column:1/4}.h1{font-size:1.5rem}.h2{font-size:1.2rem}.h3{font-size:1rem}.h4{font-size:.9rem}.h5{font-size:.8rem}.uppercase{text-transform:uppercase}.capitalize{text-transform:capitalize}.flex{display:flex}.grid{display:grid}.grid-3{grid-template-columns:1fr auto auto}.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-items:flex-start}.align-center{align-items:center}.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}.stretch{justify-content:stretch;justify-items:stretch}.stretch>*{width:100%}.interact{position:relative;cursor:pointer;transition:transform .3s;-webkit-tap-highlight-color:rgba(0,0,0,0)}.observe-empty-state:empty{display:none}.observe-empty-state:not(:empty)~.empty-state{display:none}.icon{width:1.2rem;height:1.2rem;fill:rgba(var(--text-color), 0.8)}.button__icon{height:1.2rem;width:1.2rem}.button__icon--left{margin-right:.5rem}.button__icon--right{margin-left:.5rem}.icon-button{padding:.6rem;border-radius:.8rem;background-color:var(--accent-color--light);height:-webkit-max-content;height:-moz-max-content;height:max-content}.icon-button .icon{fill:var(--accent-color)}#confirmation_popup{flex-direction:column}#confirmation_popup h4{font-weight:500;margin-bottom:.5rem}#confirmation_popup sm-button{margin:0}#confirmation_popup .flex{padding:0;margin-top:1rem}#confirmation_popup .flex sm-button:first-of-type{margin-right:.6rem;margin-left:auto}button:active,.button:active,.interact:active,.nav-item:active{transform:scale(0.96)}#main_page{padding:1.5rem}#main_page>section:nth-of-type(1){align-content:flex-start}.logo{display:grid;align-items:center;width:100%;grid-template-columns:auto 1fr;gap:0 .3rem;margin-right:1rem}.logo h4{text-transform:capitalize;font-size:.9rem;font-weight:600}.logo .main-logo{height:1.4rem;width:1.4rem;fill:rgba(var(--text-color), 1);stroke:none}details summary{display:flex;justify-content:space-between;-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:pointer}details[open]>summary{margin-bottom:1rem}details[open]>summary .icon{transform:rotate(180deg)}.card{padding:1rem;border-radius:.5rem;background-color:var(--accent-color--light)}.warning{background-color:khaki;color:rgba(0,0,0,.7);padding:1rem;border-radius:.5rem;line-height:1.5}.page-layout{display:grid;grid-template-columns:1.5rem minmax(0, 1fr) 1.5rem}.page-layout>*{grid-column:2/3}.page{height:100%}#landing{grid-template-rows:auto 1fr}#landing header{padding:1.5rem 0}#landing>.grid{align-content:flex-start;text-align:center;gap:1rem}#sign_in,#sign_up{grid-template-rows:auto 1fr;align-items:center}#sign_in section,#sign_up section{margin-top:-6rem;justify-self:center;width:min(24rem,100%)}#sign_in sm-form,#sign_up sm-form{margin:2rem 0}#sign_in header,#sign_up header{padding:1.5rem 0}#sign_up sm-copy{font-size:.9rem;--button-border-radius: 0.5rem}#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}#loading{place-content:center;text-align:center}#loading sm-spinner{margin-bottom:1.5rem}#home{height:100%;display:grid;grid-template-rows:auto 1fr auto;grid-template-columns:minmax(0, 1fr);grid-template-areas:"main-header" "subpages" "main-nav"}#main_nav{grid-area:main-nav;position:relative;display:flex}.nav-item{position:relative;display:flex;align-items:center;padding:.8rem;border-radius:.5rem;color:inherit;transition:transform 1s;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.nav-item--active .icon{fill:var(--accent-color)}.nav-item--active .nav-item__title{color:var(--accent-color)}.nav-item.has-notification::after{left:0;top:0;margin:.7rem .8rem;content:"";position:absolute;padding:.3rem;border-radius:50%;background-color:var(--danger-color)}#main_header{grid-area:main-header;padding:1.5rem;display:grid;gap:1rem;align-items:center;grid-template-columns:1fr auto auto}#subpage_container{grid-area:subpages;overflow-y:auto}#dashboard{display:grid;gap:1.5rem;padding:0 1.5rem}#quick_actions_container{display:flex;flex-wrap:wrap;gap:1.5rem;margin:2rem 0}.quick-action{color:inherit;display:flex;flex-direction:column;align-items:center}.quick-action.disabled{pointer-events:none;opacity:.6;filter:grayscale(100%)}.quick-action__icon{padding:1rem;border-radius:1rem;background-color:var(--accent-color--light);margin-bottom:.8rem}.quick-action__icon .icon{height:1.5rem;width:1.5rem;fill:var(--accent-color)}.quick-action__title{font-size:.8rem;font-weight:500}.empty-state{padding:0 1.5rem;margin:3rem 0;justify-items:center;text-align:center}.empty-state .empty-state__icon{filter:drop-shadow(0 0.5rem 0.3rem rgba(0, 0, 0, 0.1));height:12rem;width:12rem;padding:3rem;border-radius:50%;margin-bottom:1.5rem;background-color:rgba(var(--text-color), 0.06)}strip-select{--gap: 0;background-color:rgba(var(--text-color), 0.06);border-radius:.3rem}strip-option{text-transform:uppercase;font-weight:500;letter-spacing:.05em;font-size:.7rem;--border-radius: 0;--active-option-color: rgba(var(--background-color), 1);--active-option-background-color: var(--accent-color)}strip-option:first-of-type{--border-radius: 0.3rem 0 0 0.3rem}strip-option:last-of-type{--border-radius: 0 0.3rem 0.3rem 0}.activity-card{display:grid;padding:1rem 0;gap:.4rem 1rem;border-radius:.5rem;align-items:flex-start;color:inherit;grid-template-columns:auto minmax(0, 1fr) auto}.activity-card__icon{display:flex;align-content:center;justify-content:center;padding:.5rem;border-radius:.8rem;background-color:var(--accent-color--light)}.activity-card__icon .icon{height:1.3rem;width:1.3rem;fill:var(--accent-color)}.activity-card__title{font-size:.95rem;font-weight:500}.activity-card__title::first-letter{text-transform:uppercase}.activity-card__time{font-size:.8rem;color:rgba(var(--text-color), 0.8)}#notifications,#history{padding-bottom:5rem}#notifications .activity-card,#history .activity-card{padding:1rem 1.5rem}#user_accounts:not(:empty){margin-top:1.5rem;grid-template-columns:repeat(auto-fill, minmax(12rem, 1fr));gap:.5rem;padding-bottom:5rem}.activity-card--account{-webkit-user-select:none;-moz-user-select:none;user-select:none;gap:1.5rem;padding:1rem 1.5rem;align-items:center;border:solid thin rgba(var(--text-color), 0.2)}.activity-card--account .activity-card__icon{padding:0;background-color:rgba(0,0,0,0)}.activity-card--account .activity-card__type{text-transform:capitalize;font-size:.9rem;color:rgba(var(--text-color), 0.8);font-weight:500}.activity-card--account .activity-card__amount{margin-top:.3rem;font-size:1.1rem}.activity-card--account .activity-card__interest{font-size:.8rem}.activity-card--request,.activity-card--pending{grid-template-areas:"icon . amount" "icon time ."}.activity-card--request .activity-card__icon,.activity-card--pending .activity-card__icon{grid-area:icon}.activity-card--request .activity-card__time,.activity-card--pending .activity-card__time{grid-area:time}.activity-card--request .activity-card__amount,.activity-card--pending .activity-card__amount{grid-area:amount;text-align:end}.activity-card--request sm-spinner,.activity-card--pending sm-spinner{--height: 1rem;--width: 1rem}.activity-card--admin{align-items:center;grid-template-areas:"icon . button" "icon time button"}.activity-card--admin .activity-card__icon{grid-area:icon}.activity-card--admin .activity-card__time{grid-area:time}.activity-card--admin .activity-card__action{grid-area:button;font-weight:700;text-transform:uppercase;letter-spacing:.05em;background-color:var(--accent-color--light);color:var(--accent-color);justify-content:flex-end;align-items:center}.activity-card--admin sm-spinner{--height: 1rem;--width: 1rem}#pending_transaction:not(:empty){margin-bottom:2rem}.activity-card--pending:not(:empty){padding:1rem;margin-top:.8rem;border:solid .1rem var(--accent-color)}.activity-card--pending:not(:empty) .activity-card__description{font-size:.8rem;color:rgba(var(--text-color), 0.8);grid-column:span 2}.status-tag:not(:empty){text-transform:uppercase;letter-spacing:.05em;font-size:.7rem;border-radius:.2rem;padding:.3rem .4rem;font-weight:500;color:rgba(0,0,0,.7)}.status-tag:not(:empty) .icon{margin-right:.3rem}.status-tag:not(:empty).active{color:var(--green);background-color:rgba(0,230,118,.1)}.status-tag:not(:empty).closed{color:rgba(var(--text-color), 0.7);background-color:rgba(var(--text-color), 0.06)}.status-tag:not(:empty).success{color:var(--green);background-color:rgba(0,230,118,.1)}.status-tag:not(:empty).success .icon{fill:var(--green)}.status-tag:not(:empty).failed{color:var(--danger-color);background-color:rgba(255,75,75,.1)}.status-tag:not(:empty).failed .icon{fill:var(--danger-color)}.status-tag:not(:empty).pending{color:var(--yellow);background-color:rgba(255,252,75,.1)}.status-tag:not(:empty).pending .icon{fill:var(--yellow)}.activity-card--response{grid-template-areas:"icon . time" "icon description description"}.activity-card--response .activity-card__icon{grid-area:icon}.activity-card--response .activity-card__description{grid-area:description;font-size:.8rem;color:rgba(var(--text-color), 0.8)}.activity-card--response .activity-card__time{grid-area:time}.success .icon{fill:var(--green)}.failed .icon{fill:var(--danger-color)}.pending .icon{fill:var(--yellow)}#user_section{display:grid;align-content:flex-start;gap:2rem;overflow-y:auto;padding:1.5rem;grid-template-columns:minmax(0, 1fr)}#user_section h4{height:1.8rem;margin-bottom:1rem}#user_section__header{position:-webkit-sticky;position:sticky;top:0;background-color:inherit;padding-top:1.5rem;z-index:2}#refresh_balance_button.loading{padding:.5rem;pointer-events:none;background-color:rgba(0,0,0,0)}#refresh_balance_button sm-spinner{--height: 1rem;--width: 1rem}#account_chart_container{display:flex;flex-direction:column;align-items:center;height:15rem;padding-bottom:3rem;margin:1.5rem 0}#chart_legend{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;margin-bottom:1rem}.legend{display:flex;align-items:center;font-size:.8rem;margin-right:1rem;margin-bottom:1rem}.legend::before{content:"";margin-right:.5rem;width:1rem;height:1rem;border-radius:25%}.legend:nth-of-type(1)::before{background-color:var(--green)}.legend:nth-of-type(2)::before{background-color:var(--loan-color)}.balance-card{display:grid;grid-template-columns:auto 1fr;grid-template-areas:"icon ." "icon .";padding:1rem 0;align-items:center;gap:.3rem 1rem;border-radius:.5rem}.balance-card__icon{grid-area:icon;display:flex;align-content:center;justify-content:center;padding:.5rem;border-radius:.8rem;background-color:var(--accent-color--light)}.balance-card__icon .icon{height:1.3rem;width:1.3rem;fill:var(--accent-color)}.balance-card__token{font-size:.8rem}.balance-card__amount{font-size:1rem;font-weight:700}.page__header button{padding:.5rem 0}#transaction,#account{grid-template-rows:auto 1fr;gap:1rem 0;padding:1.5rem 0;align-content:flex-start}#transaction section,#account_details{display:grid;gap:2rem;grid-template-rows:auto 1fr}.positive{color:var(--green)}#transaction_top,#account_top{display:flex;flex-direction:column;justify-items:flex-start;position:relative}#transaction_detail__icon,#account_detail__icon{display:flex;background-color:var(--accent-color);border-radius:40%;padding:.8rem;justify-self:flex-start;align-self:flex-start}#transaction_detail__icon .icon,#account_detail__icon .icon{height:1.5rem;width:1.5rem;fill:rgba(var(--background-color), 1)}#transaction_detail__amount,#account_detail__amount{display:flex;font-size:1.5rem;font-weight:700}#account_detail__type{color:rgba(var(--text-color), 0.8);font-weight:500}#account_detail__interest_type{font-size:.9rem}#account_detail__interest{font-size:1rem;margin-left:.4rem;font-weight:500}#transaction__cta{justify-self:flex-start;margin-top:2rem}#account_process{display:grid;align-content:flex-start;gap:2rem}#account_process__steps,#transaction__steps{display:grid;gap:1.5rem}.account-step{opacity:0;grid-template-columns:auto minmax(0, 1fr);gap:.3rem .8rem;-webkit-animation:slide-down .3s forwards;animation:slide-down .3s forwards}.account-step:nth-of-type(2){-webkit-animation-delay:.1s;animation-delay:.1s}.account-step:nth-of-type(3){-webkit-animation-delay:.2s;animation-delay:.2s}.account-step:nth-of-type(4){-webkit-animation-delay:.3s;animation-delay:.3s}.account-step sm-spinner{--height: 1rem;--width: 1rem}.account-step:not(:last-of-type) .step__line{position:relative;height:100%;width:.1rem;margin:.5rem 0 1rem 0;justify-self:center;background-color:var(--green)}.account-step .icon{height:1.5rem;width:1.5rem}.account-step:not(.loading) .step__title{font-weight:500;font-size:.9rem;padding:.2rem 0}.account-step .step__description{font-size:.8rem}.account-step.row-3:not(:last-of-type) .step__line{grid-row:span 2}.account-step.row-3 .button{grid-column:2/3}.account-step .button{justify-self:flex-start}@-webkit-keyframes slide-down{from{opacity:0;transform:translateY(-1rem)}to{opacity:1;transform:none}}@keyframes slide-down{from{opacity:0;transform:translateY(-1rem)}to{opacity:1;transform:none}}#deposit,#loan{padding:1.5rem 0;grid-template-rows:auto 1fr}#deposit sm-form,#loan sm-form{justify-self:center;margin-top:3rem;width:min(24rem,100%)}#deposit sm-form::part(form),#loan sm-form::part(form){display:flex;flex-direction:column}#deposit__icon .icon,#loan__icon .icon{height:1.8rem;width:1.8rem;fill:var(--accent-color)}.est-interest h3{margin-top:.2rem;color:rgba(var(--text-color), 0.8);font-size:1.3rem}.est-interest h3::after{font-weight:500;content:"% p.a";font-size:1rem}#get_deposit_amount,#get_loan_amount{--font-size: 1.5rem;margin-top:1rem}.loader-button-wrapper{display:flex;position:relative;justify-content:center;align-items:center}.loader-button-wrapper sm-button,.loader-button-wrapper slide-button{width:100%;z-index:1;transition:-webkit-clip-path .3s;transition:clip-path .3s;transition:clip-path .3s, -webkit-clip-path .3s;-webkit-clip-path:circle(100%);clip-path:circle(100%)}.loader-button-wrapper sm-button.clip,.loader-button-wrapper slide-button.clip{pointer-events:none;-webkit-clip-path:circle(0);clip-path:circle(0)}.loader-button-wrapper sm-spinner{position:absolute}#result{place-content:center}#result section{text-align:center;align-items:center}#result__icon{position:relative;display:flex;border-radius:50%;padding:1rem;margin:-5rem 0 1.5rem 0;-webkit-animation:pop-in 1s forwards cubic-bezier(0.175, 0.885, 0.32, 1.275);animation:pop-in 1s forwards cubic-bezier(0.175, 0.885, 0.32, 1.275)}#result__icon.pending{background-color:rgba(255,252,75,.1)}#result__icon.failed{background-color:rgba(255,75,75,.1)}#result__icon .icon{height:1.8rem;width:1.8rem}#result__description{margin:.5rem 0}#result__back_button{margin-top:3rem}@-webkit-keyframes pop-in{0%{opacity:0;transform:scale(0.4) translateY(6rem)}40%{opacity:1;transform:scale(0.4) translateY(0)}100%{transform:none}}@keyframes pop-in{0%{opacity:0;transform:scale(0.4) translateY(6rem)}40%{opacity:1;transform:scale(0.4) translateY(0)}100%{transform:none}}#settings{padding:0 1.5rem}#settings sm-copy{font-size:.9rem;margin:.3rem 0 1.5rem 0}#sign_out_button{color:rgba(var(--background-color), 1);--padding: 0.8rem 1.6rem;--background: var(--danger-color)}#admin{display:grid;padding:0 1.5rem;grid-template-columns:minmax(0, 1fr)}#admin_requests_container{margin-top:1rem;padding-bottom:3rem}@media screen and (max-width: 640px){sm-button{--padding: 0.9rem 1.6rem}#dashboard{padding:0 1.5rem}#main_nav{background-color:rgba(var(--foreground-color), 1);border-top:thin solid rgba(var(--text-color), 0.1)}.nav-item{flex:1;flex-direction:column}.nav-item__title{display:flex;font-size:.8rem;font-weight:500;color:rgba(var(--text-color), 0.8);margin-top:.3rem}#transaction_action_button,#account_action_button,.loader-button-wrapper{margin-top:auto}#transaction_top,#account_top{margin-top:1rem}#user_section{left:0}#admin__header{position:relative;display:grid;gap:1rem;grid-template-columns:minmax(0, 1fr);text-align:center;justify-items:center}#account_process,#transaction__steps{border-top:solid rgba(var(--text-color), 0.2) thin;padding-top:1.5rem}.account-step .button{margin-top:.5rem}.activity-card--account .grid{text-align:right}}@media screen and (min-width: 640px){.h1{font-size:2rem}.h2{font-size:1.8rem}.h3{font-size:1.3rem}.h4{font-size:1rem}#confirmation_popup{--width: 24rem}.page-layout{grid-template-columns:1fr 90vw 1fr}#home{background-color:rgba(var(--foreground-color), 1);grid-template-rows:auto 1fr;grid-template-columns:auto minmax(0, 1fr);grid-template-areas:"main-header main-header user-section" "main-nav subpages user-section"}#main_nav{flex-direction:column;padding:0 1rem}#main_nav::after{position:absolute;right:0;content:"";width:1px;background-color:rgba(var(--text-color), 0.2);height:80%}.nav-item--active{background-color:var(--accent-color--light)}.nav-item:not(:last-of-type){margin-bottom:.5rem}.nav-item:last-of-type{margin-top:auto;margin-bottom:1.5rem}.nav-item__title{display:none}#user_section{grid-area:user-section;background-color:rgba(var(--background-color), 1);width:min(24rem,100%)}#transaction_top,#account_top,#account_process,#transaction__steps{overflow:hidden;padding:1.8rem;border-radius:.5rem;background-color:rgba(var(--foreground-color), 1);box-shadow:0 0 .1rem rgba(0,0,0,.1),0 1rem 1.5rem -0.8rem rgba(0,0,0,.1);align-self:flex-start}#transaction_detail__icon{justify-self:flex-start}#admin__header{display:flex;justify-content:space-between;align-items:center}.account-step.row-3{grid-template-areas:". . b-link" ". . b-link";grid-template-columns:auto minmax(0, 1fr) auto}.account-step.row-3 .step__line{grid-column:1/2}.account-step.row-3 .button{grid-area:b-link;align-self:flex-start}#user_accounts:not(:empty){gap:1rem}.activity-card--account{grid-template-columns:minmax(0, 1fr);text-align:left;justify-content:flex-start}.activity-card--account .activity-card__icon{justify-content:flex-start}}@media screen and (max-width: 1024px){#user_section{position:fixed;background-color:rgba(var(--background-color), 1);transition:transform .3s;z-index:2;right:0;top:0;bottom:0;padding-top:0}#user_section.reveal{box-shadow:-0.5rem 0 1.5rem rgba(0,0,0,.1)}#user_section:not(.reveal){transform:translateX(100%)}}@media screen and (min-width: 1024px){.page-layout{grid-template-columns:1fr 80vw 1fr}.card{padding:1.5rem}#home{grid-template-columns:14rem minmax(0, 1fr) 24rem}.nav-item__title{display:flex;font-size:.9rem;font-weight:500;color:rgba(var(--text-color), 0.8);margin-left:.5rem}#transaction section,#account_details{grid-template-columns:18rem minmax(0, 1fr)}.hide-on-desktop{display:none}.activity-card--pending:not(:empty){padding:1.5rem}}@media screen and (min-width: 1920px){.page-layout{grid-template-columns:1fr 70vw 1fr}}@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)}.nav-item,.interact{transition:background-color .3s,transform .3s}.nav-item:hover,.interact:hover{background-color:var(--accent-color--light)}}
\ 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%;scroll-behavior:smooth}body{--accent-color: #2672ff;--accent-color--light: rgba(38, 114, 255, 0.06);--text-color: 20, 20, 20;--foreground-color: 252, 253, 255;--background-color: 241, 243, 248;--danger-color: rgb(255, 75, 75);--green: #1cad59;--yellow: rgb(220, 165, 0);--loan-color: rgb(255, 171, 93);scrollbar-width:thin;color:rgba(var(--text-color), 1);background:rgba(var(--background-color), 1)}body[data-theme=dark]{--accent-color: rgb(170, 190, 255);--accent-color--light: rgba(231, 239, 255, 0.06);--text-color: 200, 200, 200;--foreground-color: 27, 28, 29;--background-color: 21, 22, 22;--danger-color: rgb(255, 106, 106);--green: #00e676;--yellow: rgb(255, 213, 5);--loan-color: rgb(255, 232, 170)}p,strong{font-size:.9rem;max-width:70ch;line-height:1.7;color:rgba(var(--text-color), 0.8)}p:not(:last-of-type),strong:not(:last-of-type){margin-bottom:1.5rem}a:where([class]){color:inherit;text-decoration:none}a:where([class]):focus-visible{box-shadow:0 0 0 .1rem rgba(var(--text-color), 1) inset}a{color:var(--accent-color)}button,.button{-webkit-user-select:none;-moz-user-select:none;user-select:none;position:relative;display:inline-flex;border:none;background-color:rgba(0,0,0,0);overflow:hidden;color:inherit;-webkit-tap-highlight-color:rgba(0,0,0,0);align-items:center;font-size:.9rem;font-weight:500;white-space:nowrap;padding:.8rem;border-radius:.3rem;justify-content:center}button:focus-visible,.button:focus-visible{outline:var(--accent-color) solid medium}button:not(:disabled),.button:not(:disabled){cursor:pointer}.button{background-color:rgba(var(--text-color), 0.02);border:solid thin rgba(var(--text-color), 0.06)}.button--primary{color:rgba(var(--background-color), 1);background-color:var(--accent-color)}.button--primary .icon{fill:rgba(var(--background-color), 1)}.button--colored{color:var(--accent-color)}.button--colored .icon{fill:var(--accent-color)}.button--danger{background-color:rgba(255,115,115,.062745098);color:var(--danger-color)}.button--danger .icon{fill:var(--danger-color)}.button--small{padding:.4rem .6rem}.button--outlined{border:solid rgba(var(--text-color), 0.3) .1rem;background-color:rgba(var(--foreground-color), 1)}.button--transparent{background-color:rgba(0,0,0,0)}button:disabled{opacity:.4;cursor:not-allowed;filter:saturate(0)}.cta{text-transform:uppercase;font-size:.8rem;font-weight:700;letter-spacing:.05em;padding:.8rem 1rem}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}ul{list-style:none}.flex{display:flex}.grid{display:grid}.hide{opacity:0;pointer-events:none}.hidden{display:none !important}.overflow-ellipsis{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.breakable{overflow-wrap:break-word;word-wrap:break-word;-ms-word-break:break-all;word-break:break-word;-webkit-hyphens:auto;hyphens:auto}.full-bleed{grid-column:1/4}.h1{font-size:1.5rem}.h2{font-size:1.2rem}.h3{font-size:1rem}.h4{font-size:.9rem}.h5{font-size:.8rem}.uppercase{text-transform:uppercase}.capitalize{text-transform:capitalize}.flex{display:flex}.grid{display:grid}.grid-3{grid-template-columns:1fr auto auto}.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-items:flex-start}.align-center{align-items:center}.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}.stretch{justify-content:stretch;justify-items:stretch}.stretch>*{width:100%}.interact{position:relative;cursor:pointer;transition:transform .3s;-webkit-tap-highlight-color:rgba(0,0,0,0)}.observe-empty-state:empty{display:none}.observe-empty-state:not(:empty)~.empty-state{display:none}.icon{width:1.2rem;height:1.2rem;fill:rgba(var(--text-color), 0.8)}.button__icon{height:1.2rem;width:1.2rem}.button__icon--left{margin-right:.5rem}.button__icon--right{margin-left:.5rem}.icon-button{padding:.6rem;border-radius:.8rem;background-color:var(--accent-color--light);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-size:1.2rem;margin-bottom:1rem}#confirmation_popup .flex,#prompt_popup .flex{margin-top:1rem}.popup__header{position:relative;display:grid;gap:.5rem;width:100%;padding:0 1.5rem;align-items:center}.popup__header>*{grid-row:1}.popup__header h3,.popup__header h4{grid-column:1/-1;justify-self:center;align-self:center}.popup__header__close{grid-column:1;margin-left:-1rem;justify-self:flex-start}button:active,.button:active,.interact:active,.nav-item:active{transform:scale(0.96)}#main_page{padding:1.5rem}#main_page>section:nth-of-type(1){align-content:flex-start}.logo{display:grid;align-items:center;width:100%;grid-template-columns:auto 1fr;gap:0 .3rem;margin-right:1rem}.logo h4{text-transform:capitalize;font-size:.9rem;font-weight:600}.logo .main-logo{height:1.4rem;width:1.4rem;fill:rgba(var(--text-color), 1);stroke:none}details summary{display:flex;justify-content:space-between;-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:pointer}details[open]>summary{margin-bottom:1rem}details[open]>summary .icon{transform:rotate(180deg)}.card{padding:1rem;border-radius:.5rem;background-color:var(--accent-color--light)}.warning{background-color:khaki;color:rgba(0,0,0,.7);padding:1rem;border-radius:.5rem;line-height:1.5}.page-layout{display:grid;grid-template-columns:1.5rem minmax(0, 1fr) 1.5rem}.page-layout>*{grid-column:2/3}.page{height:100%}#landing{grid-template-rows:auto 1fr}#landing header{padding:1.5rem 0}#landing>.grid{align-content:flex-start;text-align:center;gap:1rem}#sign_in,#sign_up{grid-template-rows:auto 1fr;align-items:center}#sign_in section,#sign_up section{margin-top:-6rem;justify-self:center;width:min(24rem,100%)}#sign_in sm-form,#sign_up sm-form{margin:2rem 0}#sign_in header,#sign_up header{padding:1.5rem 0}#sign_up sm-copy{font-size:.9rem;--button-border-radius: 0.5rem}#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}#loading{place-content:center;text-align:center}#loading sm-spinner{justify-self:center;margin-bottom:1.5rem}#home{height:100%;display:grid;grid-template-rows:auto 1fr auto;grid-template-columns:minmax(0, 1fr);grid-template-areas:"main-header" "subpages" "main-nav"}#main_nav{grid-area:main-nav;position:relative;display:flex}.nav-item{position:relative;display:flex;align-items:center;padding:.8rem;border-radius:.5rem;color:inherit;transition:transform 1s;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.nav-item--active .icon{fill:var(--accent-color)}.nav-item--active .nav-item__title{color:var(--accent-color)}.nav-item.has-notification::after{left:0;top:0;margin:.7rem .8rem;content:"";position:absolute;padding:.3rem;border-radius:50%;background-color:var(--danger-color)}#main_header{grid-area:main-header;padding:1.5rem;display:grid;gap:1rem;align-items:center;grid-template-columns:1fr auto}#user_profile_button{gap:.5rem;background-color:rgba(var(--text-color), 0.06);border-radius:2rem;font-size:.8rem;padding:.6rem .8rem}#subpage_container{grid-area:subpages;overflow-y:auto}#dashboard{display:grid;gap:1.5rem;padding:0 1.5rem}#quick_actions_container{display:flex;flex-wrap:wrap;gap:1.5rem;margin:2rem 0}.quick-action{color:inherit;display:flex;flex-direction:column;align-items:center}.quick-action.disabled{pointer-events:none;opacity:.6;filter:grayscale(100%)}.quick-action__icon{padding:1rem;border-radius:1rem;background-color:var(--accent-color--light);margin-bottom:.8rem}.quick-action__icon .icon{height:1.5rem;width:1.5rem;fill:var(--accent-color)}.quick-action__title{font-size:.8rem;font-weight:500}.empty-state{padding:0 1.5rem;margin:3rem 0;justify-items:center;text-align:center}.empty-state .empty-state__icon{filter:drop-shadow(0 0.5rem 0.3rem rgba(0, 0, 0, 0.1));height:12rem;width:12rem;padding:3rem;border-radius:50%;margin-bottom:1.5rem;background-color:rgba(var(--text-color), 0.06)}sm-chips{--gap: 0;background-color:rgba(var(--text-color), 0.06);border-radius:.3rem}sm-chip{text-transform:uppercase;font-weight:500;letter-spacing:.05em;font-size:.7rem;--border-radius: 0;--active-option-color: rgba(var(--background-color), 1);--active-option-background-color: var(--accent-color)}sm-chip[selected]{color:rgba(var(--background-color), 1);--background: var(--accent-color)}sm-chip:first-of-type{--border-radius: 0.3rem 0 0 0.3rem}sm-chip:last-of-type{--border-radius: 0 0.3rem 0.3rem 0}.activity-card{display:grid;padding:1rem 0;gap:.4rem 1rem;border-radius:.5rem;align-items:flex-start;color:inherit;grid-template-columns:auto minmax(0, 1fr) auto}.activity-card__icon{display:flex;align-content:center;justify-content:center;padding:.5rem;border-radius:.8rem;background-color:var(--accent-color--light)}.activity-card__icon .icon{height:1.3rem;width:1.3rem;fill:var(--accent-color)}.activity-card__title{font-size:.95rem;font-weight:500}.activity-card__title::first-letter{text-transform:uppercase}.activity-card__time{font-size:.8rem;color:rgba(var(--text-color), 0.8)}#notifications,#history{padding-bottom:5rem}#notifications .activity-card,#history .activity-card{padding:1rem 1.5rem}#user_accounts:not(:empty){margin-top:1.5rem;grid-template-columns:repeat(auto-fill, minmax(12rem, 1fr));gap:.5rem;padding-bottom:5rem}.activity-card--account{-webkit-user-select:none;-moz-user-select:none;user-select:none;gap:1.5rem;padding:1rem 1.5rem;align-items:center;border:solid thin rgba(var(--text-color), 0.2)}.activity-card--account .activity-card__icon{padding:0;background-color:rgba(0,0,0,0)}.activity-card--account .activity-card__type{text-transform:capitalize;font-size:.9rem;color:rgba(var(--text-color), 0.8);font-weight:500}.activity-card--account .activity-card__amount{margin-top:.3rem;font-size:1.1rem}.activity-card--account .activity-card__interest{font-size:.8rem}.activity-card--request,.activity-card--pending{grid-template-areas:"icon . amount" "icon time ."}.activity-card--request .activity-card__icon,.activity-card--pending .activity-card__icon{grid-area:icon}.activity-card--request .activity-card__time,.activity-card--pending .activity-card__time{grid-area:time}.activity-card--request .activity-card__amount,.activity-card--pending .activity-card__amount{grid-area:amount;text-align:end}.activity-card--request sm-spinner,.activity-card--pending sm-spinner{--height: 1rem;--width: 1rem}.activity-card--admin{align-items:center;grid-template-areas:"icon . button" "icon time button"}.activity-card--admin .activity-card__icon{grid-area:icon}.activity-card--admin .activity-card__time{grid-area:time}.activity-card--admin .activity-card__action{grid-area:button;font-weight:700;text-transform:uppercase;letter-spacing:.05em;background-color:var(--accent-color--light);color:var(--accent-color);justify-content:flex-end;align-items:center}.activity-card--admin sm-spinner{--height: 1rem;--width: 1rem}#pending_transaction:not(:empty){margin-bottom:2rem}.activity-card--pending:not(:empty){padding:1rem;margin-top:.8rem;border:solid .1rem var(--accent-color)}.activity-card--pending:not(:empty) .activity-card__description{font-size:.8rem;color:rgba(var(--text-color), 0.8);grid-column:span 2}.status-tag:not(:empty){text-transform:uppercase;letter-spacing:.05em;font-size:.7rem;border-radius:.2rem;padding:.3rem .4rem;font-weight:500;color:rgba(0,0,0,.7)}.status-tag:not(:empty) .icon{margin-right:.3rem}.status-tag:not(:empty).active{color:var(--green);background-color:rgba(0,230,118,.1)}.status-tag:not(:empty).closed{color:rgba(var(--text-color), 0.7);background-color:rgba(var(--text-color), 0.06)}.status-tag:not(:empty).success{color:var(--green);background-color:rgba(0,230,118,.1)}.status-tag:not(:empty).success .icon{fill:var(--green)}.status-tag:not(:empty).failed{color:var(--danger-color);background-color:rgba(255,75,75,.1)}.status-tag:not(:empty).failed .icon{fill:var(--danger-color)}.status-tag:not(:empty).pending{color:var(--yellow);background-color:rgba(255,252,75,.1)}.status-tag:not(:empty).pending .icon{fill:var(--yellow)}.activity-card--response{grid-template-areas:"icon . time" "icon description description"}.activity-card--response .activity-card__icon{grid-area:icon}.activity-card--response .activity-card__description{grid-area:description;font-size:.8rem;color:rgba(var(--text-color), 0.8)}.activity-card--response .activity-card__time{grid-area:time}.success .icon{fill:var(--green)}.failed .icon{fill:var(--danger-color)}.pending .icon{fill:var(--yellow)}#user_section{display:grid;align-content:flex-start;gap:2rem;overflow-y:auto;padding:1.5rem;grid-template-columns:minmax(0, 1fr)}#user_section h4{height:1.8rem;margin-bottom:1rem}#user_section__header{position:-webkit-sticky;position:sticky;top:0;background-color:inherit;padding-top:1.5rem;z-index:2}#refresh_balance_button.loading{padding:.5rem;pointer-events:none;background-color:rgba(0,0,0,0)}#refresh_balance_button sm-spinner{--height: 1rem;--width: 1rem}#account_chart_container{display:flex;flex-direction:column;align-items:center;height:15rem;padding-bottom:3rem;margin:1.5rem 0}#chart_legend{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;margin-bottom:1rem}.legend{display:flex;align-items:center;font-size:.8rem;margin-right:1rem;margin-bottom:1rem}.legend::before{content:"";margin-right:.5rem;width:1rem;height:1rem;border-radius:25%}.legend:nth-of-type(1)::before{background-color:var(--green)}.legend:nth-of-type(2)::before{background-color:var(--loan-color)}.balance-card{display:grid;grid-template-columns:auto 1fr;grid-template-areas:"icon ." "icon .";padding:1rem 0;align-items:center;gap:.3rem 1rem;border-radius:.5rem}.balance-card__icon{grid-area:icon;display:flex;align-content:center;justify-content:center;padding:.5rem;border-radius:.8rem;background-color:var(--accent-color--light)}.balance-card__icon .icon{height:1.3rem;width:1.3rem;fill:var(--accent-color)}.balance-card__token{font-size:.8rem}.balance-card__amount{font-size:1rem;font-weight:700}.page__header button{padding:.5rem 0}#transaction,#account{grid-template-rows:auto 1fr;gap:1rem 0;padding:1.5rem 0;align-content:flex-start}#transaction section,#account_details{display:grid;gap:2rem;grid-template-rows:auto 1fr}.positive{color:var(--green)}#transaction_top,#account_top{display:flex;flex-direction:column;justify-items:flex-start;position:relative}#transaction_detail__icon,#account_detail__icon{display:flex;background-color:var(--accent-color);border-radius:40%;padding:.8rem;justify-self:flex-start;align-self:flex-start}#transaction_detail__icon .icon,#account_detail__icon .icon{height:1.5rem;width:1.5rem;fill:rgba(var(--background-color), 1)}#transaction_detail__amount,#account_detail__amount{display:flex;font-size:1.5rem;font-weight:700}#account_detail__type{color:rgba(var(--text-color), 0.8);font-weight:500}#account_detail__interest_type{font-size:.9rem}#account_detail__interest{font-size:1rem;margin-left:.4rem;font-weight:500}#transaction__cta{justify-self:flex-start;margin-top:2rem}#account_process{display:grid;align-content:flex-start;gap:2rem}#account_process__steps,#transaction__steps{display:flex;flex-direction:column;gap:1.5rem}.account-step{opacity:0;grid-template-columns:auto minmax(0, 1fr);gap:.3rem .8rem;-webkit-animation:slide-down .3s forwards;animation:slide-down .3s forwards}.account-step:nth-of-type(2){-webkit-animation-delay:.1s;animation-delay:.1s}.account-step:nth-of-type(3){-webkit-animation-delay:.2s;animation-delay:.2s}.account-step:nth-of-type(4){-webkit-animation-delay:.3s;animation-delay:.3s}.account-step sm-spinner{--height: 1rem;--width: 1rem}.account-step:not(:last-of-type) .step__line{position:relative;height:100%;width:.1rem;margin:.5rem 0 1rem 0;justify-self:center;background-color:var(--green)}.account-step .icon{height:1.5rem;width:1.5rem}.account-step:not(.loading) .step__title{font-weight:500;font-size:.9rem;padding:.2rem 0}.account-step .step__description{font-size:.8rem}.account-step.row-3:not(:last-of-type) .step__line{grid-row:span 2}.account-step.row-3 .button{grid-column:2/3}.account-step .button{justify-self:flex-start}@-webkit-keyframes slide-down{from{opacity:0;transform:translateY(-1rem)}to{opacity:1;transform:none}}@keyframes slide-down{from{opacity:0;transform:translateY(-1rem)}to{opacity:1;transform:none}}#deposit,#loan{padding:1.5rem 0;grid-template-rows:auto 1fr}#deposit sm-form,#loan sm-form{justify-self:center;margin-top:3rem;width:min(24rem,100%)}#deposit sm-form::part(form),#loan sm-form::part(form){display:flex;flex-direction:column}#deposit__icon .icon,#loan__icon .icon{height:1.8rem;width:1.8rem;fill:var(--accent-color)}.est-interest h3{margin-top:.2rem;color:rgba(var(--text-color), 0.8);font-size:1.3rem}.est-interest h3::after{font-weight:500;content:"% p.a";font-size:1rem}#get_deposit_amount,#get_loan_amount{--font-size: 1.5rem;margin-top:1rem}.loader-button-wrapper{display:flex;position:relative;justify-content:center;align-items:center}.loader-button-wrapper button[type=submit],.loader-button-wrapper slide-button{width:100%;z-index:1;transition:-webkit-clip-path .3s;transition:clip-path .3s;transition:clip-path .3s, -webkit-clip-path .3s;-webkit-clip-path:circle(100%);clip-path:circle(100%)}.loader-button-wrapper button[type=submit].clip,.loader-button-wrapper slide-button.clip{pointer-events:none;-webkit-clip-path:circle(0);clip-path:circle(0)}.loader-button-wrapper sm-spinner{position:absolute}#result{place-content:center}#result section{text-align:center;align-items:center}#result__icon{position:relative;display:flex;border-radius:50%;padding:1rem;margin:-5rem 0 1.5rem 0;-webkit-animation:pop-in 1s forwards cubic-bezier(0.175, 0.885, 0.32, 1.275);animation:pop-in 1s forwards cubic-bezier(0.175, 0.885, 0.32, 1.275)}#result__icon.pending{background-color:rgba(255,252,75,.1)}#result__icon.failed{background-color:rgba(255,75,75,.1)}#result__icon .icon{height:1.8rem;width:1.8rem}#result__description{margin:.5rem 0}#result__back_button{margin-top:3rem}@-webkit-keyframes pop-in{0%{opacity:0;transform:scale(0.4) translateY(6rem)}40%{opacity:1;transform:scale(0.4) translateY(0)}100%{transform:none}}@keyframes pop-in{0%{opacity:0;transform:scale(0.4) translateY(6rem)}40%{opacity:1;transform:scale(0.4) translateY(0)}100%{transform:none}}#settings{padding:0 1.5rem}#settings sm-copy{font-size:.9rem;margin:.3rem 0 1.5rem 0}#sign_out_button{color:rgba(var(--background-color), 1);--padding: 0.8rem 1.6rem;--background: var(--danger-color)}#admin{display:grid;padding:0 1.5rem;grid-template-columns:minmax(0, 1fr)}#admin_requests_container{margin-top:1rem;padding-bottom:3rem}@media screen and (max-width: 640px){#user_profile_button{grid-area:1/1/2/2}theme-toggle{grid-area:1/2/2/3}#dashboard{padding:0 1.5rem}#main_nav{background-color:rgba(var(--foreground-color), 1);border-top:thin solid rgba(var(--text-color), 0.1)}.nav-item{flex:1;flex-direction:column}.nav-item__title{display:flex;font-size:.8rem;font-weight:500;color:rgba(var(--text-color), 0.8);margin-top:.3rem}#transaction_action_button,#account_action_button,.loader-button-wrapper{margin-top:auto}#transaction_top,#account_top{margin-top:1rem}#user_section{left:0}#admin__header{position:relative;display:grid;gap:1rem;grid-template-columns:minmax(0, 1fr);text-align:center;justify-items:center}#account_process,#transaction__steps{border-top:solid rgba(var(--text-color), 0.2) thin;padding-top:1.5rem}.account-step .button{margin-top:.5rem}.activity-card--account .grid{text-align:right}.hide-on-mobile{display:none}}@media screen and (min-width: 640px){sm-popup{--width: 26rem}.h1{font-size:2rem}.h2{font-size:1.8rem}.h3{font-size:1.3rem}.h4{font-size:1rem}#confirmation_popup{--width: 24rem}.popup__header{padding:1rem 1.5rem 0 1.5rem}.page-layout{grid-template-columns:1fr 90vw 1fr}#home{background-color:rgba(var(--foreground-color), 1);grid-template-rows:auto 1fr;grid-template-columns:auto minmax(0, 1fr);grid-template-areas:"main-header main-header user-section" "main-nav subpages user-section"}#main_nav{flex-direction:column;padding:0 1rem}#main_nav::after{position:absolute;right:0;content:"";width:1px;background-color:rgba(var(--text-color), 0.2);height:80%}.nav-item--active{background-color:var(--accent-color--light)}.nav-item:not(:last-of-type){margin-bottom:.5rem}.nav-item:last-of-type{margin-top:auto;margin-bottom:1.5rem}.nav-item__title{display:none}#main_header{grid-template-columns:1fr auto auto}#user_section{grid-area:user-section;background-color:rgba(var(--background-color), 1);width:min(24rem,100%)}#transaction_top,#account_top,#account_process,#transaction__steps{overflow:hidden;padding:1.8rem;border-radius:.5rem;background-color:rgba(var(--foreground-color), 1);box-shadow:0 0 .1rem rgba(0,0,0,.1),0 1rem 1.5rem -0.8rem rgba(0,0,0,.1);align-self:flex-start}#transaction_detail__icon{justify-self:flex-start}#admin__header{display:flex;justify-content:space-between;align-items:center}.account-step.row-3{grid-template-areas:". . b-link" ". . b-link";grid-template-columns:auto minmax(0, 1fr) auto}.account-step.row-3 .step__line{grid-column:1/2}.account-step.row-3 .button{grid-area:b-link;align-self:flex-start}#user_accounts:not(:empty){gap:1rem}.activity-card--account{grid-template-columns:minmax(0, 1fr);text-align:left;justify-content:flex-start}.activity-card--account .activity-card__icon{justify-content:flex-start}}@media screen and (max-width: 1024px){#user_section{position:fixed;background-color:rgba(var(--background-color), 1);transition:transform .3s;z-index:2;right:0;top:0;bottom:0;padding-top:0}#user_section.reveal{box-shadow:-0.5rem 0 1.5rem rgba(0,0,0,.1)}#user_section:not(.reveal){transform:translateX(100%)}}@media screen and (min-width: 1024px){.page-layout{grid-template-columns:1fr 80vw 1fr}.card{padding:1.5rem}#home{grid-template-columns:14rem minmax(0, 1fr) 24rem}.nav-item__title{display:flex;font-size:.9rem;font-weight:500;color:rgba(var(--text-color), 0.8);margin-left:.5rem}#transaction section,#account_details{grid-template-columns:18rem minmax(0, 1fr)}.hide-on-desktop{display:none}.activity-card--pending:not(:empty){padding:1.5rem}}@media screen and (min-width: 1920px){.page-layout{grid-template-columns:1fr 70vw 1fr}}@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)}.nav-item,.interact{transition:background-color .3s,transform .3s}.nav-item:hover,.interact:hover{background-color:var(--accent-color--light)}}
\ No newline at end of file
diff --git a/css/main.scss b/css/main.scss
index 87f1a02..332782d 100644
--- a/css/main.scss
+++ b/css/main.scss
@@ -16,37 +16,31 @@ body {
}
body {
- &,
- * {
- --accent-color: #2672ff;
- --accent-color--light: rgba(38, 114, 255, 0.06);
- --text-color: 20, 20, 20;
- --foreground-color: 252, 253, 255;
- --background-color: 241, 243, 248;
- --danger-color: rgb(255, 75, 75);
- --green: #1cad59;
- --yellow: rgb(220, 165, 0);
- --loan-color: rgb(255, 171, 93);
- scrollbar-width: thin;
- }
+ --accent-color: #2672ff;
+ --accent-color--light: rgba(38, 114, 255, 0.06);
+ --text-color: 20, 20, 20;
+ --foreground-color: 252, 253, 255;
+ --background-color: 241, 243, 248;
+ --danger-color: rgb(255, 75, 75);
+ --green: #1cad59;
+ --yellow: rgb(220, 165, 0);
+ --loan-color: rgb(255, 171, 93);
+ scrollbar-width: thin;
color: rgba(var(--text-color), 1);
background: rgba(var(--background-color), 1);
}
body[data-theme="dark"] {
- &,
- * {
- --accent-color: rgb(170, 190, 255);
- --accent-color--light: rgba(231, 239, 255, 0.06);
- --text-color: 200, 200, 200;
- --foreground-color: 27, 28, 29;
- --background-color: 21, 22, 22;
- --danger-color: rgb(255, 106, 106);
- --green: #00e676;
- --yellow: rgb(255, 213, 5);
- --loan-color: rgb(255, 232, 170);
- }
+ --accent-color: rgb(170, 190, 255);
+ --accent-color--light: rgba(231, 239, 255, 0.06);
+ --text-color: 200, 200, 200;
+ --foreground-color: 27, 28, 29;
+ --background-color: 21, 22, 22;
+ --danger-color: rgb(255, 106, 106);
+ --green: #00e676;
+ --yellow: rgb(255, 213, 5);
+ --loan-color: rgb(255, 232, 170);
}
p,
@@ -83,45 +77,76 @@ button,
background-color: transparent;
overflow: hidden;
color: inherit;
- cursor: pointer;
- transition: transform 0.3s;
-webkit-tap-highlight-color: transparent;
-}
-.button {
- white-space: nowrap;
- padding: 0.6rem 1rem;
- border-radius: 0.3rem;
+ align-items: center;
+ font-size: 0.9rem;
font-weight: 500;
- font-size: 0.8rem;
- background-color: rgba(var(--text-color), 0.06);
- &--primary {
- background-color: var(--accent-color);
- color: rgba(var(--background-color), 1);
+ white-space: nowrap;
+ padding: 0.8rem;
+ border-radius: 0.3rem;
+ justify-content: center;
+ &:focus-visible {
+ outline: var(--accent-color) solid medium;
+ }
+
+ &:not(:disabled) {
+ cursor: pointer;
}
}
-button:disabled {
- opacity: 0.5;
-}
+.button {
+ background-color: rgba(var(--text-color), 0.02);
+ border: solid thin rgba(var(--text-color), 0.06);
+ &--primary {
+ color: rgba(var(--background-color), 1);
+ background-color: var(--accent-color);
-a:any-link:focus-visible {
- outline: rgba(var(--text-color), 1) 0.1rem solid;
-}
-
-sm-button {
- --border-radius: 0.5rem;
- --padding: 0.7rem 1rem;
- &[variant="primary"] {
.icon {
fill: rgba(var(--background-color), 1);
}
}
-
- &[disabled] {
+ &--colored {
+ color: var(--accent-color);
.icon {
- fill: rgba(var(--text-color), 0.6);
+ fill: var(--accent-color);
}
}
+ &--danger {
+ background-color: #ff737310;
+ color: var(--danger-color);
+ .icon {
+ fill: var(--danger-color);
+ }
+ }
+
+ &--small {
+ padding: 0.4rem 0.6rem;
+ }
+
+ &--outlined {
+ border: solid rgba(var(--text-color), 0.3) 0.1rem;
+ background-color: rgba(var(--foreground-color), 1);
+ }
+ &--transparent {
+ background-color: transparent;
+ }
+}
+button:disabled {
+ opacity: 0.4;
+ cursor: not-allowed;
+ filter: saturate(0);
+}
+
+.cta {
+ text-transform: uppercase;
+ font-size: 0.8rem;
+ font-weight: 700;
+ letter-spacing: 0.05em;
+ padding: 0.8rem 1rem;
+}
+
+a:any-link:focus-visible {
+ outline: rgba(var(--text-color), 1) 0.1rem solid;
}
ul {
@@ -141,7 +166,7 @@ ul {
pointer-events: none;
}
-.hide-completely {
+.hidden {
display: none !important;
}
@@ -335,26 +360,39 @@ ul {
fill: var(--accent-color);
}
}
-#confirmation_popup {
+#confirmation_popup,
+#prompt_popup {
flex-direction: column;
-
h4 {
- font-weight: 500;
- margin-bottom: 0.5rem;
- }
-
- sm-button {
- margin: 0;
+ font-size: 1.2rem;
+ margin-bottom: 1rem;
}
.flex {
- padding: 0;
margin-top: 1rem;
+ }
+}
- sm-button:first-of-type {
- margin-right: 0.6rem;
- margin-left: auto;
- }
+.popup__header {
+ position: relative;
+ display: grid;
+ gap: 0.5rem;
+ width: 100%;
+ padding: 0 1.5rem;
+ align-items: center;
+ & > * {
+ grid-row: 1;
+ }
+ h3,
+ h4 {
+ grid-column: 1/-1;
+ justify-self: center;
+ align-self: center;
+ }
+ &__close {
+ grid-column: 1;
+ margin-left: -1rem;
+ justify-self: flex-start;
}
}
@@ -481,6 +519,7 @@ details {
place-content: center;
text-align: center;
sm-spinner {
+ justify-self: center;
margin-bottom: 1.5rem;
}
}
@@ -534,7 +573,14 @@ details {
display: grid;
gap: 1rem;
align-items: center;
- grid-template-columns: 1fr auto auto;
+ grid-template-columns: 1fr auto;
+}
+#user_profile_button {
+ gap: 0.5rem;
+ background-color: rgba(var(--text-color), 0.06);
+ border-radius: 2rem;
+ font-size: 0.8rem;
+ padding: 0.6rem 0.8rem;
}
#subpage_container {
grid-area: subpages;
@@ -592,12 +638,12 @@ details {
background-color: rgba(var(--text-color), 0.06);
}
}
-strip-select {
+sm-chips {
--gap: 0;
background-color: rgba(var(--text-color), 0.06);
border-radius: 0.3rem;
}
-strip-option {
+sm-chip {
text-transform: uppercase;
font-weight: 500;
letter-spacing: 0.05em;
@@ -605,6 +651,10 @@ strip-option {
--border-radius: 0;
--active-option-color: rgba(var(--background-color), 1);
--active-option-background-color: var(--accent-color);
+ &[selected] {
+ color: rgba(var(--background-color), 1);
+ --background: var(--accent-color);
+ }
&:first-of-type {
--border-radius: 0.3rem 0 0 0.3rem;
}
@@ -982,7 +1032,8 @@ strip-option {
}
#account_process__steps,
#transaction__steps {
- display: grid;
+ display: flex;
+ flex-direction: column;
gap: 1.5rem;
}
.account-step {
@@ -1092,7 +1143,7 @@ strip-option {
position: relative;
justify-content: center;
align-items: center;
- sm-button,
+ button[type="submit"],
slide-button {
width: 100%;
z-index: 1;
@@ -1173,8 +1224,11 @@ strip-option {
padding-bottom: 3rem;
}
@media screen and (max-width: 640px) {
- sm-button {
- --padding: 0.9rem 1.6rem;
+ #user_profile_button {
+ grid-area: 1/1/2/2;
+ }
+ theme-toggle {
+ grid-area: 1/2/2/3;
}
#dashboard {
padding: 0 1.5rem;
@@ -1229,8 +1283,14 @@ strip-option {
text-align: right;
}
}
+ .hide-on-mobile {
+ display: none;
+ }
}
@media screen and (min-width: 640px) {
+ sm-popup {
+ --width: 26rem;
+ }
.h1 {
font-size: 2rem;
}
@@ -1249,6 +1309,9 @@ strip-option {
#confirmation_popup {
--width: 24rem;
}
+ .popup__header {
+ padding: 1rem 1.5rem 0 1.5rem;
+ }
.page-layout {
grid-template-columns: 1fr 90vw 1fr;
}
@@ -1285,7 +1348,9 @@ strip-option {
display: none;
}
}
-
+ #main_header {
+ grid-template-columns: 1fr auto auto;
+ }
#user_section {
grid-area: user-section;
background-color: rgba(var(--background-color), 1);
diff --git a/index.html b/index.html
index d9df846..f22ccba 100644
--- a/index.html
+++ b/index.html
@@ -6,8 +6,6 @@
RanchiMall Bank
-
-
@@ -15,6 +13,8 @@
+
+
-
+
-
-
-
-