From d5788cae9376d631c48110d1a2d890dc08247170 Mon Sep 17 00:00:00 2001 From: Cevdet Arda Haran <76725496+cevdetardaharan@users.noreply.github.com> Date: Tue, 26 Nov 2024 20:14:51 +0100 Subject: [PATCH] Fixes #3676 Delete unnecessary meta tags and re-order head element --- layout/password.liquid | 33 ++++++++--------- layout/theme.liquid | 78 +++++++++++++++++++-------------------- snippets/meta-tags.liquid | 12 +++--- 3 files changed, 60 insertions(+), 63 deletions(-) diff --git a/layout/password.liquid b/layout/password.liquid index 9bae7f57689..9d7ba5c9dfa 100644 --- a/layout/password.liquid +++ b/layout/password.liquid @@ -2,25 +2,13 @@ - - - - - {%- if settings.favicon != blank -%} - - {%- endif -%} + {{ shop.name }} {%- unless settings.type_header_font.system? -%} {%- endunless -%} - {{ shop.name }} - - - - {% render 'meta-tags' %} - {{ content_for_header }} {%- liquid @@ -174,6 +162,10 @@ } {% endstyle %} + {{ 'section-password.css' | asset_url | stylesheet_tag }} + {{ 'base.css' | asset_url | stylesheet_tag }} + {{ 'component-list-social.css' | asset_url | stylesheet_tag }} + {%- unless settings.type_body_font.system? -%} {% comment %}theme-check-disable AssetPreload{% endcomment %} @@ -185,13 +177,20 @@ {% comment %}theme-check-enable AssetPreload{% endcomment %} {%- endunless -%} - {{ 'section-password.css' | asset_url | stylesheet_tag }} - {{ 'base.css' | asset_url | stylesheet_tag }} - {{ 'component-list-social.css' | asset_url | stylesheet_tag }} - + + {%- if settings.favicon != blank -%} + + {%- endif -%} + + + + + + + {% render 'meta-tags' %} diff --git a/layout/theme.liquid b/layout/theme.liquid index 70db635823b..e5321645315 100644 --- a/layout/theme.liquid +++ b/layout/theme.liquid @@ -2,18 +2,7 @@ - - - - - {%- if settings.favicon != blank -%} - - {%- endif -%} - - {%- unless settings.type_header_font.system? and settings.type_body_font.system? -%} - - {%- endunless -%} {{ page_title }} @@ -22,25 +11,18 @@ {%- unless page_title contains shop.name %} – {{ shop.name }}{% endunless -%} - {% if page_description %} - - {% endif %} - - {% render 'meta-tags' %} - - - - - - - - - {%- if settings.animations_reveal_on_scroll -%} - - {%- endif -%} + {%- unless settings.type_header_font.system? and settings.type_body_font.system? -%} + + {%- endunless -%} {{ content_for_header }} + + {%- liquid assign body_font_bold = settings.type_body_font | font_modify: 'weight', 'bold' assign body_font_italic = settings.type_body_font | font_modify: 'style', 'italic' @@ -266,6 +248,15 @@ {{ 'component-discounts.css' | asset_url | stylesheet_tag }} {%- endif -%} + {%- if settings.predictive_search_enabled -%} + + {%- endif -%} + {%- unless settings.type_body_font.system? -%} {% comment %}theme-check-disable AssetPreload{% endcomment %} @@ -277,25 +268,34 @@ {% comment %}theme-check-enable AssetPreload{% endcomment %} {%- endunless -%} + + + + + + + + {%- if settings.animations_reveal_on_scroll -%} + + {%- endif -%} + {%- if localization.available_countries.size > 1 or localization.available_languages.size > 1 -%} {{ 'component-localization-form.css' | asset_url | stylesheet_tag: preload: true }} {%- endif -%} - {%- if settings.predictive_search_enabled -%} - + {%- if settings.favicon != blank -%} + {%- endif -%} - + + + + {% if page_description %} + + {% endif %} + + {% render 'meta-tags' %} diff --git a/snippets/meta-tags.liquid b/snippets/meta-tags.liquid index 4ca45a1418e..64c793ab76d 100644 --- a/snippets/meta-tags.liquid +++ b/snippets/meta-tags.liquid @@ -13,6 +13,11 @@ endif %} + +{%- if settings.social_twitter_link != blank -%} + +{%- endif -%} + @@ -30,10 +35,3 @@ {%- endif -%} - -{%- if settings.social_twitter_link != blank -%} - -{%- endif -%} - - -