Skip to content

Commit

Permalink
GUI changes mainly
Browse files Browse the repository at this point in the history
  • Loading branch information
AlphaArsano committed Aug 3, 2020
1 parent 907c82e commit e8aa0ee
Show file tree
Hide file tree
Showing 10 changed files with 1,112 additions and 161 deletions.
Binary file modified __pycache__/app_host.cpython-36.pyc
Binary file not shown.
37 changes: 6 additions & 31 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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':
Expand All @@ -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():
Expand Down
48 changes: 42 additions & 6 deletions static/css/styleM.css
Original file line number Diff line number Diff line change
Expand Up @@ -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] {
Expand All @@ -46,7 +48,7 @@ input.cs[type=text] {
}

input.dd[type=text] {
font-size: 16px;
font-size: 12.75px;
background-color: #f1f1f1;
width: 35%;
}
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
Binary file added static/img/outdoor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit e8aa0ee

Please sign in to comment.