Skip to content

Commit eb08c26

Browse files
Fixed Spacing and improved Handbook 3D
Signed-off-by: Rajesh-Nagarajan-11 <[email protected]>
1 parent e8b22fb commit eb08c26

File tree

2 files changed

+29
-24
lines changed

2 files changed

+29
-24
lines changed

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

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,9 @@ export const NewcomersGuideWrapper = styled.section`
123123
text-align: center;
124124
min-width: 45vmin;
125125
overflow: visible; /* Allow book to be fully visible */
126-
padding: 3rem 0; /* More padding to ensure content isn't cut off */
126+
padding: 0; /* No padding */
127127
position: relative;
128-
margin: 1rem auto;
128+
margin: 0 auto;
129129
}
130130
.community-img{
131131
text-align: center;
@@ -134,24 +134,27 @@ export const NewcomersGuideWrapper = styled.section`
134134
}
135135
.table-wrapper{
136136
text-align: center;
137-
margin-bottom: 4rem;
137+
margin-top: 0; /* No top margin */
138+
margin-bottom: 2rem; /* Reduced bottom margin */
138139
}
139140
.book-container {
140141
display: flex;
141142
align-items: center;
142143
justify-content: center;
143-
perspective: 1500px; /* Increased perspective for better 3D effect */
144+
perspective: 1500px; /* Perspective for 3D effect */
144145
max-width: 100%; /* Ensure it doesn't exceed container width */
145-
margin: 0 auto; /* Center the book */
146+
margin: 0 auto -10px; /* Adjusted to leave just 1 point of space below */
146147
position: relative;
147148
z-index: 1;
148-
padding: 3rem 1rem; /* More padding all around */
149+
padding: 0; /* No padding */
149150
height: auto; /* Allow height to adjust based on content */
150-
min-height: 400px; /* Minimum height to ensure book fits */
151+
min-height: 300px; /* Further reduced minimum height */
151152
152153
@media (max-width: 992px) {
153-
margin-bottom: 2rem; /* Add space between book and text on mobile */
154+
margin-bottom: 0.5rem; /* Minimal space between book and text on mobile */
154155
perspective: 1200px; /* Slightly reduced perspective for mobile */
156+
width: 100%; /* Ensure it takes full width available */
157+
overflow: hidden; /* Prevent overflow on mobile */
155158
}
156159
}
157160
@@ -160,7 +163,7 @@ export const NewcomersGuideWrapper = styled.section`
160163
transform: rotateY(0deg);
161164
}
162165
100% {
163-
transform: rotateY(-20deg);
166+
transform: rotateY(-30deg);
164167
}
165168
}
166169
@@ -169,16 +172,13 @@ export const NewcomersGuideWrapper = styled.section`
169172
}
170173
171174
.book {
172-
width: 250px; /* Even wider to prevent text cutoff */
173-
height: 350px; /* Even taller to ensure full content visibility */
175+
min-width: 200px;
176+
min-height: 300px;
174177
position: relative;
175178
transform-style: preserve-3d;
176-
transform: rotateY(-20deg); /* Less rotation to show more of the cover */
179+
transform: rotateY(-30deg);
177180
transition: 1s ease;
178181
animation: 1s ease 0s 1 initAnimation;
179-
margin: 0 auto; /* Center the book */
180-
display: block;
181-
transform-origin: center;
182182
}
183183
184184
.book:hover {
@@ -190,8 +190,8 @@ export const NewcomersGuideWrapper = styled.section`
190190
top: 0;
191191
left: 0;
192192
background-color: #171a12;
193-
width: 250px;
194-
height: 350px;
193+
width: 220px;
194+
height: 320px;
195195
transform: translateZ(25px);
196196
border-radius: 0 2px 2px 0;
197197
background-size: 100% 100%; /* Make sure image content covers the entire front cover */
@@ -203,8 +203,8 @@ export const NewcomersGuideWrapper = styled.section`
203203
left: 0;
204204
top: 3px;
205205
width: 48px;
206-
height: 344px; /* Adjusted to match new height */
207-
transform: translateX(222px) rotateY(90deg); /* Adjusted to match new width */
206+
height: 314px; /* Adjusted to match reduced height */
207+
transform: translateX(192px) rotateY(90deg); /* Adjusted to match reduced width */
208208
background: linear-gradient(
209209
90deg,
210210
#fff 0%,
@@ -236,12 +236,12 @@ export const NewcomersGuideWrapper = styled.section`
236236
top: 0;
237237
left: 0;
238238
content: " ";
239-
width: 250px; /* Match new width */
240-
height: 350px; /* Match new height */
239+
width: 220px; /* Match reduced width */
240+
height: 320px; /* Match reduced height */
241241
transform: translateZ(-25px);
242242
background-color: #292929;
243243
border-radius: 0 2px 2px 0;
244-
box-shadow: -8px 3px 30px 5px rgba(0, 0, 0, 0.5); /* Enhanced shadow */
244+
box-shadow: -10px 5px 15px 5px rgba(0, 0, 0, 0.5); /* Enhanced shadow for better 3D effect */
245245
}
246246
247247
/* Fix to ensure the image on the book cover is displayed fully */
@@ -251,6 +251,11 @@ export const NewcomersGuideWrapper = styled.section`
251251
object-fit: cover;
252252
border-radius: 0 2px 2px 0;
253253
}
254+
255+
/* Reduce spacing for the "While Your Issue is Under Review" section */
256+
h1, h2, h3 {
257+
margin-top: 0.5rem; /* Minimize top margin for headings */
258+
}
254259
@media only screen and (max-width: 991px) {
255260
.heading-start {
256261
margin-left: auto; margin-right: auto;

src/sections/Community/Newcomers-guide/newcomers-map.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const NewcomersMapWrapper = styled.div`
2121
#newcomers-guide {
2222
path {
2323
fill: ${(props) =>
24-
props.handleHover
24+
props.$handleHover
2525
? (props) => props.theme.secondaryColor
2626
: "#3c494e"};
2727
transition: 0.5s;
@@ -37,7 +37,7 @@ const NewcomersMapWrapper = styled.div`
3737

3838
const NewcomersMap = ({ handleMouseHover = false }) => {
3939
return (
40-
<NewcomersMapWrapper handleHover={handleMouseHover}>
40+
<NewcomersMapWrapper $handleHover={handleMouseHover}>
4141
<svg
4242
id="Layer_1"
4343
data-name="Layer 1"

0 commit comments

Comments
 (0)