{% from "theme/utils.html.j2" import page_anchor %}

{% macro last_posts(language, number) %}
  <ul class="brigid-side-block-last-posts">
    {% set pages = storage.get_posts(language=language) %}

    {% for page in pages[:number] %}
      <li class="brigid-side-block-post-link">
          <span class="brigid-list-marker">•</span>
          {{page_anchor(page, anchor_title=page_title(page, short=false))}}
      </li>
    {% endfor %}
  </ul>
{% endmacro %}
