Cleanup and add video page
This commit is contained in:
parent
dd7770ecb6
commit
2e0426f3e2
11
slaeforms/SLAEForms Testing.code-workspace
Normal file
11
slaeforms/SLAEForms Testing.code-workspace
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"folders": [
|
||||||
|
{
|
||||||
|
"path": "../.."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "../../../CSS Testing"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"settings": {}
|
||||||
|
}
|
@ -56,24 +56,33 @@ class User(db.Model):
|
|||||||
with app.app_context():
|
with app.app_context():
|
||||||
db.create_all()
|
db.create_all()
|
||||||
|
|
||||||
@app.route("/send", methods=["GET", "POST"])
|
|
||||||
def sendpage():
|
|
||||||
if request.method == "POST":
|
|
||||||
session_user_id = session["slaeform_user_id"]
|
|
||||||
likert_score = request.form["likertscale"]
|
|
||||||
text_input = request.form["feedback"]
|
|
||||||
question_title = session["current_question"]
|
|
||||||
new_id = uuid.uuid4()
|
|
||||||
date = datetime.today()
|
|
||||||
print("new idea: {new_id} ".format(new_id=new_id))
|
|
||||||
new_response = Response(id=new_id,user_id = session_user_id, question_title = question_title,likert_result = likert_score,notes = text_input, date_created = date)
|
|
||||||
|
|
||||||
#try:
|
@app.route("/video", methods=["GET", "POST"])
|
||||||
|
def sendpage():
|
||||||
|
|
||||||
|
return render_template(
|
||||||
|
"layout2.html"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@app.route("/send", methods=["POST"])
|
||||||
|
def sendpage():
|
||||||
|
session_user_id = session["slaeform_user_id"]
|
||||||
|
likert_score = request.form["likertscale"]
|
||||||
|
text_input = request.form["feedback"]
|
||||||
|
question_title = session["current_question"]
|
||||||
|
new_id = uuid.uuid4()
|
||||||
|
date = datetime.today()
|
||||||
|
print("new idea: {new_id} ".format(new_id=new_id))
|
||||||
|
new_response = Response(id=new_id,user_id = session_user_id, question_title = question_title,likert_result = likert_score,notes = text_input, date_created = date)
|
||||||
|
|
||||||
|
try:
|
||||||
db.session.add(new_response)
|
db.session.add(new_response)
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
return redirect("/form") #url_for("datapage")
|
return redirect("/form")
|
||||||
#except:
|
except:
|
||||||
#return "There was a problem while adding the response to the Database"
|
return "There was a problem while adding the response to the Database"
|
||||||
|
|
||||||
@app.route("/form", methods=["GET", "POST"]) # /<username> should not even be needed right?
|
@app.route("/form", methods=["GET", "POST"]) # /<username> should not even be needed right?
|
||||||
def formpage():
|
def formpage():
|
||||||
@ -111,8 +120,6 @@ def formpage():
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@app.route("/start", methods=["GET", "POST"])
|
@app.route("/start", methods=["GET", "POST"])
|
||||||
def startpage():
|
def startpage():
|
||||||
if not "slaeform_device_id" in session:
|
if not "slaeform_device_id" in session:
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
{
|
{
|
||||||
"folders": [
|
"folders": [
|
||||||
{
|
{
|
||||||
"path": "../.."
|
"path": ".."
|
||||||
}
|
},
|
||||||
],
|
{
|
||||||
"settings": {}
|
"path": "../../../CSS Testing"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
@ -1,99 +0,0 @@
|
|||||||
body {
|
|
||||||
width: 100%;
|
|
||||||
height: 100vh;
|
|
||||||
margin: 0;
|
|
||||||
background-color: #a4b5ff;
|
|
||||||
color: #000000;
|
|
||||||
font-family: Tahoma;
|
|
||||||
font-size: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.columncontainer {
|
|
||||||
display: flex;
|
|
||||||
}
|
|
||||||
|
|
||||||
.columnleft {
|
|
||||||
width: 100%;
|
|
||||||
border: 3px solid black;
|
|
||||||
}
|
|
||||||
.columnright {
|
|
||||||
width: 100%;
|
|
||||||
border: 3px solid black;
|
|
||||||
}
|
|
||||||
|
|
||||||
iframe {
|
|
||||||
display:block;
|
|
||||||
margin: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.centertext {
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
h2,h3 {
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.likert {
|
|
||||||
--likert-rows: 5;
|
|
||||||
margin: auto;
|
|
||||||
text-align: center;
|
|
||||||
display: inline-grid;
|
|
||||||
max-width: 900px;
|
|
||||||
grid-auto-rows: 1fr;
|
|
||||||
gap: 1em;
|
|
||||||
grid-template-columns: repeat(var(--likert-rows), minmax(0, 1fr));
|
|
||||||
}
|
|
||||||
|
|
||||||
@media only screen and (max-width: 680px) {
|
|
||||||
.likert {
|
|
||||||
grid-template-columns: minmax(0, 400px);
|
|
||||||
justify-content: center;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
input, label {
|
|
||||||
display: block;
|
|
||||||
margin: 0.5rem 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.likert input {
|
|
||||||
max-width: 250px;
|
|
||||||
position: fixed;
|
|
||||||
opacity: 0;
|
|
||||||
pointer-events: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.likercontainer{
|
|
||||||
margin: 30px auto;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
.likert span {
|
|
||||||
border-radius: 5px;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
text-align: center;
|
|
||||||
box-sizing: border-box;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
padding: 20px;
|
|
||||||
background: #dcdcdc;
|
|
||||||
transition: background .2s ease-in-out;
|
|
||||||
}
|
|
||||||
|
|
||||||
.likert input:checked + span {
|
|
||||||
outline: black auto 1px;
|
|
||||||
background: transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
.likert input:focus + span {
|
|
||||||
outline: -webkit-focus-ring-color auto 1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.likert span:hover {
|
|
||||||
background: #f1f1f1;
|
|
||||||
outline: lightgrey auto 0.5px;
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user