Skip to content

Commit 77cc5cb

Browse files
authored
docs tmp rendering fallingletters (#880)
- **place title + tag above demo on mobile** - **adjust horizontal spacing** - **cp logo for inline use + favicon**
2 parents fd5fd65 + 5f4b044 commit 77cc5cb

File tree

3 files changed

+32
-13
lines changed

3 files changed

+32
-13
lines changed

docs/.vitepress/config.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export default defineConfig({
5151
// { text: 'Home', link: '/' },
5252
// { text: 'Examples', link: '/markdown-examples' }
5353
],
54-
logo: './logo.svg',
54+
logo: '/logo.svg',
5555

5656
sidebar: [
5757
{

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

Lines changed: 22 additions & 12 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
}
@@ -132,7 +132,7 @@ const showStudySession = true;
132132
@media (min-width: 960px) {
133133
.main {
134134
order: 1;
135-
width: calc(55%); /* Adjusted to give more space to study session */
135+
width: calc(45%); /* Give more space to study session */
136136
}
137137
138138
.VPHero.has-study-session .main {
@@ -259,40 +259,42 @@ 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;
278-
width: calc(45%);
278+
width: calc(55%);
279279
}
280280
}
281281
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
@@ -311,10 +314,17 @@ const showStudySession = true;
311314
border-radius: 12px;
312315
padding: 2rem;
313316
width: 100%;
314-
max-width: 400px;
317+
max-width: 400px; /* Limit on mobile */
315318
text-align: center;
316319
}
317320
321+
@media (min-width: 960px) {
322+
.study-placeholder {
323+
max-width: none; /* Remove width limit on desktop */
324+
width: 100%; /* Take full available space */
325+
}
326+
}
327+
318328
.study-placeholder h3 {
319329
margin: 0 0 1rem 0;
320330
color: var(--vp-c-text-1);

docs/public/logo.svg

Lines changed: 9 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)