feat(sprint-5.5): add "Save version" button, update navigation block and block components

- Add "Сохранить версию" button to BlockMetaBar that persists current
  version + changelog from code to PostgreSQL via PATCH API
- Update navigation page: menu items section now renders like live example
  with underlined links, hover dropdowns, and submenus
- Restore uncommitted changes from previous session (thirsty-mayer worktree):
  navigation v1.3 with dropdowns, updated hero/ceo/doctors/reviews/news/
  contact-forms/footer blocks, navData.ts extraction, seed updates
- Extract nav menu data to shared navData.ts module

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
AR 15 M4
2026-03-24 23:28:05 +05:00
parent 3094e9a2b7
commit 196526ffc4
15 changed files with 465 additions and 225 deletions
+77 -65
View File
@@ -1,81 +1,93 @@
export const NAV_ITEMS = [
"Клиника",
"ЛОР врачи",
"Заболевания",
"Вопрос-ответ",
"ЛОР-операции",
"Сурдология",
"Цены",
"Контакты",
];
"use client";
import { NAV_ITEMS } from "./navData";
export { NAV_ITEMS };
function NavItem({ item, isActive }: { item: (typeof NAV_ITEMS)[number]; isActive: boolean }) {
const hasSubmenu = item.submenu.length > 0;
return (
<div className="bb-nav-item-wrap relative group">
<a
href="#"
className="bb-nav-item px-2.5 py-3 whitespace-nowrap inline-flex items-center gap-1"
style={{
fontSize: 18,
color: "#000",
fontWeight: 400,
textDecoration: "underline",
textUnderlineOffset: "4px",
}}
>
{item.label}
{hasSubmenu && (
<span className="text-xs" style={{ color: "#9ca3af", textDecoration: "none", display: "inline-block" }}></span>
)}
</a>
{hasSubmenu && (
<div
className="absolute left-0 top-full z-50 hidden group-hover:block min-w-[220px] py-1 rounded shadow-lg"
style={{ background: "#fff", border: "1px solid #e5e7eb" }}
>
{item.submenu.map((sub) => (
<a
key={sub}
href="#"
className="block px-4 py-2 text-sm bb-nav-sub-item"
style={{ color: "#333", textDecoration: "none" }}
>
{sub}
</a>
))}
</div>
)}
</div>
);
}
export function NavigationBlock() {
return (
<div
className="overflow-hidden"
style={{ border: "1px solid #e5e7eb", boxShadow: "0 1px 4px rgba(0,0,0,0.06)" }}
>
{/* Топ-бар */}
<div
className="flex items-center justify-between px-6 py-2 text-xs border-b"
style={{ background: "#fff", borderColor: "#e5e7eb", color: "#6b7280" }}
>
<div className="flex items-center gap-4">
<span>📍 Б. Цитная, 3</span>
<a href="#" style={{ color: "#0089c3" }}>
Клиника ухо горло нос и аллергия
<div className="bg-white relative">
{/* Верхняя панель: три столбца — логотип | ссылки | телефон+кнопка */}
<div className="flex items-center px-6 py-4">
{/* Столбец 1: Логотип */}
<div className="shrink-0">
<img
src="/logo/logo-main.png"
alt="Клиника ухо, горло, нос"
className="h-20 w-auto"
/>
</div>
{/* Столбец 2: Три ссылки вертикально — прижат к логотипу */}
<div className="flex flex-col gap-1.5 ml-6">
<a href="#" className="flex items-center gap-1.5 text-sm" style={{ color: "#9ca3af", textDecoration: "none" }}>
<span style={{ color: "#9ca3af" }}>📍</span>
<span style={{ color: "#52b4bd", textDecoration: "underline" }}>К. Цеткин, 9</span>
</a>
<a href="#" style={{ color: "#0089c3" }}>
Центр аллергологии и пульмонологии
<a href="#" className="flex items-center gap-1.5 text-sm" style={{ color: "#9ca3af", textDecoration: "none" }}>
<span style={{ color: "#9ca3af" }}>📍</span>
<span style={{ color: "#52b4bd", textDecoration: "underline" }}>Клиника лечения кашля и аллергии</span>
</a>
<a href="#" className="flex items-center gap-1.5 text-sm" style={{ color: "#9ca3af", textDecoration: "none" }}>
<span style={{ color: "#9ca3af" }}>📍</span>
<span style={{ color: "#52b4bd", textDecoration: "underline" }}>Центр диагностики и реабилитации</span>
</a>
</div>
<div className="flex items-center gap-4">
<span className="font-bold text-sm" style={{ color: "#111827" }}>
{/* Столбец 3: Телефон + кнопка вертикально — прижат вправо */}
<div className="flex flex-col items-end gap-2 shrink-0 ml-auto">
<span className="font-bold" style={{ color: "#000", fontSize: 25 }}>
/342/ 255-53-84
</span>
<button className="bb-btn bb-btn-sm bb-btn-pill">Заказать звонок</button>
</div>
</div>
{/* Логотип */}
<div className="flex items-center px-6 py-3 bg-white">
<div className="flex items-center gap-3">
<div
className="w-10 h-10 rounded-full flex items-center justify-center text-white font-bold text-lg shrink-0"
style={{ background: "#0089c3" }}
>
</div>
<div>
<div
className="text-[11px] font-bold leading-tight uppercase tracking-wide"
style={{ color: "#53514e" }}
>
Клиника<br />ухо, горло, нос
</div>
<div className="text-[9px] leading-tight mt-0.5" style={{ color: "#9ca3af" }}>
им. проф. Е.Н.Оленевой
</div>
</div>
<button className="bb-btn bb-btn-md bb-btn-pill">Заказать звонок</button>
</div>
</div>
{/* Главное меню */}
<nav className="flex border-t bg-white" style={{ borderColor: "#e5e7eb" }}>
<nav className="flex bg-white">
{NAV_ITEMS.map((item, i) => (
<a
key={item}
href="#"
className="px-4 py-3 text-sm whitespace-nowrap"
style={{
color: i === 0 ? "#0089c3" : "#53514e",
borderRight: "1px solid #f3f4f6",
fontWeight: i === 0 ? 500 : 400,
textDecoration: "none",
}}
>
{item}
</a>
<NavItem key={item.label} item={item} isActive={i === 0} />
))}
</nav>
</div>