Created
April 16, 2018 10:13
-
-
Save 1aurabrown/7df920458189b486ac93b998217263ec to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
```liquid | |
<header role="banner"> | |
{% if template.name == 'index' %} | |
<h1 itemscope itemtype="http://schema.org/Organization"> | |
{% else %} | |
<div class="h1" itemscope itemtype="http://schema.org/Organization"> | |
{% endif %} | |
<a href="/" itemprop="url" class="site-logo{% if section.settings.logo != blank %} site-header__logo-image{% endif %}"> | |
{% if section.settings.logo != blank %} | |
{% capture image_size %}{{ section.settings.logo_max_width }}x{% endcapture %} | |
{% capture mobile_image_size %}{{ section.settings.mobile_logo_max_width }}x{% endcapture %} | |
<img src="{{ section.settings.logo | img_url: image_size }}" | |
srcset=" | |
{{ section.settings.logo | img_url: image_size }} {{ section.settings.logo_max_width }}w, | |
{{ section.settings.logo | img_url: image_size, scale: 2 }} {{ section.settings.logo_max_width | times: 2}}w, | |
{{ section.settings.logo | img_url: mobile_image_size }} {{ section.settings.mobile_logo_max_width }}w, | |
{{ section.settings.logo | img_url: mobile_image_size, scale: 2 }} {{ section.settings.mobile_logo_max_width | times: 2}}w" | |
alt="{{ section.settings.logo.alt | default: shop.name }}" | |
sizes="(min-width: 750px) {{ section.settings.logo_max_width }}px, 150px" | |
itemprop="logo"> | |
{% else %} | |
{{ shop.name }} | |
{% endif %} | |
</a> | |
{% if template.name == 'index' %} | |
</h1> | |
{% else %} | |
</div> | |
{% endif %} | |
</header> | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment