diff --git a/slaeforms/default.json b/slaeforms/default.json index 44db713..1a4db5f 100644 --- a/slaeforms/default.json +++ b/slaeforms/default.json @@ -1,78 +1,4 @@ { - "Block 4":{ - "type": "TaskTemplate", - "tempalte": "standard_template.html", - "number_of_pages":"3", - "stimuli":{ - "type":"single_video", - "order": "random", - "list":{ - "video_1":"https://www.youtube-nocookie.com/embed/VtnwHmabyzo?si=H3rrG-GHtlSymR70", - "video_2":"https://www.youtube-nocookie.com/embed/EL76Ok4r0aQ?si=hqUm8eUUfX39NN4L", - "video_3":"https://www.youtube-nocookie.com/embed/XTMIomsXxKM?si=r2zB6OKERH6Jdpi6" - }, - "configuration":{ - "embed":"yt" - } - }, - "questions":{ - "question1":{ - "type": "likert", - "name": "likertscale", - "text": "How would you rate this video?", - "required": "true", - "points":{ - "p1":{ - "value":"1", - "text":"I dont like it at all" - }, - "p2":{ - "value":"2", - "text":"I dont like it" - }, - "p3":{ - "value":"3", - "text":"I am indifferent" - }, - "p4":{ - "value":"4", - "text":"I like it" - }, - "p5":{ - "value":"5", - "text":"I like it a lot" - } - } - }, - "question2":{ - "type": "textinput", - "name": "text_feedback", - "text": "Here you can give us Feedback", - "required": "false", - "size": "250" - }, - "question3":{ - "type": "videoinput", - "text": "Here you can give us Feedback as video", - "name": "video_feedback", - "required": "false" - } - }, - "database_table" :{ - "table_name": "default_block3_test", - "fields": { - "likertscale":{ - "type": "integer", - "nullable": "false" - }, - "text_feedback":{ - "type": "string", - "size": "250", - "nullable": "true" - } - } - } - }, "Block 3":{ "type": "TaskTemplate", "tempalte": "standard_template.html", @@ -209,6 +135,80 @@ } } }, + "Block 4":{ + "type": "TaskTemplate", + "tempalte": "standard_template.html", + "number_of_pages":"3", + "stimuli":{ + "type":"single_video", + "order": "random", + "list":{ + "video_1":"https://www.youtube-nocookie.com/embed/VtnwHmabyzo?si=H3rrG-GHtlSymR70", + "video_2":"https://www.youtube-nocookie.com/embed/EL76Ok4r0aQ?si=hqUm8eUUfX39NN4L", + "video_3":"https://www.youtube-nocookie.com/embed/XTMIomsXxKM?si=r2zB6OKERH6Jdpi6" + }, + "configuration":{ + "embed":"yt" + } + }, + "questions":{ + "question1":{ + "type": "likert", + "name": "likertscale", + "text": "How would you rate this video?", + "required": "true", + "points":{ + "p1":{ + "value":"1", + "text":"I dont like it at all" + }, + "p2":{ + "value":"2", + "text":"I dont like it" + }, + "p3":{ + "value":"3", + "text":"I am indifferent" + }, + "p4":{ + "value":"4", + "text":"I like it" + }, + "p5":{ + "value":"5", + "text":"I like it a lot" + } + } + }, + "question2":{ + "type": "textinput", + "name": "text_feedback", + "text": "Here you can give us Feedback", + "required": "false", + "size": "250" + }, + "question3":{ + "type": "videoinput", + "text": "Here you can give us Feedback as video", + "name": "video_feedback", + "required": "false" + } + }, + "database_table" :{ + "table_name": "default_block3_test", + "fields": { + "likertscale":{ + "type": "integer", + "nullable": "false" + }, + "text_feedback":{ + "type": "string", + "size": "250", + "nullable": "true" + } + } + } + }, "Block_1":{ "type": "SinglePage", "template": "test_page0.html" diff --git a/slaeforms/static/oldstyle.css b/slaeforms/static/oldstyle.css new file mode 100644 index 0000000..747478e --- /dev/null +++ b/slaeforms/static/oldstyle.css @@ -0,0 +1,247 @@ +html { + height: 100%; +} + +body { + width: 100%; + height: 100hv; + margin: 0; + /*align-items: center; this will make the content a square, with edges up and bottom*/ + background-color: #a4b5ff; + color: #000000; + font-family: Tahoma; + font-size: 16px; +} + +.centercontent { + height: 100%; + display: flex; + justify-content: center; +} +.container { + height: 100%; + + width: 80%; /* You can adjust this width as needed */ + max-width: 1200px; /* Maximum width to keep it from getting too wide on large screens */ + padding: 20px; + background-color: #7b8cdb; /* Just for visual differentiation */ + box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); +} + +/* Form */ +form { + text-align: center; + display: flex; + flex-direction: column; + align-items: center; + +} + + +/* Helper */ +.spacer { + clear: both; + box-sizing: border-box; +} + + +/* buttons */ +.buttondisable { + filter: invert(65%); +} + +#submitbutton { + cursor: pointer; + padding: 10px 20px; /* Increased padding for a bigger button */ + font-size: 20px; /* Increased font size */ + border: none; /* Removes default border */ + border-radius: 8px; /* Optional: rounds the corners of the button */ +} +#submitbutton:hover { + background-color: #0056b3; /* Darker shade for hover effect */ +} +.button-container { + display: flex; + justify-content: flex-end; + margin-top: 20px; /* Adjust as needed for spacing */ +} + +.centertext { + text-align: center; +} + +h2,h3 { + text-align: center; +} + +.textarea-container { + display: flex; + flex-direction: column; + align-items: center; +} +.textarea-label{ + align-self: flex-start; /* Aligns the label to the start of the container */ +} + + +video { + max-width: 100%; + max-height: 100%; + width: auto; + height: auto; +} +.aspect-ratio-16-9 { + width: 100%; + aspect-ratio: 16 / 9; +} + +/* Video recording controls */ +.videocontrols { + width: 100px; /* Set a specific width for the buttons */ + height: 70px; /* Set a specific height for the buttons */ + background-color: #cae4ff; + border: none; + color: white; + padding: 10px 20px; + margin: 0 10px; + border-radius: 5px; + cursor: pointer; + transition: background-color 0.3s ease; + display: inline-flex; /* Display button contents as a flexbox */ + justify-content: center; /* Center contents horizontally */ + align-items: center; /* Center contents vertically */ + text-align: center; +} + +.videocontrols img { + max-width: 65%; + max-height: 65%; + text-align: center; + margin: auto; + width: auto; /* Make the image fill its container */ + height: auto; /* Make the image fill its container */ + display: block; /* Remove any extra space around the image */ +} + +.columncontainer { + display: flex; +} + +.columnleft { + width: 100%; + border: 3px solid black; +} +.columnright { + width: 100%; + border: 3px solid black; +} + +/* Video recording iframe */ + +iframe { + display:block; + margin: auto; +} + +.video-container { + position: relative; + padding-bottom: 56.25%; /* 16:9 aspect ratio */ + height: 0; + overflow: hidden; + max-width: 100%; + background: #000; +} + +.video-container iframe { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; +} + + + + +/* Likert stuff */ +.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: auto 1px; /*-webkit-focus-ring-color*/ +} + +.likert span:hover { + background: #f1f1f1; + outline: lightgrey auto 0.5px; +} + + +/* Table display stuff */ +table { + border-collapse: collapse; + margin: 20px 0; + table-layout: auto; /* Allows columns to adjust to their content */ + width: auto; /* Adjusts the table width to the content */ +} + +th, td { + border: 1px solid #dddddd; + text-align: left; + padding: 8px; + word-wrap: break-word; /* Ensures content wraps and doesn't overflow */ +} + +th { + background-color: #f2f2f2; +} \ No newline at end of file diff --git a/slaeforms/static/styles.css b/slaeforms/static/styles.css index acc8973..2b089c9 100644 --- a/slaeforms/static/styles.css +++ b/slaeforms/static/styles.css @@ -1,81 +1,129 @@ -html { - height: 100%; -} + body { - width: 100%; - height: 100%; margin: 0; - /*align-items: center; this will make the content a square, with edges up and bottom*/ background-color: #a4b5ff; color: #000000; font-family: Tahoma; font-size: 16px; } -.centercontent { - height: 100%; - display: flex; - justify-content: center; -} .container { - height: 100%; - - width: 80%; /* You can adjust this width as needed */ + margin: 0 auto; + /* height: 100vh;*/ + width: 60vw; /* You can adjust this width as needed */ max-width: 1200px; /* Maximum width to keep it from getting too wide on large screens */ padding: 20px; background-color: #7b8cdb; /* Just for visual differentiation */ box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); } - - -.spacer { - clear: both; - box-sizing: border-box; +.textblock { + width: 60%; + display: flex; + margin: auto; + text-align: left; } +/* Form */ +form { + min-width: 300px; + margin: 0 auto; + padding-bottom: 2em; +} + + +.dsgvoform { + text-align: right; + width: 60%; +} + +label { + display: block; + margin-top: 1.5rem; + margin-bottom: 1.5rem; +} + +input, +textarea, +select { + margin: 10px 0 0 0; + width: 60%; + min-height: 2em; + display: block; +} + +.button-container input { + display: block; + width: 100%; + margin-top: 30px; /* Adjust as needed for spacing */ + margin-right: 0; + margin-left: auto; +} +.button-container { + margin: 0 auto; + width: 60%; +} + +/* buttons */ .buttondisable { filter: invert(65%); } #submitbutton { cursor: pointer; - padding: 10px 20px; /* Increased padding for a bigger button */ - font-size: 20px; /* Increased font size */ + padding: 12px 24px; /* Increased padding for a bigger button */ + font-size: 25px; /* Increased font size */ border: none; /* Removes default border */ border-radius: 8px; /* Optional: rounds the corners of the button */ + width: auto; } #submitbutton:hover { background-color: #0056b3; /* Darker shade for hover effect */ } -.button-container { - display: flex; - justify-content: flex-end; - margin-top: 20px; /* Adjust as needed for spacing */ -} + .textarea-container { - display: flex; - flex-direction: column; - align-items: center; + margin: auto; + width: 60%; } +.textarea-container textarea{ + width: 100%; + margin: 1.5rem auto; +} + .textarea-label{ align-self: flex-start; /* Aligns the label to the start of the container */ } - -video { - max-width: 100%; - max-height: 100%; - width: auto; - height: auto; +/* Helper */ +.spacer { + clear: both; + box-sizing: border-box; } -.aspect-ratio-16-9 { - width: 100%; - aspect-ratio: 16 / 9; + +.centertext { + text-align: center; +} + +h2,h3 { + text-align: center; +} + +.inline { + display: inline; + width: unset; + margin: 0 0.5em 0 0; + vertical-align: middle; } +.compressWidth { + width: 60%; + margin: 0 auto; +} + + +/* Video recording controls */ .videocontrols { width: 100px; /* Set a specific width for the buttons */ height: 70px; /* Set a specific height for the buttons */ @@ -116,18 +164,16 @@ video { border: 3px solid black; } -iframe { - display:block; - margin: auto; +/* Video recording video and youtube iframe */ +video { /* Video should not be bigger than 100% */ + max-width: 100%; + max-height: 100%; + width: auto; + height: auto; } -.video-container { - position: relative; - padding-bottom: 56.25%; /* 16:9 aspect ratio */ - height: 0; - overflow: hidden; - max-width: 100%; - background: #000; +iframe { /* center the iframe, mostly unnecessary */ + display:block; } .video-container iframe { @@ -138,23 +184,15 @@ iframe { height: 100%; } -form { - text-align: center; - display: flex; - flex-direction: column; - align-items: center; - +.video-container { + background: #000; + position: relative; + padding-bottom: 56.25%; /* 16:9 */ + height: 0; + overflow: hidden; } -.centertext { - text-align: center; -} - -h2,h3 { - text-align: center; -} - - +/* Likert stuff */ .likert { --likert-rows: 5; margin: auto; @@ -162,22 +200,10 @@ h2,h3 { display: inline-grid; max-width: 900px; grid-auto-rows: 1fr; - gap: 1em; + gap: 2em; 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; @@ -185,6 +211,10 @@ input, label { pointer-events: none; } +.likert label { + aspect-ratio: 1.5 / 1; +} + .likercontainer{ margin: 30px auto; text-align: center; @@ -217,6 +247,15 @@ input, label { outline: lightgrey auto 0.5px; } +@media only screen and (max-width: 680px) { + .likert { + grid-template-columns: minmax(0, 400px); + justify-content: center; + } +} + + +/* Table display stuff */ table { border-collapse: collapse; margin: 20px 0; diff --git a/slaeforms/templates/standard_template.html b/slaeforms/templates/standard_template.html index 4c31468..b3a665a 100644 --- a/slaeforms/templates/standard_template.html +++ b/slaeforms/templates/standard_template.html @@ -8,8 +8,7 @@
Error: Block {{ stimulus["type"] }} could not be loaded!
{% endif %} - - -