<commit_before>{{ entries:listing
  folder="{fold}"
  limit="{lim}"
  taxonomy="{tax}"
}}
  {{ if no_results }}
  <p>Sorry there are no entries to display at this time.</p>
  {{ else }}

    {{ if first }}
    <ol>
    {{ endif }}
      <li>
        <article>
          <h3><a href="{{ url }}">{{ title }}</a></h3>
          
          {{ if date }}
          <time pubdate datetime="{{ datestamp format="Y-m-d" }}">{{ date }}</time>
          {{ endif }}
          
          {{ if categories_list && tags_list }}
          <p>Filed under: {{ categories_url_list }} and tagged with: {{ tags_url_list }}</p>
          {{ endif }}

          {{ if categories_list && !tags_list }}
          <p>Filed under: {{ categories_url_list }}</p>
          {{ endif }}

          {{ if !categories_list && tags_list }}
          <p>Tagged with: {{ tags_url_list }}</p>
          {{ endif }}

          {{ if main_img|not_empty }}
          <img src="{{ transform
            src="{{ main_img }}"
            width="400"
            height="300"
            action="smart"
          }}" alt="">
          {{ endif }}

          {{ summary|markdown }}
          
        </article>
      </li>
    {{ if last }}
    </ol>
    {{ endif }}

  {{ endif }}
{{ /entries:listing }}

{{# Add simple pagination: limit must equal entries limit #}}

{{ entries:pagination
  folder="{fold}"
  limit="{lim}"
  taxonomy="{tax}"
}}
  {{ if total_pages > 1 }}
  <div class="pagination">
    {{ if previous_page }}
      <a href="{{ previous_page }}" class="prev">&larr; Previous Page</a>
    {{ endif }}
    {{ if next_page }}
      <a href="{{ next_page }}" class="next">Next Page &rarr;</a>
    {{ endif }}
  </div><!-- END .pagination -->
  <div class="pageNumber">Page {{ current_page }} of {{ total_pages }}</div>
  {{ endif }}
{{ /entries:pagination }}

{{# 
====================================
  NOTES
====================================

This partial displays an article listing. The partials are designed so that you can use them modularly in your templates. The variables which are used in the entries listing tag are set in the template which calls the partial e.g. look in the default template you will see three variables: fold, lim, and tax. It is here where you set those values to whichever folder name the articles are reading from e.g. blog, the number of articles to display (lim) and whether you are displaying taxonomies or not.

The images are using the transform tag which caches images, for this to work you need to set up a cache folder in your assets/img directory with the writeable permissions. You then need to set this as your default location in your settings file: _transform_destination: assets/img/cache/

For more information on partials see http://statamic.com/learn/theming/partials.

#}}<commit_msg>Moved page number code and added some hooks for styling it better.<commit_after>{{ entries:listing
  folder="{fold}"
  limit="{lim}"
  taxonomy="{tax}"
}}
  {{ if no_results }}
  <p>Sorry there are no entries to display at this time.</p>
  {{ else }}

    {{ if first }}
    <ol>
    {{ endif }}
      <li>
        <article>
          <h3><a href="{{ url }}">{{ title }}</a></h3>
          
          {{ if date }}
          <time pubdate datetime="{{ datestamp format="Y-m-d" }}">{{ date }}</time>
          {{ endif }}
          
          {{ if categories_list && tags_list }}
          <p>Filed under: {{ categories_url_list }} and tagged with: {{ tags_url_list }}</p>
          {{ endif }}

          {{ if categories_list && !tags_list }}
          <p>Filed under: {{ categories_url_list }}</p>
          {{ endif }}

          {{ if !categories_list && tags_list }}
          <p>Tagged with: {{ tags_url_list }}</p>
          {{ endif }}

          {{ if main_img|not_empty }}
          <img src="{{ transform
            src="{{ main_img }}"
            width="400"
            height="300"
            action="smart"
          }}" alt="">
          {{ endif }}

          {{ summary|markdown }}
          
        </article>
      </li>
    {{ if last }}
    </ol>
    {{ endif }}

  {{ endif }}
{{ /entries:listing }}

{{# Add simple pagination: limit must equal entries limit #}}

{{ entries:pagination
  folder="{fold}"
  limit="{lim}"
  taxonomy="{tax}"
}}
  {{ if total_pages > 1 }}
  <div class="pagination">
    {{ if previous_page }}
      <a href="{{ previous_page }}" class="prev">&larr; Prev</a>
    {{ endif }}
    {{ if previous_page }}
    <span class="pageNumber withPrev">Page {{ current_page }} of {{ total_pages }}</span>
    {{ else }}
    <span class="pageNumber">Page {{ current_page }} of {{ total_pages }}</span>
    {{ endif }}
    {{ if next_page }}
      <a href="{{ next_page }}" class="next">Next &rarr;</a>
    {{ endif }}
  </div><!-- END .pagination -->
  {{ endif }}
{{ /entries:pagination }}

{{# 
====================================
  NOTES
====================================

This partial displays an article listing. The partials are designed so that you can use them modularly in your templates. The variables which are used in the entries listing tag are set in the template which calls the partial e.g. look in the default template you will see three variables: fold, lim, and tax. It is here where you set those values to whichever folder name the articles are reading from e.g. blog, the number of articles to display (lim) and whether you are displaying taxonomies or not.

The images are using the transform tag which caches images, for this to work you need to set up a cache folder in your assets/img directory with the writeable permissions. You then need to set this as your default location in your settings file: _transform_destination: assets/img/cache/

For more information on partials see http://statamic.com/learn/theming/partials.

#}}
{'fraction_non_alphanumeric': 0.16635128161018406, 'fraction_numerical': 0.0030965078272836744, 'mean_word_length': 2.5844636251541306, 'pattern_counts': {'":': 0, '<': 65, '<?xml version=': 0, '>': 67, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3394366', 'n_tokens_mistral': 1691, 'n_tokens_neox': 1605, 'n_words': 572}