merged conflicting stuff. Added 'me' tag
[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(url('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>Log in or register with <img src="/icons/openid.png" alt="OpenID" title="OpenID"> OpenID:</p>
41         <p>
42             <input type="text" name="identity_url" id="identity-url">
43             <input type="submit" value="Log in">
44         </p>
45         <p class="what"><a href="${url(controller='account', action='login')}">What's this?</a></p>
46         </form>
47         % endif
48     </div>
49
50
51 </div>
52
53 <% messages = h.flash.pop_messages() %>
54 % if messages:
55 <ul id="flash-messages">
56     % for message in messages:
57     <li>${message}</li>
58     % endfor
59 </ul>
60 % endif
61
62
63 <div id="body">
64 ${next.body()}
65 </div>
66 <div id="footer">
67     <p>Powered by floof</p>
68     <p>Fugue icon set by <a href="http://www.pinvoke.com/">Yusuke Kamiyamane</a></p>
69 </div>
70 </body>
71 </html>