{{ 'component-slider.css' | asset_url | stylesheet_tag }} {{ 'component-card.css' | asset_url | stylesheet_tag }} {{ 'component-article-card.css' | asset_url | stylesheet_tag }} {{ 'section-featured-blog.css' | asset_url | stylesheet_tag }} {%- style -%} .section-{{ section.id }}-padding { padding-top: {{ section.settings.padding_top | times: 0.75 | round: 0 }}px; padding-bottom: {{ section.settings.padding_bottom | times: 0.75 | round: 0 }}px; } @media screen and (min-width: 750px) { .section-{{ section.id }}-padding { padding-top: {{ section.settings.padding_top }}px; padding-bottom: {{ section.settings.padding_bottom }}px; } } {%- endstyle -%} {%- liquid assign posts_displayed = section.settings.blog.articles_count if section.settings.post_limit <= section.settings.blog.articles_count or section.settings.post_limit <= 4 assign posts_exceed_limit = true assign posts_displayed = section.settings.post_limit endif -%}
{%- unless section.settings.heading == blank -%}

{{ section.settings.heading }}

{%- if section.settings.blog != blank and section.settings.show_view_all and section.settings.post_limit < section.settings.blog.articles_count -%} {{ 'sections.featured_blog.view_all' | t }} {%- endif -%}
{%- endunless -%}
    {%- if section.settings.blog != blank and section.settings.blog.articles_count > 0 -%} {%- for article in section.settings.blog.articles limit: section.settings.post_limit -%}
  • {% render 'article-card', blog: section.settings.blog, article: article, media_aspect_ratio: 1.66, show_image: section.settings.show_image, show_date: section.settings.show_date, show_author: section.settings.show_author, show_excerpt: true %}
  • {%- endfor -%} {%- else -%} {% for i in (1..section.settings.post_limit) -%} {%- assign placeholder_image_index = forloop.index0 | modulo: 3 | plus: 1 -%} {%- assign placeholder_image = 'blog-apparel-' | append: placeholder_image_index -%}
  • {%- if section.settings.show_image == true -%}
    {{ placeholder_image | placeholder_svg_tag: 'blog-placeholder-svg' }}
    {%- endif -%}

    {{ 'sections.featured_blog.onboarding_title' | t }}

    {{ 'sections.featured_blog.onboarding_content' | t }}

    {{ 'sections.featured_blog.onboarding_title' | t }}

    {{ 'sections.featured_blog.onboarding_content' | t }}

  • {%- endfor -%} {%- endif -%}
{%- if posts_exceed_limit -%}
1 {{ 'general.slider.of' | t }} {{ section.settings.post_limit }}
{%- endif -%}
{%- if section.settings.show_view_all and section.settings.post_limit < section.settings.blog.articles_count -%} {%- endif -%}
{% schema %} { "name": "t:sections.featured-blog.name", "tag": "section", "disabled_on": { "groups": ["header", "footer"] }, "settings": [ { "type": "inline_richtext", "id": "heading", "default": "Blog posts", "label": "t:sections.featured-blog.settings.heading.label" }, { "type": "select", "id": "heading_size", "options": [ { "value": "h2", "label": "t:sections.all.heading_size.options__1.label" }, { "value": "h1", "label": "t:sections.all.heading_size.options__2.label" }, { "value": "h0", "label": "t:sections.all.heading_size.options__3.label" } ], "default": "h1", "label": "t:sections.all.heading_size.label" }, { "type": "blog", "id": "blog", "label": "t:sections.featured-blog.settings.blog.label" }, { "type": "range", "id": "post_limit", "min": 2, "max": 4, "step": 1, "default": 3, "label": "t:sections.featured-blog.settings.post_limit.label" }, { "type": "range", "id": "columns_desktop", "min": 1, "max": 4, "step": 1, "default": 3, "label": "t:sections.featured-blog.settings.columns_desktop.label" }, { "type": "color_scheme", "id": "color_scheme", "label": "t:sections.all.colors.label", "info": "t:sections.all.colors.has_cards_info", "default": "scheme-1" }, { "type": "checkbox", "id": "show_image", "default": true, "label": "t:sections.featured-blog.settings.show_image.label", "info": "t:sections.featured-blog.settings.show_image.info" }, { "type": "checkbox", "id": "show_date", "default": true, "label": "t:sections.featured-blog.settings.show_date.label" }, { "type": "checkbox", "id": "show_author", "default": false, "label": "t:sections.featured-blog.settings.show_author.label" }, { "type": "checkbox", "id": "show_view_all", "default": true, "label": "t:sections.featured-blog.settings.show_view_all.label" }, { "type": "header", "content": "t:sections.all.padding.section_padding_heading" }, { "type": "range", "id": "padding_top", "min": 0, "max": 100, "step": 4, "unit": "px", "label": "t:sections.all.padding.padding_top", "default": 36 }, { "type": "range", "id": "padding_bottom", "min": 0, "max": 100, "step": 4, "unit": "px", "label": "t:sections.all.padding.padding_bottom", "default": 36 } ], "presets": [ { "name": "t:sections.featured-blog.presets.name" } ] } {% endschema %}