Skip to content

Commit f1e4546

Browse files
Book Cover Fixed
Signed-off-by: Rajesh-Nagarajan-11 <[email protected]>
1 parent bccd684 commit f1e4546

File tree

1 file changed

+37
-17
lines changed

1 file changed

+37
-17
lines changed

src/sections/Community/Newcomers-guide/NewcomersPageWrapper.style.js

Lines changed: 37 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -120,13 +120,17 @@ export const NewcomersGuideWrapper = styled.section`
120120
}
121121
}
122122
.community-collage {
123-
text-align: center ;
123+
text-align: center;
124124
min-width: 45vmin;
125-
overflow: hidden; /* Prevent book from overflowing */
126-
125+
overflow: visible; /* Allow book to be fully visible */
126+
padding: 3rem 0; /* More padding to ensure content isn't cut off */
127+
position: relative;
128+
margin: 1rem auto;
127129
}
128130
.community-img{
129-
text-align:center;
131+
text-align: center;
132+
position: relative;
133+
z-index: 2;
130134
}
131135
.table-wrapper{
132136
text-align: center;
@@ -136,12 +140,18 @@ export const NewcomersGuideWrapper = styled.section`
136140
display: flex;
137141
align-items: center;
138142
justify-content: center;
139-
perspective: 600px;
143+
perspective: 1500px; /* Increased perspective for better 3D effect */
140144
max-width: 100%; /* Ensure it doesn't exceed container width */
141145
margin: 0 auto; /* Center the book */
146+
position: relative;
147+
z-index: 1;
148+
padding: 3rem 1rem; /* More padding all around */
149+
height: auto; /* Allow height to adjust based on content */
150+
min-height: 400px; /* Minimum height to ensure book fits */
142151
143152
@media (max-width: 992px) {
144153
margin-bottom: 2rem; /* Add space between book and text on mobile */
154+
perspective: 1200px; /* Slightly reduced perspective for mobile */
145155
}
146156
}
147157
@@ -150,7 +160,7 @@ export const NewcomersGuideWrapper = styled.section`
150160
transform: rotateY(0deg);
151161
}
152162
100% {
153-
transform: rotateY(-30deg);
163+
transform: rotateY(-20deg);
154164
}
155165
}
156166
@@ -159,15 +169,16 @@ export const NewcomersGuideWrapper = styled.section`
159169
}
160170
161171
.book {
162-
min-width: 200px;
163-
min-height: 300px;
172+
width: 250px; /* Even wider to prevent text cutoff */
173+
height: 350px; /* Even taller to ensure full content visibility */
164174
position: relative;
165175
transform-style: preserve-3d;
166-
transform: rotateY(-30deg);
176+
transform: rotateY(-20deg); /* Less rotation to show more of the cover */
167177
transition: 1s ease;
168178
animation: 1s ease 0s 1 initAnimation;
169179
margin: 0 auto; /* Center the book */
170-
max-width: 200px; /* Ensure it doesn't exceed expected width */
180+
display: block;
181+
transform-origin: center;
171182
}
172183
173184
.book:hover {
@@ -179,10 +190,11 @@ export const NewcomersGuideWrapper = styled.section`
179190
top: 0;
180191
left: 0;
181192
background-color: #171a12;
182-
width: 200px;
183-
height: 300px;
193+
width: 250px;
194+
height: 350px;
184195
transform: translateZ(25px);
185196
border-radius: 0 2px 2px 0;
197+
background-size: 100% 100%; /* Make sure image content covers the entire front cover */
186198
}
187199
188200
.book::before {
@@ -191,8 +203,8 @@ export const NewcomersGuideWrapper = styled.section`
191203
left: 0;
192204
top: 3px;
193205
width: 48px;
194-
height: 294px;
195-
transform: translateX(172px) rotateY(90deg);
206+
height: 344px; /* Adjusted to match new height */
207+
transform: translateX(222px) rotateY(90deg); /* Adjusted to match new width */
196208
background: linear-gradient(
197209
90deg,
198210
#fff 0%,
@@ -224,12 +236,20 @@ export const NewcomersGuideWrapper = styled.section`
224236
top: 0;
225237
left: 0;
226238
content: " ";
227-
width: 200px;
228-
height: 300px;
239+
width: 250px; /* Match new width */
240+
height: 350px; /* Match new height */
229241
transform: translateZ(-25px);
230242
background-color: #292929;
231243
border-radius: 0 2px 2px 0;
232-
box-shadow: -2px 1px 30px 2px #666;
244+
box-shadow: -8px 3px 30px 5px rgba(0, 0, 0, 0.5); /* Enhanced shadow */
245+
}
246+
247+
/* Fix to ensure the image on the book cover is displayed fully */
248+
.book img {
249+
width: 100%;
250+
height: 100%;
251+
object-fit: cover;
252+
border-radius: 0 2px 2px 0;
233253
}
234254
@media only screen and (max-width: 991px) {
235255
.heading-start {

0 commit comments

Comments
 (0)