Skip to content

Commit 733d5c1

Browse files
committed
Lotus upgrade
1 parent fe0b5c6 commit 733d5c1

5 files changed

Lines changed: 69 additions & 61 deletions

File tree

assets/icons.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@
174174
"layers": "M11.7234 1.0848C11.9062 1.05051 12.0938 1.05051 12.2766 1.0848C12.493 1.12541 12.6861 1.22394 12.7794 1.27155L12.805 1.28452L22.4472 6.10564C22.786 6.27503 23 6.62129 23 7.00006C23 7.37884 22.786 7.7251 22.4472 7.89449L12.805 12.7156L12.7794 12.7286C12.6861 12.7762 12.493 12.8747 12.2766 12.9153C12.0938 12.9496 11.9062 12.9496 11.7234 12.9153C11.507 12.8747 11.3139 12.7762 11.2206 12.7286L11.195 12.7156L1.55279 7.89449C1.214 7.7251 1 7.37884 1 7.00006C1 6.62129 1.214 6.27503 1.55279 6.10564L11.195 1.28452L11.2206 1.27155C11.3139 1.22394 11.507 1.12541 11.7234 1.0848ZM2.52769 10.618L1.55279 11.1054C1.214 11.2748 1 11.6211 1 11.9999C1 12.3786 1.214 12.7249 1.55279 12.8943L11.195 17.7154L11.2206 17.7284C11.3139 17.776 11.507 17.8745 11.7234 17.9151C11.9062 17.9494 12.0938 17.9494 12.2766 17.9151C12.493 17.8745 12.6861 17.776 12.7794 17.7284L12.805 17.7154L22.4472 12.8943C22.786 12.7249 23 12.3786 23 11.9999C23 11.6211 22.786 11.2748 22.4472 11.1054L21.4723 10.618L13.6994 14.5044L13.6876 14.5103C13.6388 14.5349 13.5187 14.5951 13.3985 14.6474C13.2382 14.7172 12.9785 14.8185 12.6454 14.881C12.2189 14.961 11.7811 14.961 11.3546 14.881C11.0215 14.8185 10.7618 14.7172 10.6015 14.6474C10.4813 14.5951 10.3612 14.5349 10.3124 14.5103L10.3006 14.5044L2.52769 10.618ZM1.55279 16.1055L2.52784 15.618L10.3006 19.5044L10.3124 19.5103L10.3125 19.5104C10.3614 19.5349 10.4814 19.5952 10.6015 19.6474C10.7618 19.7172 11.0215 19.8185 11.3546 19.881C11.7811 19.961 12.2189 19.961 12.6454 19.881C12.9785 19.8185 13.2382 19.7172 13.3985 19.6474C13.5186 19.5952 13.6386 19.5349 13.6875 19.5104L13.6876 19.5103L13.6994 19.5044L21.4722 15.618L22.4472 16.1055C22.786 16.2749 23 16.6212 23 17C23 17.3787 22.786 17.725 22.4472 17.8944L12.805 22.7155L12.7794 22.7285C12.6861 22.7761 12.493 22.8746 12.2766 22.9152C12.0938 22.9495 11.9062 22.9495 11.7234 22.9152C11.507 22.8746 11.3139 22.7761 11.2206 22.7285L11.195 22.7155L1.55279 17.8944C1.214 17.725 1 17.3787 1 17C1 16.6212 1.214 16.2749 1.55279 16.1055Z",
175175
"return": "M6.2929 18.7071C6.6834 19.0976 7.3166 19.0976 7.7071 18.7071C8.0976 18.3166 8.0976 17.6834 7.7071 17.2929L5.4142 15H16.5C19.5376 15 22 12.5376 22 9.5C22 6.4624 19.5376 4 16.5 4H12C11.4477 4 11 4.4477 11 5C11 5.5523 11.4477 6 12 6H16.5C18.433 6 20 7.567 20 9.5C20 11.433 18.433 13 16.5 13H5.4142L7.7071 10.7071C8.0976 10.3166 8.0976 9.6834 7.7071 9.2929C7.3166 8.9024 6.6834 8.9024 6.2929 9.2929L2.2929 13.2929C1.9024 13.6834 1.9024 14.3166 2.2929 14.7071L6.2929 18.7071Z",
176176
"timeline": "M 19 0 C 21.761 0 24 2.239 24 5 L 24 19 C 24 21.761 21.761 24 19 24 L 5 24 C 2.239 24 0 21.761 0 19 L 0 5 C 0 2.239 2.239 0 5 0 Z M 12 4 C 10.895 4 10 4.895 10 6 C 10 7.105 10.895 8 12 8 L 18 8 C 19.105 8 20 7.105 20 6 C 20 4.895 19.105 4 18 4 Z M 9 14 L 15 14 C 16.105 14 17 13.105 17 12 C 17 10.895 16.105 10 15 10 L 9 10 C 7.895 10 7 10.895 7 12 C 7 13.105 7.895 14 9 14 Z M 6 16 C 4.895 16 4 16.895 4 18 C 4 19.105 4.895 20 6 20 L 12 20 C 13.105 20 14 19.105 14 18 C 14 16.895 13.105 16 12 16 Z",
177+
"lotus": "M12 4C11.328 4 10.765 4.44 10.401 4.805C9.987 5.22 9.588 5.783 9.241 6.435C8.793 7.28 8.405 8.325 8.187 9.493C7.58301 9.1783 6.94661 8.93018 6.289 8.753C5.796 8.624 5.316 8.553 4.89 8.563C4.52 8.572 3.956 8.645 3.55 9.05C3.129 9.472 3.037 10.097 3.067 10.668C3.095 11.196 3.23 11.805 3.452 12.437C3.694 13.127 4.055 13.882 4.54 14.634C4.11212 14.795 3.70031 14.9959 3.31 15.234C2.69 15.62 2 16.204 2 17C2 18.087 3.193 18.766 4.046 19.158C5.074 19.631 6.466 20 8 20C9.55 20 10.96 19.624 12 19.137C13.04 19.624 14.45 20 16 20C17.534 20 18.926 19.631 19.954 19.158C20.807 18.766 22 18.087 22 17C22 16.203 21.31 15.62 20.69 15.235C20.2997 14.9966 19.8879 14.7954 19.46 14.634C19.945 13.882 20.306 13.126 20.548 12.437C20.77 11.806 20.905 11.196 20.933 10.667C20.963 10.097 20.871 9.472 20.45 9.05C20.044 8.645 19.48 8.572 19.11 8.563C18.684 8.553 18.204 8.624 17.711 8.753C17.0534 8.93018 16.417 9.1783 15.813 9.493C15.6169 8.42648 15.2612 7.39559 14.758 6.435C14.412 5.783 14.013 5.22 13.598 4.805C13.235 4.44 12.673 4 12 4Z",
177178
"gas_fast": "M12 16a3 3 0 0 1-3-3c0-1.12.61-2.1 1.5-2.61l9.71-5.62l-5.53 9.58c-.5.98-1.51 1.65-2.68 1.65m0-13c1.81 0 3.5.5 4.97 1.32l-2.1 1.21C14 5.19 13 5 12 5a8 8 0 0 0-8 8c0 2.21.89 4.21 2.34 5.65h.01c.39.39.39 1.02 0 1.41c-.39.39-1.03.39-1.42.01A9.969 9.969 0 0 1 2 13A10 10 0 0 1 12 3m10 10c0 2.76-1.12 5.26-2.93 7.07c-.39.38-1.02.38-1.41-.01a.996.996 0 0 1 0-1.41A7.95 7.95 0 0 0 20 13c0-1-.19-2-.54-2.9L20.67 8C21.5 9.5 22 11.18 22 13",
178179
"gas_median": "M12 1.38L9.14 12.06c-.34 1.04-.1 2.23.72 3.06a3.012 3.012 0 0 0 4.25 0c.79-.79 1.05-1.92.78-2.91m-.29-8.86l.62 2.33A7.99 7.99 0 0 1 20 13c0 2.21-.89 4.21-2.34 5.65h-.01a.996.996 0 0 0 0 1.41c.39.39 1.03.39 1.42.01A9.969 9.969 0 0 0 22 13c0-4.62-3.14-8.5-7.4-9.65m-5.2.01C5.15 4.5 2 8.4 2 13c0 2.76 1.12 5.26 2.93 7.07c.39.38 1.02.38 1.41-.01a.996.996 0 0 0 0-1.41A7.95 7.95 0 0 1 4 13c0-3.35 1.94-6.14 4.79-7.35",
179180
"gas_slow": "M12 16c1.66 0 3-1.34 3-3c0-1.12-.61-2.1-1.5-2.61L3.79 4.77l5.53 9.58c.5.98 1.51 1.65 2.68 1.65m0-13c-1.81 0-3.5.5-4.97 1.32l2.1 1.21C10 5.19 11 5 12 5c4.42 0 8 3.58 8 8c0 2.21-.89 4.21-2.34 5.65h-.01a.996.996 0 0 0 0 1.41c.39.39 1.03.39 1.42.01A9.969 9.969 0 0 0 22 13c0-5.5-4.5-10-10-10M2 13c0 2.76 1.12 5.26 2.93 7.07c.39.38 1.02.38 1.41-.01a.996.996 0 0 0 0-1.41A7.95 7.95 0 0 1 4 13c0-1 .19-2 .54-2.9L3.33 8C2.5 9.5 2 11.18 2 13",

components/LeftSidebar.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ const handleOnClose = () => {
254254
</Flex>
255255
</Flex>
256256

257-
<AdvBanner />
257+
<AdvBanner advName="lotus_upgrade" />
258258
</Flex>
259259

260260
<Flex direction="column" gap="16" style="margin-right: 20px">

components/shared/AdvBanner.vue

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -48,34 +48,31 @@ onMounted(() => {
4848
:class="[$style.wrapper, orientation === 'horizontal' && $style.wrapper_horizontal, !isDisplayed && $style.not_display]"
4949
>
5050
<Flex v-if="orientation === 'vertical'" direction="column" gap="12" :class="$style.ad_vertical">
51-
<Flex direction="column" gap="8">
52-
<Flex align="center" gap="6">
53-
<Icon v-if="adv.icon" :name="adv.icon" size="14" color="brand" />
51+
<Flex direction="column" gap="16">
52+
<Icon v-if="adv.icon" :name="adv.icon" size="24" color="brand" />
53+
54+
<Flex direction="column" gap="8">
5455
<Text size="13" weight="600" color="primary"> {{ adv.header }} </Text>
56+
<Text size="13" weight="500" color="tertiary" height="150"> {{ adv.body }} </Text>
5557
</Flex>
56-
57-
<Text size="13" weight="600" color="tertiary" height="140"> {{ adv.body }} </Text>
5858
</Flex>
5959

6060
<Flex align="center" justify="between">
6161
<Text size="13" weight="600" color="brand" :class="$style.footer"> {{ adv.footer }} </Text>
62-
6362
<Icon @click.prevent.stop="isDisplayed = false" name="close" size="16" color="secondary" :class="$style.close_icon" />
6463
</Flex>
6564
</Flex>
6665

6766
<Flex v-else-if="orientation === 'horizontal'" align="center" gap="12" wide :class="$style.ad_horizontal">
6867
<Flex align="center" gap="8">
6968
<Icon v-if="adv.icon" :name="adv.icon" size="14" color="brand" />
70-
7169
<Text size="13" weight="600" color="primary" :class="$style.text"> {{ adv.header }} </Text>
7270
</Flex>
7371

7472
<Text size="13" weight="600" color="tertiary" height="140" :class="$style.text"> {{ adv.body }} </Text>
7573

7674
<Flex align="center" gap="8" :class="$style.footer">
7775
<Text size="13" weight="600" color="brand" :class="$style.text"> {{ adv.footer }} </Text>
78-
7976
<Icon @click.prevent.stop="isDisplayed = false" name="close" size="16" color="secondary" :class="$style.close_icon" />
8077
</Flex>
8178
</Flex>
@@ -91,6 +88,7 @@ onMounted(() => {
9188
9289
.wrapper_horizontal {
9390
width: 100%;
91+
9492
padding: 8px 24px 0px 24px;
9593
}
9694
@@ -102,14 +100,14 @@ onMounted(() => {
102100
position: relative;
103101
104102
border-radius: 12px;
105-
box-shadow: inset 0 0 0 2px var(--op-10);
103+
background: var(--op-3);
106104
107105
padding: 16px;
108106
109107
transition: all 0.2s ease;
110108
111109
&:hover {
112-
background: var(--op-3);
110+
background: var(--op-5);
113111
114112
.close_icon {
115113
display: block;
@@ -139,14 +137,14 @@ onMounted(() => {
139137
width: 100%;
140138
141139
border-radius: 12px;
142-
box-shadow: inset 0 0 0 2px var(--op-10);
140+
background: var(--op-3);
143141
144142
padding: 8px 16px;
145143
146144
transition: all 0.2s ease;
147145
148146
&:hover {
149-
background: var(--op-3);
147+
background: var(--op-5);
150148
151149
.close_icon {
152150
display: block;

layouts/default.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const showPromoBackground = useCookie("showPromoBackground", { default: () => tr
1717

1818
<Flex direction="column" align="center" :class="$style.content">
1919
<Feed />
20-
<AdvBanner orientation="horizontal" />
20+
<AdvBanner advName="lotus_upgrade" orientation="horizontal" />
2121
<ActionBar />
2222

2323
<Flex direction="column" align="center" wide :class="$style.container">

services/constants/advertising.js

Lines changed: 56 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,84 @@
11
const advertisements = [
22
{
3-
name: 'celenium_api',
4-
modal: 'api',
5-
icon: 'slash',
6-
header: 'Try out Celenium API',
7-
body: 'The power of Celestia: Scalable, Secure and Modular Blockchain.',
8-
footer: 'Get started',
3+
name: "celenium_api",
4+
modal: "api",
5+
icon: "slash",
6+
header: "Try out Celenium API",
7+
body: "The power of Celestia: Scalable, Secure and Modular Blockchain.",
8+
footer: "Get started",
99
weight: 0.4,
1010
},
1111
{
12-
name: 'faucet',
13-
internalLink: '/faucet',
14-
icon: 'drop',
15-
header: 'Celenium Faucet',
16-
body: 'Free TIA for the Celestia testnets!',
17-
footer: 'Get Tokens',
12+
name: "faucet",
13+
internalLink: "/faucet",
14+
icon: "drop",
15+
header: "Celenium Faucet",
16+
body: "Free TIA for the Celestia testnets!",
17+
footer: "Get Tokens",
1818
weight: 0.2,
19-
},
20-
{
21-
name: 'celestials',
22-
link: 'https://celestials.id/?utm_source=celenium_banner',
23-
icon: 'celestials',
24-
header: 'Celestials ID',
25-
body: 'Celestia Modular usernames with unique, generative artworks',
26-
footer: 'Pick your id',
19+
},
20+
{
21+
name: "celestials",
22+
link: "https://celestials.id/?utm_source=celenium_banner",
23+
icon: "celestials",
24+
header: "Celestials ID",
25+
body: "Celestia Modular usernames with unique, generative artworks",
26+
footer: "Pick your id",
2727
weight: 0.2,
2828
},
2929
{
30-
name: 'lumina',
31-
modal: 'lightNode',
32-
icon: 'lumina',
33-
header: 'Your Own Node',
34-
body: 'Easily launch a node right in your browser or on your phone.',
35-
footer: 'Run Light Node',
30+
name: "lumina",
31+
modal: "lightNode",
32+
icon: "lumina",
33+
header: "Your Own Node",
34+
body: "Easily launch a node right in your browser or on your phone.",
35+
footer: "Run Light Node",
3636
weight: 0.2,
3737
},
3838
{
39-
name: 'celestia_update',
40-
link: 'https://blog.celestia.org/ginger/',
41-
icon: 'zap',
42-
header: 'Celestia Upgrade',
43-
body: 'Mainnet update scheduled for 28.01.2025.',
44-
footer: 'View Docs',
39+
name: "celestia_update",
40+
link: "https://blog.celestia.org/ginger/",
41+
icon: "zap",
42+
header: "Celestia Upgrade",
43+
body: "Mainnet update scheduled for 28.01.2025.",
44+
footer: "View Docs",
45+
weight: 0,
46+
},
47+
{
48+
name: "celenium_survey",
49+
link: "https://t.co/4nBFExP2VR",
50+
icon: "validator",
51+
header: "Celenium survey",
52+
body: "Please take 5 minutes of your time and answer a few questions.",
53+
footer: "Take the survey",
4554
weight: 0,
4655
},
4756
{
48-
name: 'celenium_survey',
49-
link: 'https://t.co/4nBFExP2VR',
50-
icon: 'validator',
51-
header: 'Celenium survey',
52-
body: 'Please take 5 minutes of your time and answer a few questions.',
53-
footer: 'Take the survey',
57+
name: "lotus_upgrade",
58+
link: "https://blog.celestia.org/lotus",
59+
icon: "lotus",
60+
header: "Lotus Upgrade",
61+
body: "Welcome the Lotus upgrade: native TIA interop and reduced issuance.",
62+
footer: "Read More",
5463
weight: 0,
5564
},
5665
]
5766

5867
export function getRandomAdv() {
59-
const randomNum = Math.random()
68+
const randomNum = Math.random()
6069

61-
let cumWeight = 0
62-
for (let ad of advertisements.filter(el => el.weight <= 1)) {
63-
cumWeight += ad.weight
64-
if (randomNum <= cumWeight) {
65-
return ad
66-
}
67-
}
70+
let cumWeight = 0
71+
for (let ad of advertisements.filter((el) => el.weight <= 1)) {
72+
cumWeight += ad.weight
73+
if (randomNum <= cumWeight) {
74+
return ad
75+
}
76+
}
6877
}
6978

7079
export function getAdvByName(name) {
7180
let adv = {}
72-
advertisements.forEach(el => {
81+
advertisements.forEach((el) => {
7382
if (el.name === name) {
7483
adv = el
7584
}

0 commit comments

Comments
 (0)