Changeset 16984


Ignore:
Timestamp:
Jul 24, 2012, 8:09:45 PM (8 years ago)
Author:
flop25
Message:

merge r16800 & r16799 from trunk to 2.4 branch

bug:2688
changing padding margin...
+10 px for .thumbnailCategory .description using a prefilter

changing the padding
adding a prefilter to a height for .thumbnailCategory .description .text

Location:
branches/2.4/themes/Sylvia
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2.4/themes/Sylvia/theme.css

    r14610 r16984  
    195195.thumbnailCategory .illustration {
    196196        background:transparent url(images/cat_top-left.gif) no-repeat scroll left top;
    197         padding: 0 0 0 10px;
    198         margin: 0 !important;
     197        padding: 0 5px 0 10px;
     198        margin: 0 !important;
     199  text-align: center;
    199200}
    200201.thumbnailCategory .illustration a {
    201202        display: block;
    202         margin: 0;
    203         padding:20px 0 0 8px;
     203  margin: 0 auto;
     204  padding: 20px 4px 0;
    204205  border:0;
    205206}
     
    208209        margin: 0;
    209210        padding:15px 10px 3px 0;
    210         overflow-x: hidden !important;
     211        overflow: hidden !important;
    211212  height:158px;
    212213}
  • branches/2.4/themes/Sylvia/themeconf.inc.php

    r10351 r16984  
    1414  'mime_icon_dir' => 'themes/Sylvia/icon/mimetypes/',
    1515);
     16/************************************ mainpage_categories.tpl ************************************/
     17add_event_handler('loc_end_index_category_thumbnails', 'Sylvia_album');
     18function Sylvia_album($tpl_thumbnails_var)
     19{
     20    global $template;
     21    $template->set_prefilter('index_category_thumbnails', 'Sylvia_album_prefilter');
     22    return $tpl_thumbnails_var;
     23}
     24function Sylvia_album_prefilter($content, &$smarty)
     25{
     26  $search = '#\{html_style\}#';
     27  $replacement = '{html_style}
     28.thumbnailCategory .description .text{ldelim}
     29        height: {$derivative_params->max_height()-30}px;
     30}';
     31  $content = preg_replace($search, $replacement, $content);
     32  $search = '#\.thumbnailCategory[\t ]*.description\{ldelim\}[\s]*height:[\t ]*\{\$derivative_params->max_height\(\)\+5#';
     33  $replacement = '.thumbnailCategory .description{ldelim}
     34        height: {$derivative_params->max_height()+15';
     35  $content = preg_replace($search, $replacement, $content);
     36  return $content;
     37}
    1638?>
Note: See TracChangeset for help on using the changeset viewer.