SuchithTissera's picture
Update utils/styles.py
1b588c0 verified
Raw History Blame Contribute Delete
2.5 kB
import streamlit as st
def load_css():
st.markdown("""
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap" rel="stylesheet">
<style>
/* to keep it black color even in light mode */
/* app background */
.stApp {
background-color: #0B1220;
color: #FFFFFF;
}
/* sidebar panel */
[data-testid="stSidebar"] {
background-color: #232734;
}
/* sidebar content area */
[data-testid="stSidebar"] > div:first-child {
background-color: #232734;
}
/* sidebar text */
[data-testid="stSidebar"] * {
color: #E5E7EB;
}
/* selected page item */
[data-testid="stSidebarNav"] li[aria-current="page"] a,
[data-testid="stSidebarNav"] li[aria-current="page"] span {
background-color: #3A4052;
color: #FFFFFF;
border-radius: 10px;
}
/* other sidebar links */
[data-testid="stSidebarNav"] a,
[data-testid="stSidebarNav"] span {
color: #D1D5DB;
}
/* hover effect */
[data-testid="stSidebarNav"] a:hover {
background-color: #2E3445;
color: #FFFFFF;
border-radius: 10px;
}
/* adding content for the feature boxes */
.feature_box {
background: linear-gradient(135deg, #1f4e79 0%, #003366 100%);
padding: 25px 30px;
border-radius: 14px;
border: 1px solid rgba(255, 255, 255, 0.08);
box-shadow: 0px 6px 20px rgba(0, 0, 0, 0.4);
margin-bottom: 20px;
min-height: auto;
}
/* adding details of the title heading */
.main_title {
color: #ffffff;
font-family: 'Poppins', sans-serif;
font-size: 48px;
font-weight: bold;
text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.5);
}
/* adding details of the sub topics for features */
.topic_header {
color: #ffffff;
font-family: 'Poppins', sans-serif;
font-size: 25px;
font-weight: bold;
margin-bottom: 10px;
}
/* adding details of the content inside the feature boxes */
.feature_text {
color: #ffffff;
font-size: 20px;
line-height: 1.5;
}
/* adding the positive outcome of the game 75%>*/
.positive_text {
background-color: rgba(0, 128, 0, 0.15);
border-left: 6px solid green;
padding: 15px;
border-radius: 8px;
font-size: 20px;
font-weight: bold;
margin: 10px 0 20px 0;
}
/* adding the negative outcome of the game 75%<*/
.negative_text {
background-color: rgba(255, 0, 0, 0.15);
border-left: 6px solid red;
padding: 15px;
border-radius: 8px;
font-size: 20px;
font-weight: bold;
margin: 10px 0 20px 0;
}
</style>
""", unsafe_allow_html=True)