Sina Media Lab
commited on
Commit
·
3949aee
1
Parent(s):
eda4dad
Updates
Browse files
app.py
CHANGED
|
@@ -129,8 +129,13 @@ def generate_new_question(category_name, module_name, module):
|
|
| 129 |
modules = load_modules()
|
| 130 |
|
| 131 |
# Streamlit sidebar
|
| 132 |
-
st.sidebar.
|
| 133 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 134 |
|
| 135 |
st.sidebar.title("Quiz Categories")
|
| 136 |
selected_category = st.sidebar.selectbox("Choose a category:", list(modules.keys()))
|
|
@@ -168,9 +173,13 @@ if selected_category:
|
|
| 168 |
|
| 169 |
current_question = st.session_state.current_question
|
| 170 |
|
| 171 |
-
# Display
|
| 172 |
-
st.markdown(
|
| 173 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 174 |
|
| 175 |
# Display the current question with larger font
|
| 176 |
st.markdown(f"<span style='font-size: 18px;'><b>Q{st.session_state.current_index + 1}: {current_question['question']}</b></span>", unsafe_allow_html=True)
|
|
|
|
| 129 |
modules = load_modules()
|
| 130 |
|
| 131 |
# Streamlit sidebar
|
| 132 |
+
st.sidebar.markdown(
|
| 133 |
+
"""
|
| 134 |
+
<div style='background-color: #D3D3D3; padding: 10px; border-radius: 10px; text-align: center; color: black;'>
|
| 135 |
+
<h3 style='margin: 0;'>🪄 Magic Math Quiz!</h3>
|
| 136 |
+
<h6 style='margin: 0; font-size: 10px;'><a href="https://ghassem.com" target="_blank" style="color: black; text-decoration: none;'>By Ghassem Tofighi</a></h6>
|
| 137 |
+
</div>
|
| 138 |
+
""", unsafe_allow_html=True)
|
| 139 |
|
| 140 |
st.sidebar.title("Quiz Categories")
|
| 141 |
selected_category = st.sidebar.selectbox("Choose a category:", list(modules.keys()))
|
|
|
|
| 173 |
|
| 174 |
current_question = st.session_state.current_question
|
| 175 |
|
| 176 |
+
# Display Category Title > Module Title with dark background and white font
|
| 177 |
+
st.markdown(
|
| 178 |
+
f"""
|
| 179 |
+
<div style='background-color: #333; padding: 10px; border-radius: 5px; color: white;'>
|
| 180 |
+
{selected_category} > {selected_module_data['title']}
|
| 181 |
+
</div>
|
| 182 |
+
""", unsafe_allow_html=True)
|
| 183 |
|
| 184 |
# Display the current question with larger font
|
| 185 |
st.markdown(f"<span style='font-size: 18px;'><b>Q{st.session_state.current_index + 1}: {current_question['question']}</b></span>", unsafe_allow_html=True)
|