diff --git a/digimarks.py b/digimarks.py index c44e1d2..639b517 100644 --- a/digimarks.py +++ b/digimarks.py @@ -1,6 +1,7 @@ import datetime import hashlib import os +import sys import requests from utilkit import datetimeutil @@ -126,16 +127,16 @@ def bookmarks(userkey): # return render_template('bookmarks.html', bookmarks) #else: # abort(404) - bookmarks = Bookmark.select(Bookmark.userkey==userkey) + bookmarks = Bookmark.select(Bookmark.userkey == userkey) return render_template('bookmarks.html', bookmarks=bookmarks, userkey=userkey) -@app.route('//') -def viewbookmark(userkey, urlhash): - """ Bookmark detail view """ - bookmark = Bookmark.select(Bookmark.url_hash == urlhash, Bookmark.userkey == userkey) - return render_template('viewbookmark.html', userkey=userkey, bookmark=bookmark) +#@app.route('//') +#def viewbookmark(userkey, urlhash): +# """ Bookmark detail view """ +# bookmark = Bookmark.select(Bookmark.url_hash == urlhash, Bookmark.userkey == userkey) +# return render_template('viewbookmark.html', userkey=userkey, bookmark=bookmark) @app.route('///json') @@ -145,18 +146,20 @@ def viewbookmarkjson(userkey, urlhash): return bookmark.to_dict() +@app.route('//') @app.route('///edit') def editbookmark(userkey, urlhash): """ Bookmark edit form """ # bookmark = getbyurlhash() - bookmark = Bookmark(Bookmark.url_hash==urlhash) + bookmark = Bookmark.get(Bookmark.url_hash == urlhash) + print bookmark.url return render_template('edit.html', action='Edit bookmark', userkey=userkey, bookmark=bookmark) @app.route('//add') def addbookmark(userkey): """ Bookmark add form """ - bookmark = Bookmark() + bookmark = Bookmark(title='', url='', tags='') return render_template('edit.html', action='Add bookmark', userkey=userkey, bookmark=bookmark) diff --git a/static/css/digimarks.css b/static/css/digimarks.css index f217b2f..7e1e86e 100644 --- a/static/css/digimarks.css +++ b/static/css/digimarks.css @@ -1,28 +1,28 @@ /* label color */ .input-field label { - color: #FFF; + color: #000; } /* label focus color */ .input-field input[type=text]:focus + label { - color: #FFF; + color: #000; } /* label underline focus color */ .input-field input[type=text]:focus { - border-bottom: 1px solid #FFF; - box-shadow: 0 1px 0 0 #FFF; + border-bottom: 1px solid #000; + box-shadow: 0 1px 0 0 #000; } /* valid color */ .input-field input[type=text].valid { - border-bottom: 1px solid #FFF; - box-shadow: 0 1px 0 0 #FFF; + border-bottom: 1px solid #000; + box-shadow: 0 1px 0 0 #000; } /* invalid color */ .input-field input[type=text].invalid { - border-bottom: 1px solid #FFF; - box-shadow: 0 1px 0 0 #FFF; + border-bottom: 1px solid #000; + box-shadow: 0 1px 0 0 #000; } /* icon prefix focus color */ .input-field .prefix.active { - color: #FFF; + color: #000; } diff --git a/templates/base.html b/templates/base.html index 53d7483..fce1d8d 100644 --- a/templates/base.html +++ b/templates/base.html @@ -7,9 +7,9 @@ - + - + @@ -19,9 +19,9 @@ - +