trying out resource routing. Works decently. Added lots of notes.
[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 ${c.user.name}.  ${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 <div id="body">
50 ${next.body()}
51 </div>
52 <div id="footer">
53     <p>Powered by floof</p>
54 </div>
55 </body>
56 </html>