Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -67,6 +67,63 @@ SAMPLE_VERSES = {
|
|
| 67 |
# Initialize database
|
| 68 |
init_db()
|
| 69 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 70 |
# App title and description
|
| 71 |
st.markdown('<h1 class="main-header">📖 Scripture Decipher</h1>', unsafe_allow_html=True)
|
| 72 |
st.markdown("""
|
|
@@ -168,7 +225,8 @@ with tab2:
|
|
| 168 |
start_idx = (page - 1) * items_per_page
|
| 169 |
end_idx = min(start_idx + items_per_page, total_verses)
|
| 170 |
|
| 171 |
-
|
|
|
|
| 172 |
|
| 173 |
# Display verses for current page
|
| 174 |
for verse in filtered_verses[start_idx:end_idx]:
|
|
@@ -179,7 +237,8 @@ with tab2:
|
|
| 179 |
st.markdown(f'<div class="scripture-box">{verse[4]}</div>', unsafe_allow_html=True)
|
| 180 |
with col2:
|
| 181 |
st.write("**Simplified:**")
|
| 182 |
-
|
|
|
|
| 183 |
|
| 184 |
# Statistics
|
| 185 |
st.markdown("---")
|
|
@@ -245,7 +304,7 @@ with tab3:
|
|
| 245 |
# Add footer
|
| 246 |
st.markdown("---")
|
| 247 |
st.markdown("""
|
| 248 |
-
<div
|
| 249 |
<p>Scripture Decipher • Making the Bible accessible to all</p>
|
| 250 |
</div>
|
| 251 |
""", unsafe_allow_html=True)
|
|
|
|
| 67 |
# Initialize database
|
| 68 |
init_db()
|
| 69 |
|
| 70 |
+
# Minimal CSS for custom components only
|
| 71 |
+
st.markdown("""
|
| 72 |
+
<style>
|
| 73 |
+
.main-header {
|
| 74 |
+
font-size: 3.5rem;
|
| 75 |
+
color: #2c5c2c;
|
| 76 |
+
text-align: center;
|
| 77 |
+
margin-bottom: 1rem;
|
| 78 |
+
font-weight: bold;
|
| 79 |
+
}
|
| 80 |
+
.sub-header {
|
| 81 |
+
font-size: 1.8rem;
|
| 82 |
+
color: #3a6349;
|
| 83 |
+
border-bottom: 3px solid #4a7c59;
|
| 84 |
+
padding-bottom: 0.5rem;
|
| 85 |
+
margin-bottom: 1.5rem;
|
| 86 |
+
font-weight: 600;
|
| 87 |
+
}
|
| 88 |
+
.scripture-box {
|
| 89 |
+
background-color: #f0f7f0;
|
| 90 |
+
border-radius: 10px;
|
| 91 |
+
padding: 20px;
|
| 92 |
+
margin: 15px 0;
|
| 93 |
+
border-left: 5px solid #4a7c59;
|
| 94 |
+
color: #2c5c2c;
|
| 95 |
+
font-size: 1.1rem;
|
| 96 |
+
line-height: 1.6;
|
| 97 |
+
}
|
| 98 |
+
.simplified-box {
|
| 99 |
+
background-color: #e8f4f8;
|
| 100 |
+
border-radius: 10px;
|
| 101 |
+
padding: 20px;
|
| 102 |
+
margin: 15px 0;
|
| 103 |
+
border-left: 5px solid #5c8da5;
|
| 104 |
+
color: #2c3e50;
|
| 105 |
+
font-size: 1.1rem;
|
| 106 |
+
line-height: 1.6;
|
| 107 |
+
}
|
| 108 |
+
.success-box {
|
| 109 |
+
background-color: #d4edda;
|
| 110 |
+
color: #155724;
|
| 111 |
+
padding: 15px;
|
| 112 |
+
border-radius: 8px;
|
| 113 |
+
margin: 15px 0;
|
| 114 |
+
border: 1px solid #c3e6cb;
|
| 115 |
+
font-weight: 500;
|
| 116 |
+
}
|
| 117 |
+
.footer {
|
| 118 |
+
text-align: center;
|
| 119 |
+
color: #6c757d;
|
| 120 |
+
padding: 20px;
|
| 121 |
+
margin-top: 30px;
|
| 122 |
+
font-style: italic;
|
| 123 |
+
}
|
| 124 |
+
</style>
|
| 125 |
+
""", unsafe_allow_html=True)
|
| 126 |
+
|
| 127 |
# App title and description
|
| 128 |
st.markdown('<h1 class="main-header">📖 Scripture Decipher</h1>', unsafe_allow_html=True)
|
| 129 |
st.markdown("""
|
|
|
|
| 225 |
start_idx = (page - 1) * items_per_page
|
| 226 |
end_idx = min(start_idx + items_per_page, total_verses)
|
| 227 |
|
| 228 |
+
# Fixed the formatting issue here
|
| 229 |
+
st.write(f"Showing {start_idx + 1}-{end_idx} of {total_verses} verse{'s' if total_verses != 1 else ''}")
|
| 230 |
|
| 231 |
# Display verses for current page
|
| 232 |
for verse in filtered_verses[start_idx:end_idx]:
|
|
|
|
| 237 |
st.markdown(f'<div class="scripture-box">{verse[4]}</div>', unsafe_allow_html=True)
|
| 238 |
with col2:
|
| 239 |
st.write("**Simplified:**")
|
| 240 |
+
# FIXED: Changed from inline style to using the CSS class
|
| 241 |
+
st.markdown(f'<div class="simplified-box">{verse[5]}</div>', unsafe_allow_html=True)
|
| 242 |
|
| 243 |
# Statistics
|
| 244 |
st.markdown("---")
|
|
|
|
| 304 |
# Add footer
|
| 305 |
st.markdown("---")
|
| 306 |
st.markdown("""
|
| 307 |
+
<div class="footer">
|
| 308 |
<p>Scripture Decipher • Making the Bible accessible to all</p>
|
| 309 |
</div>
|
| 310 |
""", unsafe_allow_html=True)
|