Skip to content

Commit bcf4d97

Browse files
committed
Added new css
1 parent 0ae3693 commit bcf4d97

1 file changed

Lines changed: 58 additions & 70 deletions

File tree

styles.css

Lines changed: 58 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -307,12 +307,12 @@ h1 {
307307
font-style: italic;
308308
}
309309

310+
/* ===== GENERATED PAGE STYLES ===== */
311+
310312
.generated-page {
311313
background: white;
312314
min-height: 100vh;
313315
padding: 2rem;
314-
overflow-x: hidden;
315-
width: 100%;
316316
}
317317

318318
.nav-buttons {
@@ -351,6 +351,11 @@ h1 {
351351
box-shadow: 0 4px 12px rgba(0,0,0,0.2);
352352
}
353353

354+
.content-wrapper {
355+
max-width: 1600px;
356+
margin: 0 auto;
357+
}
358+
354359
.page-title {
355360
font-size: 2.5rem;
356361
color: #2d3748;
@@ -365,47 +370,51 @@ h1 {
365370
margin-bottom: 2rem;
366371
}
367372

368-
.content-wrapper {
369-
max-width: 1600px;
370-
margin: 0 auto;
371-
width: 100%;
372-
padding: 0 2rem;
373+
/* ===== SIDE-BY-SIDE LAYOUT ===== */
374+
375+
.side-by-side-layout {
376+
display: grid;
377+
grid-template-columns: 1fr 1fr;
378+
gap: 2rem;
379+
margin: 2rem auto;
380+
max-width: 100%;
373381
}
374382

383+
/* ===== STANDARD IMAGES GRID (for multiple images) ===== */
384+
375385
.images-grid {
376386
display: grid;
377-
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
387+
grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
378388
gap: 2rem;
379-
margin: 2rem 0;
389+
margin: 2rem auto;
390+
max-width: 100%;
380391
}
381392

382-
/* When there's only one image and code, show side-by-side on large screens */
383393
.images-grid.single-image {
384394
grid-template-columns: 1fr;
395+
max-width: 800px;
385396
}
386397

398+
/* ===== IMAGE CONTAINER ===== */
399+
387400
.image-container {
388401
border: 1px solid #e2e8f0;
389402
border-radius: 10px;
390403
overflow: hidden;
391404
box-shadow: 0 4px 20px rgba(0,0,0,0.1);
392405
transition: transform 0.3s ease;
393-
max-height: 700px;
394-
display: flex;
395-
flex-direction: column;
406+
background: white;
396407
}
397408

398409
.image-container:hover {
399410
transform: translateY(-5px);
411+
box-shadow: 0 6px 25px rgba(0,0,0,0.15);
400412
}
401413

402414
.image-container img {
403415
width: 100%;
404416
height: auto;
405-
max-height: 650px;
406-
object-fit: contain;
407417
display: block;
408-
background: white;
409418
}
410419

411420
.image-caption {
@@ -414,54 +423,24 @@ h1 {
414423
font-size: 0.9rem;
415424
color: #666;
416425
text-align: center;
426+
border-top: 1px solid #e2e8f0;
417427
}
418428

429+
/* ===== CODE SECTION ===== */
430+
419431
.code-section {
420432
background: #f8fafc;
421433
border: 1px solid #e2e8f0;
422434
border-radius: 10px;
423435
padding: 2rem;
424-
margin: 2rem 0;
425-
}
426-
427-
/* Side-by-side layout for single image + code */
428-
.side-by-side-layout {
429-
display: grid;
430-
grid-template-columns: 45% 55%;
431-
gap: 2rem;
432-
margin: 2rem 0;
433-
align-items: start;
434-
width: 100%;
435-
}
436-
437-
.side-by-side-layout .image-container {
438-
margin: 0;
439-
height: fit-content;
440-
max-height: none;
441-
min-width: 0;
442-
}
443-
444-
.side-by-side-layout .image-container img {
445-
max-height: none;
446-
width: 100%;
447-
}
448-
449-
.side-by-side-layout .code-section {
450-
margin: 0;
451-
height: fit-content;
452-
min-width: 0;
453-
}
454-
455-
/* Stack on medium screens */
456-
@media (max-width: 1200px) {
457-
.side-by-side-layout {
458-
grid-template-columns: 1fr;
459-
}
436+
margin: 2rem auto;
437+
max-width: 100%;
460438
}
461439

462440
.code-section h3 {
463441
margin-bottom: 1rem;
464442
color: #2d3748;
443+
font-size: 1.3rem;
465444
}
466445

467446
.code-content {
@@ -470,42 +449,49 @@ h1 {
470449
padding: 1.5rem;
471450
border-radius: 8px;
472451
font-family: 'Monaco', 'Menlo', monospace;
473-
font-size: 0.88rem;
474-
line-height: 1.5;
475-
white-space: pre-wrap;
452+
font-size: 0.9rem;
453+
line-height: 1.6;
476454
overflow-x: auto;
477-
font-weight: normal;
478-
scrollbar-width: thin;
479-
scrollbar-color: #475569 #1e293b;
480-
max-height: 700px;
481455
overflow-y: auto;
456+
max-height: 600px;
482457
}
483458

484-
/* Remove max-height when IN side-by-side layout */
485-
.side-by-side-layout .code-content {
486-
max-height: none;
487-
overflow-y: visible;
459+
.code-content pre {
460+
margin: 0;
488461
}
489462

490463
.code-content::-webkit-scrollbar {
491-
width: 8px;
492-
height: 8px;
464+
width: 10px;
465+
height: 10px;
493466
}
494467

495468
.code-content::-webkit-scrollbar-track {
496-
background: #1e293b;
497-
border-radius: 4px;
469+
background: #0f172a;
498470
}
499471

500472
.code-content::-webkit-scrollbar-thumb {
501473
background: #475569;
502-
border-radius: 4px;
474+
border-radius: 5px;
503475
}
504476

505477
.code-content::-webkit-scrollbar-thumb:hover {
506478
background: #64748b;
507479
}
508480

481+
/* Remove height restriction for side-by-side code */
482+
.side-by-side-layout .code-content {
483+
max-height: none;
484+
overflow-y: visible;
485+
}
486+
487+
/* ===== RESPONSIVE ===== */
488+
489+
@media (max-width: 1400px) {
490+
.side-by-side-layout {
491+
grid-template-columns: 1fr;
492+
}
493+
}
494+
509495
@media (max-width: 768px) {
510496
.container {
511497
padding: 1rem;
@@ -516,11 +502,9 @@ h1 {
516502
position: fixed;
517503
top: 1rem;
518504
right: 1rem;
519-
left: auto;
520505
padding: 0.6rem 1rem;
521506
font-size: 0.8rem;
522507
border-radius: 20px;
523-
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
524508
}
525509

526510
.portfolio-link::before {
@@ -554,4 +538,8 @@ h1 {
554538
.page-title {
555539
font-size: 2rem;
556540
}
541+
542+
.generated-page {
543+
padding: 1rem;
544+
}
557545
}

0 commit comments

Comments
 (0)