Version Description
- 2019-09-09 =
- Fixed : Countup JS
- Fixed : Blog Mobile Issue
- Fixed : Advanced Column
- Added : Agency templates
- Update : Minor change and fixes
Download this release
Release Info
Developer | gutentor |
Plugin | Gutentor – Gutenberg Blocks – Page Builder for Gutenberg Editor |
Version | 1.0.4 |
Comparing to | |
See all releases |
Code changes from version 1.0.3 to 1.0.4
- assets/library/countUp/countUp.js +245 -247
- assets/library/countUp/countUp.min.js +1 -1
- gutentor.php +2 -2
- includes/blocks/class-blog-post.php +11 -13
- includes/hooks.php +1 -1
- includes/tools/class-advanced-import.php +11 -0
- readme.txt +8 -1
assets/library/countUp/countUp.js
CHANGED
@@ -1,248 +1,246 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
};
|
12 |
-
// playground: stackblitz.com/edit/countup-typescript
|
13 |
-
var CountUp = /** @class */ (function () {
|
14 |
-
function CountUp(target, endVal, options) {
|
15 |
-
var _this = this;
|
16 |
-
this.target = target;
|
17 |
-
this.endVal = endVal;
|
18 |
-
this.options = options;
|
19 |
-
this.version = '2.0.4';
|
20 |
-
this.defaults = {
|
21 |
-
startVal: 0,
|
22 |
-
decimalPlaces: 0,
|
23 |
-
duration: 2,
|
24 |
-
useEasing: true,
|
25 |
-
useGrouping: true,
|
26 |
-
smartEasingThreshold: 999,
|
27 |
-
smartEasingAmount: 333,
|
28 |
-
separator: ',',
|
29 |
-
decimal: '.',
|
30 |
-
prefix: '',
|
31 |
-
suffix: ''
|
32 |
-
};
|
33 |
-
this.finalEndVal = null; // for smart easing
|
34 |
-
this.useEasing = true;
|
35 |
-
this.countDown = false;
|
36 |
-
this.error = '';
|
37 |
-
this.startVal = 0;
|
38 |
-
this.paused = true;
|
39 |
-
this.count = function (timestamp) {
|
40 |
-
if (!_this.startTime) {
|
41 |
-
_this.startTime = timestamp;
|
42 |
-
}
|
43 |
-
var progress = timestamp - _this.startTime;
|
44 |
-
_this.remaining = _this.duration - progress;
|
45 |
-
// to ease or not to ease
|
46 |
-
if (_this.useEasing) {
|
47 |
-
if (_this.countDown) {
|
48 |
-
_this.frameVal = _this.startVal - _this.easingFn(progress, 0, _this.startVal - _this.endVal, _this.duration);
|
49 |
-
}
|
50 |
-
else {
|
51 |
-
_this.frameVal = _this.easingFn(progress, _this.startVal, _this.endVal - _this.startVal, _this.duration);
|
52 |
-
}
|
53 |
-
}
|
54 |
-
else {
|
55 |
-
if (_this.countDown) {
|
56 |
-
_this.frameVal = _this.startVal - ((_this.startVal - _this.endVal) * (progress / _this.duration));
|
57 |
-
}
|
58 |
-
else {
|
59 |
-
_this.frameVal = _this.startVal + (_this.endVal - _this.startVal) * (progress / _this.duration);
|
60 |
-
}
|
61 |
-
}
|
62 |
-
// don't go past endVal since progress can exceed duration in the last frame
|
63 |
-
if (_this.countDown) {
|
64 |
-
_this.frameVal = (_this.frameVal < _this.endVal) ? _this.endVal : _this.frameVal;
|
65 |
-
}
|
66 |
-
else {
|
67 |
-
_this.frameVal = (_this.frameVal > _this.endVal) ? _this.endVal : _this.frameVal;
|
68 |
-
}
|
69 |
-
// decimal
|
70 |
-
_this.frameVal = Math.round(_this.frameVal * _this.decimalMult) / _this.decimalMult;
|
71 |
-
// format and print value
|
72 |
-
_this.printValue(_this.frameVal);
|
73 |
-
// whether to continue
|
74 |
-
if (progress < _this.duration) {
|
75 |
-
_this.rAF = requestAnimationFrame(_this.count);
|
76 |
-
}
|
77 |
-
else if (_this.finalEndVal !== null) {
|
78 |
-
// smart easing
|
79 |
-
_this.update(_this.finalEndVal);
|
80 |
-
}
|
81 |
-
else {
|
82 |
-
if (_this.callback) {
|
83 |
-
_this.callback();
|
84 |
-
}
|
85 |
-
}
|
86 |
-
};
|
87 |
-
// default format and easing functions
|
88 |
-
this.formatNumber = function (num) {
|
89 |
-
var neg = (num < 0) ? '-' : '';
|
90 |
-
var result, x, x1, x2, x3;
|
91 |
-
result = Math.abs(num).toFixed(_this.options.decimalPlaces);
|
92 |
-
result += '';
|
93 |
-
x = result.split('.');
|
94 |
-
x1 = x[0];
|
95 |
-
x2 = x.length > 1 ? _this.options.decimal + x[1] : '';
|
96 |
-
if (_this.options.useGrouping) {
|
97 |
-
x3 = '';
|
98 |
-
for (var i = 0, len = x1.length; i < len; ++i) {
|
99 |
-
if (i !== 0 && (i % 3) === 0) {
|
100 |
-
x3 = _this.options.separator + x3;
|
101 |
-
}
|
102 |
-
x3 = x1[len - i - 1] + x3;
|
103 |
-
}
|
104 |
-
x1 = x3;
|
105 |
-
}
|
106 |
-
// optional numeral substitution
|
107 |
-
if (_this.options.numerals && _this.options.numerals.length) {
|
108 |
-
x1 = x1.replace(/[0-9]/g, function (w) { return _this.options.numerals[+w]; });
|
109 |
-
x2 = x2.replace(/[0-9]/g, function (w) { return _this.options.numerals[+w]; });
|
110 |
-
}
|
111 |
-
return neg + _this.options.prefix + x1 + x2 + _this.options.suffix;
|
112 |
-
};
|
113 |
-
this.easeOutExpo = function (t, b, c, d) {
|
114 |
-
return c * (-Math.pow(2, -10 * t / d) + 1) * 1024 / 1023 + b;
|
115 |
-
};
|
116 |
-
this.options = __assign({}, this.defaults, options);
|
117 |
-
this.formattingFn = (this.options.formattingFn) ?
|
118 |
-
this.options.formattingFn : this.formatNumber;
|
119 |
-
this.easingFn = (this.options.easingFn) ?
|
120 |
-
this.options.easingFn : this.easeOutExpo;
|
121 |
-
this.startVal = this.validateValue(this.options.startVal);
|
122 |
-
this.frameVal = this.startVal;
|
123 |
-
this.endVal = this.validateValue(endVal);
|
124 |
-
this.options.decimalPlaces = Math.max(0 || this.options.decimalPlaces);
|
125 |
-
this.decimalMult = Math.pow(10, this.options.decimalPlaces);
|
126 |
-
this.resetDuration();
|
127 |
-
this.options.separator = String(this.options.separator);
|
128 |
-
this.useEasing = this.options.useEasing;
|
129 |
-
if (this.options.separator === '') {
|
130 |
-
this.options.useGrouping = false;
|
131 |
-
}
|
132 |
-
this.el = (typeof target === 'string') ? document.getElementById(target) : target;
|
133 |
-
if (this.el) {
|
134 |
-
this.printValue(this.startVal);
|
135 |
-
}
|
136 |
-
else {
|
137 |
-
this.error = '[CountUp] target is null or undefined';
|
138 |
-
}
|
139 |
-
}
|
140 |
-
// determines where easing starts and whether to count down or up
|
141 |
-
CountUp.prototype.determineDirectionAndSmartEasing = function () {
|
142 |
-
var end = (this.finalEndVal) ? this.finalEndVal : this.endVal;
|
143 |
-
this.countDown = (this.startVal > end);
|
144 |
-
var animateAmount = end - this.startVal;
|
145 |
-
if (Math.abs(animateAmount) > this.options.smartEasingThreshold) {
|
146 |
-
this.finalEndVal = end;
|
147 |
-
var up = (this.countDown) ? 1 : -1;
|
148 |
-
this.endVal = end + (up * this.options.smartEasingAmount);
|
149 |
-
this.duration = this.duration / 2;
|
150 |
-
}
|
151 |
-
else {
|
152 |
-
this.endVal = end;
|
153 |
-
this.finalEndVal = null;
|
154 |
-
}
|
155 |
-
if (this.finalEndVal) {
|
156 |
-
this.useEasing = false;
|
157 |
-
}
|
158 |
-
else {
|
159 |
-
this.useEasing = this.options.useEasing;
|
160 |
-
}
|
161 |
-
};
|
162 |
-
// start animation
|
163 |
-
CountUp.prototype.start = function (callback) {
|
164 |
-
if (this.error) {
|
165 |
-
return;
|
166 |
-
}
|
167 |
-
this.callback = callback;
|
168 |
-
if (this.duration > 0) {
|
169 |
-
this.determineDirectionAndSmartEasing();
|
170 |
-
this.paused = false;
|
171 |
-
this.rAF = requestAnimationFrame(this.count);
|
172 |
-
}
|
173 |
-
else {
|
174 |
-
this.printValue(this.endVal);
|
175 |
-
}
|
176 |
-
};
|
177 |
-
// pause/resume animation
|
178 |
-
CountUp.prototype.pauseResume = function () {
|
179 |
-
if (!this.paused) {
|
180 |
-
cancelAnimationFrame(this.rAF);
|
181 |
-
}
|
182 |
-
else {
|
183 |
-
this.startTime = null;
|
184 |
-
this.duration = this.remaining;
|
185 |
-
this.startVal = this.frameVal;
|
186 |
-
this.determineDirectionAndSmartEasing();
|
187 |
-
this.rAF = requestAnimationFrame(this.count);
|
188 |
-
}
|
189 |
-
this.paused = !this.paused;
|
190 |
-
};
|
191 |
-
// reset to startVal so animation can be run again
|
192 |
-
CountUp.prototype.reset = function () {
|
193 |
-
cancelAnimationFrame(this.rAF);
|
194 |
-
this.paused = true;
|
195 |
-
this.resetDuration();
|
196 |
-
this.startVal = this.validateValue(this.options.startVal);
|
197 |
-
this.frameVal = this.startVal;
|
198 |
-
this.printValue(this.startVal);
|
199 |
-
};
|
200 |
-
// pass a new endVal and start animation
|
201 |
-
CountUp.prototype.update = function (newEndVal) {
|
202 |
-
cancelAnimationFrame(this.rAF);
|
203 |
-
this.startTime = null;
|
204 |
-
this.endVal = this.validateValue(newEndVal);
|
205 |
-
if (this.endVal === this.frameVal) {
|
206 |
-
return;
|
207 |
-
}
|
208 |
-
this.startVal = this.frameVal;
|
209 |
-
if (!this.finalEndVal) {
|
210 |
-
this.resetDuration();
|
211 |
-
}
|
212 |
-
this.determineDirectionAndSmartEasing();
|
213 |
-
this.rAF = requestAnimationFrame(this.count);
|
214 |
-
};
|
215 |
-
CountUp.prototype.printValue = function (val) {
|
216 |
-
var result = this.formattingFn(val);
|
217 |
-
if (this.el.tagName === 'INPUT') {
|
218 |
-
var input = this.el;
|
219 |
-
input.value = result;
|
220 |
-
}
|
221 |
-
else if (this.el.tagName === 'text' || this.el.tagName === 'tspan') {
|
222 |
-
this.el.textContent = result;
|
223 |
-
}
|
224 |
-
else {
|
225 |
-
this.el.innerHTML = result;
|
226 |
-
}
|
227 |
-
};
|
228 |
-
CountUp.prototype.ensureNumber = function (n) {
|
229 |
-
return (typeof n === 'number' && !isNaN(n));
|
230 |
-
};
|
231 |
-
CountUp.prototype.validateValue = function (value) {
|
232 |
-
var newValue = Number(value);
|
233 |
-
if (!this.ensureNumber(newValue)) {
|
234 |
-
this.error = "[CountUp] invalid start or end value: " + value;
|
235 |
-
return null;
|
236 |
-
}
|
237 |
-
else {
|
238 |
-
return newValue;
|
239 |
-
}
|
240 |
-
};
|
241 |
-
CountUp.prototype.resetDuration = function () {
|
242 |
-
this.startTime = null;
|
243 |
-
this.duration = Number(this.options.duration) * 1000;
|
244 |
-
this.remaining = this.duration;
|
245 |
-
};
|
246 |
-
return CountUp;
|
247 |
-
}());
|
248 |
-
export { CountUp };
|
1 |
+
/*
|
2 |
+
|
3 |
+
countUp.js
|
4 |
+
by @inorganik
|
5 |
+
|
6 |
+
*/
|
7 |
+
|
8 |
+
// target = id of html element or var of previously selected html element where counting occurs
|
9 |
+
// startVal = the value you want to begin at
|
10 |
+
// endVal = the value you want to arrive at
|
11 |
+
// decimals = number of decimal places, default 0
|
12 |
+
// duration = duration of animation in seconds, default 2
|
13 |
+
// options = optional object of options (see below)
|
14 |
+
|
15 |
+
var CountUp = function(target, startVal, endVal, decimals, duration, options) {
|
16 |
+
|
17 |
+
var self = this;
|
18 |
+
self.version = function () { return '1.9.3'; };
|
19 |
+
|
20 |
+
// default options
|
21 |
+
self.options = {
|
22 |
+
useEasing: true, // toggle easing
|
23 |
+
useGrouping: true, // 1,000,000 vs 1000000
|
24 |
+
separator: ',', // character to use as a separator
|
25 |
+
decimal: '.', // character to use as a decimal
|
26 |
+
easingFn: easeOutExpo, // optional custom easing function, default is Robert Penner's easeOutExpo
|
27 |
+
formattingFn: formatNumber, // optional custom formatting function, default is formatNumber above
|
28 |
+
prefix: '', // optional text before the result
|
29 |
+
suffix: '', // optional text after the result
|
30 |
+
numerals: [] // optionally pass an array of custom numerals for 0-9
|
31 |
+
};
|
32 |
+
|
33 |
+
// extend default options with passed options object
|
34 |
+
if (options && typeof options === 'object') {
|
35 |
+
for (var key in self.options) {
|
36 |
+
if (options.hasOwnProperty(key) && options[key] !== null) {
|
37 |
+
self.options[key] = options[key];
|
38 |
+
}
|
39 |
+
}
|
40 |
+
}
|
41 |
+
|
42 |
+
if (self.options.separator === '') {
|
43 |
+
self.options.useGrouping = false;
|
44 |
+
}
|
45 |
+
else {
|
46 |
+
// ensure the separator is a string (formatNumber assumes this)
|
47 |
+
self.options.separator = '' + self.options.separator;
|
48 |
+
}
|
49 |
+
|
50 |
+
// make sure requestAnimationFrame and cancelAnimationFrame are defined
|
51 |
+
// polyfill for browsers without native support
|
52 |
+
// by Opera engineer Erik Möller
|
53 |
+
var lastTime = 0;
|
54 |
+
var vendors = ['webkit', 'moz', 'ms', 'o'];
|
55 |
+
for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {
|
56 |
+
window.requestAnimationFrame = window[vendors[x]+'RequestAnimationFrame'];
|
57 |
+
window.cancelAnimationFrame = window[vendors[x]+'CancelAnimationFrame'] || window[vendors[x]+'CancelRequestAnimationFrame'];
|
58 |
+
}
|
59 |
+
if (!window.requestAnimationFrame) {
|
60 |
+
window.requestAnimationFrame = function(callback, element) {
|
61 |
+
var currTime = new Date().getTime();
|
62 |
+
var timeToCall = Math.max(0, 16 - (currTime - lastTime));
|
63 |
+
var id = window.setTimeout(function() { callback(currTime + timeToCall); }, timeToCall);
|
64 |
+
lastTime = currTime + timeToCall;
|
65 |
+
return id;
|
66 |
+
};
|
67 |
+
}
|
68 |
+
if (!window.cancelAnimationFrame) {
|
69 |
+
window.cancelAnimationFrame = function(id) {
|
70 |
+
clearTimeout(id);
|
71 |
+
};
|
72 |
+
}
|
73 |
+
|
74 |
+
function formatNumber(num) {
|
75 |
+
var neg = (num < 0),
|
76 |
+
x, x1, x2, x3, i, len;
|
77 |
+
num = Math.abs(num).toFixed(self.decimals);
|
78 |
+
num += '';
|
79 |
+
x = num.split('.');
|
80 |
+
x1 = x[0];
|
81 |
+
x2 = x.length > 1 ? self.options.decimal + x[1] : '';
|
82 |
+
if (self.options.useGrouping) {
|
83 |
+
x3 = '';
|
84 |
+
for (i = 0, len = x1.length; i < len; ++i) {
|
85 |
+
if (i !== 0 && ((i % 3) === 0)) {
|
86 |
+
x3 = self.options.separator + x3;
|
87 |
+
}
|
88 |
+
x3 = x1[len - i - 1] + x3;
|
89 |
+
}
|
90 |
+
x1 = x3;
|
91 |
+
}
|
92 |
+
// optional numeral substitution
|
93 |
+
if (self.options.numerals.length) {
|
94 |
+
x1 = x1.replace(/[0-9]/g, function(w) {
|
95 |
+
return self.options.numerals[+w];
|
96 |
+
})
|
97 |
+
x2 = x2.replace(/[0-9]/g, function(w) {
|
98 |
+
return self.options.numerals[+w];
|
99 |
+
})
|
100 |
+
}
|
101 |
+
return (neg ? '-' : '') + self.options.prefix + x1 + x2 + self.options.suffix;
|
102 |
+
}
|
103 |
+
// Robert Penner's easeOutExpo
|
104 |
+
function easeOutExpo(t, b, c, d) {
|
105 |
+
return c * (-Math.pow(2, -10 * t / d) + 1) * 1024 / 1023 + b;
|
106 |
+
}
|
107 |
+
function ensureNumber(n) {
|
108 |
+
return (typeof n === 'number' && !isNaN(n));
|
109 |
+
}
|
110 |
+
|
111 |
+
self.initialize = function() {
|
112 |
+
if (self.initialized) return true;
|
113 |
+
|
114 |
+
self.error = '';
|
115 |
+
self.d = (typeof target === 'string') ? document.getElementById(target) : target;
|
116 |
+
if (!self.d) {
|
117 |
+
self.error = '[CountUp] target is null or undefined'
|
118 |
+
return false;
|
119 |
+
}
|
120 |
+
self.startVal = Number(startVal);
|
121 |
+
self.endVal = Number(endVal);
|
122 |
+
// error checks
|
123 |
+
if (ensureNumber(self.startVal) && ensureNumber(self.endVal)) {
|
124 |
+
self.decimals = Math.max(0, decimals || 0);
|
125 |
+
self.dec = Math.pow(10, self.decimals);
|
126 |
+
self.duration = Number(duration) * 1000 || 2000;
|
127 |
+
self.countDown = (self.startVal > self.endVal);
|
128 |
+
self.frameVal = self.startVal;
|
129 |
+
self.initialized = true;
|
130 |
+
return true;
|
131 |
+
}
|
132 |
+
else {
|
133 |
+
self.error = '[CountUp] startVal ('+startVal+') or endVal ('+endVal+') is not a number';
|
134 |
+
return false;
|
135 |
+
}
|
136 |
+
};
|
137 |
+
|
138 |
+
// Print value to target
|
139 |
+
self.printValue = function(value) {
|
140 |
+
var result = self.options.formattingFn(value);
|
141 |
+
|
142 |
+
if (self.d.tagName === 'INPUT') {
|
143 |
+
this.d.value = result;
|
144 |
+
}
|
145 |
+
else if (self.d.tagName === 'text' || self.d.tagName === 'tspan') {
|
146 |
+
this.d.textContent = result;
|
147 |
+
}
|
148 |
+
else {
|
149 |
+
this.d.innerHTML = result;
|
150 |
+
}
|
151 |
+
};
|
152 |
+
|
153 |
+
self.count = function(timestamp) {
|
154 |
+
|
155 |
+
if (!self.startTime) { self.startTime = timestamp; }
|
156 |
+
|
157 |
+
self.timestamp = timestamp;
|
158 |
+
var progress = timestamp - self.startTime;
|
159 |
+
self.remaining = self.duration - progress;
|
160 |
+
|
161 |
+
// to ease or not to ease
|
162 |
+
if (self.options.useEasing) {
|
163 |
+
if (self.countDown) {
|
164 |
+
self.frameVal = self.startVal - self.options.easingFn(progress, 0, self.startVal - self.endVal, self.duration);
|
165 |
+
} else {
|
166 |
+
self.frameVal = self.options.easingFn(progress, self.startVal, self.endVal - self.startVal, self.duration);
|
167 |
+
}
|
168 |
+
} else {
|
169 |
+
if (self.countDown) {
|
170 |
+
self.frameVal = self.startVal - ((self.startVal - self.endVal) * (progress / self.duration));
|
171 |
+
} else {
|
172 |
+
self.frameVal = self.startVal + (self.endVal - self.startVal) * (progress / self.duration);
|
173 |
+
}
|
174 |
+
}
|
175 |
+
|
176 |
+
// don't go past endVal since progress can exceed duration in the last frame
|
177 |
+
if (self.countDown) {
|
178 |
+
self.frameVal = (self.frameVal < self.endVal) ? self.endVal : self.frameVal;
|
179 |
+
} else {
|
180 |
+
self.frameVal = (self.frameVal > self.endVal) ? self.endVal : self.frameVal;
|
181 |
+
}
|
182 |
+
|
183 |
+
// decimal
|
184 |
+
self.frameVal = Math.round(self.frameVal*self.dec)/self.dec;
|
185 |
+
|
186 |
+
// format and print value
|
187 |
+
self.printValue(self.frameVal);
|
188 |
+
|
189 |
+
// whether to continue
|
190 |
+
if (progress < self.duration) {
|
191 |
+
self.rAF = requestAnimationFrame(self.count);
|
192 |
+
} else {
|
193 |
+
if (self.callback) self.callback();
|
194 |
+
}
|
195 |
+
};
|
196 |
+
// start your animation
|
197 |
+
self.start = function(callback) {
|
198 |
+
if (!self.initialize()) return;
|
199 |
+
self.callback = callback;
|
200 |
+
self.rAF = requestAnimationFrame(self.count);
|
201 |
+
};
|
202 |
+
// toggles pause/resume animation
|
203 |
+
self.pauseResume = function() {
|
204 |
+
if (!self.paused) {
|
205 |
+
self.paused = true;
|
206 |
+
cancelAnimationFrame(self.rAF);
|
207 |
+
} else {
|
208 |
+
self.paused = false;
|
209 |
+
delete self.startTime;
|
210 |
+
self.duration = self.remaining;
|
211 |
+
self.startVal = self.frameVal;
|
212 |
+
requestAnimationFrame(self.count);
|
213 |
+
}
|
214 |
+
};
|
215 |
+
// reset to startVal so animation can be run again
|
216 |
+
self.reset = function() {
|
217 |
+
self.paused = false;
|
218 |
+
delete self.startTime;
|
219 |
+
self.initialized = false;
|
220 |
+
if (self.initialize()) {
|
221 |
+
cancelAnimationFrame(self.rAF);
|
222 |
+
self.printValue(self.startVal);
|
223 |
+
}
|
224 |
+
};
|
225 |
+
// pass a new endVal and start animation
|
226 |
+
self.update = function (newEndVal) {
|
227 |
+
if (!self.initialize()) return;
|
228 |
+
newEndVal = Number(newEndVal);
|
229 |
+
if (!ensureNumber(newEndVal)) {
|
230 |
+
self.error = '[CountUp] update() - new endVal is not a number: '+newEndVal;
|
231 |
+
return;
|
232 |
+
}
|
233 |
+
self.error = '';
|
234 |
+
if (newEndVal === self.frameVal) return;
|
235 |
+
cancelAnimationFrame(self.rAF);
|
236 |
+
self.paused = false;
|
237 |
+
delete self.startTime;
|
238 |
+
self.startVal = self.frameVal;
|
239 |
+
self.endVal = newEndVal;
|
240 |
+
self.countDown = (self.startVal > self.endVal);
|
241 |
+
self.rAF = requestAnimationFrame(self.count);
|
242 |
+
};
|
243 |
+
|
244 |
+
// format startVal on initialization
|
245 |
+
if (self.initialize()) self.printValue(self.startVal);
|
246 |
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/library/countUp/countUp.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
var
|
1 |
+
var CountUp=function(a,n,t,e,i,r){var o=this;if(o.version=function(){return"1.9.3"},o.options={useEasing:!0,useGrouping:!0,separator:",",decimal:".",easingFn:function(a,n,t,e){return t*(1-Math.pow(2,-10*a/e))*1024/1023+n},formattingFn:function(a){var n,t,e,i,r,s,l=a<0;if(a=Math.abs(a).toFixed(o.decimals),n=(a+="").split("."),t=n[0],e=n.length>1?o.options.decimal+n[1]:"",o.options.useGrouping){for(i="",r=0,s=t.length;r<s;++r)0!==r&&r%3==0&&(i=o.options.separator+i),i=t[s-r-1]+i;t=i}o.options.numerals.length&&(t=t.replace(/[0-9]/g,function(a){return o.options.numerals[+a]}),e=e.replace(/[0-9]/g,function(a){return o.options.numerals[+a]}));return(l?"-":"")+o.options.prefix+t+e+o.options.suffix},prefix:"",suffix:"",numerals:[]},r&&"object"==typeof r)for(var s in o.options)r.hasOwnProperty(s)&&null!==r[s]&&(o.options[s]=r[s]);""===o.options.separator?o.options.useGrouping=!1:o.options.separator=""+o.options.separator;for(var l=0,u=["webkit","moz","ms","o"],m=0;m<u.length&&!window.requestAnimationFrame;++m)window.requestAnimationFrame=window[u[m]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[u[m]+"CancelAnimationFrame"]||window[u[m]+"CancelRequestAnimationFrame"];function d(a){return"number"==typeof a&&!isNaN(a)}window.requestAnimationFrame||(window.requestAnimationFrame=function(a,n){var t=(new Date).getTime(),e=Math.max(0,16-(t-l)),i=window.setTimeout(function(){a(t+e)},e);return l=t+e,i}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(a){clearTimeout(a)}),o.initialize=function(){return!!o.initialized||(o.error="",o.d="string"==typeof a?document.getElementById(a):a,o.d?(o.startVal=Number(n),o.endVal=Number(t),d(o.startVal)&&d(o.endVal)?(o.decimals=Math.max(0,e||0),o.dec=Math.pow(10,o.decimals),o.duration=1e3*Number(i)||2e3,o.countDown=o.startVal>o.endVal,o.frameVal=o.startVal,o.initialized=!0,!0):(o.error="[CountUp] startVal ("+n+") or endVal ("+t+") is not a number",!1)):(o.error="[CountUp] target is null or undefined",!1))},o.printValue=function(a){var n=o.options.formattingFn(a);"INPUT"===o.d.tagName?this.d.value=n:"text"===o.d.tagName||"tspan"===o.d.tagName?this.d.textContent=n:this.d.innerHTML=n},o.count=function(a){o.startTime||(o.startTime=a),o.timestamp=a;var n=a-o.startTime;o.remaining=o.duration-n,o.options.useEasing?o.countDown?o.frameVal=o.startVal-o.options.easingFn(n,0,o.startVal-o.endVal,o.duration):o.frameVal=o.options.easingFn(n,o.startVal,o.endVal-o.startVal,o.duration):o.countDown?o.frameVal=o.startVal-(o.startVal-o.endVal)*(n/o.duration):o.frameVal=o.startVal+(o.endVal-o.startVal)*(n/o.duration),o.countDown?o.frameVal=o.frameVal<o.endVal?o.endVal:o.frameVal:o.frameVal=o.frameVal>o.endVal?o.endVal:o.frameVal,o.frameVal=Math.round(o.frameVal*o.dec)/o.dec,o.printValue(o.frameVal),n<o.duration?o.rAF=requestAnimationFrame(o.count):o.callback&&o.callback()},o.start=function(a){o.initialize()&&(o.callback=a,o.rAF=requestAnimationFrame(o.count))},o.pauseResume=function(){o.paused?(o.paused=!1,delete o.startTime,o.duration=o.remaining,o.startVal=o.frameVal,requestAnimationFrame(o.count)):(o.paused=!0,cancelAnimationFrame(o.rAF))},o.reset=function(){o.paused=!1,delete o.startTime,o.initialized=!1,o.initialize()&&(cancelAnimationFrame(o.rAF),o.printValue(o.startVal))},o.update=function(a){o.initialize()&&(d(a=Number(a))?(o.error="",a!==o.frameVal&&(cancelAnimationFrame(o.rAF),o.paused=!1,delete o.startTime,o.startVal=o.frameVal,o.endVal=a,o.countDown=o.startVal>o.endVal,o.rAF=requestAnimationFrame(o.count))):o.error="[CountUp] update() - new endVal is not a number: "+a)},o.initialize()&&o.printValue(o.startVal)};
|
gutentor.php
CHANGED
@@ -14,7 +14,7 @@ if ( ! defined( 'WPINC' ) ) {
|
|
14 |
* @wordpress-plugin
|
15 |
* Plugin Name: Gutentor : WordPress Page Building Blocks with Unlimited Possibilities to Design
|
16 |
* Description: The most advanced yet easy drag & drop block page builder. Create masterpiece, pixel perfect websites using modern WordPress way. Work with any theme, create any design.
|
17 |
-
* Version: 1.0.
|
18 |
* Author: Gutentor
|
19 |
* Author URI: https://www.gutentor.com/
|
20 |
* License: GPL-2.0+
|
@@ -24,7 +24,7 @@ if ( ! defined( 'WPINC' ) ) {
|
|
24 |
*/
|
25 |
|
26 |
/*Define Constants for this plugin*/
|
27 |
-
define( 'GUTENTOR_VERSION', '1.0.
|
28 |
define( 'GUTENTOR_PATH', plugin_dir_path( __FILE__ ) );
|
29 |
define( 'GUTENTOR_URL', plugin_dir_url( __FILE__ ) );
|
30 |
define( 'GUTENTOR_SCRIPT_PREFIX', ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min' );
|
14 |
* @wordpress-plugin
|
15 |
* Plugin Name: Gutentor : WordPress Page Building Blocks with Unlimited Possibilities to Design
|
16 |
* Description: The most advanced yet easy drag & drop block page builder. Create masterpiece, pixel perfect websites using modern WordPress way. Work with any theme, create any design.
|
17 |
+
* Version: 1.0.4
|
18 |
* Author: Gutentor
|
19 |
* Author URI: https://www.gutentor.com/
|
20 |
* License: GPL-2.0+
|
24 |
*/
|
25 |
|
26 |
/*Define Constants for this plugin*/
|
27 |
+
define( 'GUTENTOR_VERSION', '1.0.4' );
|
28 |
define( 'GUTENTOR_PATH', plugin_dir_path( __FILE__ ) );
|
29 |
define( 'GUTENTOR_URL', plugin_dir_url( __FILE__ ) );
|
30 |
define( 'GUTENTOR_SCRIPT_PREFIX', ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min' );
|
includes/blocks/class-blog-post.php
CHANGED
@@ -914,28 +914,26 @@ if ( ! class_exists( 'Gutentor_Blog_Post' ) ) {
|
|
914 |
$entry_meta_typography = (isset($attributes['blockEntryMetaTypography']) && $attributes['blockEntryMetaTypography']) ? $attributes['blockEntryMetaTypography'] : false;
|
915 |
$entry_meta_margin = (isset($attributes['blockEntryMetaMargin']) && $attributes['blockEntryMetaMargin']) ? $attributes['blockEntryMetaMargin'] : false;
|
916 |
$entry_meta_padding = (isset($attributes['blockEntryMetaPadding']) && $attributes['blockEntryMetaPadding']) ? $attributes['blockEntryMetaPadding'] : false;
|
917 |
-
$local_dynamic_css['all'] .= '#section-' . $attributes['blockID'] . ' .entry-meta div
|
918 |
-
|
919 |
-
' . gutentor_generate_css('color', ($meta_color_enable && $attributes['entryMetaColor']['normal']) ? $attributes['entryMetaColor']['normal']['hex'] : null) . '
|
920 |
'.gutentor_typography_options_css($entry_meta_typography).'
|
921 |
-
|
|
|
922 |
}';
|
923 |
$local_dynamic_css['all'] .= '#section-' . $attributes['blockID'] . ' .entry-meta div:hover,
|
924 |
#section-' . $attributes['blockID'] . ' .entry-meta div a:hover{
|
925 |
' . gutentor_generate_css('color', ($meta_color_enable && $attributes['entryMetaColor']['hover']) ? $attributes['entryMetaColor']['hover']['hex'] : null) . '
|
926 |
}';
|
927 |
|
928 |
-
$local_dynamic_css['tablet'] .= '#section-' . $attributes['blockID'] . ' .entry-meta div
|
929 |
-
|
930 |
-
' . gutentor_typography_options_responsive_css($entry_meta_typography,'tablet') . '
|
931 |
'.gutentor_box_four_device_options_css('margin',$entry_meta_margin,'tablet').'
|
932 |
-
|
933 |
}';
|
934 |
-
$local_dynamic_css['desktop'] .= '#section-' . $attributes['blockID'] . ' .entry-meta div
|
935 |
-
|
936 |
-
'
|
937 |
-
|
938 |
-
'.gutentor_box_four_device_options_css('padding',$entry_meta_padding,'desktop').'
|
939 |
}';
|
940 |
|
941 |
/*Image overlay css*/
|
914 |
$entry_meta_typography = (isset($attributes['blockEntryMetaTypography']) && $attributes['blockEntryMetaTypography']) ? $attributes['blockEntryMetaTypography'] : false;
|
915 |
$entry_meta_margin = (isset($attributes['blockEntryMetaMargin']) && $attributes['blockEntryMetaMargin']) ? $attributes['blockEntryMetaMargin'] : false;
|
916 |
$entry_meta_padding = (isset($attributes['blockEntryMetaPadding']) && $attributes['blockEntryMetaPadding']) ? $attributes['blockEntryMetaPadding'] : false;
|
917 |
+
$local_dynamic_css['all'] .= '#section-' . $attributes['blockID'] . ' .entry-meta div {
|
918 |
+
'. gutentor_generate_css('color', ($meta_color_enable && $attributes['entryMetaColor']['normal']) ? $attributes['entryMetaColor']['normal']['hex'] : null) . '
|
|
|
919 |
'.gutentor_typography_options_css($entry_meta_typography).'
|
920 |
+
'.gutentor_box_four_device_options_css('margin',$entry_meta_margin).'
|
921 |
+
'.gutentor_box_four_device_options_css('padding',$entry_meta_padding).'
|
922 |
}';
|
923 |
$local_dynamic_css['all'] .= '#section-' . $attributes['blockID'] . ' .entry-meta div:hover,
|
924 |
#section-' . $attributes['blockID'] . ' .entry-meta div a:hover{
|
925 |
' . gutentor_generate_css('color', ($meta_color_enable && $attributes['entryMetaColor']['hover']) ? $attributes['entryMetaColor']['hover']['hex'] : null) . '
|
926 |
}';
|
927 |
|
928 |
+
$local_dynamic_css['tablet'] .= '#section-' . $attributes['blockID'] . ' .entry-meta div{
|
929 |
+
'. gutentor_typography_options_responsive_css($entry_meta_typography,'tablet') . '
|
|
|
930 |
'.gutentor_box_four_device_options_css('margin',$entry_meta_margin,'tablet').'
|
931 |
+
'.gutentor_box_four_device_options_css('padding',$entry_meta_padding,'tablet').'
|
932 |
}';
|
933 |
+
$local_dynamic_css['desktop'] .= '#section-' . $attributes['blockID'] . ' .entry-meta div{
|
934 |
+
'. gutentor_typography_options_responsive_css($entry_meta_typography,'desktop') . '
|
935 |
+
'.gutentor_box_four_device_options_css('margin',$entry_meta_margin,'desktop').'
|
936 |
+
'.gutentor_box_four_device_options_css('padding',$entry_meta_padding,'desktop').'
|
|
|
937 |
}';
|
938 |
|
939 |
/*Image overlay css*/
|
includes/hooks.php
CHANGED
@@ -281,7 +281,7 @@ class Gutentor_Hooks {
|
|
281 |
'countUp', // Handle.
|
282 |
GUTENTOR_URL . '/assets/library/countUp/countUp' . GUTENTOR_SCRIPT_PREFIX . '.js',
|
283 |
array('jquery'), // Dependencies, defined above.
|
284 |
-
'
|
285 |
true // Enqueue the script in the footer.
|
286 |
);
|
287 |
|
281 |
'countUp', // Handle.
|
282 |
GUTENTOR_URL . '/assets/library/countUp/countUp' . GUTENTOR_SCRIPT_PREFIX . '.js',
|
283 |
array('jquery'), // Dependencies, defined above.
|
284 |
+
'1.9.3', // Version: File modification time.
|
285 |
true // Enqueue the script in the footer.
|
286 |
);
|
287 |
|
includes/tools/class-advanced-import.php
CHANGED
@@ -570,6 +570,17 @@ if ( ! class_exists( 'Gutentor_Advanced_Import_Server' ) ) {
|
|
570 |
'screenshot_url' => 'https://raw.githubusercontent.com/gutentor/template-library/master/templates/education/education-1/education-template.jpg',
|
571 |
'demo_url' => 'https://www.demo.gutentor.com/templates/education-1/',
|
572 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
573 |
);
|
574 |
|
575 |
$templates = apply_filters( 'gutentor_advanced_import_templates', $templates_list );
|
570 |
'screenshot_url' => 'https://raw.githubusercontent.com/gutentor/template-library/master/templates/education/education-1/education-template.jpg',
|
571 |
'demo_url' => 'https://www.demo.gutentor.com/templates/education-1/',
|
572 |
),
|
573 |
+
|
574 |
+
array(
|
575 |
+
'title' => __( 'Agency', 'gutentor' ),
|
576 |
+
'type' => 'template',
|
577 |
+
'author' => __( 'Gutentor', 'gutentor' ),
|
578 |
+
'keywords' => array( 'agency', 'agency 1' ),
|
579 |
+
'categories' => array( 'agency' ),
|
580 |
+
'template_url' => 'https://raw.githubusercontent.com/gutentor/template-library/master/templates/agency/agency-1/template.json',
|
581 |
+
'screenshot_url' => 'https://raw.githubusercontent.com/gutentor/template-library/master/templates/agency/agency-1/agency-template.jpg',
|
582 |
+
'demo_url' => 'https://www.demo.gutentor.com/templates/agency-1/',
|
583 |
+
),
|
584 |
);
|
585 |
|
586 |
$templates = apply_filters( 'gutentor_advanced_import_templates', $templates_list );
|
readme.txt
CHANGED
@@ -6,7 +6,7 @@ Tags: blocks, block, block editor, drag-and-drop, landing page, website builder,
|
|
6 |
Requires at least: 5.0
|
7 |
Tested up to: 5.2.3
|
8 |
Requires PHP: 5.6.20
|
9 |
-
Stable tag: 1.0.
|
10 |
License: GPLv2 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
|
@@ -158,6 +158,13 @@ Yes We provide Free Support via WordPress Support Forum https://wordpress.org/su
|
|
158 |
|
159 |
== Changelog ==
|
160 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
161 |
= 1.0.3 - 2019-09-06 =
|
162 |
* Fixed : Gallery Design
|
163 |
* Fixed : Advanced Column on Editor
|
6 |
Requires at least: 5.0
|
7 |
Tested up to: 5.2.3
|
8 |
Requires PHP: 5.6.20
|
9 |
+
Stable tag: 1.0.4
|
10 |
License: GPLv2 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
|
158 |
|
159 |
== Changelog ==
|
160 |
|
161 |
+
= 1.0.4 - 2019-09-09 =
|
162 |
+
* Fixed : Countup JS
|
163 |
+
* Fixed : Blog Mobile Issue
|
164 |
+
* Fixed : Advanced Column
|
165 |
+
* Added : Agency templates
|
166 |
+
* Update : Minor change and fixes
|
167 |
+
|
168 |
= 1.0.3 - 2019-09-06 =
|
169 |
* Fixed : Gallery Design
|
170 |
* Fixed : Advanced Column on Editor
|