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

Move vote leaderboard to the page bottom #1406

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
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
Binary file removed public/images/dapp_promotions/neurolanche.jpeg
Binary file not shown.
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.
34 changes: 27 additions & 7 deletions src/components/header/mobile/MobileNav.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,18 @@
<span class="text--link">{{ $t('sidenavi.data') }}</span>
</div>
</router-link>
<a :href="socialUrl.forum" :class="['link']" target="_blank" @click="showNav = !showNav">
<div class="column--item column--item--dashboard">
<span class="text--link">{{ $t('sidenavi.forum') }}</span>
</div>
</a>
</nav>

<a class="lfgm-mobile" :href="lfgmUrl" target="_blank">
<img :src="require('src/assets/img/lfgm.svg')" alt="LFGM" />
</a>
<div class="gradient-bg">
<astar-domains />
<blog-posts />
<!-- <blog-posts /> -->
</div>

<div class="gradient-bg">
Expand Down Expand Up @@ -84,20 +91,20 @@

<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, socialUrl } from 'src/links';
import { useStore } from 'src/store';
import { providerEndpoints } from 'src/config/chainEndpoints';
import AstarDomains from './AstarDomains.vue';
import CommunityLinks from './CommunityLinks.vue';
import BlogPosts from './BlogPosts.vue';
// import BlogPosts from './BlogPosts.vue';
import LocaleChanger from './LocaleChanger.vue';
import LightDarkMode from './LightDarkMode.vue';

export default defineComponent({
components: { AstarDomains, CommunityLinks, BlogPosts, LocaleChanger, LightDarkMode },
components: { AstarDomains, CommunityLinks, LocaleChanger, LightDarkMode },
setup() {
const { width, screenSize } = useBreakpoints();
const showNav = ref<boolean>(false);
Expand All @@ -117,6 +124,8 @@ export default defineComponent({
RoutePath,
network,
isZkyoto,
lfgmUrl,
socialUrl,
};
},
});
Expand Down Expand Up @@ -203,4 +212,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" target="_blank">
<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);
}

.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);
}

.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;
}
6 changes: 0 additions & 6 deletions src/data/dapp_promotions.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,6 @@
"link": "https://portal.astar.network/astar/dapp-staking/dapp?dapp=zsv1gvepvmwfdshmwgczs4zyvmmwesbjwqjn4wdpuefrrpy",
"img": "images/dapp_promotions/lucky.png"
},
{
"name": "Neurolanche - Stake & Earn",
"shortDescription": "Join our staking and earn soulbound 'Rewarding' NFT.",
"link": "https://twitter.com/neurolanche/status/1722222206204399642?s=52&t=ISh07fvjMqpmUg40w5HqBg/",
"img": "images/dapp_promotions/neurolanche.jpeg"
},
{
"name": "apeXchimpz (AXC)",
"shortDescription": "Stake for FREE #modularNFTs, guaranteed! We take NFTs further...",
Expand Down
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
25 changes: 20 additions & 5 deletions src/staking-v3/components/DiscoverV3.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<voting-wizard />
</div>
<leaderboard />
<leaderboard-vote />
<div v-if="isVotingPeriod" class="v-spacer"></div>
<dynamic-ads-area />

<div
Expand Down Expand Up @@ -42,6 +42,8 @@
</div>
</div>
</div>

<leaderboard-vote />
</div>
<div
class="bg--discover"
Expand All @@ -63,29 +65,29 @@ import Dapps from './Dapps.vue';
import DynamicAdsArea from './DynamicAdsArea.vue';
import DataList from './data/DataList.vue';
import Leaderboard from './leaderboard/Leaderboard.vue';
import LeaderboardVote from './leaderboard/LeaderboardVote.vue';
import PeriodInfoVote from './PeriodInfoVote.vue';
import PeriodInfoBuild from './PeriodInfoBuild.vue';
import VotingWizard from './vote/VotingWizard.vue';
import PeriodStats from './PeriodStats.vue';
import ToggleButtons from './ToggleButtons.vue';
import LeaderboardVote from './leaderboard/LeaderboardVote.vue';

export default defineComponent({
components: {
Dapps,
Leaderboard,
LeaderboardVote,
DataList,
DynamicAdsArea,
PeriodInfoVote,
PeriodInfoBuild,
VotingWizard,
PeriodStats,
ToggleButtons,
LeaderboardVote,
},
setup() {
const { isZkEvm, isAstarZkEvm, currentNetworkIdx } = useNetworkInfo();
const { protocolState } = useDappStaking();
const { protocolState, isVotingPeriod } = useDappStaking();
const { t } = useI18n();
const store = useStore();

Expand Down Expand Up @@ -116,11 +118,24 @@ export default defineComponent({
{ immediate: true }
);

return { searchText, previousPeriod, displayIndex, toggleDapps };
return { searchText, previousPeriod, displayIndex, toggleDapps, isVotingPeriod };
},
});
</script>

<style lang="scss" scoped>
@use './styles/discover-v3.scss';

.v-spacer {
width: 100%;
position: relative;
background-color: $navy-1;
background-size: 100% auto;
height: 40px;
margin-bottom: 0px;

@media (min-width: $lg) {
height: 100px;
}
}
</style>
Loading