aboutsummaryrefslogtreecommitdiffstats
path: root/themes/default/template/thumbnails.tpl
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2012-01-17 06:09:32 +0000
committerrvelices <rv-github@modusoptimus.com>2012-01-17 06:09:32 +0000
commite693ef60cd8f79e11ae4de3ba2f7494a72fc35c2 (patch)
treedb901414e97e48d4830d53af6c676fe5373da3ef /themes/default/template/thumbnails.tpl
parentb18e3c8a803b15fc72f95791072220afb23f46bf (diff)
feature 2548 multisize - ability to choose displayed size on index page
-added some logs on i.php (configurable) to measure the perf git-svn-id: http://piwigo.org/svn/trunk@12908 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'themes/default/template/thumbnails.tpl')
-rw-r--r--themes/default/template/thumbnails.tpl21
1 files changed, 18 insertions, 3 deletions
diff --git a/themes/default/template/thumbnails.tpl b/themes/default/template/thumbnails.tpl
index 75033a436..fec76214e 100644
--- a/themes/default/template/thumbnails.tpl
+++ b/themes/default/template/thumbnails.tpl
@@ -1,10 +1,25 @@
-{if !empty($thumbnails)}
-{strip}{foreach from=$thumbnails item=thumbnail}
+{if !empty($thumbnails)}{strip}
+{html_head}
+<style type="text/css">
+{*Set some sizes according to maximum thumbnail width and height*}
+.thumbnails SPAN,
+.thumbnails .wrap2 A,
+.thumbnails LABEL{ldelim}
+ width: {$derivative_params->max_width()}px;
+}
+
+.thumbnails .wrap2{ldelim}
+ height: {$derivative_params->max_height()+2}px;
+}
+
+</style>
+{/html_head}
+{foreach from=$thumbnails item=thumbnail}
<li>
<span class="wrap1">
<span class="wrap2">
<a href="{$thumbnail.URL}">
- <img class="thumbnail" src="{$thumbnail.TN_SRC}" alt="{$thumbnail.TN_ALT}" title="{$thumbnail.TN_TITLE}">
+ <img class="thumbnail" src="{$pwg->derivative_url($derivative_params, $thumbnail.src_image)}" alt="{$thumbnail.TN_ALT}" title="{$thumbnail.TN_TITLE}">
</a>
</span>
{if $SHOW_THUMBNAIL_CAPTION }