Skip to content

Commit 4ff7543

Browse files
committed
Feed html reorganized into partials for infinite scroll feature.
1 parent b552818 commit 4ff7543

File tree

2 files changed

+11
-16
lines changed

2 files changed

+11
-16
lines changed

code/ch7_infinite_scroll/ch7_final_video_collector/templates/feed/index.html

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,7 @@
55

66
<h1>Video Collector: Recent Videos</h1>
77

8-
{% for v in videos %}
9-
10-
<div class="video">
11-
<div><span class="title">{{ v.title }}</span></div>
12-
<a href="/videos/play/{{ v.id }}">
13-
14-
<img src="https://img.youtube.com/vi/{{ v.id }}/maxresdefault.jpg"
15-
class="img img-responsive {{ ' '.join(classes) }}"
16-
alt="{{ v.title }}"
17-
title="{{ v.title }}">
18-
19-
</a>
20-
</div>
21-
22-
{% endfor %}
23-
8+
{{ render_partial('feed/partials/video_list.html', videos=videos) }}
249

2510
</div>
2611

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{% for v in videos %}
2+
3+
<div class="video">
4+
<div><span class="title">{{ v.title }}</span></div>
5+
<a href="/videos/play/{{ v.id }}">
6+
{{ render_partial('shared/partials/_video_image.html', video=v) }}
7+
</a>
8+
</div>
9+
10+
{% endfor %}

0 commit comments

Comments
 (0)