ronakreddy18 commited on
Commit
397d388
·
verified ·
1 Parent(s): 5048fcf

Update pages/introds.py

Browse files
Files changed (1) hide show
  1. pages/introds.py +41 -32
pages/introds.py CHANGED
@@ -1,53 +1,56 @@
1
  import streamlit as st
2
 
3
- # Custom CSS for styling and background
4
- custom_css = """
 
 
 
 
 
 
 
 
 
5
  <style>
6
- html, body, [data-testid="stAppViewContainer"] {
7
  background: linear-gradient(
8
  rgba(0, 0, 0, 0.6),
9
  rgba(0, 0, 0, 0.6)
10
  ),
11
- url("https://cdn.pixabay.com/photo/2024/01/29/22/47/ai-generated-8540915_1280.jpg") no-repeat center center fixed;
12
  background-size: cover;
13
  font-family: Arial, sans-serif;
14
  color: #ffffff;
15
- }
16
- h1 {
17
  color: #ffffff;
18
  text-align: center;
19
- font-size: 3rem;
20
- margin-top: 20px;
21
- text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.7);
22
- }
23
- .division {
24
  margin: 20px auto;
25
- padding: 30px;
26
- background: rgba(255, 255, 255, 0.2);
27
- border-radius: 15px;
28
- box-shadow: 0 6px 8px rgba(0, 0, 0, 0.2);
29
- }
30
- .division h2 {
31
  color: #ffffff;
32
- margin-bottom: 15px;
33
- font-size: 2.2rem;
34
- text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
35
- }
36
- .division p, .division ul li {
37
- font-size: 1.2rem;
38
- line-height: 1.8;
39
- color: #e0e0e0;
40
- }
41
- .division ul li {
42
  margin-bottom: 10px;
43
- }
 
 
 
 
 
 
44
  </style>
45
  """
46
 
47
- # Inject the CSS styles
48
- st.markdown(custom_css, unsafe_allow_html=True)
49
-
50
- # Header section
51
  st.markdown("<h1>Welcome to Data Science Introduction</h1>", unsafe_allow_html=True)
52
 
53
  # Main content
@@ -82,3 +85,9 @@ st.markdown(
82
  """,
83
  unsafe_allow_html=True
84
  )
 
 
 
 
 
 
 
1
  import streamlit as st
2
 
3
+ # Background options
4
+ bg_options = [
5
+ "https://cdn.pixabay.com/photo/2024/01/29/22/47/ai-generated-8540915_1280.jpg",
6
+ "https://cdn.pixabay.com/photo/2023/11/23/17/47/sunset-7704533_1280.jpg"
7
+ ]
8
+
9
+ # Background selection dropdown
10
+ selected_bg = st.selectbox("Choose a Background:", bg_options)
11
+
12
+ # Dynamic CSS based on the selected background
13
+ custom_css = f"""
14
  <style>
15
+ html, body, [data-testid="stAppViewContainer"] {{
16
  background: linear-gradient(
17
  rgba(0, 0, 0, 0.6),
18
  rgba(0, 0, 0, 0.6)
19
  ),
20
+ url("{selected_bg}") no-repeat center center fixed;
21
  background-size: cover;
22
  font-family: Arial, sans-serif;
23
  color: #ffffff;
24
+ }}
25
+ h1 {{
26
  color: #ffffff;
27
  text-align: center;
28
+ font-size: 2rem;
29
+ margin-top: 2px;
30
+ text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
31
+ }}
32
+ .division {{
33
  margin: 20px auto;
34
+ padding: 20px;
35
+ background: rgba(255, 255, 255, 0.1);
36
+ border-radius: 10px;
37
+ box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
38
+ }}
39
+ .division h2 {{
40
  color: #ffffff;
 
 
 
 
 
 
 
 
 
 
41
  margin-bottom: 10px;
42
+ font-size: 2rem;
43
+ text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
44
+ }}
45
+ .division p, .division ul li {{
46
+ font-size: 1.2rem;
47
+ line-height: 1.7;
48
+ }}
49
  </style>
50
  """
51
 
52
+ # Inject CSS into Streamlit app
53
+ st.markdown(custom_css, unsafe_allow_html=True)# Header section
 
 
54
  st.markdown("<h1>Welcome to Data Science Introduction</h1>", unsafe_allow_html=True)
55
 
56
  # Main content
 
85
  """,
86
  unsafe_allow_html=True
87
  )
88
+
89
+
90
+
91
+
92
+
93
+