Skip to content

Commit 6a00584

Browse files
committed
place title + tag above demo on mobile
1 parent 701570e commit 6a00584

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

docs/.vitepress/theme/components/CustomVPHero.vue

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ const showStudySession = true;
114114
.main {
115115
position: relative;
116116
z-index: 10;
117-
order: 2;
117+
order: 1; /* Text comes first on mobile */
118118
flex-grow: 1;
119119
flex-shrink: 0;
120120
}
@@ -259,20 +259,20 @@ const showStudySession = true;
259259
260260
/* Study Session Styles - replaces image styles */
261261
.study-session {
262-
order: 1;
263-
margin: -76px -24px -48px;
262+
order: 2; /* Place below text on mobile */
263+
margin: 2rem -24px 0; /* Add top margin, remove negative margins that cause overlay */
264264
}
265265
266266
@media (min-width: 640px) {
267267
.study-session {
268-
margin: -108px -24px -48px;
268+
margin: 2rem -24px 0; /* Keep positive margin on tablet */
269269
}
270270
}
271271
272272
@media (min-width: 960px) {
273273
.study-session {
274274
flex-grow: 1;
275-
order: 2;
275+
order: 2; /* Keep on right side on desktop */
276276
margin: 0;
277277
min-height: 400px;
278278
width: calc(45%);
@@ -282,17 +282,19 @@ const showStudySession = true;
282282
.study-session-container {
283283
position: relative;
284284
margin: 0 auto;
285-
width: 320px;
286-
height: 320px;
285+
width: 100%;
286+
max-width: 400px;
287+
min-height: 280px; /* Reduced height for mobile */
287288
display: flex;
288289
align-items: center;
289290
justify-content: center;
291+
padding: 1rem; /* Add padding to prevent edge clipping */
290292
}
291293
292294
@media (min-width: 640px) {
293295
.study-session-container {
294-
width: 392px;
295-
height: 392px;
296+
max-width: 450px;
297+
min-height: 320px;
296298
}
297299
}
298300
@@ -301,6 +303,7 @@ const showStudySession = true;
301303
width: 100%;
302304
height: 100%;
303305
min-height: 400px;
306+
padding: 0; /* Remove padding on desktop */
304307
}
305308
}
306309

0 commit comments

Comments
 (0)