1 | {if !empty($thumbnails)}{strip} |
---|
2 | {if $derivative_params->max_width()/$derivative_params->max_height() > 1.5 || ($derivative_params->max_height()<400 && !$derivative_params->sizing->max_crop)} |
---|
3 | {html_style}{literal} |
---|
4 | .popDesc{display:none} |
---|
5 | {/literal}{/html_style} |
---|
6 | {modus_thumbs} |
---|
7 | {else} |
---|
8 | {if $smarty.const.IMG_SQUARE == $derivative_params->type}{assign var='SHOW_THUMBNAIL_CAPTION' value=false}{/if} |
---|
9 | {html_style} |
---|
10 | {*Set some sizes according to maximum thumbnail width and height*} |
---|
11 | .thumbnails SPAN,.thumbnails .wrap2 A{ |
---|
12 | width:{$derivative_params->max_width()+2}px |
---|
13 | } |
---|
14 | .thumbnails .wrap2{ |
---|
15 | height:{$derivative_params->max_height()+3}px |
---|
16 | } |
---|
17 | |
---|
18 | @media {cssResolution min=1.3 max=1.7}{ |
---|
19 | .thumbnails SPAN,.thumbnails .wrap2 A{ |
---|
20 | width:{($derivative_params->max_width()/1.5+2)|intval}px |
---|
21 | } |
---|
22 | .thumbnails .wrap2{ |
---|
23 | height:{($derivative_params->max_height()/1.5+3)|intval}px |
---|
24 | } |
---|
25 | .thumbnails .wrap2 IMG{ |
---|
26 | max-width:{($derivative_params->max_width()/1.5)|intval}px; |
---|
27 | max-height:{($derivative_params->max_height()/1.5)|intval}px; |
---|
28 | } |
---|
29 | } |
---|
30 | |
---|
31 | @media {cssResolution min=1.7 max=2.5}{ |
---|
32 | .thumbnails SPAN,.thumbnails .wrap2 A{ |
---|
33 | width:{($derivative_params->max_width()/2+2)|intval}px |
---|
34 | } |
---|
35 | .thumbnails .wrap2{ |
---|
36 | height:{($derivative_params->max_height()/2+3)|intval}px |
---|
37 | } |
---|
38 | .thumbnails .wrap2 IMG{ |
---|
39 | max-width:{($derivative_params->max_width()/2)|intval}px; |
---|
40 | max-height:{($derivative_params->max_height()/2)|intval}px; |
---|
41 | } |
---|
42 | } |
---|
43 | |
---|
44 | @media {cssResolution min=2.5 max=2.5}{ |
---|
45 | .thumbnails SPAN,.thumbnails .wrap2 A{ |
---|
46 | width:{($derivative_params->max_width()/3+2)|intval}px |
---|
47 | } |
---|
48 | .thumbnails .wrap2{ |
---|
49 | height:{($derivative_params->max_height()/3+3)|intval}px |
---|
50 | } |
---|
51 | .thumbnails .wrap2 IMG{ |
---|
52 | max-width:{($derivative_params->max_width()/3)|intval}px; |
---|
53 | max-height:{($derivative_params->max_height()/3)|intval}px; |
---|
54 | } |
---|
55 | } |
---|
56 | |
---|
57 | {*=== If we cannot fit two images per width (1 comes from border, 7 comes from css li margin)===*} |
---|
58 | @media |
---|
59 | {$maxw=(2+2*($derivative_params->max_width()+1+7))|intval} |
---|
60 | {cssResolution base='(max-width:'|cat:$maxw|cat:'px)' max=1}, |
---|
61 | {$maxw=(2+2*($derivative_params->max_width()/1.5+1+7))|intval} |
---|
62 | {cssResolution base='(max-width:'|cat:$maxw|cat:'px)' min=1.3 max=1.7}, |
---|
63 | {$maxw=(2+2*($derivative_params->max_width()/2+1+7))|intval} |
---|
64 | {cssResolution base='(max-width:'|cat:$maxw|cat:'px)' min=1.7 max=2.5}, |
---|
65 | {$maxw=(2+2*($derivative_params->max_width()/3+1+7))|intval} |
---|
66 | {cssResolution base='(max-width:'|cat:$maxw|cat:'px)' min=2.5}{ |
---|
67 | .thumbnails .wrap2{ |
---|
68 | height:auto; |
---|
69 | border:0 |
---|
70 | } |
---|
71 | .thumbnails .thumbLegend{ |
---|
72 | height:auto; |
---|
73 | min-height:4em; |
---|
74 | overflow:visible; |
---|
75 | } |
---|
76 | } |
---|
77 | |
---|
78 | {*=== If we cannot fit one image per width===*} |
---|
79 | @media |
---|
80 | {$maxw=(2+($derivative_params->max_width()+1+7))|intval} |
---|
81 | {cssResolution base='(max-width:'|cat:$maxw|cat:'px)' max=1}, |
---|
82 | {$maxw=(2+($derivative_params->max_width()/1.5+1+7))|intval} |
---|
83 | {cssResolution base='(max-width:'|cat:$maxw|cat:'px)' min=1.3 max=1.7}, |
---|
84 | {$maxw=(2+($derivative_params->max_width()/2+1+7))|intval} |
---|
85 | {cssResolution base='(max-width:'|cat:$maxw|cat:'px)' min=1.7 max=2.5}, |
---|
86 | {$maxw=(2+($derivative_params->max_width()/3+1+7))|intval} |
---|
87 | {cssResolution base='(max-width:'|cat:$maxw|cat:'px)' min=2.5}{ |
---|
88 | .thumbnails .wrap1{ |
---|
89 | margin:0 0 5px |
---|
90 | } |
---|
91 | .thumbnails .wrap2{ |
---|
92 | display:block |
---|
93 | } |
---|
94 | .thumbnails SPAN, .thumbnails .wrap2 A{ |
---|
95 | max-width:99.8% |
---|
96 | } |
---|
97 | .thumbnails .wrap2 IMG{ |
---|
98 | max-width:100% |
---|
99 | } |
---|
100 | } |
---|
101 | {if $derivative_params->max_width() > 400} |
---|
102 | .thumbLegend {ldelim}font-size: 110%} |
---|
103 | {else} |
---|
104 | .thumbLegend {ldelim}font-size: 90%} |
---|
105 | {/if} |
---|
106 | {/html_style} |
---|
107 | {foreach from=$thumbnails item=thumbnail} |
---|
108 | <li> |
---|
109 | <span class="wrap1"> |
---|
110 | <span class="wrap2"> |
---|
111 | <a href="{$thumbnail.URL}"> |
---|
112 | {assign var=derivative value=$pwg->derivative($derivative_params, $thumbnail.src_image)} |
---|
113 | <img src="{$derivative->get_url()}"{* {$derivative->get_size_htm()}*} alt="{$thumbnail.TN_ALT}" title="{$thumbnail.TN_TITLE}"> |
---|
114 | </a> |
---|
115 | </span> |
---|
116 | {if $SHOW_THUMBNAIL_CAPTION } |
---|
117 | <div class="thumbLegend"> |
---|
118 | {$thumbnail.NAME} |
---|
119 | {if !empty($thumbnail.icon_ts)} |
---|
120 | <img title="{$thumbnail.icon_ts.TITLE}" src="{$ROOT_URL}{$themeconf.icon_dir}/recent.png" alt="(!)"> |
---|
121 | {/if} |
---|
122 | {if isset($thumbnail.NB_COMMENTS)} |
---|
123 | <span class="{if 0==$thumbnail.NB_COMMENTS}zero {/if}nb-comments"> |
---|
124 | <br> |
---|
125 | {$thumbnail.NB_COMMENTS|@translate_dec:'%d comment':'%d comments'} |
---|
126 | </span> |
---|
127 | {/if} |
---|
128 | |
---|
129 | {if isset($thumbnail.NB_HITS)} |
---|
130 | <span class="{if 0==$thumbnail.NB_HITS}zero {/if}nb-hits"> |
---|
131 | <br> |
---|
132 | {$thumbnail.NB_HITS|@translate_dec:'%d hit':'%d hits'} |
---|
133 | </span> |
---|
134 | {/if} |
---|
135 | <span class="thumbDesc"><br>{$thumbnail.DESCRIPTION}</span> |
---|
136 | </div> |
---|
137 | {/if} |
---|
138 | </span> |
---|
139 | </li> |
---|
140 | {/foreach} |
---|
141 | {/if} |
---|
142 | {/strip}{/if} |
---|