feat(03-01): create 9 shared components for landing sections and project display
- HeroSection: title + subtitle + 3 CTA UButtons - FeaturedProjectsSection: 3 featured projects via useProjects() - ServicesSection: 4 service cards with UCard + UIcon - TestimonialsSection: UCard per testimonial with ratings and stats - FAQSection: UAccordion with i18n-resolved items - CTASection: final CTA with 2 UButtons - ProjectCard: NuxtLink + NuxtImg + UBadge + schema.org microdata - TechBadge: Technology lookup with NuxtImg + UBadge level - ProjectGallery: UModal fullscreen + UCarousel + thumbnails + keyboard nav
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
<script setup lang="ts">
|
||||
const { t } = useI18n()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<section class="py-16 px-4">
|
||||
<div class="max-w-3xl mx-auto text-center">
|
||||
<h2 class="text-3xl font-bold mb-4">{{ t('home.cta2.title') }}</h2>
|
||||
<p class="text-lg text-muted mb-8">{{ t('home.cta2.subtitle') }}</p>
|
||||
<div class="flex gap-4 justify-center">
|
||||
<UButton to="/contact" size="lg">
|
||||
{{ t('home.cta2.startProject') }}
|
||||
</UButton>
|
||||
<UButton to="/about" size="lg" variant="outline">
|
||||
{{ t('home.cta2.learnMore') }}
|
||||
</UButton>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
@@ -0,0 +1,32 @@
|
||||
<script setup lang="ts">
|
||||
import type { FAQ } from '~~/shared/types'
|
||||
|
||||
interface Props {
|
||||
faqs: FAQ[]
|
||||
title: string
|
||||
subtitle: string
|
||||
}
|
||||
|
||||
const props = defineProps<Props>()
|
||||
const { t } = useI18n()
|
||||
|
||||
const items = computed(() =>
|
||||
props.faqs.map((faq) => ({
|
||||
label: t(faq.questionKey),
|
||||
content: t(faq.answerKey),
|
||||
value: faq.questionKey,
|
||||
})),
|
||||
)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<section class="py-16 px-4">
|
||||
<div class="max-w-3xl mx-auto">
|
||||
<div class="text-center mb-12">
|
||||
<h2 class="text-3xl font-bold mb-4">{{ title }}</h2>
|
||||
<p class="text-lg text-muted">{{ subtitle }}</p>
|
||||
</div>
|
||||
<UAccordion :items="items" type="single" collapsible />
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
@@ -0,0 +1,22 @@
|
||||
<script setup lang="ts">
|
||||
const { t } = useI18n()
|
||||
const { featuredProjects } = useProjects()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<section class="py-16 px-4">
|
||||
<div class="max-w-6xl mx-auto">
|
||||
<div class="text-center mb-12">
|
||||
<h2 class="text-3xl font-bold mb-4">{{ t('home.projects.title') }}</h2>
|
||||
<p class="text-lg text-muted max-w-2xl mx-auto">{{ t('home.projects.subtitle') }}</p>
|
||||
</div>
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
|
||||
<ProjectCard
|
||||
v-for="project in featuredProjects"
|
||||
:key="project.id"
|
||||
:project="project"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
@@ -0,0 +1,27 @@
|
||||
<script setup lang="ts">
|
||||
const { t } = useI18n()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<section class="py-20 md:py-32">
|
||||
<div class="max-w-4xl mx-auto text-center px-4">
|
||||
<h1 class="text-4xl md:text-6xl font-bold mb-6">
|
||||
{{ t('home.title') }}
|
||||
</h1>
|
||||
<p class="text-xl md:text-2xl text-muted mb-10">
|
||||
{{ t('home.subtitle') }}
|
||||
</p>
|
||||
<div class="flex flex-col sm:flex-row gap-4 justify-center">
|
||||
<UButton to="/projects" size="xl" icon="i-lucide-arrow-right" trailing>
|
||||
{{ t('home.cta.viewProjects') }}
|
||||
</UButton>
|
||||
<UButton to="/fiverr" size="xl" variant="outline" icon="i-lucide-dollar-sign" trailing>
|
||||
{{ t('nav.fiverr') }}
|
||||
</UButton>
|
||||
<UButton to="/contact" size="xl" variant="outline" icon="i-lucide-message-circle" trailing>
|
||||
{{ t('home.cta.contactMe') }}
|
||||
</UButton>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
@@ -0,0 +1,48 @@
|
||||
<script setup lang="ts">
|
||||
const { t } = useI18n()
|
||||
|
||||
const services = computed(() => [
|
||||
{
|
||||
icon: 'i-lucide-monitor',
|
||||
title: t('home.services.webDev.title'),
|
||||
description: t('home.services.webDev.description'),
|
||||
},
|
||||
{
|
||||
icon: 'i-lucide-smartphone',
|
||||
title: t('home.services.mobileApps.title'),
|
||||
description: t('home.services.mobileApps.description'),
|
||||
},
|
||||
{
|
||||
icon: 'i-lucide-zap',
|
||||
title: t('home.services.optimization.title'),
|
||||
description: t('home.services.optimization.description'),
|
||||
},
|
||||
{
|
||||
icon: 'i-lucide-settings',
|
||||
title: t('home.services.maintenance.title'),
|
||||
description: t('home.services.maintenance.description'),
|
||||
},
|
||||
])
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<section class="py-16 px-4">
|
||||
<div class="max-w-6xl mx-auto">
|
||||
<div class="text-center mb-12">
|
||||
<h2 class="text-3xl font-bold mb-4">{{ t('home.services.title') }}</h2>
|
||||
<p class="text-lg text-muted max-w-2xl mx-auto">{{ t('home.services.subtitle') }}</p>
|
||||
</div>
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
||||
<UCard v-for="(service, index) in services" :key="index">
|
||||
<div class="flex items-start gap-4">
|
||||
<UIcon :name="service.icon" class="text-primary text-2xl shrink-0 mt-1" />
|
||||
<div>
|
||||
<h3 class="text-xl font-bold mb-2">{{ service.title }}</h3>
|
||||
<p class="text-muted">{{ service.description }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</UCard>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
@@ -0,0 +1,67 @@
|
||||
<script setup lang="ts">
|
||||
import { testimonials, testimonialsStats } from '~/data/testimonials'
|
||||
|
||||
const { t } = useI18n()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<section class="py-16 px-4">
|
||||
<div class="max-w-6xl mx-auto">
|
||||
<div class="text-center mb-12">
|
||||
<h2 class="text-3xl font-bold mb-4">{{ t('home.testimonials.title') }}</h2>
|
||||
<p class="text-lg text-muted max-w-2xl mx-auto">{{ t('home.testimonials.subtitle') }}</p>
|
||||
|
||||
<!-- Stats -->
|
||||
<div class="flex justify-center gap-8 mt-8">
|
||||
<div class="text-center">
|
||||
<p class="text-3xl font-bold text-primary">{{ testimonialsStats.totalReviews }}</p>
|
||||
<p class="text-sm text-muted">{{ t('home.testimonials.stats.clients') }}</p>
|
||||
</div>
|
||||
<div class="text-center">
|
||||
<p class="text-3xl font-bold text-primary">{{ testimonialsStats.averageRating }}/5</p>
|
||||
<p class="text-sm text-muted">{{ t('home.testimonials.stats.rating') }}</p>
|
||||
</div>
|
||||
<div class="text-center">
|
||||
<p class="text-3xl font-bold text-primary">{{ testimonialsStats.projectsCompleted }}</p>
|
||||
<p class="text-sm text-muted">{{ t('home.testimonials.stats.projects') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
|
||||
<UCard v-for="(testimonial, index) in testimonials" :key="index">
|
||||
<div class="flex flex-col gap-3">
|
||||
<!-- Rating -->
|
||||
<div class="flex gap-1">
|
||||
<UIcon
|
||||
v-for="star in 5"
|
||||
:key="star"
|
||||
name="i-lucide-star"
|
||||
:class="star <= testimonial.rating ? 'text-yellow-400' : 'text-gray-300'"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<!-- Content -->
|
||||
<p class="text-sm italic">"{{ testimonial.content }}"</p>
|
||||
|
||||
<!-- Author -->
|
||||
<div class="flex items-center gap-3 mt-2">
|
||||
<NuxtImg
|
||||
:src="testimonial.avatar"
|
||||
:alt="testimonial.name"
|
||||
width="40"
|
||||
height="40"
|
||||
class="rounded-full"
|
||||
loading="lazy"
|
||||
/>
|
||||
<div>
|
||||
<p class="font-semibold text-sm">{{ testimonial.name }}</p>
|
||||
<p class="text-xs text-muted">{{ testimonial.project_type }} - {{ testimonial.platform }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</UCard>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
Reference in New Issue
Block a user