Guest User

Code header

a guest
Nov 8th, 2021
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 23.56 KB | None | 0 0
  1. {%- comment -%}
  2. IMPLEMENTATION NOTE: the header in Focal is pretty complex as it allows a lot of different layouts. In order to make
  3. this code as efficient as possible and avoid as many reflows, we are using a lot of different CSS variables. If you
  4. need to touch this code, make sure to do it with EXTRA CARE as it may have some unwanted side effects
  5. {%- endcomment -%}
  6.  
  7. <style>
  8. :root {
  9. --enable-sticky-header: {% if section.settings.enable_sticky_header %}1{% else %}0{% endif %};
  10. --enable-transparent-header: {% if request.page_type == 'index' and section.settings.enable_transparent_header %}1{% else %}0{% endif %};
  11. --loading-bar-background: {{ settings.header_text_color.red }}, {{ settings.header_text_color.green }}, {{ settings.header_text_color.blue }}; /* Prevent the loading bar to be invisible */
  12. }
  13.  
  14. #shopify-section-{{ section.id }} {
  15. {%- assign header_border_color = settings.header_background | color_mix: settings.header_text_color, 85 -%}
  16.  
  17. --header-background: {{ settings.header_background.red }}, {{ settings.header_background.green }}, {{ settings.header_background.blue }};
  18. --header-text-color: {{ settings.header_text_color.red }}, {{ settings.header_text_color.green }}, {{ settings.header_text_color.blue }};
  19. --header-border-color: {{ header_border_color.red }}, {{ header_border_color.green }}, {{ header_border_color.blue }};
  20. --reduce-header-padding: {% if section.settings.reduce_desktop_padding %}1{% else %}0{% endif %};
  21.  
  22. {%- if section.settings.enable_sticky_header -%}
  23. position: -webkit-sticky;
  24. position: sticky;
  25. {%- else -%}
  26. position: relative;
  27. {%- endif -%}
  28.  
  29. top: {% if section.settings.enable_sticky_header %}calc(var(--enable-sticky-announcement-bar) * var(--announcement-bar-height, 0px)){% else %}0{% endif %};
  30. z-index: 4;
  31. }
  32.  
  33. {%- if request.page_type == 'index' and section.settings.enable_transparent_header -%}
  34. #shopify-section-{{ section.id }} {
  35. margin-bottom: calc(-1 * (var(--header-height, 0px) + var(--enable-sticky-announcement-bar) * var(--announcement-bar-height, 0px)));
  36. }
  37.  
  38. .js #shopify-section-{{ section.id }} .header--transparent {
  39. {%- if settings.header_text_color == section.settings.transparent_header_text_color -%}
  40. {%- assign header_bubble_text_color = settings.header_background -%}
  41. {%- else -%}
  42. {%- assign header_bubble_text_color = settings.header_text_color -%}
  43. {%- endif -%}
  44.  
  45. --header-background: transparent;
  46. --header-text-color: {{ section.settings.transparent_header_text_color.red }}, {{ section.settings.transparent_header_text_color.green }}, {{ section.settings.transparent_header_text_color.blue }};
  47. --header-border-color: {{ section.settings.transparent_header_text_color.red }}, {{ section.settings.transparent_header_text_color.green }}, {{ section.settings.transparent_header_text_color.blue }}, 0.15;
  48. --header-transparent-bubble-text-color: {{ header_bubble_text_color.red }}, {{ header_bubble_text_color.green }}, {{ header_bubble_text_color.blue }};
  49. }
  50. {%- endif -%}
  51.  
  52. #shopify-section-{{ section.id }} .header__logo-image {
  53. max-width: {{ section.settings.mobile_logo_max_width }}px;
  54. }
  55.  
  56. @media screen and (min-width: 741px) {
  57. #shopify-section-{{ section.id }} .header__logo-image {
  58. max-width: {{ section.settings.logo_max_width }}px;
  59. }
  60. }
  61.  
  62. @media screen and (min-width: 1200px) {
  63. {%- if section.settings.header_layout == 'logo_left_navigation_inline' -%}
  64. /* For this navigation we have to move the logo at the first and add a margin */
  65. [dir="rtl"] .header__logo {
  66. margin-left: 40px;
  67. }
  68.  
  69. [dir="ltr"] .header__logo {
  70. margin-right: 40px;
  71. }
  72.  
  73. .header__logo {
  74. order: -1;
  75. }
  76.  
  77. @media screen and (min-width: 741px) {
  78. .header__secondary-links {
  79. max-width: max-content;
  80. margin-inline-start: 48px;
  81. }
  82. }
  83. {%- endif -%}
  84.  
  85. {%- if section.settings.header_layout == 'logo_left_navigation_center' -%}
  86. /* For this navigation we have to move the logo and make sure the navigation takes the whole width */
  87. .header__logo {
  88. order: -1;
  89. flex: 1 1 0;
  90. }
  91.  
  92. .header__inline-navigation {
  93. flex: 1 1 auto;
  94. justify-content: center;
  95. max-width: max-content;
  96. margin-inline: 48px;
  97. }
  98. {%- endif -%}
  99. }
  100.  
  101. {%- if request.page_type == '404' -%}
  102. .shopify-section--404 {
  103. /* For the 404 page, we re-use the same colors as the header for design reason */
  104. --background: {{ settings.header_background.red }}, {{ settings.header_background.green }}, {{ settings.header_background.blue }};
  105. --heading-color: {{ settings.header_text_color.red }}, {{ settings.header_text_color.green }}, {{ settings.header_text_color.blue }};
  106. --text-color: {{ settings.header_text_color.red }}, {{ settings.header_text_color.green }}, {{ settings.header_text_color.blue }};
  107. --primary-button-background: {{ settings.header_text_color.red }}, {{ settings.header_text_color.green }}, {{ settings.header_text_color.blue }};
  108. --primary-button-text-color: {{ settings.header_background.red }}, {{ settings.header_background.green }}, {{ settings.header_background.blue }};
  109. }
  110. {%- endif -%}
  111. </style>
  112.  
  113. <store-header {% if section.settings.enable_sticky_header %}sticky{% endif %} {% if request.page_type == 'index' and section.settings.enable_transparent_header %}transparent{% endif %} class="header {% if settings.background == settings.header_background %}header--bordered{% endif %} {% if request.page_type == 'index' and section.settings.enable_transparent_header %}header--transparent{% endif %}" role="banner">
  114. {%- assign menu = section.settings.navigation_menu -%}
  115.  
  116. <div class="container">
  117. <div class="header__wrapper">
  118. <!-- LEFT PART -->
  119. <nav class="header__inline-navigation" {% unless section.settings.header_layout == 'logo_center_search_open' %}role="navigation"{% endunless %}>
  120. {%- if menu.links.size > 0 and section.settings.header_layout == 'logo_left_navigation_inline' or section.settings.header_layout == 'logo_left_navigation_center' or section.settings.header_layout == 'logo_center_navigation_inline' -%}
  121. {%- render 'desktop-menu', menu: menu -%}
  122. {%- endif -%}
  123.  
  124. <div class="header__icon-list {% if section.settings.header_layout == 'logo_center_search_open' %}hidden-desk{% endif %}">
  125. {%- if menu.links.size > 0 -%}
  126. <button is="toggle-button" class="header__icon-wrapper tap-area {% unless section.settings.header_layout == 'drawer' %}hidden-desk{% endunless %}" aria-controls="mobile-menu-drawer" aria-expanded="false">
  127. <span class="visually-hidden">{{ 'header.general.navigation' | t }}</span>
  128. {%- render 'icon' with 'header-hamburger' -%}
  129. </button>
  130. {%- endif -%}
  131.  
  132. <a href="{{ routes.search_url }}" is="toggle-link" class="header__icon-wrapper tap-area {% if section.settings.header_layout == 'logo_center_search_open' %}hidden-lap{% endif %} hidden-desk" aria-controls="search-drawer" aria-expanded="false" aria-label="{{ 'search.general.title' | t | escape }}">
  133. {%- render 'icon' with 'header-search' -%}
  134. </a>
  135. </div>
  136.  
  137. {%- if section.settings.header_layout == 'logo_center_search_open' -%}
  138. <div class="header__search-bar predictive-search hidden-pocket">
  139. <form class="predictive-search__form" action="{{ routes.search_url }}" method="get" role="search">
  140. <input type="hidden" name="type" value="product">
  141. <input type="hidden" name="options[prefix]" value="last">
  142. <input type="hidden" name="options[unavailable_products]" value="{{ settings.search_unavailable_products }}">
  143.  
  144. {%- render 'icon' with 'header-search' -%}
  145. <input class="predictive-search__input" is="predictive-search-input" type="text" name="q" autocomplete="off" autocorrect="off" aria-controls="search-drawer" aria-expanded="false" aria-label="{{ 'search.general.title' | t }}" placeholder="{{ 'search.general.search_placeholder' | t }}">
  146. </form>
  147. </div>
  148. {%- endif -%}
  149. </nav>
  150.  
  151. <!-- LOGO PART -->
  152. {%- capture logo -%}
  153. <a class="header__logo-link" href="{{ routes.root_url }}">
  154.   {%- if section.settings.logo != blank -%}
  155.     {%- capture logo_size -%}{{ section.settings.logo_max_width | at_least: section.settings.mobile_logo_max_width | times: 2 | append: 'x' }}{%- endcapture -%}
  156.     <span class="visually-hidden">{{ shop.name }}</span>
  157.     <img class="header__logo-image hidden-phone" width="{{ section.settings.logo.width }}" height="{{ section.settings.logo.height }}" src="{{ section.settings.logo | img_url: logo_size }}" alt="{{ section.settings.logo.alt | escape }}">
  158.     <img class="header__logo-image hidden-tablet-and-up" width="{{ section.settings.logo_mobile.width }}" height="{{ section.settings.logo_mobile.height }}" src="{{ section.settings.logo_mobile | img_url: logo_size }}" alt="{{ section.settings.logo_mobile.alt | escape }}">
  159.  
  160.     {%- if request.page_type == 'index' and section.settings.enable_transparent_header and section.settings.transparent_logo != blank -%}
  161.       <img class="header__logo-image header__logo-image--transparent" width="{{ section.settings.transparent_logo.width }}" height="{{ section.settings.transparent_logo.height }}" src="{{ section.settings.transparent_logo | img_url: logo_size }}" alt="{{ section.settings.transparent_logo.alt | escape }}">
  162.     {%- endif -%}
  163.   {%- else -%}
  164.     <span class="header__logo-text heading h5">{{ shop.name }}</span>
  165.   {%- endif -%}
  166. </a>
  167. {%- endcapture -%}
  168.  
  169. {%- if request.page_type == 'index' -%}
  170. <h1 class="header__logo">{{ logo }}</h1>
  171. {%- else -%}
  172. <span class="header__logo">{{ logo }}</span>
  173. {%- endif -%}
  174.  
  175. <!-- SECONDARY LINKS PART -->
  176. <div class="header__secondary-links">
  177. {%- if section.settings.show_locale_selector and shop.published_locales.size > 1 -%}
  178. {%- assign locale_selector = true -%}
  179. {%- endif -%}
  180.  
  181. {%- if section.settings.show_currency_selector and shop.enabled_currencies.size > 1 -%}
  182. {%- assign currency_selector = true -%}
  183. {%- endif -%}
  184.  
  185. {%- if locale_selector or currency_selector -%}
  186. {%- form 'localization', id: 'header-localization-form', class: 'header__cross-border hidden-pocket' -%}
  187. {%- if currency_selector -%}
  188. <div class="popover-container">
  189. <input type="hidden" name="currency_code" value="{{ form.current_currency.iso_code }}">
  190. <span class="visually-hidden">{{ 'header.general.currency' | t }}</span>
  191.  
  192. <button type="button" is="toggle-button" class="popover-button text--small" aria-expanded="false" aria-controls="header-localization-form-currency">
  193. {{- form.current_currency.iso_code }} {% if form.current_currency.symbol %}{{ form.current_currency.symbol -}}{%- endif -%}
  194. {%- render 'icon' with 'chevron', width: 9, height: 6, inline: true -%}
  195. </button>
  196.  
  197. <popover-content id="header-localization-form-currency" class="popover">
  198. <span class="popover__overlay"></span>
  199.  
  200. <header class="popover__header">
  201. <span class="popover__title heading h6">{{- 'header.general.currency' | t -}}</span>
  202.  
  203. <button type="button" class="popover__close-button tap-area tap-area--large" data-action="close" title="{{ 'general.accessibility.close' | t | escape }}">
  204. {%- render 'icon' with 'close' -%}
  205. </button>
  206. </header>
  207.  
  208. <div class="popover__content">
  209. <div class="popover__choice-list">
  210. {%- for currency in form.available_currencies -%}
  211. <button type="submit" name="currency_code" value="{{ currency.iso_code }}" class="popover__choice-item">
  212. <span class="popover__choice-label" {% if currency.iso_code == form.current_currency.iso_code %}aria-current="true"{% endif %}>
  213. {{ currency.iso_code }} {% if currency.symbol %}{{ currency.symbol }}{% endif %}
  214. </span>
  215. </button>
  216. {%- endfor -%}
  217. </div>
  218. </div>
  219. </popover-content>
  220. </div>
  221. {%- endif -%}
  222.  
  223. {%- if locale_selector -%}
  224. <div class="popover-container">
  225. <input type="hidden" name="locale_code" value="{{ form.current_locale.iso_code }}">
  226. <span class="visually-hidden">{{ 'header.general.language' | t }}</span>
  227.  
  228. <button type="button" is="toggle-button" class="popover-button text--small" aria-expanded="false" aria-controls="header-localization-form-locale">
  229. {{- form.current_locale.endonym_name | capitalize -}}
  230. {%- render 'icon' with 'chevron', width: 9, height: 6, inline: true -%}
  231. </button>
  232.  
  233. <popover-content id="header-localization-form-locale" class="popover">
  234. <span class="popover__overlay"></span>
  235.  
  236. <header class="popover__header">
  237. <span class="popover__title heading h6">{{- 'header.general.language' | t -}}</span>
  238.  
  239. <button type="button" class="popover__close-button tap-area tap-area--large" data-action="close" title="{{ 'general.accessibility.close' | t | escape }}">
  240. {%- render 'icon' with 'close' -%}
  241. </button>
  242. </header>
  243.  
  244. <div class="popover__content">
  245. <div class="popover__choice-list">
  246. {%- for locale in form.available_locales -%}
  247. <button type="submit" name="locale_code" value="{{ locale.iso_code }}" class="popover__choice-item">
  248. <span class="popover__choice-label" {% if locale.iso_code == form.current_locale.iso_code %}aria-current="true"{% endif %}>
  249. {{- locale.endonym_name | capitalize -}}
  250. </span>
  251. </button>
  252. {%- endfor -%}
  253. </div>
  254. </div>
  255. </popover-content>
  256. </div>
  257. {%- endif -%}
  258. {%- endform -%}
  259. {%- endif -%}
  260.  
  261. <div class="header__icon-list">
  262. {%- comment -%}IMPLEMENTATION NOTE: this icon is hidden by the "popup" section if it is disabled{%- endcomment -%}
  263. <button is="toggle-button" class="header__icon-wrapper tap-area hidden-phone {% unless section.settings.show_icons %}hidden-desk{% endunless %}" aria-controls="newsletter-popup" aria-expanded="false">
  264. <span class="visually-hidden">{{ 'header.general.newsletter' | t }}</span>
  265. {%- render 'icon' with 'header-email' -%}
  266. </button>
  267.  
  268. {%- if section.settings.header_layout != 'logo_center_search_open' -%}
  269. <a href="{{ routes.search_url }}" is="toggle-link" class="header__icon-wrapper tap-area hidden-pocket hidden-lap {% unless section.settings.show_icons %}hidden-desk{% endunless %}" aria-label="{{ 'search.general.title' | t | escape }}" aria-controls="search-drawer" aria-expanded="false">
  270. {%- render 'icon' with 'header-search' -%}
  271. </a>
  272. {%- endif -%}
  273.  
  274. {%- if shop.customer_accounts_enabled -%}
  275. <a href="{% if customer %}{{ routes.account_url }}{% else %}{{ routes.account_login_url }}{% endif %}" class="header__icon-wrapper tap-area hidden-phone {% unless section.settings.show_icons %}hidden-desk{% endunless %}" aria-label="{% if customer %}{{ 'header.general.account' | t | escape }}{% else %}{{ 'header.general.login' | t | escape }}{% endif %}">
  276. {%- render 'icon' with 'header-customer' -%}
  277. </a>
  278. {%- endif -%}
  279.  
  280. <a href="{{ routes.cart_url }}" {% unless settings.cart_type == 'page' or request.page_type == 'cart' %}is="toggle-link" aria-controls="mini-cart" aria-expanded="false"{% endunless %} class="header__icon-wrapper tap-area {% unless section.settings.show_icons %}hidden-desk{% endunless %}" aria-label="{{ 'header.general.cart' | t | escape }}" data-no-instant>
  281. {%- render 'icon' with 'header-cart' -%}
  282. <cart-count class="header__cart-count header__cart-count--floating bubble-count">{{ cart.item_count }}</cart-count>
  283. </a>
  284. </div>
  285.  
  286. {%- unless section.settings.show_icons -%}
  287. <ul class="header__linklist list--unstyled hidden-pocket hidden-lap" role="list">
  288. {%- comment -%}
  289. <!-- NOTE: There is really not enough space to fit this, so this is commented by default in Liquid -->
  290. <li class="header__linklist-item">
  291. <button is="toggle-button" aria-controls="newsletter-popup" aria-expanded="false">{{ 'header.general.newsletter' | t }}</button>
  292. </li>
  293. {%- endcomment -%}
  294.  
  295. {%- if section.settings.header_layout != 'logo_center_search_open' -%}
  296. <li class="header__linklist-item">
  297. <a href="{{ routes.search_url }}" is="toggle-link" aria-controls="search-drawer" aria-expanded="false">{{ 'search.general.title' | t | escape }}</a>
  298. </li>
  299. {%- endif -%}
  300.  
  301. {%- if shop.customer_accounts_enabled -%}
  302. <li class="header__linklist-item">
  303. <a href="{% if customer %}{{ routes.account_url }}{% else %}{{ routes.account_login_url }}{% endif %}">
  304. {%- if customer -%}
  305. {{ 'header.general.account' | t }}
  306. {%- else -%}
  307. {{ 'header.general.login' | t }}
  308. {%- endif -%}
  309. </a>
  310. </li>
  311. {%- endif -%}
  312.  
  313. <li class="header__linklist-item">
  314. <a href="{{ routes.cart_url }}" {% unless settings.cart_type == 'page' %}is="toggle-link" aria-controls="mini-cart" aria-expanded="false"{% endunless %} data-no-instant>
  315. {{- 'header.general.cart' | t | escape -}}
  316. <cart-count class="header__cart-count bubble-count">{{ cart.item_count }}</cart-count>
  317. </a>
  318. </li>
  319. </ul>
  320. {%- endunless -%}
  321. </div>
  322. </div>
  323.  
  324. {%- if menu.links.size > 0 and section.settings.header_layout == 'logo_center_search_open' -%}
  325. <nav class="header__bottom-navigation hidden-pocket hidden-lap" role="navigation">
  326. {% render 'desktop-menu', menu: menu, bottom_navigation: true %}
  327. </nav>
  328. {%- endif -%}
  329. </div>
  330. </store-header>
  331.  
  332. {%- comment -%}
  333. ------------------------------------------------------------------------------------
  334. CART NOTIFICATION: it is used to show the notification when a product is added in message mode
  335. ------------------------------------------------------------------------------------
  336. {%- endcomment -%}
  337.  
  338. <cart-notification global hidden class="cart-notification {% unless section.settings.enable_sticky_header %}cart-notification--fixed{% endunless %}"></cart-notification>
  339.  
  340. {%- comment -%}
  341. ------------------------------------------------------------------------------------
  342. MOBILE MENU DRAWER
  343. ------------------------------------------------------------------------------------
  344. {%- endcomment -%}
  345.  
  346. {%- assign menu = section.settings.sidebar_navigation_menu | default: section.settings.navigation_menu -%}
  347. {%- render 'mobile-menu', menu: menu -%}
  348.  
  349. {%- comment -%}
  350. ------------------------------------------------------------------------------------
  351. SEARCH DRAWER
  352. ------------------------------------------------------------------------------------
  353. {%- endcomment -%}
  354.  
  355. {%- render 'predictive-search' -%}
  356.  
  357. <script>
  358. (() => {
  359. const headerElement = document.getElementById('shopify-section-{{ section.id }}'),
  360. headerHeight = headerElement.clientHeight,
  361. headerHeightWithoutBottomNav = headerElement.querySelector('.header__wrapper').clientHeight;
  362.  
  363. document.documentElement.style.setProperty('--header-height', headerHeight + 'px');
  364. document.documentElement.style.setProperty('--header-height-without-bottom-nav', headerHeightWithoutBottomNav + 'px');
  365. })();
  366. </script>
  367.  
  368. {% schema %}
  369. {
  370. "name": "Header",
  371. "class": "shopify-section--header",
  372. "settings": [
  373. {
  374. "type": "checkbox",
  375. "id": "enable_sticky_header",
  376. "label": "Enable sticky header",
  377. "default": true
  378. },
  379. {
  380. "type": "header",
  381. "content": "Logo"
  382. },
  383. {
  384. "type": "image_picker",
  385. "id": "logo",
  386. "label": "Image",
  387. "info": "280 x 80px .png recommended"
  388. },
  389. {
  390. "type": "image_picker",
  391. "id": "logo_mobile",
  392. "label": "Image mobile",
  393. "info": "280 x 80px .png recommended"
  394. },
  395. {
  396. "type": "range",
  397. "id": "logo_max_width",
  398. "min": 50,
  399. "max": 300,
  400. "step": 5,
  401. "unit": "px",
  402. "label": "Image width",
  403. "default": 140
  404. },
  405. {
  406. "type": "range",
  407. "id": "mobile_logo_max_width",
  408. "min": 50,
  409. "max": 170,
  410. "step": 5,
  411. "unit": "px",
  412. "label": "Mobile image width",
  413. "default": 100
  414. },
  415. {
  416. "type": "header",
  417. "content": "Navigation"
  418. },
  419. {
  420. "type": "link_list",
  421. "id": "navigation_menu",
  422. "label": "Menu",
  423. "default": "main-menu"
  424. },
  425. {
  426. "type": "link_list",
  427. "id": "sidebar_navigation_menu",
  428. "label": "Mobile menu",
  429. "info": "Select a different menu for mobile sidebar. If none is set the main menu is used."
  430. },
  431. {
  432. "type": "header",
  433. "content": "Desktop",
  434. "info": "Those settings apply on large screen only"
  435. },
  436. {
  437. "type": "select",
  438. "id": "header_layout",
  439. "label": "Layout",
  440. "options": [
  441. {
  442. "value": "logo_left_navigation_inline",
  443. "label": "Logo left, navigation inline"
  444. },
  445. {
  446. "value": "logo_left_navigation_center",
  447. "label": "Logo left, navigation center"
  448. },
  449. {
  450. "value": "logo_center_navigation_inline",
  451. "label": "Logo center, navigation inline"
  452. },
  453. {
  454. "value": "logo_center_search_open",
  455. "label": "Logo center, search highlighted"
  456. },
  457. {
  458. "value": "drawer",
  459. "label": "Drawer"
  460. }
  461. ],
  462. "default": "logo_left_navigation_inline"
  463. },
  464. {
  465. "type": "checkbox",
  466. "id": "show_icons",
  467. "label": "Show icons",
  468. "default": false
  469. },
  470. {
  471. "type": "checkbox",
  472. "id": "reduce_desktop_padding",
  473. "label": "Reduce padding",
  474. "default": false
  475. },
  476. {
  477. "type": "header",
  478. "content": "Language selector",
  479. "info": "To add a language, go to your [language settings.](/admin/settings/languages)"
  480. },
  481. {
  482. "type": "checkbox",
  483. "id": "show_locale_selector",
  484. "label": "Show language selector",
  485. "default": true
  486. },
  487. {
  488. "type": "header",
  489. "content": "Currency selector",
  490. "info": "To add a currency, go to your [currency settings.](/admin/settings/payments)"
  491. },
  492. {
  493. "type": "checkbox",
  494. "id": "show_currency_selector",
  495. "label": "Show currency selector",
  496. "default": true
  497. },
  498. {
  499. "type": "header",
  500. "content": "Transparent header",
  501. "info": "Home page only. For best results, use an image section such as slideshow."
  502. },
  503. {
  504. "type": "checkbox",
  505. "id": "enable_transparent_header",
  506. "label": "Enable",
  507. "default": false
  508. },
  509. {
  510. "type": "color",
  511. "id": "transparent_header_text_color",
  512. "label": "Text color",
  513. "default": "#ffffff"
  514. },
  515. {
  516. "type": "image_picker",
  517. "id": "transparent_logo",
  518. "label": "Logo image",
  519. "info": "Uses the dimensions set on your main logo."
  520. },
  521. {
  522. "type": "header",
  523. "content": "Search"
  524. },
  525. {
  526. "type": "link_list",
  527. "id": "search_menu",
  528. "label": "Quick links menu",
  529. "info": "Display quick links when empty. This menu has limited support for dropdown items."
  530. }
  531. ],
  532. "blocks": [
  533. {
  534. "type": "mega_menu",
  535. "name": "Mega menu",
  536. "settings": [
  537. {
  538. "type": "text",
  539. "id": "menu_item",
  540. "label": "Menu item",
  541. "info": "Enter menu item to apply a mega menu dropdown. [Learn more](https://support.maestrooo.com/article/180-navigation-enabling-and-configuring-mega-navigation)."
  542. },
  543. {
  544. "type": "select",
  545. "id": "images_position",
  546. "label": "Images position",
  547. "info": "When featuring 4 images or more, we recommend to not use any dropdown links to keep the navigation easy to use.",
  548. "options": [
  549. {
  550. "value": "left",
  551. "label": "Left"
  552. },
  553. {
  554. "value": "right",
  555. "label": "Right"
  556. }
  557. ],
  558. "default": "right"
  559. },
  560. {
  561. "type": "header",
  562. "content": "Image 1"
  563. },
  564. {
  565. "type": "image_picker",
  566. "id": "image_1",
  567. "label": "Image",
  568. "info": "560 x 420px .jpg recommended"
  569. },
  570. {
  571. "type": "text",
  572. "id": "image_1_heading",
  573. "label": "Heading"
  574. },
  575. {
  576. "type": "text",
  577. "id": "image_1_text",
  578. "label": "Text"
  579. },
  580. {
  581. "type": "url",
  582. "id": "image_1_link",
  583. "label": "Link"
  584. },
  585. {
  586. "type": "header",
  587. "content": "Image 2"
  588. },
  589. {
  590. "type": "image_picker",
  591. "id": "image_2",
  592. "label": "Image",
  593. "info": "560 x 420px .jpg recommended"
  594. },
  595. {
  596. "type": "text",
  597. "id": "image_2_heading",
  598. "label": "Heading"
  599. },
  600. {
  601. "type": "text",
  602. "id": "image_2_text",
  603. "label": "Text"
  604. },
  605. {
  606. "type": "url",
  607. "id": "image_2_link",
  608. "label": "Link"
  609. },
  610. {
  611. "type": "header",
  612. "content": "Image 3"
  613. },
  614. {
  615. "type": "image_picker",
  616. "id": "image_3",
  617. "label": "Image",
  618. "info": "560 x 420px .jpg recommended"
  619. },
  620. {
  621. "type": "text",
  622. "id": "image_3_heading",
  623. "label": "Heading"
  624. },
  625. {
  626. "type": "text",
  627. "id": "image_3_text",
  628. "label": "Text"
  629. },
  630. {
  631. "type": "url",
  632. "id": "image_3_link",
  633. "label": "Link"
  634. },
  635. {
  636. "type": "header",
  637. "content": "Image 4"
  638. },
  639. {
  640. "type": "image_picker",
  641. "id": "image_4",
  642. "label": "Image",
  643. "info": "560 x 420px .jpg recommended"
  644. },
  645. {
  646. "type": "text",
  647. "id": "image_4_heading",
  648. "label": "Heading"
  649. },
  650. {
  651. "type": "text",
  652. "id": "image_4_text",
  653. "label": "Text"
  654. },
  655. {
  656. "type": "url",
  657. "id": "image_4_link",
  658. "label": "Link"
  659. },
  660. {
  661. "type": "header",
  662. "content": "Image 5"
  663. },
  664. {
  665. "type": "image_picker",
  666. "id": "image_5",
  667. "label": "Image",
  668. "info": "560 x 420px .jpg recommended"
  669. },
  670. {
  671. "type": "text",
  672. "id": "image_5_heading",
  673. "label": "Heading"
  674. },
  675. {
  676. "type": "text",
  677. "id": "image_5_text",
  678. "label": "Text"
  679. },
  680. {
  681. "type": "url",
  682. "id": "image_5_link",
  683. "label": "Link"
  684. },
  685. {
  686. "type": "header",
  687. "content": "Image 6"
  688. },
  689. {
  690. "type": "image_picker",
  691. "id": "image_6",
  692. "label": "Image",
  693. "info": "560 x 420px .jpg recommended"
  694. },
  695. {
  696. "type": "text",
  697. "id": "image_6_heading",
  698. "label": "Heading"
  699. },
  700. {
  701. "type": "text",
  702. "id": "image_6_text",
  703. "label": "Text"
  704. },
  705. {
  706. "type": "url",
  707. "id": "image_6_link",
  708. "label": "Link"
  709. }
  710. ]
  711. }
  712. ]
  713. }
  714. {% endschema %}
Advertisement
Add Comment
Please, Sign In to add comment