Revision 5cc874ca cloudcms/templates/content/twitter_feed.html
b/cloudcms/templates/content/twitter_feed.html | ||
---|---|---|
1 |
{{ load_code|safe }} |
|
1 | 2 |
|
2 |
<script id="feeds-template-{{ content.pk }}" type="text/x-jquery-tmpl"> |
|
3 |
<li><b>${Name}</b> (${ReleaseYear})</li> |
|
4 |
</script> |
|
5 |
<script> |
|
6 |
$(document).ready(function(){ |
|
7 |
var el = $("#twitter_feeds_section_{{ content.pk }}"); |
|
8 |
$.twitter({{ content.js_conf|safe}}, function(tweets){ |
|
9 |
$.each(tweets.results, function(i,t){ |
|
10 |
var tweet = $('<li>'); |
|
11 |
var date = $('<p class="date">'); |
|
12 |
var text = $('<p class="text">'); |
|
13 |
|
|
14 |
text.html(linkify(t.text)); |
|
15 |
date.html('<a href="https://twitter.com/#!/' + t.from_user + |
|
16 |
'">' + $.timeago(new Date(t.created_at)) + |
|
17 |
'</a>'); |
|
18 |
|
|
19 |
tweet.append(date); |
|
20 |
tweet.append(text); |
|
21 |
el.append(tweet); |
|
22 |
}) |
|
23 |
}) |
|
24 |
|
|
25 |
}) |
|
26 |
</script> |
|
27 | 3 |
<div class="follow"> |
28 | 4 |
{% if content.title %} |
29 | 5 |
<h3>{{ content.title|safe }}</h3> |
30 | 6 |
{% endif %} |
31 |
<ul id="twitter_feeds_section_{{ content.pk }}"> |
|
32 |
</ul> |
|
7 |
|
|
8 |
<a id="twitter-timeline-{{ content.id }}" |
|
9 |
class="twitter-timeline" |
|
10 |
data-widget-id="{{ content.widget_id }}" |
|
11 |
data-chrome="{{ content.chrome }}" |
|
12 |
data-tweet-limit="{{ content.limit }}" |
|
13 |
data-theme="{{ content.theme }}" |
|
14 |
data-link-color="{{ content.link_color }}" |
|
15 |
{% if content.border_color %} data-border-color="{{ content.link_color }}"{% endif %} |
|
16 |
{% if content.aria_politeness %} data-aria-polite="{{ content.aria_politeness }}"{% endif %} |
|
17 |
{% if content.screen_name %} data-screen-name="{{ content.screen_name }}"{% endif %} |
|
18 |
{% if content.custom_timeline_id %} data-custom-timeline-id="{{ content.custom_timeline_id }}"{% endif %} |
|
19 |
{% if content.favorites_screen_name %} data-favorites-screen-name="{{ content.favorites_screen_name }}"{% endif %} |
|
20 |
{% if content.list_owner_screen_name %} data-list-owner-screen-name="{{ content.list_owner_screen_name }}"{% endif %} |
|
21 |
{% if content.list_slug %} data-list-slug="{{ content.list_slug }}"{% endif %} |
|
22 |
{% if content.height %} height="{{ content.height }}"{% endif %} |
|
23 |
{% if content.extra_attributes %}{{ content.extra_attributes }}{% endif %} |
|
24 |
></a> |
|
33 | 25 |
</div> |
Also available in: Unified diff