lightbox.init.js 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. /******/ (function() { // webpackBootstrap
  2. /******/ var __webpack_modules__ = ({
  3. /***/ "./resources/js/pages/lightbox.init.js":
  4. /*!*********************************************!*\
  5. !*** ./resources/js/pages/lightbox.init.js ***!
  6. \*********************************************/
  7. /***/ (function() {
  8. /*
  9. Template Name: Skote - Admin & Dashboard Template
  10. Author: Themesbrand
  11. Website: https://themesbrand.com/
  12. Contact: themesbrand@gmail.com
  13. File: Lightbox Js File
  14. */
  15. (function ($) {
  16. 'use strict';
  17. /*
  18. Single Image
  19. */
  20. $('.image-popup-vertical-fit').magnificPopup({
  21. type: 'image',
  22. closeOnContentClick: true,
  23. mainClass: 'mfp-img-mobile',
  24. image: {
  25. verticalFit: true
  26. }
  27. });
  28. $('.image-popup-no-margins').magnificPopup({
  29. type: 'image',
  30. closeOnContentClick: true,
  31. closeBtnInside: false,
  32. fixedContentPos: true,
  33. mainClass: 'mfp-no-margins mfp-with-zoom',
  34. // class to remove default margin from left and right side
  35. image: {
  36. verticalFit: true
  37. },
  38. zoom: {
  39. enabled: true,
  40. duration: 300 // don't foget to change the duration also in CSS
  41. }
  42. });
  43. /*
  44. Gallery
  45. */
  46. $('.popup-gallery').magnificPopup({
  47. delegate: 'a',
  48. type: 'image',
  49. tLoading: 'Loading image #%curr%...',
  50. mainClass: 'mfp-img-mobile',
  51. gallery: {
  52. enabled: true,
  53. navigateByImgClick: true,
  54. preload: [0, 1] // Will preload 0 - before current, and 1 after the current image
  55. },
  56. image: {
  57. tError: '<a href="%url%">The image #%curr%</a> could not be loaded.'
  58. }
  59. });
  60. /*
  61. Zoom Gallery
  62. */
  63. $('.zoom-gallery').magnificPopup({
  64. delegate: 'a',
  65. type: 'image',
  66. closeOnContentClick: false,
  67. closeBtnInside: false,
  68. mainClass: 'mfp-with-zoom mfp-img-mobile',
  69. image: {
  70. verticalFit: true,
  71. titleSrc: function titleSrc(item) {
  72. return item.el.attr('title') + ' &middot; <a href="' + item.el.attr('data-source') + '" target="_blank">image source</a>';
  73. }
  74. },
  75. gallery: {
  76. enabled: true
  77. },
  78. zoom: {
  79. enabled: true,
  80. duration: 300,
  81. // don't foget to change the duration also in CSS
  82. opener: function opener(element) {
  83. return element.find('img');
  84. }
  85. }
  86. });
  87. /*
  88. Popup with video or map
  89. */
  90. $('.popup-youtube, .popup-vimeo, .popup-gmaps').magnificPopup({
  91. disableOn: 700,
  92. type: 'iframe',
  93. mainClass: 'mfp-fade',
  94. removalDelay: 160,
  95. preloader: false,
  96. fixedContentPos: false
  97. });
  98. /*
  99. Dialog with CSS animation
  100. */
  101. $('.popup-with-zoom-anim').magnificPopup({
  102. type: 'inline',
  103. fixedContentPos: false,
  104. fixedBgPos: true,
  105. overflowY: 'auto',
  106. closeBtnInside: true,
  107. preloader: false,
  108. midClick: true,
  109. removalDelay: 300,
  110. mainClass: 'my-mfp-zoom-in'
  111. });
  112. $('.popup-with-move-anim').magnificPopup({
  113. type: 'inline',
  114. fixedContentPos: false,
  115. fixedBgPos: true,
  116. overflowY: 'auto',
  117. closeBtnInside: true,
  118. preloader: false,
  119. midClick: true,
  120. removalDelay: 300,
  121. mainClass: 'my-mfp-slide-bottom'
  122. });
  123. $('.popup-form').magnificPopup({
  124. type: 'inline',
  125. preloader: false,
  126. focus: '#name',
  127. // When elemened is focused, some mobile browsers in some cases zoom in
  128. // It looks not nice, so we disable it:
  129. callbacks: {
  130. beforeOpen: function beforeOpen() {
  131. if ($(window).width() < 700) {
  132. this.st.focus = false;
  133. } else {
  134. this.st.focus = '#name';
  135. }
  136. }
  137. }
  138. });
  139. }).apply(this, [jQuery]);
  140. /***/ })
  141. /******/ });
  142. /************************************************************************/
  143. /******/
  144. /******/ // startup
  145. /******/ // Load entry module and return exports
  146. /******/ // This entry module is referenced by other modules so it can't be inlined
  147. /******/ var __webpack_exports__ = {};
  148. /******/ __webpack_modules__["./resources/js/pages/lightbox.init.js"]();
  149. /******/
  150. /******/ })()
  151. ;