@@ -22,14 +22,16 @@ Photographs from the Birol Labs over the years, including lab gatherings, confer
2222
2323.gallery {
2424 display : grid ;
25- grid-template-columns : repeat (auto-fill , minmax (220 px , 1fr ));
26- gap : 1 rem ;
25+ grid-template-columns : repeat (auto-fit , minmax (280 px , 1fr ));
26+ gap : 1.5 rem ;
2727}
2828
2929.gallery figure img {
3030 width : 100% ;
31- height : 180px ;
32- object-fit : cover ;
31+ height : auto ;
32+ display : block ;
33+ border : 1px solid #ddd ;
34+ border-radius : 6px ;
3335}
3436
3537.gallery figcaption {
@@ -39,52 +41,6 @@ Photographs from the Birol Labs over the years, including lab gatherings, confer
3941 color : #666 ;
4042}
4143
42- /* ---------- LIGHTBOX ---------- */
43-
44- .lightbox {
45- display : none ;
46- position : fixed ;
47- z-index : 9999 ;
48- left : 0 ;
49- top : 0 ;
50- width : 100% ;
51- height : 100% ;
52- background : rgba (0 ,0 ,0 ,0.85 );
53- align-items : center ;
54- justify-content : center ;
55- flex-direction : column ;
56- padding : 2rem ;
57- }
58-
59- .lightbox.open {
60- display : flex ;
61- }
62-
63- .lightbox-img {
64- max-width : 90% ;
65- max-height : 80vh ;
66- border-radius : 6px ;
67- box-shadow : 0 10px 40px rgba (0 ,0 ,0 ,0.5 );
68- }
69-
70- .lightbox-caption {
71- margin-top : 1rem ;
72- color : #fff ;
73- font-size : 0.95rem ;
74- text-align : center ;
75- max-width : 80% ;
76- }
77-
78- .lightbox-close {
79- position : absolute ;
80- top : 20px ;
81- right : 30px ;
82- font-size : 2rem ;
83- color : #fff ;
84- cursor : pointer ;
85- user-select : none ;
86- }
87-
8844</style >
8945
9046<div class =" gallery-section " >
@@ -226,54 +182,3 @@ Photographs from the Birol Labs over the years, including lab gatherings, confer
226182
227183</div >
228184
229- <!-- Lightbox Overlay -->
230- <div id =" lightbox " class =" lightbox " aria-hidden =" true " >
231- <span class="lightbox-close" id="lightbox-close">×</span>
232- <img id="lightbox-img" class="lightbox-img" src="" alt="">
233- <div id="lightbox-caption" class="lightbox-caption"></div>
234- </div >
235-
236- <script >
237- document .addEventListener (" DOMContentLoaded" , function () {
238- const lightbox = document .getElementById (" lightbox" );
239- const lightboxImg = document .getElementById (" lightbox-img" );
240- const lightboxCaption = document .getElementById (" lightbox-caption" );
241- const closeBtn = document .getElementById (" lightbox-close" );
242-
243- // Attach click handlers to all gallery links
244- document .querySelectorAll (" .gallery a" ).forEach (link => {
245- link .addEventListener (" click" , function (e ) {
246- e .preventDefault ();
247-
248- const img = this .querySelector (" img" );
249- const href = this .getAttribute (" href" );
250-
251- lightboxImg .src = href;
252- lightboxImg .alt = img .alt || " " ;
253- lightboxCaption .textContent =
254- this .nextElementSibling ? .textContent ||
255- img .alt ||
256- " " ;
257-
258- lightbox .classList .add (" open" );
259- lightbox .setAttribute (" aria-hidden" , " false" );
260- });
261- });
262-
263- function closeLightbox () {
264- lightbox .classList .remove (" open" );
265- lightbox .setAttribute (" aria-hidden" , " true" );
266- lightboxImg .src = " " ;
267- }
268-
269- closeBtn .addEventListener (" click" , closeLightbox);
270-
271- lightbox .addEventListener (" click" , function (e ) {
272- if (e .target === lightbox) closeLightbox ();
273- });
274-
275- document .addEventListener (" keydown" , function (e ) {
276- if (e .key === " Escape" ) closeLightbox ();
277- });
278- });
279- < / script>
0 commit comments