73f069c314e088ac75fa71cc28f3276f3b53ce4f
[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("/users/"+c.user}">Your Page</a>
17 % endif
18
19 ${h.form(h.url_for('search'), method='GET')}
20 ${h.text('query', c.query)} 
21 ${h.submit('button', 'Search')} 
22
23 % if c.user:
24 ${h.submit('button', 'Save')}
25 % endif
26
27 ## Note: should probably only display "save" when we're on a results page
28 ## Also, what if we had it save a hidden form containing the search result that was
29 ## actually rendered?  Might be confusing though.
30 ${h.end_form()}
31
32     <div id="user">
33         % if c.user:
34         <form action="${url(controller='account', action='logout')}" method="POST">
35         <p>Logged in as <a href="${h.url('user_page', name=c.user.name)}">${c.user.name}</a>.  ${h.submit(None, 'Log out')}</p>
36         </form>
37         % else:
38         <form action="${url(controller='account', action='login_begin')}" method="POST">
39         <p>
40             Identity URL: <input type="text" name="identity_url">
41             <input type="submit" value="Log in">
42         </p>
43         </form>
44         % endif
45     </div>
46
47
48 </div>
49
50 <% messages = h.flash.pop_messages() %>
51 % if messages:
52 <ul id="flash-messages">
53     % for message in messages:
54     <li>${message}</li>
55     % endfor
56 </ul>
57 % endif
58
59
60 <div id="body">
61 ${next.body()}
62 </div>
63 <div id="footer">
64     <p>Powered by floof</p>
65 </div>
66 </body>
67 </html>