|
1 | | -{% if site.paginate %} |
2 | | - {% assign posts = paginator.posts %} |
3 | | -{% else %} |
4 | | - {% assign posts = site.posts %} |
5 | | -{% endif %} |
6 | | - |
7 | | -{%- if posts.size > 0 -%} |
8 | | - {%- if page.list_title -%} |
9 | | - <h2 class="post-list-heading">{{ page.list_title }}</h2> |
10 | | - {%- endif -%} |
11 | | - <div class="post-list"> |
12 | | - {%- assign date_format = site.bpdevs.date_format | default: "%b %-d, %Y" -%} |
13 | | - {% assign count = 0 %} |
14 | | - {%- for post in posts -%} |
15 | | - <div> |
16 | | - <h3> |
17 | | - <a class="post-link" href="{{ post.url | relative_url }}"> |
18 | | - {{ post.title | escape }} |
19 | | - </a> |
20 | | - </h3> |
21 | | - <span class="post-meta">{{ post.date | date: date_format }}</span> |
22 | | - {%- if site.show_excerpts -%} |
23 | | - <p class="post-description"> |
24 | | - {{ post.description }} |
25 | | - </p> |
26 | | - {%- endif -%} |
27 | | - </div> |
28 | | - {%- assign count = count | plus:1 -%} |
29 | | - {%- endfor -%} |
30 | | - </div> |
31 | | - |
32 | | - {% if site.paginate %} |
33 | | - <div class="pagination"> |
34 | | - {%- if paginator.previous_page %} |
35 | | - <a href="{{ paginator.previous_page_path | relative_url }}" class="prev">← Prev</a> |
36 | | - {%- else %} |
37 | | - <span class="disabled prev">← Prev</span> |
38 | | - {%- endif %} |
39 | | - |
40 | | - {%- if paginator.next_page %} |
41 | | - <a href="{{ paginator.next_page_path | relative_url }}" class="next">Next →</a> |
42 | | - {%- else %} |
43 | | - <span class="disabled next">Next →</span> |
44 | | - {%- endif %} |
45 | | - </div> |
46 | | - |
47 | | - {%- endif %} |
48 | | - |
49 | | -{%- endif -%} |
| 1 | +{% if site.paginate %} {% assign posts = paginator.posts %} {% else %} {% assign posts = site.posts %} {% endif %} {%- if posts.size > 0 -%} {%- if page.list_title -%} |
| 2 | +<h2 class="post-list-heading">{{ page.list_title }}</h2> |
| 3 | +{%- endif -%} |
| 4 | +<div class="post-list"> |
| 5 | + {%- assign date_format = site.bpdevs.date_format | default: "%b %-d, %Y" -%} {% assign count = 0 %} {%- for post in posts -%} |
| 6 | + <div> |
| 7 | + <h3> |
| 8 | + <a class="post-link" href="{{ post.url | relative_url }}"> {{ post.title | escape }} </a> |
| 9 | + </h3> |
| 10 | + <span class="post-meta">{{ post.date | date: date_format }}</span> |
| 11 | + {%- if site.show_excerpts -%} |
| 12 | + <p class="post-description">{{ post.description }}</p> |
| 13 | + {%- endif -%} |
| 14 | + </div> |
| 15 | + {%- assign count = count | plus:1 -%} {%- endfor -%} |
| 16 | +</div> |
| 17 | + |
| 18 | +{% if site.paginate %} |
| 19 | +<div class="pagination"> |
| 20 | + {%- if paginator.previous_page %} |
| 21 | + <a href="{{ paginator.previous_page_path | relative_url }}" class="prev">← Prev</a> |
| 22 | + {%- else %} |
| 23 | + <span class="disabled prev">← Prev</span> |
| 24 | + {%- endif %} {%- if paginator.next_page %} |
| 25 | + <a href="{{ paginator.next_page_path | relative_url }}" class="next">Next →</a> |
| 26 | + {%- else %} |
| 27 | + <span class="disabled next">Next →</span> |
| 28 | + {%- endif %} |
| 29 | +</div> |
| 30 | + |
| 31 | +{%- endif %} {%- endif -%} |
0 commit comments