Plugin Directory

Changeset 935868


Ignore:
Timestamp:
06/20/2014 08:10:15 PM (12 years ago)
Author:
Eric Lowry
Message:

Version 0.94

Location:
el-gallery
Files:
16 added
6 edited

Legend:

Unmodified
Added
Removed
  • el-gallery/trunk/css/el-gallery.css

    r935018 r935868  
    33Plugin URI: http://ericlowry.fr/
    44Description: An extremely simplistic gallery replacement plugin.
    5 Version: 0.93
     5Version: 0.94
    66Author: Eric Lowry
    77Author URI: http://ericlowry.fr/
     
    1010
    1111figure.el_gallery {
    12     overflow:hidden;
     12    overflow: hidden;
    1313    width: 100%;
    1414}
     
    3434}
    3535figure.el_gallery figcaption.el_gallery-thumbnails_wrapper img {
     36    height: 0;
    3637    transition: .6s;
    37     opacity:0.4;
    38     filter:alpha(opacity=40);
     38    opacity: .4;
     39    filter: alpha(opacity=40);
     40    overflow: hidden;
    3941    cursor: pointer;
    4042}
    4143figure.el_gallery figcaption.el_gallery-thumbnails_wrapper img.current, figure.el_gallery figcaption.el_gallery-thumbnails_wrapper img:hover, figure.el_gallery figcaption.el_gallery-thumbnails_wrapper img:active {
    42     opacity:.8;
    43     filter:alpha(opacity=80);
     44    opacity: .8;
     45    filter: alpha(opacity=80);
    4446}
    4547figure.el_gallery figcaption.el_gallery-thumbnails_wrapper img:hover, figure.el_gallery figcaption.el_gallery-thumbnails_wrapper img:active {
    46     opacity:1;
    47     filter:alpha(opacity=100);
     48    opacity: 1;
     49    filter: alpha(opacity=100);
    4850    box-shadow: 1px 1px 4px #000;
    4951}
  • el-gallery/trunk/css/el-gallery_admin.css

    r935018 r935868  
    33Plugin URI: http://ericlowry.fr/
    44Description: An extremely simplistic gallery replacement plugin.
    5 Version: 0.93
     5Version: 0.94
    66Author: Eric Lowry
    77Author URI: http://ericlowry.fr/
  • el-gallery/trunk/el-gallery-admin.php

    r935018 r935868  
    33Plugin: EL-Gallery
    44Description: An extremely simplistic gallery replacement plugin.
    5 Version: 0.93
     5Version: 0.94
    66Author: Eric Lowry
    77Author URI: http://ericlowry.fr/
  • el-gallery/trunk/el-gallery.php

    r935018 r935868  
    44Plugin URI: http://wordpress.org/plugins/el-gallery/
    55Description: An extremely simplistic gallery replacement plugin.
    6 Version: 0.93
     6Version: 0.94
    77Author: Eric Lowry
    88Author URI: http://ericlowry.fr/
     
    1111
    1212TODO :
    13  -> Make multiple-line thumbnails centered
    1413 -> Set up a max-height (or two, depending on the switch width) for tall images
    1514 -> Add an option to choose quality of link-images
     
    141140    }
    142141
     142    if (wpmd_is_notphone()) {
     143        $thumbs_size = "10%";
     144    } else {
     145        $thumbs_size = "16%";
     146    }
     147
    143148    $print_gallery .= '<figcaption class="el_gallery-thumbnails_wrapper" style="padding-left:'.$thumbs_padding.'%;">';
    144149    foreach ( $images as $image ) {
  • el-gallery/trunk/js/el-gallery.js

    r935018 r935868  
    33Plugin URI: http://ericlowry.fr/
    44Description: An extremely simplistic gallery replacement plugin.
    5 Version: 0.93
     5Version: 0.94
    66Author: Eric Lowry
    77Author URI: http://ericlowry.fr/
     
    5858                        setTimeout(function(){
    5959                            $('.el_gallery-slideshow_wrapper',curr_gallery).css('background-image','none');
     60                            $('.el_gallery-thumbnails_wrapper img',curr_gallery).css('height', 'auto');
    6061                            startloop(cntmax,cnt,false,duration,curr_gallery);
    6162                        }, 1000); // the image has loaded, we display it
     
    104105
    105106
    106             // We check the thumbnails padding on load and resize
    107             function gallery_padding(switch_width,curr_gallery) {
    108                 var count = $('.el_gallery-slideshow_wrapper img',curr_gallery).length,
    109                     window_width = $(window).width(),
    110                     thumbs_padding = 0;
    111                 if ( count  < 5 && window_width < switch_width ) {
    112                     padding_width = (100 - count * 20) / 2;
    113                     thumbs_padding = padding_width + '%';
    114                 } else if ( count  < 8 && window_width > ( switch_width - 1 ) ) {
    115                     padding_width = (100 - count * 12.5) / 2;
    116                     thumbs_padding = padding_width + '%';
    117                 }
    118                 $('.el_gallery-thumbnails_wrapper',curr_gallery).css('padding-left', thumbs_padding);
    119             }
    120107            // We set up the function to center extra thumbnails
    121108            function center_thumbnails(curr_gallery) {
    122                 var count = count = $('.el_gallery-slideshow_wrapper img',curr_gallery).length,
     109                var count = $('.el_gallery-slideshow_wrapper img',curr_gallery).length,
    123110                window_width = $(window).width();
    124                 if ( count  > 5 && window_width < switch_width ) {
    125                     num = 5;
    126                 } else if ( count  > 8 && window_width > ( switch_width - 1 ) ) {
    127                     num = 8;
     111                if ( window_width < switch_width ) {
     112                    var num = 5,
     113                        other_num = 8,
     114                        thumb_elem_width = 20;
     115                } else {
     116                    var num = 8,
     117                        other_num = 5,
     118                        thumb_elem_width = 12.25;
    128119                }
    129120                var full_lines = Math.floor(count / num),
    130121                    count_extra = ((count / num) - full_lines) * num,
     122                    other_full_lines = Math.floor(count / other_num),
    131123                    curr_count = 0;
    132124                $('.el_gallery-thumbnails_wrapper img',curr_gallery).each(function() {
    133                     if (curr_count == (full_lines * num)) {
    134                         var thumb_margin_num = 1.25 + ((100 - (count_extra * 12.5)) / 2);
     125                    if (curr_count == (other_full_lines * other_num)) {
     126                        $(this).css('margin-left', '1.25%');
     127                    }if (curr_count == (full_lines * num)) {
     128                        var thumb_margin_num = 1.25 + ((100 - (count_extra * thumb_elem_width)) / 2);
    135129                        var thumb_margin = thumb_margin_num + "%";
    136130                        $(this).css('margin-left', thumb_margin);
     
    144138            $(window).resize(function(){
    145139                if (centered == "true") {
    146                     gallery_padding(curr_gallery);
    147140                    center_thumbnails(curr_gallery);
    148141                }
     
    159152            $(document).ready(function(){
    160153                if (centered == "true") {
    161                     gallery_padding(switch_width,curr_gallery);
     154                    $('.el_gallery-thumbnails_wrapper',curr_gallery).css('padding-left', '0');
    162155                    center_thumbnails(curr_gallery);
    163156                }
  • el-gallery/trunk/readme.txt

    r935556 r935868  
    1010Tested up to: 3.9.1
    1111Stable tag: 1.0
    12 Version: 0.93
     12Version: 0.94
    1313License: GPLv2
    1414License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    6060== Changelog ==
    6161
     62= Version 0.94 =
     63* Thumbnails only appear once the gallery is loaded.
     64* Fixed thumbnail centering when page is resized.
     65* Optimized thumbnail centering.
     66
    6267= Version 0.93 =
    6368* Added options to center thumbnails or leave them aligned to the left.
Note: See TracChangeset for help on using the changeset viewer.