|
| 1 | +--- |
| 2 | +layout: default |
| 3 | +title: News |
| 4 | +description: Insights and Updates from the AML Lab |
| 5 | +--- |
| 6 | + |
| 7 | +<div class="news-list"> |
| 8 | + {% for post in paginator.posts %} |
| 9 | + <article class="post-card"> |
| 10 | + <h2 class="post-card-title"><a href="{{ post.url | relative_url }}">{{ post.title }}</a></h2> |
| 11 | + <div class="post-meta"> |
| 12 | + <time datetime="{{ post.date | date_to_xmlschema }}">{{ post.date | date: "%B %-d, %Y" }}</time> |
| 13 | + {% if post.author %} · {{ post.author }}{% endif %} |
| 14 | + {% if post.categories.size > 0 %} |
| 15 | + · {% for cat in post.categories %}<span class="post-tag">{{ cat }}</span>{% unless forloop.last %} {% endunless %}{% endfor %} |
| 16 | + {% endif %} |
| 17 | + </div> |
| 18 | + <div class="post-excerpt"> |
| 19 | + {{ post.excerpt | strip_html | truncatewords: 60 }} |
| 20 | + </div> |
| 21 | + <a href="{{ post.url | relative_url }}" class="read-more-link">Read more →</a> |
| 22 | + </article> |
| 23 | + {% endfor %} |
| 24 | +</div> |
| 25 | + |
| 26 | +{% if paginator.total_pages > 1 %} |
| 27 | +<nav class="news-pagination" aria-label="News pages"> |
| 28 | + {% if paginator.previous_page %} |
| 29 | + <a href="{{ paginator.previous_page_path | relative_url }}" class="pagination-btn">« Newer</a> |
| 30 | + {% else %} |
| 31 | + <span class="pagination-btn disabled">« Newer</span> |
| 32 | + {% endif %} |
| 33 | + |
| 34 | + {% for page_num in (1..paginator.total_pages) %} |
| 35 | + {% if page_num == paginator.page %} |
| 36 | + <span class="pagination-btn current">{{ page_num }}</span> |
| 37 | + {% elsif page_num == 1 %} |
| 38 | + <a href="{{ '/news/' | relative_url }}" class="pagination-btn">{{ page_num }}</a> |
| 39 | + {% else %} |
| 40 | + <a href="{{ site.paginate_path | relative_url | replace: ':num', page_num }}" class="pagination-btn">{{ page_num }}</a> |
| 41 | + {% endif %} |
| 42 | + {% endfor %} |
| 43 | + |
| 44 | + {% if paginator.next_page %} |
| 45 | + <a href="{{ paginator.next_page_path | relative_url }}" class="pagination-btn">Older »</a> |
| 46 | + {% else %} |
| 47 | + <span class="pagination-btn disabled">Older »</span> |
| 48 | + {% endif %} |
| 49 | +</nav> |
| 50 | +{% endif %} |
0 commit comments