File size: 4,350 Bytes
fa53be0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<!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>