Permalink
Browse files

Add index page to gitmark_web with link to the bookmarklet

  • Loading branch information...
1 parent 40261b1 commit 3ca0fed18874e5e55a72957ddd3aa614e6e987e0 @jcn jcn committed Dec 19, 2010
Showing with 18 additions and 3 deletions.
  1. +4 −2 README
  2. +6 −1 gitmark_web.py
  3. +8 −0 views/index.tpl
View
6 README
@@ -53,9 +53,11 @@ First, run the gitmark_web server:
python gitmark_web.py
-Copy this bookmarklet to your browser (where 44865 is the port you set in settings.py):
+Then, go to the following URL and drag the bookmarklet into your browser's toolbar:
-javascript:(function(){void(open('http://localhost:44865/new?url='+window.location,'gitmark','resizable,scrollbars,width=250,height=250'))})();
+http://localhost:44865/
+
+(where 44865 is the port you set in settings.py)
=======
View
@@ -9,6 +9,10 @@
from gitmark import gitMark
import settings
+@route("/")
+def index():
+ return template("index", port = settings.GITMARKS_WEB_PORT)
+
@route("/new")
def new():
url = request.GET.get('url')
@@ -21,6 +25,7 @@ def create():
tags = request.forms.get('tags', '').strip()
message = request.forms.get('message', '').strip()
push = request.forms.get('nopush', True)
+
if push == '1':
push = False
@@ -38,4 +43,4 @@ def create():
return template("create")
-run(host="localhost", port=settings.GITMARKS_WEB_PORT, reloader=False)
+run(host="localhost", port=settings.GITMARKS_WEB_PORT, reloader=False)
View
@@ -0,0 +1,8 @@
+<h1>welcome to gitmarks</h1>
+
+<p>
+ Please drag this link to your browser:
+ <a href="javascript:(function(){void(open('http://localhost:{{port}}/new?url='+window.location,'gitmark','resizable,scrollbars,width=250,height=250'))})();">gitmark</a>
+</p>
+
+%rebase layout

0 comments on commit 3ca0fed

Please sign in to comment.