Team:Imperial College London/Gallery
From 2009.igem.org
(Difference between revisions)
Line 1: | Line 1: | ||
{{Imperial/09/TemplateTop}} | {{Imperial/09/TemplateTop}} | ||
<html> | <html> | ||
- | < | + | <!-- |
- | + | 1 ) Reference to the files containing the JavaScript and CSS. | |
- | + | These files must be located on your server. | |
- | + | --> | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | <script type="text/javascript" src="http://www.charlesfracchia.com/igemWiki/highslide/highslide-with-gallery.js"></script> | |
- | + | <link rel="stylesheet" type="text/css" href="http://www.charlesfracchia.com/igemWiki/highslide/highslide.css" /> | |
- | + | ||
- | </ | + | <!-- |
- | + | 2) Optionally override the settings defined at the top | |
- | <script type="text/javascript"> | + | of the highslide.js file. The parameter hs.graphicsDir is important! |
- | + | --> | |
- | + | ||
- | + | <script type="text/javascript"> | |
- | + | hs.graphicsDir = 'http://www.charlesfracchia.com/igemWiki/highslide/graphics/'; | |
- | + | hs.align = 'center'; | |
- | + | hs.transitions = ['expand', 'crossfade']; | |
- | + | hs.wrapperClassName = 'dark borderless floating-caption'; | |
- | // | + | hs.fadeInOut = true; |
- | + | hs.dimmingOpacity = .75; | |
- | + | ||
- | </ | + | // Add the controlbar |
+ | if (hs.addSlideshow) hs.addSlideshow({ | ||
+ | //slideshowGroup: 'group1', | ||
+ | interval: 5000, | ||
+ | repeat: false, | ||
+ | useControls: true, | ||
+ | fixedControls: 'fit', | ||
+ | overlayOptions: { | ||
+ | opacity: .6, | ||
+ | position: 'bottom center', | ||
+ | hideOnMouseOut: true | ||
+ | } | ||
+ | }); | ||
+ | |||
+ | </script> | ||
+ | |||
+ | <!-- | ||
+ | 3) Put the thumbnails inside a div for styling | ||
+ | --> | ||
+ | <div class="highslide-gallery"> | ||
+ | |||
+ | <!-- | ||
+ | 4) This is how you mark up the thumbnail image with an anchor tag around it. | ||
+ | The anchor's href attribute defines the URL of the full-size image. | ||
+ | --> | ||
+ | <a href="../images/gallery1.jpg" class="highslide" onclick="return hs.expand(this)"> | ||
+ | <img src="../images/gallery1.thumb.jpg" alt="Highslide JS" | ||
+ | title="Click to enlarge" /> | ||
+ | </a> | ||
+ | |||
+ | <!-- | ||
+ | 5 (optional). This is how you mark up the caption. The correct class name is important. | ||
+ | --> | ||
+ | |||
+ | <div class="highslide-caption"> | ||
+ | Caption for the first image. | ||
+ | </div> | ||
+ | |||
+ | |||
+ | <!-- Repetionion of the above --> | ||
+ | <a href="../images/gallery2.jpg" class="highslide" onclick="return hs.expand(this)"> | ||
+ | <img src="../images/gallery2.thumb.jpg" alt="Highslide JS" | ||
+ | title="Click to enlarge" /></a> | ||
+ | |||
+ | <div class="highslide-caption"> | ||
+ | Caption for the second image. | ||
+ | </div> | ||
+ | |||
+ | <a href="../images/gallery3.jpg" class="highslide" onclick="return hs.expand(this)"> | ||
+ | <img src="../images/gallery3.thumb.jpg" alt="Highslide JS" | ||
+ | title="Click to enlarge" /></a> | ||
+ | |||
+ | <div class="highslide-caption"> | ||
+ | Caption for the third image. | ||
+ | </div> | ||
+ | |||
+ | </div> | ||
</html> | </html> | ||
- | |||
{{Imperial/09/TemplateBottom}} | {{Imperial/09/TemplateBottom}} |
Revision as of 12:20, 5 October 2009