create dashboard page

This commit is contained in:
cymon 2023-06-23 08:41:54 +00:00
parent 51dec75baf
commit 9771d7be03
13 changed files with 694 additions and 31 deletions

View File

@ -0,0 +1,3 @@
<svg viewBox="0 0 127.14 96.36" xmlns="http://www.w3.org/2000/svg">
<path fill="currentcolor" d="M107.7,8.07A105.15,105.15,0,0,0,81.47,0a72.06,72.06,0,0,0-3.36,6.83A97.68,97.68,0,0,0,49,6.83,72.37,72.37,0,0,0,45.64,0,105.89,105.89,0,0,0,19.39,8.09C2.79,32.65-1.71,56.6.54,80.21h0A105.73,105.73,0,0,0,32.71,96.36,77.7,77.7,0,0,0,39.6,85.25a68.42,68.42,0,0,1-10.85-5.18c.91-.66,1.8-1.34,2.66-2a75.57,75.57,0,0,0,64.32,0c.87.71,1.76,1.39,2.66,2a68.68,68.68,0,0,1-10.87,5.19,77,77,0,0,0,6.89,11.1A105.25,105.25,0,0,0,126.6,80.22h0C129.24,52.84,122.09,29.11,107.7,8.07ZM42.45,65.69C36.18,65.69,31,60,31,53s5-12.74,11.43-12.74S54,46,53.89,53,48.84,65.69,42.45,65.69Zm42.24,0C78.41,65.69,73.25,60,73.25,53s5-12.74,11.44-12.74S96.23,46,96.12,53,91.08,65.69,84.69,65.69Z"/>
</svg>

After

Width:  |  Height:  |  Size: 773 B

View File

@ -0,0 +1,4 @@
<svg viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg">
<path fill="currentcolor" d="M16.7 39.8C7.2 38.1 0 29.9 0 20 0 9 9 0 20 0s20 9 20 20c0 9.9-7.2 18.1-16.7 19.8l-1.1-.9h-4.4l-1.1.9z"/>
<path fill="#080808" d="m27.8 25.6.9-5.6h-5.3v-3.9c0-1.6.6-2.8 3-2.8H29V8.2c-1.4-.2-3-.4-4.4-.4-4.6 0-7.8 2.8-7.8 7.8V20h-5v5.6h5v14.1c1.1.2 2.2.3 3.3.3 1.1 0 2.2-.1 3.3-.3V25.6h4.4z"/>
</svg>

After

Width:  |  Height:  |  Size: 391 B

View File

@ -0,0 +1,3 @@
<svg viewBox="0 0 98 96" xmlns="http://www.w3.org/2000/svg">
<path fill="currentcolor" fill-rule="evenodd" clip-rule="evenodd" d="M48.854 0C21.839 0 0 22 0 49.217c0 21.756 13.993 40.172 33.405 46.69 2.427.49 3.316-1.059 3.316-2.362 0-1.141-.08-5.052-.08-9.127-13.59 2.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015 4.934.326 7.523 5.052 7.523 5.052 4.367 7.496 11.404 5.378 14.235 4.074.404-3.178 1.699-5.378 3.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283 0-5.378 1.94-9.778 5.014-13.2-.485-1.222-2.184-6.275.486-13.038 0 0 4.125-1.304 13.426 5.052a46.97 46.97 0 0 1 12.214-1.63c4.125 0 8.33.571 12.213 1.63 9.302-6.356 13.427-5.052 13.427-5.052 2.67 6.763.97 11.816.485 13.038 3.155 3.422 5.015 7.822 5.015 13.2 0 18.905-11.404 23.06-22.324 24.283 1.78 1.548 3.316 4.481 3.316 9.126 0 6.6-.08 11.897-.08 13.526 0 1.304.89 2.853 3.316 2.364 19.412-6.52 33.405-24.935 33.405-46.691C97.707 22 75.788 0 48.854 0z"/>
</svg>

After

Width:  |  Height:  |  Size: 969 B

View File

@ -0,0 +1,3 @@
<svg version="1.1" viewBox="0 0 400 400" xmlns="http://www.w3.org/2000/svg">
<path fill="currentcolor" d="M400,200c0,110.5-89.5,200-200,200S0,310.5,0,200S89.5,0,200,0S400,89.5,400,200z M163.4,305.5 c88.7,0,137.2-73.5,137.2-137.2c0-2.1,0-4.2-0.1-6.2c9.4-6.8,17.6-15.3,24.1-25c-8.6,3.8-17.9,6.4-27.7,7.6 c10-6,17.6-15.4,21.2-26.7c-9.3,5.5-19.6,9.5-30.6,11.7c-8.8-9.4-21.3-15.2-35.2-15.2c-26.6,0-48.2,21.6-48.2,48.2 c0,3.8,0.4,7.5,1.3,11c-40.1-2-75.6-21.2-99.4-50.4c-4.1,7.1-6.5,15.4-6.5,24.2c0,16.7,8.5,31.5,21.5,40.1c-7.9-0.2-15.3-2.4-21.8-6 c0,0.2,0,0.4,0,0.6c0,23.4,16.6,42.8,38.7,47.3c-4,1.1-8.3,1.7-12.7,1.7c-3.1,0-6.1-0.3-9.1-0.9c6.1,19.2,23.9,33.1,45,33.5 c-16.5,12.9-37.3,20.6-59.9,20.6c-3.9,0-7.7-0.2-11.5-0.7C110.8,297.5,136.2,305.5,163.4,305.5"/>
</svg>

After

Width:  |  Height:  |  Size: 764 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -1,22 +0,0 @@
<script>
import logo from '/src/assets/lume-logo.png';
</script>
<header>
<img src={logo} alt="Lume"/>
</header>
<style lang="scss">
@import "/src/styles/mixins.scss";
header {
padding: 2.5em;
color: #fff;
background: #080808;
border-bottom: 0.1em solid #363636;
img {
@include fluid-width-height(7.875rem, 2.625rem);
}
}
</style>

View File

@ -5,7 +5,7 @@
import { wordlist } from '@scure/bip39/wordlists/english'; import { wordlist } from '@scure/bip39/wordlists/english';
import '/src/styles/global.scss'; import '/src/styles/global.scss';
import Header from '/src/components/Header.svelte'; import lumeLogo from '/src/assets/lume-logo.png';
let action; let action;
let createAccountStep; let createAccountStep;
@ -206,12 +206,14 @@
// use key here // use key here
window.setTimeout(() => { window.setTimeout(() => {
alert('redirect to dashboard'); window.location.href = '/dashboard.html';
}, 1000); }, 1000);
}; };
</script> </script>
<Header /> <header>
<img src={lumeLogo} alt="Lume"/>
</header>
<main class:sign-in={action === 'sign-in'} class:create-account={action === 'create-account'} class:create-account-step-2={createAccountStep === 2} class:create-account-step-3={createAccountStep === 3} class:create-account-step-4={createAccountStep === 4} class:fade-out={fadeOut}> <main class:sign-in={action === 'sign-in'} class:create-account={action === 'create-account'} class:create-account-step-2={createAccountStep === 2} class:create-account-step-3={createAccountStep === 3} class:create-account-step-4={createAccountStep === 4} class:fade-out={fadeOut}>
<div class="art"> <div class="art">
<div class="gradient-1"></div> <div class="gradient-1"></div>

View File

@ -1,13 +1,643 @@
<script> <script>
import '/src/styles/global.scss'; import '/src/styles/global.scss';
import lumeLogo from '/src/assets/lume-logo.png';
import svgGithub from '/src/assets/icon/github.svg?raw';
import svgDiscord from '/src/assets/icon/discord.svg?raw';
import svgTwitter from '/src/assets/icon/twitter.svg?raw';
import svgFacebook from '/src/assets/icon/facebook.svg?raw';
let step = 1;
let userCount;
setTimeout(() => {
step = 2;
}, 5000);
setTimeout(() => {
step = 3;
userCount = '23k';
}, 6000);
setTimeout(() => {
step = 4;
}, 7000);
</script> </script>
<main> <header>
<img src={lumeLogo} alt="Lume"/>
<div class="status" class:step-2={step === 2} class:step-3={step === 3} class:step-4={step === 4}>
<div class="network">
<div class="connected">
<span class="icon icon-success"></span>
Lume Network
</div>
<div class="connecting">
<span class="icon icon-wait icon-wait-yellow"></span>
Lume Network
</div>
</div>
<div class="user-count" class:user-count-hidden={!userCount}>
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" d="M15 19.128a9.38 9.38 0 002.625.372 9.337 9.337 0 004.121-.952 4.125 4.125 0 00-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 018.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0111.964-3.07M12 6.375a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zm8.25 2.25a2.625 2.625 0 11-5.25 0 2.625 2.625 0 015.25 0z" />
</svg>
{userCount}
</div>
</div>
</header>
<main class:step-2={step === 2} class:step-3={step === 3} class:step-4={step === 4}>
<div class="art-wrapper">
<div class="art-rotate">
<div class="art">
<div class="gradient-1"></div>
<div class="gradient-2"></div>
<div class="gradient-3"></div>
<div class="gradient-4"></div>
</div>
</div>
</div>
<div class="loading-text">
<div class="loading-text-connected">
<h3>Network Ready</h3>
<p>All networks syncd and ready to go.</p>
</div>
</div>
<div class="content">
<h3>All set.</h3>
<div class="content-grid">
<div>
<h4>Blockchain Networks</h4>
<ul>
<li class="success">
<div class="network">
<span class="icon icon-success"></span>
HNS
</div>
<div class="status">
Synced
</div>
</li>
<li class="loading">
<div class="network">
<span class="icon icon-wait"></span>
ENS
</div>
<div class="status">
Syncing
</div>
</li>
<li class="error">
<div class="network">
<span class="icon icon-error"></span>
Arweave
</div>
<div class="status">
Issue
</div>
</li>
</ul>
</div>
<div>
<h4>Content Networks</h4>
<ul>
<li class="success">
<div class="network">
<span class="icon icon-success"></span>
IPFS
</div>
<div class="status">
Connected
<div class="user-count">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" d="M15 19.128a9.38 9.38 0 002.625.372 9.337 9.337 0 004.121-.952 4.125 4.125 0 00-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 018.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0111.964-3.07M12 6.375a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zm8.25 2.25a2.625 2.625 0 11-5.25 0 2.625 2.625 0 015.25 0z" />
</svg>
{userCount}
</div>
</div>
</li>
<li class="loading">
<div class="network">
<span class="icon icon-wait"></span>
Arweave
</div>
<div class="status">
Connecting
<div class="user-count">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" d="M15 19.128a9.38 9.38 0 002.625.372 9.337 9.337 0 004.121-.952 4.125 4.125 0 00-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 018.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0111.964-3.07M12 6.375a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zm8.25 2.25a2.625 2.625 0 11-5.25 0 2.625 2.625 0 015.25 0z" />
</svg>
{userCount}
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
<div class="socials">
<a href="#" title="GitHub" class="github-logo">
{@html svgGithub}
</a>
<a href="#" title="Discord" class="discord-logo">
{@html svgDiscord}
</a>
<a href="#" title="Twitter" class="twitter-logo">
{@html svgTwitter}
</a>
<a href="#" title="Facebook" class="facebook-logo">
{@html svgFacebook}
</a>
</div>
</main> </main>
<style lang="scss"> <style lang="scss">
@import "/src/styles/artwork.scss";
@import "/src/styles/mixins.scss";
@import "/src/styles/vars.scss";
.icon {
display: block;
width: 1.125em;
height: 1.125em;
margin-right: 0.375em;
@include fluid-font-size(1.125rem);
&.icon-success {
mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>');
mask-size: 1.125em 1.125em;
mask-repeat: no-repeat;
mask-position: 50%;
background-color: #68cc58;
}
&.icon-wait {
background-image: url("/src/assets/wait-icon-orange.png");
background-size: 1.125em 1.125em;
background-repeat: no-repeat;
background-position: 50%;
}
&.icon-wait-yellow {
background-image: url("/src/assets/wait-icon-yellow.png");
}
&.icon-error {
mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>');
mask-size: 1.125em 1.125em;
mask-repeat: no-repeat;
mask-position: 50%;
background-color: #cc1b50;
}
}
header {
position: fixed;
top: 0;
right: 0;
left: 0;
display: flex;
justify-content: space-between;
align-items: center;
z-index: 3;
.status {
@include fluid-font-size(1.25rem);
margin: -0.5em 0 -0.5em 1em;
animation: 1000ms fade-in;
> div {
display: flex;
align-items: center;
justify-content: flex-end;
}
.network {
display: grid;
> div {
grid-column-start: 1;
grid-row-start: 1;
display: flex;
align-items: center;
line-height: 1;
white-space: nowrap;
transition: opacity 500ms;
}
.connecting {
color: #edca4f;
z-index: 2;
.icon {
animation: 5000ms rotate-full;
}
}
.connected {
color: #64c555;
z-index: 1;
opacity: 0;
}
}
.user-count {
@include fluid-font-size(1rem);
color: #8e8e8e;
height: 1.5em;
padding-top: 0.3em;
transition: height 500ms, padding-top 500ms;
overflow: hidden;
&.user-count-hidden {
height: 0;
padding: 0;
}
svg {
@include fluid-width-height(1rem, 1rem);
margin-right: 0.3em;
}
}
&.step-3, &.step-4 {
.network {
.connecting {
z-index: 1;
opacity: 0;
}
.connected {
z-index: 2;
opacity: 1;
}
}
}
}
}
main { main {
background: #080808; position: relative;
animation: 1000ms fade-in;
display: flex;
align-items: center;
}
.art-wrapper {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -125%);
transition: left 500ms, transform 500ms;
z-index: -1;
}
.art-rotate {
transform: rotate(-180deg);
animation: 5000ms rotate;
transition: transform 500ms;
}
.art {
position: relative;
@include fluid-width-height(9.0625rem, 9.0625rem);
background-image: $lume-2-base64;
background-size: cover;
background-position: 50%;
transition: width 500ms, height 500ms;
> div {
position: absolute;
inset: 0;
transition: opacity 500ms;
}
.gradient-1 {
background: linear-gradient(272.67deg, #FF005C -27.49%, #0C0C0D 26.91%, #FF005C 49.4%, #ED6A5E 99.62%);
z-index: -1;
}
.gradient-2 {
background: conic-gradient(from 180deg at 50% 50%, #A67833 -15.8deg, #E91F1F 222.32deg, #A67833 344.2deg, #E91F1F 582.32deg);
opacity: 0;
z-index: -2;
}
.gradient-3 {
background: conic-gradient(from -89.79deg at 50% 50%, #33A653 -15.8deg, #080808 222.32deg, #33A653 344.2deg, #080808 582.32deg);
opacity: 0;
z-index: -3;
}
.gradient-4 {
background: conic-gradient(from 180deg at 50% 50%, #2F2F2F -15.8deg, #66D155 222.32deg, #2F2F2F 344.2deg, #66D155 582.32deg);
opacity: 0;
z-index: -4;
}
}
.content {
display: flex;
flex-direction: column;
max-width: 64em;
margin-top: 14em;
margin-bottom: 10em;
@include fluid-position-left(68em, 58em);
color: #fff;
opacity: 0;
transition: opacity 500ms;
h3 {
@include fluid-font-size(3.125rem);
font-family: $font-family-jetbrains-mono;
line-height: 110%;
text-shadow: 0.017em 0.017em 0.034em #000;
}
h4 {
@include fluid-font-size(1.5rem);
line-height: 168%;
text-shadow: 0.017em 0.017em 0.034em #000;
}
li {
@include fluid-font-size(1.25rem);
margin-top: 0.9em;
.network {
display: flex;
align-items: center;
margin-bottom: -0.2em;
}
.status {
@include fluid-font-size(1rem);
display: flex;
}
&.success {
.status {
color: #62c554;
}
}
&.loading {
.status {
color: #fb891f;
}
}
&.error {
.status {
color: #cc1b50;
}
}
.user-count {
@include fluid-font-size(1rem);
color: #8e8e8e;
display: flex;
align-items: center;
svg {
@include fluid-width-height(1rem, 1rem);
margin: 0 0.3em 0 1.2em;
}
}
}
}
.content-grid {
display: grid;
grid-template-columns: repeat(1, 1fr);
gap: 4em;
margin: 4em 0;
@media screen and (min-width: 36rem) {
grid-template-columns: repeat(2, 1fr);
grid-auto-rows: 1fr;
gap: 10em;
margin-top: 3em;
}
@media screen and (max-width: 80rem) {
> div {
background: rgba(#080808, 0.7);
border-radius: 0.5em;
padding: 0.8em 1.5em 1em;
margin: -0.8em -1.5em -1em;
}
}
}
.loading-text {
display: none;
text-align: center;
.loading-text-connected {
position: absolute;
top: 50%;
left: 75%;
transform: translate(-50%, 0);
opacity: 0;
transition: top 500ms, left 500ms, transform 500ms, opacity 500ms;
}
h3 {
@include fluid-font-size(3.125rem);
font-family: $font-family-jetbrains-mono;
line-height: 110%;
text-shadow: 0.017em 0.017em 0.034em #000;
color: #fff;
}
p {
@include fluid-font-size(1.25rem);
margin-top: 0.625em;
line-height: 122%;
color: #808080;
}
}
.socials {
position: absolute;
bottom: 5em;
left: 5em;
display: flex;
align-items: center;
gap: 1.5em;
margin: -0.5em;
opacity: 0;
transition: opacity 500ms;
a {
padding: 0.5em;
color: #fff;
transition: color 250ms;
&:hover {
color: #62c554;
}
}
:global(svg) {
@include fluid-width-height(2rem, 2rem);
}
@media screen and (max-width: 80rem) {
background: rgba(#080808, 0.7);
border-radius: 0.5em;
padding: 1.25em 1.5em;
margin: -1.25em -1.5em;
}
}
main.step-2 {
.art {
.gradient-1 {
opacity: 0;
}
.gradient-2 {
opacity: 1;
}
}
.loading-text {
display: block;
}
}
main.step-3 {
.art {
.gradient-1 {
opacity: 0;
}
.gradient-3 {
opacity: 1;
}
}
.loading-text {
display: block;
.loading-text-connected {
left: 50%;
opacity: 1;
}
}
}
main.step-4 {
.art-wrapper {
top: 50%;
left: -35em;
transform: translate(0, -50%);
}
.art-rotate {
transform: rotate(-151.13deg);
}
.art {
@include fluid-width-height(72rem, 72rem);
.gradient-1 {
opacity: 0;
}
.gradient-4 {
opacity: 1;
}
}
.loading-text {
display: block;
.loading-text-connected {
top: 0;
left: -25%;
transform: translate(-125%, 0);
opacity: 0;
}
}
.content {
opacity: 1;
}
.socials {
opacity: 1;
}
}
@keyframes fade-in {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
@keyframes rotate {
0% {
transform: rotate(127.54deg);
}
20% {
transform: rotate(127.54deg);
}
30% {
transform: rotate(420deg);
}
50% {
transform: rotate(420deg);
}
60% {
transform: rotate(360deg);
}
90% {
transform: rotate(360deg);
}
100% {
transform: rotate(540deg);
}
}
@keyframes rotate-full {
0% {
transform: rotate(-52.46deg);
}
20% {
transform: rotate(-52.46deg);
}
30% {
transform: rotate(240deg);
}
50% {
transform: rotate(240deg);
}
60% {
transform: rotate(180deg);
}
90% {
transform: rotate(180deg);
}
100% {
transform: rotate(360deg);
}
} }
</style> </style>

View File

@ -1,6 +1,6 @@
<script> <script>
import '/src/styles/global.scss'; import '/src/styles/global.scss';
import Header from '/src/components/Header.svelte'; import lumeLogo from '/src/assets/lume-logo.png';
let started = false; let started = false;
let step = 1; let step = 1;
@ -23,7 +23,9 @@
}; };
</script> </script>
<Header/> <header>
<img src={lumeLogo} alt="Lume"/>
</header>
<main class:started={started} class:step-2={step === 2} class:step-3={step === 3} class:step-4={step === 4}> <main class:started={started} class:step-2={step === 2} class:step-3={step === 3} class:step-4={step === 4}>
<div class="art art-1"></div> <div class="art art-1"></div>
<div class="art art-2"></div> <div class="art art-2"></div>

File diff suppressed because one or more lines are too long

View File

@ -57,8 +57,20 @@ body {
@include fluid-font-size(0.625rem); @include fluid-font-size(0.625rem);
} }
header {
padding: 2.5em;
color: #fff;
background: #080808;
border-bottom: 0.1em solid #363636;
img {
@include fluid-width-height(7.875rem, 2.625rem);
}
}
main { main {
flex-grow: 1; flex-grow: 1;
overflow: hidden;
} }
.btn-wrapper { .btn-wrapper {

View File

@ -135,3 +135,27 @@ $max-vw: 476rem; // 336rem, 616rem
} }
} }
} }
@mixin fluid-position-left($offset, $width) {
$min-vw: 48rem;
$max-vw: 96rem;
$min-margin: 5em;
$max-margin: 5em;
& {
margin-left: min(calc($offset + $min-margin), max($min-margin, calc(100vw - $width - $min-margin)));
margin-right: $min-margin;
@media screen and (min-width: $min-vw) {
$margin: calc(#{$min-margin} + #{strip-unit($max-margin - $min-margin)} * ((100vw - #{$min-vw}) / #{strip-unit($max-vw - $min-vw)}));
margin-left: min(calc($offset + $margin), max($margin, calc(100vw - $width - $margin)));
margin-right: $margin;
}
@media screen and (min-width: $max-vw) {
margin-left: min(calc($offset + $max-margin), max($max-margin, calc(100vw - $width - $max-margin)));
margin-right: $max-margin;
}
}
}