Skip to content

Commit a9686fa

Browse files
committed
feat: replace DescriptionCard with FeatureCard in RLC token overview
1 parent d78f6f0 commit a9686fa

File tree

2 files changed

+64
-33
lines changed

2 files changed

+64
-33
lines changed

src/components/FeatureCard.vue

Lines changed: 55 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,72 @@
11
<template>
2-
<a
3-
:href="linkUrl"
4-
class="block h-full min-h-40 text-inherit no-underline! visited:no-underline! hover:no-underline! active:no-underline!"
5-
>
6-
<div
7-
class="bg-soft-bg border-border flex h-full cursor-pointer flex-col rounded-lg border p-3 transition-all duration-200 ease-in-out hover:-translate-y-0.5 hover:shadow-md"
8-
>
9-
<div class="flex items-center gap-2">
10-
<Icon :icon="icon" class="text-xl" :class="iconColor" />
11-
<h3 class="text-text1 !mt-0 !mb-0 text-base font-semibold">
12-
{{ title }}
13-
</h3>
14-
</div>
15-
<p class="text-text2 !mt-2 flex-grow text-sm leading-relaxed">
16-
{{ description }}
17-
</p>
2+
<div class="flex h-full flex-col rounded-lg border border-border bg-soft-bg p-6 transition-all duration-200 ease-in-out hover:-translate-y-0.5 hover:shadow-md">
3+
<div class="flex items-center gap-2 mb-4">
4+
<Icon :icon="icon" class="text-xl" :class="iconColor" />
5+
<h3 class="text-text1 !mt-0 !mb-0 text-base font-semibold">
6+
{{ title }}
7+
</h3>
188
</div>
19-
</a>
9+
10+
<!-- Description mode -->
11+
<p v-if="description && !features" class="text-text2 !mt-2 flex-grow text-sm leading-relaxed">
12+
{{ description }}
13+
</p>
14+
15+
<!-- Features mode -->
16+
<ul v-if="features" class="space-y-2 text-sm text-gray-700 dark:text-gray-300 flex-grow">
17+
<li
18+
v-for="feature in processedFeatures"
19+
:key="feature.key"
20+
class="flex items-start gap-2"
21+
>
22+
<span class="text-gray-600">•</span>
23+
<span v-if="feature.link">
24+
<a
25+
:href="feature.link"
26+
target="_blank"
27+
rel="noopener noreferrer"
28+
class="text-blue-600 underline transition-colors hover:text-blue-800 hover:no-underline dark:text-blue-400 dark:hover:text-blue-300"
29+
>
30+
{{ feature.text }}
31+
</a>
32+
</span>
33+
<span v-else>{{ feature.text }}</span>
34+
</li>
35+
</ul>
36+
</div>
2037
</template>
2138

2239
<script setup lang="ts">
40+
import { computed } from 'vue';
2341
import { Icon } from '@iconify/vue';
2442
43+
interface FeatureItem {
44+
text: string;
45+
link?: string;
46+
}
47+
2548
interface Props {
2649
icon: string;
2750
title: string;
28-
description: string;
29-
linkUrl: string;
51+
description?: string;
52+
features?: (string | FeatureItem)[];
53+
linkUrl?: string;
3054
iconColor?: string;
3155
}
3256
33-
withDefaults(defineProps<Props>(), {
57+
const props = withDefaults(defineProps<Props>(), {
3458
iconColor: 'text-blue-500',
3559
linkUrl: '',
3660
});
61+
62+
const processedFeatures = computed(() => {
63+
if (!props.features) return [];
64+
return props.features.map((feature, index) => {
65+
if (typeof feature === 'string') {
66+
return { key: index, text: feature };
67+
} else {
68+
return { key: index, text: feature.text, link: feature.link };
69+
}
70+
});
71+
});
3772
</script>

src/overview/rlc.md

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -65,42 +65,38 @@ demand for RLC increases, driving token value through network effects.
6565
You can acquire RLC tokens through several methods:
6666

6767
<div class="grid grid-cols-1 md:grid-cols-2 gap-6 my-8">
68-
<DescriptionCard
68+
<FeatureCard
6969
title="Centralized Exchanges"
70-
icon="🏪"
71-
color="indigo"
70+
icon="mdi:store"
7271
:features="[
7372
{ text: 'View all available CEX on CoinMarketCap', link: 'https://coinmarketcap.com/fr/currencies/rlc/' },
7473
'High liquidity markets',
7574
'Fiat to RLC purchase options'
7675
]"
7776
/>
7877

79-
<DescriptionCard
78+
<FeatureCard
8079
title="Decentralized Exchanges"
81-
icon="🌊"
82-
color="purple"
80+
icon="mdi:waves"
8381
:features="[
8482
{ text: 'ETH: RLC/ETH on Uniswap', link: 'https://app.uniswap.org/explore/pools/ethereum/0x56Ea002B411FD5887E55329852D5777EcB170713' },
8583
'ARB: RLC/ETH (coming soon)',
8684
'High liquidity DEX trading'
8785
]"
8886
/>
8987

90-
<DescriptionCard
88+
<FeatureCard
9189
title="Cross-Chain Bridging"
92-
icon="🌉"
93-
color="teal"
90+
icon="mdi:bridge"
9491
:features="[
9592
'Bellecour Bridge',
9693
'Stargate Bridge (Arbitrum)',
9794
]"
9895
/>
9996

100-
<DescriptionCard
97+
<FeatureCard
10198
title="Earn RLC"
102-
icon="💎"
103-
color="pink"
99+
icon="mdi:diamond"
104100
:features="[
105101
'Develop confidential apps',
106102
'Monetize protected datasets',
@@ -122,7 +118,7 @@ Ready to dive into the iExec ecosystem? Here are the next steps:
122118

123119
<script setup>
124120
import ImageViewer from '../components/ImageViewer.vue';
125-
import DescriptionCard from '../components/DescriptionCard.vue';
121+
import FeatureCard from '../components/FeatureCard.vue';
126122

127123
// Assets
128124
import rlcGif from '../assets/rlc/rlc.gif';

0 commit comments

Comments
 (0)