Move videoob-webserver to contrib

Since no one seems to use it.
I fixed the biggest issues so it is now usable again!
This commit is contained in:
Laurent Bachelier 2012-02-10 14:23:51 +01:00
commit 346704bae5
6 changed files with 2 additions and 2 deletions

View file

@ -0,0 +1,17 @@
## -*- coding: utf-8 -*-
<%def name="title()" filter="trim">
Videoob Web
</%def>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
<title>${self.title()}</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
${next.css()}
</head>
<body>
${next.body()}
</body>
</html>

View file

@ -0,0 +1,43 @@
## -*- coding: utf-8 -*-
<%inherit file="base.mako"/>
<%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()">
<h1>Videoob Web</h1>
<div id="search">
<form action="/" method="get">
<label for="q">Search pattern:</label>
<input id="q" type="text" name="q" value="${form_data['q']}" />
<input type="submit" value="Search" />
</form>
</div>
<div id="results">
% if merge:
% for item in results:
${video_item(item)}
% endfor
% else:
% for backend, items in sorted(results.iteritems()):
<h2>${backend}</h2>
% for item in items:
${video_item(item)}
% endfor
% endfor
% endif
</div>
</%def>