Ignore:
Timestamp:
Sep 10, 2012, 4:58:25 PM (12 years ago)
Author:
flop25
Message:

code simplification
margin and width adjusted for stuff blocs and descriptions
shadow added for stuffs_thumbnails.tpl
managment of pictures which have a smaller width than the wanted block
no more grey border for album thumbnails : colored border
etc

Location:
extensions/stripped_black_bloc/template
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • extensions/stripped_black_bloc/template/mainpage_categories.tpl

    r17828 r17843  
    1010    {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_wide, $cat.representative.src_image)}
    1111    {assign var='size' value=$derivative->get_size()}
    12         <div class="bloc_big album">
     12        <div class="bloc twocol album">
    1313                        <a href="{$cat.URL}" style="background: url({$derivative->get_url()}) no-repeat scroll center center transparent; height: {$size[1]}px; width: {$size[0]}px; opacity: 0.75;" >
    1414                                {$cat.NAME}
     
    1818  {else}
    1919    {if $cat.representative.width < $cat.representative.height and $stripped_black_bloc.catthumb=="yes"}
    20       {if $cat.TN_CLASS=="bloc_big" and $stripped_black_bloc.catthumb=="same"}
     20      {if $cat.TN_CLASS=="twocol" and $stripped_black_bloc.catthumb=="same"}
    2121        {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_big_vert, $cat.representative.src_image)}
    2222      {elseif $stripped_black_bloc.catthumb=="all"}
     
    2626      {/if}
    2727    {else}
    28       {if $cat.TN_CLASS=="bloc_big" and $stripped_black_bloc.catthumb=="same"}
     28      {if $cat.TN_CLASS=="twocol" and $stripped_black_bloc.catthumb=="same"}
    2929        {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_big, $cat.representative.src_image)}
    3030      {elseif $stripped_black_bloc.catthumb=="all"}
     
    3535    {/if}
    3636    {assign var='size' value=$derivative->get_size()}
    37         <div class="{if $stripped_black_bloc.catthumb=="all"}bloc_big{else}{$cat.TN_CLASS}{/if} album">
     37        <div class="bloc {if $stripped_black_bloc.catthumb=="all"}twocol{else}{$cat.TN_CLASS}{/if} album">
    3838                        <a href="{$cat.URL}" style="background: url({$derivative->get_url()}) no-repeat scroll center center transparent; height: {$size[1]}px; width: {$size[0]}px; opacity: 0.75;" >
    3939                                {$cat.NAME}
  • extensions/stripped_black_bloc/template/stuffs_thumbnails.tpl

    r17740 r17843  
    77    {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc, $thumbnail.src_image)}
    88    {assign var='size' value=$derivative->get_size()}
    9 <div class="{$thumbnail.TN_CLASS}">
     9<div class="bloc {$thumbnail.TN_CLASS}">
    1010  <a href="{$thumbnail.URL}" style="background: url({if $derivative->is_cached()}{$derivative->get_url()}{else}{$ROOT_URL}{$themeconf.img_dir}/loading.gif{/if}) no-repeat scroll center center transparent; height: {$size[1]}px; width: {$size[0]}px; opacity: 0.75;" {if !$derivative->is_cached()}data-src="{$derivative->get_url()}"{/if}>
    1111    {if isset($thumbnail.NAME)}{$thumbnail.NAME}{else}{$thumbnail.TN_TITLE}{/if}
    1212  </a>
    13   {if $SHOW_THUMBNAIL_CAPTION }
    1413  <div class="title">{if isset($block.TITLE)}{$block.TITLE}{elseif isset($thumbnail.NAME)}{$thumbnail.NAME}{/if}</div>
    15   {/if}
    1614</div>
    1715  {/foreach}
  • extensions/stripped_black_bloc/template/thumbnails.tpl

    r17828 r17843  
    99  {foreach from=$thumbnails item=thumbnail}
    1010   {assign var=triplehigh value=$thumbnail.height+$thumbnail.height+$thumbnail.height}
    11    {if ($thumbnail.width > $triplehigh) }
     11   {if ($thumbnail.width > $triplehigh) and ($thumbnail.width>$stripped_black_bloc.thumbnail_width+$stripped_black_bloc.column_width+$stripped_black_bloc.column_width)}
    1212    {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_wide, $thumbnail.src_image)}
    1313    {assign var='size' value=$derivative->get_size()}
    14   <div class="bloc bloc_wide">
     14  <div class="bloc threecol">
    1515    <a href="{$thumbnail.URL}" style="background: url({if $derivative->is_cached()}{$derivative->get_url()}{else}{$ROOT_URL}{$themeconf.img_dir}/loading.gif{/if}) no-repeat scroll center center transparent; height: {$size[1]}px; width: {$size[0]}px; opacity: 0.75;" {if !$derivative->is_cached()}data-src="{$derivative->get_url()}"{/if}>
    1616    {if isset($thumbnail.NAME)}{$thumbnail.NAME}{else}{$thumbnail.TN_TITLE}{/if}
     
    2222  {else}
    2323    {if (($thumbnail.width < $thumbnail.height) and $stripped_black_bloc.portrait_limitation=="yes")}
    24       {if $thumbnail.TN_CLASS=="bloc"}
     24      {if $thumbnail.TN_CLASS=="twocol" and $thumbnail.width>$stripped_black_bloc.thumbnail_width+$stripped_black_bloc.column_width}
     25        {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_big_vert, $thumbnail.src_image)}
     26      {else}
    2527        {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_vert, $thumbnail.src_image)}
    26       {else}
    27         {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_big_vert, $thumbnail.src_image)}
    2828      {/if}
    2929    {else}
    30       {if $thumbnail.TN_CLASS=="bloc"}
    31        {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc, $thumbnail.src_image)}
     30      {if $thumbnail.TN_CLASS=="twocol" and $thumbnail.width>$stripped_black_bloc.thumbnail_width+$stripped_black_bloc.column_width}
     31        {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_big, $thumbnail.src_image)}
    3232      {else}
    33        {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_big, $thumbnail.src_image)}
     33        {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc, $thumbnail.src_image)}
    3434      {/if}
    3535  {/if}
    3636     {assign var='size' value=$derivative->get_size()}
    37      <div class="{$thumbnail.TN_CLASS}">
     37     <div class="bloc {$thumbnail.TN_CLASS}">
    3838<a href="{$thumbnail.URL}" style="background: url({if $derivative->is_cached()}{$derivative->get_url()}{else}{$ROOT_URL}{$themeconf.img_dir}/loading.gif{/if}) no-repeat scroll center center transparent; height: {$size[1]}px; width: {$size[0]}px; opacity: 0.75;" {if !$derivative->is_cached()}data-src="{$derivative->get_url()}"{/if}>
    3939    {if isset($thumbnail.NAME)}{$thumbnail.NAME}{else}{$thumbnail.TN_TITLE}{/if}
Note: See TracChangeset for help on using the changeset viewer.