Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="grid__item {{ logo_classes }}">
- {% comment %}
- Use the uploaded logo from theme settings if enabled.
- Site name gets precedence with H1 tag on homepage, div on other pages.
- {% endcomment %}
- {% if request.page_type == 'index' %}
- <h1 class="h2 site-header__logo grid">
- {% else %}
- <div class="h2 site-header__logo grid">
- {% endif %}
- <a class="grid__item small--hide medium-up--one-half site-header__logo-link" href="{{ routes.root_url }}">{{ shop.name }}</a>
- {%- assign img_url = section.settings.logo | img_url: '1x1' | replace: '_1x1.', '_{width}x.' -%}
- <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>
- {% capture logo_alt %}{{ section.settings.logo.alt | default: shop.name }}{% endcapture %}
- <img class="lazyload js"
- src="{{ section.settings.logo | img_url: '300x300' }}"
- data-src="{{ img_url }}"
- data-widths="[180, 360, 540, 720, 900, 1080, 1296, 1512, 1728, 2048]"
- data-aspectratio="{{ section.settings.logo.aspect_ratio }}"
- data-sizes="auto"
- alt="{{ logo_alt | escape }}"
- style="max-width: {{ section.settings.logo_max_width }}px">
- <noscript>
- {% capture image_size %}{{ section.settings.logo_max_width | escape }}x{% endcapture %}
- <img src="{{ section.settings.logo | img_url: image_size }}"
- srcset="{{ section.settings.logo | img_url: image_size }} 1x, {{ section.settings.logo | img_url: image_size, scale: 2 }} 2x"
- alt="{{ section.settings.logo.alt | default: shop.name }}"
- style="max-width: {{ section.settings.logo_max_width }}px;">
- </noscript>
- </a>
- {% if request.page_type == 'index' %}
- </h1>
- {% else %}
- </div>
Advertisement
Add Comment
Please, Sign In to add comment