Changeset 935868
- Timestamp:
- 06/20/2014 08:10:15 PM (12 years ago)
- Location:
- el-gallery
- Files:
-
- 16 added
- 6 edited
-
tags/0.94 (added)
-
tags/0.94/css (added)
-
tags/0.94/css/el-gallery.css (added)
-
tags/0.94/css/el-gallery_admin.css (added)
-
tags/0.94/el-gallery-admin.php (added)
-
tags/0.94/el-gallery.php (added)
-
tags/0.94/images (added)
-
tags/0.94/images/loading.gif (added)
-
tags/0.94/js (added)
-
tags/0.94/js/el-gallery.js (added)
-
tags/0.94/languages (added)
-
tags/0.94/languages/el-gallery-fr_FR.mo (added)
-
tags/0.94/languages/el-gallery-fr_FR.pot (added)
-
tags/0.94/languages/el-gallery.mo (added)
-
tags/0.94/languages/el-gallery.pot (added)
-
tags/0.94/readme.txt (added)
-
trunk/css/el-gallery.css (modified) (3 diffs)
-
trunk/css/el-gallery_admin.css (modified) (1 diff)
-
trunk/el-gallery-admin.php (modified) (1 diff)
-
trunk/el-gallery.php (modified) (3 diffs)
-
trunk/js/el-gallery.js (modified) (5 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
el-gallery/trunk/css/el-gallery.css
r935018 r935868 3 3 Plugin URI: http://ericlowry.fr/ 4 4 Description: An extremely simplistic gallery replacement plugin. 5 Version: 0.9 35 Version: 0.94 6 6 Author: Eric Lowry 7 7 Author URI: http://ericlowry.fr/ … … 10 10 11 11 figure.el_gallery { 12 overflow: hidden;12 overflow: hidden; 13 13 width: 100%; 14 14 } … … 34 34 } 35 35 figure.el_gallery figcaption.el_gallery-thumbnails_wrapper img { 36 height: 0; 36 37 transition: .6s; 37 opacity:0.4; 38 filter:alpha(opacity=40); 38 opacity: .4; 39 filter: alpha(opacity=40); 40 overflow: hidden; 39 41 cursor: pointer; 40 42 } 41 43 figure.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); 44 46 } 45 47 figure.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); 48 50 box-shadow: 1px 1px 4px #000; 49 51 } -
el-gallery/trunk/css/el-gallery_admin.css
r935018 r935868 3 3 Plugin URI: http://ericlowry.fr/ 4 4 Description: An extremely simplistic gallery replacement plugin. 5 Version: 0.9 35 Version: 0.94 6 6 Author: Eric Lowry 7 7 Author URI: http://ericlowry.fr/ -
el-gallery/trunk/el-gallery-admin.php
r935018 r935868 3 3 Plugin: EL-Gallery 4 4 Description: An extremely simplistic gallery replacement plugin. 5 Version: 0.9 35 Version: 0.94 6 6 Author: Eric Lowry 7 7 Author URI: http://ericlowry.fr/ -
el-gallery/trunk/el-gallery.php
r935018 r935868 4 4 Plugin URI: http://wordpress.org/plugins/el-gallery/ 5 5 Description: An extremely simplistic gallery replacement plugin. 6 Version: 0.9 36 Version: 0.94 7 7 Author: Eric Lowry 8 8 Author URI: http://ericlowry.fr/ … … 11 11 12 12 TODO : 13 -> Make multiple-line thumbnails centered14 13 -> Set up a max-height (or two, depending on the switch width) for tall images 15 14 -> Add an option to choose quality of link-images … … 141 140 } 142 141 142 if (wpmd_is_notphone()) { 143 $thumbs_size = "10%"; 144 } else { 145 $thumbs_size = "16%"; 146 } 147 143 148 $print_gallery .= '<figcaption class="el_gallery-thumbnails_wrapper" style="padding-left:'.$thumbs_padding.'%;">'; 144 149 foreach ( $images as $image ) { -
el-gallery/trunk/js/el-gallery.js
r935018 r935868 3 3 Plugin URI: http://ericlowry.fr/ 4 4 Description: An extremely simplistic gallery replacement plugin. 5 Version: 0.9 35 Version: 0.94 6 6 Author: Eric Lowry 7 7 Author URI: http://ericlowry.fr/ … … 58 58 setTimeout(function(){ 59 59 $('.el_gallery-slideshow_wrapper',curr_gallery).css('background-image','none'); 60 $('.el_gallery-thumbnails_wrapper img',curr_gallery).css('height', 'auto'); 60 61 startloop(cntmax,cnt,false,duration,curr_gallery); 61 62 }, 1000); // the image has loaded, we display it … … 104 105 105 106 106 // We check the thumbnails padding on load and resize107 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 }120 107 // We set up the function to center extra thumbnails 121 108 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, 123 110 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; 128 119 } 129 120 var full_lines = Math.floor(count / num), 130 121 count_extra = ((count / num) - full_lines) * num, 122 other_full_lines = Math.floor(count / other_num), 131 123 curr_count = 0; 132 124 $('.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); 135 129 var thumb_margin = thumb_margin_num + "%"; 136 130 $(this).css('margin-left', thumb_margin); … … 144 138 $(window).resize(function(){ 145 139 if (centered == "true") { 146 gallery_padding(curr_gallery);147 140 center_thumbnails(curr_gallery); 148 141 } … … 159 152 $(document).ready(function(){ 160 153 if (centered == "true") { 161 gallery_padding(switch_width,curr_gallery);154 $('.el_gallery-thumbnails_wrapper',curr_gallery).css('padding-left', '0'); 162 155 center_thumbnails(curr_gallery); 163 156 } -
el-gallery/trunk/readme.txt
r935556 r935868 10 10 Tested up to: 3.9.1 11 11 Stable tag: 1.0 12 Version: 0.9 312 Version: 0.94 13 13 License: GPLv2 14 14 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 60 60 == Changelog == 61 61 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 62 67 = Version 0.93 = 63 68 * Added options to center thumbnails or leave them aligned to the left.
Note: See TracChangeset
for help on using the changeset viewer.