Spaces:
Runtime error
Runtime error
pr #6 (#6)
Browse files- Update (8241e7fb6ad8a743d8f172b4b3392de5378e72b9)
- Update (775db6c1f7e21e14f9db204142bbcf6e30b5b95b)
Co-authored-by: Dongwook Chang <[email protected]>
- ice_breaking_challenge/background_task.py +5 -2
- ice_breaking_challenge/qr.py +0 -1
- ice_breaking_challenge/quiz.py +6 -2
- ice_breaking_challenge/static/style.css +240 -70
- ice_breaking_challenge/templates/base.html +7 -5
- ice_breaking_challenge/templates/finish.html +5 -3
- ice_breaking_challenge/templates/index.html +21 -8
- ice_breaking_challenge/templates/introduction.html +1 -1
- ice_breaking_challenge/templates/quiz.html +39 -22
- ice_breaking_challenge/templates/topic.html +4 -1
ice_breaking_challenge/background_task.py
CHANGED
|
@@ -13,7 +13,7 @@ def background_task(sid, qna: pd.DataFrame, team_size: int):
|
|
| 13 |
import time
|
| 14 |
start_time = time.time()
|
| 15 |
|
| 16 |
-
global quiz_results
|
| 17 |
quiz_generated[sid] = False
|
| 18 |
generated_quizzes = generate_quiz(qna, team_size)
|
| 19 |
quiz_results[sid] = generated_quizzes
|
|
@@ -81,7 +81,10 @@ def generate_quiz(data: pd.DataFrame, team_size: int):
|
|
| 81 |
print("==========================================")
|
| 82 |
|
| 83 |
question_generated = lines[0]
|
| 84 |
-
|
|
|
|
|
|
|
|
|
|
| 85 |
answer_generated = lines[2]
|
| 86 |
|
| 87 |
print(question_generated, multiple_choice_generated, answer_generated)
|
|
|
|
| 13 |
import time
|
| 14 |
start_time = time.time()
|
| 15 |
|
| 16 |
+
global quiz_results, quiz_generated
|
| 17 |
quiz_generated[sid] = False
|
| 18 |
generated_quizzes = generate_quiz(qna, team_size)
|
| 19 |
quiz_results[sid] = generated_quizzes
|
|
|
|
| 81 |
print("==========================================")
|
| 82 |
|
| 83 |
question_generated = lines[0]
|
| 84 |
+
|
| 85 |
+
tokens = re.split(r'\d+\.\s*', lines[1])
|
| 86 |
+
multiple_choice_generated = [token.strip() for token in tokens if token]
|
| 87 |
+
|
| 88 |
answer_generated = lines[2]
|
| 89 |
|
| 90 |
print(question_generated, multiple_choice_generated, answer_generated)
|
ice_breaking_challenge/qr.py
CHANGED
|
@@ -39,7 +39,6 @@ def qr() -> None:
|
|
| 39 |
import time
|
| 40 |
Thread(target=background_task.background_task, args=(session.sid, qna, team_size)).start()
|
| 41 |
|
| 42 |
-
|
| 43 |
# import time
|
| 44 |
# time.sleep(100)
|
| 45 |
return redirect(url_for("introduction.introduction"))
|
|
|
|
| 39 |
import time
|
| 40 |
Thread(target=background_task.background_task, args=(session.sid, qna, team_size)).start()
|
| 41 |
|
|
|
|
| 42 |
# import time
|
| 43 |
# time.sleep(100)
|
| 44 |
return redirect(url_for("introduction.introduction"))
|
ice_breaking_challenge/quiz.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
from flask import Blueprint, render_template, session
|
| 2 |
-
from flask import
|
| 3 |
|
| 4 |
-
from ice_breaking_challenge import quiz_results
|
| 5 |
|
| 6 |
bp = Blueprint("quiz", __name__, url_prefix="/quiz")
|
| 7 |
|
|
@@ -25,4 +25,8 @@ def quiz():
|
|
| 25 |
|
| 26 |
@bp.route("/finish", methods=["GET"])
|
| 27 |
def finish():
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
return render_template("finish.html")
|
|
|
|
| 1 |
from flask import Blueprint, render_template, session
|
| 2 |
+
from flask import redirect, url_for, session
|
| 3 |
|
| 4 |
+
from ice_breaking_challenge import quiz_generated, quiz_results
|
| 5 |
|
| 6 |
bp = Blueprint("quiz", __name__, url_prefix="/quiz")
|
| 7 |
|
|
|
|
| 25 |
|
| 26 |
@bp.route("/finish", methods=["GET"])
|
| 27 |
def finish():
|
| 28 |
+
global quiz_generated, quiz_results
|
| 29 |
+
session_id = session.sid
|
| 30 |
+
del quiz_generated[session_id]
|
| 31 |
+
del quiz_results[session_id]
|
| 32 |
return render_template("finish.html")
|
ice_breaking_challenge/static/style.css
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
html {
|
| 2 |
-
font-family: sans-serif;
|
| 3 |
-
background:
|
| 4 |
padding: 1rem;
|
| 5 |
}
|
| 6 |
|
|
@@ -8,127 +8,297 @@ body {
|
|
| 8 |
max-width: 960px;
|
| 9 |
margin: 0 auto;
|
| 10 |
background: white;
|
|
|
|
| 11 |
}
|
| 12 |
|
| 13 |
-
|
| 14 |
-
font-family: serif;
|
| 15 |
-
color: #377ba8;
|
| 16 |
-
margin: 1rem 0;
|
| 17 |
-
}
|
| 18 |
-
|
| 19 |
-
a {
|
| 20 |
-
color: #377ba8;
|
| 21 |
-
}
|
| 22 |
-
|
| 23 |
-
hr {
|
| 24 |
-
border: none;
|
| 25 |
-
border-top: 1px solid lightgray;
|
| 26 |
-
}
|
| 27 |
-
|
| 28 |
nav {
|
| 29 |
-
background:
|
| 30 |
display: flex;
|
| 31 |
-
|
| 32 |
-
padding:
|
| 33 |
}
|
| 34 |
|
| 35 |
nav h1 {
|
| 36 |
flex: auto;
|
| 37 |
margin: 0;
|
|
|
|
|
|
|
|
|
|
| 38 |
}
|
| 39 |
|
| 40 |
nav h1 a {
|
| 41 |
text-decoration: none;
|
| 42 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
}
|
| 44 |
|
| 45 |
-
|
|
|
|
|
|
|
|
|
|
| 46 |
display: flex;
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
padding: 0;
|
| 50 |
}
|
| 51 |
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
|
|
|
|
|
|
|
|
|
| 55 |
}
|
| 56 |
|
| 57 |
-
.
|
| 58 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
}
|
| 60 |
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
|
|
|
| 65 |
}
|
| 66 |
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 70 |
}
|
| 71 |
|
|
|
|
| 72 |
.flash {
|
| 73 |
margin: 1em 0;
|
| 74 |
padding: 1em;
|
| 75 |
-
background: #
|
| 76 |
-
border: 1px solid #
|
|
|
|
|
|
|
|
|
|
| 77 |
}
|
| 78 |
|
| 79 |
-
|
|
|
|
|
|
|
| 80 |
display: flex;
|
| 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 |
font-weight: bold;
|
| 115 |
-
margin-
|
|
|
|
| 116 |
}
|
| 117 |
|
| 118 |
-
|
| 119 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 120 |
}
|
| 121 |
|
| 122 |
-
.
|
| 123 |
-
|
| 124 |
-
resize: vertical;
|
| 125 |
}
|
| 126 |
|
| 127 |
-
|
| 128 |
-
color: #
|
| 129 |
}
|
| 130 |
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 134 |
}
|
|
|
|
| 1 |
html {
|
| 2 |
+
font-family: 'Arial', sans-serif;
|
| 3 |
+
background: white; /* Clean, white background */
|
| 4 |
padding: 1rem;
|
| 5 |
}
|
| 6 |
|
|
|
|
| 8 |
max-width: 960px;
|
| 9 |
margin: 0 auto;
|
| 10 |
background: white;
|
| 11 |
+
padding: 2rem;
|
| 12 |
}
|
| 13 |
|
| 14 |
+
/* Navigation Bar */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
nav {
|
| 16 |
+
background: none;
|
| 17 |
display: flex;
|
| 18 |
+
justify-content: center;
|
| 19 |
+
padding: 1rem;
|
| 20 |
}
|
| 21 |
|
| 22 |
nav h1 {
|
| 23 |
flex: auto;
|
| 24 |
margin: 0;
|
| 25 |
+
font-size: 2.5rem;
|
| 26 |
+
text-align: center;
|
| 27 |
+
color: #000;
|
| 28 |
}
|
| 29 |
|
| 30 |
nav h1 a {
|
| 31 |
text-decoration: none;
|
| 32 |
+
color: #000;
|
| 33 |
+
}
|
| 34 |
+
|
| 35 |
+
/* Hero Section with Ice Text */
|
| 36 |
+
.hero {
|
| 37 |
+
text-align: center;
|
| 38 |
+
margin: 2rem 0;
|
| 39 |
}
|
| 40 |
|
| 41 |
+
.title {
|
| 42 |
+
font-size: 4rem;
|
| 43 |
+
font-weight: bold;
|
| 44 |
+
color: #000;
|
| 45 |
display: flex;
|
| 46 |
+
justify-content: center;
|
| 47 |
+
align-items: center;
|
|
|
|
| 48 |
}
|
| 49 |
|
| 50 |
+
.ice-text {
|
| 51 |
+
font-family: 'Comic Sans MS', sans-serif;
|
| 52 |
+
color: #0288d1;
|
| 53 |
+
text-shadow: 2px 2px 0 #b3e5fc;
|
| 54 |
+
font-size: 5rem;
|
| 55 |
+
margin-right: 0.5rem;
|
| 56 |
}
|
| 57 |
|
| 58 |
+
.ice-text-mini {
|
| 59 |
+
font-family: 'Comic Sans MS', sans-serif;
|
| 60 |
+
color: #0288d1;
|
| 61 |
+
text-shadow: 2px 2px 0 #b3e5fc;
|
| 62 |
+
font-size: 3rem;
|
| 63 |
+
margin-right: 0.5rem;
|
| 64 |
}
|
| 65 |
|
| 66 |
+
/* Hero Image */
|
| 67 |
+
.hero img {
|
| 68 |
+
max-width: 300px;
|
| 69 |
+
height: auto;
|
| 70 |
+
margin-top: 2rem;
|
| 71 |
}
|
| 72 |
|
| 73 |
+
/* Content Section */
|
| 74 |
+
.content {
|
| 75 |
+
padding: 2rem;
|
| 76 |
+
text-align: center;
|
| 77 |
+
}
|
| 78 |
+
|
| 79 |
+
.content > header {
|
| 80 |
+
margin-bottom: 2rem;
|
| 81 |
}
|
| 82 |
|
| 83 |
+
/* Flash Messages */
|
| 84 |
.flash {
|
| 85 |
margin: 1em 0;
|
| 86 |
padding: 1em;
|
| 87 |
+
background: #e1f5fe;
|
| 88 |
+
border: 1px solid #81d4fa;
|
| 89 |
+
color: #0277bd;
|
| 90 |
+
border-radius: 5px;
|
| 91 |
+
text-align: center;
|
| 92 |
}
|
| 93 |
|
| 94 |
+
/* Form Styling */
|
| 95 |
+
.content form {
|
| 96 |
+
margin: 2em 0;
|
| 97 |
display: flex;
|
| 98 |
+
flex-direction: column;
|
| 99 |
+
align-items: center;
|
| 100 |
}
|
| 101 |
|
| 102 |
+
.content label {
|
| 103 |
+
font-weight: bold;
|
| 104 |
+
margin-bottom: 0.5em;
|
| 105 |
+
color: #0288d1;
|
| 106 |
}
|
| 107 |
|
| 108 |
+
.content input {
|
| 109 |
+
margin-bottom: 1em;
|
| 110 |
+
padding: 0.75rem;
|
| 111 |
+
border: 2px solid #81d4fa;
|
| 112 |
+
border-radius: 5px;
|
| 113 |
+
font-size: 1rem;
|
| 114 |
+
width: 80%;
|
| 115 |
+
max-width: 400px;
|
| 116 |
}
|
| 117 |
|
| 118 |
+
input[type=submit] {
|
| 119 |
+
align-self: center;
|
| 120 |
+
min-width: 10em;
|
| 121 |
+
background: #0288d1;
|
| 122 |
+
color: white;
|
| 123 |
+
border: none;
|
| 124 |
+
padding: 0.75rem;
|
| 125 |
+
border-radius: 5px;
|
| 126 |
+
cursor: pointer;
|
| 127 |
+
font-size: 1rem;
|
| 128 |
+
transition: background-color 0.3s ease;
|
| 129 |
}
|
| 130 |
|
| 131 |
+
input[type=submit]:hover {
|
| 132 |
+
background: #0277bd;
|
| 133 |
}
|
| 134 |
|
| 135 |
+
input[type=submit]:active {
|
| 136 |
+
background: #01579b;
|
| 137 |
}
|
| 138 |
|
| 139 |
+
/* Quiz Title */
|
| 140 |
+
.quiz-title {
|
| 141 |
+
color: #0288d1;
|
| 142 |
+
font-size: 2rem;
|
| 143 |
+
margin-bottom: 30px;
|
| 144 |
+
text-transform: uppercase;
|
| 145 |
+
letter-spacing: 2px;
|
| 146 |
}
|
| 147 |
|
| 148 |
+
/* Consistent Answer Styling */
|
| 149 |
+
.correct-answer {
|
| 150 |
+
font-size: 1.5rem;
|
| 151 |
+
color: #d32f2f;
|
| 152 |
font-weight: bold;
|
| 153 |
+
margin-top: 20px;
|
| 154 |
+
display: none; /* Initially hidden */
|
| 155 |
}
|
| 156 |
|
| 157 |
+
/* Choices Styling */
|
| 158 |
+
.choices {
|
| 159 |
+
font-size: 1.3rem;
|
| 160 |
+
color: #333;
|
| 161 |
+
margin-bottom: 30px;
|
| 162 |
+
list-style-type: none;
|
| 163 |
+
padding: 0;
|
| 164 |
+
line-height: 1.8;
|
| 165 |
+
}
|
| 166 |
+
|
| 167 |
+
|
| 168 |
+
|
| 169 |
+
/* Submit button for the next quiz */
|
| 170 |
+
.next-button {
|
| 171 |
+
background-color: #0288d1;
|
| 172 |
+
color: white;
|
| 173 |
+
font-size: 1rem;
|
| 174 |
+
cursor: pointer;
|
| 175 |
+
border-radius: 5px;
|
| 176 |
+
padding: 10px 20px;
|
| 177 |
+
border: none;
|
| 178 |
+
transition: background-color 0.3s ease;
|
| 179 |
}
|
| 180 |
|
| 181 |
+
.next-button:hover {
|
| 182 |
+
background-color: #0277bd;
|
|
|
|
| 183 |
}
|
| 184 |
|
| 185 |
+
.next-button:active {
|
| 186 |
+
background-color: #01579b;
|
| 187 |
}
|
| 188 |
|
| 189 |
+
/* Container for the quiz */
|
| 190 |
+
.quiz-container {
|
| 191 |
+
max-width: 600px;
|
| 192 |
+
margin: 0 auto;
|
| 193 |
+
padding: 20px;
|
| 194 |
+
background-color: #f5f5f5;
|
| 195 |
+
border-radius: 10px;
|
| 196 |
+
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
|
| 197 |
+
text-align: center;
|
| 198 |
+
}
|
| 199 |
+
|
| 200 |
+
/* Title styling */
|
| 201 |
+
.quiz-title {
|
| 202 |
+
color: #0288d1;
|
| 203 |
+
margin-bottom: 20px;
|
| 204 |
+
}
|
| 205 |
+
|
| 206 |
+
/* Host section aligned right */
|
| 207 |
+
.quiz-host-container {
|
| 208 |
+
text-align: right;
|
| 209 |
+
margin-bottom: 20px;
|
| 210 |
+
}
|
| 211 |
+
|
| 212 |
+
.quiz-host {
|
| 213 |
+
font-weight: bold;
|
| 214 |
+
color: #333;
|
| 215 |
+
}
|
| 216 |
+
|
| 217 |
+
.quiz-host-name {
|
| 218 |
+
color: #2e7d32;
|
| 219 |
+
}
|
| 220 |
+
|
| 221 |
+
/* Question section aligned left */
|
| 222 |
+
.quiz-question-container {
|
| 223 |
+
text-align: left;
|
| 224 |
+
margin-bottom: 20px;
|
| 225 |
+
}
|
| 226 |
+
|
| 227 |
+
.quiz-question {
|
| 228 |
+
font-weight: bold;
|
| 229 |
+
color: #003285;
|
| 230 |
+
font-size: 1.7rem;
|
| 231 |
+
}
|
| 232 |
+
|
| 233 |
+
/* Choices with proper alignment */
|
| 234 |
+
.choices {
|
| 235 |
+
text-align: left;
|
| 236 |
+
margin-bottom: 30px;
|
| 237 |
+
}
|
| 238 |
+
|
| 239 |
+
/* Consistent Answer Styling */
|
| 240 |
+
.correct-answer {
|
| 241 |
+
font-size: 1.5rem;
|
| 242 |
+
color: #d32f2f;
|
| 243 |
+
font-weight: bold;
|
| 244 |
+
margin-top: 20px;
|
| 245 |
+
display: none;
|
| 246 |
+
}
|
| 247 |
+
|
| 248 |
+
/* Show Answer button - blue color theme */
|
| 249 |
+
.answer-button {
|
| 250 |
+
background-color: #003285;
|
| 251 |
+
color: white;
|
| 252 |
+
padding: 12px 24px;
|
| 253 |
+
font-size: 1.2rem;
|
| 254 |
+
border: none;
|
| 255 |
+
border-radius: 8px;
|
| 256 |
+
cursor: pointer;
|
| 257 |
+
font-weight: bold;
|
| 258 |
+
text-transform: uppercase;
|
| 259 |
+
transition: background-color 0.3s ease, transform 0.3s ease;
|
| 260 |
+
margin-bottom: 30px;
|
| 261 |
+
}
|
| 262 |
+
|
| 263 |
+
.answer-button:hover {
|
| 264 |
+
background-color: #00286A;
|
| 265 |
+
transform: scale(1.05);
|
| 266 |
+
}
|
| 267 |
+
|
| 268 |
+
.answer-button:active {
|
| 269 |
+
background-color: #00286A;
|
| 270 |
+
transform: scale(1.05);
|
| 271 |
+
}
|
| 272 |
+
|
| 273 |
+
/* Submit button for the next quiz */
|
| 274 |
+
.next-button {
|
| 275 |
+
background-color: #0288d1;
|
| 276 |
+
color: white;
|
| 277 |
+
font-size: 1rem;
|
| 278 |
+
cursor: pointer;
|
| 279 |
+
border-radius: 5px;
|
| 280 |
+
padding: 10px 20px;
|
| 281 |
+
border: none;
|
| 282 |
+
transition: background-color 0.3s ease;
|
| 283 |
+
}
|
| 284 |
+
|
| 285 |
+
.next-button:hover {
|
| 286 |
+
background-color: #0277bd;
|
| 287 |
+
}
|
| 288 |
+
|
| 289 |
+
.next-button:active {
|
| 290 |
+
background-color: #01579b;
|
| 291 |
+
}
|
| 292 |
+
|
| 293 |
+
/* Styling for the instruction text */
|
| 294 |
+
#instruction {
|
| 295 |
+
font-size: 1.5rem;
|
| 296 |
+
margin-bottom: 10px;
|
| 297 |
+
text-align: center;
|
| 298 |
+
}
|
| 299 |
+
|
| 300 |
+
#topic {
|
| 301 |
+
font-size: 2rem;
|
| 302 |
+
margin-top: 10px;
|
| 303 |
+
text-align: center;
|
| 304 |
}
|
ice_breaking_challenge/templates/base.html
CHANGED
|
@@ -1,15 +1,17 @@
|
|
| 1 |
<!doctype html>
|
| 2 |
<title>{% block title %}{% endblock %} - Ice Breaking Challenge</title>
|
| 3 |
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
|
|
|
|
| 4 |
<nav>
|
| 5 |
-
<h1><a href="{{ url_for('index') }}">
|
| 6 |
</nav>
|
|
|
|
| 7 |
<section class="content">
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
</header>
|
| 11 |
{% for message in get_flashed_messages() %}
|
| 12 |
<div class="flash">{{ message }}</div>
|
| 13 |
{% endfor %}
|
|
|
|
| 14 |
{% block content %}{% endblock %}
|
| 15 |
-
</section>
|
|
|
|
| 1 |
<!doctype html>
|
| 2 |
<title>{% block title %}{% endblock %} - Ice Breaking Challenge</title>
|
| 3 |
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
|
| 4 |
+
|
| 5 |
<nav>
|
| 6 |
+
<h1><a href="{{ url_for('index') }}"><span class="ice-text-mini">ICE</span>BREAKER</a></h1>
|
| 7 |
</nav>
|
| 8 |
+
|
| 9 |
<section class="content">
|
| 10 |
+
|
| 11 |
+
|
|
|
|
| 12 |
{% for message in get_flashed_messages() %}
|
| 13 |
<div class="flash">{{ message }}</div>
|
| 14 |
{% endfor %}
|
| 15 |
+
|
| 16 |
{% block content %}{% endblock %}
|
| 17 |
+
</section>
|
ice_breaking_challenge/templates/finish.html
CHANGED
|
@@ -1,7 +1,9 @@
|
|
| 1 |
{% extends 'base.html' %}
|
| 2 |
|
| 3 |
{% block content %}
|
| 4 |
-
|
| 5 |
-
<
|
| 6 |
-
<p
|
|
|
|
|
|
|
| 7 |
{% endblock %}
|
|
|
|
| 1 |
{% extends 'base.html' %}
|
| 2 |
|
| 3 |
{% block content %}
|
| 4 |
+
<div class="quiz-container">
|
| 5 |
+
<h1 id="topic">ํด์ฆ๊ฐ ๋๋ฌ์ต๋๋ค!</h1>
|
| 6 |
+
<p id="instruction">์ฆ๊ฑฐ์ฐ์
จ๋์? ๋ง์ด ์นํด์ง์
จ๋์?</p>
|
| 7 |
+
<p id="instruction">์ฐธ์ฌํด์ฃผ์
์ ๊ฐ์ฌํฉ๋๋ค. ์์ผ๋ก๋ ์ข์ ์๊ฐ ๋์ธ์!</p>
|
| 8 |
+
</div>
|
| 9 |
{% endblock %}
|
ice_breaking_challenge/templates/index.html
CHANGED
|
@@ -1,12 +1,25 @@
|
|
| 1 |
-
{% extends 'base.html' %}
|
| 2 |
-
|
| 3 |
|
| 4 |
{% block content %}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
<form method="post">
|
| 6 |
-
<label for="team_number"
|
| 7 |
-
<input name="team_number" id="team_number" required>
|
| 8 |
-
<label for="team_size"
|
| 9 |
-
<input name="team_size" id="team_size" required>
|
| 10 |
-
<input type="submit" value="
|
| 11 |
</form>
|
| 12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
|
| 2 |
{% block content %}
|
| 3 |
+
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
|
| 4 |
+
<section class="content">
|
| 5 |
+
<!-- Hero Section -->
|
| 6 |
+
<section class="hero">
|
| 7 |
+
<div class="title">
|
| 8 |
+
<span class="ice-text">ICE</span> BREAKER
|
| 9 |
+
</div>
|
| 10 |
+
</section>
|
| 11 |
+
|
| 12 |
+
<header>
|
| 13 |
+
{% block header %}
|
| 14 |
+
<h2>Welcome to the Ice-Breaking Challenge!</h2>
|
| 15 |
+
{% endblock %}
|
| 16 |
+
</header>
|
| 17 |
<form method="post">
|
| 18 |
+
<label for="team_number">Team Number</label>
|
| 19 |
+
<input name="team_number" id="team_number" placeholder="Enter your team number" required>
|
| 20 |
+
<label for="team_size">Team Size</label>
|
| 21 |
+
<input name="team_size" id="team_size" placeholder="Enter team size" required>
|
| 22 |
+
<input type="submit" value="Next" class="submit-button">
|
| 23 |
</form>
|
| 24 |
+
</section>
|
| 25 |
+
{% endblock %}
|
ice_breaking_challenge/templates/introduction.html
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
{% extends 'base.html' %}
|
| 2 |
|
| 3 |
{% block content %}
|
| 4 |
-
|
| 5 |
<h2 style="font-family: 'Montserrat', sans-serif; font-weight: 700; color: #2c3e50;">์๊ธฐ์๊ฐ ํ๋ ์๊ฐ์ ๊ฐ์ ธ ๋ณด์ธ์</h2>
|
| 6 |
<p style="font-family: 'Montserrat', sans-serif; color: #7f8c8d;">ํ์๋ค๊ณผ ํจ๊ป ๊ฐ๋จํ ์๊ธฐ์๊ฐ๋ฅผ ํด๋ณด์ธ์!</p>
|
| 7 |
<form method="post" style="margin-top: 20px;">
|
|
|
|
| 1 |
{% extends 'base.html' %}
|
| 2 |
|
| 3 |
{% block content %}
|
| 4 |
+
<div class="quiz-container" style="text-align: center; margin-top: 20px;">
|
| 5 |
<h2 style="font-family: 'Montserrat', sans-serif; font-weight: 700; color: #2c3e50;">์๊ธฐ์๊ฐ ํ๋ ์๊ฐ์ ๊ฐ์ ธ ๋ณด์ธ์</h2>
|
| 6 |
<p style="font-family: 'Montserrat', sans-serif; color: #7f8c8d;">ํ์๋ค๊ณผ ํจ๊ป ๊ฐ๋จํ ์๊ธฐ์๊ฐ๋ฅผ ํด๋ณด์ธ์!</p>
|
| 7 |
<form method="post" style="margin-top: 20px;">
|
ice_breaking_challenge/templates/quiz.html
CHANGED
|
@@ -1,33 +1,50 @@
|
|
| 1 |
{% extends 'base.html' %}
|
| 2 |
|
| 3 |
{% block content %}
|
| 4 |
-
<
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
<form method="post" style="margin-top: 20px;">
|
| 20 |
-
<input type="submit" value="
|
| 21 |
</form>
|
|
|
|
| 22 |
|
| 23 |
<script>
|
| 24 |
function showAnswer() {
|
| 25 |
-
const answer = document.getElementById(
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
answer.style.display = "none";
|
| 30 |
-
}
|
| 31 |
}
|
| 32 |
</script>
|
| 33 |
{% endblock %}
|
|
|
|
| 1 |
{% extends 'base.html' %}
|
| 2 |
|
| 3 |
{% block content %}
|
| 4 |
+
<div class="quiz-container">
|
| 5 |
+
<h1 class="quiz-title">Quiz Results</h1>
|
| 6 |
+
|
| 7 |
+
{% if quiz %}
|
| 8 |
+
<div class="quiz-content">
|
| 9 |
+
<!-- Display quiz host's name -->
|
| 10 |
+
<div class="quiz-host-container">
|
| 11 |
+
<span class="quiz-host">Host: {{ quiz[0] }}</span>
|
| 12 |
+
</div>
|
| 13 |
+
|
| 14 |
+
<!-- Display the question -->
|
| 15 |
+
<div class="quiz-question-container">
|
| 16 |
+
<span class="quiz-question">{{ quiz[1] }}</span>
|
| 17 |
+
</div>
|
| 18 |
+
|
| 19 |
+
<!-- Display quiz options as it is -->
|
| 20 |
+
<ul class="choices">
|
| 21 |
+
{% for choice in quiz[2] %}
|
| 22 |
+
<li>{{ loop.index }}. {{ choice }}</li>
|
| 23 |
+
{% endfor %}
|
| 24 |
+
</ul>
|
| 25 |
+
|
| 26 |
+
<!-- Show answer button that disappears after click -->
|
| 27 |
+
<button class="answer-button" onclick="showAnswer()">Show Answer</button>
|
| 28 |
+
|
| 29 |
+
<!-- Correct answer, initially hidden -->
|
| 30 |
+
<p id="answer" style="display: none;" class="correct-answer">Correct Answer: {{ quiz[3] }}</p>
|
| 31 |
+
</div>
|
| 32 |
+
{% else %}
|
| 33 |
+
<p>No quiz available. Please try again.</p>
|
| 34 |
+
{% endif %}
|
| 35 |
+
|
| 36 |
+
<!-- Button to move to the next quiz -->
|
| 37 |
<form method="post" style="margin-top: 20px;">
|
| 38 |
+
<input type="submit" value="Next" class="next-button">
|
| 39 |
</form>
|
| 40 |
+
</div>
|
| 41 |
|
| 42 |
<script>
|
| 43 |
function showAnswer() {
|
| 44 |
+
const answer = document.getElementById('answer');
|
| 45 |
+
const button = document.querySelector('.answer-button');
|
| 46 |
+
answer.style.display = "block";
|
| 47 |
+
button.style.display = "none"; // Hide the button after clicking
|
|
|
|
|
|
|
| 48 |
}
|
| 49 |
</script>
|
| 50 |
{% endblock %}
|
ice_breaking_challenge/templates/topic.html
CHANGED
|
@@ -1,8 +1,11 @@
|
|
| 1 |
{% extends 'base.html' %}
|
| 2 |
|
| 3 |
{% block content %}
|
| 4 |
-
|
|
|
|
| 5 |
|
|
|
|
|
|
|
| 6 |
<script>
|
| 7 |
// 20์ด๋ง๋ค ํ์ด์ง ์๋ก๊ณ ์นจ
|
| 8 |
setInterval(function() {
|
|
|
|
| 1 |
{% extends 'base.html' %}
|
| 2 |
|
| 3 |
{% block content %}
|
| 4 |
+
<div class="quiz-container">
|
| 5 |
+
<h1 id=>๋ค์์ ์ฃผ์ ๋ก ์๊ฐ์ ๊ณต์ ํด๋ณด์ธ์!</h1>
|
| 6 |
|
| 7 |
+
<p id="instruction" style="color: #262a2a;">{{ topic }}</p> <!-- ์๋ฒ์์ ์ ๋ฌํ ์ฃผ์ ๋ฅผ ๋ฐ๋ก ํ์ -->
|
| 8 |
+
</div>
|
| 9 |
<script>
|
| 10 |
// 20์ด๋ง๋ค ํ์ด์ง ์๋ก๊ณ ์นจ
|
| 11 |
setInterval(function() {
|