|
| 1 | +<!-- BootStrap NavBar --> |
| 2 | +<div class="navbar"> |
| 3 | + <div class="navbar-inner"> |
| 4 | + <div class="container"> |
| 5 | + <h3><a class="brand" href="[% request.uri_base %]"><img src="images/dancer_man.png"> Perl Dancer</a></h3> |
| 6 | + </div> |
| 7 | + </div> |
| 8 | +</div> |
| 9 | + |
| 10 | +<div class="container"> |
| 11 | + |
| 12 | +<div class="page-header"> |
| 13 | + <div class="row"> |
| 14 | + <div class="span12"> |
| 15 | + <h2>Dancer + Bootstrap Exapmles<//h2> |
| 16 | + <h1>Photo Gallery - Carousel</h1> |
| 17 | + </div> |
| 18 | + </div> |
| 19 | +</div> |
| 20 | + |
| 21 | +<div class="row"> |
| 22 | + <div class="span12"> |
| 23 | + Example of using <a target="_blank" href="http://twitter.github.com/bootstrap/javascript.html#carousel">Bootstrap's Carousel</a> with Dancer. |
| 24 | + <br/> |
| 25 | + <br/> |
| 26 | + <br/> |
| 27 | + |
| 28 | + <h3>Code Highlights</h3> |
| 29 | + <ul> |
| 30 | + <li>The Dancer code is in |
| 31 | + <a href="[% request.uri_for("/show_file",file => "photo_carousel.pm", example => "photo carousel", url => request.uri_for("/photo_carousel") ) %]"> |
| 32 | + <code>./lib/examples/phot_carousel.pm</code> <i class="icon-eye-open"></i> </a>. |
| 33 | + </li> |
| 34 | + |
| 35 | + <li>This HTML tempate is in |
| 36 | + <a href="[% request.uri_for("/show_file",file => "photo_carousel.tt", example => "photo carousel", url => request.uri_for("/photo_carousel") ) %]"> |
| 37 | + <code>./views/examples/photo_carousel.tt</code> <i class="icon-eye-open"></i> </a>. |
| 38 | + </li> |
| 39 | + <li>The photos to display are degined in the <code>@photos</code> variable in the Dancer module.</li> |
| 40 | + </ul> |
| 41 | + |
| 42 | + </div> |
| 43 | +</div> |
| 44 | + |
| 45 | +<br/> |
| 46 | +<br/> |
| 47 | + |
| 48 | +[%################################# |
| 49 | + Photo Carousel Example Starts Here |
| 50 | +#################################%] |
| 51 | + |
| 52 | +<div class="row"> |
| 53 | +<h2>Example Photo Carousel</h2> |
| 54 | +<p>Enjoy the show!</p> |
| 55 | + |
| 56 | +<div style="max-width: 800px;" class="carousel slide" id="dancing_carousel"> |
| 57 | + |
| 58 | + <div class="carousel-inner"> |
| 59 | + [%### loop over the "photos" list, and create HTML for each photo %] |
| 60 | + [% FOREACH photo IN photos %] |
| 61 | + <div class="item [% IF loop.index==0 %]active[% END %]"> |
| 62 | + <img src="[% request.uri_base %]/images/gallery/[% photo.file %]" |
| 63 | + alt="[% photo.caption | html %]" /> |
| 64 | + <div class="carousel-caption"> |
| 65 | + <h4>[% photo.caption | html %]</h4> |
| 66 | + <p>[% photo.text | html %]</p> |
| 67 | + </div> |
| 68 | + </div> |
| 69 | + [% END %] |
| 70 | + </div> |
| 71 | + |
| 72 | + <!-- Carousel's Next/Prev buttons --> |
| 73 | + <a class="left carousel-control" href="#dancing_carousel" data-slide="prev">‹</a> |
| 74 | + <a class="right carousel-control" href="#dancing_carousel" data-slide="next">›</a> |
| 75 | +</div> |
| 76 | +</div> |
0 commit comments