SinglePages work now, DB Tables are created and can be written
This commit is contained in:
59
slaeforms/templates/standard_template.html
Normal file
59
slaeforms/templates/standard_template.html
Normal file
@@ -0,0 +1,59 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='styles.css')}}"" /> <!-- styles.css {{ url_for('static', filename='styles.css')}}-->
|
||||
<title>Testform</title>
|
||||
<link rel="shortcut icon" href="{{ url_for('static', filename='favicon.ico') }}">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<h2>Stimulus part</h2>
|
||||
{% if (stimulus_type == "single_video") %}
|
||||
{{ single_video(**stimulus_configuration) }}
|
||||
{% elif (False) %}
|
||||
|
||||
{% else %}
|
||||
<p>Error: Block {{ stimulus["type"] }} could not be loaded!</p>
|
||||
{% endif %}
|
||||
|
||||
|
||||
|
||||
<h2>Questions</h2>
|
||||
<form action="http://localhost:5000/send_json" method="post"></form>
|
||||
{% for question in questions %}
|
||||
{% if (questions[question] == "likert") %}
|
||||
|
||||
{% elif (config["question 1"]["blocks"][block]["type"] == "textinput") %}
|
||||
{% else %}
|
||||
<p>Error: Block {{config["question 1"]["blocks"][block]["type"]}} could not be loaded!</p>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
<p><input id="submitbutton" type = "submit" value = "submit";/></p>
|
||||
</form>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
{% macro single_video(video_url, embed="yt", title="",width="560", height="315", class="center", code=<p>No code given</p>) -%}
|
||||
{% if (embed == "yt") %}
|
||||
<div class={{center}}>
|
||||
{% if (title != "") %}
|
||||
<h3>{{title}}</h3>
|
||||
{% endif %}
|
||||
<iframe width={{width}} height={{height}} class="center" src="{{ video_url }}" title="YouTube video player"
|
||||
frameborder="0"
|
||||
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
|
||||
allowfullscreen></iframe>
|
||||
</div>
|
||||
{% else %}
|
||||
{{code}}
|
||||
{% endif %}
|
||||
{%- endmacro %}
|
||||
|
||||
{% macro input(name, value='', type='text', size=20) -%}
|
||||
<input type="{{ type }}" name="{{ name }}" value="{{
|
||||
value|e }}" size="{{ size }}">
|
||||
{%- endmacro %}
|
||||
Reference in New Issue
Block a user