File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -364,14 +364,21 @@ h1 {
364364 margin-bottom : 2rem ;
365365}
366366
367+ .content-wrapper {
368+ max-width : 1600px ;
369+ margin : 0 auto;
370+ }
371+
367372.images-grid {
368373 display : grid;
369374 grid-template-columns : repeat (auto-fit, minmax (300px , 1fr ));
370375 gap : 2rem ;
371376 margin : 2rem 0 ;
372- max-width : 1400px ;
373- margin-left : auto;
374- margin-right : auto;
377+ }
378+
379+ /* When there's only one image and code, show side-by-side on large screens */
380+ .images-grid .single-image {
381+ grid-template-columns : 1fr ;
375382}
376383
377384.image-container {
380387 overflow : hidden;
381388 box-shadow : 0 4px 20px rgba (0 , 0 , 0 , 0.1 );
382389 transition : transform 0.3s ease;
383- max-height : 600 px ;
390+ max-height : 700 px ;
384391 display : flex;
385392 flex-direction : column;
386393}
392399.image-container img {
393400 width : 100% ;
394401 height : auto;
395- max-height : 550 px ;
402+ max-height : 650 px ;
396403 object-fit : contain;
397404 display : block;
398405 background : white;
@@ -412,9 +419,28 @@ h1 {
412419 border-radius : 10px ;
413420 padding : 2rem ;
414421 margin : 2rem 0 ;
415- max-width : 1400px ;
416- margin-left : auto;
417- margin-right : auto;
422+ }
423+
424+ /* Side-by-side layout for single image + code */
425+ .side-by-side-layout {
426+ display : grid;
427+ grid-template-columns : 1fr 1fr ;
428+ gap : 2rem ;
429+ margin : 2rem 0 ;
430+ align-items : start;
431+ }
432+
433+ .side-by-side-layout .image-container ,
434+ .side-by-side-layout .code-section {
435+ margin : 0 ;
436+ height : fit-content;
437+ }
438+
439+ /* Stack on medium screens */
440+ @media (max-width : 1200px ) {
441+ .side-by-side-layout {
442+ grid-template-columns : 1fr ;
443+ }
418444}
419445
420446.code-section h3 {
@@ -428,11 +454,11 @@ h1 {
428454 padding : 1.5rem ;
429455 border-radius : 8px ;
430456 font-family : 'Monaco' , 'Menlo' , monospace;
431- font-size : 0.9 rem ;
432- line-height : 1.6 ;
457+ font-size : 0.85 rem ;
458+ line-height : 1.5 ;
433459 white-space : pre-wrap;
434460 overflow-x : auto;
435- max-height : 600 px ;
461+ max-height : 700 px ;
436462 overflow-y : auto;
437463 font-weight : bold;
438464 scrollbar-width : thin;
You can’t perform that action at this time.
0 commit comments