media.html 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width" />
  6. <title>media</title>
  7. <link rel="stylesheet" href="../css/flickity.css" />
  8. <link rel="stylesheet" href="sandbox.css" />
  9. <style>
  10. .image-gallery img {
  11. display: block;
  12. margin-right: 20px;
  13. max-height: 400px;
  14. max-width: 100%;
  15. }
  16. #video-gallery1 .cell {
  17. height: 300px;
  18. width: auto;
  19. }
  20. .image-gallery-contained .image-cell {
  21. width: 100%;
  22. height: 300px;
  23. background: black;
  24. text-align: center;
  25. }
  26. .image-gallery-contained .image-cell a {
  27. margin: 0 auto;
  28. }
  29. .image-gallery-contained .image-cell img {
  30. height: 300px;
  31. }
  32. </style>
  33. </head>
  34. <body>
  35. <h1>media</h1>
  36. <div id="image-gallery1" class="container image-gallery js-flickity"
  37. data-flickity-options='{ "wrapAround": false, "imagesLoaded": true, "percentPosition": false }'>
  38. <!-- images from unsplash.com -->
  39. <img src="http://i.imgur.com/r8p3Xgq.jpg" />
  40. <img src="http://i.imgur.com/q9zO6tw.jpg" />
  41. <img src="http://i.imgur.com/bwy74ok.jpg" />
  42. <img src="http://i.imgur.com/hODreXI.jpg" />
  43. <img src="http://i.imgur.com/UORFJ3w.jpg" />
  44. <img src="http://i.imgur.com/bAZWoqx.jpg" />
  45. <img src="http://i.imgur.com/PgmEBSB.jpg" />
  46. <img src="http://i.imgur.com/aboaFoB.jpg" />
  47. <img src="http://i.imgur.com/LkmcILl.jpg" />
  48. </div>
  49. <div id="image-gallery2" class="container image-gallery-contained js-flickity"
  50. data-flickity-options='{ "imagesLoaded": true, "percentPosition": false }'>
  51. <!-- images from unsplash.com -->
  52. <div class="image-cell">
  53. <a href="http://example.com"><img src="http://i.imgur.com/r8p3Xgq.jpg" /></a>
  54. </div>
  55. <div class="image-cell">
  56. <a href="http://example.com"><img src="http://i.imgur.com/q9zO6tw.jpg" /></a>
  57. </div>
  58. <div class="image-cell">
  59. <a href="http://example.com"><img src="http://i.imgur.com/bwy74ok.jpg" /></a>
  60. </div>
  61. <div class="image-cell">
  62. <a href="http://example.com"><img src="http://i.imgur.com/hODreXI.jpg" /></a>
  63. </div>
  64. <div class="image-cell">
  65. <a href="http://example.com"><img src="http://i.imgur.com/UORFJ3w.jpg" /></a>
  66. </div>
  67. <div class="image-cell">
  68. <a href="http://example.com"><img src="http://i.imgur.com/bAZWoqx.jpg" /></a>
  69. </div>
  70. <div class="image-cell">
  71. <a href="http://example.com"><img src="http://i.imgur.com/PgmEBSB.jpg" /></a>
  72. </div>
  73. <div class="image-cell">
  74. <a href="http://example.com"><img src="http://i.imgur.com/aboaFoB.jpg" /></a>
  75. </div>
  76. <div class="image-cell">
  77. <a href="http://example.com"><img src="http://i.imgur.com/LkmcILl.jpg" /></a>
  78. </div>
  79. </div>
  80. <!-- <div id="video-gallery1" class="container video-gallery js-flickity">
  81. <div class="cell">
  82. <iframe src="//player.vimeo.com/video/87701971" width="534" height="300" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe> <p><a href="http://vimeo.com/87701971">Yosemite HD II</a> from <a href="http://vimeo.com/projectyose">Project Yosemite</a> on <a href="https://vimeo.com">Vimeo</a>.</p>
  83. </div>
  84. <div class="cell">
  85. <iframe width="400" height="300" src="//www.youtube.com/embed/MvUE4WUtChk" frameborder="0" allowfullscreen></iframe>
  86. </div>
  87. <div class="cell">
  88. <iframe src="//player.vimeo.com/video/115014610" width="534" height="300" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe> <p><a href="http://vimeo.com/115014610">The Coast</a> from <a href="http://vimeo.com/nrsfilms">NRS Films</a> on <a href="https://vimeo.com">Vimeo</a>.</p>
  89. </div>
  90. <div class="cell">
  91. <iframe width="400" height="300" src="//www.youtube.com/embed/TmQd6S9wXYQ" frameborder="0" allowfullscreen></iframe>
  92. </div>
  93. <div class="cell">
  94. <iframe src="//player.vimeo.com/video/115680769" width="712" height="300" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe> <p><a href="http://vimeo.com/115680769">Quids In</a> from <a href="http://vimeo.com/nbnumeric">New Balance Numeric</a> on <a href="https://vimeo.com">Vimeo</a>.</p>
  95. </div>
  96. </div> -->
  97. <!-- <div id="demo2" class="demo">
  98. <div class="container variable-width js-flickity"
  99. data-flickity-options='{ "wrapAround": true, "freeScroll": true }'>
  100. </div>
  101. </div> -->
  102. <script src="../bower_components/get-size/get-size.js"></script>
  103. <script src="../bower_components/desandro-matches-selector/matches-selector.js"></script>
  104. <script src="../bower_components/ev-emitter/ev-emitter.js"></script>
  105. <script src="../bower_components/unipointer/unipointer.js"></script>
  106. <script src="../bower_components/unidragger/unidragger.js"></script>
  107. <script src="../bower_components/fizzy-ui-utils/utils.js"></script>
  108. <script src="../js/cell.js"></script>
  109. <script src="../js/slide.js"></script>
  110. <script src="../js/animate.js"></script>
  111. <script src="../js/flickity.js"></script>
  112. <script src="../js/drag.js"></script>
  113. <script src="../js/prev-next-button.js"></script>
  114. <script src="../js/page-dots.js"></script>
  115. <script src="../js/player.js"></script>
  116. <script src="../js/add-remove-cell.js"></script>
  117. <script src="../js/lazyload.js"></script>
  118. <script src="../bower_components/imagesloaded/imagesloaded.js"></script>
  119. <script src="../bower_components/flickity-imagesloaded/flickity-imagesloaded.js"></script>
  120. <!-- <script src="../dist/flickity.pkgd.js"></script> -->
  121. <script>
  122. fizzyUIUtils.docReady( function() {
  123. // var imgLoad = imagesLoaded('#image-gallery1');
  124. var flkty1 = Flickity.data('#image-gallery1');
  125. // imgLoad.on( 'progress', function( instance, image ) {
  126. // flkty1.cellSizeChange( image.img );
  127. // });
  128. flkty1.on( 'staticClick', function( event, pointer ) {
  129. console.log( event.target );
  130. });
  131. });
  132. </script>
  133. </body>
  134. </html>