Rev | Line | |
---|
[13182] | 1 | {if !empty($thumbnails)} |
---|
| 2 | {combine_script id='klass' path='themes/smartpocket/js/klass.min.js'} |
---|
| 3 | {combine_script id='photoswipe' path='themes/smartpocket/js/code.photoswipe.jquery.min.js' require='klass,jquery.mobile'} |
---|
| 4 | |
---|
| 5 | {define_derivative name='derivative_params_thumb' width=150 height=150 crop=true} |
---|
| 6 | {define_derivative name='derivative_params_full' type='large'} |
---|
| 7 | |
---|
| 8 | {footer_script}{literal} |
---|
| 9 | (function(window, $, PhotoSwipe){ |
---|
| 10 | $(document).ready(function(){ |
---|
| 11 | var options = { |
---|
| 12 | jQueryMobile: true, |
---|
| 13 | //allowUserZoom: false, |
---|
| 14 | imageScaleMethod: "fitNoUpscale" |
---|
| 15 | }; |
---|
| 16 | $(".thumbnails a").photoSwipe(options); |
---|
| 17 | $(".thumbnails img").load(function() { $(this).css('border', '1px solid #3c3c3c') }); |
---|
| 18 | }); |
---|
| 19 | }(window, window.jQuery, window.Code.PhotoSwipe)); |
---|
| 20 | {/literal}{/footer_script} |
---|
| 21 | <div data-role="content"> |
---|
| 22 | <ul class="thumbnails"> |
---|
| 23 | {foreach from=$thumbnails item=thumbnail} |
---|
| 24 | <li> |
---|
| 25 | <a href="{$pwg->derivative_url($derivative_params_full, $thumbnail.src_image)}" rel="external"> |
---|
| 26 | <img src="{$pwg->derivative_url($derivative_params_thumb, $thumbnail.src_image)}" alt="{$thumbnail.TN_ALT}"> |
---|
| 27 | </a> |
---|
| 28 | </li> |
---|
| 29 | {/foreach} |
---|
| 30 | </ul> |
---|
| 31 | </div> |
---|
| 32 | {/if} |
---|
Note: See
TracBrowser
for help on using the repository browser.