Created
September 25, 2019 07:05
-
-
Save shopifypartners/233fe9ca3d47ef38bf96a6b93395bc1e to your computer and use it in GitHub Desktop.
How to use Shopify theme settings to create mobile-specific logos |
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
{% if section.settings.logo != blank %} | |
{% capture image_size %}{{ section.settings.logo_max_width }}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 }}"> | |
{% else %} | |
{{ shop.name }} | |
{% endif %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment