-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
52 lines (49 loc) · 2.6 KB
/
index.html
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
---
layout: default
---
<div class="container">
<section class="splash">
<div class="splash-content">
<div class="splash-right">
<h1>ChinaComx: Comics Culture in the People's Republic of China</h1>
<p><i>A research project led by Lena Henningsen with funding from the European Research Council (Grant agreement ID: 101088049) located at the Centre for Asian and Transcultural Studies, Heidelberg University.</i></p>
</div>
</div>
<a href="#posts" class="scroll-down">↓</a>
</section>
<section id="posts" class="content-wrapper">
<div class="container">
<h2>News & Activities</h2>
<div class="post-navigation-arrows">
{% if current_page > 1 %}
<a href="{{ paginator.previous_page_path | default: '/' | append: '?page=' | append: current_page | minus: 1 }}" class="arrow prev-arrow">‹</a>
{% endif %}
<div class="post-grid">
{% assign posts_per_page = 3 %}
{% assign total_posts = site.posts.size %}
{% assign total_pages = total_posts | divided_by: posts_per_page | ceil %}
{% assign current_page = page | default: 1 %}
{% assign offset = current_page | times: posts_per_page | minus: posts_per_page %}
{% assign posts_to_show = site.posts | slice: offset, posts_per_page %}
{% for post in posts_to_show %}
<div class="post-card">
<a href="{{ post.url }}">
{% if post.image %}
<img src="{{ post.image | relative_url }}" alt="{{ post.title }}" class="post-image">
{% endif %}
<div class="post-info">
<h3>{{ post.title }}</h3>
<p class="post-date">{{ post.date | date: "%d %B %Y" }}</p>
<p>{{ post.excerpt | strip_html | truncate: 150 }}</p>
</div>
</a>
</div>
{% endfor %}
</div>
{% if current_page < total_pages %}
<a href="{{ paginator.next_page_path | default: '/' | append: '?page=' | append: current_page | plus: 1 }}" class="arrow next-arrow">›</a>
{% endif %}
</div>
</div>
</section>
</div>