Revision f6e90a2b cloudcms/templates/content/twitter_feed.html
b/cloudcms/templates/content/twitter_feed.html | ||
---|---|---|
1 |
<div class="section twitter-feed"> |
|
2 |
{% if content.title %} |
|
3 |
<h2>{{ content.title|safe }}</h2> |
|
4 |
{% endif %} |
|
5 |
<div id="twitter_feeds_section_{{ content.pk }}"> |
|
6 |
</div> |
|
7 |
</div> |
|
8 | 1 |
|
9 | 2 |
<script id="feeds-template-{{ content.pk }}" type="text/x-jquery-tmpl"> |
10 | 3 |
<li><b>${Name}</b> (${ReleaseYear})</li> |
... | ... | |
14 | 7 |
var el = $("#twitter_feeds_section_{{ content.pk }}"); |
15 | 8 |
$.twitter({{ content.js_conf|safe}}, function(tweets){ |
16 | 9 |
$.each(tweets.results, function(i,t){ |
17 |
console.log(t); |
|
18 | 10 |
var tweet = $('<div class="tweet">'); |
19 | 11 |
var date = $('<span class="date">'); |
20 | 12 |
var text = $('<span class="text">'); |
21 | 13 |
|
22 | 14 |
text.html(linkify(t.text)); |
23 |
date.html('<a href="http://twitter.com/#!/' + t.from_user + |
|
15 |
date.html('<a href="https://twitter.com/#!/' + t.from_user +
|
|
24 | 16 |
'">' + $.timeago(new Date(t.created_at)) + |
25 | 17 |
'</a>'); |
26 | 18 |
|
... | ... | |
32 | 24 |
|
33 | 25 |
}) |
34 | 26 |
</script> |
27 |
<div class="section twitter-feed"> |
|
28 |
{% if content.title %} |
|
29 |
<h2>{{ content.title|safe }}</h2> |
|
30 |
{% endif %} |
|
31 |
<div id="twitter_feeds_section_{{ content.pk }}"> |
|
32 |
</div> |
|
33 |
</div> |
Also available in: Unified diff