From 0104037ada0a169a1ab2c7013beaaedfc3d9ab00 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Sun, 24 Feb 2019 20:10:58 +0100 Subject: [PATCH] Dashboard background image added to static/resources --- platypush/backend/http/app/routes/resources.py | 13 ++++++++++--- platypush/backend/http/static/css/dashboard.css | 2 +- .../resources/img/dashboard-background.jpg | Bin 0 -> 11833 bytes .../http/static/resources/{ => img}/favicon.ico | Bin 4 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 platypush/backend/http/static/resources/img/dashboard-background.jpg rename platypush/backend/http/static/resources/{ => img}/favicon.ico (100%) diff --git a/platypush/backend/http/app/routes/resources.py b/platypush/backend/http/app/routes/resources.py index 7cc89d2a4..f2a953d42 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 6b5250e21..9b31fb189 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 0000000000000000000000000000000000000000..45809d2908fa4ce6e35d91e11f2a42f29afa557a GIT binary patch literal 11833 zcmbt)Ygkj~w(d+wUM5HkW3JFk%w*-R%0Su6dCX`bzBp5UZ8eO%uZHS05 zRYWe41ZXif0Rp&{s~c^%R*MLMDgmklTP?a2t!uMvSC@A6a>k_Vob&A8XD0YOnVIAJ z#^oLF7~_k7-2LMLf~9Os-iVM$2ttAv@`np4Mcn_qJUrazdBSVHx0jdqe7es9c+rCw z`Y(ic@RE=vf$$d<#$<*?#l0E+W}Im4T2XdJc2SX$^#8lSA73Ig)UA}-=tg29WE#nh zM*8ChvINxp^Fsc8kr1*wmEz{{$0ULhCLqY~4eSoP-9DL;n-sxSHKlqZzW|qm%G>zL?#~J<%C`V;q;*!)wJ41?KA3> zJ~hW~Z)x}5nH!p*_`Z|hLj#tL&{*sV27iX$K&B? z$tyDO3{ge~O_WHYQ3N6yNlEsq9=DELNBaPN3cwOBQ^(q5iW;LrDKi&4B^{UI(u~AJKT3v(4tSD?1Om#Uh`z38nzT zXE=}Vug=PXSm3mb_+|^!z#{8V^y6q6i9&LmZ;z-Mg}mc}UvtFVwhl*EtK6)Tsgwl; z;BS_t*`hNrndrw+5I+%#;=%3Hv|2&p0DDL!$LE~1JB`!L>EsTl!4{B7Qb{6RNF@;w z$Al!0=vHekU(<)<#&MerHz|yY_N-MY4#$u5oS;@(Vqe{xe;f?*0Dad zxFCD1%`s_I8s*svmCC3x6|~qb&CQ?`Q?Iq4D1<}D(7Bm4U^M~UY&<((+SS%6=5dBn zhL~N$ycp^2YDqQjN2QA>B1}jl(P>n(mpPXYkB|1{h{LTl#Og+)TwyZGOf7PyU1YZy z3~U3#!q72MomaF7Qha}U*ZDK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