luulinh90s's picture
add materials
fa53be0
raw
history blame
4.35 kB
<!DOCTYPE html>
<html>
<head>
<title>Experiment</title>
<style>
body {
font-family: 'Roboto', sans-serif;
background: url('/static/images/background.jpg') no-repeat center center fixed;
background-size: cover;
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
.container {
background-color: #ffffff; /* Solid background color */
padding: 20px;
border-radius: 10px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
width: 100%;
height: 100%;
margin: 0;
text-align: center;
display: flex;
flex-direction: column;
}
h1, h2 {
color: #000000; /* Black text color */
font-size: 24px; /* Smaller text */
}
p {
color: #000000; /* Black text color */
font-size: 18px; /* Smaller text */
}
.visualization-container {
flex: 1;
margin: 20px 0;
}
.buttons {
display: flex;
justify-content: space-between;
}
button {
background-color: #4CAF50;
color: white;
padding: 15px 30px;
border: none;
border-radius: 5px;
cursor: pointer;
font-size: 18px; /* Smaller text */
margin-top: 20px;
width: 48%;
transition: background-color 0.3s ease;
}
button:hover {
background-color: #45a049;
}
button.reject {
background-color: #f44336;
}
button.reject:hover {
background-color: #e53935;
}
iframe {
width: 100%;
height: calc(100vh - 150px); /* Adjust height to fit the screen */
border: none;
}
</style>
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap" rel="stylesheet">
<script>
window.onload = function() {
var iframe = document.querySelector('iframe');
iframe.onload = function() {
var iframeDocument = iframe.contentDocument || iframe.contentWindow.document;
var style = document.createElement('style');
style.innerHTML = 'body { font-size: 14px; }'; /* Adjust this value as needed */
iframeDocument.head.appendChild(style);
};
};
</script>
</head>
<body>
<div class="container">
<h1>{{ sample_id + 1 }} / 10</h1>
<p><strong>Task:</strong> {{ statement }}</p>
<div class="visualization-container">
<iframe src="{{ url_for('send_visualization', path=visualization) }}"></iframe>
</div>
<div class="buttons">
<form action="/feedback" method="post" style="width: 48%;">
<input type="hidden" name="sample_id" value="POS_test-{{ sample_id }}.html">
<input type="hidden" name="username" value="{{ username }}">
<input type="hidden" name="seed" value="{{ seed }}">
<input type="hidden" name="filename" value="{{ filename }}">
<input type="hidden" name="selected_samples" value="{{ selected_samples }}">
<input type="hidden" name="sample_index" value="{{ sample_index }}">
<button type="submit" name="feedback" value="TRUE">Accept</button>
</form>
<form action="/feedback" method="post" style="width: 48%;">
<input type="hidden" name="sample_id" value="POS_test-{{ sample_id }}.html">
<input type="hidden" name="username" value="{{ username }}">
<input type="hidden" name="seed" value="{{ seed }}">
<input type="hidden" name="filename" value="{{ filename }}">
<input type="hidden" name="selected_samples" value="{{ selected_samples }}">
<input type="hidden" name="sample_index" value="{{ sample_index }}">
<button type="submit" name="feedback" value="FALSE" class="reject">Reject</button>
</form>
</div>
</div>
</body>
</html>