Skip to content

Commit

Permalink
Restructuring
Browse files Browse the repository at this point in the history
  • Loading branch information
tijptjik committed Oct 13, 2012
1 parent e225cb8 commit b210513
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 13 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
12 changes: 6 additions & 6 deletions media/html/index.html → views/home.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,27 @@
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name=cd "viewport" content="width=device-width, initial-scale=1" />
<title>
</title>
<link rel="stylesheet" href="https://ajax.aspnetcdn.com/ajax/jquery.mobile/1.1.1/jquery.mobile-1.1.1.min.css" />
<link rel="stylesheet" href="my.css" />
<link rel="stylesheet" href="/css/style.css" />
<style>
/* App custom styles */
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js">
</script>
<script src="https://ajax.aspnetcdn.com/ajax/jquery.mobile/1.1.1/jquery.mobile-1.1.1.min.js">
</script>
<script src="my.js">
<script src="/js/main.js">
</script>
</head>
<body>
<!-- Home -->
<div data-role="page" id="page1">
<div data-role="content">
<div style="width: 100%; height: 173px; position: relative; text-align: center;">
<img src="images/monkey.png" alt="image" />
<img src="/img/monkey.png" alt="image" />
</div>
<div style="float:right">
<a href="/login">Login</a>
Expand All @@ -33,7 +33,7 @@ <h1>
<form action="/login">
<div id="checkboxes3" data-role="fieldcontain">
<p>Vocably will access your Google Mail account. We do not save any of your information.</p>
<fieldset data-role="controlgroup" data-type="vertical">
<fieldset data-role="controlgroup" data-type="vertical">
<input id="checkbox4" name="" type="checkbox" />
<label for="checkbox4">
I agree to the terms.
Expand All @@ -48,4 +48,4 @@ <h1>
//App custom javascript
</script>
</body>
</html>
</html>
2 changes: 2 additions & 0 deletions views/index.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<script type="text/javascript" src="js/app.js'" charset="utf-8"></script>
<p>loaded</p>
27 changes: 20 additions & 7 deletions vocably.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
from bottle import route, run, template, redirect, request
from bottle import route, run, debug, template, request, static_file

from oauth2client.client import flow_from_clientsecrets
from oauth2client.file import Storage

import httplib2

# Landing Page
@route('/')
def home():
return template('media/html/index.html')

@route('/login')
def login():
print "Logging in a user: redirecting to Google"
redirect(flow.step1_get_authorize_url())
output = template('home')
return output

# OAuth
@route('/oauth2callback')
def login_callback():
print "Login callback from Google"
Expand All @@ -34,4 +32,19 @@ def login_callback():
redirect_uri='http://localhost:8080/oauth2callback')
storage = Storage('config/credentials')

# Static Files
@route('/css/:path#.+#', name='css')
def css(path):
return static_file(path, root='css')

@route('/img/:path#.+#', name='img')
def img(path):
return static_file(path, root='img')

@route('/js/:path#.+#', name='js')
def js(path):
return static_file(path, root='js')



run(host='0.0.0.0', port=8080, debug=True, reloader=True)

0 comments on commit b210513

Please sign in to comment.