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

Adding LFGM campaign #1397

Merged
merged 5 commits into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from 4 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
268 changes: 268 additions & 0 deletions src/assets/img/lfgm.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 18 additions & 4 deletions src/components/header/mobile/MobileNav.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@
</div>
</router-link>
</nav>

<a class="lfgm-mobile" :href="lfgmUrl">
<img :src="require('src/assets/img/lfgm.svg')" alt="LFGM" />
</a>
<div class="gradient-bg">
<astar-domains />
<blog-posts />
Expand Down Expand Up @@ -84,10 +86,10 @@

<script lang="ts">
import { defineComponent, ref, computed } from 'vue';
import { useBreakpoints } from 'src/hooks';
import { Path as RoutePath } from 'src/router/routes';
import { useRouter } from 'vue-router';
import { useNetworkInfo } from 'src/hooks';
import { useBreakpoints, useNetworkInfo } from 'src/hooks';
import { Path as RoutePath } from 'src/router/routes';
import { lfgmUrl } from 'src/links';
import { useStore } from 'src/store';
import { providerEndpoints } from 'src/config/chainEndpoints';
import AstarDomains from './AstarDomains.vue';
Expand Down Expand Up @@ -117,6 +119,7 @@ export default defineComponent({
RoutePath,
network,
isZkyoto,
lfgmUrl,
};
},
});
Expand Down Expand Up @@ -203,4 +206,15 @@ export default defineComponent({
gap: 16px;
padding: 0 16px;
}

.lfgm-mobile {
display: flex;
justify-content: center;
margin: 40px 0px;
img {
width: 100%;
height: 150px;
background: $navy-3;
}
}
</style>
6 changes: 5 additions & 1 deletion src/components/sidenav/SidebarDesktop.vue
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@
</div>
</a>
</div>
<a class="lfgm" :href="lfgmUrl">
<img :src="require('src/assets/img/lfgm.svg')" alt="LFGM" />
</a>
<div class="menu__indicator" :class="getIndicatorClass(path)" />
</nav>

Expand All @@ -115,7 +118,7 @@ import { useRouter } from 'vue-router';
import { Path as RoutePath } from 'src/router/routes';
import IconEcosystem from './components/IconEcosystem.vue';
import SidebarOptionDesktop from './SidebarOptionDesktop.vue';
import { socialUrl } from 'src/links';
import { socialUrl, lfgmUrl } from 'src/links';

export default defineComponent({
components: {
Expand Down Expand Up @@ -162,6 +165,7 @@ export default defineComponent({
RoutePath,
socialUrl,
isZkyoto,
lfgmUrl,
};
},
});
Expand Down
26 changes: 21 additions & 5 deletions src/components/sidenav/styles/sidebar-desktop.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
.menu {
position: relative;
margin-top: rem(32);
margin-left: 24px;
flex-grow: 1;

.row--item {
Expand All @@ -58,6 +57,7 @@
height: 38px;
padding: 8px;
margin-bottom: 8px;
margin-left: 24px;
border-radius: 6px;
color: #fff;
position: relative;
Expand Down Expand Up @@ -93,22 +93,24 @@
border-radius: 6px;
height: 38px;
width: 176px;
margin-left: 24px;
}

// adding -120px to the margin-top to adjust the position because of the lgfm logo
.menu__assets {
margin-top: -276px;
margin-top: calc(-276px - 120px);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not just put 156px?

}

.menu__dashboard {
margin-top: -230px;
margin-top: calc(-230px - 120px);
}

.menu__staking {
margin-top: -184px;
margin-top: calc(-184px - 120px);
}

.menu__bridge {
margin-top: -138px;
margin-top: calc(-138px - 120px);
Comment on lines +105 to +113

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above, why the calc()?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because there is a possibility to remove this banner in future, I thought that it's better to use calc to not calculate back again and prevent mis-calculation the values

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since it's for documentation purpose, I'd advise using a comment instead of calc.

}

.dummy-row {
Expand All @@ -133,3 +135,17 @@
background: transparent;
}
}

.lfgm {
display: flex;
align-items: center;
width: 224px;
height: 112px;
margin-bottom: 8px;
color: #fff;
position: relative;
transition: all 0.3s ease 0s;
}
.lfgm:hover {
background: $navy-3;
}
2 changes: 2 additions & 0 deletions src/links/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ export const polkadotJsUrl = {
},
};

export const lfgmUrl = 'https://lfgm.astar.network';

export const getSubscanExtrinsic = ({
subscanBase,
hash,
Expand Down
Loading