diff options
author | patdenice <patdenice@piwigo.org> | 2012-02-16 11:51:34 +0000 |
---|---|---|
committer | patdenice <patdenice@piwigo.org> | 2012-02-16 11:51:34 +0000 |
commit | a7f70524df847f3dd8e53e0e07b67597edb1631c (patch) | |
tree | db87ef3bae8722e2439c85edcc67f6d280aef91e /themes/smartpocket/template/thumbnails.tpl | |
parent | 4f2ae7cbcece6409b2b7e6e2ec4b73ad04917c5e (diff) |
feature:2577
Add mobile theme
git-svn-id: http://piwigo.org/svn/trunk@13182 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'themes/smartpocket/template/thumbnails.tpl')
-rw-r--r-- | themes/smartpocket/template/thumbnails.tpl | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/themes/smartpocket/template/thumbnails.tpl b/themes/smartpocket/template/thumbnails.tpl new file mode 100644 index 000000000..5e33dd0ee --- /dev/null +++ b/themes/smartpocket/template/thumbnails.tpl @@ -0,0 +1,32 @@ +{if !empty($thumbnails)}
+{combine_script id='klass' path='themes/smartpocket/js/klass.min.js'}
+{combine_script id='photoswipe' path='themes/smartpocket/js/code.photoswipe.jquery.min.js' require='klass,jquery.mobile'}
+
+{define_derivative name='derivative_params_thumb' width=150 height=150 crop=true}
+{define_derivative name='derivative_params_full' type='large'}
+
+{footer_script}{literal}
+(function(window, $, PhotoSwipe){
+ $(document).ready(function(){
+ var options = {
+ jQueryMobile: true,
+ //allowUserZoom: false,
+ imageScaleMethod: "fitNoUpscale"
+ };
+ $(".thumbnails a").photoSwipe(options);
+ $(".thumbnails img").load(function() { $(this).css('border', '1px solid #3c3c3c') });
+ });
+}(window, window.jQuery, window.Code.PhotoSwipe));
+{/literal}{/footer_script}
+<div data-role="content">
+<ul class="thumbnails">
+{foreach from=$thumbnails item=thumbnail}
+ <li>
+ <a href="{$pwg->derivative_url($derivative_params_full, $thumbnail.src_image)}" rel="external">
+ <img src="{$pwg->derivative_url($derivative_params_thumb, $thumbnail.src_image)}" alt="{$thumbnail.TN_ALT}">
+ </a>
+ </li>
+{/foreach}
+</ul>
+</div>
+{/if}
|