Photo Gallery

No notes defined.

<div class="sds-photoGallery sds-shadowInteraction" data-js-photo-gallery>
    <div class="sds-photoGallery__inner">
        <img class="sds-photoGallery__posterImg img-fluid" src="../../media/spuerkeess-site/components/timeline-story/timeline-story-img.png" alt="">
    </div>
    <div class="sds-photoGallery__btnWrapper">
        <button type="button" class="sds-photoGallery__triggerBtn stretched-link h1">
            <span class="sds-icon sds-icon-camera"></span>
            <span>12</span>
        </button>
    </div>
</div>
<div class="{{ namespace }}photoGallery {{ namespace }}shadowInteraction{% for mod in modifiers %} {{ mod }}{% endfor %}{% for mod in classes %} {{ mod }}{% endfor %}" data-js-photo-gallery>
	<div class="{{ namespace }}photoGallery__inner">
		<img class="{{ namespace }}photoGallery__posterImg img-fluid" src="{{ (mediaPath + "/spuerkeess-site/components/timeline-story/timeline-story-img.png") | path }}" alt="">
	</div>
	<div class="{{ namespace }}photoGallery__btnWrapper">
		<button type="button" class="{{ namespace }}photoGallery__triggerBtn stretched-link h1">
			<span class="{{ namespace }}icon {{ namespace }}icon-camera"></span>
			<span>12</span>
		</button>
	</div>
</div>
  • Handle: @spk-photo-gallery
  • Preview:
  • Filesystem Path: components/spuerkeess-site/organisms/photo-gallery/photo-gallery.njk
  • Content:
    // Include Lightbox
    import PhotoSwipe from 'photoswipe';
    export default class PhotoGallery {
    
    	constructor() {
    
    		this.firePhotoGallery();
    
    	}
    
    	firePhotoGallery() {
    
    		console.log("photo gallery")
    
    		const photoGalleries = document.querySelectorAll('[data-js-photo-gallery]');
    		const options = {
    			bgOpacity: 0.64,
    			zoom: false,
    			dataSource: [
    				{
    					src: "https://source.unsplash.com/Volo9FYUAzU/1620x1080"
    				},
    				{
    					src: "https://source.unsplash.com/RJzHlbKf6eY/1950x1300"
    				}
    			]
    		}
    		photoGalleries.forEach((el, i) => {
    			el.addEventListener("click", (e) => {
    				options.index = 0;
    				const pswp = new PhotoSwipe(options);
    				pswp.init();
    			})
    		});
    
    	}
    
    }
  • URL: /components/raw/spk-photo-gallery/PhotoGallery.js
  • Filesystem Path: components/spuerkeess-site/organisms/photo-gallery/PhotoGallery.js
  • Size: 688 Bytes
  • Content:
    /* variables specific to current element */
    
    $element-specific-variables: "";
    
    .#{$namespace}photoGallery {
    
    	/* Save root element context for easy access if nesting is needed */
    
    	$self: &;
    
    	/* properties of current element  + media queries */
    	position: relative;
    	display: flex;
    	align-items: flex-end;
    	justify-content: flex-end;
    	border-radius: map-deep-get($token-radius-map, "24");
    	background-color: transparent !important;
    
    	padding-bottom: 56.25%;
    	
    	@supports (aspect-ratio: auto) {
    
    		aspect-ratio: 16/9;
    		padding-bottom: 0;
    
    	}
    
    	/* Pseudo Elements */
    
    	&::before {
    
    
    
    	}
    
    	&::after {
    	}
    
    	/*
    	Include elements that are linked to the current element but have to reside at the root level of the stylesheet
    	(e.g: keyframes)
    	*/
    	@at-root {
    	}
    
    
    	/* children - write selector in full in comments in order to facilitate search */
    
    	&__inner,
    	&__posterImg {
    
    		position: absolute;
    		z-index: z("deepdivenegative");
    		top: 0;
    		left: 0;
    		width: 100%;
    		height: 100%;
    		border-radius: inherit;
    
    	}
    
    	&__inner {
    
    		&::before {
    			content: "";
    			@include custom-prop-fallback("background-color", "sys-color-background-primary-100");
    			opacity: 0;
    			position: absolute;
    			z-index: z("negative");
    			top: 0;
    			right: 0;
    			bottom: 0;
    			left: 0;
    			border-radius: inherit;
    			transition: opacity 0.15s linear;
    		}
    
    	}
    
    	// photoGallery__posterImg
    	&__posterImg {
    
    		// follows same logic as parent
    
    		object-fit: cover;
    
    	}
    
    	&__btnWrapper {
    
    		position: absolute;
    		top: 0;
    		left: 0;
    		width: 100%;
    		height: 100%;
    		padding: map-deep-get($token-spacer-inset-map, "md");
    		display: flex;
    		align-items: flex-end;
    		justify-content: flex-end;
    		
    		@include media-breakpoint-up("lg") {
    
    			padding: map-deep-get($token-spacer-inset-map, "lg");
    
    		}
    
    	}
    	
    	&__triggerBtn {
    
    
    		border-radius: map-deep-get($token-radius-map, "20");
    		@include custom-prop-fallback("background-color", "comp-button-secondary-inverse-background-color");
    		@include custom-prop-fallback("color", "comp-button-secondary-text-color");
    		display: flex;
    		align-items: center;
    		@include spacer-component-inline("sm");
    
    		padding: map-deep-get($token-spacer-inset-map, "md");
    
    		@include media-breakpoint-up("lg") {
    
    			border-radius: map-deep-get($token-radius-map, "24");
    			padding: map-deep-get($token-spacer-inset-map, "lg");
    			bottom: map-deep-get($token-spacer-inset-map, "lg");
    			right: map-deep-get($token-spacer-inset-map, "lg");
    
    		}
    
    		[class*="icon"] {
    			
    			&::before {
    
    				font-size: map-deep-get($token-sizes-unit-map, "40");
    
    				@include media-breakpoint-up("lg") {
    					font-size: map-deep-get($token-sizes-unit-map, "48");
    				}
    
    			}
    			
    		}
    
    		&:hover,
    		&:focus {
    			@media (hover: hover) {
    				@include custom-prop-fallback("background-color", "comp-button-secondary-hovered-background-color", true, true);
    			}
    		}
    
    		&:active,
    		&:focus-visible {
    
    			@include btn-interaction-base-outline();
    
    		}
    
    		&:active {
    
    			@include btn-interaction-active-outline();
    
    		}
    
    	}
    
    
    	/* modifiers */
    
    	// photoGallery -altStyle
    	&.-altStyle {
    
    		// follows same logic as base element
    
    	}
    
    	/* random parent element */
    	/* 
    	*
    	*   Syntax : .randomParentElt & {}
    	*
    	*/
    
    	/* Pseudo Classes */
    
    	&:hover {
    
    		@media (hover: hover) {
    
    			#{$self}__inner {
    
    				&::before {
    					opacity: 0.24;
    				}
    
    			}
    
    		}
    
    	}
    
    	&:focus {
    	}
    
    	&:active {
    	}
    
    	&:focus,
    	&:active {
    	}
    
    }
  • URL: /components/raw/spk-photo-gallery/_photo-gallery.scss
  • Filesystem Path: components/spuerkeess-site/organisms/photo-gallery/_photo-gallery.scss
  • Size: 3.4 KB