index.html 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8" />
  5. <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
  6. <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no" />
  7. <link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" />
  8. <link
  9. rel="stylesheet"
  10. href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
  11. integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T"
  12. crossorigin="anonymous"
  13. />
  14. <link rel="stylesheet" href="demo/css/style.css" />
  15. <link rel="stylesheet" href="dist/css/glightbox.css" />
  16. <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" />
  17. <title>GLightbox | A touchable pure Javascript lightbox</title>
  18. </head>
  19. <body>
  20. <header class="main-header">
  21. <div class="container">
  22. <div class="row">
  23. <div class="col-md-12">
  24. <div class="header-inner">
  25. <a href="#" class="logo" style="font-family: 'Lobster', cursive">GLightbox</a>
  26. <ul class="d-none d-md-block">
  27. <li><a href="#examples">EXAMPLES</a></li>
  28. <li><a href="#specifications">INFO</a></li>
  29. <li><a href="#license">LICENSE</a></li>
  30. <li><a href="https://github.com/biati-digital/glightbox/releases/tag/3.3.0">DOWNLOAD</a></li>
  31. </ul>
  32. </div>
  33. </div>
  34. </div>
  35. </div>
  36. </header>
  37. <div class="intro">
  38. <div class="container">
  39. <div class="row">
  40. <div class="col-md-12">
  41. <div class="lead">
  42. <h1 style="font-family: 'Lobster', cursive">GLightbox.</h1>
  43. <p class="tagline">
  44. Code name
  45. <strong>"Gie"</strong>
  46. A touchable Pure Javascript
  47. <br />
  48. lightbox with mobile and video support.
  49. </p>
  50. <div class="download">
  51. <a class="mcbutton primary" href="https://github.com/biati-digital/glightbox/releases/tag/3.3.0">
  52. <i class="fa fa-download" aria-hidden="true"></i>
  53. <span>Download</span>
  54. </a>
  55. <a class="mcbutton black" href="https://github.com/biati-digital/glightbox" target="_blank">
  56. <i class="fa fa-github" aria-hidden="true"></i>
  57. <span>View Source</span>
  58. </a>
  59. </div>
  60. </div>
  61. </div>
  62. </div>
  63. </div>
  64. </div>
  65. <!-- Simple images example -->
  66. <section id="examples" class="section">
  67. <div class="container">
  68. <div class="row">
  69. <div class="col-md-12">
  70. <h3>
  71. <i class="fa fa-camera-retro heading-icon" aria-hidden="true"></i>
  72. Simple Image Gallery
  73. </h3>
  74. <ul class="box-container three-cols">
  75. <li class="box">
  76. <div class="inner">
  77. <a href="demo/img/large/gm1.jpg" class="glightbox">
  78. <img src="demo/img/small/gm1.jpg" alt="image" />
  79. </a>
  80. </div>
  81. </li>
  82. <li class="box">
  83. <div class="inner">
  84. <a href="demo/img/large/gm2.jpg" class="glightbox">
  85. <img src="demo/img/small/gm2.jpg" alt="image" />
  86. </a>
  87. </div>
  88. </li>
  89. <li class="box">
  90. <div class="inner">
  91. <a href="demo/img/large/gm3.jpg" class="glightbox">
  92. <img src="demo/img/small/gm3.jpg" alt="image" />
  93. </a>
  94. </div>
  95. </li>
  96. <li class="box">
  97. <div class="inner">
  98. <a href="demo/img/large/gm4.jpg" class="glightbox">
  99. <img src="demo/img/small/gm4.jpg" alt="image" />
  100. </a>
  101. </div>
  102. </li>
  103. <li class="box">
  104. <div class="inner">
  105. <a href="demo/img/large/gm5.jpg" class="glightbox">
  106. <img src="demo/img/small/gm5.jpg" alt="image" />
  107. </a>
  108. </div>
  109. </li>
  110. <li class="box">
  111. <div class="inner">
  112. <a href="demo/img/large/gm6.jpg" class="glightbox">
  113. <img src="demo/img/small/gm6.jpg" alt="image" />
  114. </a>
  115. </div>
  116. </li>
  117. </ul>
  118. </div>
  119. </div>
  120. </div>
  121. </section>
  122. <!-- Images with description example -->
  123. <section class="section pair">
  124. <div class="container">
  125. <div class="row">
  126. <div class="col-md-12">
  127. <h3>
  128. <i class="fa fa-address-card heading-icon" aria-hidden="true"></i>
  129. Images with Description
  130. </h3>
  131. <p>
  132. You can add descriptions to your slides, the description position can be set globally for all slides or you can set a different position for each slide. options are: top, bottom, left or
  133. right. You can adjust the style the way you want with basic CSS.
  134. <strong>The description can display html code</strong>
  135. .
  136. </p>
  137. <ul class="box-container three-cols">
  138. <li class="box">
  139. <div class="inner">
  140. <a
  141. href="demo/img/large/gm7.jpg"
  142. class="glightbox2"
  143. data-glightbox='title:Description Bottom; description: You can set the position of the description &lt;a href="http://google.com"&gt;with a link to Google&lt;/a&gt;'
  144. >
  145. <img src="demo/img/small/gm7.jpg" alt="image" />
  146. </a>
  147. </div>
  148. </li>
  149. <li class="box">
  150. <div class="inner">
  151. <a href="demo/img/large/gm8.jpg" class="glightbox2" data-glightbox="title: Description Right; description: .custom-desc1; descPosition: right;">
  152. <img src="demo/img/small/gm8.jpg" alt="image" />
  153. </a>
  154. <div class="glightbox-desc custom-desc1">
  155. <p>
  156. You can set the position of the description in different ways for example
  157. <strong style="text-decoration: underline">top, bottom, left or right</strong>
  158. </p>
  159. <p>
  160. <a href="http://google.com" target="_blank" style="text-decoration: underline; font-weight: bold">Example Google link</a>
  161. ipsum vehicula eros ultrices lacinia Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae Duis quis ipsum vehicula eros ultrices lacinia.
  162. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere
  163. </p>
  164. <p>
  165. Primis pharetra facilisis lorem quis penatibus ad nulla inceptos, dui per tempor taciti aliquet consequat sodales, curae tristique gravida auctor interdum malesuada sagittis.
  166. Felis pretium eros ligula natoque ad ante rutrum himenaeos, adipiscing urna mauris porta quam efficitur odio, sagittis morbi tellus nisi molestie mus faucibus.
  167. </p>
  168. <p>
  169. Primis pharetra facilisis lorem quis penatibus ad nulla inceptos, dui per tempor taciti aliquet consequat sodales, curae tristique gravida auctor interdum malesuada sagittis.
  170. Felis pretium eros ligula natoque ad ante rutrum himenaeos, adipiscing urna mauris porta quam efficitur odio, sagittis morbi tellus nisi molestie mus faucibus.
  171. </p>
  172. </div>
  173. </div>
  174. </li>
  175. <li class="box">
  176. <div class="inner">
  177. <a href="demo/img/large/gm9.jpg" class="glightbox2" data-glightbox="title: Description Left; description: .custom-desc2; descPosition: left;">
  178. <img src="demo/img/small/gm9.jpg" alt="image" />
  179. </a>
  180. <div class="glightbox-desc custom-desc2">
  181. <p>You can set the position of the description in different ways for example top, bottom, left or right</p>
  182. <p>Duis quis ipsum vehicula eros ultrices lacinia. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae</p>
  183. </div>
  184. </div>
  185. </li>
  186. </ul>
  187. </div>
  188. </div>
  189. </div>
  190. </section>
  191. <!-- Videos example -->
  192. <section class="section">
  193. <div class="container">
  194. <div class="row">
  195. <div class="col-md-12">
  196. <h3>
  197. <i class="fa fa-video-camera heading-icon" aria-hidden="true"></i>
  198. Videos Gallery
  199. </h3>
  200. <p>
  201. You can add videos with optional autoplay for
  202. <strong>Vimeo</strong>
  203. ,
  204. <strong>Youtube</strong>
  205. and
  206. <strong>self hosted videos</strong>
  207. . You can specify a default width for the videos or set different widths to each video in your gallery. The videos are 100% responsive and will play correctly on mobile devices.
  208. </p>
  209. <ul class="box-container three-cols">
  210. <li class="box">
  211. <div class="inner">
  212. <a href="https://vimeo.com/115041822" class="glightbox3">
  213. <img src="demo/img/small/gm10.jpg" alt="image" />
  214. </a>
  215. </div>
  216. </li>
  217. <li class="box">
  218. <div class="inner">
  219. <a href="https://www.youtube-nocookie.com/embed/Ga6RYejo6Hk" class="glightbox3">
  220. <img src="demo/img/small/gm11.jpg" alt="image" />
  221. </a>
  222. </div>
  223. </li>
  224. <li class="box">
  225. <div class="inner">
  226. <a href="./demo/pexels-video-1550080.mp4" class="glightbox3">
  227. <img src="demo/img/small/gm12.jpg" alt="image" />
  228. </a>
  229. </div>
  230. </li>
  231. </ul>
  232. </div>
  233. </div>
  234. </div>
  235. </section>
  236. <!-- Iframes and inline example -->
  237. <section class="section pair">
  238. <div class="container">
  239. <div class="row">
  240. <div class="col-md-12">
  241. <h3>
  242. <i class="fa fa-window-restore heading-icon" aria-hidden="true"></i>
  243. Iframes and Inline Elements
  244. </h3>
  245. <p>You can easily add iframes by simply entering the url, it could be a web page, a video, google maps, etc. also you can display any div of your page by entering the ID in the href attribute.</p>
  246. <ul class="box-container three-cols">
  247. <li class="box">
  248. <div class="inner">
  249. <a href="#inline-example" class="glightbox4" data-glightbox="width: 700; height: auto;">
  250. <img src="demo/img/small/gm14.jpg" alt="image" />
  251. </a>
  252. </div>
  253. </li>
  254. <li class="box">
  255. <div class="inner">
  256. <a
  257. href="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d12085.977306439116!2d-73.96648875371474!3d40.77314541916876!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x89c258bf08488f6b%3A0x618706a9142daa0d!2sUpper+East+Side%2C+Nueva+York%2C+EE.+UU.!5e0!3m2!1ses-419!2smx!4v1511830027642"
  258. class="glightbox4"
  259. >
  260. <img src="demo/img/small/gm15.jpg" alt="image" />
  261. </a>
  262. </div>
  263. </li>
  264. <li class="box">
  265. <div class="inner">
  266. <a href="./demo/pexels-video-1550080.mp4" class="glightbox4">
  267. <img src="demo/img/small/gm16.jpg" alt="image" />
  268. </a>
  269. </div>
  270. </li>
  271. </ul>
  272. </div>
  273. </div>
  274. </div>
  275. </section>
  276. <section id="specifications" class="container section">
  277. <div class="container">
  278. <div class="row">
  279. <div class="col-md-12">
  280. <div class="especifications">
  281. <h3 class="text-center">Technical specifications</h3>
  282. <p>GLightbox is built using es6 and transpiled with babel for older browsers and can be used with nodejs.</p>
  283. <h4>Animations</h4>
  284. <p>All the animations are created with CSS and only the transform and opacity properties are animated. You can overwrite the CSS of the animations or create your own.</p>
  285. <h4>Features</h4>
  286. <ul>
  287. <li>Small - only 11KB Gzipped</li>
  288. <li>Responsive - works with any screen size</li>
  289. <li>Gallery Support - Create multiple galleries</li>
  290. <li>Video Support - Youtube, Vimeo and self hosted videos with autoplay</li>
  291. <li>Inline content support - display any inline content</li>
  292. <li>Iframe support - need to embed an iframe? no problem</li>
  293. <li>Keyboard Navigation - esc, arrows keys, tab and enter is all you need</li>
  294. <li>Touch Navigation - mobile touch events like swipe, move, pinch, etc.</li>
  295. <li>Zoomable images - zoom and drag images on mobile and desktop</li>
  296. <li>Retina ready - svg icons for controls.</li>
  297. <li>Api - control the lightbox with the provided methods</li>
  298. </ul>
  299. <h4>Supported browsers and devices</h4>
  300. <ul>
  301. <li>
  302. <i class="fa fa-safari"></i>
  303. Safari
  304. </li>
  305. <li>
  306. <i class="fa fa-chrome"></i>
  307. Chrome
  308. </li>
  309. <li>
  310. <i class="fa fa-opera"></i>
  311. Opera
  312. </li>
  313. <li>
  314. <i class="fa fa-firefox"></i>
  315. Firefox
  316. </li>
  317. <li>
  318. <i class="fa fa-edge"></i>
  319. Edge
  320. </li>
  321. <li>
  322. <i class="fa fa-internet-explorer"></i>
  323. Internet Explorer 11
  324. </li>
  325. <li>
  326. <i class="fa fa-apple"></i>
  327. IOS (browser: safari, chrome, opera and firefox)
  328. </li>
  329. <li>
  330. <i class="fa fa-android"></i>
  331. Android (browser: chrome, opera and firefox)
  332. </li>
  333. <li>
  334. <i class="fa fa-terminal"></i>
  335. And any browser that supports flexbox and classList
  336. </li>
  337. </ul>
  338. <h4>Documentation</h4>
  339. <p>
  340. The documentation can be found in the github page.
  341. <a href="https://github.com/biati-digital/glightbox/blob/master/README.md" class="font-weight-bold" target="_blank">View Documentation</a>
  342. </p>
  343. <div id="license">
  344. <h4>License</h4>
  345. <p>
  346. GLightbox is free to use for personal and commercial projects.
  347. <a href="https://opensource.org/licenses/MIT" target="_blank">MIT license</a>
  348. </p>
  349. </div>
  350. </div>
  351. <p class="text-center footer-btns">
  352. <a class="mcbutton primary" href="https://github.com/biati-digital/glightbox/releases/tag/3.3.0">
  353. <i class="fa fa-download"></i>
  354. Download
  355. </a>
  356. <a class="mcbutton black" href="https://github.com/biati-digital/glightbox" target="_blank">
  357. <i class="fa fa-github"></i>
  358. View Source
  359. </a>
  360. </p>
  361. </div>
  362. </div>
  363. </div>
  364. </section>
  365. <div id="inline-example" style="display: none">
  366. <div class="inline-inner">
  367. <h4 class="text-center">Example of inline content</h4>
  368. <div class="text-center">
  369. <p>
  370. Duis quis ipsum vehicula eros ultrices lacinia. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Donec nec sollicitudin felis. Donec vel nulla vel leo varius
  371. tempor. Duis suscipit pharetra quam id imperdiet. Praesent vitae eros metus. Donec placerat sagittis rhoncus. In condimentum eleifend ante et ornare. Curabitur pharetra nibh non purus gravida.
  372. </p>
  373. </div>
  374. <a class="gtrigger-close inline-close-btn" href="#">Close Box</a>
  375. </div>
  376. </div>
  377. <footer class="text-center">
  378. <div class="wrap copyright">
  379. made with love by
  380. <a href="https://www.biati.digital" target="_blank">biati digital</a>
  381. | photos by
  382. <a href="http://unsplash.com" target="_blank">unsplash.com</a>
  383. | video by
  384. <a href="https://www.pexels.com/video/a-rocky-coast-1550080/" target="_blank">pexels</a>
  385. </div>
  386. </footer>
  387. <script src="https://cdn.jsdelivr.net/npm/animejs@3.1.0/lib/anime.min.js"></script>
  388. <script src="demo/js/valde.min.js"></script>
  389. <script src="dist/js/glightbox.js"></script>
  390. <script src="demo/js/site.js"></script>
  391. <script>
  392. var lightbox = GLightbox();
  393. lightbox.on('open', (target) => {
  394. console.log('lightbox opened');
  395. });
  396. var lightboxDescription = GLightbox({
  397. selector: '.glightbox2'
  398. });
  399. var lightboxVideo = GLightbox({
  400. selector: '.glightbox3'
  401. });
  402. lightboxVideo.on('slide_changed', ({ prev, current }) => {
  403. console.log('Prev slide', prev);
  404. console.log('Current slide', current);
  405. const { slideIndex, slideNode, slideConfig, player } = current;
  406. if (player) {
  407. if (!player.ready) {
  408. // If player is not ready
  409. player.on('ready', (event) => {
  410. // Do something when video is ready
  411. });
  412. }
  413. player.on('play', (event) => {
  414. console.log('Started play');
  415. });
  416. player.on('volumechange', (event) => {
  417. console.log('Volume change');
  418. });
  419. player.on('ended', (event) => {
  420. console.log('Video ended');
  421. });
  422. }
  423. });
  424. var lightboxInlineIframe = GLightbox({
  425. selector: '.glightbox4'
  426. });
  427. /* var exampleApi = GLightbox({ selector: null });
  428. exampleApi.insertSlide({
  429. href: 'https://picsum.photos/1200/800',
  430. });
  431. exampleApi.insertSlide({
  432. width: '500px',
  433. content: '<p>Example</p>'
  434. });
  435. exampleApi.insertSlide({
  436. href: 'https://www.youtube.com/watch?v=WzqrwPhXmew',
  437. });
  438. exampleApi.insertSlide({
  439. width: '200vw',
  440. content: document.getElementById('inline-example')
  441. });
  442. exampleApi.open(); */
  443. </script>
  444. </body>
  445. </html>