Changeset 17843


Ignore:
Timestamp:
Sep 10, 2012, 4:58:25 PM (8 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
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • extensions/stripped_black_bloc/local_head.tpl

    r17828 r17843  
    22{combine_script id='jquery.isotope' load='header' require='jquery' path='themes/stripped_black_bloc/js/isotope.js'}
    33{combine_script id='jquery.cookie' load='header' require='jquery' path='themes/stripped_black_bloc/js/jquery.ck.min.js'}
     4{assign var='one_column' value=$stripped_black_bloc.thumbnail_width}
     5{assign var='two_columns' value=$stripped_black_bloc.thumbnail_width+$stripped_black_bloc.column_width}
     6{assign var='three_columns' value=$stripped_black_bloc.thumbnail_width+$stripped_black_bloc.column_width+$stripped_black_bloc.column_width}
    47{html_style}{literal}
    5 #theHeader a, .titrePage a, .footer_login a, .navigationBar a, #calendar_block A  {
     8#theHeader a, .titrePage a, .footer_login a, .navigationBar a, #calendar_block A {
    69        color: {/literal}{if $stripped_black_bloc.color_main}#{$stripped_black_bloc.color_main}{/if}{literal};
    710}
    8 .bloc, .gmapsMarkup {
    9         max-width: {/literal}{if $stripped_black_bloc.thumbnail_width}{$stripped_black_bloc.thumbnail_width}{/if}{literal}px;
     11.album a {
     12  border: 1.5px solid #{/literal}{$stripped_black_bloc.color_main}{literal};
     13  margin:-2px;
    1014}
    11 .bloc a {
    12         max-width:{/literal}{if $stripped_black_bloc.thumbnail_width}{$stripped_black_bloc.thumbnail_width}{/if}{literal}px;
     15
     16.onecol, .gmapsMarkup, .onecol a {
     17        max-width: {/literal}{$one_column}{literal}px;
    1318}
    14 .bloc_big {
    15         max-width: {/literal}{if $stripped_black_bloc.thumbnail_width}{$stripped_black_bloc.thumbnail_width+$stripped_black_bloc.column_width}{/if}{literal}px;
     19.twocol, .twocol a {
     20        max-width: {/literal}{$two_columns}{literal}px;
    1621}
    17 .bloc_big a {
    18         max-width:{/literal}{if $stripped_black_bloc.thumbnail_width}{$stripped_black_bloc.thumbnail_width+$stripped_black_bloc.column_width}{/if}{literal}px;
     22.threecol, .threecol a {
     23        max-width: {/literal}{$three_columns}{literal}px;
    1924}
    20 .bloc_wide {
    21         max-width: {/literal}{if $stripped_black_bloc.thumbnail_width}{$stripped_black_bloc.thumbnail_width+$stripped_black_bloc.column_width+$stripped_black_bloc.column_width}{/if}{literal}px;
    22 }
    23 .bloc_wide a {
    24         max-width:{/literal}{if $stripped_black_bloc.thumbnail_width}{$stripped_black_bloc.thumbnail_width+$stripped_black_bloc.column_width+$stripped_black_bloc.column_width}{/if}{literal}px;
     25.stuffs_thumbnails, .stuffs_thumbnails #thumbnails, .one_column {
     26        width:{/literal}{$one_column}{literal}px;
    2527}
    2628.content_block, .bloc_stuff, .two_columns {
    27         width:{/literal}{if $stripped_black_bloc.thumbnail_width}{$stripped_black_bloc.column_width*2-20}{/if}{literal}px;
     29        width:{/literal}{$two_columns}{literal}px;
    2830}
    29 .stuffs_thumbnails, .stuffs_thumbnails #thumbnails, .one_column {
    30         width:{/literal}{if $stripped_black_bloc.thumbnail_width}{$stripped_black_bloc.thumbnail_width-10 }{/if}{literal}px;
     31.bloc_stuff #comments ul.commentList {
     32        width:{/literal}{$two_columns-30}{literal}px;
    3133}
    32 .bloc, .bloc_big {
     34.content_block, #the_page .middle_block {
     35  margin-left:5px !important;
     36{/literal}
     37    margin-top: {math equation="( x - y )/2" y=$stripped_black_bloc.thumbnail_width x=$stripped_black_bloc.column_width}px !important;
     38                margin-bottom:{math equation="( x - y )/2" y=$stripped_black_bloc.thumbnail_width x=$stripped_black_bloc.column_width}px !important;
     39{literal}
     40}
     41.bloc, .stuffs_thumbnails, .stuffs_thumbnails #thumbnails {
    3342{/literal}
    3443    margin-top: {math equation="( x - y - 10)/2" y=$stripped_black_bloc.thumbnail_width x=$stripped_black_bloc.column_width}px;
  • 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}
  • extensions/stripped_black_bloc/theme.css

    r16790 r17843  
    133133width: auto !important;
    134134}
    135 .bloc, .bloc_big {
     135.bloc {
    136136    display: block;
    137137    margin-top: 3px;
     
    149149    z-index: 1100;
    150150}
    151 .bloc *, .bloc_big * {
     151.bloc * {
    152152    position: relative;
    153153}
    154 .bloc .title, .bloc_big .title {
     154.bloc .title {
    155155    left: 6px;
    156156    max-width: 138px;
     
    165165    padding: 7px 10px 8px;
    166166}
    167 .bloc a, .bloc_big a {
     167.bloc a {
    168168    display: block;
    169169    overflow: hidden;
     
    189189}
    190190#subcontent .stuffs_block #comments ul.thumbnailCategories, #comments ul {
    191         padding:20px;
    192     display: inline-block;
     191        padding:5px;
     192  display: inline-block;
    193193}
    194194#subcontent .stuffs_block, .content_block {
     
    214214    text-decoration: none;
    215215}
    216 .masonry-brick, .bloc .title, .bloc_big .title, .nav_bulle {
     216.masonry-brick, .bloc .title, .nav_bulle {
    217217        color: #FFFFFF;
    218218        background-image: url("img/btn.png");
     
    227227
    228228}
    229 .bloc a, .bloc_big a {
    230     border-radius: 5px 5px 5px 5px;
    231 }
    232 .thumbnails .bloc a, .thumbnails .bloc_big a {
     229.bloc a {
     230  border-radius: 5px 5px 5px 5px;
    233231  box-shadow: 0 5px 5px rgba(0, 0, 0, 0.75);
    234232  -webkit-box-shadow: 0 5px 5px rgba(0,0,0,0.75);
     
    242240}
    243241.album {
    244         background-color:#595959;
    245 }
    246 
    247 .content_block .additional_info {
    248         color:inherit;
    249         background: none;
    250         border:none;
    251 }
     242        background-color:transparent;
     243}
     244
    252245.bloc_stuff {
    253246        border: 1px solid #424242;
     
    285278        padding:5px;
    286279}
     280.content_block .additional_info {
     281        color: #FFFFFF;
     282        background-image: url("img/btn.png");
     283        background-color:transparent;
     284        border-radius: 5px 5px 5px 5px;
     285        font-family: Helvetica,Arial,sans-serif;
     286        text-decoration: none;
     287        white-space: normal;
     288        border: 1px solid #424242;
     289        padding:5px;
     290}
     291.bloc_stuff {
     292        color: #FFFFFF;
     293        background-image: url("img/btn.png");
     294        background-color:transparent;
     295        border-radius: 5px 5px 5px 5px;
     296        font-family: Helvetica,Arial,sans-serif;
     297        text-decoration: none;
     298        white-space: normal;
     299        border: 1px solid #424242;
     300}
    287301.titrePage .categoryActions {
    288302        color: #FFFFFF;
  • extensions/stripped_black_bloc/themeconf.inc.php

    r16790 r17843  
    6464  foreach ($tpl_thumbnails_var as $tplvar)
    6565  {
    66     $tplvar['TN_CLASS']=($i==$config['starting_to']) ? "bloc_big" : "bloc";
     66    $tplvar['TN_CLASS']=($i==$config['starting_to']) ? "twocol" : "onecol";
    6767    $new_tplvar[]=$tplvar;
    6868    $i= ($i==$config['every_x']) ? 1 : $i+1 ;
Note: See TracChangeset for help on using the changeset viewer.