Advertisement
Guest User

SLideshow Template for

a guest
Aug 27th, 2012
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.00 KB | None | 0 0
  1. <?php
  2. /**
  3. Template Page for the gallery overview
  4. **/
  5. ?>
  6. <?php if (!defined ('ABSPATH')) die ('No direct access allowed'); ?><?php if (!empty ($gallery)) : ?>
  7.    
  8.     <!-- SLIDESHOW -->
  9.  
  10. <div class="slideshowWrap">
  11.     <ul class="slideshow">
  12.  
  13.         <?php foreach ( $images as $image ) : ?>
  14.        
  15.             <li id="ngg-image-<?php echo $image->pid ?>" class="slide">
  16.  
  17.                     <a href="<?php echo $image->imageURL ?>" title="<?php echo $image->description ?>" <?php echo $image->thumbcode ?> >
  18.                         <?php if ( !$image->hidden ) { ?>
  19.                         <img title="<?php echo $image->alttext ?>" alt="<?php echo $image->alttext ?>" src="<?php echo $image->imageURL ?>" />
  20.                         <?php } ?>
  21.                     </a>
  22.                     <span><?php echo $image->description ?></span>
  23.  
  24.             </li>
  25.        
  26.         <?php if ( $image->hidden ) continue; ?>
  27.  
  28.         <?php endforeach; ?>
  29.  
  30.      </ul>
  31. </div>
  32.  
  33. <?php endif; ?>
  34.  
  35. <style>
  36.  
  37.     div.slideshowWrap {
  38.         padding: 10px;
  39.         width: 800px;
  40.         overflow: hidden;
  41.         margin: auto;
  42.         background: #E6E6DF;
  43.         border: 1px solid #CD4B18;
  44.         border-radius: 8px;
  45.     }
  46.  
  47.     ul.slideshow {
  48.         list-style: none;
  49.         padding: 0;
  50.         margin: 0;
  51.         border-radius: 8px;
  52.     }
  53.  
  54.     ul.slideshow li {
  55.         position: relative;
  56.         padding: 0;
  57.         margin: 0;
  58.     }
  59.  
  60.  
  61.     ul.slideshow li span {
  62.         position: absolute;
  63.         bottom: 20px;
  64.         left: 10px;
  65.         z-index: 100;
  66.         padding: 10px;
  67.         border-radius: 6px;
  68.         background: rgba(0,0,0,.4);
  69.         color: #E6E6DF;
  70.         font-family: monospace;
  71.     }
  72.  
  73.     div.slideshow_nav {
  74.         display: table;
  75.         margin: auto;
  76.     }
  77.  
  78.     div.slideshow_nav a {
  79.         display: inline-block;
  80.         height: 24px;
  81.         width: 24px;
  82.         text-indent: -9999px;
  83.         border: 3px solid #CD4B18;
  84.         border-radius: 50%;
  85.         margin: 5px;
  86.         position: relative;
  87.     }
  88.  
  89.     div.slideshow_nav a::after {
  90.         content: '';
  91.         position: absolute;
  92.         top: 7px;
  93.         left: 7px;
  94.         height: 10px;
  95.         width: 10px;
  96.         background: #CD4B18;
  97.         border-radius: 50%;
  98.         display: none;
  99.     }
  100.  
  101.     div.slideshow_nav a.activeSlide::after {
  102.         display: block;
  103.     }
  104.  
  105.     div.slideshow_nav a:hover {
  106.         background: #fff;
  107.     }
  108.  
  109. </style>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement