Changeset 28936


Ignore:
Timestamp:
Jul 3, 2014, 10:08:40 PM (10 years ago)
Author:
rvelices
Message:

modus

  • use a la gthumb captions instead of flyouts (code for popout is still available by changing a const in the code)
  • better album thumbs display for mobile (when there would be too much free space in the row)
  • menu categories display with squares (required only when menutree plugin is not active)
Location:
extensions/modus
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • extensions/modus/css/index.css.tpl

    r25794 r28936  
    3535}
    3636
     37{if $smarty.const.MODUS_POP}
     38.popDesc {
     39        display: none
     40}
     41{else}
     42.overDesc {
     43        color: white;
     44        background-color: rgba(0,0,0,0.5);
     45
     46        position: absolute;
     47        height: 1.5em;
     48        width: 100%;
     49        left: 0; /* for IE7, all others use 0 by default*/
     50        bottom: -100px;
     51        overflow: hidden;
     52        text-align: center;
     53        text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
     54        line-height: 1.4;
     55        font-weight: bold;
     56        white-space: nowrap;
     57        text-overflow: ellipsis;
     58        transition: all 200ms ease-out 0s;
     59}
     60
     61LI:hover>.overDesc {
     62        bottom: -1px; /* -1 for IE8 which has some rounding issues */
     63}
     64{/if}
     65
    3766
    3867
     
    163192}
    164193
     194{if $MODUS_ALBUM_THUMB_SIZE>222 && $MODUS_ALBUM_THUMB_SIZE<360}
     195@media (max-width:320px), {cssResolution min=1.3}{
     196        .albThumbs LI {
     197                width: 156px;
     198                height: 156px;
     199                margin: 5px 1px;
     200        }
     201}
     202{/if}
    165203
    166204
  • extensions/modus/css/menuh.css.tpl

    r25794 r28936  
    44        margin: 0; /*various default user agent css*/
    55}
     6
     7{if !isset($loaded_plugins['rv_menutree'])}
     8#mbCategories UL {
     9        list-style-type: square;
     10        padding-left: 8px;
     11}
     12{/if}
    613
    714#menubar LI.selected>A {
  • extensions/modus/template/thumbnails.tpl

    r25794 r28936  
    11{if !empty($thumbnails)}{strip}
    22{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}
    63{modus_thumbs}
    74{else}
  • extensions/modus/themeconf.inc.php

    r28745 r28936  
    1313);
    1414
     15define('MODUS_POP',0);
    1516define('MODUS_STR_RECENT', "\xe2\x9c\xbd"); //HEAVY TEARDROP-SPOKED ASTERISK
    1617define('MODUS_STR_RECENT_CHILD', "\xe2\x9c\xbb"); //TEARDROP-SPOKED ASTERISK
     
    2829                @$conf['modus_theme']['album_thumb_size'],
    2930                ImageStdParams::get_by_type(IMG_SQUARE)->max_width(),
     31                MODUS_POP
    3032        ))));
    3133
     
    207209        }
    208210
    209         $do_pop = 'desktop' == $device;
     211        $do_pop = MODUS_POP && 'desktop' == $device;
     212        $do_over = !MODUS_POP && 'desktop' == $device;
    210213
    211214        $new_icon = " <span class=albSymbol title=\"".l10n('posted on %s')."\">".MODUS_STR_RECENT.'</span>';
     
    241244                elseif ($csize[1] > $row_height)
    242245                        $csize = $c->get_scaled_size(9999, $row_height);
    243 ?>
     246                if ($do_pop) {?>
    244247<li style=width:<?=$csize[0]?>px;height:<?=$row_height?>px><a href="<?=$item['URL']?>"<?=$a_style?>><img src="<?=$c->get_url()?>" width=<?=$csize[0]?> height=<?=$csize[1]?> alt="<?=$item['TN_ALT']?>" data-pop='{"w":<?=$popsize[0]?>,"h":<?=$popsize[1]?>,"url":"<?=$pop->get_url()?>"}'></a><b class=popDesc><b><?=$item['NAME']?></b><?=$new?><br><?=$item['DESCRIPTION']?></b></li>
    245248<?php
     249                } elseif ($do_over) {?>
     250<li style=width:<?=$csize[0]?>px;height:<?=$row_height?>px><a href="<?=$item['URL']?>"<?=$a_style?>><img src="<?=$c->get_url()?>" width=<?=$csize[0]?> height=<?=$csize[1]?> alt="<?=$item['TN_ALT']?>"></a><div class=overDesc><?=$item['NAME']?><?=$new?></div></li>
     251<?php
     252                } else {?>
     253<li style=width:<?=$csize[0]?>px;height:<?=$row_height?>px><a href="<?=$item['URL']?>"<?=$a_style?>><img src="<?=$c->get_url()?>" width=<?=$csize[0]?> height=<?=$csize[1]?> alt="<?=$item['TN_ALT']?>"></a></li>
     254<?php
     255                }
    246256        }
    247257
     
    267277        $req = null;
    268278        $all = $template->scriptLoader->get_all();
    269         if (isset($all['modus.thumb.pop']) || 'desktop' != get_device())
     279        if (isset($all['modus.thumb.pop']) || !MODUS_POP || 'desktop' != get_device())
    270280                return;
    271281        foreach($all as $script)
Note: See TracChangeset for help on using the changeset viewer.