diff --git a/__pycache__/app_host.cpython-36.pyc b/__pycache__/app_host.cpython-36.pyc index c8f630e..a4e97b4 100644 Binary files a/__pycache__/app_host.cpython-36.pyc and b/__pycache__/app_host.cpython-36.pyc differ diff --git a/app.py b/app.py index 055e6e3..c46c2a4 100644 --- a/app.py +++ b/app.py @@ -3,8 +3,6 @@ #from flask.ext.session import Session import csv, json import sys, os -# import eplus as ep -# import data as cd import data_climates as ddc import CPlus_Climate as cc import climabox as cb @@ -24,18 +22,16 @@ def index(): ff = str(session['id']) except KeyError: ff = '1234' - # print("id not known") - - # if os.path.exists('static/'+ff+'.json'): - # os.remove('static/'+ff+'.json') - # session['location'] = '' - # session['city'] = '' session['location'] = '' session['city'] = '' session['id'] = time.time() return render_template("ClimateSelect.html") +@app.route('/ClimateSelect', methods=['GET', 'POST']) +def ClimateSelect(): + return render_template("ClimateSelect.html") + @app.route('/ClimateInfo', methods=['GET', 'POST']) def ClimateInfo(): if request.method == 'POST': @@ -46,38 +42,17 @@ def ClimateInfo(): _loc = ddc.findEPWN(str(city)) location = _loc.fileEPW session['locationJs'] = './static/json/'+_loc.fileEPW+'.json' - # print('************_loc vs location ', _loc, session['locationJs']) + session['locationJsPsy'] = './static/json/'+_loc.fileEPW+'.json' session['location'] = location session['city'] = city - # w = cc.wthImp('./static/epw/'+session['location']+'.epw') - - # wi = w.dataWth() - # ww = cc.wrangleWth(wi) - # wthdata = json.dumps(ww.WTH()) - - # with open('static/'+ff+'.json','w') as f: - # f.write(wthdata) - - # wthdata = request.get_json() - # if wthdata != None: - # session['city'] = wthdata['city'] - # with open('static/'+ff+'.json','w') as f: - # f.write(json.dumps(wthdata)) - - return render_template("ClimateInfo.html")#, wthdata=wthdata) + return render_template("ClimateInfo.html") @app.errorhandler(Exception) def handle_error(error): return render_template("ClimateSelect.html") -@app.route('/ClimateSelect', methods=['GET', 'POST']) -def ClimateSelect(): - # if request.method == 'POST': - # data_ = request.form['js_data'] - return render_template("ClimateSelect.html") - # a simple sunpath diagram @app.route('/SolarP', methods=['GET','POST']) def SolarP(): diff --git a/static/css/styleM.css b/static/css/styleM.css index 005ba1d..19c5b94 100644 --- a/static/css/styleM.css +++ b/static/css/styleM.css @@ -29,14 +29,16 @@ form { /*display: inline-block;*/ margin-left: auto; margin-right: auto; + margin-top: auto; + margin-bottom: : auto; /*text-align: justify-all;*/ } input { border: 0.5px solid transparent; - background-color: white; /*#f1f1f1;*/ - padding: 10px; - font-size: 16px; + background-color: white; + padding: 8px; + font-size: 15px; } input.cs[type=text] { @@ -46,7 +48,7 @@ input.cs[type=text] { } input.dd[type=text] { - font-size: 16px; + font-size: 12.75px; background-color: #f1f1f1; width: 35%; } @@ -59,12 +61,12 @@ input.cbform[type=text] { height: 12px; } -input.pdform[type=text] { +/*input.pdform[type=text] { border: 0.5px solid; font-size: 12px; background-color: white; height: 12px; -} +}*/ input[type=submit] { background-color: orangered; @@ -451,6 +453,40 @@ Sections } +#solar{ + width: 50; + /*height: 150;*/ +} +#solar img +{ + max-width: 100%; + max-height: 100%; + margin: auto; + display: block; +} +#temp{ + width: 50; + /*height: 150;*/ +} +#temp img +{ + max-width: 100%; + max-height: 100%; + margin: auto; + display: block; +} +#wind{ + width: 50; + /*height: 150;*/ +} +#wind img +{ + max-width: 100%; + max-height: 100%; + margin: auto; + display: block; +} + .grid line { stroke: white; stroke-opacity: 1; diff --git a/static/img/outdoor.png b/static/img/outdoor.png new file mode 100644 index 0000000..74d50c4 Binary files /dev/null and b/static/img/outdoor.png differ diff --git a/templates/Climabox.html b/templates/Climabox.html index 28cdba6..7b3165a 100644 --- a/templates/Climabox.html +++ b/templates/Climabox.html @@ -79,20 +79,48 @@