The original lightbox script, finally on github.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

187 lines

  1. <!DOCTYPE html>
  2. <html lang="en-us">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Lightbox 2</title>
  6. <meta name="description" lang="en" content="Lightbox 2 is a script used to overlay images on the current page. It's a snap to setup and works on all modern browsers."/>
  7. <meta name="author" content="Lokesh Dhakar">
  8. <meta name="viewport" content="width=device-width,initial-scale=1">
  9. <script src="js/modernizr.custom.js"></script>
  10. <link rel="shortcut icon" href="img/demopage/favicon.ico">
  11. <link rel="stylesheet" href=",700">
  12. <link rel="stylesheet" href="css/screen.css" media="screen"/>
  13. <link rel="stylesheet" href="css/lightbox.css" media="screen"/>
  14. </head>
  15. <body>
  16. <div class="wrapper">
  17. <section id="intro" class="section intro-section">
  18. <header>
  19. <h1 class="logo">Lightbox<em class="version">2</em></h1>
  20. </header>
  21. <p class="author">
  22. by Lokesh Dhakar<br />
  23. <span class="author-links">
  24. <a href="">Blog</a> - <a href="">Twitter</a> - <a href="">Github</a>
  25. </span>
  26. </p>
  27. <p class="lead">
  28. Lightbox is small javascript library used to overlay images on top of the current page. It's a <em>snap to setup</em> and works on <em>all modern browsers</em>.
  29. </p>
  30. </section>
  31. <section id="examples" class="section examples-section">
  32. <header>
  33. <h2 class="section-header">Examples</h2>
  34. </header>
  35. <h3>Single images</h3>
  36. <div class="image-row">
  37. <a class="example-image-link" href="img/demopage/image-1.jpg" data-lightbox="example-1"><img class="example-image" src="img/demopage/thumb-1.jpg" alt="thumb-1" width="150" height="150"/></a>
  38. <a class="example-image-link" href="img/demopage/image-2.jpg" data-lightbox="example-2" title="Optional caption."><img class="example-image" src="img/demopage/thumb-2.jpg" alt="thumb-1" width="150" height="150"/></a>
  39. </div>
  40. <h3 style="clear: both;">An image set</h3>
  41. <div class="image-row">
  42. <div class="image-set">
  43. <a class="example-image-link" href="img/demopage/image-3.jpg" data-lightbox="example-set" title="Click on the right side of the image to move forward."><img class="example-image" src="img/demopage/thumb-3.jpg" alt="Plants: image 1 0f 4 thumb" width="150" height="150"/></a>
  44. <a class="example-image-link" href="img/demopage/image-4.jpg" data-lightbox="example-set" title="Or press the right arrow on your keyboard."><img class="example-image" src="img/demopage/thumb-4.jpg" alt="Plants: image 2 0f 4 thumb" width="150" height="150"/></a>
  45. <a class="example-image-link" href="img/demopage/image-5.jpg" data-lightbox="example-set" title="The script preloads the next image in the set as you're viewing."><img class="example-image" src="img/demopage/thumb-5.jpg" alt="Plants: image 3 0f 4 thumb" width="150" height="150"/></a>
  46. <a class="example-image-link" href="img/demopage/image-6.jpg" data-lightbox="example-set" title="Click anywhere outside the image or the X to the right to close."><img class="example-image" src="img/demopage/thumb-6.jpg" alt="Plants: image 4 0f 4 thumb" width="150" height="150"/></a>
  47. </div>
  48. </div>
  49. </section>
  50. <section id="download" class="section download-section">
  51. <header>
  52. <h2 class="section-header">Download</h2>
  53. </header>
  54. <a href="releases/" class="download-button">
  55. <div class="file">
  56. Lightbox
  57. <div class="version">
  58. v2.6
  59. </div>
  60. </div>
  61. </a>
  62. <p>
  63. Lightbox2 is open-source.<br/>View and fork the code on <a href="">Github</a>.
  64. </p>
  65. </section>
  66. <section id="how-to-use" class="section how-to-use-section">
  67. <header>
  68. <h2 class="section-header">How to use</h2>
  69. <h2 class="section-subheader">Step-by-step instructions</h2>
  70. </header>
  71. <h3>Part 1 - Get setup</h3>
  72. <ol>
  73. <li>Download and unzip the latest version of Lightbox from above.</li>
  74. <li>Look inside the <code>js</code> folder to find <code>jquery-1.10.2.min.js</code> and <code>lightbox-2.6.min.js</code> and load both of these files from your html page. Load jQuery first:
  75. <pre><code>&lt;script src=&quot;js/jquery-1.10.2.min.js&quot;&gt;&lt;/script&gt;
  76. &lt;script src=&quot;js/lightbox-2.6.min.js&quot;&gt;&lt;/script&gt;
  77. </code></pre></li>
  78. <li>Look inside the <code>css</code> folder to find <code>lightbox.css</code> and load it from your html page:
  79. <pre><code>&lt;link href=&quot;css/lightbox.css&quot; rel=&quot;stylesheet&quot; /&gt;
  80. </code></pre>
  81. </li>
  82. <li>Look inside the <code>img</code> folder to find <code>close.png</code>, <code>loading.gif</code>, <code>prev.png</code>, and <code>next.png</code>. These files are used in <code>lightbox.css</code>. By default, <code>lightbox.css</code> will look for these images in a folder called <code>img</code>.</li>
  83. </ol>
  84. <h3>Part 2 - Turn it on</h3>
  85. <ul>
  86. <li>Add a <code>data-lightbox</code> attribute to any image link to activate Lightbox. For the value of the attribute, use a unique name for each image. For example:
  87. <pre><code>&lt;a href=&quot;img/image-1.jpg&quot; data-lightbox=&quot;image-1&quot; title=&quot;My caption&quot;&gt;image #1&lt;/a&gt;
  88. </code></pre>
  89. <div class="sub-point"><em>Optional:</em> Set the <code>title</code> attribute if you want to show a caption.</div> </li>
  90. <li>If you have a group of related images that you would like to combine into a set, use the same <code>data-lightbox</code> attribute value for all of the images. For example:
  91. <pre><code>&lt;a href=&quot;img/image-2.jpg&quot; data-lightbox=&quot;roadtrip&quot;&gt;image #2&lt;/a&gt;
  92. &lt;a href=&quot;img/image-3.jpg&quot; data-lightbox=&quot;roadtrip&quot;&gt;image #3&lt;/a&gt;
  93. &lt;a href=&quot;img/image-4.jpg&quot; data-lightbox=&quot;roadtrip&quot;&gt;image #4&lt;/a&gt;
  94. </code></pre></li>
  95. <li class="last-list-item"><div class="sub-point">For you long time Lightbox users, don't fret, you can still enable Lightbox by using <code>rel="lightbox"</code>. The new <code>data-lightbox</code> approach is preferred though as it is valid html.</div></li>
  96. </ul>
  97. </section>
  98. <section id="help" class="section questions-section">
  99. <header>
  100. <h2 class="section-header">Help</h2>
  101. </header>
  102. <h3>Bugs</h3>
  103. <p>If you find a bug, create an <a href="">issue on Github</a>. Include your operating system and browser version along with detailed steps to reproduce the bug.</p>
  104. <h3>Feature requests</h3>
  105. <p>If you want a feature added, please create an <a href="">issue on Github</a>. Someone else or I might be able to help out. No guarantees.</p>
  106. <h3>Support questions</h3>
  107. <p>If you have a question that is not a bug or a feature request, your best chance of getting an answer is by following these steps:</p>
  108. <ol class="simple-list">
  109. <li><a href="">Search the Lightbox forums</a>. <br /><span class="sub-point">You will not be able to post new questions in the forum as posting has been disabled. The forum is having spam problems and the forum will eventually be phased out.</span></li>
  110. <li><a href="">Search Stackoverflow</a>.</li>
  111. <li class="last-list-item"><a href="">Create a new question on Stackoverflow</a>.</li>
  112. </ol>
  113. <h3>Older versions</h3>
  114. <p>See a change log and access older versions on the <a href="">Github releases page</a>.</p>
  115. </section>
  116. <section id="doante" class="section donate-section">
  117. <header>
  118. <h2 class="section-header">Donate</h2>
  119. </header>
  120. <p>
  121. Lightbox is completely free to use. If you're using Lightbox on a commercial project and are feeling generous, consider a donation. Thanks!
  122. </p>
  123. <form class="donate-button-form" name="_xclick" action="" method="post">
  124. <fieldset>
  125. <input type="hidden" name="cmd" value="_xclick">
  126. <input type="hidden" name="business" value="">
  127. <input type="hidden" name="item_name" value="Donation for Lightbox">
  128. <input type="hidden" name="no_note" value="1">
  129. <input type="hidden" name="currency_code" value="USD">
  130. <input type="hidden" name="tax" value="0">
  131. <input type="hidden" name="bn" value="PP-DonationsBF">
  132. <input type="image" src="img/demopage/donate.png" name="submit" class="donate-button" alt="Make payments with PayPal - it's fast, free and secure!">
  133. </fieldset>
  134. </form>
  135. </section>
  136. <section id="credits" class="credits-section last">
  137. <p>Lightbox2 created by Lokesh Dhakar<br />
  138. <a href="">Blog</a> - <a href="">Twitter</a> - <a href="">Github</a></p>
  139. </section>
  140. <section id="sharing" class="sharing-section">
  141. <a href="" class="twitter-share-button" data-via="lokesh" data-size="large">Tweet</a>
  142. <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);;js.src=p+'://';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
  143. </section>
  144. <script src="js/jquery-1.10.2.min.js"></script>
  145. <script src="js/lightbox-2.6.min.js"></script>
  146. <script>
  147. var _gaq = _gaq || [];
  148. _gaq.push(['_setAccount', 'UA-2196019-1']);
  149. _gaq.push(['_trackPageview']);
  150. (function() {
  151. var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
  152. ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '';
  153. var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  154. })();
  155. </script>
  156. </div>
  157. </body>
  158. </html>