Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
85 lines (83 loc) · 2.92 KB
/
Copy pathindex.html
File metadata and controls
85 lines (83 loc) · 2.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
---
layout: default
---
<div class="home">
<div class="site-header-container {% if site.cover %}has-cover{% endif %}">
{% if site.cover %}{% include cover.html src=site.cover sizes="(max-width: 767px) 260vw, max(100vw, 1330px)" %}{% endif %}
<div class="scrim {% if site.cover %}has-cover{% endif %}">
<header class="site-header">
<h1 class="title">{{ site.title }}</h1>
{% if site.subtitle %}
<p class="subtitle">{{ site.subtitle }}</p>
{% endif %}
</header>
</div>
</div>
<div class="wrapper">
<ul class="post-list">
{% for post in paginator.posts %}
<li lang="{{ post.lang | default: site.lang }}">
<h2>
<a class="post-link" href="{{ post.url | prepend: site.baseurl }}"
>{{ post.title | escape }}</a
>
</h2>
<section class="post-excerpt">
{%- comment -%}
`post.description`, not a cut of `post.content`: the body opens
with headings and raw TeX. It is the same text the meta tags and
the feed use — see _plugins/post_description.rb.
{%- endcomment -%}
<p>{{ post.description | shorten_card | escape }}</p>
</section>
<section class="post-meta">
<div class="post-date">{{ post.posted_at | date: site.date_format }}</div>
<div class="post-categories">
{% if post.categories.size > 0 %}in {% for cat in post.categories %}
<a href="{{ site.baseurl }}/categories/#{{ cat | slugify }}"
>{{ cat | replace: '-', ' ' }}</a
>{% if forloop.last == false %}, {% endif %} {% endfor %} {% endif
%}
</div>
</section>
</li>
{% endfor %}
</ul>
{%- comment -%}
Both directions are links, so both need an accessible name: the icons are
decorative and carry no text. The forward link is `older-posts`; it used
to reuse `newer-posts`, which is what the CSS keys off.
{%- endcomment -%}
<nav class="pagination" aria-label="Post list pages">
<p>
{% if paginator.previous_page %}
<a
class="newer-posts"
rel="prev"
aria-label="Newer posts"
href="{% if paginator.page == 2 %}{{ site.baseurl }}/{% else %}{{ site.baseurl }}{{ paginator.previous_page_path }}{% endif %}"
>
<span class="page-arrow" aria-hidden="true">{% include icon.html name="angles-left" %}</span>
</a>
{% else %}
<span class="page-arrow is-disabled" aria-hidden="true">{% include icon.html name="angles-left" %}</span>
{% endif %}
<span class="page-number"
>Page {{ paginator.page }} of {{ paginator.total_pages }}</span
>
{% if paginator.next_page %}
<a
class="older-posts"
rel="next"
aria-label="Older posts"
href="{{ site.baseurl }}{{ paginator.next_page_path }}"
>
<span class="page-arrow" aria-hidden="true">{% include icon.html name="angles-right" %}</span>
</a>
{% else %}
<span class="page-arrow is-disabled" aria-hidden="true">{% include icon.html name="angles-right" %}</span>
{% endif %}
</p>
</nav>
</div>
</div>