Added a watchstream page.
[zzz-floof.git] / floof / templates / base.mako
1 <%def name="title()">Untitled</%def>\
2 <!DOCTYPE html>
3 <html>
4 <head>
5 <title>${title()} — Floof</title>
6 <link rel="stylesheet" type="text/css" href="/reset.css">
7 <link rel="stylesheet" type="text/css" href="/layout.css">
8 </head>
9 <body>
10 <div id="header">
11 <a href="${h.url_for("/")}">Home</a>
12
13 % if c.user:
14 | <a href="${h.url("new_art")}">Add Art</a>
15 | <a href="${h.url_for(controller="search", action="list")}">Your Searches</a>
16 | <a href="${h.url_for(controller="art", action="watchstream", name=c.user.name.lower())}">Watchstream</a>
17 ## | <a href="${h.url_for("/users/"+c.user}">Your Page</a>
18 % endif
19
20 ${h.form(h.url_for('search'), method='GET')}
21 ${h.text('query', c.query)}
22 ${h.submit('button', 'Search')}
23
24 % if c.user:
25 ${h.submit('button', 'Save')}
26 % endif
27
28 ## Note: should probably only display "save" when we're on a results page
29 ## Also, what if we had it save a hidden form containing the search result that was
30 ## actually rendered?  Might be confusing though.
31 ${h.end_form()}
32
33     <div id="user">
34         % if c.user:
35         <form action="${url(controller='account', action='logout')}" method="POST">
36         <p>Logged in as <a href="${h.url('user_page', name=c.user.name.lower())}">${c.user.name}</a>.  ${h.submit(None, 'Log out')}</p>
37         </form>
38         % else:
39         <form action="${url(controller='account', action='login_begin')}" method="POST">
40         <p>
41             Identity URL: <input type="text" name="identity_url">
42             <input type="submit" value="Log in">
43         </p>
44         </form>
45         % endif
46     </div>
47
48
49 </div>
50
51 <% messages = h.flash.pop_messages() %>
52 % if messages:
53 <ul id="flash-messages">
54     % for message in messages:
55     <li>${message}</li>
56     % endfor
57 </ul>
58 % endif
59
60
61 <div id="body">
62 ${next.body()}
63 </div>
64 <div id="footer">
65     <p>Powered by floof</p>
66 </div>
67 </body>
68 </html>