From ff752a7c3467b2a6cce3e6d3b3dbc437c802a67d Mon Sep 17 00:00:00 2001 From: Arvind Date: Tue, 10 Dec 2013 20:39:10 +0530 Subject: [PATCH] CSS changes and API imporvment - Adding CSS styles for news-item-wrapper class - /page should allow for cross domain posting. Have an api to add and remove sites which can do cross domain operations. --- mouchak/server.py | 4 +++- mouchak/static/css/mouchak.css | 26 ++++++++++++++++++-------- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/mouchak/server.py b/mouchak/server.py index 57c233b..b0a6beb 100644 --- a/mouchak/server.py +++ b/mouchak/server.py @@ -139,9 +139,11 @@ def insertPage(): newpage['id'] = str(_id) del(newpage['_id']) print newpage + response = flask.jsonify(newpage) + response.headers['Access-Control-Allow-Origin'] = '*' # FIXME: handle errors #return flask.jsonify(status='ok', page=newpage) - return flask.jsonify(newpage) + return response @app.route('/page/<_id>', methods=['PUT', 'DELETE']) diff --git a/mouchak/static/css/mouchak.css b/mouchak/static/css/mouchak.css index 0fc1c65..8dd7693 100644 --- a/mouchak/static/css/mouchak.css +++ b/mouchak/static/css/mouchak.css @@ -1,13 +1,23 @@ .title { - text-align: center; - margin: 0 auto; - padding: 3px; - font-size: 1.5em; + text-align: center; + margin: 0 auto; + padding: 3px; + font-size: 1.5em; } #map{ -width: 1000px; -height: 500px; -margin-top: 30px; -position: relative; + width: 1000px; + height: 500px; + margin-top: 30px; + position: relative; +} + +.news-item-wrapper{ + border: 2px solid #DDDDDD; + box-shadow: 0 8px 6px -6px #AAAAAA; + float: left; + height: 100px; + margin: 10px; + padding: 5px; + width: 300px; } \ No newline at end of file -- 1.7.10.4