101 lines
3.3 KiB
HTML
101 lines
3.3 KiB
HTML
<html>
|
|
<link rel="stylesheet" media="screen" href = "{{ url_for('static', filename='bootstrap.min.css') }}">
|
|
<link rel=stylesheet type=text/css href="{{ url_for('static', filename='style.css') }}">
|
|
<meta name="viewport" content = "width=device-width, initial-scale=1.0">
|
|
<head>
|
|
<script type="text/javascript" src="/static/bower_components/jquery/dist/jquery.js"></script>
|
|
<script type="text/javascript" src="/static/bower_components/highcharts/highcharts.js"></script>
|
|
<script type="text/javascript" src="/static/bower_components/bootstrap/dist/js/bootstrap.bundle.js"></script>
|
|
<script type="text/javascript" src="/static/bower_components/socket.io-client/dist/socket.io.js"></script>
|
|
<script type="text/javascript" src="/static/bower_components/bootstrap-waitingfor/build/bootstrap-waitingfor.js"></script>
|
|
|
|
<style>
|
|
.mat-button {
|
|
display: block;
|
|
width: 100%;
|
|
height: 100%;
|
|
text-decoration: none;
|
|
text-align: center;
|
|
align-items: stretch;
|
|
border-radius: 0px;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.col-md {
|
|
padding: 0px;
|
|
margin: 0px;
|
|
}
|
|
.row {
|
|
height: 10%;
|
|
}
|
|
|
|
.mat_submit > button {
|
|
display: block;
|
|
text-decoration: none;
|
|
text-align: center;
|
|
align-items: stretch;
|
|
border-radius: 0px;
|
|
width: 100%;
|
|
height: 10%;
|
|
}
|
|
|
|
.mat_grid {
|
|
/*
|
|
display: -ms-grid;
|
|
align-content: center;
|
|
-ms-grid-template-columns: repeat(5, 1fr);
|
|
-ms-grid-template-rows: repeat(10, 1fr);
|
|
*/
|
|
height: calc(90% - 56px);
|
|
}
|
|
|
|
</style>
|
|
</head>
|
|
|
|
<body class = "body">
|
|
<nav id="main-nav" class="navbar navbar-expand-lg navbar-light bg-light">
|
|
<a class="navbar-brand">BPLabs v0.1</a>
|
|
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
|
<span class="navbar-toggler-icon"></span>
|
|
</button>
|
|
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
|
<ul class="navbar-nav mr-auto">
|
|
</ul>
|
|
</div>
|
|
</nav>
|
|
{% block content %}{% endblock %}
|
|
|
|
<script>
|
|
|
|
$(document).ready(function(){
|
|
// Initialise socketio with a namespace called "main"
|
|
var socket = io.connect(location.protocol + '//' + document.domain + ':' + location.port + '/main');
|
|
|
|
// Catch progress bar update messages
|
|
socket.on('update-progress', function(msg) {
|
|
// Update width of progress bar
|
|
$('#progress').css("width", msg.data);
|
|
});
|
|
|
|
var test_locs = {
|
|
'mat_test': "/matrix_test/run",
|
|
'eeg_test': "/eeg/test/run",
|
|
'da_test': "/da/run",
|
|
'click_test': "/click/run",
|
|
'eeg_story_train': "/eeg/train/story/run",
|
|
'eeg_mat_train': "/eeg/train/mat/run"
|
|
}
|
|
|
|
socket.on('participant_start', function(msg) {
|
|
window.location.href = test_locs[msg];
|
|
});
|
|
|
|
socket.on('check-loaded', function(msg) {
|
|
socket.emit('page_loaded', {data: "participant"});
|
|
});
|
|
});
|
|
</script>
|
|
</body>
|
|
|
|
</html>
|