-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnarratives.html
55 lines (46 loc) · 1.64 KB
/
narratives.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
<div class="cards">
<div class="card card-wide" data-order="0" data-name="">
<p class="lead">Narratives</p>
<p>A narrative is a collection of research reports on a single subject by one or more authors.</p>
<!--
<div class="text-right">
Sort by
<button id="sortName" class="button tiny">Name</button>
<button id="sortDate" class="button tiny">Date</button>
</div>
-->
<div class="pagination-container">
{{pagination}}
</div>
</div>
{%for narrative in narratives%}
{% if narrative.cover_image_thumb == "" %}
<div class="card" data-order="{{forloop.index}}" data-name="{{narrative.name}}">
<a class="whole-tile" href="{{narratives_path | append: "/" | append: narrative.id}}">
<span class="arrow">→</span>
</a>
<p class="smaller-text sans-serif">NARRATIVE</p>
<h3>{{narrative.name | link_to_show: project, narrative}}</h3>
<i class="fa fa-newspaper-o fa-4x card-symbol"></i>
</div>
{% else %}
<a href="{{narratives_path | append: "/" | append: narrative.id}}">
<div data-order="{{forloop.index}}" data-name="{{narrative.name}}" class="fill-link slip card" style="background:
linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)),
url('{{narrative.cover_image_thumb}}'); background-repeat: no-repeat; background-position: center; background-size: cover;">
<div class='card-label'><span>{{narrative.name}}</span><i>→</i></div>
</div>
</a>
{% endif %}
{%endfor%}
</div>
<script type="text/javascript">
$(function(){
$('#sortName').click(function(){
$grid.isotope({sortBy: 'name'});
})
$('#sortDate').click(function(){
$grid.isotope({ sortBy : 'order' });
})
})
</script>