[Assorted-commits] SF.net SVN: assorted:[1428] pitch-in/trunk/src/pitchin
Brought to you by:
yangzhang
From: <yan...@us...> - 2009-05-25 06:24:55
|
Revision: 1428 http://assorted.svn.sourceforge.net/assorted/?rev=1428&view=rev Author: yangzhang Date: 2009-05-25 06:24:45 +0000 (Mon, 25 May 2009) Log Message: ----------- re-designed for web 2.0 look Modified Paths: -------------- pitch-in/trunk/src/pitchin/app.yaml pitch-in/trunk/src/pitchin/pitchin/templates/created.html pitch-in/trunk/src/pitchin/pitchin/templates/main.html pitch-in/trunk/src/pitchin/pitchin/templates/pool.html pitch-in/trunk/src/pitchin/pitchin/views.py Added Paths: ----------- pitch-in/trunk/src/pitchin/static/ pitch-in/trunk/src/pitchin/static/bl.png pitch-in/trunk/src/pitchin/static/br.png pitch-in/trunk/src/pitchin/static/default.css pitch-in/trunk/src/pitchin/static/pitchin.png pitch-in/trunk/src/pitchin/static/tl.png pitch-in/trunk/src/pitchin/static/tr.png Removed Paths: ------------- pitch-in/trunk/src/pitchin/pitchin/templates/index.html Modified: pitch-in/trunk/src/pitchin/app.yaml =================================================================== --- pitch-in/trunk/src/pitchin/app.yaml 2009-05-24 21:05:06 UTC (rev 1427) +++ pitch-in/trunk/src/pitchin/app.yaml 2009-05-25 06:24:45 UTC (rev 1428) @@ -4,5 +4,7 @@ api_version: 1 handlers: +- url: /static + static_dir: static - url: /.* script: main.py Modified: pitch-in/trunk/src/pitchin/pitchin/templates/created.html =================================================================== --- pitch-in/trunk/src/pitchin/pitchin/templates/created.html 2009-05-24 21:05:06 UTC (rev 1427) +++ pitch-in/trunk/src/pitchin/pitchin/templates/created.html 2009-05-25 06:24:45 UTC (rev 1428) @@ -1,12 +1,25 @@ <html> + <head> + <title>PitchIn - Pool Successfully Created</title> + <link rel="stylesheet" type="text/css" href="static/default.css"/> + </head> <body> - <p> - Congrats! You've successfully created a new money pool. - Send this URL out to anyone you're inviting to - participate: - </p> - <p> - <a href="/pool?key={{key}}">http://pitch-in.appspot.com/pool?key={{key}}</a> - </p> + <div class="box"> + <div class="boxtop"><div></div></div> + <div class="header"> + <img src="static/pitchin.png"/> + </div> + <div class="body"> + <p> + Congrats! You've successfully created a new money pool. + Send this URL out to anyone you're inviting to + participate: + </p> + <p> + <a href="/pool?key={{key}}">http://pitch-in.appspot.com/pool?key={{key}}</a> + </p> + </div> + <div class="boxbottom"><div></div></div> + </div> </body> </html> Deleted: pitch-in/trunk/src/pitchin/pitchin/templates/index.html =================================================================== --- pitch-in/trunk/src/pitchin/pitchin/templates/index.html 2009-05-24 21:05:06 UTC (rev 1427) +++ pitch-in/trunk/src/pitchin/pitchin/templates/index.html 2009-05-25 06:24:45 UTC (rev 1428) @@ -1,5 +0,0 @@ -<html> -<body> -hi -</body> -</html> Modified: pitch-in/trunk/src/pitchin/pitchin/templates/main.html =================================================================== --- pitch-in/trunk/src/pitchin/pitchin/templates/main.html 2009-05-24 21:05:06 UTC (rev 1427) +++ pitch-in/trunk/src/pitchin/pitchin/templates/main.html 2009-05-25 06:24:45 UTC (rev 1428) @@ -1,23 +1,35 @@ <html> + <head> + <title>PitchIn!</title> + <link rel="stylesheet" type="text/css" href="static/default.css"/> + </head> <body> - <p style="color: red">{{error}}</p> - <p> - Using PitchIn, you can easily create and manage a money pool that others - can contribute to. - </p> - <p> - To create a pool, just enter a description of what it's for here, and you - will be provided a URL that you can distribute to the people you want to - participate in the pool. - </p> - <form action="/create" method="post"> - <div><input type="text" name="descrip"/></div> - <div><input type="submit" width="50" value="Create Pool"></div> - </form> - <p>Example descriptions:</p> - <ul> - <li>Birthday gift for Amy (we're aiming for $180 Rock Band set)</li> - <li>Holiday vacation trip</li> - </ul> + <div class="box"> + <div class="boxtop"><div></div></div> + <div class="header"> + <img src="static/pitchin.png"/> + </div> + <div class="body"> + <p class="line">Easily create and manage a money pool that others can contribute to.</p> + <p> + To create a pool, just enter a description of what it's for here, and you + will be provided a URL that you can distribute to the people you want to + participate in the pool. + </p> + <p class="error">{{error}}</p> + <form action="/create" method="post"> + <div> + <input class="text-input" type="text" name="descrip"/> + <input type="submit" width="50" value="Create Pool"> + </div> + </form> + <div class="example"> + <p style="font-size: larger; font-weight: bold">Example descriptions:</p> + <p>“Birthday gift for Amy (we're aiming for $180 Rock Band set)”</p> + <p>“Holiday vacation trip”</p> + </div> + </div> + <div class="boxbottom"><div></div></div> + </div> </body> </html> Modified: pitch-in/trunk/src/pitchin/pitchin/templates/pool.html =================================================================== --- pitch-in/trunk/src/pitchin/pitchin/templates/pool.html 2009-05-24 21:05:06 UTC (rev 1427) +++ pitch-in/trunk/src/pitchin/pitchin/templates/pool.html 2009-05-25 06:24:45 UTC (rev 1428) @@ -1,23 +1,36 @@ <html> + <head> + <title>PitchIn!</title> + <link rel="stylesheet" type="text/css" href="static/default.css"/> + </head> <body> - <p style="color: red">{{error}}</p> - <p>Description of pool: {{descrip}}</p> - {{contribs}} - <p> - To add or update your own contribution to the pool, enter - the following information: - </p> - <form action="/pool" method="post"> - <input type="hidden" name="key" value="{{key}}"/> - <div> - <label name="name">Name:</label> - <input type="text" name="name"/> + <div class="box"> + <div class="boxtop"><div></div></div> + <div class="header"> + <img src="static/pitchin.png"/> </div> - <div> - <label name="amount">Amount:</label> - $<input type="text" name="amount"/>.00 + <div class="body"> + <p style="font-size: larger"><span style="font-weight: bold">Pool:</span> {{descrip}}</p> + {{contribs}} + <p> + To add or update your own contribution to the pool, enter + the following information. + </p> + <form action="/pool" method="post"> + <p class="error">{{error}}</p> + <input type="hidden" name="key" value="{{key}}"/> + <div> + <label name="name">Name:</label> + <input type="text" name="name"/> + </div> + <div> + <label name="amount">Contribution:</label> + <input type="text" name="amount"/> + </div> + <div><input type="submit" value="Enter the pool!"/></div> + </form> </div> - <div><input type="submit" value="Enter the pool!"/></div> - </form> + <div class="boxbottom"><div></div></div> + </div> </body> </html> Modified: pitch-in/trunk/src/pitchin/pitchin/views.py =================================================================== --- pitch-in/trunk/src/pitchin/pitchin/views.py 2009-05-24 21:05:06 UTC (rev 1427) +++ pitch-in/trunk/src/pitchin/pitchin/views.py 2009-05-25 06:24:45 UTC (rev 1428) @@ -11,12 +11,14 @@ def showContribs(pool): contribs = getContribs(pool) if len(contribs) == 0: - return '<p>(no participants yet)</p>' + return '<p style="font-style: italic;">(no participants yet)</p>' else: - s = '<ul>' - for name, amount in contribs.iteritems(): - s += '<li>%s: $%d.00</li>' % (cgi.escape(name), amount) - s += '<li>TOTAL: $%d.00</li></ul>' % (sum(contribs.itervalues()),) + s = '<div class="rows">' + for i, (name, amount) in enumerate(contribs.iteritems()): + s += '<div class="row%d">%s: %d</div>' % (i % 2, cgi.escape(name), amount) + s += '<div class="aggrow">Max total: %d</div>' % (sum(contribs.itervalues()),) + s += '<div class="aggrow">If everyone paid the minimum: %d</div>' % (len(contribs) * min(contribs.itervalues()),) + s += '</div>' return s class invalid_submit(Exception): pass Added: pitch-in/trunk/src/pitchin/static/bl.png =================================================================== (Binary files differ) Property changes on: pitch-in/trunk/src/pitchin/static/bl.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: pitch-in/trunk/src/pitchin/static/br.png =================================================================== (Binary files differ) Property changes on: pitch-in/trunk/src/pitchin/static/br.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: pitch-in/trunk/src/pitchin/static/default.css =================================================================== --- pitch-in/trunk/src/pitchin/static/default.css (rev 0) +++ pitch-in/trunk/src/pitchin/static/default.css 2009-05-25 06:24:45 UTC (rev 1428) @@ -0,0 +1,31 @@ +body { font-family: georgia; background-color: black; } +.box { background-color: white; width: 700px; margin: 40px auto; } +.boxtop div, .boxtop, .boxbottom div, .boxbottom { + width: 100%; height: 30px; font-size: 1px; +} +.boxtop div { background: url(tl.png) no-repeat top left; } +.boxtop { background: url(tr.png) no-repeat top right; } +.header { text-align: center; width: 100%; } +.body { margin: 0 30px; text-align: center; } +.error { color: red; } +.example { background-color: #ffffcc; } +.boxbottom div { background: url(bl.png) no-repeat bottom left; } +.boxbottom { background: url(br.png) no-repeat bottom right; } +label, input { + font-family: Georgia, Times, serif; + display: block; + margin: 0 auto; + color: #0d3a57; + font-size: 30px; + padding: 4px 0; + text-align: center; + width: 75%; +} +.text-input { width: 75%; } +.quote { font-family: serif; font-size: 50pt; float: left; } +.line { width: 75%; font-size: larger; font-style: italic; margin: 0 auto; } +.rows { width: 75%; margin: 0 auto; } +.row0, .row1, .aggrow { padding-top: 3px; padding-bottom: 3px; } +.row0 { background-color: #dddddd; } +.row1 { background-color: #eeeeee; } +.aggrow { color: white; background-color: black; font-weight: bold; } Added: pitch-in/trunk/src/pitchin/static/pitchin.png =================================================================== (Binary files differ) Property changes on: pitch-in/trunk/src/pitchin/static/pitchin.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: pitch-in/trunk/src/pitchin/static/tl.png =================================================================== (Binary files differ) Property changes on: pitch-in/trunk/src/pitchin/static/tl.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: pitch-in/trunk/src/pitchin/static/tr.png =================================================================== (Binary files differ) Property changes on: pitch-in/trunk/src/pitchin/static/tr.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |