User section – mobilní spodní lišta
Lišta je vidět jen na mobilu (zmenšete okno pod 768 px) a drží se spodní hrany.
Layout layout-user-section kvůli ní přidává obsahu spodní odsazení.
-
{# Lišta je fixní u spodní hrany a viditelná jen na mobilu (do breakpointu md). #} {% include "@Components/user-section-user-navigation-bar/user-section-user-navigation-bar.twig" with { props: { active: "watchdog", items: [ { key: "search", title: "Hledat", url: "#", icon: { src: "svg/user-section/search.svg" } }, { key: "watchdog", title: "Hlídače", url: "#", count: 15, icon: { src: "svg/user-section/bell.svg" } }, { key: "favourites", title: "Oblíbené", url: "#", icon: { src: "svg/user-section/heart.svg" } }, { key: "messages", title: "Zprávy", url: "#", icon: { src: "svg/user-section/envelope.svg" } }, { key: "menu", title: "Menu", tag: "button", extraClass: "--js-main-nav-open user-navigation-bar__ham-button", icon: { src: "svg/user-section/menu-user.svg" } }, ], } } %} -
<div class="user-navigation-bar user-navigation-bar--user-section"> <div class="user-navigation-bar__container container"> <ul class="user-navigation-bar__list"><li class="user-navigation-bar__cell"> <a class="user-navigation-bar__item" href="#"> <span class="user-navigation-bar__circle"> <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="8.6" cy="8.6" r="5.6"/><path d="M12.8 12.8l4 4"/></svg> </span> </span> <span class="user-navigation-bar__label">Hledat</span> </a> </li> <li class="user-navigation-bar__cell"> <a class="user-navigation-bar__item user-navigation-bar__item--active" href="#" aria-current="page"> <span class="user-navigation-bar__circle"> <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 class="user-navigation-bar__count">15</span> </span> <span class="user-navigation-bar__label">Hlídače</span> </a> </li> <li class="user-navigation-bar__cell"> <a class="user-navigation-bar__item" href="#"> <span class="user-navigation-bar__circle"> <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> <span class="user-navigation-bar__label">Oblíbené</span> </a> </li> <li class="user-navigation-bar__cell"> <a class="user-navigation-bar__item" href="#"> <span class="user-navigation-bar__circle"> <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> <span class="user-navigation-bar__label">Zprávy</span> </a> </li> <li class="user-navigation-bar__cell"> <button type="button" class="user-navigation-bar__item --js-main-nav-open user-navigation-bar__ham-button"> <span class="user-navigation-bar__circle"> <span class="icon"> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="17" viewBox="0 0 24 17" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><g transform="translate(-367.8 -632.2)"><g transform="translate(363.75 627.94)"><path d="M14.409,3.638l-.438-1.1a4.016,4.016,0,0,0-1-1.465L12.886,1a3.746,3.746,0,0,0-2.547-1H4.071A3.756,3.756,0,0,0,1.523,1l-.08.075a4.032,4.032,0,0,0-1,1.465L0,3.638" transform="translate(4.045 16.25)"/><path d="M7.469,1.281a4.375,4.375,0,1,1-6.187,0,4.375,4.375,0,0,1,6.187,0" transform="translate(6.875 4.277)"/></g><g transform="translate(-166.807 450.925)"><path d="M550.124,181.365h7.738M550.124,185.232h7.738M550.124,189.098h7.738"/></g></g></svg> </span> </span> <span class="user-navigation-bar__label">Menu</span> </button> </li> </ul> </div> </div>
Schema
{
"props": {
"active": {
"type": "string",
"description": "Klíč aktivní položky: search | watchdog | favourites | messages | menu"
},
"items": {
"type": "array of objects",
"description": "Vlastní položky { key, title, url, icon: { src }, count, isActive, tag: a (default) | button, extraClass }. Bez items se použije výchozí pětice Hledat · Hlídače · Oblíbené · Zprávy · Menu. Dřívější props.url (pátá položka „uživatel“) se už nepoužívá."
},
"user": {
"type": "context variable",
"description": "Výchozí položky berou adresy a počty z proměnné user: user.search.url, user.filter.{url,count}, user.wishlist.{url,count}, user.messages.{url,count}"
}
}
}