User section menu
Levé menu uživatelské sekce. V layoutu layout-user-section je fixní a roluje
samostatně; výchozí položky jsou v proměnné userMenu layoutu.
Počty, nadpis skupiny, podpoložky
-
-
{# V layoutu je menu fixní vlevo; tady je jen náhled v rámečku. #} <div style="width: 268px; height: 640px; position: relative; overflow: hidden; border: 1px solid #dce5ed;"> {% include "@Components/user-section-menu/user-section-menu.twig" with { props: { navs: [ { items: [ { title: "Domů", url: "#", iconBefore: true, icon: { src: "svg/user-section/home.svg", insertAsSvg: true } }, { title: "Oblíbené", url: "#", iconBefore: true, icon: { src: "svg/user-section/heart.svg", insertAsSvg: true }, count: "12" }, { title: "Realitní hlídač", url: "#", iconBefore: true, icon: { src: "svg/user-section/bell.svg", insertAsSvg: true } }, { title: "Zprávy", url: "#", iconBefore: true, icon: { src: "svg/user-section/envelope.svg", insertAsSvg: true }, count: "2", countVariant: "alert" }, ], }, { label: "Moje nemovitosti", items: [ { title: "Moje inzeráty", url: "#", iconBefore: true, icon: { src: "svg/user-section/listing.svg", insertAsSvg: true }, count: "15" }, { title: "Peněženka", url: "#", iconBefore: true, icon: { src: "svg/user-section/wallet.svg", insertAsSvg: true }, children: [ { title: "Transakce", url: "#", isActive: true }, { title: "Doklady", url: "#" }, ], }, ], }, ], bottomFixedNavs: [ { items: [ { title: "Nastavení", url: "#", iconBefore: true, icon: { src: "svg/user-section/settings.svg", insertAsSvg: true } }, { title: "Odhlásit se", url: "#", iconBefore: true, icon: { src: "svg/user-section/log-out.svg", insertAsSvg: true } }, ], }, ], } } %} </div> -
<div style="width: 268px; height: 640px; position: relative; overflow: hidden; border: 1px solid #dce5ed;"> <aside class="user-section-menu"> <div class="navs"> <nav> <ul> <li> <div class="user-section-menu__row"> <a class="link --black --icon-before" href="#"> <span class="link__title"> <span class="link__title-wrap">Domů</span> </span> <span class="link__icon "> <span class="icon"> <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3 9l7-5.5L17 9"/><path d="M5 8.5V16h10V8.5"/></svg> </span> </span> </a> </div> </li> <li> <div class="user-section-menu__row"> <a class="link --black --icon-before" href="#"> <span class="link__title"> <span class="link__title-wrap">Oblíbené</span> </span> <span class="link__icon "> <span class="icon"> <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M10 16.6S3 12.4 3 7.9A3.7 3.7 0 0110 6a3.7 3.7 0 017 1.9c0 4.5-7 8.7-7 8.7z"/></svg> </span> </span> </a> <span class="user-section-menu__count">12</span> </div> </li> <li> <div class="user-section-menu__row"> <a class="link --black --icon-before" href="#"> <span class="link__title"> <span class="link__title-wrap">Realitní hlídač</span> </span> <span class="link__icon "> <span class="icon"> <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M10 3a4.5 4.5 0 00-4.5 4.5c0 3-1.3 4.2-1.3 4.2h11.6s-1.3-1.2-1.3-4.2A4.5 4.5 0 0010 3z"/><path d="M8.4 14.6a1.7 1.7 0 003.2 0"/></svg> </span> </span> </a> </div> </li> <li> <div class="user-section-menu__row"> <a class="link --black --icon-before" href="#"> <span class="link__title"> <span class="link__title-wrap">Zprávy</span> </span> <span class="link__icon "> <span class="icon"> <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="2.5" y="5" width="15" height="10" rx="1.5"/><path d="M3 6l7 5 7-5"/></svg> </span> </span> </a> <span class="user-section-menu__count user-section-menu__count--alert">2</span> </div> </li> </ul> </nav> <nav aria-label="Moje nemovitosti"> <p class="nav-label">Moje nemovitosti</p> <ul> <li> <div class="user-section-menu__row"> <a class="link --black --icon-before" href="#"> <span class="link__title"> <span class="link__title-wrap">Moje inzeráty</span> </span> <span class="link__icon "> <span class="icon"> <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="3" y="4" width="14" height="12" rx="1.5"/><path d="M3 8h14"/></svg> </span> </span> </a> <span class="user-section-menu__count">15</span> </div> </li> <li class="user-section-menu__item--parent-active"> <div class="user-section-menu__row"> <a class="link --black --icon-before" href="#"> <span class="link__title"> <span class="link__title-wrap">Peněženka</span> </span> <span class="link__icon "> <span class="icon"> <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="2.5" y="5.5" width="15" height="9.5" rx="1.6"/><path d="M13.5 10.2h1.8"/></svg> </span> </span> </a> </div> <ul class="user-section-menu__subnav"> <li> <a class="user-section-menu__subitem user-section-menu__subitem--active" href="#" aria-current="page">Transakce</a> </li> <li> <a class="user-section-menu__subitem" href="#">Doklady</a> </li> </ul> </li> </ul> </nav> </div> <div class="navs bottom-fixed"> <nav> <ul> <li> <div class="user-section-menu__row"> <a class="link --black --icon-before" href="#"> <span class="link__title"> <span class="link__title-wrap">Nastavení</span> </span> <span class="link__icon "> <span class="icon"> <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="10" cy="10" r="2.6"/><path d="M10 3v2M10 15v2M3 10h2M15 10h2M5.3 5.3l1.4 1.4M13.3 13.3l1.4 1.4M14.7 5.3l-1.4 1.4M6.7 13.3l-1.4 1.4"/></svg> </span> </span> </a> </div> </li> <li> <div class="user-section-menu__row"> <a class="link --black --icon-before" href="#"> <span class="link__title"> <span class="link__title-wrap">Odhlásit se</span> </span> <span class="link__icon "> <span class="icon"> <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12.5 6.5H17M14.5 4.5L17 6.5l-2.5 2"/><path d="M12 3H5a1.5 1.5 0 00-1.5 1.5v11A1.5 1.5 0 005 17h7"/></svg> </span> </span> </a> </div> </li> </ul> </nav> </div> </aside></div>
Schema
{
"props": {
"topButtons": {
"type": "array of objects",
"description": "Volitelná tlačítka nad menu (props komponenty button), např. „Hledat nemovitost“. Prázdné pole = nic se nevykreslí."
},
"navs": {
"type": "array of objects",
"description": "Skupiny položek: { label, items[] }. label je volitelný nadpis skupiny (např. „Moje nemovitosti“)."
},
"navs[].items[]": {
"type": "object",
"description": "Props komponenty link (title, url, iconBefore, icon, isActive) + count, countVariant, children, isExpanded. Ikona s currentColor: icon: { src: 'svg/user-section/bell.svg', insertAsSvg: true }."
},
"navs[].items[].count": {
"type": "string | number",
"description": "Počet vpravo v řádku (Oblíbené 12)"
},
"navs[].items[].countVariant": {
"type": "string",
"description": "muted (default, šedý chip) | alert (červený – nepřečtené)"
},
"navs[].items[].children": {
"type": "array of objects",
"description": "Podpoložky { title, url, isActive } vykreslené odrážkou pod položkou (Peněženka → Transakce, Doklady)"
},
"navs[].items[].isExpanded": {
"type": "boolean",
"description": "Zobrazit podpoložky; výchozí = položka nebo některá podpoložka je aktivní"
},
"bottomFixedNavs": {
"type": "array of objects",
"description": "Spodní blok (Nastavení, Odhlásit se), stejný tvar jako navs"
}
}
}