Skip to content
Browse files

New tempate for login_or_signup.html

Signed-off-by: Wenwei Cai <stanley.w.cai@gmail.com>
  • Loading branch information...
1 parent d1a0a73 commit 313a884a34c7d62bc4f0e9aba77c54dc13bf25eb @swcai committed May 10, 2011
View
2 bookmarks.py
@@ -56,7 +56,7 @@ def __init__(self):
]
settings = dict(
# TODO update cookie secret
- cookie_secret="32oETzKXQAGaYdkL5gEmGeJJFuYh7EQnp2XdTP1o/Vo=",
+ cookie_secret="HTVlP^l)L_g<1YKQoIKn]Ga@MGh#Shg0a!WH{&|dFX_*D%#}",
login_url="/auth/login",
template_path= os.path.join(os.path.dirname(__file__), "templates"),
static_path = os.path.join(os.path.dirname(__file__), "static"),
View
0 database.py → database_sqlite3.py
File renamed without changes.
View
405 static/default.css
@@ -0,0 +1,405 @@
+/* Modified by Stanley Cai <stanley.w.cai@gmail.com> */
+*
+{
+ margin-top: 0em;
+ margin-bottom: 0em;
+ margin-left: auto;
+ margin-right: auto;
+ padding: 0em;
+}
+
+h1 ,h2,h3,h4,h5,h6
+{
+ color: #444;
+}
+
+body,input
+{
+ font-family: Helvetica;
+ font-size: 10pt;
+ color: #777;
+}
+
+input.button
+{
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ border: 1px solid #BBB;
+ background-color: #eaeaea;
+ color: #555;
+ font-size: 1em;
+ font-weight: bold;
+ padding: 0.35em;
+}
+
+input.text
+{
+ border-top: solid 1px #888;
+ border-left: solid 1px #888;
+ border-bottom: solid 1px #888;
+ border-right: solid 1px #888;
+ padding: 0.25em;
+ margin-top: 0.25em;
+ margin-bottom: 0.5em;
+}
+
+a
+{
+ color: #666666;
+ text-decoration: none;
+}
+
+a:hover
+{
+ text-decoration: none;
+}
+
+#outer
+{
+
+}
+
+#header_wrapper {
+ background: #E7E8E8;
+}
+
+#header
+{
+ padding: 5em 4.5em 0em 5em;
+ width: 640px;
+}
+
+#header h2
+{
+ font-size: 1.2em;
+ font-weight: normal;
+/* color: #949494; */
+ display: inline;
+ padding-left: 0.5em;
+ padding-right: 1.5em;
+}
+
+#header h1
+{
+ font-size: 2em;
+ display: inline;
+/* letter-spacing: -0.05em;*/
+ background: #A82400;
+ padding-left: 0.6em;
+ padding-right: 0.6em;
+ padding-top: 0.3em;
+}
+
+#header h1 a
+{
+ color: #FFF;
+ text-decoration: none;
+}
+
+/* Menu */
+
+#menu
+{
+ position: relative;
+ top: 1769px;
+ left: -29px;
+ background-color: #558800;
+ border-bottom: solid 1px #336600;
+ width: 100%;
+}
+
+#menu ul
+{
+ padding: 1em 4.5em 1em 4.5em;
+ list-style: none;
+}
+
+#menu li
+{
+ display: inline;
+ padding-right: 2.5em;
+ font-size: 0.8em;
+}
+
+#menu li a
+{
+ color: #fff;
+ background-color: inherit;
+}
+
+#menu li a:hover
+{
+ border-bottom: solid 1px #558800;
+}
+
+/* Content */
+
+#content
+{
+ width: 655px;
+ padding-left: 3em;
+ padding-right: 3em;
+ padding-top: 1em;
+ position: relative;
+}
+
+.box
+{
+ margin-bottom: 1.25em;
+ width: 322px;
+}
+
+.boxContent
+{
+ margin-top: 0.5em;
+ padding: 1.25em 1em 0.25em 1em;
+ background: #ffffff url('images/a1.gif') top left repeat-x;
+}
+
+/** boxA **/
+
+.boxA .boxContent
+{
+ margin-top: 0em;
+ color: #000;
+ padding: 1em 1.5em 1em 1em;
+}
+
+.boxA span
+{
+ font-weight: bold;
+ font-size: 0.8em;
+}
+
+.boxA a
+{
+ background-color: inherit;
+ color: #fff;
+ font-size: 0.8em;
+}
+
+.boxA a:hover
+{
+ text-decoration: none;
+ border-bottom: solid 1px #ff9900;
+}
+
+.boxA input.button
+{
+ margin-top: 0.25em;
+ vertical-align: middle;
+}
+
+.boxA input.text
+{
+ width: 100%;
+}
+
+/** boxB **/
+
+.boxB .boxContent
+{
+ margin-top: 0em;
+ color: #fff;
+ border-bottom: solid 1px #004466;
+ background: #007799;
+ padding: 1em 1.5em 1em 1em;
+}
+
+.boxB span
+{
+ font-weight: bold;
+ font-size: 0.8em;
+}
+
+.boxB a
+{
+ background-color: inherit;
+ color: #fff;
+ font-size: 0.8em;
+}
+
+.boxB a:hover
+{
+ text-decoration: none;
+ border-bottom: solid 1px #007799;
+}
+
+.boxB input.button
+{
+ margin-top: 0.25em;
+ vertical-align: middle;
+}
+
+.boxB input.text
+{
+ width: 100%;
+}
+
+/** Content **/
+
+#content p
+{
+ margin-bottom: 1em;
+ text-align: justify;
+ line-height: 1.5em;
+}
+
+#content strong
+{
+ color: #444;
+ font-size: 15px;
+}
+
+#content h2,h3,h4,h5,h6
+{
+}
+
+#content h2,h3
+{
+}
+
+#content h3
+{
+ font-size: 1.0em;
+}
+
+#content h2
+{
+ font-size: 1.25em;
+}
+
+#content ul
+{
+ margin-bottom: 1em;
+ padding-left: 1em;
+ line-height: 1.8em;
+}
+
+#content blockquote
+{
+ padding: 1em;
+ margin-bottom: 1.5em;
+ border-left: solid 6px #558800;
+}
+
+#content blockquote p
+{
+ margin-bottom: 0em;
+ line-height: 1.5em;
+}
+
+#content table
+{
+ margin-bottom: 1.5em;
+}
+
+#content table th
+{
+ text-align: left;
+ font-weight: bold;
+ padding: 0.5em;
+ color: #444;
+}
+
+#content table td
+{
+ padding: 0.5em;
+}
+
+#content table tr.rowA
+{
+ background-color: #efefef;
+ color: inherit;
+}
+
+#content table tr.rowB
+{
+ background-color: #fafafa;
+ color: inherit;
+}
+
+/* Primary Content */
+
+#primaryContentContainer
+{
+ float: right;
+ margin-left: -19em;
+}
+
+#primaryContent
+{
+ margin: 0em 0em 0em 15em;
+ padding: 2.5em 2.5em 1.5em 2.5em;
+}
+
+/* Secondary Content */
+
+#secondaryContent
+{
+ padding: 2.5em 2.5em 1.5em 2.5em;
+ clear: both;
+ float: left;
+}
+
+#login_button
+{
+ border-bottom: 1px solid #003;
+ border-color: #062c50;
+ background-color: #19558d;
+ color: white;
+ min-width: 40px;
+ padding: 5px 30px;
+}
+
+#signup_button
+{
+ border-color:#8CB332;
+ border-bottom: 1px solid #648517;
+ color: #406A24;
+ background-color: #C3DD82;
+ padding: 5px 30px;
+ text-shadow: 0 1px #D4ED95;
+}
+
+/* Footer */
+
+#footer
+{
+ width: 640px;
+}
+
+#footer_wrapper
+{
+ border-top-color: #CCCCCC;
+ border-top-style: solid;
+ border-top-width: 1px;
+ padding-top: 1em;
+}
+
+#footer ul
+{
+ list-style-image: none;
+ list-style-position: outside;
+ list-style-type: none;
+ padding-left-ltr-source: logical;
+ padding-right-rtl-source: logical;
+ padding-start-value: 40px;
+}
+
+#footer li {
+ font-size: 0.9em;
+ margin-bottom: 0;
+ margin-left: 0;
+ margin-right: 1em;
+ margin-top: 0;
+ padding-bottom: 0;
+ padding-left: 0;
+ padding-right: 0;
+ padding-top: 0;
+ display: list-item;
+ float: left;
+}
+
+#footer li a {
+ font-weight: bold;
View
118 templates/login_or_signup.html 100644 → 100755
@@ -1,45 +1,73 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-
-<head>
- <meta http-equiv="content-type" content="text/html;charset=iso-8859-1" />
- <title>Bookmarks</title>
-</head>
-
-<body class="login" onLoad="document.forms[0].elements[0].focus();">
-<div class="Container">
- <div id="Dialog">
- <form action="/auth/login" method="post">
- <dl>
- <dt>Username or Email:</dt>
- <dd><input name="username_or_email" type="username" value="" /></dd>
- <dt>Password:</dt>
- <dd>
- <input id="password" name="password" type="password" />
-
- </dd>
- </dl>
- <input type="submit" value="Login" class="submit"/>
- </form>
- <form action="/auth/signup" method="post">
- <dl>
- <dt>Username:</dt>
- <dd><input id="username" name="username" type="username" value="" /></dd>
- <dt>Email:</dt>
- <dd><input id="email" name="email" type="email" value="" /></dd>
-
- <dt>Password:</dt>
- <dd>
- <input id="password" name="password" type="password" />
-
- </dd>
- <input type="submit" value="Sign Up" class="submit"/>
- </form>
-
- </div>
-</div>
-
-</body>
-</html>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="content-type" content="text/html; charset=utf-8" />
+<title>Read it Later - A tool helping manage your time</title>
+<link href="static/default.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+<div id="outer">
+ <div id="header_wrapper">
+ <div id="header">
+ <h1><a href="#">Read it Later</a></h1>
+ <h2>A tool helping you manage your time and get things done.</h2>
+ </div>
+ </div>
+ <div id="content" style="min-height:250px">
+ <div class="box boxA" style="float:left; width: 322px;">
+ <div class="boxContent">
+ <form action="/auth/login" method="post">
+ <div>
+ <strong color="#black" font-weight="bold">Returning User</strong><br/>
+ <span>Username:</span>
+ <input type="text" class="text" maxlength="32" name="username_or_email" />
+ <span>Password:</span>
+ <input type="password" class="text" maxlength="32" name="password" />
+ <input type="submit" class="button" id="login_button" value="Login"/>
+ </div>
+ </form>
+ </div>
+ </div>
+ <div class="box boxA" style="float:left; width: 322px; min-height: 225px;">
+ <div class="boxContent">
+ <form action="/auth/signup" method="post">
+ <div>
+ <strong color="#black" font-weight="bold" >New User</strong><br/>
+ <span>Username:</span>
+ <input type="text" class="text" maxlength="32" name="username" />
+ <span>Email Address:</span>
+ <input type="text" class="text" maxlength="32" name="email" />
+ <span>Password:</span>
+ <input type="password" class="text" maxlength="32" name="password" />
+ <input type="submit" class="button" id="signup_button" value="Sign Up" />
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ <div id="footer_wrapper"><div id="footer">
+ <ul>
+ <li class="footer_item"> • </li>
+ <li class="footer_item">
+ <a href="/about">About</a>
+ </li>
+ <li class="footer_item">
+ <a href="/jobs">Jobs</a>
+ </li>
+ <li class="footer_item">
+ <a href="/about/privacy">Privacy</a>
+ </li>
+ <li class="footer_item">
+ <a href="/about/tos">Terms</a>
+ </li>
+ <li class="footer_item">
+ <a href="/press">Press</a>
+ </li>
+ <li class="footer_item"> • </li>
+ </li>
+ </ul>
+ </div></div>
+ </div>
+</div>
+</body>
+</html>
View
0 utils/deploy.sh
No changes.
View
2 utils/env.sh
@@ -0,0 +1,2 @@
+#!/usr/bin/env bash
+ssh -f -N -L 3306:localhost:3306 c@stanleycai.com
View
10 utils/generate_secret.py
@@ -0,0 +1,10 @@
+#!/usr/bin/env python
+
+import random
+
+charset = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*()_+{}[]|<>?"
+output = ""
+r = random.Random()
+for i in range(48):
+ output += charset[r.randint(0, len(charset)-1)]
+print output
View
3 utils/stress.sh
@@ -0,0 +1,3 @@
+#!/usr/bin/env bash
+
+

0 comments on commit 313a884

Please sign in to comment.
Something went wrong with that request. Please try again.