forked from bitcoin-core/bitcoincore.org
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpost-index.html
More file actions
74 lines (65 loc) · 2.73 KB
/
post-index.html
File metadata and controls
74 lines (65 loc) · 2.73 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
<!doctype html>
{% include browser_magic.html %}
<head>
{% include head.html %}
</head>
<body class="post-index">
{% include browser-upgrade.html %}
{% include navigation.html %}
{% if page.image.feature %}
<div class="image-wrap">
<img src=
{% if page.image.feature contains 'http' %}
"{{ page.image.feature }}"
{% else %}
"/assets/images/{{ page.image.feature }}"
{% endif %}
alt="{% if page.image.alt %}{{ page.image.alt }}{% else %}{{ page.title | xml_escape }}{% endif %} feature image">
{% if page.image.byline %}
<span class="image-credit">{{ page.image.byline }}</span>
{% endif %}
{% if page.image.credit %}
<span class="image-credit">Photo Credit: <a href="{{ page.image.creditlink }}">{{ page.image.credit }}</a></span>
{% endif %}
</div><!-- /.image-wrap -->
{% endif %}
<div id="main" role="main">
<div class="article-author-side"> </div>
<div id="index">
<h1>{{ page.title | xml_escape }}</h1>
{% capture written_year %}'None'{% endcapture %}
{% assign english_posts=site.posts | where:"lang", 'en' | where:"type", 'posts' %}
{% assign advisories=site.posts | where:"lang", 'en' | where:"type", 'advisory' %}
{% assign all=advisories | concat: english_posts | sort: "date" | reverse %}
{% assign translated_posts=site.posts | where:"lang", page.lang | where:"type", 'posts' %}
{% assign translated_advisories=site.posts | where:"lang", page.lang | where:"type", 'advisory' %}
{% assign translated_all=translated_advisories | concat: translated_posts | sort: "date" | reverse %}
{% for default_post in all %}
{% assign post=default_post %}
{% for tpost in translated_all %}
{% if tpost.name == post.name %}{% assign found=true %}{% assign post=tpost %}{% break %}{% endif %}
{% endfor %}
{% capture year %}{{ post.date | date: '%Y' }}{% endcapture %}
{% if year != written_year %}
<h3 class="year">{{ year }}</h3>
{% capture written_year %}{{ year }}{% endcapture %}
{% endif %}
<article>
{% if post.link %}
<h2 class="link-post"><a href="{{ post.url }}" title="{{ post.title | xml_escape }}">{{ post.title | xml_escape }}</a> <a href="{{ post.link }}" target="_blank" title="{{ post.title | xml_escape }}"><i class="fa fa-link"></i></a></h2>
{% else %}
<h2><a href="{{ post.url }}" title="{{ post.title | xml_escape }}">{{ post.title }}</a></h2>
<p>{{ post.excerpt | markdownify | strip_html | truncate: 160 }}</p>
{% endif %}
</article>
{% endfor %}
</div><!-- /#index -->
</div><!-- /#main -->
<div class="footer-wrap">
<footer>
{% include footer.html %}
</footer>
</div><!-- /.footer-wrap -->
{% include scripts.html %}
</body>
</html>