source: extensions/Fotorama/template/slideshow.tpl @ 27039

Last change on this file since 27039 was 27039, checked in by JanisV, 10 years ago

Added processing for photo changing (title, stop URL, etc)

File size: 1.9 KB
Line 
1{combine_css path="plugins/Fotorama/fotorama/fotorama.css"}
2{combine_script id='fotorama' require='jquery' load='header' path='plugins/Fotorama/fotorama/fotorama.js'}
3
4<div id="slideshow">
5        <div id="imageHeaderBar">
6          <div class="browsePath">
7                {if isset($U_SLIDESHOW_STOP) }
8                [ <a href="{$U_SLIDESHOW_STOP}">{'stop the slideshow'|@translate}</a> ]
9                {/if}
10                        <h2 class="showtitle">{$current.TITLE}</h2>
11          </div>
12        </div>
13
14        <div id="imageToolBar">
15          <div class="imageNumber">{$PHOTO}</div>
16        </div>
17
18        <div id="content">
19        <div id="theImage">
20      <div class="fotorama" data-startindex="{$current_rank}" data-ratio="16/9" data-fit="scaledown" data-auto="false"
21        data-width="100%" data-maxheight="100%" data-minheight="200" data-height="{$item_height}" data-allowfullscreen="native" data-autoplay=true data-stopautoplayontouch=false data-loop=true data-nav=false>
22      {foreach from=$items item=thumbnail}
23        <a href="{$thumbnail['derivative']->get_url()}" data-full="{$thumbnail['derivative_big']->get_url()}" data-url="{$thumbnail['url']}" data-title="{$thumbnail['TITLE']}"></a>
24      {/foreach}
25      </div>
26        </div>
27        </div>
28<div>
29
30<script>
31  $(function () {
32    $('.fotorama')
33        // Listen to the events
34        .on('fotorama:showend ',
35            function (e, fotorama, extra) {
36              console.log('active frame', fotorama.activeFrame);
37              history.replaceState(null, null, fotorama.activeFrame['url']+'&slideshow=');
38              $('#slideshow .browsePath a').attr('href', fotorama.activeFrame['url']);
39              $('#slideshow .showtitle').text(fotorama.activeFrame['title']);
40              document.title = fotorama.activeFrame['title'] + ' | {$GALLERY_TITLE}';
41              $('#slideshow .imageNumber').text((fotorama.activeFrame['i'])+'/'+{count($items)});
42            }
43        )
44        // Initialize fotorama manually
45        .fotorama();
46  });
47</script>
Note: See TracBrowser for help on using the repository browser.