Panayiotis Lipiridis avatar Panayiotis Lipiridis committed f0e37b2

Renamed login to sign in and updated footer

Comments (0)

Files changed (17)

     if is_logged_in():
       return f(*args, **kws)
     else:
-      return flask.redirect(flask.url_for('login', next=flask.request.url))
+      return flask.redirect(flask.url_for('signin', next=flask.request.url))
   return decorated_function
 
 
 
 
 ################################################################################
-# Login stuff
+# Sign in stuff
 ################################################################################
 @app.route('/login/')
-def login():
+@app.route('/signin/')
+def signin():
   next_url = util.get_next_url()
-  if flask.url_for('login') in next_url:
+  if flask.url_for('signin') in next_url:
     next_url = flask.url_for('welcome')
 
-  google_login_url = flask.url_for('login_google', next=next_url)
-  twitter_login_url = flask.url_for('login_twitter', next=next_url)
-  facebook_login_url = flask.url_for('login_facebook', next=next_url)
+  google_signin_url = flask.url_for('signin_google', next=next_url)
+  twitter_signin_url = flask.url_for('signin_twitter', next=next_url)
+  facebook_signin_url = flask.url_for('signin_facebook', next=next_url)
 
   return flask.render_template(
-      'login.html',
-      title='Login',
-      html_class='login',
-      google_login_url=google_login_url,
-      twitter_login_url=twitter_login_url,
-      facebook_login_url=facebook_login_url,
+      'signin.html',
+      title='Please sign in',
+      html_class='signin',
+      google_signin_url=google_signin_url,
+      twitter_signin_url=twitter_signin_url,
+      facebook_signin_url=facebook_signin_url,
       next_url=next_url,
     )
 
 
-@app.route('/logout/')
-def logout():
+@app.route('/signout/')
+def signout():
   flaskext.login.logout_user()
   flask.flash(u'You have been signed out.')
   return flask.redirect(flask.url_for('welcome'))
 ################################################################################
 # Google
 ################################################################################
-@app.route('/login/google/')
-def login_google():
+@app.route('/signin/google/')
+def signin_google():
   google_url = users.create_login_url(
       flask.url_for('google_authorized', next=util.get_next_url())
     )
     return flask.redirect(util.get_next_url())
 
   user_db = retrieve_user_from_google(google_user)
-  return login_user_db(user_db)
+  return signin_user_db(user_db)
 
 
 def retrieve_user_from_google(google_user):
     resp['oauth_token_secret']
   )
   user_db = retrieve_user_from_twitter(resp)
-  return login_user_db(user_db)
+  return signin_user_db(user_db)
 
 
 @twitter.tokengetter
   return flask.session.get('oauth_token')
 
 
-@app.route('/login/twitter/')
-def login_twitter():
+@app.route('/signin/twitter/')
+def signin_twitter():
   flask.session.pop('oauth_token', None)
   try:
     return twitter.authorize(
       )
   except:
     flask.flash(
-        'Something went terribly wrong with Twitter login. Please try again.',
+        'Something went terribly wrong with Twitter sign in. Please try again.',
         category='danger',
       )
-    return flask.redirect(flask.url_for('login', next=util.get_next_url()))
+    return flask.redirect(flask.url_for('signin', next=util.get_next_url()))
 
 
 def retrieve_user_from_twitter(response):
   flask.session['oauth_token'] = (resp['access_token'], '')
   me = facebook.get('/me')
   user_db = retrieve_user_from_facebook(me.data)
-  return login_user_db(user_db)
+  return signin_user_db(user_db)
 
 
 @facebook.tokengetter
   return flask.session.get('oauth_token')
 
 
-@app.route('/login/facebook/')
-def login_facebook():
+@app.route('/signin/facebook/')
+def signin_facebook():
   return facebook.authorize(callback=flask.url_for('facebook_authorized',
       next=util.get_next_url(),
       _external=True),
 ################################################################################
 # Helpers
 ################################################################################
-def login_user_db(user_db):
+def signin_user_db(user_db):
   if not user_db:
-    return flask.redirect(flask.url_for('login'))
+    return flask.redirect(flask.url_for('signin'))
 
   flask_user_db = FlaskUser(user_db)
   if flaskext.login.login_user(flask_user_db):
       ), category='success')
     return flask.redirect(util.get_next_url())
   else:
-    flask.flash('Sorry, but you could not log in.', category='danger')
-    return flask.redirect(flask.url_for('login'))
+    flask.flash('Sorry, but you could not sign in.', category='danger')
+    return flask.redirect(flask.url_for('signin'))
 
 
 def strip_username_from_email(email):

main/static/dst/css/style.css

   padding: 19px 20px 20px;
   margin-top: 20px;
   margin-bottom: 20px;
-  background-color: rgba(238, 238, 238, 0.5);
+  background-color: #f5f5f5;
   border-top: 1px solid #e5e5e5;
   *zoom: 1;
 }
   min-height: 20px;
   padding: 19px;
   margin-bottom: 20px;
-  background-color: rgba(238, 238, 238, 0.5);
-  border: 1px solid rgba(220, 220, 220, 0.5);
+  background-color: #f5f5f5;
+  border: 1px solid #e3e3e3;
   -webkit-border-radius: 4px;
   -moz-border-radius: 4px;
   border-radius: 4px;
   font-weight: 200;
   line-height: 30px;
   color: inherit;
-  background-color: rgba(222, 222, 222, 0.5);
+  background-color: #eeeeee;
   -webkit-border-radius: 6px;
   -moz-border-radius: 6px;
   border-radius: 6px;
   position: fixed;
 }
 body {
-  background: url(/p/img/background.png);
   padding-top: 60px;
   overflow-y: scroll;
 }
Add a comment to this file

main/static/img/login/facebook-logo-large.png

Removed
Old image
Add a comment to this file

main/static/img/login/google-logo-large.png

Removed
Old image
Add a comment to this file

main/static/img/login/twitter-logo-large.png

Removed
Old image
Add a comment to this file

main/static/img/signin/facebook-logo-large.png

Added
New image
Add a comment to this file

main/static/img/signin/google-logo-large.png

Added
New image
Add a comment to this file

main/static/img/signin/twitter-logo-large.png

Added
New image

main/static/min/css/style.min.css

 .control-group.info input,.control-group.info select,.control-group.info textarea{border-color:#3a87ad;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);}.control-group.info input:focus,.control-group.info select:focus,.control-group.info textarea:focus{border-color:#2d6987;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #7ab5d3;-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #7ab5d3;box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #7ab5d3;}
 .control-group.info .input-prepend .add-on,.control-group.info .input-append .add-on{color:#3a87ad;background-color:#d9edf7;border-color:#3a87ad;}
 input:focus:required:invalid,textarea:focus:required:invalid,select:focus:required:invalid{color:#b94a48;border-color:#ee5f5b;}input:focus:required:invalid:focus,textarea:focus:required:invalid:focus,select:focus:required:invalid:focus{border-color:#e9322d;-webkit-box-shadow:0 0 6px #f8b9b7;-moz-box-shadow:0 0 6px #f8b9b7;box-shadow:0 0 6px #f8b9b7;}
-.form-actions{padding:19px 20px 20px;margin-top:20px;margin-bottom:20px;background-color:rgba(238, 238, 238, 0.5);border-top:1px solid #e5e5e5;*zoom:1;}.form-actions:before,.form-actions:after{display:table;content:"";line-height:0;}
+.form-actions{padding:19px 20px 20px;margin-top:20px;margin-bottom:20px;background-color:#f5f5f5;border-top:1px solid #e5e5e5;*zoom:1;}.form-actions:before,.form-actions:after{display:table;content:"";line-height:0;}
 .form-actions:after{clear:both;}
 .help-block,.help-inline{color:#595959;}
 .help-block{display:block;margin-bottom:10px;}
 .dropdown-submenu.pull-left{float:none;}.dropdown-submenu.pull-left>.dropdown-menu{left:-100%;margin-left:10px;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px;}
 .dropdown .dropdown-menu .nav-header{padding-left:20px;padding-right:20px;}
 .typeahead{margin-top:2px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}
-.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:rgba(238, 238, 238, 0.5);border:1px solid rgba(220, 220, 220, 0.5);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);}.well blockquote{border-color:#ddd;border-color:rgba(0, 0, 0, 0.15);}
+.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);}.well blockquote{border-color:#ddd;border-color:rgba(0, 0, 0, 0.15);}
 .well-large{padding:24px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;}
 .well-small{padding:9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
 .fade{opacity:0;-webkit-transition:opacity 0.15s linear;-moz-transition:opacity 0.15s linear;-o-transition:opacity 0.15s linear;transition:opacity 0.15s linear;}.fade.in{opacity:1;}
 .carousel-caption h4,.carousel-caption p{color:#ffffff;line-height:20px;}
 .carousel-caption h4{margin:0 0 5px;}
 .carousel-caption p{margin-bottom:0;}
-.hero-unit{padding:60px;margin-bottom:30px;font-size:18px;font-weight:200;line-height:30px;color:inherit;background-color:rgba(222, 222, 222, 0.5);-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;}.hero-unit h1{margin-bottom:0;font-size:60px;line-height:1;color:inherit;letter-spacing:-1px;}
+.hero-unit{padding:60px;margin-bottom:30px;font-size:18px;font-weight:200;line-height:30px;color:inherit;background-color:#eeeeee;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;}.hero-unit h1{margin-bottom:0;font-size:60px;line-height:1;color:inherit;letter-spacing:-1px;}
 .hero-unit li{line-height:30px;}
 .pull-right{float:right;}
 .pull-left{float:left;}
 .show{display:block;}
 .invisible{visibility:hidden;}
 .affix{position:fixed;}
-body{background:url(/p/img/background.png);padding-top:60px;overflow-y:scroll;}
+body{padding-top:60px;overflow-y:scroll;}
 .footer{border-top:1px solid #eeeeee;padding:32px 0px;margin-top:32px;}
 .img-error{padding:4px;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0, 0, 0, 0.2);-webkit-box-shadow:0 1px 3px rgba(0, 0, 0, 0.1);-moz-box-shadow:0 1px 3px rgba(0, 0, 0, 0.1);box-shadow:0 1px 3px rgba(0, 0, 0, 0.1);width:485px;height:270px;margin:0 auto;display:block;}

main/static/robots.txt

 User-agent: *
-Disallow: /logout/
+Disallow: /signout/
 Disallow: /_s/
 Disallow: /_ah/

main/static/src/less/base.less

 body {
-  background: url(/p/img/background.png);
   padding-top: 60px;
   overflow-y: scroll;
 }

main/static/src/less/variables.less

 @iconSpritePath: "/p/img/glyphicons-halflings.png";
 @iconWhiteSpritePath: "/p/img/glyphicons-halflings-white.png";
-
-@wellBackground: rgba(238, 238, 238, 0.5);
-@heroUnitBackground: rgba(222, 222, 222, 0.5);
-@formActionsBackground: rgba(238, 238, 238, 0.5);

main/templates/bit/footer.html

 <div class="footer">
   <div class="container">
-    <p class="pull-right">
+    <p class="muted pull-right">
       version: {{config.CURRENT_VERSION_ID}}
       | <a href="/_s/{{request.url.replace(request.host_url, '')}}" target="_blank">View in JSON</a>
     </p>
-    <p>&copy; 2012 - {{config.CONFIG_DB.brand_name}}</p>
+    <p class="muted">&copy; 2012 - {{config.CONFIG_DB.brand_name}}</p>
   </div>
 </div>

main/templates/bit/top_bar.html

             <a href="{{url_for('profile')}}">{{current_user.name}}</a>
           </li>
           <li>
-            <a href="{{url_for('logout')}}">Logout</a>
+            <a href="{{url_for('signout')}}">Sign out</a>
           </li>
         {% else %}
           <li>
-            <a href="{{url_for('login')}}">Login</a>
+            <a href="{{url_for('signin')}}">Sign in</a>
           </li>
         {% endif %}
       </ul>

main/templates/login.html

-{% extends 'base.html' %}
-
-{% block content %}
-  <div class="page-header">
-    <h1>
-      Login to continue
-      <small>
-          After login you'll be redirected to: {{next_url}}
-      </small>
-    </h1>
-  </div>
-  <div class="row">
-    <div class="span4">
-      <div class="well">
-        <a class="btn btn-block" href="{{google_login_url}}">
-          <img src="/p/img/login/google-logo-large.png" alt="Google Logo ">
-        </a>
-      </div>
-    </div>
-    <div class="span4">
-      <div class="well">
-        <a class="btn btn-block" href="{{facebook_login_url}}">
-          <img src="/p/img/login/facebook-logo-large.png" alt="Facebook Logo ">
-        </a>
-      </div>
-    </div>
-    <div class="span4">
-      <div class="well">
-        <a class="btn btn-block" href="{{twitter_login_url}}">
-          <img src="/p/img/login/twitter-logo-large.png" alt="Twitter Logo ">
-        </a>
-      </div>
-    </div>
-  </div>
-{% endblock %}

main/templates/signin.html

+{% extends 'base.html' %}
+
+{% block content %}
+  <div class="page-header">
+    <h1>
+      {{title}}
+      <small>
+        It only takes 8 seconds
+      </small>
+    </h1>
+  </div>
+  <div class="row">
+    <div class="span4">
+      <div class="well">
+        <a class="btn btn-block" href="{{google_signin_url}}">
+          <img src="/p/img/signin/google-logo-large.png" alt="Google Logo ">
+        </a>
+      </div>
+    </div>
+    <div class="span4">
+      <div class="well">
+        <a class="btn btn-block" href="{{facebook_signin_url}}">
+          <img src="/p/img/signin/facebook-logo-large.png" alt="Facebook Logo ">
+        </a>
+      </div>
+    </div>
+    <div class="span4">
+      <div class="well">
+        <a class="btn btn-block" href="{{twitter_signin_url}}">
+          <img src="/p/img/signin/twitter-logo-large.png" alt="Twitter Logo ">
+        </a>
+      </div>
+    </div>
+  </div>
+{% endblock %}

main/templates/welcome.html

         <li><a href="http://lesscss.org/">LessCSS</a></li>
         <li><a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap</a></li>
         <li><a href="http://www.pubnub.com">PubNub</a></li>
-        <li> OpenID Logins
-          (<a href="{{url_for('login_google')}}">Google</a>,
-          <a href="{{url_for('login_facebook')}}">Facebook</a>,
-          <a href="{{url_for('login_twitter')}}">Twitter</a>)
+        <li> OpenID sign in
+          (<a href="{{url_for('signin_google')}}">Google</a>,
+          <a href="{{url_for('signin_facebook')}}">Facebook</a>,
+          <a href="{{url_for('signin_twitter')}}">Twitter</a>)
         </li>
       </ul>
     </div>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.