Guest User

Code header Debut

a guest
Jun 10th, 2021
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 2.13 KB | None | 0 0
  1. <div class="grid__item {{ logo_classes }}">
  2.         {% comment %}
  3.           Use the uploaded logo from theme settings if enabled.
  4.           Site name gets precedence with H1 tag on homepage, div on other pages.
  5.         {% endcomment %}
  6.         {% if request.page_type == 'index' %}
  7.           <h1 class="h2 site-header__logo grid">
  8.         {% else %}
  9.           <div class="h2 site-header__logo grid">
  10.         {% endif %}
  11.             <a class="grid__item small--hide medium-up--one-half site-header__logo-link" href="{{ routes.root_url }}">{{ shop.name }}</a>
  12.             {%- assign img_url = section.settings.logo | img_url: '1x1' | replace: '_1x1.', '_{width}x.' -%}
  13.             <a href="{{ routes.root_url }}" class="grid__item medium-up--one-half site-header__logo-image{% if section.settings.align_logo == 'center' %} site-header__logo-image--centered{% endif %}" data-image-loading-animation>
  14.               {% capture logo_alt %}{{ section.settings.logo.alt | default: shop.name }}{% endcapture %}
  15.               <img class="lazyload js"
  16.                   src="{{ section.settings.logo | img_url: '300x300' }}"
  17.                   data-src="{{ img_url }}"
  18.                   data-widths="[180, 360, 540, 720, 900, 1080, 1296, 1512, 1728, 2048]"
  19.                   data-aspectratio="{{ section.settings.logo.aspect_ratio }}"
  20.                   data-sizes="auto"
  21.                   alt="{{ logo_alt | escape }}"
  22.                   style="max-width: {{ section.settings.logo_max_width }}px">
  23.               <noscript>
  24.                 {% capture image_size %}{{ section.settings.logo_max_width | escape }}x{% endcapture %}
  25.                 <img src="{{ section.settings.logo | img_url: image_size }}"
  26.                     srcset="{{ section.settings.logo | img_url: image_size }} 1x, {{ section.settings.logo | img_url: image_size, scale: 2 }} 2x"
  27.                     alt="{{ section.settings.logo.alt | default: shop.name }}"
  28.                     style="max-width: {{ section.settings.logo_max_width }}px;">
  29.               </noscript>
  30.             </a>
  31.         {% if request.page_type == 'index' %}
  32.           </h1>
  33.         {% else %}
  34.           </div>
Advertisement
Add Comment
Please, Sign In to add comment