Develop/vus #1

Merged
Uroboros merged 4 commits from develop/vus into main 2026-10-09 11:31:34 +00:00
6 changed files with 289 additions and 47 deletions
Showing only changes of commit 489e55744d - Show all commits
+47
View File
@@ -412,3 +412,50 @@ footer h2 {
position: relative; position: relative;
z-index: 2; z-index: 2;
} }
/* ============================================
ПЛАВНЫЕ ПЕРЕХОДЫ
============================================ */
/* Переход между страницами (app.pageTransition в nuxt.config.ts) */
.page-enter-active,
.page-leave-active {
transition:
opacity 0.25s ease,
transform 0.25s ease;
}
.page-enter-from {
opacity: 0;
transform: translateY(12px);
}
.page-leave-to {
opacity: 0;
transform: translateY(-12px);
}
/* Плавная прокрутка к якорям («Контактная информация») */
html {
scroll-behavior: smooth;
}
/* Базовый тёмный фон: во время pageTransition (out-in) старый и новый
контент отсутствует одновременно, и без этого цвета на мгновение
виден белый фон браузера. Цвет совпадает с верхом градиента .fon-v. */
html,
body {
background-color: #021400;
}
/* Уважение к системной настройке «уменьшить движение» */
@media (prefers-reduced-motion: reduce) {
html {
scroll-behavior: auto;
}
.page-enter-active,
.page-leave-active {
transition: none;
}
}
+165
View File
@@ -343,6 +343,158 @@ img[loading="lazy"] {
margin-bottom: 0.25rem; margin-bottom: 0.25rem;
} }
/* ============================================
СТРАНИЦА ВУЗА (pages/vus/[slug].vue)
============================================ */
/* Шапка страницы: название, город, чипы характеристик */
.vus-detail__header {
text-align: center;
padding: 1rem 0 0.5rem;
}
.vus-detail__title {
color: #fff;
font-size: 1.7rem;
font-weight: 700;
line-height: 1.3;
margin-bottom: 0.4rem;
}
.vus-detail__location {
color: #90ee90;
font-size: 1rem;
margin-bottom: 1rem;
}
.vus-detail__badges {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
justify-content: center;
margin-bottom: 1.5rem;
padding: 0;
list-style: none;
}
.vus-detail__badge {
display: inline-block;
padding: 0.3rem 0.8rem;
font-size: 0.8rem;
border-radius: 14px;
background-color: rgba(40, 167, 69, 0.25);
color: #90ee90;
border: 1px solid rgba(40, 167, 69, 0.4);
}
/* Hero-изображение в карточке */
.vus-detail__hero-card {
border-radius: 20px;
overflow: hidden;
background: linear-gradient(
0deg,
rgba(0, 0, 0, 0.85) 0%,
rgba(1, 45, 12, 0.95) 50%,
rgba(0, 0, 0, 0.85) 100%
);
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
padding: 0.75rem;
margin-bottom: 2rem;
}
.vus-detail__hero-card img {
width: 100%;
height: auto;
display: block;
border-radius: 14px;
}
/* Карточка контактной информации */
.vus-detail__contacts-card {
border-radius: 20px;
background: linear-gradient(
0deg,
rgba(0, 0, 0, 0.85) 0%,
rgba(1, 45, 12, 0.95) 50%,
rgba(0, 0, 0, 0.85) 100%
);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
padding: 1.5rem;
}
.vus-detail__contacts-card h3 {
color: #fff;
font-size: 1.3rem;
margin-bottom: 1rem;
}
.vus-detail__contacts-label {
color: #90ee90;
font-size: 0.85rem;
text-transform: uppercase;
letter-spacing: 0.04em;
margin-bottom: 0.25rem;
}
.vus-detail__contacts-value {
color: #ccc;
margin-bottom: 1rem;
}
/* Мини-карточки «Другие вузы» */
.vus-detail__other-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
gap: 1rem;
}
.vus-detail__other-card {
display: flex;
align-items: center;
gap: 1rem;
text-decoration: none;
color: inherit;
border-radius: 16px;
background: linear-gradient(
0deg,
rgba(0, 0, 0, 0.85) 0%,
rgba(1, 45, 12, 0.95) 50%,
rgba(0, 0, 0, 0.85) 100%
);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
padding: 0.9rem 1.1rem;
transition:
transform 0.2s ease,
box-shadow 0.2s ease;
}
.vus-detail__other-card:hover {
transform: translateY(-3px);
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
color: inherit;
}
.vus-detail__other-card img {
width: 64px;
height: 48px;
object-fit: cover;
border-radius: 8px;
flex-shrink: 0;
}
.vus-detail__other-name {
color: #ccc;
font-size: 0.95rem;
line-height: 1.3;
}
.vus-detail__other-arrow {
margin-left: auto;
color: #28a745;
font-size: 1.2rem;
flex-shrink: 0;
}
/* ============================================ /* ============================================
АДАПТИВНОСТЬ АДАПТИВНОСТЬ
============================================ */ ============================================ */
@@ -370,4 +522,17 @@ img[loading="lazy"] {
.vus-enrollment__table { .vus-enrollment__table {
font-size: 0.85rem; font-size: 0.85rem;
} }
.vus-detail__title {
font-size: 1.3rem;
}
.vus-detail__hero-card {
padding: 0.5rem;
margin-bottom: 1.5rem;
}
.vus-detail__other-grid {
grid-template-columns: 1fr;
}
} }
+1 -1
View File
@@ -60,7 +60,7 @@ const props = defineProps<{ university: University }>();
rel="noopener noreferrer" rel="noopener noreferrer"
itemprop="url" itemprop="url"
> >
Сайт вуза Перейти на сайт
</a> </a>
</div> </div>
</div> </div>
+14 -13
View File
@@ -9,26 +9,27 @@ const props = defineProps<{ university: University }>();
</script> </script>
<template> <template>
<div class="university-contacts mt-5"> <div class="vus-detail__contacts-card mt-5 reveal" id="contacts">
<h3>Контактная информация</h3> <h3>Контактная информация</h3>
<div class="row g-3"> <div class="row g-3">
<div class="col-md-6"> <div class="col-md-6">
<p><b>Адрес:</b></p> <p class="vus-detail__contacts-label">Адрес</p>
<p>{{ props.university.location }}</p> <p class="vus-detail__contacts-value mb-0">
{{ props.university.location }}
</p>
</div> </div>
<div v-if="props.university.website" class="col-md-6"> <div v-if="props.university.website" class="col-md-6">
<p><b>Сайт:</b></p> <p class="vus-detail__contacts-label">Официальный сайт</p>
<p> <a
<a class="btn btn-dark"
:href="props.university.website" :href="props.university.website"
target="_blank" target="_blank"
rel="noopener noreferrer" rel="noopener noreferrer"
> >
{{ props.university.website }} Перейти на сайт
</a> </a>
</p>
</div> </div>
</div> </div>
</div> </div>
+2
View File
@@ -4,6 +4,8 @@ export default defineNuxtConfig({
ssr: true, ssr: true,
app: { app: {
// Плавный переход между страницами: классы .page-* описаны в style.css.
pageTransition: { name: "page", mode: "out-in" },
head: { head: {
htmlAttrs: { lang: "ru" }, htmlAttrs: { lang: "ru" },
meta: [ meta: [
+60 -33
View File
@@ -12,6 +12,11 @@ import {
} from "~/data/universities"; } from "~/data/universities";
import "~/assets/css/vus.css"; import "~/assets/css/vus.css";
/**
* Адресная страница вуза /vus/<slug>: шапка с названием, городом и
* чипами характеристик, hero-изображение, полное содержимое из
* data/universities.ts, контакты и переходы на другие вузы.
*/
const route = useRoute(); const route = useRoute();
const slug = route.params.slug; const slug = route.params.slug;
const university = findUniversityBySlug(slug); const university = findUniversityBySlug(slug);
@@ -61,45 +66,67 @@ const otherUniversities = getOtherUniversities(university.slug);
<div class="row"> <div class="row">
<div class="col-xxl-2 col-lg-1"></div> <div class="col-xxl-2 col-lg-1"></div>
<div class="col-xxl-8 col-lg-10 fon-v my-4"> <div class="col-xxl-8 col-lg-10 fon-v my-4">
<!-- Хлебные крошки --> <div class="vus-detail__content">
<AppBreadcrumbs :university-name="university.shortName" /> <!-- Хлебные крошки -->
<AppBreadcrumbs :university-name="university.shortName" />
<!-- Кнопка назад: NuxtLink вместо button, чтобы переход <!-- Кнопка назад: NuxtLink вместо button, чтобы переход
работал даже без завершённой гидрации (реальная ссылка). --> работал даже без завершённой гидрации (реальная ссылка). -->
<NuxtLink class="btn btn-dark mb-3" to="/vus"> <NuxtLink class="btn btn-dark mb-3" to="/vus">
&lt;&lt; Вернуться на каталог вузов &lt;&lt; Вернуться на каталог вузов
</NuxtLink> </NuxtLink>
<!-- Hero-изображение --> <!-- Шапка: название, город, характеристики -->
<div class="text-center mb-4 reveal"> <header class="vus-detail__header reveal">
<img <h1 class="vus-detail__title">{{ university.name }}</h1>
:src="`/assets/img/${university.heroImage}`" <p v-if="university.location" class="vus-detail__location">
class="img-fluid container_vizit_img" {{ university.location }}
:alt="university.heroImageAlt" </p>
loading="lazy" <ul v-if="university.badges.length" class="vus-detail__badges">
/> <li
</div> v-for="badge in university.badges"
:key="badge"
class="vus-detail__badge"
>
{{ badge }}
</li>
</ul>
</header>
<!-- Заголовок вуза --> <!-- Hero-изображение в карточке -->
<h2 class="text-center mb-4 reveal">{{ university.name }}</h2> <div class="vus-detail__hero-card reveal">
<img
:src="`/assets/img/${university.heroImage}`"
:alt="university.heroImageAlt"
loading="lazy"
/>
</div>
<!-- Полное содержимое вуза --> <!-- Полное содержимое вуза -->
<UniversityContent :university="university" /> <UniversityContent :university="university" />
<!-- Контактная информация вуза --> <!-- Контактная информация вуза -->
<UniversityContacts :university="university" /> <UniversityContacts :university="university" />
<!-- Другие вузы --> <!-- Другие вузы -->
<div class="mt-5 reveal" v-if="otherUniversities.length"> <div v-if="otherUniversities.length" class="vus-detail__other">
<h3 class="text-center mb-3">Другие вузы</h3> <h3>Другие вузы</h3>
<div class="row"> <div class="vus-detail__other-grid">
<div <NuxtLink
v-for="item in otherUniversities" v-for="item in otherUniversities"
:key="item.slug" :key="item.slug"
class="col-md-6 mb-3" class="vus-detail__other-card"
> :to="universityPath(item.slug)"
<NuxtLink class="text-color" :to="universityPath(item.slug)"> >
{{ item.name }} <img
:src="`/assets/img/${item.heroImage}`"
:alt="item.heroImageAlt"
loading="lazy"
/>
<span class="vus-detail__other-name">{{ item.name }}</span>
<span class="vus-detail__other-arrow" aria-hidden="true"
>&rsaquo;</span
>
</NuxtLink> </NuxtLink>
</div> </div>
</div> </div>