adds a landing page which gives an overview of the tool

- landing page shows two images of google calendar and tizen watch
  and how the calendars corelate
- routes redesigned to fit this landing page
- redesign of coloring in css
This commit is contained in:
2020-06-06 20:02:18 +02:00
parent 0f47ff15dd
commit 39b899283c
13 changed files with 324 additions and 19 deletions

View File

@ -26,27 +26,39 @@ from database.models import User, Calendar, Device, GoogleToken
os.environ['OAUTHLIB_INSECURE_TRANSPORT'] = '1'
@app.route("/")
def account():
return flask.redirect('account')
def startpage():
return flask.render_template('startpage.html')
@app.route("/privacy")
def privacy():
return flask.render_template('privacy.html')
@app.route("/account")
def index():
@app.route("/login")
def login():
if current_user.is_authenticated:
return redirect(url_for('account'))
return flask.render_template('login.html')
@app.route("/account")
def account():
if current_user.is_authenticated:
calendars = []
gCalendars, colors, token = google.fetchCalendars()
current_user.google_token.token = token
db.session.commit()
backend.updateCalendars(current_user, gCalendars, colors)
if token != None:
current_user.google_token.token = token
db.session.commit()
calendars.extend(gCalendars)
backend.updateCalendars(current_user, calendars, colors)
return (flask.render_template('account.html',
username = current_user.username, email = current_user.email, profile_img=current_user.profile_pic
)
)
else:
return flask.render_template('login.html')
return redirect(url_for("login"))
@app.route("/view")
def view():