diff --git a/platypush/backend/http/app/routes/resources.py b/platypush/backend/http/app/routes/resources.py index 7cc89d2a4b..f2a953d422 100644 --- a/platypush/backend/http/app/routes/resources.py +++ b/platypush/backend/http/app/routes/resources.py @@ -4,18 +4,21 @@ import re from flask import Blueprint, abort, send_from_directory from platypush.config import Config -from platypush.backend.http.app import template_folder, base_folder +from platypush.backend.http.app import template_folder, static_folder from platypush.backend.http.app.utils import authenticate, authentication_ok, \ send_message +img_folder = os.path.join(static_folder, 'resources', 'img') resources = Blueprint('resources', __name__, template_folder=template_folder) favicon = Blueprint('favicon', __name__, template_folder=template_folder) +img = Blueprint('img', __name__, template_folder=template_folder) # Declare routes list __routes__ = [ resources, favicon, + img, ] @resources.route('/resources/', methods=['GET']) @@ -57,8 +60,12 @@ def resources_path(path): @favicon.route('/favicon.ico', methods=['GET']) def favicon(): """ favicon.ico icon """ - return send_from_directory(os.path.join(base_folder, 'static', 'resources'), - 'favicon.ico') + return send_from_directory(img_folder, 'favicon.ico') + +@img.route('/img/', methods=['GET']) +def imgpath(path): + """ Default static images """ + return send_from_directory(img_folder, path) # vim:sw=4:ts=4:et: diff --git a/platypush/backend/http/static/css/dashboard.css b/platypush/backend/http/static/css/dashboard.css index 6b5250e218..9b31fb1893 100644 --- a/platypush/backend/http/static/css/dashboard.css +++ b/platypush/backend/http/static/css/dashboard.css @@ -3,7 +3,7 @@ html { } body { - background: rgba(240,240,245,1.0); + background-image: url('/img/dashboard-background.jpg'); background-size: 100% 100%; background-repeat: no-repeat; font-family: Lato; diff --git a/platypush/backend/http/static/resources/img/dashboard-background.jpg b/platypush/backend/http/static/resources/img/dashboard-background.jpg new file mode 100644 index 0000000000..45809d2908 Binary files /dev/null and b/platypush/backend/http/static/resources/img/dashboard-background.jpg differ diff --git a/platypush/backend/http/static/resources/favicon.ico b/platypush/backend/http/static/resources/img/favicon.ico similarity index 100% rename from platypush/backend/http/static/resources/favicon.ico rename to platypush/backend/http/static/resources/img/favicon.ico