Skip to content

Commit 80c8826

Browse files
committed
feat: enhance Badge component props and improve layout in ProjectCard and UseCaseCard components
1 parent 44ca756 commit 80c8826

File tree

7 files changed

+69
-69
lines changed

7 files changed

+69
-69
lines changed

src/components/Badge.vue

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,13 @@ import { computed } from 'vue';
1111
1212
interface Props {
1313
label: string;
14-
variant?: 'success' | 'warning' | 'danger' | 'important' | 'primary' | 'default';
14+
variant?:
15+
| 'success'
16+
| 'warning'
17+
| 'danger'
18+
| 'important'
19+
| 'primary'
20+
| 'default';
1521
icon?: string;
1622
iconSize?: number;
1723
size?: 'sm' | 'md';
@@ -20,17 +26,18 @@ interface Props {
2026
const props = withDefaults(defineProps<Props>(), {
2127
variant: 'default',
2228
iconSize: 14,
23-
size: 'sm'
29+
size: 'sm',
2430
});
2531
2632
const badgeClasses = computed(() => {
2733
const baseClasses = 'inline-flex items-center rounded-2xl font-medium border';
28-
34+
2935
// Size classes
30-
const sizeClasses = props.size === 'md'
31-
? 'gap-2 px-4 py-1.5 text-sm'
32-
: 'gap-1.5 px-3 py-1 text-xs';
33-
36+
const sizeClasses =
37+
props.size === 'md'
38+
? 'gap-2 px-4 py-1.5 text-sm'
39+
: 'gap-1.5 px-3 py-1 text-xs';
40+
3441
// Variant classes
3542
let variantClasses = '';
3643
switch (props.variant) {
@@ -52,7 +59,7 @@ const badgeClasses = computed(() => {
5259
default:
5360
variantClasses = 'bg-soft-bg text-text2 border-border';
5461
}
55-
62+
5663
return `${baseClasses} ${sizeClasses} ${variantClasses}`;
5764
});
5865
</script>

src/components/ProjectCard.vue

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,27 @@
11
<template>
22
<div
3-
class="relative flex h-full min-h-[220px] bg-soft-bg flex-col rounded-lg border border-border p-5 transition-all duration-300 hover:-translate-y-0.5 hover:border-primary hover:shadow-lg"
3+
class="bg-soft-bg border-border hover:border-primary relative flex h-full min-h-[220px] flex-col rounded-lg border p-5 transition-all duration-300 hover:-translate-y-0.5 hover:shadow-lg"
44
>
55
<!-- Icon -->
6-
<div class="flex gap-2 items-start">
7-
<div
8-
class="flex h-14 w-14 items-center justify-center rounded-xl border border-border bg-bg"
9-
>
10-
<Icon :icon="icon" height="24" />
6+
<div class="flex items-start gap-2">
7+
<div
8+
class="border-border bg-bg flex h-14 w-14 items-center justify-center rounded-xl border"
9+
>
10+
<Icon :icon="icon" height="24" />
1111
</div>
1212
<div>
1313
<h3 class="mt-0! mb-1! text-lg font-semibold">{{ title }}</h3>
14-
<Badge
15-
:label="statusLabel"
16-
:variant="badgeVariant"
17-
:icon="statusIcon"
14+
<Badge
15+
:label="statusLabel"
16+
:variant="badgeVariant"
17+
:icon="statusIcon"
1818
/>
1919
</div>
20-
</div>
20+
</div>
2121

2222
<!-- Content -->
2323
<div class="flex-1">
24-
<p
25-
class="mb-3 h-14 overflow-hidden text-sm leading-relaxed text-text2"
26-
>
24+
<p class="text-text2 mb-3 h-14 overflow-hidden text-sm leading-relaxed">
2725
{{ description }}
2826
</p>
2927

src/components/UseCaseCard.vue

Lines changed: 24 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,44 @@
11
<template>
2-
<div class="bg-soft-bg border group border-border rounded-xl overflow-hidden transition-all duration-300 hover:-translate-y-1 hover:shadow-xl hover:border-primary shadow-md">
2+
<div
3+
class="bg-soft-bg group border-border hover:border-primary overflow-hidden rounded-xl border shadow-md transition-all duration-300 hover:-translate-y-1 hover:shadow-xl"
4+
>
35
<!-- Image -->
4-
<div class="relative overflow-hidden group">
6+
<div class="group relative overflow-hidden">
57
<a :href="demoUrl" target="_blank" rel="noreferrer">
6-
<img
7-
:src="imageUrl"
8+
<img
9+
:src="imageUrl"
810
:alt="imageAlt"
9-
class="w-full max-h-48 object-cover object-top transition-transform duration-300 group-hover:scale-105"
10-
>
11+
class="max-h-48 w-full object-cover object-top transition-transform duration-300 group-hover:scale-105"
12+
/>
1113
</a>
1214
</div>
13-
15+
1416
<!-- Content -->
1517
<div class="p-6">
16-
<h3 class="text-text1 text-2xl font-semibold mb-4 mt-0!">{{ title }}</h3>
17-
<p class="text-text2 leading-relaxed mb-6 text-sm">{{ description }}</p>
18-
18+
<h3 class="text-text1 mt-0! mb-4 text-2xl font-semibold">{{ title }}</h3>
19+
<p class="text-text2 mb-6 text-sm leading-relaxed">{{ description }}</p>
20+
1921
<!-- Feature Tags -->
20-
<div class="flex flex-wrap gap-2 mb-6">
21-
<Badge
22-
v-for="feature in features"
23-
:key="feature"
24-
:label="feature"
22+
<div class="mb-6 flex flex-wrap gap-2">
23+
<Badge
24+
v-for="feature in features"
25+
:key="feature"
26+
:label="feature"
2527
variant="primary"
2628
/>
2729
</div>
28-
30+
2931
<!-- Actions -->
30-
<div class="flex gap-4 flex-wrap">
31-
<Button
32-
as="a"
33-
:href="demoUrl"
34-
target="_blank"
35-
rel="noreferrer"
36-
>
32+
<div class="flex flex-wrap gap-4">
33+
<Button as="a" :href="demoUrl" target="_blank" rel="noreferrer">
3734
<Icon :icon="demoIcon" height="18" />
3835
Try Live Demo
3936
</Button>
40-
<Button
37+
<Button
4138
as="a"
42-
:href="githubUrl"
43-
target="_blank"
44-
rel="noreferrer"
39+
:href="githubUrl"
40+
target="_blank"
41+
rel="noreferrer"
4542
variant="secondary"
4643
>
4744
<Icon icon="mdi:github" height="18" />

src/components/ui/Button.vue

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,18 @@ const props = defineProps({
2020
variant: {
2121
type: String,
2222
default: 'primary',
23-
validator: (value) => ['primary', 'secondary'].includes(value)
24-
}
23+
validator: (value) => ['primary', 'secondary'].includes(value),
24+
},
2525
});
2626
2727
const buttonClasses = computed(() => {
28-
const baseClasses = 'inline-flex h-11 cursor-pointer gap-1.5 items-center justify-center rounded-lg px-5! py-2 text-base font-medium no-underline! transition-all! duration-200 not-disabled:hover:-translate-y-0.5 not-disabled:hover:transform not-disabled:hover:shadow-md focus:outline-none disabled:cursor-not-allowed disabled:opacity-60';
29-
28+
const baseClasses =
29+
'inline-flex h-11 cursor-pointer gap-1.5 items-center justify-center rounded-lg px-5! py-2 text-base font-medium no-underline! transition-all! duration-200 not-disabled:hover:-translate-y-0.5 not-disabled:hover:transform not-disabled:hover:shadow-md focus:outline-none disabled:cursor-not-allowed disabled:opacity-60';
30+
3031
if (props.variant === 'secondary') {
3132
return `${baseClasses} bg-soft-bg! text-text1! border border-primary! hover:!bg-primary/10 focus:shadow-[0_0_0_2px_rgba(252,209,90,0.3)]`;
3233
}
33-
34+
3435
// Primary variant (default)
3536
return `${baseClasses} border-none bg-primary! text-[#1e1e1e]! focus:shadow-[0_0_0_2px_rgba(252,209,90,0.3)]`;
3637
});

src/manage-data/dataProtector/getting-started.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,6 @@ discontinuity.
216216

217217
## Sandbox
218218

219-
220219
<CardGrid>
221220
<ProjectCard
222221
title="DataProtector Core"
@@ -231,7 +230,7 @@ discontinuity.
231230
githubLabel="GitHub repository sandbox"
232231
/>
233232

234-
<ProjectCard
233+
<ProjectCard
235234
title="DataProtector Sharing"
236235
description="Advanced data sharing capabilities with granular permissions and monetization features."
237236
icon="mdi:share-variant"
@@ -242,8 +241,7 @@ discontinuity.
242241
buttonHref="https://codesandbox.io/p/github/iExecBlockchainComputing/dataprotector-sharing-sandbox/main"
243242
githubUrl="https://github.com/iExecBlockchainComputing/dataprotector-sharing-sandbox"
244243
githubLabel="GitHub repository sandbox"
245-
/>
246-
</CardGrid>
244+
/> </CardGrid>
247245

248246
<script setup>
249247
import CardGrid from '../../components/CardGrid.vue';

src/overview/quick-start.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ privacy-first applications.
2121
buttonHref="https://github.com/iExecBlockchainComputing/iexec-nextjs-starter"
2222
/>
2323

24-
<ProjectCard
24+
<ProjectCard
2525
title="React Starter"
2626
description="React application template with hooks, components, and utilities for seamless iExec integration."
2727
icon="logos:react"
@@ -32,7 +32,7 @@ privacy-first applications.
3232
buttonDisabled
3333
/>
3434

35-
<ProjectCard
35+
<ProjectCard
3636
title="Vue.js Starter"
3737
description="Vue 3 Composition API template with TypeScript and optimized build configuration for iExec apps."
3838
icon="logos:vue"
@@ -41,8 +41,7 @@ privacy-first applications.
4141
buttonLabel="Coming Soon"
4242
buttonIcon="mdi:github"
4343
buttonDisabled
44-
/>
45-
</CardGrid>
44+
/> </CardGrid>
4645

4746
## Interactive Sandboxes
4847

@@ -61,7 +60,7 @@ learning and prototyping.
6160
buttonHref="https://codesandbox.io/p/github/iExecBlockchainComputing/dataprotector-sandbox/main"
6261
/>
6362

64-
<ProjectCard
63+
<ProjectCard
6564
title="DataProtector Sharing"
6665
description="Advanced data sharing capabilities with granular permissions and monetization features."
6766
icon="mdi:share-variant"
@@ -72,7 +71,7 @@ learning and prototyping.
7271
buttonHref="https://codesandbox.io/p/github/iExecBlockchainComputing/dataprotector-sharing-sandbox/main"
7372
/>
7473

75-
<ProjectCard
74+
<ProjectCard
7675
title="Web3 Telegram"
7776
description="Privacy-preserving Telegram messaging integration with user consent management."
7877
icon="mdi:message-lock"
@@ -83,7 +82,7 @@ learning and prototyping.
8382
buttonHref="https://codesandbox.io/p/github/iExecBlockchainComputing/web3-telegram-sandbox/main"
8483
/>
8584

86-
<ProjectCard
85+
<ProjectCard
8786
title="Web3 Mail"
8887
description="Secure email communication for Web3 users without revealing personal email addresses."
8988
icon="mdi:email-lock"
@@ -94,7 +93,7 @@ learning and prototyping.
9493
buttonHref="https://codesandbox.io/p/github/iExecBlockchainComputing/web3mail-sandbox/main"
9594
/>
9695

97-
<ProjectCard
96+
<ProjectCard
9897
title="Oracle Factory"
9998
description="Create and deploy custom oracles for bringing off-chain data into your Web3 applications."
10099
icon="mdi:database-cog"
@@ -103,8 +102,7 @@ learning and prototyping.
103102
buttonLabel="Open Sandbox"
104103
buttonIcon="mdi:code-braces"
105104
buttonHref="https://codesandbox.io/p/github/iExecBlockchainComputing/oracle-factory-sandbox/"
106-
/>
107-
</CardGrid>
105+
/> </CardGrid>
108106

109107
## Next Steps
110108

src/overview/use-cases.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ computing and decentralized data protection.
1616
demoIcon="mdi:art"
1717
/>
1818

19-
<UseCaseCard
19+
<UseCaseCard
2020
title="Web3Messaging"
2121
description="Secure communication platform for Web3 users enabling privacy-preserving messaging through Web3Mail and Web3Telegram. Users maintain control over their data while enabling targeted communication and monetizing their engagement."
2222
imageUrl="/assets/web3messaging-screenshot.png"
@@ -26,6 +26,7 @@ computing and decentralized data protection.
2626
githubUrl="https://github.com/iExecBlockchainComputing/web3-messaging-usecase-demo"
2727
demoIcon="mdi:message-processing"
2828
/>
29+
2930
</div>
3031

3132
<script setup>

0 commit comments

Comments
 (0)