diff --git a/force-app/main/default/aura/PictureCarousel/PictureCarousel.cmp b/force-app/main/default/aura/PictureCarousel/PictureCarousel.cmp new file mode 100644 index 0000000..97c1692 --- /dev/null +++ b/force-app/main/default/aura/PictureCarousel/PictureCarousel.cmp @@ -0,0 +1,24 @@ + + + + + + + + \ No newline at end of file diff --git a/force-app/main/default/aura/PictureCarousel/PictureCarousel.cmp-meta.xml b/force-app/main/default/aura/PictureCarousel/PictureCarousel.cmp-meta.xml new file mode 100644 index 0000000..ccfb7ad --- /dev/null +++ b/force-app/main/default/aura/PictureCarousel/PictureCarousel.cmp-meta.xml @@ -0,0 +1,5 @@ + + + 47.0 + A Lightning Component Bundle + diff --git a/force-app/main/default/aura/PictureCarousel/PictureCarousel.css b/force-app/main/default/aura/PictureCarousel/PictureCarousel.css new file mode 100644 index 0000000..b559c96 --- /dev/null +++ b/force-app/main/default/aura/PictureCarousel/PictureCarousel.css @@ -0,0 +1,57 @@ +.THIS { + position: relative; + width: 100%; + height: 100%; + overflow: hidden; +} + +.THIS * { + box-sizing: border-box; +} + +.THIS .filmstrip { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); + transition: all .5s ease-in-out; + height: 100%; + display: inline-block; + white-space: nowrap; +} + +.THIS .slide { + height: 100%; + display: inline-block; + background-size: cover; + background-repeat: no-repeat; + background-position: center; +} + +.THIS .btn { + position: absolute; +} + +.THIS .btn.next { + top: 44%; + right: 6px; +} + +.THIS .btn.prev { + top: 44%; + left: 6px; +} + +.THIS .btn.fullscreen, +.THIS .btn.close +{ + bottom: 0; + left: 0; +} + +.THIS .btn.x-large .slds-button { + width: 3.5rem; + height: 3.5rem; +} +.THIS .btn.x-large .slds-button__icon { + width: 1.7rem; + height: 1.7rem; +} \ No newline at end of file diff --git a/force-app/main/default/aura/PictureCarousel/PictureCarouselController.js b/force-app/main/default/aura/PictureCarousel/PictureCarouselController.js new file mode 100644 index 0000000..2c01cf3 --- /dev/null +++ b/force-app/main/default/aura/PictureCarousel/PictureCarouselController.js @@ -0,0 +1,19 @@ +({ + next: function(component) { + var slideIndex = component.get("v.slideIndex"); + var slides = component.get("v.slides"); + if (slideIndex + 1 < slides.length) { + slideIndex = slideIndex + 1; + component.set("v.slideIndex", slideIndex); + } + }, + + prev: function(component) { + var slideIndex = component.get("v.slideIndex"); + if (slideIndex > 0) { + slideIndex = slideIndex - 1; + component.set("v.slideIndex", slideIndex); + } + } + +}) \ No newline at end of file diff --git a/force-app/main/default/aura/PictureCarousel/PictureCarouselHelper.js b/force-app/main/default/aura/PictureCarousel/PictureCarouselHelper.js new file mode 100644 index 0000000..2a4b5a6 --- /dev/null +++ b/force-app/main/default/aura/PictureCarousel/PictureCarouselHelper.js @@ -0,0 +1,6 @@ +({ + setSlideWidth: function (component) { + var slideWidth = component.find("gallery").getElement().offsetWidth; + component.set("v.slideWidth", slideWidth); + } +}) \ No newline at end of file diff --git a/force-app/main/default/aura/PictureCarousel/PictureCarouselRenderer.js b/force-app/main/default/aura/PictureCarousel/PictureCarouselRenderer.js new file mode 100644 index 0000000..2df5b5d --- /dev/null +++ b/force-app/main/default/aura/PictureCarousel/PictureCarouselRenderer.js @@ -0,0 +1,6 @@ +({ + afterRender: function (component, helper) { + this.superAfterRender(); + helper.setSlideWidth(component, helper); + } +}) \ No newline at end of file diff --git a/force-app/main/default/aura/PictureGalleryCard/PictureGalleryCard.cmp b/force-app/main/default/aura/PictureGalleryCard/PictureGalleryCard.cmp new file mode 100644 index 0000000..e5cfef7 --- /dev/null +++ b/force-app/main/default/aura/PictureGalleryCard/PictureGalleryCard.cmp @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + +
+
+
+ +
\ No newline at end of file diff --git a/force-app/main/default/aura/PictureGalleryCard/PictureGalleryCard.cmp-meta.xml b/force-app/main/default/aura/PictureGalleryCard/PictureGalleryCard.cmp-meta.xml new file mode 100644 index 0000000..ccfb7ad --- /dev/null +++ b/force-app/main/default/aura/PictureGalleryCard/PictureGalleryCard.cmp-meta.xml @@ -0,0 +1,5 @@ + + + 47.0 + A Lightning Component Bundle + diff --git a/force-app/main/default/aura/PictureGalleryCard/PictureGalleryCard.css b/force-app/main/default/aura/PictureGalleryCard/PictureGalleryCard.css new file mode 100644 index 0000000..f82cad1 --- /dev/null +++ b/force-app/main/default/aura/PictureGalleryCard/PictureGalleryCard.css @@ -0,0 +1,21 @@ +.THIS * { + box-sizing: border-box; +} + +.THIS .slds-card__body { + height: 340px; + margin-bottom: 0; +} + +.THIS .slds-modal__container { + margin-top: 100px; + height: 90%; + width: 90%; + max-width: initial; +} + +.THIS .slds-modal__close { + position: absolute; + top: 100px; + right: 5%; +} \ No newline at end of file diff --git a/force-app/main/default/aura/PictureGalleryCard/PictureGalleryCard.design b/force-app/main/default/aura/PictureGalleryCard/PictureGalleryCard.design new file mode 100644 index 0000000..cc00f43 --- /dev/null +++ b/force-app/main/default/aura/PictureGalleryCard/PictureGalleryCard.design @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/force-app/main/default/aura/PictureGalleryCard/PictureGalleryCard.svg b/force-app/main/default/aura/PictureGalleryCard/PictureGalleryCard.svg new file mode 100644 index 0000000..2591974 --- /dev/null +++ b/force-app/main/default/aura/PictureGalleryCard/PictureGalleryCard.svg @@ -0,0 +1,14 @@ + + + + image + Created with Sketch. + + + + + + + + + \ No newline at end of file diff --git a/force-app/main/default/aura/PictureGalleryCard/PictureGalleryCardController.js b/force-app/main/default/aura/PictureGalleryCard/PictureGalleryCardController.js new file mode 100644 index 0000000..b9e2f23 --- /dev/null +++ b/force-app/main/default/aura/PictureGalleryCard/PictureGalleryCardController.js @@ -0,0 +1,19 @@ +({ + doInit : function(component) { + // Hardcoding images in this demo component + component.set("v.slides", [ + 'https://s3-us-west-1.amazonaws.com/sfdc-demo/houses/living_room.jpg', + 'https://s3-us-west-1.amazonaws.com/sfdc-demo/houses/eatinkitchen.jpg', + 'https://s3-us-west-1.amazonaws.com/sfdc-demo/houses/kitchen.jpg' + ]); + }, + + fullScreen : function(component) { + component.set("v.fullScreen", true); + }, + + closeDialog : function(component) { + component.set("v.fullScreen", false); + } + +}) \ No newline at end of file