{%- if page.category_id -%} {%- if page.category_id == 'home' -%} {%- assign source = site.posts -%} {%- assign limit = page.limit | default: site.home_page_limit -%} {%- assign maximum = page.maximum | default: site.home_page_maximum -%} {%- else -%} {%- assign source = site.categories[page.category_id] -%} {%- assign limit = page.limit | default: site.category_page_limit -%} {%- assign maximum = page.maximum | default: site.category_page_maximum -%} {%- endif -%} {%- else -%} {%- assign source = 'ERROR' -%} {%- assign limit = 'ERROR' -%} {%- assign maximum = 'ERROR' -%} {%- endif -%} {%- if source.size > maximum -%} {%- assign flag = true -%} {%- else -%} {%- assign flag = false -%} {%- assign limit = source.size -%} {%- endif -%} {%- if source.size > 0 -%}

{{ page.list_title | default: "Последние записи" }}

{%- for item in source limit: limit -%}
{% include nova/utils/share_buttons.liquid item=item %} {% assign check_streams = site.streams | first %} {% if check_streams %}{% comment %} TODO: обязательно при рефакторинге не оставить этот ad-hoc {% endcomment %}

{% include nova/utils/categories.liquid item=item %}

{% endif %}

{{ item.date | date: site.date_format }} • {{ item.author | default: site.author }}

{%- if jekyll.environment == 'development' and item.recommend -%} {%- assign h_cls = ' class="fa-icon-star"' -%} {%- else -%} {%- assign h_cls = '' -%} {%- endif -%}

{{- item.title -}}

{{ item.excerpt | replace: ' {%- if item.content contains site.excerpt_separator -%}

Читать далее »

{%- endif -%} {%- if item.tags and item.tags.size > 0 -%}

{%- include nova/utils/tags.liquid item=item -%}

{%- endif -%} {%- if item.comments != false -%} {%- assign slug = item.url | slugify -%}

{%- include nova/stream/comment_count.liquid slug=slug url=item.url -%}

{%- endif -%}
{%- endfor -%} {%- endif -%} {%- if flag -%} {%- assign calendar = site.calendars | where: 'category_id', page.category_id | first -%} {%- if calendar.url -%} {%- endif -%} {%- endif -%}