add thumbnails to videoob web
This commit is contained in:
parent
aa1a2a2921
commit
887f7d98de
4 changed files with 51 additions and 23 deletions
|
|
@ -9,6 +9,7 @@ Videoob Web
|
|||
<head>
|
||||
<title>${self.title()}</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
${next.css()}
|
||||
</head>
|
||||
<body>
|
||||
${next.body()}
|
||||
|
|
|
|||
|
|
@ -2,9 +2,19 @@
|
|||
|
||||
<%inherit file="base.mako"/>
|
||||
|
||||
<%def name="video_link(item)">
|
||||
<a href="${item['page_url']}">${item['title']}</a>
|
||||
## (<a href="${item['url']}"><em>download</em></a>)
|
||||
<%def name="css()" filter="trim">
|
||||
<link rel="stylesheet" type="text/css" href="style.css"/>
|
||||
</%def>
|
||||
|
||||
<%def name="video_item(item)">
|
||||
<div class="video-item">
|
||||
<a href="${item['page_url']}">
|
||||
<img src="${item['thumbnail_url']}" alt="${item['title']}"/>
|
||||
<br/>
|
||||
${item['title']}
|
||||
</a>
|
||||
## (<a href="${item['url']}"><em>download</em></a>)
|
||||
</div>
|
||||
</%def>
|
||||
|
||||
<%def name="body()">
|
||||
|
|
@ -18,19 +28,15 @@
|
|||
</div>
|
||||
<div id="results">
|
||||
% if merge:
|
||||
<ul>
|
||||
% for item in results:
|
||||
<li>${video_link(item)}</li>
|
||||
% endfor
|
||||
</ul>
|
||||
% for item in results:
|
||||
${video_item(item)}
|
||||
% endfor
|
||||
% else:
|
||||
% for backend, items in sorted(results.iteritems()):
|
||||
<h2>${backend}</h2>
|
||||
<ul>
|
||||
% for item in items:
|
||||
<li>${video_link(item)}</li>
|
||||
% endfor
|
||||
</ul>
|
||||
% for item in items:
|
||||
${video_item(item)}
|
||||
% endfor
|
||||
% endfor
|
||||
% endif
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue