Update pages/reader.py
Browse files- pages/reader.py +7 -4
pages/reader.py
CHANGED
|
@@ -36,9 +36,10 @@ filtered_df = df[df['ID'] == paramx]
|
|
| 36 |
|
| 37 |
with st.sidebar:
|
| 38 |
fontsize = st.number_input("Font Size", min_value=5, value=16, step=1)
|
| 39 |
-
no_columns = st.number_input("Column", min_value=1, value=
|
| 40 |
|
| 41 |
if not filtered_df.empty:
|
|
|
|
| 42 |
row = filtered_df.iloc[0]
|
| 43 |
|
| 44 |
# Get and clean values
|
|
@@ -55,13 +56,12 @@ if not filtered_df.empty:
|
|
| 55 |
rnd = format_html(row.get("Result & Discussion", ""))
|
| 56 |
conclusion = format_html(row.get("Conclusion", ""))
|
| 57 |
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
# CSS styles for individual sections (no container)
|
| 62 |
html_output = f"""
|
| 63 |
<style>
|
| 64 |
.article-title {{
|
|
|
|
| 65 |
font-size: 28px;
|
| 66 |
font-weight: bold;
|
| 67 |
font-family: 'Georgia', serif;
|
|
@@ -69,12 +69,14 @@ if not filtered_df.empty:
|
|
| 69 |
margin-bottom: 5px;
|
| 70 |
}}
|
| 71 |
.article-author {{
|
|
|
|
| 72 |
font-size: 16px;
|
| 73 |
color: #666;
|
| 74 |
margin-bottom: 20px;
|
| 75 |
font-style: italic;
|
| 76 |
}}
|
| 77 |
.section-title {{
|
|
|
|
| 78 |
font-size: 20px;
|
| 79 |
font-weight: bold;
|
| 80 |
margin-top: 25px;
|
|
@@ -87,6 +89,7 @@ if not filtered_df.empty:
|
|
| 87 |
font-family: Georgia, serif;
|
| 88 |
line-height: 1.8;
|
| 89 |
color: #333;
|
|
|
|
| 90 |
}}
|
| 91 |
.section-content {{
|
| 92 |
column-count: {no_columns};
|
|
|
|
| 36 |
|
| 37 |
with st.sidebar:
|
| 38 |
fontsize = st.number_input("Font Size", min_value=5, value=16, step=1)
|
| 39 |
+
no_columns = st.number_input("Column", min_value=1, min_value=4, value=1, step=1)
|
| 40 |
|
| 41 |
if not filtered_df.empty:
|
| 42 |
+
filtered_df = filtered_df.fillna("Tidak tersedia")
|
| 43 |
row = filtered_df.iloc[0]
|
| 44 |
|
| 45 |
# Get and clean values
|
|
|
|
| 56 |
rnd = format_html(row.get("Result & Discussion", ""))
|
| 57 |
conclusion = format_html(row.get("Conclusion", ""))
|
| 58 |
|
| 59 |
+
|
|
|
|
|
|
|
| 60 |
# CSS styles for individual sections (no container)
|
| 61 |
html_output = f"""
|
| 62 |
<style>
|
| 63 |
.article-title {{
|
| 64 |
+
text-align: center;
|
| 65 |
font-size: 28px;
|
| 66 |
font-weight: bold;
|
| 67 |
font-family: 'Georgia', serif;
|
|
|
|
| 69 |
margin-bottom: 5px;
|
| 70 |
}}
|
| 71 |
.article-author {{
|
| 72 |
+
text-align: center;
|
| 73 |
font-size: 16px;
|
| 74 |
color: #666;
|
| 75 |
margin-bottom: 20px;
|
| 76 |
font-style: italic;
|
| 77 |
}}
|
| 78 |
.section-title {{
|
| 79 |
+
text-align: center;
|
| 80 |
font-size: 20px;
|
| 81 |
font-weight: bold;
|
| 82 |
margin-top: 25px;
|
|
|
|
| 89 |
font-family: Georgia, serif;
|
| 90 |
line-height: 1.8;
|
| 91 |
color: #333;
|
| 92 |
+
font-style: italic;
|
| 93 |
}}
|
| 94 |
.section-content {{
|
| 95 |
column-count: {no_columns};
|