forked from betagouv/beta.gouv.fr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathblog.html
58 lines (48 loc) · 2.08 KB
/
blog.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
53
54
55
56
57
58
---
title: Blog
menu_index: 4
redirect_from:
- /annonces
additional_css: blog
---
<section class="ui container blog-container">
<ul>
{% for post in site.posts %}
<li class="ui segment blog-segment">
<a class="blog-segment-link" title="{{ post.title }}" href="{{ post.url }}"></a>
{% if post.authors %}
{% for author in post.authors %}
{% capture id %}/authors/{{ author }}{% endcapture %}
{% assign description = site.authors | where:"id", id | first %}
{% capture avatar %}
<img class="ui avatar image" alt="" src="{% if description.avatar %}{{ description.avatar }}{% else %}/img{{ description.id }}.jpg{% endif %}" />
{% endcapture %}
<div class="ui horizontal list">
<div class="item">
{{ avatar }}
<div class="content">
<div class="header">{{ description.fullname }}</div>
</div>
</div>
</div>
{% endfor %}
{% endif %}
<a class="blog-title-link" href="{{ post.url }}">{{ post.title }}</a>
<div class="blog-parution-date">Paru le {{ post.date | date: "%d/%m/%Y" }}</div>
{% capture mastheadImagePath %}/img/{{ post.path | replace:'_posts','posts' | replace:'.html','' | replace:'.md','' }}.jpg{% endcapture %}
<div class="thumbnail">
<img src="{{ mastheadImagePath }}" alt="">
</div>
{% if post.category == 'evenement' %}
<div class="vevent">
Retrouvez-nous le <time datetime="{{ post.start }}">{{ post.start | date: "%m/%d/%Y à %R" }}</time> ({{ post.location }}).
</div>
{% endif %}
<div>
{{ post.excerpt }}
</div>
<a href="{{ post.url }}">Lire la suite...</a>
</li>
{% endfor %}
</ul>
</section>