Compare commits

..
9 Commits
Author SHA1 Message Date
Uroboros 7b3951514f Merge pull request 'Develop' (#7) from develop into main
continuous-integration/drone/push Build is passing
Reviewed-on: #7
2026-10-22 04:42:31 +00:00
Uroboros 184b5f014a fix_test
continuous-integration/drone/push Build is passing
2026-10-16 21:03:19 +10:00
Uroboros 513991b7c1 /
continuous-integration/drone/push Build is passing
2026-10-16 20:23:44 +10:00
Uroboros c3e5d7da69 pictyre
continuous-integration/drone/push Build is passing
continuous-integration/drone Build is passing
2026-10-16 20:16:52 +10:00
Uroboros 19dd366e5d Merge branch 'main' of https://gitea.allowlgroup.ru/na-granicelife.ru/front
continuous-integration/drone/push Build is passing
2026-10-16 20:09:29 +10:00
Uroboros b8eb64810f delete 8.webp 2026-10-16 20:09:19 +10:00
Uroboros 2a6c988a17 Merge pull request 'port 3000' (#6) from develop into main
continuous-integration/drone/push Build is passing
Reviewed-on: #6
2026-10-16 09:47:42 +00:00
Uroboros 0c2a507a93 Merge pull request 'Develop' (#5) from develop into main
continuous-integration/drone/push Build is passing
Reviewed-on: #5
2026-10-15 07:13:49 +00:00
Uroboros ebd161f089 test
continuous-integration/drone/push Build is passing
2026-10-15 16:43:11 +10:00
9 changed files with 106 additions and 131 deletions
+36
View File
@@ -4,12 +4,21 @@
align-items: center; align-items: center;
} }
.product-card:hover .card-info {
top: 35%;
}
.sticky-block { .sticky-block {
width: 25px; width: 25px;
padding: 20px 0; padding: 20px 0;
} }
} }
@media (min-width: 600px) and (max-width: 710px) {
.product-card:hover .card-info {
transform: translateY(-80%);
}
}
@media (max-width: 768px) { @media (max-width: 768px) {
.sticky-block { .sticky-block {
width: 30px; width: 30px;
@@ -169,6 +178,17 @@
white-space: normal; white-space: normal;
font-size: 1.4rem; font-size: 1.4rem;
} }
/* Кнопки в карточках */
.btn-card {
width: 100%;
margin-top: 10px;
font-size: 0.9rem;
}
.product-card .card-text {
max-height: 100px;
}
} }
@media (min-width: 700px) and (max-width: 991px) { @media (min-width: 700px) and (max-width: 991px) {
@@ -196,6 +216,12 @@
} }
} }
@media (min-width: 1400px) and (max-width: 1660px) {
.product-card:hover .card-info {
top: 29%;
}
}
@media (max-width: 420px) { @media (max-width: 420px) {
/* Уменьшаем размер кнопок на очень маленьких экранах */ /* Уменьшаем размер кнопок на очень маленьких экранах */
.cta-btn { .cta-btn {
@@ -215,4 +241,14 @@
h2 { h2 {
font-size: 1.3rem; font-size: 1.3rem;
} }
/* Карточки специальностей на маленьких экранах */
.btn-card {
font-size: 0.85rem;
padding: 6px 15px;
}
.product-card .card-text {
max-height: 80px;
}
} }
+60 -69
View File
@@ -98,19 +98,14 @@ p.pt-3.text-color {
color: #328639; color: #328639;
} }
/* Карточки специальностей: картинка задаёт высоту карточки (как было раньше), /* Карточки специальностей */
заголовок поверх неё, полное описание раскрывается при наведении.
Карточка — ссылка целиком. */
.product-card { .product-card {
position: relative; position: relative;
display: block;
overflow: hidden; overflow: hidden;
border-radius: 10px; border-radius: 10px;
color: inherit; transition: transform 0.3s ease-in-out;
text-decoration: none;
} }
/* Затемнение появляется только при наведении или активации (мобильные). */
.product-card::before { .product-card::before {
content: ""; content: "";
position: absolute; position: absolute;
@@ -120,96 +115,92 @@ p.pt-3.text-color {
bottom: 0; bottom: 0;
background-color: transparent; background-color: transparent;
transition: background-color 0.3s ease-in-out; transition: background-color 0.3s ease-in-out;
z-index: 1; cursor: pointer;
} }
.product-card:hover::before, .product-card:hover::before {
.product-card:focus-visible::before,
.product-card--active::before {
background-color: rgba(0, 0, 0, 0.6); background-color: rgba(0, 0, 0, 0.6);
} }
.product-card:focus-visible {
outline: 3px solid #28a745;
outline-offset: 2px;
}
/* Изображение в потоке: высота карточки равна высоте фото, ничего не обрезается. */
.product-card img { .product-card img {
width: 100%; width: 100%;
height: auto; height: auto;
display: block; display: block;
} }
/* Текстовый слой занимает всю карточку и центрирован флексом: .card-info {
одинаково на любом разрешении, без перестроений в медиа-запросах. */
.product-card .card-info {
position: absolute; position: absolute;
top: 0; bottom: 0;
left: 0; left: 0;
right: 0; right: 0;
bottom: 0; background-color: transparent;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
color: white; color: white;
text-align: center;
padding: 1rem; padding: 1rem;
z-index: 2; text-align: center;
overflow: hidden; z-index: 1;
transition: all 0.3s ease-in-out;
} }
/* В свёрнутом состоянии заголовок стоит ровно по центру, отступ .product-card:hover .card-info {
появляется вместе с описанием — блок остаётся центрированным. */ top: 50%;
.product-card .card-title { transform: translateY(-50%);
margin-bottom: 0; cursor: pointer;
transition: margin-bottom 0.35s ease-in-out;
} }
.product-card:hover .card-title, .card-title {
.product-card:focus-visible .card-title,
.product-card--active .card-title {
margin-bottom: 0.5em; margin-bottom: 0.5em;
} }
/* Описание разворачивается на месте (grid-строки 0fr -> 1fr): текст
остаётся строго внутри карточки, без прокрутки и переполнения. */
.product-card .card-text-wrap {
display: grid;
grid-template-rows: 0fr;
transition: grid-template-rows 0.35s ease-in-out;
}
.product-card:hover .card-text-wrap,
.product-card:focus-visible .card-text-wrap,
.product-card--active .card-text-wrap {
grid-template-rows: 1fr;
}
.product-card .card-text { .product-card .card-text {
overflow: hidden; display: none;
min-height: 0; transition: opacity 0.3s ease-in-out;
margin: 0; overflow-y: auto;
opacity: 0; max-height: 100px;
transform: translateY(8px); margin-bottom: 10px;
transition:
opacity 0.3s ease-in-out,
transform 0.3s ease-in-out;
font-size: clamp(0.75rem, 1.5vw, 0.95rem);
line-height: 1.45;
} }
.product-card:hover .card-text, .product-card:hover .card-text {
.product-card:focus-visible .card-text, display: block;
.product-card--active .card-text {
opacity: 1;
transform: translateY(0);
} }
/* Отступ заголовка для карточек преимуществ (BenefitCard). */ /* Скроллбар для текста в карточках специальностей */
.card-title { .product-card .card-text::-webkit-scrollbar {
margin-bottom: 0.5em; width: 4px;
}
.product-card .card-text::-webkit-scrollbar-track {
background: rgba(255, 255, 255, 0.1);
border-radius: 2px;
}
.product-card .card-text::-webkit-scrollbar-thumb {
background: #28a745;
border-radius: 2px;
}
.product-card .card-text::-webkit-scrollbar-thumb:hover {
background: #218838;
}
/* Кнопки в карточках специальностей */
.btn-card {
display: inline-block;
margin-top: 12px;
padding: 8px 20px;
background-color: #28a745;
color: white;
text-decoration: none;
border-radius: 5px;
font-size: 0.9rem;
font-weight: 600;
transition: all 0.3s ease;
border: 2px solid #28a745;
}
.btn-card:hover {
background-color: transparent;
color: #28a745;
transform: translateY(-2px);
} }
/* Видео */ /* Видео */
+7 -6
View File
@@ -7,22 +7,23 @@ defineProps<{ specialty: Specialty }>();
<template> <template>
<div class="col-xl-4 col-sm-6 mb-4"> <div class="col-xl-4 col-sm-6 mb-4">
<a <div
class="product-card h-100 hidden-on-scroll reveal" class="product-card h-100 hidden-on-scroll reveal"
:class="specialty.delay" :class="specialty.delay"
href="#call-my" tabindex="0"
> >
<img <img
:src="`/assets/img/${specialty.image}`" :src="`/assets/img/${specialty.image}`"
:alt="specialty.alt" :alt="specialty.alt"
loading="lazy" loading="lazy"
/> />
<div class="card-info"> <div class="card-info p-3">
<p class="card-title h5">{{ specialty.title }}</p> <p class="card-title h5">{{ specialty.title }}</p>
<div class="card-text-wrap">
<p class="card-text">{{ specialty.description }}</p> <p class="card-text">{{ specialty.description }}</p>
</div> <a href="#call-my" class="btn btn-card reveal reveal-delay-2">
</div> Узнать подробнее
</a> </a>
</div> </div>
</div>
</div>
</template> </template>
-52
View File
@@ -1,52 +0,0 @@
/**
* Анимация раскрытия текста в карточках специальностей (product-card).
* На устройствах с курсором (hover) текст показывается при наведении
* средствами CSS. На сенсорных устройствах hover недоступен, поэтому
* карточка получает класс product-card--active, когда попадает в поле
* зрения: текст раскрывается автоматически при прокрутке.
*/
export function useProductCardReveal() {
if (import.meta.server) return;
let observer: IntersectionObserver | null = null;
const activateCards = () => {
document.querySelectorAll(".product-card").forEach((card) => {
card.classList.add("product-card--active");
});
};
onMounted(async () => {
await nextTick();
// На устройствах с курсором описания раскрываются по hover в CSS —
// автоматический показ не нужен.
const noHover = window.matchMedia("(hover: none)").matches;
if (!noHover) return;
if (typeof IntersectionObserver === "undefined") {
activateCards();
return;
}
observer = new IntersectionObserver(
(entries) => {
entries.forEach((entry) => {
if (entry.isIntersecting) {
entry.target.classList.add("product-card--active");
}
});
},
{ threshold: 0.15, rootMargin: "0px 0px -80px 0px" },
);
document.querySelectorAll(".product-card").forEach((card) => {
observer?.observe(card);
});
});
onBeforeUnmount(() => {
observer?.disconnect();
observer = null;
});
}
+1
View File
@@ -5,6 +5,7 @@
import { findUniversityBySlug } from "~/data/universities"; import { findUniversityBySlug } from "~/data/universities";
import type { University } from "~/types"; import type { University } from "~/types";
/** Почтовый адрес, по которому принимаются документы (одинаков для всех вузов). */ /** Почтовый адрес, по которому принимаются документы (одинаков для всех вузов). */
const VUS_CONTACT_ADDRESS = "680000, г. Хабаровск, ул. Карла Маркса, 49"; const VUS_CONTACT_ADDRESS = "680000, г. Хабаровск, ул. Карла Маркса, 49";
/** Электронная почта для предварительной записи на беседу. */ /** Электронная почта для предварительной записи на беседу. */
+1 -1
View File
@@ -22,7 +22,7 @@ export const SPECIALTIES: Specialty[] = [
delay: "reveal-delay-2", delay: "reveal-delay-2",
}, },
{ {
image: "8.webp", image: "8_1.webp",
title: "Сотрудники пограничного контроля", title: "Сотрудники пограничного контроля",
description: description:
"Контроль пересечения государственной границы, проверка документов, выявление незаконных пересечений и обеспечение безопасности на пунктах пропуска.", "Контроль пересечения государственной границы, проверка документов, выявление незаконных пересечений и обеспечение безопасности на пунктах пропуска.",
-1
View File
@@ -1,5 +1,4 @@
version: '3.8' version: '3.8'
services: services:
web-dev: web-dev:
image: gitea.allowlgroup.ru/na-granicelife.ru/front:dev-latest image: gitea.allowlgroup.ru/na-granicelife.ru/front:dev-latest
-1
View File
@@ -55,7 +55,6 @@ useHead({
}); });
useReveal(); useReveal();
useProductCardReveal();
const phoneHref = CONTACTS.phones[0].href; const phoneHref = CONTACTS.phones[0].href;

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 70 KiB