forked from theq629/sfu-natlang.website
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
98 lines (95 loc) · 2.77 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
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
---
layout: default
title:
pageclass: frontpage
extrascript: |
<script type="text/javascript">
$(function() {
var featured = $('#featured');
var num = $('#featured .carousel-inner .item').length;
featured.carousel({interval: false, pause: true});
featured.removeClass('slide');
featured.carousel(Math.floor(Math.random() * num));
featured.addClass('slide');
});
</script>
---
<div id="featured" class="carousel slide">
<div class="carousel-inner">
{% assign first = true %}
{% featured %}
{% for item in featured %}
<div class="item{% if first %} active{% endif %}">
<div class="carousel-imagearea">
{% if item.url %}
<a href="{{ site.baseurl }}{{ item.url }}"><img src="{{ site.baseurl }}{{ item.img }}" alt=""></a>
{% else %}
<img src="{{ item.img }}" alt="">
{% endif %}
</div>
<div class="carousel-caption">
<p>
{% if item.text %}
{{ item.text }}
{% endif %}
{% if item.url %}
<a href="{{ site.baseurl }}{{ item.url }}">More…</a>
{% endif %}
</p>
</div>
{% assign first = false %}
</div>
{% endfor %}
{% endfeatured %}
</div>
<a class="carousel-control left" href="#featured" data-slide="prev">‹</a>
<a class="carousel-control right" href="#featured" data-slide="next">›</a>
</div>
<h1>Publications</h1>
{% bibliography %}
<div class="more">
{% assign years = '' %}
{% for item in bibliography %}
{% if item.year != lastyear %}
{% capture years %}{{ years | append:' ' | append:item.year }}{% endcapture %}
{% assign lastyear = item.year %}
{% endif %}
{% endfor %}
{% stringtolist years %}
<ul class="yearlist">
{% for year in years limit:5 %}
<li><a href="{{ site.baseurl }}publications#year{{ year }}">{{ year }}</a></li>
{% endfor %}
<li><a href="{{ site.baseurl }}publications">All</a></li>
</ul>
{% endstringtolist %}
</div>
<ul class="bibliography">
{% for item in bibliography limit:5 %}
<li>{{ item.html }}</li>
{% endfor %}
</ul>
{% endbibliography %}
<h1>News</h1>
<div class="more">
{% assign years = '' %}
{% for post in site.posts %}
{% capture year %}{{ post.date | date: '%Y' }}{% endcapture %}
{% if year != lastyear %}
{% capture years %}{{ years | append:' ' | append:year }}{% endcapture %}
{% assign lastyear = year %}
{% endif %}
{% endfor %}
{% stringtolist years %}
<ul class="yearlist">
{% for year in years limit:5 %}
<li><a href="{{ site.baseurl }}posts#year{{ year }}">{{ year }}</a></li>
{% endfor %}
<li><a href="{{ site.baseurl }}posts">All</a></li>
</ul>
{% endstringtolist %}
</div>
{% for post in site.posts limit:5 %}
<h2><a href="{{ site.baseurl }}{{ post.url }}">{{ post.title | inline_textile }}</a> <small class="date">{{ post.date | date_to_string }}</small></h2>
{{ post.content }}
{% endfor %}