{{ 'section-blog-post.css' | asset_url | stylesheet_tag }}
{%- for block in section.blocks -%} {%- case block.type -%} {%- when '@app' -%}
{% render block %}
{%- when 'featured_image' -%} {%- if article.image -%}
{{ article.image.alt | escape }}
{%- endif -%} {%- when 'title' -%}

{{ article.title | escape }}

{%- if block.settings.blog_show_date -%} {{- article.published_at | time_tag: format: 'date' -}} {%- endif -%} {%- if block.settings.blog_show_author -%} {%- endif -%}
{%- when 'content' -%}
{{ article.content }}
{%- when 'share' -%}
{% assign share_url = request.origin | append: article.url %} {% render 'share-button', block: block, share_link: share_url %}
{%- endcase -%} {%- endfor -%}
{% render 'icon-arrow' %} {{ 'blogs.article.back_to_blog' | t: title: blog.title }}
{%- if blog.comments_enabled? -%}
{%- if article.comments_count > 0 -%} {%- assign anchorId = '#Comments-' | append: article.id -%}

{{ 'blogs.article.comments' | t: count: article.comments_count }}

{% paginate article.comments by 5 %}
{%- if comment.status == 'pending' and comment.content -%}
{{ comment.content }}
{{ comment.author }}
{%- endif -%} {%- for comment in article.comments -%}
{{ comment.content }}
{{ comment.author }} {{- comment.created_at | time_tag: format: 'date' -}}
{%- endfor -%} {% render 'pagination', paginate: paginate, anchor: anchorId %}
{% endpaginate %} {%- endif -%} {% form 'new_comment', article %} {%- liquid assign post_message = 'blogs.article.success' if blog.moderated? and comment.status == 'unapproved' assign post_message = 'blogs.article.success_moderated' endif -%}

{{ 'blogs.article.comment_form_title' | t }}

{%- if form.errors -%} {%- elsif form.posted_successfully? -%}

{% render 'icon-success' %} {{ post_message | t }}

{%- endif -%}
{%- if form.errors contains 'author' -%} {%- render 'icon-error' -%} {{- 'blogs.article.name' | t }} {{ form.errors.messages.author }}. {%- endif -%}
{%- if form.errors contains 'email' -%} {%- render 'icon-error' -%} {{- 'blogs.article.email' | t }} {{ form.errors.messages.email }}. {%- endif -%}
{%- if form.errors contains 'body' -%} {%- render 'icon-error' -%} {{- 'blogs.article.message' | t }} {{ form.errors.messages.body }}. {%- endif -%}
{%- if blog.moderated? -%}

{{ 'blogs.article.moderated' | t }}

{%- endif -%} {% endform %}
{%- endif -%}
{% schema %} { "name": "t:sections.main-article.name", "tag": "section", "class": "section", "blocks": [ { "type": "@app" }, { "type": "featured_image", "name": "t:sections.main-article.blocks.featured_image.name", "limit": 1, "settings": [ { "type": "select", "id": "image_height", "options": [ { "value": "adapt", "label": "t:sections.main-article.blocks.featured_image.settings.image_height.options__1.label" }, { "value": "small", "label": "t:sections.main-article.blocks.featured_image.settings.image_height.options__2.label" }, { "value": "medium", "label": "t:sections.main-article.blocks.featured_image.settings.image_height.options__3.label" }, { "value": "large", "label": "t:sections.main-article.blocks.featured_image.settings.image_height.options__4.label" } ], "default": "adapt", "label": "t:sections.main-article.blocks.featured_image.settings.image_height.label", "info": "t:sections.main-article.blocks.featured_image.settings.image_height.info" } ] }, { "type": "title", "name": "t:sections.main-article.blocks.title.name", "limit": 1, "settings": [ { "type": "checkbox", "id": "blog_show_date", "default": true, "label": "t:sections.main-article.blocks.title.settings.blog_show_date.label" }, { "type": "checkbox", "id": "blog_show_author", "default": false, "label": "t:sections.main-article.blocks.title.settings.blog_show_author.label" } ] }, { "type": "content", "name": "t:sections.main-article.blocks.content.name", "limit": 1 }, { "type": "share", "name": "t:sections.main-article.blocks.share.name", "limit": 2, "settings": [ { "type": "text", "id": "share_label", "label": "t:sections.main-article.blocks.share.settings.text.label", "default": "Share" }, { "type": "paragraph", "content": "t:sections.main-article.blocks.share.settings.featured_image_info.content" }, { "type": "paragraph", "content": "t:sections.main-article.blocks.share.settings.title_info.content" } ] } ] } {% endschema %}