add web module

This commit is contained in:
01joy
2016-01-07 21:28:55 +08:00
parent 87b9208c2c
commit 1421ff6f29
14 changed files with 897 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>{{doc.title}}</title>
</head>
<body>
<div id="basic" align="center">
<h1>{{doc.title}}</h1>
<p>{{doc.datetime}}</p>
<p><a href="{{doc.url}}" target="_blank">{{doc.url}}</a></p>
</div>
<hr/>
<div id="detail" align="center">
<table width="1000" border="0">
<tr>
<td style="width:1000px"><p>{{doc.body}}</p></td>
</tr>
</table>
</div>
<hr/>
<div align="center">
<table width="1000" border="0">
<tr>
<td style="width:1000px"><h2>推荐阅读</h2></td>
</tr>
{% for each in doc.extra %}
<tr>
<td style="width:1000px"><a href="/search/{{each.id}}/" target="_blank">{{each.title}}</a></td>
</tr>
{% endfor %}
</table>
</div>
</body>
</html>
+13
View File
@@ -0,0 +1,13 @@
{% extends "search.html" %}
{% block high_search%}
<div id="select">
<ul>
<form name="search" action="/search/{{key}}/" method="POST">
<input {{checked[0]}} type="radio" name="order" id="r1" value="0" /> <label for="r1">相关度</label>
<input {{checked[1]}} type="radio" name="order" id="r2" value="1" /> <label for="r2">时间</label>
<input {{checked[2]}} type="radio" name="order" id="r3" value="2" /> <label for="r3">热度</label>
<input type="submit" value="ok">
</form>
</ul>
</div>
{% endblock %}
+4
View File
@@ -0,0 +1,4 @@
{% extends "search.html" %}
{% extends "high_search.html" %}
{% block next%}
{% endblock%}
+72
View File
@@ -0,0 +1,72 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>News Search Engine</title>
<style type="text/css">
div#doc {width:800px}
.pagination-page-info {
padding: .6em;
padding-left: 0;
width: 40em;
margin: .5em;
margin-left: 0;
font-size: 12px;
}
.pagination-page-info b {
color: black;
background: #6aa6ed;
padding-left: 2px;
padding: .1em .25em;
font-size: 150%;
}
</style>
</head>
<body>
<div id="container">
<div id="header">
<h1>News Search Engine</h1>
<form name="search" action="/search/" method="POST">
<p>
{% if key %}
<input type="text" name="key_word" value="{{key}}">
{% else %}
<input type="text" name="key_word">
{% endif %}
<input type="submit" value="Search">
</p>
</form>
</div>
<hr/>
{% block high_search%}
{% endblock %}
{% if error%}
{% for doc in docs%}
<div id="doc">
<ul id="navigation">
<p><big><a href="/search/{{doc.id}}/" target="_blank">{{doc.title}}</a></big></p>
<p>{{doc.time}}<br/>{{doc.snippet}}<br/>
<a href="{{ doc.url }}" target="_blank">{{doc.url}}</a>
</p>
</ul>
</div>
<br/>
{% endfor %}
{% block next %}
<ul>
{% for i in page %}
<a href="/search/page/{{i}}/">{{i}}</a>&nbsp;
{% endfor %}
</ul>
{% endblock %}
{% else %}
<p>对不起,没有您搜索的网页!</p>
{% endif %}
<div id="footer">
<hr>
&copy; 2015 UCAS 陈镇霖 肖俊斌 罗纯龙 方文征
</div>
</div>
</body>
</html>