-
Notifications
You must be signed in to change notification settings - Fork 2
feat: update "Quick Start" & "use Cases" page #18
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
Merged
Merged
Changes from 11 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
727d213
feat: update Quick Start section with new components for starters and…
ErwanDecoster b1d84c7
feat: refactor Button and add secondary style
ErwanDecoster 4f4ebdb
feat: add Badge component and remove StatusBadge component
ErwanDecoster 8a9afa4
refactor: use-case components, using tailwind and fix some style issue
ErwanDecoster 41fc472
feat: update Quick Start section to include disabled buttons for upco…
ErwanDecoster 5ac4fd4
feat: rename QuickStart components to CardGrid and ProjectCard
ErwanDecoster c43f60b
feat: replace sandbox links with CardGrid and ProjectCard components …
ErwanDecoster 44ca756
feat: update features in UseCaseCard components for improved accuracy
ErwanDecoster 80c8826
feat: enhance Badge component props and improve layout in ProjectCard…
ErwanDecoster 5aceb59
Merge branch 'main' into fix/update-components
Le-Caignec 0bddf1e
Merge branch 'main' into fix/update-components
Le-Caignec ebc3ac1
Merge branch 'main' into fix/update-components
Le-Caignec 17cc79e
fix: remove default props from ProjectCard component (#19)
Le-Caignec b8d3d2e
Merge branch 'main' into fix/update-components
Le-Caignec File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<template> | ||
<component | ||
:is="component" | ||
:href="href" | ||
:target="target" | ||
:rel="rel" | ||
:disabled="disabled" | ||
:class="buttonClasses" | ||
> | ||
<Icon :icon="icon" :height="16" /> | ||
{{ label }} | ||
</component> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { Icon } from '@iconify/vue'; | ||
import { computed } from 'vue'; | ||
|
||
interface Props { | ||
variant: 'primary' | 'disabled'; | ||
label: string; | ||
icon: string; | ||
href?: string; | ||
target?: string; | ||
rel?: string; | ||
disabled?: boolean; | ||
} | ||
|
||
const props = defineProps<Props>(); | ||
|
||
const component = computed(() => { | ||
return props.href ? 'a' : 'button'; | ||
}); | ||
|
||
const buttonClasses = computed(() => { | ||
const baseClasses = | ||
'inline-flex items-center justify-center gap-2 px-5 py-2.5 rounded-md text-sm font-medium w-full transition-all duration-200'; | ||
|
||
if (props.variant === 'primary') { | ||
return `${baseClasses} bg-blue-600 hover:bg-blue-700 text-white hover:-translate-y-0.5`; | ||
} else { | ||
return `${baseClasses} bg-gray-50 text-gray-400 border border-gray-200 cursor-not-allowed`; | ||
} | ||
}); | ||
</script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<template> | ||
<span :class="badgeClasses"> | ||
<Icon v-if="icon" :icon="icon" :height="iconSize" /> | ||
{{ label }} | ||
</span> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { Icon } from '@iconify/vue'; | ||
import { computed } from 'vue'; | ||
|
||
interface Props { | ||
label: string; | ||
variant?: | ||
| 'success' | ||
| 'warning' | ||
| 'danger' | ||
| 'important' | ||
| 'primary' | ||
| 'default'; | ||
icon?: string; | ||
iconSize?: number; | ||
size?: 'sm' | 'md'; | ||
} | ||
|
||
const props = withDefaults(defineProps<Props>(), { | ||
variant: 'default', | ||
iconSize: 14, | ||
size: 'sm', | ||
}); | ||
|
||
const badgeClasses = computed(() => { | ||
const baseClasses = 'inline-flex items-center rounded-2xl font-medium border'; | ||
|
||
// Size classes | ||
const sizeClasses = | ||
props.size === 'md' | ||
? 'gap-2 px-4 py-1.5 text-sm' | ||
: 'gap-1.5 px-3 py-1 text-xs'; | ||
|
||
// Variant classes | ||
let variantClasses = ''; | ||
switch (props.variant) { | ||
case 'success': | ||
variantClasses = 'bg-success-soft text-success-3 border-success-3'; | ||
break; | ||
case 'warning': | ||
variantClasses = 'bg-warning-soft text-warning-3 border-warning-3'; | ||
break; | ||
case 'danger': | ||
variantClasses = 'bg-danger-soft text-danger-3 border-danger-3'; | ||
break; | ||
case 'important': | ||
variantClasses = 'bg-important-soft text-important-3 border-important-3'; | ||
break; | ||
case 'primary': | ||
variantClasses = 'bg-primary2/10 text-primary2 border-primary2/30'; | ||
break; | ||
default: | ||
variantClasses = 'bg-soft-bg text-text2 border-border'; | ||
} | ||
|
||
return `${baseClasses} ${sizeClasses} ${variantClasses}`; | ||
}); | ||
</script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<template> | ||
<div class="my-8 grid grid-cols-1 gap-6 md:grid-cols-2"> | ||
<slot /> | ||
</div> | ||
</template> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
<template> | ||
<div | ||
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" | ||
> | ||
<!-- Icon --> | ||
<div class="flex items-start gap-2"> | ||
<div | ||
class="border-border bg-bg flex h-14 w-14 items-center justify-center rounded-xl border" | ||
> | ||
<Icon :icon="icon" height="24" /> | ||
</div> | ||
<div> | ||
<h3 class="mt-0! mb-1! text-lg font-semibold">{{ title }}</h3> | ||
<Badge | ||
:label="statusLabel" | ||
:variant="badgeVariant" | ||
:icon="statusIcon" | ||
/> | ||
</div> | ||
</div> | ||
|
||
<!-- Content --> | ||
<div class="flex-1"> | ||
<p class="text-text2 mb-3 h-14 overflow-hidden text-sm leading-relaxed"> | ||
{{ description }} | ||
</p> | ||
|
||
<!-- Status Badge --> | ||
</div> | ||
<!-- Actions --> | ||
<div class="mt-auto"> | ||
<div v-if="githubUrl" class="grid gap-3"> | ||
<Button | ||
as="a" | ||
:href="buttonHref" | ||
:disabled="buttonDisabled" | ||
:target="buttonTarget" | ||
:rel="buttonRel" | ||
class="flex-1" | ||
> | ||
<Icon :icon="buttonIcon" :height="16" /> | ||
{{ buttonLabel }} | ||
</Button> | ||
<Button | ||
as="a" | ||
:href="githubUrl" | ||
target="_blank" | ||
rel="noreferrer" | ||
variant="secondary" | ||
class="flex-1" | ||
> | ||
<Icon icon="mdi:github" :height="16" /> | ||
{{ githubLabel || 'View Code' }} | ||
</Button> | ||
</div> | ||
<Button | ||
v-else | ||
:as="buttonHref ? 'a' : 'button'" | ||
:href="buttonHref" | ||
:disabled="buttonDisabled" | ||
:target="buttonTarget" | ||
:rel="buttonRel" | ||
class="w-full" | ||
> | ||
<Icon :icon="buttonIcon" :height="16" /> | ||
{{ buttonLabel }} | ||
</Button> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { Icon } from '@iconify/vue'; | ||
import { computed } from 'vue'; | ||
import Badge from './Badge.vue'; | ||
import Button from './ui/Button.vue'; | ||
|
||
interface Props { | ||
title: string; | ||
description: string; | ||
icon: string; | ||
status: 'available' | 'coming-soon' | 'interactive'; | ||
statusLabel: string; | ||
buttonVariant: 'primary' | 'disabled'; | ||
buttonLabel: string; | ||
buttonIcon: string; | ||
buttonHref?: string; | ||
buttonTarget?: string; | ||
buttonRel?: string; | ||
buttonDisabled?: boolean; | ||
githubUrl?: string; | ||
githubLabel?: string; | ||
} | ||
|
||
const props = withDefaults(defineProps<Props>(), {}); | ||
Le-Caignec marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
const statusIcon = computed(() => { | ||
switch (props.status) { | ||
case 'available': | ||
return 'mdi:check-circle-outline'; | ||
case 'interactive': | ||
return 'mdi:play-circle-outline'; | ||
case 'coming-soon': | ||
return 'mdi:clock-outline'; | ||
default: | ||
return 'mdi:check-circle-outline'; | ||
} | ||
}); | ||
|
||
const badgeVariant = computed(() => { | ||
switch (props.status) { | ||
case 'available': | ||
return 'success'; | ||
case 'coming-soon': | ||
return 'warning'; | ||
case 'interactive': | ||
return 'primary'; | ||
default: | ||
return 'success'; | ||
} | ||
}); | ||
</script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
<template> | ||
<div | ||
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" | ||
> | ||
<!-- Image --> | ||
<div class="group relative overflow-hidden"> | ||
<a :href="demoUrl" target="_blank" rel="noreferrer"> | ||
<img | ||
:src="imageUrl" | ||
:alt="imageAlt" | ||
class="max-h-48 w-full object-cover object-top transition-transform duration-300 group-hover:scale-105" | ||
/> | ||
</a> | ||
</div> | ||
|
||
<!-- Content --> | ||
<div class="p-6"> | ||
<h3 class="text-text1 mt-0! mb-4 text-2xl font-semibold">{{ title }}</h3> | ||
<p class="text-text2 mb-6 text-sm leading-relaxed">{{ description }}</p> | ||
|
||
<!-- Feature Tags --> | ||
<div class="mb-6 flex flex-wrap gap-2"> | ||
<Badge | ||
v-for="feature in features" | ||
:key="feature" | ||
:label="feature" | ||
variant="primary" | ||
/> | ||
</div> | ||
|
||
<!-- Actions --> | ||
<div class="flex flex-wrap gap-4"> | ||
<Button as="a" :href="demoUrl" target="_blank" rel="noreferrer"> | ||
<Icon :icon="demoIcon" height="18" /> | ||
Try Live Demo | ||
</Button> | ||
<Button | ||
as="a" | ||
:href="githubUrl" | ||
target="_blank" | ||
rel="noreferrer" | ||
variant="secondary" | ||
> | ||
<Icon icon="mdi:github" height="18" /> | ||
View Code | ||
</Button> | ||
</div> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { Icon } from '@iconify/vue'; | ||
import Badge from './Badge.vue'; | ||
import Button from './ui/Button.vue'; | ||
|
||
interface Props { | ||
title: string; | ||
description: string; | ||
imageUrl: string; | ||
imageAlt: string; | ||
features: string[]; | ||
demoUrl: string; | ||
githubUrl: string; | ||
demoIcon: string; | ||
} | ||
|
||
defineProps<Props>(); | ||
</script> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.