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
1=== modified file 'beeseek/template/__init__.py'
2--- beeseek/template/__init__.py 2009-10-21 15:39:48 +0000
3+++ beeseek/template/__init__.py 2009-10-24 14:10:25 +0000
4@@ -115,7 +115,7 @@
5 def precalculate_object(template, tags, content):
6 """Give a name to a piece of content so that it can be referenced."""
7 template.objects[tags['id']] = content
8- show = tags['show']
9+ show = tags.get('show', 'True')
10 if show == 'True':
11 return content
12 elif show == 'False':
13
14=== modified file 'beeseek/template/html.py'
15--- beeseek/template/html.py 2009-08-28 19:33:37 +0000
16+++ beeseek/template/html.py 2009-10-24 14:10:25 +0000
17@@ -18,6 +18,6 @@
18 from beeseek.template import Template
19
20 #pylint: disable-msg=C0103
21-start_page = Template('html/search.html', start_page=True)
22-search_page = Template('html/search.html', start_page=False)
23+start_page = Template('html/home.html')
24+search_page = Template('html/search.html')
25 configuration_page = Template('html/configuration.html')
26
27=== modified file 'beeseek/ui/__init__.py'
28--- beeseek/ui/__init__.py 2009-10-20 14:50:05 +0000
29+++ beeseek/ui/__init__.py 2009-10-24 14:10:25 +0000
30@@ -29,7 +29,7 @@
31 headers = instance.http_response_headers.copy()
32 if page == '/beeseek:tracker.js':
33 template = javascript.tracker
34- elif page == '/beeseek:style_basic.css':
35+ elif page == '/beeseek:style.css':
36 template = css.style
37 elif page == '/beeseek:logo.png':
38 template = images.logo
39
40=== modified file 'beeseek/ui/navigationinfo.py'
41--- beeseek/ui/navigationinfo.py 2009-10-20 16:59:35 +0000
42+++ beeseek/ui/navigationinfo.py 2009-10-24 14:10:25 +0000
43@@ -445,6 +445,7 @@
44 def save(data):
45 """Save the data received from the JavaScript script to the database."""
46 data = read_data(data)
47+ url = data['location']
48 history = generate_history(
49 [int(i) for i in data['focus-history'].split(',')],
50 scrollhistory = [int(i) for i in data['scroll-history'].split(',')],
51@@ -454,11 +455,15 @@
52 snippets_text, snippets_words = get_candidate_snippets(
53 all_positions, data)
54 if not snippets_text:
55+ if __debug__:
56+ if instance.debug:
57+ log.debug(
58+ 'Cannot index %r in the database: no snippets found'
59+ % url)
60 return
61 snippets_text, snippets_words = remove_short_snippets(
62 snippets_text, snippets_words)
63
64- url = data['location']
65 if not is_public_page(url, snippets_text):
66 if __debug__:
67 if instance.debug:
68
69=== modified file 'templates/css/style.css'
70--- templates/css/style.css 2009-10-23 18:41:08 +0000
71+++ templates/css/style.css 2009-10-24 14:10:25 +0000
72@@ -3,7 +3,7 @@
73 body {
74 background: #FFFFFF;
75 color: #121212;
76- font-family: "Bitstream Vera Sans", Arial, Helvetica, sans-serif;
77+ font-family: sans-serif;
78 font-size: 9pt;
79 margin: 0 1em 0 1em;
80 padding: 0;
81@@ -15,6 +15,12 @@
82 margin-top: 0;
83 }
84
85+a {
86+ color: #556D7A;
87+ text-decoration: none;
88+ font-weight: bold;
89+}
90+
91 div#top {
92 border-bottom: 1px dotted #CFCFCF;
93 color: #000000;
94@@ -27,6 +33,7 @@
95
96 div#top a {
97 color: #556D7A;
98+ font-weight: normal;
99 }
100
101 div#top ul, div#top li {
102@@ -38,7 +45,7 @@
103 }
104
105 div#top div#links {
106- float:right;
107+ float: right;
108 }
109
110 div#top div#users {
111@@ -54,6 +61,7 @@
112
113 div#footer a {
114 color: #556D7A;
115+ font-weight: normal;
116 }
117
118 div#footer ul, div#footer li {
119@@ -203,6 +211,48 @@
120 margin: 1em 0;
121 }
122
123+
124+/* Portlets for the home page. */
125+
126+div#portlets {
127+ clear: both;
128+ left: 4%;
129+ position: relative;
130+ width: 96%;
131+}
132+
133+div.portlet {
134+ display: block;
135+ float: left;
136+ height: 200px;
137+ margin: 0 1em 0 0;
138+ padding: 0.5em;
139+ position: relative;
140+ width: 30%;
141+}
142+
143+div.portlet h2 {
144+ color: #FF6600;
145+ margin: 0;
146+ padding: 0.2em;
147+ text-align: center;
148+}
149+
150+div.portlet p {
151+ margin: 0;
152+ padding: 0.2em;
153+}
154+
155+div.portlet a {
156+ font-weight: bold;
157+}
158+
159+div.portlet ul {
160+ margin: 0;
161+ padding-left: 1.5em;
162+}
163+
164+
165 /* Configuration page. */
166
167 form#options {
168
169=== added file 'templates/html/common.xml'
170--- templates/html/common.xml 1970-01-01 00:00:00 +0000
171+++ templates/html/common.xml 2009-10-24 14:10:25 +0000
172@@ -0,0 +1,77 @@
173+<beeseek:template content-type="text/html">
174+ <beeseek:object id="top">
175+ <div id="top">
176+ <div id="users">
177+ <ul>
178+ <li><a href="http://www.beeseek.org/user/login">Login</a> | </li>
179+ <li><a href="http://www.beeseek.org/user/register">Register</a></li>
180+ </ul>
181+ </div>
182+ <div id="links">
183+ <ul>
184+ <li><a href="http://blog.beeseek.org">Blog</a> | </li>
185+ <li><a href="http://planet.beeseek.org">Planet</a> | </li>
186+ <li><a href="http://forum.beeseek.org">Forum</a> | </li>
187+ <li><a href="http://wiki.beeseek.org">Wiki</a> | </li>
188+ <li><a href="http://gallery.beeseek.org">Gallery</a> | </li>
189+ <li><a href="http://beeseek.org/noticeboard">Noticeboard</a> | </li>
190+ <li><a href="http://wiki.beeseek.org">Wiki</a> | </li>
191+ <li><a href="https://launchpad.net/beeseek-project">Launchpad</a></li>
192+ </ul>
193+ </div>
194+ </div>
195+ </beeseek:object>
196+
197+ <beeseek:object id="logo">
198+ <div id="logo">
199+ <span id="motto">motto goes here</span>
200+ <beeseek:if condition="version_info.releasestatus != 'final'">
201+ <span id="devstatus">.<beeseek:insert type="variable" name="version_info.releasestatus" /></span>
202+ </beeseek:if>
203+ </div>
204+ </beeseek:object>
205+
206+ <beeseek:object id="search-form-empty">
207+ <div class="form">
208+ <form action="/search" method="post">
209+ <div>
210+ <input id="focus" class="textarea" type="text" name="keyword" value="" />
211+ <button class="find" type="submit">Find</button>
212+ </div>
213+ </form>
214+ </div>
215+ </beeseek:object>
216+
217+ <beeseek:object id="search-form-keywords">
218+ <div class="form">
219+ <form action="/search" method="post">
220+ <div>
221+ <input id="focus" class="textarea" type="text" name="keyword"
222+ value="<beeseek:insert type="variable" name="keywords.replace(chr(34), '&quot;')" />" />
223+ <button class="find" type="submit">Find</button>
224+ </div>
225+ </form>
226+ </div>
227+ </beeseek:object>
228+
229+ <beeseek:object id="footer">
230+ <div id="footer">
231+ <div id="version">
232+ <ul>
233+ <li>Version <beeseek:insert type="variable" name="str(version_info)" /></li>
234+ <beeseek:if condition="version_info.revision">
235+ <li>revision <beeseek:insert type="variable" name="str(version_info.revision)" /></li>
236+ </beeseek:if>
237+ </ul>
238+ </div>
239+
240+ <div id="infos">
241+ <ul>
242+ <li><a href="http://wiki.beeseek.org/BeeSeek">About</a> | </li>
243+ <li><a href="http://wiki.beeseek.org/FAQ">FAQ</a> | </li>
244+ <li><a href="http://wiki.beeseek.org/TermsOfUse">Terms of use</a></li>
245+ </ul>
246+ </div>
247+ </div>
248+ </beeseek:object>
249+</beeseek:template>
250
251=== modified file 'templates/html/configuration.html'
252--- templates/html/configuration.html 2009-08-15 15:45:46 +0000
253+++ templates/html/configuration.html 2009-10-24 14:10:25 +0000
254@@ -7,7 +7,7 @@
255 <title>BeeSeek results page</title>
256 <meta name="description" content="Results from BeeSeek" />
257 <meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
258- <link rel="stylesheet" type="text/css" media="screen" href="/beeseek:style_basic.css" />
259+ <link rel="stylesheet" type="text/css" media="screen" href="/beeseek:style.css" />
260 </head>
261
262 <body onload="document.getElementById('focus').focus()">
263
264=== added file 'templates/html/home.html'
265--- templates/html/home.html 1970-01-01 00:00:00 +0000
266+++ templates/html/home.html 2009-10-24 14:10:25 +0000
267@@ -0,0 +1,55 @@
268+<beeseek:template content-type="text/html"><?xml version="1.0" encoding="UTF-8"?>
269+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
270+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
271+ <head>
272+ <title>BeeSeek Search</title>
273+ <link rel="stylesheet" type="text/css" media="screen" href="/beeseek:style.css" />
274+ </head>
275+
276+ <body onload="document.getElementById('focus').focus()">
277+ <beeseek:insert type="object" file="html/common.xml" id="top" />
278+ <beeseek:insert type="object" file="html/common.xml" id="logo" />
279+
280+ <div id="portlets">
281+ <div class="portlet">
282+ <h2>What is?</h2>
283+ <p>BeeSeek is a project to build a free, open-source search engine
284+ based on a peer to peer technology. The idea that move BeeSeek is to
285+ develop a search engine:</p>
286+ <ul>
287+ <li>whose source code is freely accessible to everyone;</li>
288+ <li>that gives warranties about individual's privacy;</li>
289+ <li>whose revenues are used for ethical projects;</li>
290+ <li>who share the processing work among the clients (peers) of the
291+ network;</li>
292+ <li>that doesn't store personal user data for long times and no
293+ more than needed.</li>
294+ </ul>
295+ <p style="text-align: right"><a href="http://wiki.beeseek.org/BeeSeek">Read more</a></p>
296+ </div>
297+ <div class="portlet">
298+ <h2>Try it</h2>
299+ <p>BeeSeek is currently in <a href="http://en.wikipedia.org/wiki/Software_release_life_cycle#Beta">
300+ beta version</a> and you are free to test it using it just for
301+ searching but also sharing a piece of your computer. Note that however
302+ it may contain some errors or miss some features, so we encourage you
303+ to <a href="http://launchpad.net/beeseek/+filebug">report bugs</a>
304+ whenever you find one.</p>
305+ <p style="text-align: right"><a href="http://wiki.beeseek.org/Testing">Read more</a></p>
306+ </div>
307+ <div class="portlet">
308+ <h2>Join the community!</h2>
309+ <p>If you like this project, and if you share the ideas that move
310+ BeeSeek, why don't you help us in developing our search engine? We are
311+ always looking for good people willing to help us in writing code,
312+ testing, updating wiki, blogging, drawing wonderful artworks,
313+ promoting our projects and writing good documentation.</p>
314+ <p style="text-align: right"><a href="http://wiki.beeseek.org/GettingInvolved">Read more</a></p>
315+ </div>
316+ </div>
317+
318+ <beeseek:insert type="object" file="html/common.xml" id="search-form-empty" />
319+ <beeseek:insert type="object" file="html/common.xml" id="footer" />
320+ </body>
321+</html>
322+</beeseek:template>
323
324=== modified file 'templates/html/search.html'
325--- templates/html/search.html 2009-10-20 16:30:00 +0000
326+++ templates/html/search.html 2009-10-24 14:10:25 +0000
327@@ -1,119 +1,53 @@
328-<beeseek:template content-type="text/html">
329-<?xml version="1.0" encoding="UTF-8"?>
330+<beeseek:template content-type="text/html"><?xml version="1.0" encoding="UTF-8"?>
331 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
332-
333-<html xmlns="http://www.w3.org/1999/xhtml">
334+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
335 <head>
336- <title>BeeSeek results page</title>
337- <meta name="description" content="Results from BeeSeek" />
338- <meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
339- <link rel="stylesheet" type="text/css" media="screen" href="/beeseek:style_basic.css" />
340+ <title>BeeSeek Search</title>
341+ <link rel="stylesheet" type="text/css" media="screen" href="/beeseek:style.css" />
342 </head>
343
344 <body onload="document.getElementById('focus').focus()">
345- <div id="top">
346- <div id="links">
347- <ul>
348- <li><a href="http://blog.beeseek.org">Blog</a> | </li>
349- <li><a href="http://planet.beeseek.org">Planet</a> | </li>
350- <li><a href="http://forum.beeseek.org">Forum</a> | </li>
351- <li><a href="http://wiki.beeseek.org">Wiki</a> | </li>
352- <li><a href="http://gallery.beeseek.org">Gallery</a> | </li>
353- <li><a href="http://beeseek.org/noticeboard">Noticeboard</a> | </li>
354- <li><a href="http://wiki.beeseek.org">Wiki</a> | </li>
355- <li><a href="https://launchpad.net/beeseek-project">Launchpad</a></li>
356- </ul>
357- </div>
358- <div id="users">
359- <ul>
360- <li><a href="http://www.beeseek.org/user/login">Login</a> | </li>
361- <li><a href="http://www.beeseek.org/user/register">Register</a></li>
362- </ul>
363- </div>
364- </div>
365-
366- <div id="logo">
367- <span id="motto">motto goes here</span>
368- <beeseek:if condition="version_info.releasestatus != 'final'">
369- <span id="development">.<beeseek:insert type="variable" name="version_info.releasestatus" /></span>
370- </beeseek:if>
371- </div>
372-
373-
374- <beeseek:object id="search-form" show="True">
375- <div class="form">
376- <form action="/search" method="post">
377- <div>
378- <beeseek:if condition="start_page == True">
379- <input id="focus" class="textarea" type="text" name="keyword" value="" />
380- </beeseek:if>
381- <beeseek:if condition="start_page == False">
382- <input id="focus" class="textarea" type="text" name="keyword"
383- value="<beeseek:insert type="variable" name="keywords.replace(chr(34), '&quot;')" />" />
384- </beeseek:if>
385- <button class="find" type="submit">Find</button>
386- </div>
387- </form>
388- </div>
389- </beeseek:object>
390-
391- <beeseek:if condition="start_page == False">
392- <beeseek:if condition="len(resultset) == 0">
393- <li style="list-style: none;">
394- <p>Sorry, no results were found.</p>
395- <p>BeeSeek is a young project and some pages are not indexed in our
396- database already. You may help the search engine hosting a part of
397- the database. Learn <a href="http://wiki.beeseek.org/BeeSeek">why
398- BeeSeek is different from other search engines</a> and how to
399- fully <a href="http://wiki.beeseek.org/Testing">test it</a>.</p>
400- </li>
401- </beeseek:if>
402- <beeseek:if condition="len(resultset) != 0">
403- <div id="results-block"><ol>
404- <beeseek:for variable="result" iterator="resultset">
405- <li>
406- <div class="result-single">
407- <h3><a href="<beeseek:insert type="variable" name="result.address" />">
408- <beeseek:insert type="variable" name="result.title" /></a>
409- </h3>
410- <p><beeseek:insert type="variable" name="result.snippet" /> <strong>...</strong></p>
411- <beeseek:debug>
412- <div id="debug">
413- <h4><small>Debugging information</small></h4>
414- <p><small>Score: <beeseek:insert type="variable" name="result.karma" /></small></p>
415- <p><small>Origin: <beeseek:insert type="variable" name="result.origin" /></small></p>
416- <p><small>Tags: <beeseek:insert type="variable" name="result.tags" /></small></p>
417- </div>
418- </beeseek:debug>
419- <span><beeseek:insert type="variable" name="result.address" /></span>
420- </div>
421- </li>
422- </beeseek:for>
423- </ol></div>
424- <beeseek:insert type="object" file="." id="search-form" />
425- </beeseek:if>
426- </beeseek:if>
427-
428-
429- <div id="footer">
430- <div id="version">
431- <ul>
432- <li>Version <beeseek:insert type="variable" name="str(version_info)" /></li>
433- <beeseek:if condition="version_info.revision">
434- <li>&nbsp;</li>
435- <li>Revision <beeseek:insert type="variable" name="str(version_info.revision)" /></li>
436- </beeseek:if>
437- </ul>
438- </div>
439-
440- <div id="infos">
441- <ul>
442- <li><a href="http://wiki.beeseek.org/BeeSeek">About</a> | </li>
443- <li><a href="http://wiki.beeseek.org/FAQ">FAQ</a> | </li>
444- <li><a href="http://wiki.beeseek.org/TermsOfUse">Terms of use</a></li>
445- </ul>
446- </div>
447- </div>
448+ <beeseek:insert type="object" file="html/common.xml" id="top" />
449+ <beeseek:insert type="object" file="html/common.xml" id="logo" />
450+
451+ <beeseek:insert type="object" file="html/common.xml" id="search-form-keywords" />
452+
453+ <beeseek:if condition="len(resultset) == 0">
454+ <div id="results-block"><ol style="list-style: none"><li>
455+ <p>Sorry, no results were found.</p>
456+ <p>BeeSeek is a young project and some pages are not indexed in our
457+ database already. You may help the search engine hosting a part of
458+ the database. Learn <a href="http://wiki.beeseek.org/BeeSeek">why
459+ BeeSeek is different from other search engines</a> and how to
460+ fully <a href="http://wiki.beeseek.org/Testing">test it</a>.</p>
461+ </li></ol></div>
462+ </beeseek:if>
463+ <beeseek:if condition="len(resultset) > 0">
464+ <div id="results-block"><ol>
465+ <beeseek:for variable="result" iterator="resultset">
466+ <li>
467+ <div class="result-single">
468+ <h3><a href="<beeseek:insert type="variable" name="result.address" />">
469+ <beeseek:insert type="variable" name="result.title" /></a>
470+ </h3>
471+ <p><beeseek:insert type="variable" name="result.snippet" /> <strong>...</strong></p>
472+ <beeseek:debug>
473+ <div id="debug">
474+ <h4><small>Debugging information</small></h4>
475+ <p><small>Score: <beeseek:insert type="variable" name="result.karma" /></small></p>
476+ <p><small>Origin: <beeseek:insert type="variable" name="result.origin" /></small></p>
477+ <p><small>Tags: <beeseek:insert type="variable" name="result.tags" /></small></p>
478+ </div>
479+ </beeseek:debug>
480+ <span><beeseek:insert type="variable" name="result.address" /></span>
481+ </div>
482+ </li>
483+ </beeseek:for>
484+ </ol></div>
485+ <beeseek:insert type="object" file="html/common.xml" id="search-form-keywords" />
486+ </beeseek:if>
487+
488+ <beeseek:insert type="object" file="html/common.xml" id="footer" />
489 </body>
490 </html>
491 </beeseek:template>

Subscribers

People subscribed via source and target branches