PageSourceSearch

https://www.portsursaone.fr/templates/coddle/js/custom.js

js portsursaone.fr collected 2026-10-10 00:31:56 UTC 11,817 bytes, 297 lines download raw bytes

1jQuery(function($){
2    /* Addon: jcod-ghost-btn;*/
3    (function(){
4        $( '.jcod-ghost-btn' ).each(function(){
5            $( this ).append( '<svg><defs><linearGradient><stop offset="0%" stop-color="#FF8282"></stop><stop offset="100%" stop-color="#E178ED"></stop></linearGradient></defs><rect width="206" height="50" x="5" y="5" rx="25" fill="none" stroke="#ffffff"></rect></svg>' );
6        });
7    })();
8
9    /* Addon: jcod-ghost-btn2;*/
10    (function(){
11        $( '.jcod-ghost-btn2' ).each(function(){
12            $( this ).append( '<svg><defs><linearGradient id="grad1"><stop offset="0%" stop-color="#FF8282"></stop><stop offset="100%" stop-color="#E178ED"></stop></linearGradient></defs><rect width="206" height="50" x="5" y="5" rx="25" fill="none" stroke="url(#grad1)"></rect></svg>' );
13        });
14    })();
15
16    /* Addon: jcod-animated-number;*/
17    (function() {
18        $( '.jcod-animated-number' ).each( function() {
19            $( '<div class="odometer"></div>' ).insertAfter( $( this ).find( ".sppb-animated-number" ) );
20        } );
21        $(document).on("inview", ".sppb-animated-number", function(t, e, i, n) {
22            var a = $(this);
23            a.closest( '.jcod-animated-number' ).length && ( od = new Odometer({ el: a.next( '.odometer' ).get( 0 ), value: 0 }) ) && od.update( a.attr( 'data-digit' ) ) && a.off("inview");
24        });
25    })();
26
27    /* Addon: jcod-feature;*/
28    $( document ).delegate( '.jcod-feature .sppb-btn', 'click', function() {
29        var a = $( this );
30        a.toggleClass( 'mins' ).html( a.hasClass( 'mins' ) ? '-' : '+' );
31        a.closest( '.jcod-feature' ).find( '.sppb-link-list-wrap' ).slideToggle();
32        return false;
33    } );
34
35    /* Addon: jcod-works;*/
36    (function(){
37        $( '.jcod-works .sprocket-mosaic-g-container > li' ).each( function() {
38            new TiltFx( this, {
39                movement: {
40                    imgWrapper : {
41                        translation : {x: 10, y: 10, z: 30},
42                        rotation : {x: 0, y: -10, z: 0},
43                        reverseAnimation : {duration : 200, easing : 'easeOutQuad'}
44                    },
45                    lines : {
46                        translation : {x: 10, y: 10, z: [0,70]},
47                        rotation : {x: 0, y: 0, z: -2},
48                        reverseAnimation : {duration : 2000, easing : 'easeOutExpo'}
49                    },
50                    caption : {
51                        rotation : {x: 0, y: 0, z: 2},
52                        reverseAnimation : {duration : 200, easing : 'easeOutQuad'}
53                    },
54                    overlay : {
55                        translation : {x: 10, y: -10, z: 0},
56                        rotation : {x: 0, y: 0, z: 2},
57                        reverseAnimation : {duration : 2000, easing : 'easeOutExpo'}
58                    },
59                    shine : {
60                        translation : {x: 100, y: 100, z: 0},
61                        reverseAnimation : {duration : 200, easing : 'easeOutQuad'}
62                    }
63                }
64            });
65        } );
66    })();
67
68    /* Addon: jcod-sintro;*/
69    (function() {
70        function getRandomInt(min, max) {
71            return Math.floor(Math.random() * (max - min + 1)) + min;
72        }
73
74        $( '.jcod-sintro' ).each( function() {
75            var p = $( this ).removeClass( 'sppb-addon-gallery' ).children( '.sppb-addon-content' ),
76                p1 = p.addClass( 'isolayer isolayer--deco1 isolayer--shadow' ).children().removeClass( 'sppb-gallery' ).addClass( 'gridy' )
77            ;
78            p1.children().each( function() {
79                var a = $( this ).addClass( 'grid__item' ).children( 'a' );
80                a.addClass( 'grid__link' ).prepend( '<div class="layer"></div><div class="layer"></div><div class="layer"></div>' );
81                a.children( 'img' ).addClass( 'grid__img layer' );
82            } );
83
84            new IsoGrid(p.get(0), {
85                transform: 'translateX(45vw) translateY(-340px) rotateX(45deg) rotateZ(40deg)',
86                stackItemsAnimation: {
87                    properties: function (pos) {
88                        return {
89                            translateZ: (pos + 1) * 30,
90                            rotateZ: getRandomInt(-4, 4)
91                        };
92                    },
93                    options: function (pos, itemstotal) {
94                        return {
95                            type: dynamics.bezier,
96                            duration: 500,
97                            points: [{
98                                "x": 0,
99                                "y": 0,
100                                "cp": [{
101                                    "x": 0.2,
102                                    "y": 1
103                                }]
104                            }, {
105                                "x": 1,
106                                "y": 1,
107                                "cp": [{
108                                    "x": 0.3,
109                                    "y": 1
110                                }]
111                            }],
112                            delay: (itemstotal - pos - 1) * 40
113                        };
114                    }
115                }
116            });
117
118            p1.on( 'layoutComplete', function() {
119                p.parent().addClass( 'active' );
120            });
121        } );
122    
123    })();
124
125    /* Addon: sp-page-title;*/
126    (function(){
127        $( '.sp-page-title' ).each( function() {
128            $( 'head' ).append( '<style>#sp-header:not(.menu-fixed) { background-color: ' + $( this ).css( 'background-color' ) + '}</style>' );
129        } );
130    })();
131
132    /* Addon: jcod-mworks;*/
133    (function(){
134        $( '.jcod-mworks .sprocket-mosaic-container > li' ).each( function() {
135            a = new TiltFx( this, {
136                movement: {
137                    imgWrapper : {
138                        translation : {x: 10, y: 10, z: 30},
139                        rotation : {x: 0, y: -10, z: 0},
140                        reverseAnimation : {duration : 200, easing : 'easeOutQuad'}
141                    },
142                    lines : {
143                        translation : {x: 10, y: 10, z: [0,70]},
144                        rotation : {x: 0, y: 0, z: -2},
145                        reverseAnimation : {duration : 2000, easing : 'easeOutExpo'}
146                    },
147                    caption : {
148                        rotation : {x: 0, y: 0, z: 2},
149                        reverseAnimation : {duration : 200, easing : 'easeOutQuad'}
150                    },
151                    overlay : {
152                        translation : {x: 10, y: -10, z: 0},
153                        rotation : {x: 0, y: 0, z: 2},
154                        reverseAnimation : {duration : 2000, easing : 'easeOutExpo'}
155                    },
156                    shine : {
157                        translation : {x: 100, y: 100, z: 0},
158                        reverseAnimation : {duration : 200, easing : 'easeOutQuad'}
159                    }
160                }
161            });
162            a.DOM.animatable = {};
163            a.DOM.animatable.imgWrapper = a.DOM.el.querySelector('.sprocket-mosaic-item');
164            a.DOM.animatable.caption = a.DOM.el.querySelector('.sprocket-mosaic-content');
165            a.DOM.animatable.shine = a.DOM.el.querySelector('[data-mosaic-order-title]');
166        } );
167    })();
168
169    /* Addon: particles-bg;*/
170    (function() {
171        $( '.particles-bg' ).each( function() {
172            particlesJS( this.id, {
173              "particles": {
174                "number": {
175                  "value": 80,
176                  "density": {
177                    "enable": true,
178                    "value_area": 800
179                  }
180                },
181                "color": {
182                  "value": "#ffffff"
183                },
184                "shape": {
185                  "type": "circle",
186                  "stroke": {
187                    "width": 0,
188                    "color": "#000000"
189                  },
190                  "polygon": {
191                    "nb_sides": 5
192                  },
193                  "image": {
194                    "src": "img/github.svg",
195                    "width": 100,
196                    "height": 100
197                  }
198                },
199                "opacity": {
200                  "value": 0.5,
201                  "random": false,
202                  "anim": {
203                    "enable": false,
204                    "speed": 1,
205                    "opacity_min": 0.1,
206                    "sync": false
207                  }
208                },
209                "size": {
210                  "value": 3,
211                  "random": true,
212                  "anim": {
213                    "enable": false,
214                    "speed": 40,
215                    "size_min": 0.1,
216                    "sync": false
217                  }
218                },
219                "line_linked": {
220                  "enable": true,
221                  "distance": 150,
222                  "color": "#ffffff",
223                  "opacity": 0.4,
224                  "width": 1
225                },
226                "move": {
227                  "enable": true,
228                  "speed": 6,
229                  "direction": "none",
230                  "random": false,
231                  "straight": false,
232                  "out_mode": "out",
233                  "bounce": false,
234                  "attract": {
235                    "enable": false,
236                    "rotateX": 600,
237                    "rotateY": 1200
238                  }
239                }
240              },
241              "interactivity": {
242                "detect_on": "canvas",
243                "events": {
244                  "onhover": {
245                    "enable": true,
246                    "mode": "grab"
247                  },
248                  "onclick": {
249                    "enable": true,
250                    "mode": "push"
251                  },
252                  "resize": true
253                },
254                "modes": {
255                  "grab": {
256                    "distance": 140,
257                    "line_linked": {
258                      "opacity": 1
259                    }
260                  },
261                  "bubble": {
262                    "distance": 400,
263                    "size": 40,
264                    "duration": 2,
265                    "opacity": 8,
266                    "speed": 3
267                  },
268                  "repulse": {
269                    "distance": 200,
270                    "duration": 0.4
271                  },
272                  "push": {
273                    "particles_nb": 4
274                  },
275                  "remove": {
276                    "particles_nb": 2
277                  }
278                }
279              },
280              "retina_detect": true
281            });
282        } );
283    })();
284
285    /* Addon: video-mask-text;*/
286    (function(){
287        $( '.video-mask-text' ).each( function() {
288            var e = $( this ),
289                t =  $( '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 285 80" preserveAspectRatio="xMidYMid slice"><defs><mask id="mask" x="0" y="0" width="100%" height="100%" ><rect x="0" y="0" width="100%" height="100%" />
289<text  x="50%" y="50%" alignment-baseline="middle" text-anchor="middle" class="title">FACTORY</text><text  x="50%" y="70%" alignment-baseline="middle" text-anchor="middle" class="description">Coddle is a commercial web and digital agency</text></mask></defs><rect x="0" y="0" width="100%" height="100%" /></svg>' )
290            ;
291            t.find( '.title' ).html( e.find( '.sppb-section-title .sppb-title-heading' ).text() );
292            t.find( '.description' ).html( e.find( '.sppb-section-title .sppb-title-subheading' ).text() );
293            e.find( '.sppb-section-bacground-video' ).append( t );
294        } );
295    })();
296
297});

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.