Skip to content

Commit 132bdeb

Browse files
Added hover animations to the home page and movie_analysis
1 parent ea3eb7c commit 132bdeb

File tree

2 files changed

+36
-1
lines changed

2 files changed

+36
-1
lines changed

Web_app/Home_Page.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,23 @@
44
page_title="Home Page",
55
page_icon="👋",
66
)
7+
# Adding custom CSS for hover effect
8+
st.markdown(
9+
"""
10+
<style>
11+
.hover-effect {
12+
transition: transform 0.2s; /* Animation */
13+
}
14+
.hover-effect:hover {
15+
transform: scale(1.05); /* Scale up the element */
16+
color: #FFD700; /* Change color on hover */
17+
}
18+
</style>
19+
""",
20+
unsafe_allow_html=True
21+
)
722

8-
st.write("# Welcome to Movie Review Analysis and Recommendation System 👋")
23+
st.write("<h1 class='hover-effect'>Welcome to Movie Review Analysis and Recommendation System 👋</h1>", unsafe_allow_html=True)
924

1025
st.sidebar.success("Select above part.")
1126

Web_app/pages/1_Movie_Analysis.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,26 @@
3333
.line {
3434
margin: 20px 0;
3535
}
36+
37+
/* Add hover effects */
38+
.stButton:hover {
39+
background-color: #FFD700; /* Change background color on hover */
40+
color: #fff; /* Change text color on hover */
41+
transition: background-color 0.3s ease, color 0.3s ease; /* Smooth transition */
42+
}
43+
44+
.stFileUploader:hover {
45+
border: 2px dashed #FFD700; /* Change border on hover */
46+
}
47+
48+
/* Example for additional hover effects on specific elements */
49+
.hover-effect {
50+
transition: transform 0.3s ease;
51+
}
52+
53+
.hover-effect:hover {
54+
transform: scale(1.05); /* Scale up on hover */
55+
}
3656
</style>
3757
""", unsafe_allow_html=True)
3858

0 commit comments

Comments
 (0)