home.html 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. ---
  2. layout: base
  3. ---
  4. <div class="home">
  5. {%- if page.title -%}
  6. <h1 class="page-heading">{{ page.title }}</h1>
  7. {%- endif -%} {{ content }} {% if site.paginate %} {% assign posts =
  8. paginator.posts %} {% else %} {% assign posts = site.posts %} {% endif %} {%-
  9. if posts.size > 0 -%} {%- if page.list_title -%}
  10. <h2 class="post-list-heading">{{ page.list_title }}</h2>
  11. {%- endif -%}
  12. <ul class="post-list">
  13. {%- assign date_format = site.minima.date_format | default: "%b %-d, %Y" -%}
  14. {% assign posts_ordenados = site.posts | reverse %}
  15. {% for post in posts_ordenados %}
  16. <li>
  17. <span class="post-meta">{{ post.date | date: date_format }}</span>
  18. <h3>
  19. <a class="post-link" href="{{ post.url | relative_url }}">
  20. {{ post.title | escape }}
  21. </a>
  22. </h3>
  23. {%- if site.minima.show_excerpts -%} {{ post.excerpt }} {%- endif -%}
  24. </li>
  25. {%- endfor -%}
  26. </ul>
  27. {% if site.paginate %}
  28. <div class="pager">
  29. <ul class="pagination">
  30. {%- if paginator.previous_page %}
  31. <li>
  32. <a
  33. href="{{ paginator.previous_page_path | relative_url }}"
  34. class="previous-page"
  35. title="Go to Page {{ paginator.previous_page }}"
  36. >
  37. {{ paginator.previous_page }}
  38. </a>
  39. </li>
  40. {%- else %}
  41. <li><div class="pager-edge">•</div></li>
  42. {%- endif %}
  43. <li><div class="current-page">{{ paginator.page }}</div></li>
  44. {%- if paginator.next_page %}
  45. <li>
  46. <a
  47. href="{{ paginator.next_page_path | relative_url }}"
  48. class="next-page"
  49. title="Go to Page {{ paginator.next_page }}"
  50. >
  51. {{ paginator.next_page }}
  52. </a>
  53. </li>
  54. {%- else %}
  55. <li><div class="pager-edge">•</div></li>
  56. {%- endif %}
  57. </ul>
  58. </div>
  59. {%- endif %} {%- endif -%}
  60. </div>