-
Notifications
You must be signed in to change notification settings - Fork 2
/
news.html
129 lines (121 loc) · 4.59 KB
/
news.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
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
---
title: News
layout: default
permalink: /news/
mathjax: false
---
<div class="container-fluid bg-2" id="updates" name="updates">
<div id="slidingNews" class="carousel slide" data-ride="carousel">
<!-- Indicators -->
<ul class="carousel-indicators">
<li data-target="#slidingNews" data-slide-to="0" class="active"></li>
<li data-target="#slidingNews" data-slide-to="1"></li>
<li data-target="#slidingNews" data-slide-to="2"></li>
</ul>
<!-- The slideshow -->
<div class="carousel-inner" id="headlineCarousel">
{% assign years_topstories = site.data.news | where:"topstory",true | group_by: "month" | sort: "month" %}
{% for year in years_topstories %}
{% assign stories = year.items | sort: "month" %}
{% for story in stories reversed %}
<div class="carousel-item {% if years_topstories.first == year %}active{% endif %}">
<div class="row">
<div class="col-lg-2 col-md-0 col-sm-1"></div>
<div class="col-lg-8 col-md-12 col-sm-10">
<div class="card headline" style="border: none;">
<div class="row">
<div class="col-lg-8 col-md-6 col-sm-12">
<div class="card-body">
<h1 class="card-title">{{ story.headline }}</h1>
<p class="card-text text-light">{{ story.text }}</p>
<p class="card-text">
<small class="text-light">
{% case story.month %}
{% when 1 %}January
{% when 2 %}February
{% when 3 %}March
{% when 4 %}April
{% when 5 %}May
{% when 6 %}June
{% when 7 %}July
{% when 8 %}August
{% when 9 %}September
{% when 10 %}October
{% when 11 %}November
{% when 12 %}December
{% endcase %} {{ story.year }}
</small>
</p>
{% if story.link != "" %}
<div class="read-more">
<a class="btn btn-primary" href="{{ story.link }}">Read more</a>
</div>
{% endif %}
</div>
</div>
{% if story.img != "" %}
<div class="col-lg-4 col-md-6 col-sm-12">
<img class="card-img-top" src="{{ story.img }}" alt="{{ story.alt }}" />
</div>
{% endif %}
</div>
</div>
</div>
<div class="col-lg-2 col-md-0 col-sm-1"></div>
</div>
</div>
{% endfor %}
{% endfor %}
</div>
<!-- Left and right controls -->
<a class="carousel-control-prev" href="#slidingNews" data-slide="prev">
<span class="carousel-control-prev-icon"></span>
</a>
<a class="carousel-control-next" href="#slidingNews" data-slide="next">
<span class="carousel-control-next-icon"></span>
</a>
</div>
</div>
<!-- More news -->
<div class="container-fluid bg-3">
<div class="card-columns" style="padding:20px;" id="newsFlash" name="newsFlash">
{% assign years_stories = site.data.news | where:"topstory",false | group_by: "year" | sort: "year" %}
{% for year in years_stories %}
{% assign stories = year.items | sort: "month" %}
{% for story in stories reversed %}
<div class="card">
{% if story.img != "" and story.alt != "" %}
<img class="card-img-top" src="{{ story.img }}" alt="{{ story.alt }}" />
{% endif %}
<div class="card-body">
<h5 class="card-text text-dark">{{ story.headline }}</h5>
<p class="card-text text-dark">{{ story.text }}</p>
<p class="card-text">
<small class="text-muted">
{% case story.month %}
{% when 1 %}January
{% when 2 %}February
{% when 3 %}March
{% when 4 %}April
{% when 5 %}May
{% when 6 %}June
{% when 7 %}July
{% when 8 %}August
{% when 9 %}September
{% when 10 %}October
{% when 11 %}November
{% when 12 %}December
{% endcase %} {{ story.year }}
</small>
</p>
{% if story.link != "" %}
<div class="read-more">
<a class="btn btn-primary" href="{{ story.link }}">Read more</a>
</div>
{% endif %}
</div>
</div>
{% endfor %}
{% endfor %}
</div>
</div>