-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathsection_cont.tpl
59 lines (33 loc) · 1.49 KB
/
section_cont.tpl
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
<script type="text/template" id="item-template">
<article class="news_item">
<% var rendition = false;
if (item.isHighlighted()){
rendition = item.getRendition("front_big");
}else{
rendition = item.getRendition("front_small");
}
if(rendition){
%>
<a href="<%= item.get('number') %>" class="thumbnail">
<img src="//<%= rendition %>" alt="" class="loading" />
</a>
<% } %>
<div class="content content_text">
<h6 class="info">
<% var d = new Date(item.get('published'));
var day = d.getDate();
var month = d.getMonth() + 1; //Months are zero based
var year = d.getFullYear();
var hours = d.getHours();
var min = d.getMinutes();
print( ('0'+ day).slice(-2) + "." + ('0'+month).slice(-2) + "." + year+", "+('0'+hours).slice(-2)+":"+('0'+min).slice(-2));
%>
</h6>
<h3 class="title"><a href="<%= item.get('number') %>"> <%= item.get('title') %></a></h3>
<p> <%= item.getDeck().replace(/^(.{200}[^\s]*).*/, "$1") %></p>
</div>
</article>
</script>
<div class="row" id="masonry_container">
</div>
<button id="load_more">load more</button>