District Theme SVG Logo in header

New Member
4 0 0

I've seen several answers for other themes but District is set up a bit different. Can anyone help me figure out how to add the SVG from the assets folder? Thanks!

 

<div class="logo-contain">
            {% if template.name == 'index' %}
              <h1 class="site-logo {% if section.settings.logo %}has-image{% endif %}" itemscope itemtype="http://schema.org/Organization">
            {% else %}
              <div class="site-logo {% if section.settings.logo %}has-image{% endif %}" itemscope itemtype="http://schema.org/Organization">
            {% endif %}
              {% if section.settings.logo %}
                <a href="{{ routes.root_url }}" itemprop="url" class="logo-image">
                  {%- assign image = section.settings.logo -%}
                  {%- assign image_default_width = section.settings.logo_max_width -%}
                  {%- assign image_2x_width = image_default_width | times: 2 -%}
                  {%- assign image_3x_width = image_default_width | times: 3 -%}
                  {%- assign image_default = image_default_width | append: 'x' -%}
                  {%- capture widths -%}{{ image_default_width }},{{ image_2x_width }},{{ image_3x_width }}{%- endcapture -%}
                  {% assign image_widths = widths %}
                  {% include 'theme-rias' %}
                  <img id="{{ img_id }}" class="lazyload"
                    src="{{ image | img_url: image_default }}"
                    data-src="{{ image_url_pattern }}"
                    data-widths="[{{ image_widths }}]"
                    data-aspectratio="{{ image.aspect_ratio }}"
                    data-sizes="auto"
                    alt="{{ image.alt | escape | default: shop.name }}">
                </a>
              {% else %}
                <a href="{{ routes.root_url }}" itemprop="url">{{ shop.name }}</a>
              {% endif %}
            {% if template.name == 'index' %}
              </h1>
            {% else %}
              </div>
            {% endif %}
          </div>
0 Likes

Hello 

Please refer below link:
https://community.shopify.com/c/Shopify-Design/Use-svg-file-for-logo/td-p/352373

This will help you. 

Want to modify or incorporate custom changes on store, Hire us.
If helpful then please Like and Accept Solution .
Email: pallavi@oscprofessionals.com
Skype : oscprofessionals-87
Free Review and advice for sale on store | Shopify Private App | Custom Theme Development | Custom Modifications In To Shopify Theme | SEO & Digital Marketing | Site Speed Optimization | Performance Site Audit
0 Likes