-
-
Save artursopelnik/53ad98b3d2580d559906e02163753ca0 to your computer and use it in GitHub Desktop.
Revisions
-
blackspike revised this gist
Nov 23, 2024 . 1 changed file with 56 additions and 45 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,13 +5,24 @@ const { files, dir, id } = Astro.props --- <section class="glightbox-images" id={`gallery-${id || 1}`}> { files.map((f) => ( <a href={`/lightboxes/${dir}/large/${f.file}`} class="glightbox glightbox-link" data-gallery={`gallery-${id || 1}`} data-title={f.title ?? null} data-description={f.description ?? null}> <img src={`/lightboxes/${dir}/thumbs/${f.file}`} alt={f.alt} class="glightbox-image" loading="lazy" /> </a> )) } </section> <script> @@ -23,49 +34,49 @@ const { files, dir, id } = Astro.props </script> <style> .glightbox-images { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(12rem, 100%), 1fr)); *, *::after, *::before { all: unset; font-size: 1rem; } } .glightbox-link { block-size: 100%; border-radius: 1rem; overflow: hidden; inline-size: 100%; aspect-ratio: 1/1; object-fit: contain; } .glightbox-image { aspect-ratio: 1/1; block-size: 100%; inline-size: 100%; object-fit: cover; } </style> <style is:global> /* Overrides */ .gslide-description { background-color: #1c1e1f !important; color: #d2d2d2 !important; } .gslide-title { color: #fff !important; } .gslide-title { margin-bottom: 0 !important; } .gslide-title + .gslide-desc { margin-top: 12px !important; } </style> -
blackspike revised this gist
Nov 23, 2024 . 1 changed file with 24 additions and 17 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,35 +1,25 @@ --- import 'glightbox/dist/css/glightbox.css' const { files, dir, id } = Astro.props --- <section class="glightbox-images" id={`gallery-${id || 1}`}> { files.map((f) => ( <a href={`/lightboxes/${dir}/large/${f.file}`} class="glightbox glightbox-link" data-gallery={`gallery-${id || 1}`} data-title={f.title ?? null} data-description={f.description ?? null}> <img src={`/lightboxes/${dir}/thumbs/${f.file}`} alt={f.alt} class="glightbox-image" loading="lazy" /> </a> )) } </section> <script> import GLightbox from 'glightbox' const lightbox = GLightbox({ selector: '.glightbox', }) </script> <style> @@ -62,3 +52,20 @@ const { files, dir, id } = Astro.props; object-fit: cover; } </style> <style is:global> /* Overrides */ .gslide-description { background-color: #1c1e1f !important; color: #d2d2d2 !important; } .gslide-title { color: #fff !important; } .gslide-title { margin-bottom: 0 !important; } .gslide-title + .gslide-desc { margin-top: 12px !important; } </style> -
blackspike renamed this gist
Nov 23, 2024 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
blackspike revised this gist
Nov 23, 2024 . 1 changed file with 5 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,20 +1,21 @@ --- import "glightbox/dist/css/glightbox.css"; const { files, dir, id } = Astro.props; --- <section class="glightbox-images" id={`gallery-${id || 1}`}> { files.map((f) => ( <a href={`/lightboxes/${dir}/large/${f.file}`} class="glightbox glightbox-link" data-gallery={`gallery-${id || 1}`} data-title={f.title ?? null} > <img src={`/lightboxes/${dir}/thumbs/${f.file}`} alt={f.alt} class="glightbox-image" loading="lazy" /> @@ -33,7 +34,6 @@ const { files, dir } = Astro.props; <style> .glightbox-images { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(12rem, 100%), 1fr)); -
blackspike revised this gist
Nov 20, 2024 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -41,8 +41,8 @@ const { files, dir } = Astro.props; *, *::after, *::before { all: unset; font-size: 1rem; } } -
blackspike created this gist
Nov 20, 2024 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,64 @@ --- import "glightbox/dist/css/glightbox.css"; const { files, dir } = Astro.props; --- <section id="lightbox" class="glightbox-images"> { files.map((f) => ( <a href={`/lightboxes/${dir}/large/${f.file}`} class="glightbox glightbox-link" data-gallery="gallery-1" > <img src={`/lightboxes/${dir}/thumbs/${f.file}`} alt={f.title} class="glightbox-image" loading="lazy" /> </a> )) } </section> <script> import GLightbox from "glightbox"; const lightbox = GLightbox({ selector: ".glightbox", }); </script> <style> .glightbox-images { align-items: center; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(12rem, 100%), 1fr)); *, *::after, *::before { font-size: 1rem; all: unset; } } .glightbox-link { block-size: 100%; border-radius: 1rem; overflow: hidden; inline-size: 100%; aspect-ratio: 1/1; object-fit: contain; } .glightbox-image { aspect-ratio: 1/1; block-size: 100%; inline-size: 100%; object-fit: cover; } </style>