PageSourceSearch

http://www.ensemble-nautilis.org/wp-content/plugins/go-gallery-tags/assets/js/go-gallery.js?ver=1.1

js ensemble-nautilis.org collected 2026-10-02 08:13:37 UTC 5,658 bytes, 142 lines download raw bytes

1/**
2 * <codeheader>
3 * <name>Go Gallery TAGS</name>
4 * <version>1.0</version>
5 * <description>Responsive filterable gallery plugin with media categories. Shortcode driven, easy to use, lightweight yet powerful. Display beautiful galleries without slowing down your page load.</description>
6 * <base>https://ampae.com/wp/go-gallery/</base>
7 * <author>V Bugroff</author>
8 * <email>[email protected]</email>
9 * <author>M Karodine</author>
10 * <email>[email protected]</email>
11 * <author>Tim de Jong</author>
12 * <author>AlViMedia</author>
13 * <email>[email protected]</email>
14 * <author>AMPAE</author>
15 * <email>[email protected]</email>
16 * <copyright file="LICENSE.txt" company="AMPAE">
17 * THIS CODE ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
18 * INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR
19 * A PARTICULAR PURPOSE.
20 * </copyright>
21 * <date>2019-04-08</date>
22 * <summary>
23 * Main Styles for Go Gallery;
24 * </summary>
25 * </codeheader>
26**/
27
28(function($){
29    var Gallery = {
30        init: function(){
31            $('.go-gallery').each(function(){
32                new Gallery.Instance(this);
33            });
34        },
35        Instance: function(element){
36
37            var instance = this;
38
39            this.container = $(element);
40            this.id = this.container.attr('id');
41
42            this.menuColor = this.container.data('menu-color');
43            this.menuBg = this.container.data('menu-bg');
44            this.menuBgHover = this.container.data('menu-bg-hover');
45            this.menuGap = this.container.data('menu-gap');
46
47            this.bg = this.container.data('bg');
48            this.gap = this.container.data('gap');
49            this.borderSize = this.container.data('border-size');
50            this.borderColor = this.container.data('border-color');
51
52            this.descColor = this.container.data('desc-color');
53            this.descShadow = this.container.data('desc-shadow');
54
55            this.filters = this.container.find('ul.go-gallery-filters');
56            this.list = this.container.find('ul.go-gallery-list');
57
58            this.items = $('li', this.container);
59            this.win = $(window);
60
61            this.init = function(){
62                this.prepareStyle();
63                this.list.isotope({
64                    itemSelector: '.go-gallery-item',
65                    layoutMode: 'masonry'
66                });
67
68                this.filters.find('a').on('click', this.filter.bind(this));
69
70                if(this.container.hasClass('style-squared')){
71                    var item, figure, image;
72                    this.items.each(function(){
73                        item = $(this);
74                        image = $('<div>').addClass('image').css('background-image', 'url(' + item.find('img').attr('src') + ')');
75                        item.find('figure').append(image);
76                    });
77                }
78            };
79
80            this.loadImage = function(source, callback){
81                var image = new Image();
82                image.onload = callback;
83                image.src = source;
84            };
85
86            this.filter = function(event){
87                event.stopPropagation();
88                var link = $(event.target);
89                var tag = link.data('filter');
90                if(tag != ''){
91                    this.list.isotope({filter: '.tag-' + tag.toLowerCase()});
92                }else{
93                    this.list.isotope({filter: ''});
94                }
95                return false;
96            };
97
98            this.prepareStyle = function(){
99
100                var style = $('<style>');
101                var prefix = '#' + this.id;
102
103                style.html([
104                    prefix + ' ul.go-gallery-list li.go-gallery-item {',
105                    'padding: ' + (this.gap / 2) + 'px;',
106                    '}',
107                    prefix + ' ul.go-gallery-list li.go-gallery-item .image-wrap {',
108                    'padding: ' + this.borderSize + 'px;',
109                    'background: ' + this.borderColor + ';',
110                    '}',
111                    prefix + ' ul.go-gallery-list li.go-gallery-item figcaption p {',
112                    'color: ' + this.descColor + ';',
113                    '}',
114                    prefix + ' ul.go-gallery-list li.go-gallery-item figcaption h2 {',
115                    'color: ' + this.descColor + ';',
116                    'text-shadow: ' + '0px 4px 3px rgba(127,127,127,0.6), 0px 8px 13px rgba(127,127,127,0.2), 0px 18px 23px rgba(127,127,127,0.2)' + ';',
117                    '}',
118                    prefix + ' {',
119                    'background-color: ' + this.bg + ';',
120                    '}',
121                    prefix + ' ul.go-gallery-filters li a {',
122                    'background-color: ' + this.menuBg + ';',
123                    'color: ' + this.menuColor + ';',
124                    'margin: 0 ' + (this.menuGap / 2) + 'px;',
125                    'margin-bottom: ' + (this.menuGap / 2) + 'px;',
126
127                    '}',
128                    prefix + ' ul.go-gallery-filters li a:hover {',
129                    'background-color: ' + this.menuBgHover + ';',
130                    '}',
131                    prefix + ' ul.go-gallery-filters li a:focus {',
132                    'background-color: ' + this.menuBgHover + ';',
133                    '}'
134                ].join(''));
135                $(document.head).append(style);
136                this.list.css('margin', this.gap / 2);
137            };
138            imagesLoaded(this.container.get(0), this.init.bind(this));
139        }
140    };
141    $(document).ready(Gallery.init);
142})(jQuery);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.