Merge lp:~andrea.corbellini/beeseek/homepage into lp:beeseek/1.0

Proposed by Andrea Corbellini
Status: Merged
Approved by: Andrea Corbellini
Approved revision: 377
Merged at revision: not available
Proposed branch: lp:~andrea.corbellini/beeseek/homepage
Merge into: lp:beeseek/1.0
Diff against target: 491 lines
9 files modified
beeseek/template/__init__.py (+1/-1)
beeseek/template/html.py (+2/-2)
beeseek/ui/__init__.py (+1/-1)
beeseek/ui/navigationinfo.py (+6/-1)
templates/css/style.css (+52/-2)
templates/html/common.xml (+77/-0)
templates/html/configuration.html (+1/-1)
templates/html/home.html (+55/-0)
templates/html/search.html (+45/-111)
To merge this branch: bzr merge lp:~andrea.corbellini/beeseek/homepage
Reviewer Review Type Date Requested Status
Jacopo Moretto (community) ui Approve
Andrea Colangelo text-content Approve
Review via email: mp+13887@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Andrea Corbellini (andrea.corbellini) wrote :

This branch modifies the initial search page adding three short portlets: one that explain what is BeeSeek, the second how to try it and the last invites people to join the project.

A way to see the changes is to run BeeSeek with `./beeseek-server start --testing` and then look at http://localhost:8080 with the browser. Doing that you should see the new content. The old page layout can be seen on http://beta.beeseek.org.

Revision history for this message
Andrea Colangelo (warp10) :
review: Approve (text-content)
377. By Andrea Corbellini

Fix link.

Revision history for this message
Jacopo Moretto (jak-o) :
review: Approve (ui)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'beeseek/template/__init__.py'
--- beeseek/template/__init__.py 2009-10-21 15:39:48 +0000
+++ beeseek/template/__init__.py 2009-10-24 14:10:25 +0000
@@ -115,7 +115,7 @@
115 def precalculate_object(template, tags, content):115 def precalculate_object(template, tags, content):
116 """Give a name to a piece of content so that it can be referenced."""116 """Give a name to a piece of content so that it can be referenced."""
117 template.objects[tags['id']] = content117 template.objects[tags['id']] = content
118 show = tags['show']118 show = tags.get('show', 'True')
119 if show == 'True':119 if show == 'True':
120 return content120 return content
121 elif show == 'False':121 elif show == 'False':
122122
=== modified file 'beeseek/template/html.py'
--- beeseek/template/html.py 2009-08-28 19:33:37 +0000
+++ beeseek/template/html.py 2009-10-24 14:10:25 +0000
@@ -18,6 +18,6 @@
18from beeseek.template import Template18from beeseek.template import Template
1919
20#pylint: disable-msg=C010320#pylint: disable-msg=C0103
21start_page = Template('html/search.html', start_page=True)21start_page = Template('html/home.html')
22search_page = Template('html/search.html', start_page=False)22search_page = Template('html/search.html')
23configuration_page = Template('html/configuration.html')23configuration_page = Template('html/configuration.html')
2424
=== modified file 'beeseek/ui/__init__.py'
--- beeseek/ui/__init__.py 2009-10-20 14:50:05 +0000
+++ beeseek/ui/__init__.py 2009-10-24 14:10:25 +0000
@@ -29,7 +29,7 @@
29 headers = instance.http_response_headers.copy()29 headers = instance.http_response_headers.copy()
30 if page == '/beeseek:tracker.js':30 if page == '/beeseek:tracker.js':
31 template = javascript.tracker31 template = javascript.tracker
32 elif page == '/beeseek:style_basic.css':32 elif page == '/beeseek:style.css':
33 template = css.style33 template = css.style
34 elif page == '/beeseek:logo.png':34 elif page == '/beeseek:logo.png':
35 template = images.logo35 template = images.logo
3636
=== modified file 'beeseek/ui/navigationinfo.py'
--- beeseek/ui/navigationinfo.py 2009-10-20 16:59:35 +0000
+++ beeseek/ui/navigationinfo.py 2009-10-24 14:10:25 +0000
@@ -445,6 +445,7 @@
445def save(data):445def save(data):
446 """Save the data received from the JavaScript script to the database."""446 """Save the data received from the JavaScript script to the database."""
447 data = read_data(data)447 data = read_data(data)
448 url = data['location']
448 history = generate_history(449 history = generate_history(
449 [int(i) for i in data['focus-history'].split(',')],450 [int(i) for i in data['focus-history'].split(',')],
450 scrollhistory = [int(i) for i in data['scroll-history'].split(',')],451 scrollhistory = [int(i) for i in data['scroll-history'].split(',')],
@@ -454,11 +455,15 @@
454 snippets_text, snippets_words = get_candidate_snippets(455 snippets_text, snippets_words = get_candidate_snippets(
455 all_positions, data)456 all_positions, data)
456 if not snippets_text:457 if not snippets_text:
458 if __debug__:
459 if instance.debug:
460 log.debug(
461 'Cannot index %r in the database: no snippets found'
462 % url)
457 return463 return
458 snippets_text, snippets_words = remove_short_snippets(464 snippets_text, snippets_words = remove_short_snippets(
459 snippets_text, snippets_words)465 snippets_text, snippets_words)
460466
461 url = data['location']
462 if not is_public_page(url, snippets_text):467 if not is_public_page(url, snippets_text):
463 if __debug__:468 if __debug__:
464 if instance.debug:469 if instance.debug:
465470
=== modified file 'templates/css/style.css'
--- templates/css/style.css 2009-10-23 18:41:08 +0000
+++ templates/css/style.css 2009-10-24 14:10:25 +0000
@@ -3,7 +3,7 @@
3body {3body {
4 background: #FFFFFF;4 background: #FFFFFF;
5 color: #121212;5 color: #121212;
6 font-family: "Bitstream Vera Sans", Arial, Helvetica, sans-serif;6 font-family: sans-serif;
7 font-size: 9pt;7 font-size: 9pt;
8 margin: 0 1em 0 1em;8 margin: 0 1em 0 1em;
9 padding: 0;9 padding: 0;
@@ -15,6 +15,12 @@
15 margin-top: 0;15 margin-top: 0;
16}16}
1717
18a {
19 color: #556D7A;
20 text-decoration: none;
21 font-weight: bold;
22}
23
18div#top {24div#top {
19 border-bottom: 1px dotted #CFCFCF;25 border-bottom: 1px dotted #CFCFCF;
20 color: #000000;26 color: #000000;
@@ -27,6 +33,7 @@
2733
28div#top a {34div#top a {
29 color: #556D7A;35 color: #556D7A;
36 font-weight: normal;
30}37}
3138
32div#top ul, div#top li {39div#top ul, div#top li {
@@ -38,7 +45,7 @@
38}45}
3946
40div#top div#links {47div#top div#links {
41 float:right;48 float: right;
42}49}
4350
44div#top div#users {51div#top div#users {
@@ -54,6 +61,7 @@
5461
55div#footer a {62div#footer a {
56 color: #556D7A;63 color: #556D7A;
64 font-weight: normal;
57}65}
5866
59div#footer ul, div#footer li {67div#footer ul, div#footer li {
@@ -203,6 +211,48 @@
203 margin: 1em 0;211 margin: 1em 0;
204}212}
205213
214
215/* Portlets for the home page. */
216
217div#portlets {
218 clear: both;
219 left: 4%;
220 position: relative;
221 width: 96%;
222}
223
224div.portlet {
225 display: block;
226 float: left;
227 height: 200px;
228 margin: 0 1em 0 0;
229 padding: 0.5em;
230 position: relative;
231 width: 30%;
232}
233
234div.portlet h2 {
235 color: #FF6600;
236 margin: 0;
237 padding: 0.2em;
238 text-align: center;
239}
240
241div.portlet p {
242 margin: 0;
243 padding: 0.2em;
244}
245
246div.portlet a {
247 font-weight: bold;
248}
249
250div.portlet ul {
251 margin: 0;
252 padding-left: 1.5em;
253}
254
255
206/* Configuration page. */256/* Configuration page. */
207257
208form#options {258form#options {
209259
=== added file 'templates/html/common.xml'
--- templates/html/common.xml 1970-01-01 00:00:00 +0000
+++ templates/html/common.xml 2009-10-24 14:10:25 +0000
@@ -0,0 +1,77 @@
1<beeseek:template content-type="text/html">
2 <beeseek:object id="top">
3 <div id="top">
4 <div id="users">
5 <ul>
6 <li><a href="http://www.beeseek.org/user/login">Login</a> | </li>
7 <li><a href="http://www.beeseek.org/user/register">Register</a></li>
8 </ul>
9 </div>
10 <div id="links">
11 <ul>
12 <li><a href="http://blog.beeseek.org">Blog</a> | </li>
13 <li><a href="http://planet.beeseek.org">Planet</a> | </li>
14 <li><a href="http://forum.beeseek.org">Forum</a> | </li>
15 <li><a href="http://wiki.beeseek.org">Wiki</a> | </li>
16 <li><a href="http://gallery.beeseek.org">Gallery</a> | </li>
17 <li><a href="http://beeseek.org/noticeboard">Noticeboard</a> | </li>
18 <li><a href="http://wiki.beeseek.org">Wiki</a> | </li>
19 <li><a href="https://launchpad.net/beeseek-project">Launchpad</a></li>
20 </ul>
21 </div>
22 </div>
23 </beeseek:object>
24
25 <beeseek:object id="logo">
26 <div id="logo">
27 <span id="motto">motto goes here</span>
28 <beeseek:if condition="version_info.releasestatus != 'final'">
29 <span id="devstatus">.<beeseek:insert type="variable" name="version_info.releasestatus" /></span>
30 </beeseek:if>
31 </div>
32 </beeseek:object>
33
34 <beeseek:object id="search-form-empty">
35 <div class="form">
36 <form action="/search" method="post">
37 <div>
38 <input id="focus" class="textarea" type="text" name="keyword" value="" />
39 <button class="find" type="submit">Find</button>
40 </div>
41 </form>
42 </div>
43 </beeseek:object>
44
45 <beeseek:object id="search-form-keywords">
46 <div class="form">
47 <form action="/search" method="post">
48 <div>
49 <input id="focus" class="textarea" type="text" name="keyword"
50 value="<beeseek:insert type="variable" name="keywords.replace(chr(34), '&quot;')" />" />
51 <button class="find" type="submit">Find</button>
52 </div>
53 </form>
54 </div>
55 </beeseek:object>
56
57 <beeseek:object id="footer">
58 <div id="footer">
59 <div id="version">
60 <ul>
61 <li>Version <beeseek:insert type="variable" name="str(version_info)" /></li>
62 <beeseek:if condition="version_info.revision">
63 <li>revision <beeseek:insert type="variable" name="str(version_info.revision)" /></li>
64 </beeseek:if>
65 </ul>
66 </div>
67
68 <div id="infos">
69 <ul>
70 <li><a href="http://wiki.beeseek.org/BeeSeek">About</a> | </li>
71 <li><a href="http://wiki.beeseek.org/FAQ">FAQ</a> | </li>
72 <li><a href="http://wiki.beeseek.org/TermsOfUse">Terms of use</a></li>
73 </ul>
74 </div>
75 </div>
76 </beeseek:object>
77</beeseek:template>
078
=== modified file 'templates/html/configuration.html'
--- templates/html/configuration.html 2009-08-15 15:45:46 +0000
+++ templates/html/configuration.html 2009-10-24 14:10:25 +0000
@@ -7,7 +7,7 @@
7 <title>BeeSeek results page</title>7 <title>BeeSeek results page</title>
8 <meta name="description" content="Results from BeeSeek" />8 <meta name="description" content="Results from BeeSeek" />
9 <meta http-equiv="Content-type" content="text/html; charset=UTF-8" />9 <meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
10 <link rel="stylesheet" type="text/css" media="screen" href="/beeseek:style_basic.css" />10 <link rel="stylesheet" type="text/css" media="screen" href="/beeseek:style.css" />
11 </head>11 </head>
1212
13 <body onload="document.getElementById('focus').focus()">13 <body onload="document.getElementById('focus').focus()">
1414
=== added file 'templates/html/home.html'
--- templates/html/home.html 1970-01-01 00:00:00 +0000
+++ templates/html/home.html 2009-10-24 14:10:25 +0000
@@ -0,0 +1,55 @@
1<beeseek:template content-type="text/html"><?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
4 <head>
5 <title>BeeSeek Search</title>
6 <link rel="stylesheet" type="text/css" media="screen" href="/beeseek:style.css" />
7 </head>
8
9 <body onload="document.getElementById('focus').focus()">
10 <beeseek:insert type="object" file="html/common.xml" id="top" />
11 <beeseek:insert type="object" file="html/common.xml" id="logo" />
12
13 <div id="portlets">
14 <div class="portlet">
15 <h2>What is?</h2>
16 <p>BeeSeek is a project to build a free, open-source search engine
17 based on a peer to peer technology. The idea that move BeeSeek is to
18 develop a search engine:</p>
19 <ul>
20 <li>whose source code is freely accessible to everyone;</li>
21 <li>that gives warranties about individual's privacy;</li>
22 <li>whose revenues are used for ethical projects;</li>
23 <li>who share the processing work among the clients (peers) of the
24 network;</li>
25 <li>that doesn't store personal user data for long times and no
26 more than needed.</li>
27 </ul>
28 <p style="text-align: right"><a href="http://wiki.beeseek.org/BeeSeek">Read more</a></p>
29 </div>
30 <div class="portlet">
31 <h2>Try it</h2>
32 <p>BeeSeek is currently in <a href="http://en.wikipedia.org/wiki/Software_release_life_cycle#Beta">
33 beta version</a> and you are free to test it using it just for
34 searching but also sharing a piece of your computer. Note that however
35 it may contain some errors or miss some features, so we encourage you
36 to <a href="http://launchpad.net/beeseek/+filebug">report bugs</a>
37 whenever you find one.</p>
38 <p style="text-align: right"><a href="http://wiki.beeseek.org/Testing">Read more</a></p>
39 </div>
40 <div class="portlet">
41 <h2>Join the community!</h2>
42 <p>If you like this project, and if you share the ideas that move
43 BeeSeek, why don't you help us in developing our search engine? We are
44 always looking for good people willing to help us in writing code,
45 testing, updating wiki, blogging, drawing wonderful artworks,
46 promoting our projects and writing good documentation.</p>
47 <p style="text-align: right"><a href="http://wiki.beeseek.org/GettingInvolved">Read more</a></p>
48 </div>
49 </div>
50
51 <beeseek:insert type="object" file="html/common.xml" id="search-form-empty" />
52 <beeseek:insert type="object" file="html/common.xml" id="footer" />
53 </body>
54</html>
55</beeseek:template>
056
=== modified file 'templates/html/search.html'
--- templates/html/search.html 2009-10-20 16:30:00 +0000
+++ templates/html/search.html 2009-10-24 14:10:25 +0000
@@ -1,119 +1,53 @@
1<beeseek:template content-type="text/html">1<beeseek:template content-type="text/html"><?xml version="1.0" encoding="UTF-8"?>
2<?xml version="1.0" encoding="UTF-8"?>
3<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
43<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
5<html xmlns="http://www.w3.org/1999/xhtml">
6 <head>4 <head>
7 <title>BeeSeek results page</title>5 <title>BeeSeek Search</title>
8 <meta name="description" content="Results from BeeSeek" />6 <link rel="stylesheet" type="text/css" media="screen" href="/beeseek:style.css" />
9 <meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
10 <link rel="stylesheet" type="text/css" media="screen" href="/beeseek:style_basic.css" />
11 </head>7 </head>
128
13 <body onload="document.getElementById('focus').focus()">9 <body onload="document.getElementById('focus').focus()">
14 <div id="top">10 <beeseek:insert type="object" file="html/common.xml" id="top" />
15 <div id="links">11 <beeseek:insert type="object" file="html/common.xml" id="logo" />
16 <ul>12
17 <li><a href="http://blog.beeseek.org">Blog</a> | </li>13 <beeseek:insert type="object" file="html/common.xml" id="search-form-keywords" />
18 <li><a href="http://planet.beeseek.org">Planet</a> | </li>14
19 <li><a href="http://forum.beeseek.org">Forum</a> | </li>15 <beeseek:if condition="len(resultset) == 0">
20 <li><a href="http://wiki.beeseek.org">Wiki</a> | </li>16 <div id="results-block"><ol style="list-style: none"><li>
21 <li><a href="http://gallery.beeseek.org">Gallery</a> | </li>17 <p>Sorry, no results were found.</p>
22 <li><a href="http://beeseek.org/noticeboard">Noticeboard</a> | </li>18 <p>BeeSeek is a young project and some pages are not indexed in our
23 <li><a href="http://wiki.beeseek.org">Wiki</a> | </li>19 database already. You may help the search engine hosting a part of
24 <li><a href="https://launchpad.net/beeseek-project">Launchpad</a></li>20 the database. Learn <a href="http://wiki.beeseek.org/BeeSeek">why
25 </ul>21 BeeSeek is different from other search engines</a> and how to
26 </div>22 fully <a href="http://wiki.beeseek.org/Testing">test it</a>.</p>
27 <div id="users">23 </li></ol></div>
28 <ul>24 </beeseek:if>
29 <li><a href="http://www.beeseek.org/user/login">Login</a> | </li>25 <beeseek:if condition="len(resultset) > 0">
30 <li><a href="http://www.beeseek.org/user/register">Register</a></li>26 <div id="results-block"><ol>
31 </ul>27 <beeseek:for variable="result" iterator="resultset">
32 </div>28 <li>
33 </div>29 <div class="result-single">
3430 <h3><a href="<beeseek:insert type="variable" name="result.address" />">
35 <div id="logo">31 <beeseek:insert type="variable" name="result.title" /></a>
36 <span id="motto">motto goes here</span>32 </h3>
37 <beeseek:if condition="version_info.releasestatus != 'final'">33 <p><beeseek:insert type="variable" name="result.snippet" /> <strong>...</strong></p>
38 <span id="development">.<beeseek:insert type="variable" name="version_info.releasestatus" /></span>34 <beeseek:debug>
39 </beeseek:if>35 <div id="debug">
40 </div>36 <h4><small>Debugging information</small></h4>
4137 <p><small>Score: <beeseek:insert type="variable" name="result.karma" /></small></p>
4238 <p><small>Origin: <beeseek:insert type="variable" name="result.origin" /></small></p>
43 <beeseek:object id="search-form" show="True">39 <p><small>Tags: <beeseek:insert type="variable" name="result.tags" /></small></p>
44 <div class="form">40 </div>
45 <form action="/search" method="post">41 </beeseek:debug>
46 <div>42 <span><beeseek:insert type="variable" name="result.address" /></span>
47 <beeseek:if condition="start_page == True">43 </div>
48 <input id="focus" class="textarea" type="text" name="keyword" value="" />44 </li>
49 </beeseek:if>45 </beeseek:for>
50 <beeseek:if condition="start_page == False">46 </ol></div>
51 <input id="focus" class="textarea" type="text" name="keyword"47 <beeseek:insert type="object" file="html/common.xml" id="search-form-keywords" />
52 value="<beeseek:insert type="variable" name="keywords.replace(chr(34), '&quot;')" />" />48 </beeseek:if>
53 </beeseek:if>49
54 <button class="find" type="submit">Find</button>50 <beeseek:insert type="object" file="html/common.xml" id="footer" />
55 </div>
56 </form>
57 </div>
58 </beeseek:object>
59
60 <beeseek:if condition="start_page == False">
61 <beeseek:if condition="len(resultset) == 0">
62 <li style="list-style: none;">
63 <p>Sorry, no results were found.</p>
64 <p>BeeSeek is a young project and some pages are not indexed in our
65 database already. You may help the search engine hosting a part of
66 the database. Learn <a href="http://wiki.beeseek.org/BeeSeek">why
67 BeeSeek is different from other search engines</a> and how to
68 fully <a href="http://wiki.beeseek.org/Testing">test it</a>.</p>
69 </li>
70 </beeseek:if>
71 <beeseek:if condition="len(resultset) != 0">
72 <div id="results-block"><ol>
73 <beeseek:for variable="result" iterator="resultset">
74 <li>
75 <div class="result-single">
76 <h3><a href="<beeseek:insert type="variable" name="result.address" />">
77 <beeseek:insert type="variable" name="result.title" /></a>
78 </h3>
79 <p><beeseek:insert type="variable" name="result.snippet" /> <strong>...</strong></p>
80 <beeseek:debug>
81 <div id="debug">
82 <h4><small>Debugging information</small></h4>
83 <p><small>Score: <beeseek:insert type="variable" name="result.karma" /></small></p>
84 <p><small>Origin: <beeseek:insert type="variable" name="result.origin" /></small></p>
85 <p><small>Tags: <beeseek:insert type="variable" name="result.tags" /></small></p>
86 </div>
87 </beeseek:debug>
88 <span><beeseek:insert type="variable" name="result.address" /></span>
89 </div>
90 </li>
91 </beeseek:for>
92 </ol></div>
93 <beeseek:insert type="object" file="." id="search-form" />
94 </beeseek:if>
95 </beeseek:if>
96
97
98 <div id="footer">
99 <div id="version">
100 <ul>
101 <li>Version <beeseek:insert type="variable" name="str(version_info)" /></li>
102 <beeseek:if condition="version_info.revision">
103 <li>&nbsp;</li>
104 <li>Revision <beeseek:insert type="variable" name="str(version_info.revision)" /></li>
105 </beeseek:if>
106 </ul>
107 </div>
108
109 <div id="infos">
110 <ul>
111 <li><a href="http://wiki.beeseek.org/BeeSeek">About</a> | </li>
112 <li><a href="http://wiki.beeseek.org/FAQ">FAQ</a> | </li>
113 <li><a href="http://wiki.beeseek.org/TermsOfUse">Terms of use</a></li>
114 </ul>
115 </div>
116 </div>
117 </body>51 </body>
118</html>52</html>
119</beeseek:template>53</beeseek:template>

Subscribers

People subscribed via source and target branches