Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Header style update #980

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
109 changes: 19 additions & 90 deletions src/components/header/AccountButton.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
<template>
<div>
<button type="button" class="btn--account" :class="screenSize.sm > width && 'm-btn--account'">
<astar-icon-base class="iconbase" stroke="currentColor" icon-name="wallet">
<astar-icon-wallet />
</astar-icon-base>
<img class="icon" width="16" :src="iconWallet" :class="multisig && 'img--polkasafe'" />
<button type="button" class="btn--account">
<img class="icon" width="24" :src="iconWallet" :class="multisig && 'img--polkasafe'" />
<template v-if="width >= screenSize.sm">
<span class="text--address">
<span>
{{ getShortenAddress(account, 4) }}
</span>
</template>
Expand Down Expand Up @@ -48,93 +45,25 @@ export default defineComponent({

.btn--account {
display: flex;
height: 32px;
flex-direction: row;
align-items: center;
padding: 8px 16px 8px 12px;
border-radius: 16px;
transition: all 0.3s ease 0s;
background: transparent;
color: #fff;
border: 1px solid $gray-4;

@media (min-width: $lg) {
border: 1px solid $navy-3;
}

height: 32px;
color: white;
gap: 8px;
font-weight: 600;
font-size: 12px;
border-radius: 20px;
padding: 0;
transition: all 0.2s ease;
border: solid 1px transparent;
margin-right: 8px;
&:hover {
background: $astar-blue !important;
border: 1px solid transparent;
.iconbase {
color: $gray-1;
}
@media (min-width: $lg) {
background: transparent !important;
border: 1px solid $gray-4;
.iconbase {
color: $gray-5;
}
}
}
}

.iconbase {
color: $gray-3;
width: rem(22);
height: rem(22);
transition: all 0.3s ease 0s;
@media (min-width: $lg) {
color: $navy-3;
}
}

.m-btn--account {
background: transparent;
box-shadow: none;
padding: 8px;
transition: all 0.3s ease 0s;
color: $gray-3;
border: 1px solid $gray-4;
@media (min-width: $lg) {
border: 1px solid $navy-3;
}
}

.icon {
margin: 0 6px;
}

.text--address {
font-weight: 400;
font-size: 14px;
color: $gray-1;
@media (min-width: $lg) {
color: $navy-1;
}
}

.body--dark {
.btn--account {
border: 1px solid $gray-4;
&:hover {
background: $astar-blue !important;
border: 1px solid transparent;
.iconbase {
color: $gray-1;
}
}
}

.iconbase {
color: $gray-3;
color: $astar-blue-dark;
border-color: $astar-blue-dark;
}

.m-btn--account {
border: 1px solid $gray-4;
}

.text--address {
color: $gray-1;
@media (min-width: $sm) {
height: 40px;
padding: 0 16px 0 12px;
margin-right: 0;
}
}
</style>
123 changes: 19 additions & 104 deletions src/components/header/ConnectButton.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
<template>
<button type="button" :class="width >= screenSize.sm ? 'btn--connect' : 'm-btn--connect'">
<button type="button" class="btn--connect">
<astar-icon-base class="iconbase" stroke="currentColor">
<slot />
</astar-icon-base>
<template v-if="width >= screenSize.sm">
<span class="text--connect">
{{ $t('connect') }}
</span>
</template>
</button>
</template>

Expand All @@ -32,113 +27,33 @@ export default defineComponent({
@import 'src/css/utils.scss';

.btn--connect {
display: flex;
height: 32px;
color: $navy-1;
flex-direction: row;
align-items: center;
padding: 8px 16px 8px 16px;
background: transparent;
border-radius: 16px;
margin-left: 8px;
transition: all 0.3s ease 0s;
border: 1px solid $gray-4;

@media (min-width: $lg) {
border: 1px solid $navy-3;
}

@media (min-width: $sm) {
margin-left: 16px;
}
}
.btn--connect:hover {
background: $astar-blue !important;
border: 1px solid transparent;
.iconbase {
color: $gray-1;
}
@media (min-width: $lg) {
background: transparent !important;
border: 1px solid $gray-4;
.iconbase {
color: $gray-5;
}
}
}

.m-btn--connect {
padding-left: 10px;
color: white;
width: 32px;
height: 32px;
background: transparent;
border: 1px solid $gray-4;
border-radius: 16px;
margin-left: 16px;
transition: all 0.3s ease 0s;
@media (min-width: $lg) {
border: 1px solid $navy-3;
border: solid 1px white;
display: flex;
justify-content: center;
align-items: center;
transition: all 0.2s ease;
margin-right: 8px;
&:hover {
color: $astar-blue-dark;
border-color: $astar-blue-dark;
}
}
.m-btn--connect:hover {
background: $astar-blue;
border: 1px solid transparent;
@media (min-width: $lg) {
background: #fff;
}
.iconbase {
color: $gray-1;
width: 40px;
height: 40px;
border-radius: 20px;
}
}
.iconbase {
color: $gray-4;
width: rem(20);
height: rem(20);
margin-left: -4px;
margin-right: 4px;
transition: all 0.3s ease 0s;
}

.text--connect {
font-weight: 400;
font-size: 14px;
color: $gray-1;
.iconbase {
width: 18px;
height: 18px;
@media (min-width: $lg) {
color: $navy-1;
}
}

.body--dark {
.btn--connect {
background: transparent;
color: #fff;
border: 1px solid $gray-4;
}
.btn--connect:hover {
background: $astar-blue !important;
border: 1px solid transparent;
.iconbase {
color: $gray-1;
}
}
.iconbase {
color: $gray-3;
}

.m-btn--connect {
background: transparent;
color: $gray-3;
border: 1px solid $gray-4;
}
.m-btn--connect:hover {
background: $astar-blue;
border: 1px solid transparent;
.iconbase {
color: $gray-1;
}
}
.text--connect {
color: $gray-1;
width: 20px;
height: 20px;
}
}
</style>
12 changes: 7 additions & 5 deletions src/components/header/Header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@
<template #left>
<div class="icon"><logo /></div>
</template>
<trouble-help />
<template v-if="!currentAccount">
<div v-if="!currentAccount">
<connect-button :class="isLoading && 'cursor--disabled'" @click="openSelectModal">
<astar-icon-wallet />
</connect-button>
</template>
<q-tooltip>
<span class="text--tooltip">{{ $t('wallet.connectWallet') }}</span>
</q-tooltip>
</div>
<template v-else>
<account-button
:account="currentAccount"
Expand All @@ -18,6 +20,7 @@
/>
</template>
<network-button @show-network="clickNetworkBtn" />
<trouble-help />
</header-comp>

<!-- Modals -->
Expand Down Expand Up @@ -235,14 +238,13 @@ export default defineComponent({
@import 'src/css/quasar.variables.scss';
.wrapper {
z-index: 100;
background-color: $navy-2;
@media (min-width: $lg) {
border-left: solid 1px $navy-3;
width: 100%;
position: absolute;
top: 0;
left: 224px;
padding-right: 224px;
background-color: transparent;
}
}

Expand Down
35 changes: 3 additions & 32 deletions src/components/header/HeaderComp.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ export default defineComponent({
overflow: hidden;
display: flex;
justify-content: space-between;
background: #0e101d;
background: $navy-1;
mix-blend-mode: normal;
backdrop-filter: blur(200px);
height: 4rem;
padding-left: 16px;
padding-right: 16px;
border-bottom: 1px solid transparent !important;
border-bottom: 5px solid transparent !important;
border-image: linear-gradient(
121.48deg,
#e6007a -5.77%,
Expand All @@ -63,13 +63,9 @@ export default defineComponent({
#0ae2ff 74.93%
);
border-image-slice: 1;
@media (min-width: $lg) {
background: rgba(247, 247, 248, 0.8);
}
@media (min-width: $lg) {
padding: 40px 40px 25px 40px;
height: 6rem;
background: #fff;
}
}

Expand All @@ -79,7 +75,7 @@ export default defineComponent({
align-items: center;
font-weight: 590;
font-size: 1.625rem;
color: $navy-1;
color: white;
padding: 0rem;
}

Expand All @@ -89,29 +85,4 @@ export default defineComponent({
align-items: center;
padding: 0rem;
}

.body--dark {
.header {
background: rgba(8, 15, 46, 0.4);
backdrop-filter: blur(200px);
border-bottom: 1px solid !important;
border-image: linear-gradient(
90deg,
#e6007a -4%,
#e6007a -3.88%,
#703ac2 17.01%,
#0070eb 42.25%,
#0297fb 73.9%,
#0ae2ff 97.42%
);
border-image-slice: 1;
}

.header-left {
color: $gray-1;
@media (min-width: $lg) {
padding: 0px;
}
}
}
</style>
Loading
Loading