-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
95 lines (82 loc) · 2.85 KB
/
index.html
File metadata and controls
95 lines (82 loc) · 2.85 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
86
87
88
89
90
91
92
93
94
95
---
layout: default
title: Home
---
<div class="posts">
{% if paginator.page == 1 %}
<!-- Static links to others medium -->
{% for item in site.data.links.medium_articles %}
<div class="post">
<div style="margin-left:5px; float:right; margin-top:5px; margin-right:2px">
<a href="{{ item.url }}">
<img src="{{ site.url }}/public/images/icons/drapeau_en.png">
</a>
</div>
<h1 class="post-title">
<a href="{{ item.url }}">
{{ item.title }}
</a>
</h1>
<span class="post-date">{{ item.date }}</span>
{{ item.description }}
<br>
<a href="{{ item.url }}">Read more ...</a>
<hr>
</div>
{% endfor %}
{% endif %}
{% for post in paginator.posts %}
{% if post.translated != true %}
<div class="post">
<!-- French will be the default -->
{% if post.lang == 'en' or post.lang == nil %}
<div style="margin-left:5px; float:right; margin-top:5px; margin-right:2px">
<a href="{{ post.url | absolute_url }}">
<img src="{{ site.url }}/public/images/icons/drapeau_en.png">
</a>
</div>
<!-- Waiting for real i8n -->
{% if post.has_translation %}
<div style="margin-left:5px; float:right; margin-top:5px; margin-right:2px">
<a href="{{ post.url | absolute_url | replace_first: 'en-','fr-' }}">
<img src="{{ site.url }}/public/images/icons/drapeau_fr.png">
</a>
</div>
{% endif %}
{% endif %}
{% if post.lang == 'fr' %}
<div style="margin-left:5px; float:right; margin-top:5px; margin-right:2px">
<a href="{{ post.url | absolute_url }}">
<img src="{{ site.url }}/public/images/icons/drapeau_fr.png">
</a>
</div>
{% endif %}
<h1 class="post-title">
<a href="{{ post.url | absolute_url }}">
{{ post.title }}
</a>
</h1>
<span class="post-date">{{ post.date | date_to_string }}</span>
{{ post.excerpt }}
<a href="{{ post.url | absolute_url }}">Read more ...</a>
<hr>
</div>
{% endif %}
{% endfor %}
</div>
<div class="pagination">
{% if paginator.next_page %}
<a class="pagination-item older" href="{{ paginator.next_page_path | absolute_url }}">Older</a>
{% else %}
<span class="pagination-item older">Older</span>
{% endif %}
{% if paginator.previous_page %}
{% if paginator.page == 2 %}
<a class="pagination-item newer" href="{{ '/' | absolute_url }}">Newer</a>
{% else %}
<a class="pagination-item newer" href="{{ paginator.previous_page_path | absolute_url }}">Newer</a>
{% endif %}
{% else %}
<span class="pagination-item newer">Newer</span>
{% endif %}
</div>