204 lines
5.3 KiB
Vue
204 lines
5.3 KiB
Vue
<script setup lang="ts">
|
|
import { computed, onBeforeUnmount, onMounted, ref } from "vue";
|
|
import { Code2, Network, ServerCog } from "lucide-vue-next";
|
|
|
|
const { t } = useI18n();
|
|
|
|
const servicesRef = ref<HTMLElement | null>(null);
|
|
let observer: IntersectionObserver | null = null;
|
|
|
|
const services = computed(() => [
|
|
{
|
|
icon: Code2,
|
|
title: t("services.items.web.title"),
|
|
description: t("services.items.web.description"),
|
|
features: [
|
|
t("services.items.web.features.companyProfile"),
|
|
t("services.items.web.features.landingPage"),
|
|
t("services.items.web.features.dashboard"),
|
|
t("services.items.web.features.api"),
|
|
],
|
|
},
|
|
{
|
|
icon: Network,
|
|
title: t("services.items.network.title"),
|
|
description: t("services.items.network.description"),
|
|
features: [
|
|
t("services.items.network.features.mikrotik"),
|
|
t("services.items.network.features.routing"),
|
|
t("services.items.network.features.troubleshooting"),
|
|
],
|
|
},
|
|
{
|
|
icon: ServerCog,
|
|
title: t("services.items.hosting.title"),
|
|
description: t("services.items.hosting.description"),
|
|
features: [
|
|
t("services.items.hosting.features.vps"),
|
|
t("services.items.hosting.features.configuration"),
|
|
],
|
|
},
|
|
]);
|
|
|
|
onMounted(() => {
|
|
if (!servicesRef.value) return;
|
|
|
|
observer = new IntersectionObserver(
|
|
(entries) => {
|
|
entries.forEach((entry) => {
|
|
entry.target.classList.toggle(
|
|
"is-visible",
|
|
entry.isIntersecting,
|
|
);
|
|
});
|
|
},
|
|
{
|
|
threshold: 0.12,
|
|
rootMargin: "0px 0px -50px 0px",
|
|
},
|
|
);
|
|
|
|
servicesRef.value
|
|
.querySelectorAll("[data-reveal]")
|
|
.forEach((element) => observer?.observe(element));
|
|
});
|
|
|
|
onBeforeUnmount(() => {
|
|
observer?.disconnect();
|
|
});
|
|
</script>
|
|
|
|
<template>
|
|
<section
|
|
id="services"
|
|
ref="servicesRef"
|
|
class="relative overflow-hidden py-16 sm:py-20 lg:py-24"
|
|
>
|
|
<div class="mx-auto w-full max-w-7xl px-5 sm:px-8 lg:px-10">
|
|
<div
|
|
data-reveal
|
|
class="reveal mx-auto mb-10 max-w-3xl text-center sm:mb-14 lg:mb-16"
|
|
>
|
|
<span
|
|
class="inline-flex items-center rounded-full border px-3 py-1.5 text-[10px] font-medium sm:px-4 sm:py-2 sm:text-sm"
|
|
:style="{
|
|
backgroundColor: 'var(--surface)',
|
|
borderColor: 'var(--border)',
|
|
color: 'var(--text-muted)',
|
|
}"
|
|
>
|
|
{{ t("services.badge") }}
|
|
</span>
|
|
|
|
<h2
|
|
class="mt-4 text-3xl font-bold tracking-[-0.04em] sm:mt-6 sm:text-4xl md:text-5xl"
|
|
>
|
|
{{ t("services.title") }}
|
|
</h2>
|
|
|
|
<p
|
|
class="mx-auto mt-3 max-w-2xl text-sm leading-6 sm:mt-5 sm:text-lg sm:leading-7"
|
|
style="color: var(--text-muted)"
|
|
>
|
|
{{ t("services.description") }}
|
|
</p>
|
|
</div>
|
|
|
|
<div
|
|
class="grid gap-4 sm:gap-6 md:grid-cols-2 xl:grid-cols-3 xl:gap-7"
|
|
>
|
|
<article
|
|
v-for="(service, index) in services"
|
|
:key="service.title"
|
|
data-reveal
|
|
class="reveal group relative rounded-2xl border p-5 transition-[transform,background-color,border-color] duration-300 hover:-translate-y-1 sm:rounded-3xl sm:p-7 lg:p-8"
|
|
:style="{
|
|
'--delay': `${index * 100}ms`,
|
|
backgroundColor: 'var(--surface)',
|
|
borderColor: 'var(--border)',
|
|
}"
|
|
>
|
|
<div
|
|
class="mb-5 flex h-11 w-11 items-center justify-center rounded-xl border sm:mb-6 sm:h-14 sm:w-14 sm:rounded-2xl"
|
|
:style="{
|
|
backgroundColor: 'var(--bg)',
|
|
borderColor: 'var(--border)',
|
|
}"
|
|
>
|
|
<component
|
|
:is="service.icon"
|
|
:size="22"
|
|
:stroke-width="1.7"
|
|
class="sm:h-7 sm:w-7"
|
|
/>
|
|
</div>
|
|
|
|
<h3
|
|
class="text-xl font-bold tracking-tight sm:text-2xl"
|
|
>
|
|
{{ service.title }}
|
|
</h3>
|
|
|
|
<p
|
|
class="mt-2.5 text-sm leading-5 sm:mt-4 sm:text-base sm:leading-6"
|
|
style="color: var(--text-muted)"
|
|
>
|
|
{{ service.description }}
|
|
</p>
|
|
|
|
<ul
|
|
class="mt-5 space-y-2.5 sm:mt-6 sm:space-y-3"
|
|
style="color: var(--text-muted)"
|
|
>
|
|
<li
|
|
v-for="feature in service.features"
|
|
:key="feature"
|
|
class="flex items-start gap-2 text-xs leading-5 sm:text-sm sm:leading-6"
|
|
>
|
|
<span
|
|
class="mt-px shrink-0 text-(--text)"
|
|
aria-hidden="true"
|
|
>
|
|
✓
|
|
</span>
|
|
|
|
<span>{{ feature }}</span>
|
|
</li>
|
|
</ul>
|
|
</article>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</template>
|
|
|
|
<style scoped>
|
|
.reveal {
|
|
opacity: 0;
|
|
transform: translate3d(0, 30px, 0);
|
|
transition:
|
|
opacity 650ms cubic-bezier(0.22, 1, 0.36, 1),
|
|
transform 650ms cubic-bezier(0.22, 1, 0.36, 1);
|
|
transition-delay: var(--delay, 0ms);
|
|
will-change: opacity, transform;
|
|
}
|
|
|
|
.reveal.is-visible {
|
|
opacity: 1;
|
|
transform: translate3d(0, 0, 0);
|
|
}
|
|
|
|
@media (max-width: 639px) {
|
|
.reveal {
|
|
transform: translate3d(0, 22px, 0);
|
|
transition-duration: 580ms;
|
|
}
|
|
}
|
|
|
|
@media (prefers-reduced-motion: reduce) {
|
|
.reveal {
|
|
opacity: 1;
|
|
transform: none;
|
|
transition: none;
|
|
}
|
|
}
|
|
</style> |