Skip to content

Commit

Permalink
Show word score
Browse files Browse the repository at this point in the history
  • Loading branch information
tijptjik committed Oct 13, 2012
1 parent 7eb90e2 commit 0450441
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
5 changes: 0 additions & 5 deletions css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,6 @@
margin: 0;
padding: 0;
}

.monkey_business {
margin-right: auto;
margin-left: auto;
}

}
@media all and (min-width: 750px){
Expand Down
1 change: 1 addition & 0 deletions views/words.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
</div>
%end
</div>
<h2>{{user_score}} words known</h2>
</div>
<script>
//App custom javascript
Expand Down
11 changes: 8 additions & 3 deletions vocably.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from bottle import route, run, debug, template, request, static_file, redirect
from utils import vocably_oauth as oauth, score, definition
from utils import database as db


# Landing Page
@route('/')
Expand All @@ -11,10 +13,13 @@ def home():
def words():
# Get words for user
# word_defs = get_word_defs()
# newwords = score.choose_words(oauth.user_email())
newwords = ['grinder','helicopter','fab']
user_email = oauth.user_email()
newwords = score.choose_words(user_email)
# newwords = ['grinder','helicopter','fab']
word_defs = {w:definition.definition(w) for w in newwords}
output = template('words', word_defs=word_defs)
user_score = db.get_score(user_email)
print 'user score:', user_score
output = template('words', word_defs=word_defs, user_score=user_score)
return output

@route('/login')
Expand Down

0 comments on commit 0450441

Please sign in to comment.