Sina Media Lab
commited on
Commit
·
a5eb002
1
Parent(s):
bbd4c6d
Updates
Browse files
app.py
CHANGED
|
@@ -35,9 +35,14 @@ def reset_pdf_cache():
|
|
| 35 |
def generate_pdf_report():
|
| 36 |
pdf = FPDF()
|
| 37 |
pdf.add_page()
|
| 38 |
-
pdf.set_font("Arial", size=
|
| 39 |
|
| 40 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
pdf.ln(10)
|
| 42 |
|
| 43 |
for i, entry in enumerate(st.session_state.questions):
|
|
@@ -136,11 +141,11 @@ if selected_module != st.session_state.current_module:
|
|
| 136 |
|
| 137 |
current_question = st.session_state.current_question
|
| 138 |
|
| 139 |
-
# Title header with rounded corners
|
| 140 |
st.markdown(
|
| 141 |
"""
|
| 142 |
-
<div style='background-color: #
|
| 143 |
-
<
|
| 144 |
</div>
|
| 145 |
""", unsafe_allow_html=True)
|
| 146 |
|
|
|
|
| 35 |
def generate_pdf_report():
|
| 36 |
pdf = FPDF()
|
| 37 |
pdf.add_page()
|
| 38 |
+
pdf.set_font("Arial", style='B', size=12)
|
| 39 |
|
| 40 |
+
# Header for PDF report
|
| 41 |
+
pdf.set_fill_color(211, 211, 211) # Light gray
|
| 42 |
+
pdf.cell(0, 10, txt="Magic Math Quiz!", ln=True, align="C", fill=True)
|
| 43 |
+
pdf.ln(5)
|
| 44 |
+
pdf.set_font("Arial", size=10)
|
| 45 |
+
pdf.cell(0, 10, txt="by Ghassem Tofighi", ln=True, align="C", link="https://ghassem.com")
|
| 46 |
pdf.ln(10)
|
| 47 |
|
| 48 |
for i, entry in enumerate(st.session_state.questions):
|
|
|
|
| 141 |
|
| 142 |
current_question = st.session_state.current_question
|
| 143 |
|
| 144 |
+
# Title header with rounded corners and margin
|
| 145 |
st.markdown(
|
| 146 |
"""
|
| 147 |
+
<div style='background-color: #D3D3D3; padding: 10px; border-radius: 10px; text-align: center; color: black; margin-top: 20px;'>
|
| 148 |
+
<h2 style='margin: 0;'>Magic Math Quiz!</h2>
|
| 149 |
</div>
|
| 150 |
""", unsafe_allow_html=True)
|
| 151 |
|