mou3az commited on
Commit
20dc455
·
verified ·
1 Parent(s): 828adf0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -34
app.py CHANGED
@@ -82,22 +82,10 @@ def generate_quiz_page():
82
  }}
83
  .quiz-container pre {{
84
  white-space: pre-wrap; /* Preserve line breaks in quiz response */
85
- background-color: #f0f0f0; /* Light grey background */
86
- padding: 10px;
87
- border-radius: 4px;
88
  }}
89
  .generate-link {{
90
- display: inline-block; /* Make the link block-level for spacing */
91
  margin-top: 10px;
92
- padding: 10px 20px;
93
- background-color: #ffc107; /* Yellow background for link */
94
- color: #333; /* Dark grey text color */
95
- text-decoration: none;
96
- border-radius: 5px;
97
- font-weight: bold;
98
- }}
99
- .generate-link:hover {{
100
- background-color: #ffca28; /* Lighter yellow on hover */
101
  }}
102
  a {{
103
  color: #ffc107; /* Yellow text color for links */
@@ -113,8 +101,6 @@ def generate_quiz_page():
113
  border-radius: 4px;
114
  resize: vertical; /* Allow vertical resizing of textarea */
115
  min-height: 150px; /* Minimum height for textarea */
116
- background-color: #f0f0f0; /* Light grey background */
117
- color: #333; /* Dark grey text color */
118
  }}
119
  input[type="submit"] {{
120
  background-color: #ffc107; /* Yellow background for submit button */
@@ -138,9 +124,9 @@ def generate_quiz_page():
138
  </body>
139
  </html>
140
  """
141
-
142
  return quiz_html
143
-
144
  # Default GET request handling
145
  default_html = """
146
  <!DOCTYPE html>
@@ -150,49 +136,47 @@ def generate_quiz_page():
150
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
151
  <title>Generate Quiz</title>
152
  <style>
153
- body {{
154
  font-family: Arial, sans-serif;
155
  background-color: #f0f0f0; /* Light grey background */
156
  color: #333; /* Dark grey text color */
157
  margin: 20px;
158
- }}
159
- h2 {{
160
  background-color: #ffc107; /* Yellow background for heading */
161
  padding: 10px;
162
  border-radius: 5px;
163
- }}
164
- form {{
165
  background-color: #fff; /* White background for form */
166
  padding: 20px;
167
  border-radius: 5px;
168
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); /* Light shadow effect */
169
  margin-bottom: 20px;
170
- }}
171
- label {{
172
  display: block;
173
  margin-bottom: 10px;
174
- }}
175
- textarea {{
176
  width: 98%;
177
  padding: 10px;
178
  border: 1px solid #ccc;
179
  border-radius: 4px;
180
  resize: vertical; /* Allow vertical resizing of textarea */
181
  min-height: 150px; /* Minimum height for textarea */
182
- background-color: #f0f0f0; /* Light grey background */
183
- color: #333; /* Dark grey text color */
184
- }}
185
- input[type="submit"] {{
186
  background-color: #ffc107; /* Yellow background for submit button */
187
  color: #333; /* Dark grey text color */
188
  border: none;
189
  padding: 10px 20px;
190
  cursor: pointer;
191
  border-radius: 4px;
192
- }}
193
- input[type="submit"]:hover {{
194
  background-color: #ffca28; /* Lighter yellow on hover */
195
- }}
196
  </style>
197
  </head>
198
  <body>
@@ -205,7 +189,7 @@ def generate_quiz_page():
205
  </body>
206
  </html>
207
  """
208
-
209
  return default_html
210
 
211
  if __name__ == "__main__":
 
82
  }}
83
  .quiz-container pre {{
84
  white-space: pre-wrap; /* Preserve line breaks in quiz response */
 
 
 
85
  }}
86
  .generate-link {{
87
+ display: block; /* Make the link block-level for spacing */
88
  margin-top: 10px;
 
 
 
 
 
 
 
 
 
89
  }}
90
  a {{
91
  color: #ffc107; /* Yellow text color for links */
 
101
  border-radius: 4px;
102
  resize: vertical; /* Allow vertical resizing of textarea */
103
  min-height: 150px; /* Minimum height for textarea */
 
 
104
  }}
105
  input[type="submit"] {{
106
  background-color: #ffc107; /* Yellow background for submit button */
 
124
  </body>
125
  </html>
126
  """
127
+
128
  return quiz_html
129
+
130
  # Default GET request handling
131
  default_html = """
132
  <!DOCTYPE html>
 
136
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
137
  <title>Generate Quiz</title>
138
  <style>
139
+ body {
140
  font-family: Arial, sans-serif;
141
  background-color: #f0f0f0; /* Light grey background */
142
  color: #333; /* Dark grey text color */
143
  margin: 20px;
144
+ }
145
+ h2 {
146
  background-color: #ffc107; /* Yellow background for heading */
147
  padding: 10px;
148
  border-radius: 5px;
149
+ }
150
+ form {
151
  background-color: #fff; /* White background for form */
152
  padding: 20px;
153
  border-radius: 5px;
154
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); /* Light shadow effect */
155
  margin-bottom: 20px;
156
+ }
157
+ label {
158
  display: block;
159
  margin-bottom: 10px;
160
+ }
161
+ textarea {
162
  width: 98%;
163
  padding: 10px;
164
  border: 1px solid #ccc;
165
  border-radius: 4px;
166
  resize: vertical; /* Allow vertical resizing of textarea */
167
  min-height: 150px; /* Minimum height for textarea */
168
+ }
169
+ input[type="submit"] {
 
 
170
  background-color: #ffc107; /* Yellow background for submit button */
171
  color: #333; /* Dark grey text color */
172
  border: none;
173
  padding: 10px 20px;
174
  cursor: pointer;
175
  border-radius: 4px;
176
+ }
177
+ input[type="submit"]:hover {
178
  background-color: #ffca28; /* Lighter yellow on hover */
179
+ }
180
  </style>
181
  </head>
182
  <body>
 
189
  </body>
190
  </html>
191
  """
192
+
193
  return default_html
194
 
195
  if __name__ == "__main__":