Files
profile-front/src/components/Header/Header.astro

82 lines
1.7 KiB
Plaintext
Raw Normal View History

2025-12-11 01:12:45 +03:00
---
2026-03-08 19:09:23 +03:00
const { category, contentType } = Astro.props;
2025-12-11 01:12:45 +03:00
2026-03-08 19:09:23 +03:00
import Stores from './LazyStores.astro';
import MainMenu from '@components/MainMenu.astro';
2025-12-11 01:12:45 +03:00
2026-03-08 19:09:23 +03:00
const MENU_ID = 3340; // 103246 (бургер 1). 103247 (бургер 2 )
let menuItems = [];
2025-12-11 01:12:45 +03:00
---
<header class="header" itemscope itemtype="https://schema.org/WPHeader">
2026-03-08 19:09:23 +03:00
<div class="top-bar">
<a href="/"><img alt="Профиль" width="249" height="55" src="https://cdn.profile.ru/wp-content/themes/profile/assets/img/profile-logo-delovoy.svg"></a>
2026-02-27 00:12:33 +03:00
{category && (
2026-03-08 19:09:23 +03:00
<div class="header__subtitle">
{contentType === 'news' && (
<span class="header__news-badge"><a href="/news">Новости</a></span>
)}
<a href={`/${category.slug}`}>{category.name}</a>
</div>
)}
2025-12-11 01:12:45 +03:00
<Stores />
2026-03-08 19:09:23 +03:00
</div>
2025-12-17 23:05:49 +03:00
2026-03-08 19:09:23 +03:00
<MainMenu menuId={MENU_ID} />
2025-12-11 01:12:45 +03:00
</header>
<style>
2026-03-08 19:09:23 +03:00
.top-bar {
display: flex;
justify-content: space-between;
align-items: center;
}
.header__subtitle {
font-size: 22px;
font-weight: bold;
margin-left: 42px;
position: relative;
display: flex;
align-items: center;
gap: 10px;
}
.header__subtitle::before {
content: '';
position: absolute;
top: 50%;
left: -15px;
width: 3px;
height: 80%;
border-left: 3px solid;
transform: translate(0, -40%);
}
.header__news-badge {
color: inherit;
font-weight: inherit;
position: relative;
padding-right: 10px;
}
.header__news-badge::after {
content: '|';
position: absolute;
right: -2px;
color: inherit;
font-weight: inherit;
}
2025-12-11 01:12:45 +03:00
2026-03-08 19:09:23 +03:00
.header__subtitle a {
text-decoration: none;
color: inherit;
font-weight: inherit;
}
2026-03-02 00:39:07 +03:00
2026-03-08 19:09:23 +03:00
.header__subtitle a:hover {
text-decoration: underline;
}
2025-12-11 01:12:45 +03:00
</style>