Version Description
- February 2 2016 =
- Added Number counter widget.
- Added Circle counter widget.
- Added Bar counter widget.
- Added pagination and other options to the blog widget.
- Fix to clear css cache after update.
- Removed id as a required field in tabs and accordions.
- Some other minor fixes to tabs and accordions.
Download this release
Release Info
Developer | iamadi |
Plugin | Widgets for SiteOrigin |
Version | 1.2.0 |
Comparing to | |
See all releases |
Code changes from version 1.1.0 to 1.2.0
- inc/enqueue.php +3 -1
- inc/functions.php +13 -4
- readme.txt +18 -6
- statics/countto.js +130 -0
- statics/waypoints.js +649 -0
- widgets-for-siteorigin.php +39 -3
- widgets/ink-ardn-widget/ink-ardn-widget.php +7 -7
- widgets/ink-ardn-widget/styles/accordion.css +14 -10
- widgets/ink-ardn-widget/tpl/accordion.php +11 -5
- widgets/ink-barc-widget/assets/banner.svg +19 -0
- widgets/ink-barc-widget/ink-barc-widget.php +173 -0
- widgets/ink-barc-widget/scripts/bar.js +18 -0
- widgets/ink-barc-widget/styles/bar.less +45 -0
- widgets/ink-barc-widget/tpl/bar.php +13 -0
- widgets/ink-blgs-widget/ink-blgs-widget.php +156 -5
- widgets/ink-blgs-widget/styles/blog.css +14 -8
- widgets/ink-blgs-widget/styles/button.less +53 -52
- widgets/ink-blgs-widget/styles/navigation.less +170 -0
- widgets/ink-blgs-widget/styles/thumb-above.less +8 -7
- widgets/ink-blgs-widget/styles/thumb-behind.less +4 -3
- widgets/ink-blgs-widget/styles/thumb-left.less +9 -8
- widgets/ink-blgs-widget/styles/thumb-none.less +4 -3
- widgets/ink-blgs-widget/styles/thumb-right.less +9 -8
- widgets/ink-blgs-widget/tpl/thumb-above.php +121 -66
- widgets/ink-blgs-widget/tpl/thumb-behind.php +117 -63
- widgets/ink-blgs-widget/tpl/thumb-left.php +118 -60
- widgets/ink-blgs-widget/tpl/thumb-none.php +120 -55
- widgets/ink-blgs-widget/tpl/thumb-right.php +118 -60
- widgets/ink-crlc-widget/assets/banner.svg +21 -0
- widgets/ink-crlc-widget/ink-crlc-widget.php +191 -0
- widgets/ink-crlc-widget/scripts/circle.init.js +17 -0
- widgets/ink-crlc-widget/scripts/easypie.js +364 -0
- widgets/ink-crlc-widget/styles/circle.less +31 -0
- widgets/ink-crlc-widget/tpl/circle.php +29 -0
- widgets/ink-fard-widget/ink-fard-widget.php +9 -7
- widgets/ink-fard-widget/scripts/accordion.init.js +1 -0
- widgets/ink-fard-widget/scripts/accordion.js +125 -0
- widgets/ink-fard-widget/scripts/filter.init.js +1 -3
- widgets/ink-fard-widget/tpl/accordion.php +13 -7
- widgets/ink-numc-widget/assets/banner.svg +17 -0
- widgets/ink-numc-widget/ink-numc-widget.php +157 -0
- widgets/ink-numc-widget/scripts/countto.init.js +15 -0
- widgets/ink-numc-widget/styles/number.less +20 -0
- widgets/ink-numc-widget/tpl/number.php +22 -0
- widgets/ink-tabb-widget/ink-tabb-widget.php +3 -3
- widgets/ink-tabb-widget/tpl/tabs.php +9 -3
inc/enqueue.php
CHANGED
@@ -13,8 +13,10 @@ function wpinked_so_register_styles() {
|
|
13 |
wp_register_script( 'iw-modernizr-js', plugin_dir_url(__FILE__) . '../statics/modernizr.js', array( ), INKED_SO_WIDGETS, false );
|
14 |
wp_register_script( 'iw-foundation-js', plugin_dir_url(__FILE__) . '../statics/foundation.js', array( 'jquery', 'iw-modernizr-js' ), INKED_SO_WIDGETS, true );
|
15 |
wp_register_script( 'iw-equalizer-js', plugin_dir_url(__FILE__) . '../statics/equalizer.js', array( 'iw-foundation-js' ), INKED_SO_WIDGETS, true );
|
|
|
|
|
16 |
|
17 |
// Enqueueing CSS Files
|
18 |
wp_enqueue_style( 'iw-defaults', plugin_dir_url(__FILE__) . '../statics/defaults.css', array(), INKED_SO_WIDGETS );
|
19 |
}
|
20 |
-
add_action( 'wp_enqueue_scripts', 'wpinked_so_register_styles' );
|
13 |
wp_register_script( 'iw-modernizr-js', plugin_dir_url(__FILE__) . '../statics/modernizr.js', array( ), INKED_SO_WIDGETS, false );
|
14 |
wp_register_script( 'iw-foundation-js', plugin_dir_url(__FILE__) . '../statics/foundation.js', array( 'jquery', 'iw-modernizr-js' ), INKED_SO_WIDGETS, true );
|
15 |
wp_register_script( 'iw-equalizer-js', plugin_dir_url(__FILE__) . '../statics/equalizer.js', array( 'iw-foundation-js' ), INKED_SO_WIDGETS, true );
|
16 |
+
wp_register_script( 'iw-waypoint-js', plugin_dir_url(__FILE__) . '../statics/waypoints.js', array( 'jquery' ), INKED_SO_WIDGETS, true );
|
17 |
+
wp_register_script( 'iw-countto-js', plugin_dir_url(__FILE__) . '../statics/countto.js', array( 'jquery' ), INKED_SO_WIDGETS, true );
|
18 |
|
19 |
// Enqueueing CSS Files
|
20 |
wp_enqueue_style( 'iw-defaults', plugin_dir_url(__FILE__) . '../statics/defaults.css', array(), INKED_SO_WIDGETS );
|
21 |
}
|
22 |
+
add_action( 'wp_enqueue_scripts', 'wpinked_so_register_styles' );
|
inc/functions.php
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
<?php
|
2 |
|
3 |
add_image_size( 'folio', 600, 400, true );
|
4 |
|
@@ -31,8 +31,8 @@ function wpinked_so_post_excerpt ( $limit, $after ) {
|
|
31 |
else :
|
32 |
|
33 |
$excerpt = get_the_excerpt();
|
34 |
-
|
35 |
-
endif;
|
36 |
|
37 |
$excerpt = preg_replace('`\[[^\]]*\]`','',$excerpt);
|
38 |
|
@@ -81,4 +81,13 @@ function wpinked_so_testimonial_name ( $name, $company, $link, $target, $align )
|
|
81 |
|
82 |
<?php }
|
83 |
|
84 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
|
3 |
add_image_size( 'folio', 600, 400, true );
|
4 |
|
31 |
else :
|
32 |
|
33 |
$excerpt = get_the_excerpt();
|
34 |
+
|
35 |
+
endif;
|
36 |
|
37 |
$excerpt = preg_replace('`\[[^\]]*\]`','',$excerpt);
|
38 |
|
81 |
|
82 |
<?php }
|
83 |
|
84 |
+
}
|
85 |
+
|
86 |
+
function wpinked_so_blog_post_col($count, $cols) {
|
87 |
+
if( $count % $cols == 0 ):
|
88 |
+
echo 'iw-so-last-col';
|
89 |
+
endif;
|
90 |
+
if( $count % $cols == 1 ):
|
91 |
+
echo 'iw-so-first-col';
|
92 |
+
endif;
|
93 |
+
}
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: iamadi
|
3 |
Tags: bundle, widget, button, alert, accordion, audio, video, blog, divider, person, portfolio, tabs, testimonial, siteorigin
|
4 |
Requires at least: 3.9
|
5 |
-
Tested up to: 4.
|
6 |
-
Stable tag: 1.
|
7 |
License: GPLv3 or later
|
8 |
|
9 |
A few more widgets to play around with. Built on top of the SiteOrigin Widgets Bundle.
|
@@ -25,12 +25,15 @@ The Widgets that are included:
|
|
25 |
* Testimonial Widget to highlight what your customers think of you.
|
26 |
* Person Widget to get to know you better.
|
27 |
* Alert Widget to communicate success, warnings, failure or just information.
|
28 |
-
*
|
|
|
|
|
|
|
29 |
* Button Widget to harness the power of click.
|
30 |
|
31 |
Additional Feature:
|
32 |
|
33 |
-
* Visibility to show/hide widgets and rows based on screen width and orientation.
|
34 |
|
35 |
This is all we have at the moment and hope to have much more in days to come.
|
36 |
|
@@ -38,7 +41,7 @@ Check out the <a target="_blank" href="http://demo.wpinked.com/">demos</a>.
|
|
38 |
|
39 |
Have a look at the <a target="_blank" href="http://docs.wpinked.com/">documentation</a>.
|
40 |
|
41 |
-
You can follow the progress of the project on <a target="_blank" href="https://github.com/
|
42 |
|
43 |
== Installation ==
|
44 |
|
@@ -55,6 +58,15 @@ Upload and install these plugins.
|
|
55 |
|
56 |
== Changelog ==
|
57 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
= 1.1.0 - December 3 2015 =
|
59 |
* Cleaned up code and fixed bugs.
|
60 |
* Updated scripts and styles.
|
@@ -67,4 +79,4 @@ Upload and install these plugins.
|
|
67 |
* Added excerpt link, Button and Full Content Option to the Blog Widget.
|
68 |
|
69 |
= 1.0.0 - October 26 2015 =
|
70 |
-
* Initial release.
|
2 |
Contributors: iamadi
|
3 |
Tags: bundle, widget, button, alert, accordion, audio, video, blog, divider, person, portfolio, tabs, testimonial, siteorigin
|
4 |
Requires at least: 3.9
|
5 |
+
Tested up to: 4.4
|
6 |
+
Stable tag: 1.2.0
|
7 |
License: GPLv3 or later
|
8 |
|
9 |
A few more widgets to play around with. Built on top of the SiteOrigin Widgets Bundle.
|
25 |
* Testimonial Widget to highlight what your customers think of you.
|
26 |
* Person Widget to get to know you better.
|
27 |
* Alert Widget to communicate success, warnings, failure or just information.
|
28 |
+
* Number Counter Widget to display your stats.
|
29 |
+
* Circle Counter Widget to display your stats with animated circles.
|
30 |
+
* Bar Counter Widget to display your stats with animated bars.
|
31 |
+
* Divider Widget to draw separators or create gaps in your page.
|
32 |
* Button Widget to harness the power of click.
|
33 |
|
34 |
Additional Feature:
|
35 |
|
36 |
+
* Visibility to show/hide widgets and rows based on screen width and orientation.
|
37 |
|
38 |
This is all we have at the moment and hope to have much more in days to come.
|
39 |
|
41 |
|
42 |
Have a look at the <a target="_blank" href="http://docs.wpinked.com/">documentation</a>.
|
43 |
|
44 |
+
You can follow the progress of the project on <a target="_blank" href="https://github.com/wpinked/widgets-for-siteorigin">Github</a>.
|
45 |
|
46 |
== Installation ==
|
47 |
|
58 |
|
59 |
== Changelog ==
|
60 |
|
61 |
+
= 1.2.0 - February 2 2016 =
|
62 |
+
* Added Number counter widget.
|
63 |
+
* Added Circle counter widget.
|
64 |
+
* Added Bar counter widget.
|
65 |
+
* Added pagination and other options to the blog widget.
|
66 |
+
* Fix to clear css cache after update.
|
67 |
+
* Removed id as a required field in tabs and accordions.
|
68 |
+
* Some other minor fixes to tabs and accordions.
|
69 |
+
|
70 |
= 1.1.0 - December 3 2015 =
|
71 |
* Cleaned up code and fixed bugs.
|
72 |
* Updated scripts and styles.
|
79 |
* Added excerpt link, Button and Full Content Option to the Blog Widget.
|
80 |
|
81 |
= 1.0.0 - October 26 2015 =
|
82 |
+
* Initial release.
|
statics/countto.js
ADDED
@@ -0,0 +1,130 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function (factory) {
|
2 |
+
if (typeof define === 'function' && define.amd) {
|
3 |
+
// AMD
|
4 |
+
define(['jquery'], factory);
|
5 |
+
} else if (typeof exports === 'object') {
|
6 |
+
// CommonJS
|
7 |
+
factory(require('jquery'));
|
8 |
+
} else {
|
9 |
+
// Browser globals
|
10 |
+
factory(jQuery);
|
11 |
+
}
|
12 |
+
}(function ($) {
|
13 |
+
var CountTo = function (element, options) {
|
14 |
+
this.$element = $(element);
|
15 |
+
this.options = $.extend({}, CountTo.DEFAULTS, this.dataOptions(), options);
|
16 |
+
this.init();
|
17 |
+
};
|
18 |
+
|
19 |
+
CountTo.DEFAULTS = {
|
20 |
+
from: 0, // the number the element should start at
|
21 |
+
to: 0, // the number the element should end at
|
22 |
+
speed: 1000, // how long it should take to count between the target numbers
|
23 |
+
refreshInterval: 100, // how often the element should be updated
|
24 |
+
decimals: 0, // the number of decimal places to show
|
25 |
+
formatter: formatter, // handler for formatting the value before rendering
|
26 |
+
onUpdate: null, // callback method for every time the element is updated
|
27 |
+
onComplete: null // callback method for when the element finishes updating
|
28 |
+
};
|
29 |
+
|
30 |
+
CountTo.prototype.init = function () {
|
31 |
+
this.value = this.options.from;
|
32 |
+
this.loops = Math.ceil(this.options.speed / this.options.refreshInterval);
|
33 |
+
this.loopCount = 0;
|
34 |
+
this.increment = (this.options.to - this.options.from) / this.loops;
|
35 |
+
};
|
36 |
+
|
37 |
+
CountTo.prototype.dataOptions = function () {
|
38 |
+
var options = {
|
39 |
+
from: this.$element.data('from'),
|
40 |
+
to: this.$element.data('to'),
|
41 |
+
speed: this.$element.data('speed'),
|
42 |
+
refreshInterval: this.$element.data('refresh-interval'),
|
43 |
+
decimals: this.$element.data('decimals')
|
44 |
+
};
|
45 |
+
|
46 |
+
var keys = Object.keys(options);
|
47 |
+
|
48 |
+
for (var i in keys) {
|
49 |
+
var key = keys[i];
|
50 |
+
|
51 |
+
if (typeof(options[key]) === 'undefined') {
|
52 |
+
delete options[key];
|
53 |
+
}
|
54 |
+
}
|
55 |
+
|
56 |
+
return options;
|
57 |
+
};
|
58 |
+
|
59 |
+
CountTo.prototype.update = function () {
|
60 |
+
this.value += this.increment;
|
61 |
+
this.loopCount++;
|
62 |
+
|
63 |
+
this.render();
|
64 |
+
|
65 |
+
if (typeof(this.options.onUpdate) == 'function') {
|
66 |
+
this.options.onUpdate.call(this.$element, this.value);
|
67 |
+
}
|
68 |
+
|
69 |
+
if (this.loopCount >= this.loops) {
|
70 |
+
clearInterval(this.interval);
|
71 |
+
this.value = this.options.to;
|
72 |
+
|
73 |
+
if (typeof(this.options.onComplete) == 'function') {
|
74 |
+
this.options.onComplete.call(this.$element, this.value);
|
75 |
+
}
|
76 |
+
}
|
77 |
+
};
|
78 |
+
|
79 |
+
CountTo.prototype.render = function () {
|
80 |
+
var formattedValue = this.options.formatter.call(this.$element, this.value, this.options);
|
81 |
+
this.$element.text(formattedValue);
|
82 |
+
};
|
83 |
+
|
84 |
+
CountTo.prototype.restart = function () {
|
85 |
+
this.stop();
|
86 |
+
this.init();
|
87 |
+
this.start();
|
88 |
+
};
|
89 |
+
|
90 |
+
CountTo.prototype.start = function () {
|
91 |
+
this.stop();
|
92 |
+
this.render();
|
93 |
+
this.interval = setInterval(this.update.bind(this), this.options.refreshInterval);
|
94 |
+
};
|
95 |
+
|
96 |
+
CountTo.prototype.stop = function () {
|
97 |
+
if (this.interval) {
|
98 |
+
clearInterval(this.interval);
|
99 |
+
}
|
100 |
+
};
|
101 |
+
|
102 |
+
CountTo.prototype.toggle = function () {
|
103 |
+
if (this.interval) {
|
104 |
+
this.stop();
|
105 |
+
} else {
|
106 |
+
this.start();
|
107 |
+
}
|
108 |
+
};
|
109 |
+
|
110 |
+
function formatter(value, options) {
|
111 |
+
return value.toFixed(options.decimals);
|
112 |
+
}
|
113 |
+
|
114 |
+
$.fn.countTo = function (option) {
|
115 |
+
return this.each(function () {
|
116 |
+
var $this = $(this);
|
117 |
+
var data = $this.data('countTo');
|
118 |
+
var init = !data || typeof(option) === 'object';
|
119 |
+
var options = typeof(option) === 'object' ? option : {};
|
120 |
+
var method = typeof(option) === 'string' ? option : 'start';
|
121 |
+
|
122 |
+
if (init) {
|
123 |
+
if (data) data.stop();
|
124 |
+
$this.data('countTo', data = new CountTo(this, options));
|
125 |
+
}
|
126 |
+
|
127 |
+
data[method].call(data);
|
128 |
+
});
|
129 |
+
};
|
130 |
+
}));
|
statics/waypoints.js
ADDED
@@ -0,0 +1,649 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
Waypoints - 4.0.0
|
3 |
+
Copyright © 2011-2015 Caleb Troughton
|
4 |
+
Licensed under the MIT license.
|
5 |
+
https://github.com/imakewebthings/waypoints/blog/master/licenses.txt
|
6 |
+
*/
|
7 |
+
(function() {
|
8 |
+
'use strict'
|
9 |
+
|
10 |
+
var keyCounter = 0
|
11 |
+
var allWaypoints = {}
|
12 |
+
|
13 |
+
/* http://imakewebthings.com/waypoints/api/waypoint */
|
14 |
+
function Waypoint(options) {
|
15 |
+
if (!options) {
|
16 |
+
throw new Error('No options passed to Waypoint constructor')
|
17 |
+
}
|
18 |
+
if (!options.element) {
|
19 |
+
throw new Error('No element option passed to Waypoint constructor')
|
20 |
+
}
|
21 |
+
if (!options.handler) {
|
22 |
+
throw new Error('No handler option passed to Waypoint constructor')
|
23 |
+
}
|
24 |
+
|
25 |
+
this.key = 'waypoint-' + keyCounter
|
26 |
+
this.options = Waypoint.Adapter.extend({}, Waypoint.defaults, options)
|
27 |
+
this.element = this.options.element
|
28 |
+
this.adapter = new Waypoint.Adapter(this.element)
|
29 |
+
this.callback = options.handler
|
30 |
+
this.axis = this.options.horizontal ? 'horizontal' : 'vertical'
|
31 |
+
this.enabled = this.options.enabled
|
32 |
+
this.triggerPoint = null
|
33 |
+
this.group = Waypoint.Group.findOrCreate({
|
34 |
+
name: this.options.group,
|
35 |
+
axis: this.axis
|
36 |
+
})
|
37 |
+
this.context = Waypoint.Context.findOrCreateByElement(this.options.context)
|
38 |
+
|
39 |
+
if (Waypoint.offsetAliases[this.options.offset]) {
|
40 |
+
this.options.offset = Waypoint.offsetAliases[this.options.offset]
|
41 |
+
}
|
42 |
+
this.group.add(this)
|
43 |
+
this.context.add(this)
|
44 |
+
allWaypoints[this.key] = this
|
45 |
+
keyCounter += 1
|
46 |
+
}
|
47 |
+
|
48 |
+
/* Private */
|
49 |
+
Waypoint.prototype.queueTrigger = function(direction) {
|
50 |
+
this.group.queueTrigger(this, direction)
|
51 |
+
}
|
52 |
+
|
53 |
+
/* Private */
|
54 |
+
Waypoint.prototype.trigger = function(args) {
|
55 |
+
if (!this.enabled) {
|
56 |
+
return
|
57 |
+
}
|
58 |
+
if (this.callback) {
|
59 |
+
this.callback.apply(this, args)
|
60 |
+
}
|
61 |
+
}
|
62 |
+
|
63 |
+
/* Public */
|
64 |
+
/* http://imakewebthings.com/waypoints/api/destroy */
|
65 |
+
Waypoint.prototype.destroy = function() {
|
66 |
+
this.context.remove(this)
|
67 |
+
this.group.remove(this)
|
68 |
+
delete allWaypoints[this.key]
|
69 |
+
}
|
70 |
+
|
71 |
+
/* Public */
|
72 |
+
/* http://imakewebthings.com/waypoints/api/disable */
|
73 |
+
Waypoint.prototype.disable = function() {
|
74 |
+
this.enabled = false
|
75 |
+
return this
|
76 |
+
}
|
77 |
+
|
78 |
+
/* Public */
|
79 |
+
/* http://imakewebthings.com/waypoints/api/enable */
|
80 |
+
Waypoint.prototype.enable = function() {
|
81 |
+
this.context.refresh()
|
82 |
+
this.enabled = true
|
83 |
+
return this
|
84 |
+
}
|
85 |
+
|
86 |
+
/* Public */
|
87 |
+
/* http://imakewebthings.com/waypoints/api/next */
|
88 |
+
Waypoint.prototype.next = function() {
|
89 |
+
return this.group.next(this)
|
90 |
+
}
|
91 |
+
|
92 |
+
/* Public */
|
93 |
+
/* http://imakewebthings.com/waypoints/api/previous */
|
94 |
+
Waypoint.prototype.previous = function() {
|
95 |
+
return this.group.previous(this)
|
96 |
+
}
|
97 |
+
|
98 |
+
/* Private */
|
99 |
+
Waypoint.invokeAll = function(method) {
|
100 |
+
var allWaypointsArray = []
|
101 |
+
for (var waypointKey in allWaypoints) {
|
102 |
+
allWaypointsArray.push(allWaypoints[waypointKey])
|
103 |
+
}
|
104 |
+
for (var i = 0, end = allWaypointsArray.length; i < end; i++) {
|
105 |
+
allWaypointsArray[i][method]()
|
106 |
+
}
|
107 |
+
}
|
108 |
+
|
109 |
+
/* Public */
|
110 |
+
/* http://imakewebthings.com/waypoints/api/destroy-all */
|
111 |
+
Waypoint.destroyAll = function() {
|
112 |
+
Waypoint.invokeAll('destroy')
|
113 |
+
}
|
114 |
+
|
115 |
+
/* Public */
|
116 |
+
/* http://imakewebthings.com/waypoints/api/disable-all */
|
117 |
+
Waypoint.disableAll = function() {
|
118 |
+
Waypoint.invokeAll('disable')
|
119 |
+
}
|
120 |
+
|
121 |
+
/* Public */
|
122 |
+
/* http://imakewebthings.com/waypoints/api/enable-all */
|
123 |
+
Waypoint.enableAll = function() {
|
124 |
+
Waypoint.invokeAll('enable')
|
125 |
+
}
|
126 |
+
|
127 |
+
/* Public */
|
128 |
+
/* http://imakewebthings.com/waypoints/api/refresh-all */
|
129 |
+
Waypoint.refreshAll = function() {
|
130 |
+
Waypoint.Context.refreshAll()
|
131 |
+
}
|
132 |
+
|
133 |
+
/* Public */
|
134 |
+
/* http://imakewebthings.com/waypoints/api/viewport-height */
|
135 |
+
Waypoint.viewportHeight = function() {
|
136 |
+
return window.innerHeight || document.documentElement.clientHeight
|
137 |
+
}
|
138 |
+
|
139 |
+
/* Public */
|
140 |
+
/* http://imakewebthings.com/waypoints/api/viewport-width */
|
141 |
+
Waypoint.viewportWidth = function() {
|
142 |
+
return document.documentElement.clientWidth
|
143 |
+
}
|
144 |
+
|
145 |
+
Waypoint.adapters = []
|
146 |
+
|
147 |
+
Waypoint.defaults = {
|
148 |
+
context: window,
|
149 |
+
continuous: true,
|
150 |
+
enabled: true,
|
151 |
+
group: 'default',
|
152 |
+
horizontal: false,
|
153 |
+
offset: 0
|
154 |
+
}
|
155 |
+
|
156 |
+
Waypoint.offsetAliases = {
|
157 |
+
'bottom-in-view': function() {
|
158 |
+
return this.context.innerHeight() - this.adapter.outerHeight()
|
159 |
+
},
|
160 |
+
'right-in-view': function() {
|
161 |
+
return this.context.innerWidth() - this.adapter.outerWidth()
|
162 |
+
}
|
163 |
+
}
|
164 |
+
|
165 |
+
window.Waypoint = Waypoint
|
166 |
+
}())
|
167 |
+
;(function() {
|
168 |
+
'use strict'
|
169 |
+
|
170 |
+
function requestAnimationFrameShim(callback) {
|
171 |
+
window.setTimeout(callback, 1000 / 60)
|
172 |
+
}
|
173 |
+
|
174 |
+
var keyCounter = 0
|
175 |
+
var contexts = {}
|
176 |
+
var Waypoint = window.Waypoint
|
177 |
+
var oldWindowLoad = window.onload
|
178 |
+
|
179 |
+
/* http://imakewebthings.com/waypoints/api/context */
|
180 |
+
function Context(element) {
|
181 |
+
this.element = element
|
182 |
+
this.Adapter = Waypoint.Adapter
|
183 |
+
this.adapter = new this.Adapter(element)
|
184 |
+
this.key = 'waypoint-context-' + keyCounter
|
185 |
+
this.didScroll = false
|
186 |
+
this.didResize = false
|
187 |
+
this.oldScroll = {
|
188 |
+
x: this.adapter.scrollLeft(),
|
189 |
+
y: this.adapter.scrollTop()
|
190 |
+
}
|
191 |
+
this.waypoints = {
|
192 |
+
vertical: {},
|
193 |
+
horizontal: {}
|
194 |
+
}
|
195 |
+
|
196 |
+
element.waypointContextKey = this.key
|
197 |
+
contexts[element.waypointContextKey] = this
|
198 |
+
keyCounter += 1
|
199 |
+
|
200 |
+
this.createThrottledScrollHandler()
|
201 |
+
this.createThrottledResizeHandler()
|
202 |
+
}
|
203 |
+
|
204 |
+
/* Private */
|
205 |
+
Context.prototype.add = function(waypoint) {
|
206 |
+
var axis = waypoint.options.horizontal ? 'horizontal' : 'vertical'
|
207 |
+
this.waypoints[axis][waypoint.key] = waypoint
|
208 |
+
this.refresh()
|
209 |
+
}
|
210 |
+
|
211 |
+
/* Private */
|
212 |
+
Context.prototype.checkEmpty = function() {
|
213 |
+
var horizontalEmpty = this.Adapter.isEmptyObject(this.waypoints.horizontal)
|
214 |
+
var verticalEmpty = this.Adapter.isEmptyObject(this.waypoints.vertical)
|
215 |
+
if (horizontalEmpty && verticalEmpty) {
|
216 |
+
this.adapter.off('.waypoints')
|
217 |
+
delete contexts[this.key]
|
218 |
+
}
|
219 |
+
}
|
220 |
+
|
221 |
+
/* Private */
|
222 |
+
Context.prototype.createThrottledResizeHandler = function() {
|
223 |
+
var self = this
|
224 |
+
|
225 |
+
function resizeHandler() {
|
226 |
+
self.handleResize()
|
227 |
+
self.didResize = false
|
228 |
+
}
|
229 |
+
|
230 |
+
this.adapter.on('resize.waypoints', function() {
|
231 |
+
if (!self.didResize) {
|
232 |
+
self.didResize = true
|
233 |
+
Waypoint.requestAnimationFrame(resizeHandler)
|
234 |
+
}
|
235 |
+
})
|
236 |
+
}
|
237 |
+
|
238 |
+
/* Private */
|
239 |
+
Context.prototype.createThrottledScrollHandler = function() {
|
240 |
+
var self = this
|
241 |
+
function scrollHandler() {
|
242 |
+
self.handleScroll()
|
243 |
+
self.didScroll = false
|
244 |
+
}
|
245 |
+
|
246 |
+
this.adapter.on('scroll.waypoints', function() {
|
247 |
+
if (!self.didScroll || Waypoint.isTouch) {
|
248 |
+
self.didScroll = true
|
249 |
+
Waypoint.requestAnimationFrame(scrollHandler)
|
250 |
+
}
|
251 |
+
})
|
252 |
+
}
|
253 |
+
|
254 |
+
/* Private */
|
255 |
+
Context.prototype.handleResize = function() {
|
256 |
+
Waypoint.Context.refreshAll()
|
257 |
+
}
|
258 |
+
|
259 |
+
/* Private */
|
260 |
+
Context.prototype.handleScroll = function() {
|
261 |
+
var triggeredGroups = {}
|
262 |
+
var axes = {
|
263 |
+
horizontal: {
|
264 |
+
newScroll: this.adapter.scrollLeft(),
|
265 |
+
oldScroll: this.oldScroll.x,
|
266 |
+
forward: 'right',
|
267 |
+
backward: 'left'
|
268 |
+
},
|
269 |
+
vertical: {
|
270 |
+
newScroll: this.adapter.scrollTop(),
|
271 |
+
oldScroll: this.oldScroll.y,
|
272 |
+
forward: 'down',
|
273 |
+
backward: 'up'
|
274 |
+
}
|
275 |
+
}
|
276 |
+
|
277 |
+
for (var axisKey in axes) {
|
278 |
+
var axis = axes[axisKey]
|
279 |
+
var isForward = axis.newScroll > axis.oldScroll
|
280 |
+
var direction = isForward ? axis.forward : axis.backward
|
281 |
+
|
282 |
+
for (var waypointKey in this.waypoints[axisKey]) {
|
283 |
+
var waypoint = this.waypoints[axisKey][waypointKey]
|
284 |
+
var wasBeforeTriggerPoint = axis.oldScroll < waypoint.triggerPoint
|
285 |
+
var nowAfterTriggerPoint = axis.newScroll >= waypoint.triggerPoint
|
286 |
+
var crossedForward = wasBeforeTriggerPoint && nowAfterTriggerPoint
|
287 |
+
var crossedBackward = !wasBeforeTriggerPoint && !nowAfterTriggerPoint
|
288 |
+
if (crossedForward || crossedBackward) {
|
289 |
+
waypoint.queueTrigger(direction)
|
290 |
+
triggeredGroups[waypoint.group.id] = waypoint.group
|
291 |
+
}
|
292 |
+
}
|
293 |
+
}
|
294 |
+
|
295 |
+
for (var groupKey in triggeredGroups) {
|
296 |
+
triggeredGroups[groupKey].flushTriggers()
|
297 |
+
}
|
298 |
+
|
299 |
+
this.oldScroll = {
|
300 |
+
x: axes.horizontal.newScroll,
|
301 |
+
y: axes.vertical.newScroll
|
302 |
+
}
|
303 |
+
}
|
304 |
+
|
305 |
+
/* Private */
|
306 |
+
Context.prototype.innerHeight = function() {
|
307 |
+
/*eslint-disable eqeqeq */
|
308 |
+
if (this.element == this.element.window) {
|
309 |
+
return Waypoint.viewportHeight()
|
310 |
+
}
|
311 |
+
/*eslint-enable eqeqeq */
|
312 |
+
return this.adapter.innerHeight()
|
313 |
+
}
|
314 |
+
|
315 |
+
/* Private */
|
316 |
+
Context.prototype.remove = function(waypoint) {
|
317 |
+
delete this.waypoints[waypoint.axis][waypoint.key]
|
318 |
+
this.checkEmpty()
|
319 |
+
}
|
320 |
+
|
321 |
+
/* Private */
|
322 |
+
Context.prototype.innerWidth = function() {
|
323 |
+
/*eslint-disable eqeqeq */
|
324 |
+
if (this.element == this.element.window) {
|
325 |
+
return Waypoint.viewportWidth()
|
326 |
+
}
|
327 |
+
/*eslint-enable eqeqeq */
|
328 |
+
return this.adapter.innerWidth()
|
329 |
+
}
|
330 |
+
|
331 |
+
/* Public */
|
332 |
+
/* http://imakewebthings.com/waypoints/api/context-destroy */
|
333 |
+
Context.prototype.destroy = function() {
|
334 |
+
var allWaypoints = []
|
335 |
+
for (var axis in this.waypoints) {
|
336 |
+
for (var waypointKey in this.waypoints[axis]) {
|
337 |
+
allWaypoints.push(this.waypoints[axis][waypointKey])
|
338 |
+
}
|
339 |
+
}
|
340 |
+
for (var i = 0, end = allWaypoints.length; i < end; i++) {
|
341 |
+
allWaypoints[i].destroy()
|
342 |
+
}
|
343 |
+
}
|
344 |
+
|
345 |
+
/* Public */
|
346 |
+
/* http://imakewebthings.com/waypoints/api/context-refresh */
|
347 |
+
Context.prototype.refresh = function() {
|
348 |
+
/*eslint-disable eqeqeq */
|
349 |
+
var isWindow = this.element == this.element.window
|
350 |
+
/*eslint-enable eqeqeq */
|
351 |
+
var contextOffset = isWindow ? undefined : this.adapter.offset()
|
352 |
+
var triggeredGroups = {}
|
353 |
+
var axes
|
354 |
+
|
355 |
+
this.handleScroll()
|
356 |
+
axes = {
|
357 |
+
horizontal: {
|
358 |
+
contextOffset: isWindow ? 0 : contextOffset.left,
|
359 |
+
contextScroll: isWindow ? 0 : this.oldScroll.x,
|
360 |
+
contextDimension: this.innerWidth(),
|
361 |
+
oldScroll: this.oldScroll.x,
|
362 |
+
forward: 'right',
|
363 |
+
backward: 'left',
|
364 |
+
offsetProp: 'left'
|
365 |
+
},
|
366 |
+
vertical: {
|
367 |
+
contextOffset: isWindow ? 0 : contextOffset.top,
|
368 |
+
contextScroll: isWindow ? 0 : this.oldScroll.y,
|
369 |
+
contextDimension: this.innerHeight(),
|
370 |
+
oldScroll: this.oldScroll.y,
|
371 |
+
forward: 'down',
|
372 |
+
backward: 'up',
|
373 |
+
offsetProp: 'top'
|
374 |
+
}
|
375 |
+
}
|
376 |
+
|
377 |
+
for (var axisKey in axes) {
|
378 |
+
var axis = axes[axisKey]
|
379 |
+
for (var waypointKey in this.waypoints[axisKey]) {
|
380 |
+
var waypoint = this.waypoints[axisKey][waypointKey]
|
381 |
+
var adjustment = waypoint.options.offset
|
382 |
+
var oldTriggerPoint = waypoint.triggerPoint
|
383 |
+
var elementOffset = 0
|
384 |
+
var freshWaypoint = oldTriggerPoint == null
|
385 |
+
var contextModifier, wasBeforeScroll, nowAfterScroll
|
386 |
+
var triggeredBackward, triggeredForward
|
387 |
+
|
388 |
+
if (waypoint.element !== waypoint.element.window) {
|
389 |
+
elementOffset = waypoint.adapter.offset()[axis.offsetProp]
|
390 |
+
}
|
391 |
+
|
392 |
+
if (typeof adjustment === 'function') {
|
393 |
+
adjustment = adjustment.apply(waypoint)
|
394 |
+
}
|
395 |
+
else if (typeof adjustment === 'string') {
|
396 |
+
adjustment = parseFloat(adjustment)
|
397 |
+
if (waypoint.options.offset.indexOf('%') > - 1) {
|
398 |
+
adjustment = Math.ceil(axis.contextDimension * adjustment / 100)
|
399 |
+
}
|
400 |
+
}
|
401 |
+
|
402 |
+
contextModifier = axis.contextScroll - axis.contextOffset
|
403 |
+
waypoint.triggerPoint = elementOffset + contextModifier - adjustment
|
404 |
+
wasBeforeScroll = oldTriggerPoint < axis.oldScroll
|
405 |
+
nowAfterScroll = waypoint.triggerPoint >= axis.oldScroll
|
406 |
+
triggeredBackward = wasBeforeScroll && nowAfterScroll
|
407 |
+
triggeredForward = !wasBeforeScroll && !nowAfterScroll
|
408 |
+
|
409 |
+
if (!freshWaypoint && triggeredBackward) {
|
410 |
+
waypoint.queueTrigger(axis.backward)
|
411 |
+
triggeredGroups[waypoint.group.id] = waypoint.group
|
412 |
+
}
|
413 |
+
else if (!freshWaypoint && triggeredForward) {
|
414 |
+
waypoint.queueTrigger(axis.forward)
|
415 |
+
triggeredGroups[waypoint.group.id] = waypoint.group
|
416 |
+
}
|
417 |
+
else if (freshWaypoint && axis.oldScroll >= waypoint.triggerPoint) {
|
418 |
+
waypoint.queueTrigger(axis.forward)
|
419 |
+
triggeredGroups[waypoint.group.id] = waypoint.group
|
420 |
+
}
|
421 |
+
}
|
422 |
+
}
|
423 |
+
|
424 |
+
Waypoint.requestAnimationFrame(function() {
|
425 |
+
for (var groupKey in triggeredGroups) {
|
426 |
+
triggeredGroups[groupKey].flushTriggers()
|
427 |
+
}
|
428 |
+
})
|
429 |
+
|
430 |
+
return this
|
431 |
+
}
|
432 |
+
|
433 |
+
/* Private */
|
434 |
+
Context.findOrCreateByElement = function(element) {
|
435 |
+
return Context.findByElement(element) || new Context(element)
|
436 |
+
}
|
437 |
+
|
438 |
+
/* Private */
|
439 |
+
Context.refreshAll = function() {
|
440 |
+
for (var contextId in contexts) {
|
441 |
+
contexts[contextId].refresh()
|
442 |
+
}
|
443 |
+
}
|
444 |
+
|
445 |
+
/* Public */
|
446 |
+
/* http://imakewebthings.com/waypoints/api/context-find-by-element */
|
447 |
+
Context.findByElement = function(element) {
|
448 |
+
return contexts[element.waypointContextKey]
|
449 |
+
}
|
450 |
+
|
451 |
+
window.onload = function() {
|
452 |
+
if (oldWindowLoad) {
|
453 |
+
oldWindowLoad()
|
454 |
+
}
|
455 |
+
Context.refreshAll()
|
456 |
+
}
|
457 |
+
|
458 |
+
Waypoint.requestAnimationFrame = function(callback) {
|
459 |
+
var requestFn = window.requestAnimationFrame ||
|
460 |
+
window.mozRequestAnimationFrame ||
|
461 |
+
window.webkitRequestAnimationFrame ||
|
462 |
+
requestAnimationFrameShim
|
463 |
+
requestFn.call(window, callback)
|
464 |
+
}
|
465 |
+
Waypoint.Context = Context
|
466 |
+
}())
|
467 |
+
;(function() {
|
468 |
+
'use strict'
|
469 |
+
|
470 |
+
function byTriggerPoint(a, b) {
|
471 |
+
return a.triggerPoint - b.triggerPoint
|
472 |
+
}
|
473 |
+
|
474 |
+
function byReverseTriggerPoint(a, b) {
|
475 |
+
return b.triggerPoint - a.triggerPoint
|
476 |
+
}
|
477 |
+
|
478 |
+
var groups = {
|
479 |
+
vertical: {},
|
480 |
+
horizontal: {}
|
481 |
+
}
|
482 |
+
var Waypoint = window.Waypoint
|
483 |
+
|
484 |
+
/* http://imakewebthings.com/waypoints/api/group */
|
485 |
+
function Group(options) {
|
486 |
+
this.name = options.name
|
487 |
+
this.axis = options.axis
|
488 |
+
this.id = this.name + '-' + this.axis
|
489 |
+
this.waypoints = []
|
490 |
+
this.clearTriggerQueues()
|
491 |
+
groups[this.axis][this.name] = this
|
492 |
+
}
|
493 |
+
|
494 |
+
/* Private */
|
495 |
+
Group.prototype.add = function(waypoint) {
|
496 |
+
this.waypoints.push(waypoint)
|
497 |
+
}
|
498 |
+
|
499 |
+
/* Private */
|
500 |
+
Group.prototype.clearTriggerQueues = function() {
|
501 |
+
this.triggerQueues = {
|
502 |
+
up: [],
|
503 |
+
down: [],
|
504 |
+
left: [],
|
505 |
+
right: []
|
506 |
+
}
|
507 |
+
}
|
508 |
+
|
509 |
+
/* Private */
|
510 |
+
Group.prototype.flushTriggers = function() {
|
511 |
+
for (var direction in this.triggerQueues) {
|
512 |
+
var waypoints = this.triggerQueues[direction]
|
513 |
+
var reverse = direction === 'up' || direction === 'left'
|
514 |
+
waypoints.sort(reverse ? byReverseTriggerPoint : byTriggerPoint)
|
515 |
+
for (var i = 0, end = waypoints.length; i < end; i += 1) {
|
516 |
+
var waypoint = waypoints[i]
|
517 |
+
if (waypoint.options.continuous || i === waypoints.length - 1) {
|
518 |
+
waypoint.trigger([direction])
|
519 |
+
}
|
520 |
+
}
|
521 |
+
}
|
522 |
+
this.clearTriggerQueues()
|
523 |
+
}
|
524 |
+
|
525 |
+
/* Private */
|
526 |
+
Group.prototype.next = function(waypoint) {
|
527 |
+
this.waypoints.sort(byTriggerPoint)
|
528 |
+
var index = Waypoint.Adapter.inArray(waypoint, this.waypoints)
|
529 |
+
var isLast = index === this.waypoints.length - 1
|
530 |
+
return isLast ? null : this.waypoints[index + 1]
|
531 |
+
}
|
532 |
+
|
533 |
+
/* Private */
|
534 |
+
Group.prototype.previous = function(waypoint) {
|
535 |
+
this.waypoints.sort(byTriggerPoint)
|
536 |
+
var index = Waypoint.Adapter.inArray(waypoint, this.waypoints)
|
537 |
+
return index ? this.waypoints[index - 1] : null
|
538 |
+
}
|
539 |
+
|
540 |
+
/* Private */
|
541 |
+
Group.prototype.queueTrigger = function(waypoint, direction) {
|
542 |
+
this.triggerQueues[direction].push(waypoint)
|
543 |
+
}
|
544 |
+
|
545 |
+
/* Private */
|
546 |
+
Group.prototype.remove = function(waypoint) {
|
547 |
+
var index = Waypoint.Adapter.inArray(waypoint, this.waypoints)
|
548 |
+
if (index > -1) {
|
549 |
+
this.waypoints.splice(index, 1)
|
550 |
+
}
|
551 |
+
}
|
552 |
+
|
553 |
+
/* Public */
|
554 |
+
/* http://imakewebthings.com/waypoints/api/first */
|
555 |
+
Group.prototype.first = function() {
|
556 |
+
return this.waypoints[0]
|
557 |
+
}
|
558 |
+
|
559 |
+
/* Public */
|
560 |
+
/* http://imakewebthings.com/waypoints/api/last */
|
561 |
+
Group.prototype.last = function() {
|
562 |
+
return this.waypoints[this.waypoints.length - 1]
|
563 |
+
}
|
564 |
+
|
565 |
+
/* Private */
|
566 |
+
Group.findOrCreate = function(options) {
|
567 |
+
return groups[options.axis][options.name] || new Group(options)
|
568 |
+
}
|
569 |
+
|
570 |
+
Waypoint.Group = Group
|
571 |
+
}())
|
572 |
+
;(function() {
|
573 |
+
'use strict'
|
574 |
+
|
575 |
+
var $ = window.jQuery
|
576 |
+
var Waypoint = window.Waypoint
|
577 |
+
|
578 |
+
function JQueryAdapter(element) {
|
579 |
+
this.$element = $(element)
|
580 |
+
}
|
581 |
+
|
582 |
+
$.each([
|
583 |
+
'innerHeight',
|
584 |
+
'innerWidth',
|
585 |
+
'off',
|
586 |
+
'offset',
|
587 |
+
'on',
|
588 |
+
'outerHeight',
|
589 |
+
'outerWidth',
|
590 |
+
'scrollLeft',
|
591 |
+
'scrollTop'
|
592 |
+
], function(i, method) {
|
593 |
+
JQueryAdapter.prototype[method] = function() {
|
594 |
+
var args = Array.prototype.slice.call(arguments)
|
595 |
+
return this.$element[method].apply(this.$element, args)
|
596 |
+
}
|
597 |
+
})
|
598 |
+
|
599 |
+
$.each([
|
600 |
+
'extend',
|
601 |
+
'inArray',
|
602 |
+
'isEmptyObject'
|
603 |
+
], function(i, method) {
|
604 |
+
JQueryAdapter[method] = $[method]
|
605 |
+
})
|
606 |
+
|
607 |
+
Waypoint.adapters.push({
|
608 |
+
name: 'jquery',
|
609 |
+
Adapter: JQueryAdapter
|
610 |
+
})
|
611 |
+
Waypoint.Adapter = JQueryAdapter
|
612 |
+
}())
|
613 |
+
;(function() {
|
614 |
+
'use strict'
|
615 |
+
|
616 |
+
var Waypoint = window.Waypoint
|
617 |
+
|
618 |
+
function createExtension(framework) {
|
619 |
+
return function() {
|
620 |
+
var waypoints = []
|
621 |
+
var overrides = arguments[0]
|
622 |
+
|
623 |
+
if (framework.isFunction(arguments[0])) {
|
624 |
+
overrides = framework.extend({}, arguments[1])
|
625 |
+
overrides.handler = arguments[0]
|
626 |
+
}
|
627 |
+
|
628 |
+
this.each(function() {
|
629 |
+
var options = framework.extend({}, overrides, {
|
630 |
+
element: this
|
631 |
+
})
|
632 |
+
if (typeof options.context === 'string') {
|
633 |
+
options.context = framework(this).closest(options.context)[0]
|
634 |
+
}
|
635 |
+
waypoints.push(new Waypoint(options))
|
636 |
+
})
|
637 |
+
|
638 |
+
return waypoints
|
639 |
+
}
|
640 |
+
}
|
641 |
+
|
642 |
+
if (window.jQuery) {
|
643 |
+
window.jQuery.fn.waypoint = createExtension(window.jQuery)
|
644 |
+
}
|
645 |
+
if (window.Zepto) {
|
646 |
+
window.Zepto.fn.waypoint = createExtension(window.Zepto)
|
647 |
+
}
|
648 |
+
}())
|
649 |
+
;
|
widgets-for-siteorigin.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
* Plugin Name: Widgets for SiteOrigin
|
5 |
* Plugin URI: https://wpinked.com/
|
6 |
* Description: A few more widgets to play around with. Built on top of the SiteOrigin Widgets Bundle.
|
7 |
-
* Version: 1.
|
8 |
* Author: wpinked
|
9 |
* Author URI: wpinked.com
|
10 |
* License: GPL-2.0+
|
@@ -18,7 +18,7 @@
|
|
18 |
*
|
19 |
*/
|
20 |
|
21 |
-
define('INKED_SO_WIDGETS', '1.
|
22 |
|
23 |
require_once ( 'inc/visibility.php' );
|
24 |
|
@@ -61,4 +61,40 @@ add_filter('siteorigin_panels_widgets', 'wpinked_so_widget_add_bundle_groups', 1
|
|
61 |
function wpinked_so_translation() {
|
62 |
load_plugin_textdomain( 'wpinked_widgets', false, dirname( plugin_basename(__FILE__) ) . '/languages/' );
|
63 |
}
|
64 |
-
add_action('plugins_loaded', 'wpinked_so_translation');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
* Plugin Name: Widgets for SiteOrigin
|
5 |
* Plugin URI: https://wpinked.com/
|
6 |
* Description: A few more widgets to play around with. Built on top of the SiteOrigin Widgets Bundle.
|
7 |
+
* Version: 1.2.0
|
8 |
* Author: wpinked
|
9 |
* Author URI: wpinked.com
|
10 |
* License: GPL-2.0+
|
18 |
*
|
19 |
*/
|
20 |
|
21 |
+
define('INKED_SO_WIDGETS', '1.2.0');
|
22 |
|
23 |
require_once ( 'inc/visibility.php' );
|
24 |
|
61 |
function wpinked_so_translation() {
|
62 |
load_plugin_textdomain( 'wpinked_widgets', false, dirname( plugin_basename(__FILE__) ) . '/languages/' );
|
63 |
}
|
64 |
+
add_action('plugins_loaded', 'wpinked_so_translation');
|
65 |
+
|
66 |
+
/**
|
67 |
+
* This clears the file cache.
|
68 |
+
*
|
69 |
+
* @action admin_init
|
70 |
+
*/
|
71 |
+
function wpinked_so_plugin_version_check(){
|
72 |
+
|
73 |
+
$active_version = get_option( 'wpinked_so_widgets_version' );
|
74 |
+
|
75 |
+
if( empty($active_version) || version_compare( $active_version, INKED_SO_WIDGETS, '<' ) ) {
|
76 |
+
// If this is a new version, then clear the cache.
|
77 |
+
update_option( 'wpinked_so_widgets_version', INKED_SO_WIDGETS );
|
78 |
+
siteorigin_widgets_deactivate_legacy_plugins();
|
79 |
+
|
80 |
+
// Remove all cached CSS for SiteOrigin Widgets
|
81 |
+
if( function_exists('WP_Filesystem') && WP_Filesystem() ) {
|
82 |
+
global $wp_filesystem;
|
83 |
+
$upload_dir = wp_upload_dir();
|
84 |
+
|
85 |
+
// Remove any old widget cache files, if they exist.
|
86 |
+
$list = $wp_filesystem->dirlist( $upload_dir['basedir'] . '/siteorigin-widgets/' );
|
87 |
+
if( !empty($list) ) {
|
88 |
+
foreach($list as $file) {
|
89 |
+
// Delete the file
|
90 |
+
$wp_filesystem->delete( $upload_dir['basedir'] . '/siteorigin-widgets/' . $file['name'] );
|
91 |
+
}
|
92 |
+
}
|
93 |
+
}
|
94 |
+
|
95 |
+
// An action to let widgets handle the updates.
|
96 |
+
do_action( 'siteorigin_widgets_version_update', INKED_SO_WIDGETS, $active_version );
|
97 |
+
}
|
98 |
+
|
99 |
+
}
|
100 |
+
add_action( 'admin_init', 'wpinked_so_plugin_version_check' );
|
widgets/ink-ardn-widget/ink-ardn-widget.php
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
<?php
|
2 |
|
3 |
/*
|
4 |
Widget Name: Inked Accordion
|
@@ -26,7 +26,7 @@ class Inked_Accordion_SO_Widget extends SiteOrigin_Widget {
|
|
26 |
),
|
27 |
|
28 |
array(
|
29 |
-
|
30 |
'admin' => array(
|
31 |
'type' => 'text',
|
32 |
'label' => __('Admin Label', 'wpinked-widgets'),
|
@@ -67,7 +67,7 @@ class Inked_Accordion_SO_Widget extends SiteOrigin_Widget {
|
|
67 |
'type' => 'icon',
|
68 |
'label' => __('Open Toggle Icon.', 'wpinked-widgets'),
|
69 |
),
|
70 |
-
|
71 |
),
|
72 |
),
|
73 |
|
@@ -161,7 +161,7 @@ class Inked_Accordion_SO_Widget extends SiteOrigin_Widget {
|
|
161 |
'type' => 'color',
|
162 |
'label' => __( 'Title Color', 'wpinked-widgets' ),
|
163 |
'default' => ''
|
164 |
-
),
|
165 |
|
166 |
'title-h' => array(
|
167 |
'type' => 'color',
|
@@ -209,7 +209,7 @@ class Inked_Accordion_SO_Widget extends SiteOrigin_Widget {
|
|
209 |
wp_register_script( 'iw-accordion-js', siteorigin_widget_get_plugin_dir_url('ink-accordion') . 'scripts/accordion.js', array( 'iw-foundation-js' ), INKED_SO_WIDGETS, true );
|
210 |
|
211 |
wp_enqueue_script( 'iw-accordion-init', siteorigin_widget_get_plugin_dir_url('ink-accordion') . 'scripts/accordion.init.js', array( 'iw-accordion-js' ), INKED_SO_WIDGETS, true );
|
212 |
-
|
213 |
wp_enqueue_style( 'iw-accordion', siteorigin_widget_get_plugin_dir_url('ink-accordion') . 'styles/accordion.css', array(), INKED_SO_WIDGETS );
|
214 |
|
215 |
parent::enqueue_frontend_scripts( $instance );
|
@@ -225,7 +225,7 @@ class Inked_Accordion_SO_Widget extends SiteOrigin_Widget {
|
|
225 |
'title-bg' => $instance['styling']['title-bg'],
|
226 |
'title-h' => $instance['styling']['title-h'],
|
227 |
'title-h-bg' => $instance['styling']['title-h-bg'],
|
228 |
-
'cont-bg' => $instance['styling']['content-bg'],
|
229 |
'icon-open' => $instance['styling']['icon-open'],
|
230 |
'icon-close' => $instance['styling']['icon-close'],
|
231 |
);
|
@@ -233,4 +233,4 @@ class Inked_Accordion_SO_Widget extends SiteOrigin_Widget {
|
|
233 |
|
234 |
}
|
235 |
|
236 |
-
siteorigin_widget_register('ink-accordion', __FILE__, 'Inked_Accordion_SO_Widget');
|
1 |
+
<?php
|
2 |
|
3 |
/*
|
4 |
Widget Name: Inked Accordion
|
26 |
),
|
27 |
|
28 |
array(
|
29 |
+
|
30 |
'admin' => array(
|
31 |
'type' => 'text',
|
32 |
'label' => __('Admin Label', 'wpinked-widgets'),
|
67 |
'type' => 'icon',
|
68 |
'label' => __('Open Toggle Icon.', 'wpinked-widgets'),
|
69 |
),
|
70 |
+
|
71 |
),
|
72 |
),
|
73 |
|
161 |
'type' => 'color',
|
162 |
'label' => __( 'Title Color', 'wpinked-widgets' ),
|
163 |
'default' => ''
|
164 |
+
),
|
165 |
|
166 |
'title-h' => array(
|
167 |
'type' => 'color',
|
209 |
wp_register_script( 'iw-accordion-js', siteorigin_widget_get_plugin_dir_url('ink-accordion') . 'scripts/accordion.js', array( 'iw-foundation-js' ), INKED_SO_WIDGETS, true );
|
210 |
|
211 |
wp_enqueue_script( 'iw-accordion-init', siteorigin_widget_get_plugin_dir_url('ink-accordion') . 'scripts/accordion.init.js', array( 'iw-accordion-js' ), INKED_SO_WIDGETS, true );
|
212 |
+
|
213 |
wp_enqueue_style( 'iw-accordion', siteorigin_widget_get_plugin_dir_url('ink-accordion') . 'styles/accordion.css', array(), INKED_SO_WIDGETS );
|
214 |
|
215 |
parent::enqueue_frontend_scripts( $instance );
|
225 |
'title-bg' => $instance['styling']['title-bg'],
|
226 |
'title-h' => $instance['styling']['title-h'],
|
227 |
'title-h-bg' => $instance['styling']['title-h-bg'],
|
228 |
+
'cont-bg' => $instance['styling']['content-bg'],
|
229 |
'icon-open' => $instance['styling']['icon-open'],
|
230 |
'icon-close' => $instance['styling']['icon-close'],
|
231 |
);
|
233 |
|
234 |
}
|
235 |
|
236 |
+
siteorigin_widget_register('ink-accordion', __FILE__, 'Inked_Accordion_SO_Widget');
|
widgets/ink-ardn-widget/styles/accordion.css
CHANGED
@@ -1,24 +1,24 @@
|
|
1 |
|
2 |
.accordion {
|
3 |
margin-bottom: 0;
|
4 |
-
margin-left: 0;
|
5 |
}
|
6 |
|
7 |
.accordion:before, .accordion:after {
|
8 |
content: " ";
|
9 |
-
display: table;
|
10 |
}
|
11 |
|
12 |
.accordion:after {
|
13 |
-
clear: both;
|
14 |
}
|
15 |
|
16 |
.accordion .accordion-navigation {
|
17 |
display: block;
|
18 |
margin-bottom: 0;
|
19 |
-
margin-left: 0 !important;
|
20 |
-
margin-top: 0 !important;
|
21 |
-
margin-right: 0 !important;
|
22 |
}
|
23 |
|
24 |
.accordion .accordion-navigation > a {
|
@@ -27,7 +27,7 @@
|
|
27 |
font-size: 1.1em;
|
28 |
padding: 1em;
|
29 |
text-decoration: none;
|
30 |
-
outline: none;
|
31 |
position: relative;
|
32 |
}
|
33 |
|
@@ -53,7 +53,7 @@
|
|
53 |
}
|
54 |
|
55 |
.accordion .accordion-navigation > a:hover {
|
56 |
-
background: #e3e3e3;
|
57 |
}
|
58 |
|
59 |
.accordion .accordion-navigation > .content {
|
@@ -63,7 +63,7 @@
|
|
63 |
|
64 |
.accordion .accordion-navigation > .content.active {
|
65 |
background: #FFFFFF;
|
66 |
-
display: block;
|
67 |
}
|
68 |
|
69 |
.accordion .accordion-navigation > .content * {
|
@@ -74,6 +74,10 @@
|
|
74 |
display: block;
|
75 |
}
|
76 |
|
|
|
|
|
|
|
|
|
77 |
.accordion .accordion-navigation > a {
|
78 |
position: relative;
|
79 |
z-index: 10;
|
@@ -93,4 +97,4 @@
|
|
93 |
height: auto;
|
94 |
padding: 0.9375rem;
|
95 |
opacity: 1;
|
96 |
-
}
|
1 |
|
2 |
.accordion {
|
3 |
margin-bottom: 0;
|
4 |
+
margin-left: 0;
|
5 |
}
|
6 |
|
7 |
.accordion:before, .accordion:after {
|
8 |
content: " ";
|
9 |
+
display: table;
|
10 |
}
|
11 |
|
12 |
.accordion:after {
|
13 |
+
clear: both;
|
14 |
}
|
15 |
|
16 |
.accordion .accordion-navigation {
|
17 |
display: block;
|
18 |
margin-bottom: 0;
|
19 |
+
margin-left: 0 !important;
|
20 |
+
margin-top: 0 !important;
|
21 |
+
margin-right: 0 !important;
|
22 |
}
|
23 |
|
24 |
.accordion .accordion-navigation > a {
|
27 |
font-size: 1.1em;
|
28 |
padding: 1em;
|
29 |
text-decoration: none;
|
30 |
+
outline: none;
|
31 |
position: relative;
|
32 |
}
|
33 |
|
53 |
}
|
54 |
|
55 |
.accordion .accordion-navigation > a:hover {
|
56 |
+
background: #e3e3e3;
|
57 |
}
|
58 |
|
59 |
.accordion .accordion-navigation > .content {
|
63 |
|
64 |
.accordion .accordion-navigation > .content.active {
|
65 |
background: #FFFFFF;
|
66 |
+
display: block;
|
67 |
}
|
68 |
|
69 |
.accordion .accordion-navigation > .content * {
|
74 |
display: block;
|
75 |
}
|
76 |
|
77 |
+
.accordion .accordion-navigation > .content.active li {
|
78 |
+
display: list-item;
|
79 |
+
}
|
80 |
+
|
81 |
.accordion .accordion-navigation > a {
|
82 |
position: relative;
|
83 |
z-index: 10;
|
97 |
height: auto;
|
98 |
padding: 0.9375rem;
|
99 |
opacity: 1;
|
100 |
+
}
|
widgets/ink-ardn-widget/tpl/accordion.php
CHANGED
@@ -13,21 +13,27 @@ if($instance['settings']['toggleable']):
|
|
13 |
endif;
|
14 |
|
15 |
$acc_no = 1;
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
?>
|
17 |
|
18 |
<ul class="accordion" data-accordion data-options="<?php echo $expand . $toggleable; ?>">
|
19 |
|
20 |
-
<?php foreach( $instance['toggles'] as $i => $toggle ) { ?>
|
21 |
-
|
22 |
<li class="accordion-navigation">
|
23 |
|
24 |
-
<a href="#<?php echo $
|
25 |
<?php echo $toggle['title']; ?>
|
26 |
<span class="iw-so-tgl-open"><?php echo siteorigin_widget_get_icon( $instance['settings']['icon-open'], $icon_styles ); ?></span>
|
27 |
<span class="iw-so-tgl-close"><?php echo siteorigin_widget_get_icon( $instance['settings']['icon-close'], $icon_styles ); ?></span>
|
28 |
</a>
|
29 |
|
30 |
-
<div id="<?php echo $
|
31 |
|
32 |
<?php echo $toggle['content']; ?>
|
33 |
|
@@ -39,4 +45,4 @@ $acc_no = 1;
|
|
39 |
|
40 |
<?php } ?>
|
41 |
|
42 |
-
</ul>
|
13 |
endif;
|
14 |
|
15 |
$acc_no = 1;
|
16 |
+
|
17 |
+
if( $instance['settings']['id'] ):
|
18 |
+
$unique = $instance['settings']['id'];
|
19 |
+
else :
|
20 |
+
$unique = 'ardn-' . $instance['_sow_form_id'];
|
21 |
+
endif;
|
22 |
?>
|
23 |
|
24 |
<ul class="accordion" data-accordion data-options="<?php echo $expand . $toggleable; ?>">
|
25 |
|
26 |
+
<?php foreach( $instance['toggles'] as $i => $toggle ) { ?>
|
27 |
+
|
28 |
<li class="accordion-navigation">
|
29 |
|
30 |
+
<a href="#<?php echo $unique . '-' . $acc_no; ?>" class="<?php echo $instance['styling']['text']; ?>">
|
31 |
<?php echo $toggle['title']; ?>
|
32 |
<span class="iw-so-tgl-open"><?php echo siteorigin_widget_get_icon( $instance['settings']['icon-open'], $icon_styles ); ?></span>
|
33 |
<span class="iw-so-tgl-close"><?php echo siteorigin_widget_get_icon( $instance['settings']['icon-close'], $icon_styles ); ?></span>
|
34 |
</a>
|
35 |
|
36 |
+
<div id="<?php echo $unique . '-' . $acc_no; ?>" class="content<?php echo ($toggle['active'] == 1 ? ' active' : '' ); ?>">
|
37 |
|
38 |
<?php echo $toggle['content']; ?>
|
39 |
|
45 |
|
46 |
<?php } ?>
|
47 |
|
48 |
+
</ul>
|
widgets/ink-barc-widget/assets/banner.svg
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2 |
+
<svg width="240px" height="240px" viewBox="0 0 240 240" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
|
3 |
+
<!-- Generator: Sketch 3.3.2 (12043) - http://www.bohemiancoding.com/sketch -->
|
4 |
+
<title>so-banners</title>
|
5 |
+
<desc>Created with Sketch.</desc>
|
6 |
+
<defs></defs>
|
7 |
+
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
|
8 |
+
<g id="Bar-Counter" sketch:type="MSLayerGroup">
|
9 |
+
<rect id="BG" fill="#E74C3C" sketch:type="MSShapeGroup" x="0" y="0" width="240" height="240"></rect>
|
10 |
+
<g id="Group" transform="translate(33.000000, 67.000000)" stroke="#F7EBE8" stroke-width="4" stroke-linecap="square" sketch:type="MSShapeGroup">
|
11 |
+
<path d="M0,1 L92,1" id="Line-Copy-4"></path>
|
12 |
+
<path d="M0,29 L135,29" id="Line-Copy-5"></path>
|
13 |
+
<path d="M0,59 L53,59" id="Line-Copy-9"></path>
|
14 |
+
<path d="M1,87 L98,87" id="Line-Copy-10"></path>
|
15 |
+
<path d="M1,115 L161,115" id="Line-Copy-11"></path>
|
16 |
+
</g>
|
17 |
+
</g>
|
18 |
+
</g>
|
19 |
+
</svg>
|
widgets/ink-barc-widget/ink-barc-widget.php
ADDED
@@ -0,0 +1,173 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
Widget Name: Inked Bar Counter
|
5 |
+
Description: Animated bars to display your stats.
|
6 |
+
Author: wpinked
|
7 |
+
Author URI: https://wpinked.com
|
8 |
+
*/
|
9 |
+
|
10 |
+
class Inked_Bar_Counter_SO_Widget extends SiteOrigin_Widget {
|
11 |
+
|
12 |
+
function __construct() {
|
13 |
+
|
14 |
+
parent::__construct(
|
15 |
+
|
16 |
+
'ink-bar-count',
|
17 |
+
|
18 |
+
__('Inked Bar Counter', 'wpinked-widgets'),
|
19 |
+
|
20 |
+
array(
|
21 |
+
'description' => __('Animated bars to display your stats.', 'wpinked-widgets'),
|
22 |
+
'help' => 'http://docs.wpinked.com/widgets-for-siteorigin/bar-counter-widget'
|
23 |
+
),
|
24 |
+
|
25 |
+
array(
|
26 |
+
),
|
27 |
+
|
28 |
+
array(
|
29 |
+
|
30 |
+
'admin' => array(
|
31 |
+
'type' => 'text',
|
32 |
+
'label' => __('Admin Label', 'wpinked-widgets'),
|
33 |
+
'default' => ''
|
34 |
+
),
|
35 |
+
|
36 |
+
'bars' => array(
|
37 |
+
'type' => 'repeater',
|
38 |
+
'label' => __( 'Bars' , 'wpinked-widgets' ),
|
39 |
+
'item_name' => __( 'Bar', 'wpinked-widgets' ),
|
40 |
+
'item_label' => array(
|
41 |
+
'selector' => "[id*='title']",
|
42 |
+
'update_event' => 'change',
|
43 |
+
'value_method' => 'val'
|
44 |
+
),
|
45 |
+
'fields' => array(
|
46 |
+
|
47 |
+
'title' => array(
|
48 |
+
'type' => 'text',
|
49 |
+
'label' => __('Title', 'wpinked-widgets'),
|
50 |
+
'default' => ''
|
51 |
+
),
|
52 |
+
|
53 |
+
'percent' => array(
|
54 |
+
'type' => 'slider',
|
55 |
+
'label' => __( 'Percentage', 'wpinked-widgets' ),
|
56 |
+
'default' => 50,
|
57 |
+
'min' => 0,
|
58 |
+
'max' => 100,
|
59 |
+
'integer' => true
|
60 |
+
),
|
61 |
+
|
62 |
+
)
|
63 |
+
|
64 |
+
),
|
65 |
+
|
66 |
+
'styling' => array(
|
67 |
+
'type' => 'section',
|
68 |
+
'label' => __( 'Styling' , 'wpinked-widgets' ),
|
69 |
+
'hide' => true,
|
70 |
+
'fields' => array(
|
71 |
+
|
72 |
+
'height' => array(
|
73 |
+
'type' => 'text',
|
74 |
+
'label' => __( 'Height', 'wpinked-widgets' ),
|
75 |
+
'default' => '25px',
|
76 |
+
'description' => __( 'Enter the units, eg: px, em, rem, ...', 'wpinked-widgets' ),
|
77 |
+
),
|
78 |
+
|
79 |
+
'percent-show' => array(
|
80 |
+
'type' => 'checkbox',
|
81 |
+
'label' => __( 'Show Percentage ?', 'wpinked-widgets' ),
|
82 |
+
'default' => true
|
83 |
+
),
|
84 |
+
|
85 |
+
'title' => array(
|
86 |
+
'type' => 'color',
|
87 |
+
'label' => __( 'Title Color', 'wpinked-widgets' ),
|
88 |
+
'default' => ''
|
89 |
+
),
|
90 |
+
|
91 |
+
'percent' => array(
|
92 |
+
'type' => 'color',
|
93 |
+
'label' => __( 'Percentage Color', 'wpinked-widgets' ),
|
94 |
+
'default' => ''
|
95 |
+
),
|
96 |
+
|
97 |
+
'bar-bg' => array(
|
98 |
+
'type' => 'color',
|
99 |
+
'label' => __( 'Bar Background Color', 'wpinked-widgets' ),
|
100 |
+
'default' => ''
|
101 |
+
),
|
102 |
+
|
103 |
+
'bar' => array(
|
104 |
+
'type' => 'color',
|
105 |
+
'label' => __( 'Bar Color', 'wpinked-widgets' ),
|
106 |
+
'default' => ''
|
107 |
+
),
|
108 |
+
|
109 |
+
'border' => array(
|
110 |
+
'type' => 'checkbox',
|
111 |
+
'label' => __( 'Show Border ?', 'wpinked-widgets' ),
|
112 |
+
'default' => true
|
113 |
+
),
|
114 |
+
|
115 |
+
'border-clr' => array(
|
116 |
+
'type' => 'color',
|
117 |
+
'label' => __( 'Border Color', 'wpinked-widgets' ),
|
118 |
+
'default' => ''
|
119 |
+
),
|
120 |
+
|
121 |
+
'corners' => array(
|
122 |
+
'type' => 'select',
|
123 |
+
'label' => __('Corners', 'wpinked-widgets'),
|
124 |
+
'default' => '0.25em',
|
125 |
+
'options' => array(
|
126 |
+
'0em' => __('Sharp', 'wpinked-widgets'),
|
127 |
+
'0.25em' => __('Curved', 'wpinked-widgets'),
|
128 |
+
'0.75em' => __('Round', 'wpinked-widgets'),
|
129 |
+
),
|
130 |
+
),
|
131 |
+
|
132 |
+
)
|
133 |
+
),
|
134 |
+
),
|
135 |
+
|
136 |
+
//The $base_folder path string.
|
137 |
+
plugin_dir_path(__FILE__)
|
138 |
+
);
|
139 |
+
}
|
140 |
+
|
141 |
+
function get_template_name($instance) {
|
142 |
+
return 'bar';
|
143 |
+
}
|
144 |
+
|
145 |
+
function get_style_name($instance) {
|
146 |
+
return 'bar';
|
147 |
+
}
|
148 |
+
|
149 |
+
function enqueue_frontend_scripts( $instance ) {
|
150 |
+
|
151 |
+
wp_enqueue_script( 'iw-bar-js', siteorigin_widget_get_plugin_dir_url('ink-bar-count') . 'scripts/bar.js', array( 'iw-waypoint-js' ), INKED_SO_WIDGETS, true );
|
152 |
+
|
153 |
+
parent::enqueue_frontend_scripts( $instance );
|
154 |
+
}
|
155 |
+
|
156 |
+
function get_less_variables($instance) {
|
157 |
+
if( empty( $instance ) ) return array();
|
158 |
+
|
159 |
+
return array(
|
160 |
+
'radius' => $instance['styling']['corners'],
|
161 |
+
'height' => $instance['styling']['height'],
|
162 |
+
'title' => $instance['styling']['title'],
|
163 |
+
'percent' => $instance['styling']['percent'],
|
164 |
+
'bar-bg' => $instance['styling']['bar-bg'],
|
165 |
+
'bar' => $instance['styling']['bar'],
|
166 |
+
'border' => $instance['styling']['border'],
|
167 |
+
'bor-clr' => $instance['styling']['border-clr'],
|
168 |
+
);
|
169 |
+
}
|
170 |
+
|
171 |
+
}
|
172 |
+
|
173 |
+
siteorigin_widget_register('ink-bar-count', __FILE__, 'Inked_Bar_Counter_SO_Widget');
|
widgets/ink-barc-widget/scripts/bar.js
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
( function($) {
|
2 |
+
|
3 |
+
$(document).ready( function() {
|
4 |
+
|
5 |
+
$( '.iw-so-bar-meter' ).waypoint( {
|
6 |
+
offset: '85%',
|
7 |
+
handler: function() {
|
8 |
+
$(this.element).each(function(){
|
9 |
+
each_bar_width = $(this).attr('aria-valuenow');
|
10 |
+
$(this).width(each_bar_width + '%');
|
11 |
+
});
|
12 |
+
this.destroy()
|
13 |
+
}
|
14 |
+
} );
|
15 |
+
|
16 |
+
});
|
17 |
+
|
18 |
+
})( jQuery );
|
widgets/ink-barc-widget/styles/bar.less
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
@radius: 0;
|
2 |
+
@height: 10px;
|
3 |
+
@title: inherit;
|
4 |
+
@percent: inherit;
|
5 |
+
@bar-bg: #eee;
|
6 |
+
@bar: #e74c3c;
|
7 |
+
@border: 0;
|
8 |
+
@bor-clr: #bbb;
|
9 |
+
|
10 |
+
.iw-so-bar {
|
11 |
+
position: relative;
|
12 |
+
}
|
13 |
+
|
14 |
+
.iw-so-bar-container {
|
15 |
+
background-color: @bar-bg;
|
16 |
+
height: @height;
|
17 |
+
margin-bottom: 0.625rem;
|
18 |
+
.bar-border() when (@border = 1) { border-width: 1px; border-style: solid; }
|
19 |
+
.bar-border();
|
20 |
+
border-radius: @radius;
|
21 |
+
.iw-so-bar-meter {
|
22 |
+
background: @bar;
|
23 |
+
display: block;
|
24 |
+
height: 100%;
|
25 |
+
float: left;
|
26 |
+
width: 0%;
|
27 |
+
border-radius: @radius;
|
28 |
+
-moz-transition: width 1.65s ease-in-out;
|
29 |
+
-o-transition: width 1.65s ease-in-out;
|
30 |
+
-webkit-transition: width 1.65s ease-in-out;
|
31 |
+
-ms-transition: width 1.65s ease-in-out;
|
32 |
+
transition: width 1.65s ease-in-out;
|
33 |
+
}
|
34 |
+
}
|
35 |
+
|
36 |
+
.iw-so-bar-title{
|
37 |
+
color: @title;
|
38 |
+
margin-bottom: 0;
|
39 |
+
}
|
40 |
+
.iw-so-bar-percent{
|
41 |
+
color: @percent;
|
42 |
+
position: absolute;
|
43 |
+
right: 3px;
|
44 |
+
top: 0;
|
45 |
+
}
|
widgets/ink-barc-widget/tpl/bar.php
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php foreach( $instance['bars'] as $i => $bar ) { ?>
|
2 |
+
|
3 |
+
<div class="iw-so-bar">
|
4 |
+
<h6 class="iw-so-bar-title"><?php echo $bar['title']; ?></h6>
|
5 |
+
<?php if ($instance['styling']['percent-show']) : ?>
|
6 |
+
<span class="iw-so-bar-percent"><?php echo $bar['percent']; ?>%</span>
|
7 |
+
<?php endif; ?>
|
8 |
+
<div class="iw-so-bar-container">
|
9 |
+
<span class="iw-so-bar-meter" aria-valuenow="<?php echo $bar['percent']; ?>"></span>
|
10 |
+
</div>
|
11 |
+
</div>
|
12 |
+
|
13 |
+
<?php } ?>
|
widgets/ink-blgs-widget/ink-blgs-widget.php
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
<?php
|
2 |
|
3 |
/*
|
4 |
Widget Name: Inked Blog
|
@@ -37,6 +37,12 @@ class Inked_Blog_SO_Widget extends SiteOrigin_Widget {
|
|
37 |
'label' => __('Select Posts', 'wpinked-widgets'),
|
38 |
),
|
39 |
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
'icons' => array(
|
41 |
'type' => 'section',
|
42 |
'label' => __( 'Post Format Icons' , 'wpinked-widgets' ),
|
@@ -195,6 +201,20 @@ class Inked_Blog_SO_Widget extends SiteOrigin_Widget {
|
|
195 |
'default' => true
|
196 |
),
|
197 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
198 |
'content' => array(
|
199 |
'type' => 'checkbox',
|
200 |
'label' => __( 'Show Content ?', 'wpinked-widgets' ),
|
@@ -319,7 +339,7 @@ class Inked_Blog_SO_Widget extends SiteOrigin_Widget {
|
|
319 |
'blg_lyt[thumb-behind]'=> array('show'),
|
320 |
'blg_lyt[thumb-none]' => array('hide'),
|
321 |
)
|
322 |
-
),
|
323 |
|
324 |
'img-ol-o' => array(
|
325 |
'type' => 'text',
|
@@ -504,8 +524,131 @@ class Inked_Blog_SO_Widget extends SiteOrigin_Widget {
|
|
504 |
'0.75em' => __('Highly curved', 'wpinked-widgets'),
|
505 |
'1.5em' => __('Round', 'wpinked-widgets'),
|
506 |
),
|
507 |
-
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
508 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
509 |
)
|
510 |
),
|
511 |
),
|
@@ -527,6 +670,8 @@ class Inked_Blog_SO_Widget extends SiteOrigin_Widget {
|
|
527 |
|
528 |
wp_enqueue_script( 'iw-blog-init', siteorigin_widget_get_plugin_dir_url('ink-blog') . 'scripts/equalizer.init.js', array( 'iw-equalizer-js' ), INKED_SO_WIDGETS, true );
|
529 |
|
|
|
|
|
530 |
wp_enqueue_style( 'iw-blog', siteorigin_widget_get_plugin_dir_url('ink-blog') . 'styles/blog.css', array(), INKED_SO_WIDGETS );
|
531 |
|
532 |
parent::enqueue_frontend_scripts( $instance );
|
@@ -561,10 +706,16 @@ class Inked_Blog_SO_Widget extends SiteOrigin_Widget {
|
|
561 |
'btn-size' => $instance['styling']['btn-size'],
|
562 |
'btn-clr' => $instance['styling']['btn-clr'],
|
563 |
'btn-base' => $instance['styling']['btn-base'],
|
564 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
565 |
);
|
566 |
}
|
567 |
|
568 |
}
|
569 |
|
570 |
-
siteorigin_widget_register('ink-blog', __FILE__, 'Inked_Blog_SO_Widget');
|
1 |
+
<?php
|
2 |
|
3 |
/*
|
4 |
Widget Name: Inked Blog
|
37 |
'label' => __('Select Posts', 'wpinked-widgets'),
|
38 |
),
|
39 |
|
40 |
+
'current' => array(
|
41 |
+
'type' => 'checkbox',
|
42 |
+
'label' => __( 'Exclude current post from query ?', 'wpinked-widgets' ),
|
43 |
+
'default' => false,
|
44 |
+
),
|
45 |
+
|
46 |
'icons' => array(
|
47 |
'type' => 'section',
|
48 |
'label' => __( 'Post Format Icons' , 'wpinked-widgets' ),
|
201 |
'default' => true
|
202 |
),
|
203 |
|
204 |
+
'title-tag' => array(
|
205 |
+
'type' => 'select',
|
206 |
+
'label' => __( 'Text Align', 'wpinked-widgets' ),
|
207 |
+
'default' => 'h2',
|
208 |
+
'options' => array(
|
209 |
+
'h1' => __( 'h1', 'wpinked-widgets' ),
|
210 |
+
'h2' => __( 'h2', 'wpinked-widgets' ),
|
211 |
+
'h3' => __( 'h3', 'wpinked-widgets' ),
|
212 |
+
'h4' => __( 'h4', 'wpinked-widgets' ),
|
213 |
+
'h5' => __( 'h5', 'wpinked-widgets' ),
|
214 |
+
'h6' => __( 'h6', 'wpinked-widgets' ),
|
215 |
+
),
|
216 |
+
),
|
217 |
+
|
218 |
'content' => array(
|
219 |
'type' => 'checkbox',
|
220 |
'label' => __( 'Show Content ?', 'wpinked-widgets' ),
|
339 |
'blg_lyt[thumb-behind]'=> array('show'),
|
340 |
'blg_lyt[thumb-none]' => array('hide'),
|
341 |
)
|
342 |
+
),
|
343 |
|
344 |
'img-ol-o' => array(
|
345 |
'type' => 'text',
|
524 |
'0.75em' => __('Highly curved', 'wpinked-widgets'),
|
525 |
'1.5em' => __('Round', 'wpinked-widgets'),
|
526 |
),
|
527 |
+
),
|
528 |
+
|
529 |
+
)
|
530 |
+
),
|
531 |
+
|
532 |
+
'pagination' => array(
|
533 |
+
'type' => 'section',
|
534 |
+
'label' => __( 'Pagination' , 'wpinked-widgets' ),
|
535 |
+
'hide' => true,
|
536 |
+
'fields' => array(
|
537 |
+
|
538 |
+
'activate' => array(
|
539 |
+
'type' => 'checkbox',
|
540 |
+
'label' => __( 'Use pagination ?', 'wpinked-widgets' ),
|
541 |
+
'default' => false
|
542 |
+
),
|
543 |
+
|
544 |
+
'type' => array(
|
545 |
+
'type' => 'select',
|
546 |
+
'label' => __('Type', 'wpinked-widgets'),
|
547 |
+
'default' => 'normal',
|
548 |
+
'options' => array(
|
549 |
+
'normal' => __('Normal', 'wpinked-widgets'),
|
550 |
+
'ajax' => __('Ajax', 'wpinked-widgets')
|
551 |
+
),
|
552 |
+
'description' => __('Ajax is an experimental feature and a WIP. It should work as expected in most cases', 'wpinked-widgets'),
|
553 |
+
),
|
554 |
+
|
555 |
+
'older-text' => array(
|
556 |
+
'type' => 'text',
|
557 |
+
'label' => __('Older Posts Text', 'wpinked-widgets'),
|
558 |
+
'default' => 'Older Posts',
|
559 |
+
),
|
560 |
+
|
561 |
+
'older-icon' => array(
|
562 |
+
'type' => 'icon',
|
563 |
+
'label' => __('Older Posts Icon', 'wpinked-widgets'),
|
564 |
+
'description' => __('This will appear after the text', 'wpinked-widgets' ),
|
565 |
+
),
|
566 |
+
|
567 |
+
'newer-text' => array(
|
568 |
+
'type' => 'text',
|
569 |
+
'label' => __('Newer Posts Text', 'wpinked-widgets'),
|
570 |
+
'default' => 'Newer Posts',
|
571 |
+
),
|
572 |
+
|
573 |
+
'newer-icon' => array(
|
574 |
+
'type' => 'icon',
|
575 |
+
'label' => __('Newer Posts Icon', 'wpinked-widgets'),
|
576 |
+
'description' => __('This will appear before the text', 'wpinked-widgets' ),
|
577 |
+
),
|
578 |
+
|
579 |
+
'btn-theme' => array(
|
580 |
+
'type' => 'select',
|
581 |
+
'label' => __('Navigation Theme', 'wpinked-widgets'),
|
582 |
+
'default' => 'classic',
|
583 |
+
'options' => array(
|
584 |
+
'classic' => __('Classic', 'wpinked-widgets'),
|
585 |
+
'flat' => __('Flat', 'wpinked-widgets'),
|
586 |
+
'outline' => __('Outline', 'wpinked-widgets'),
|
587 |
+
'threed' => __('3D', 'wpinked-widgets'),
|
588 |
+
'shadow' => __('Shadow', 'wpinked-widgets'),
|
589 |
+
'deline' => __('Deline', 'wpinked-widgets'),
|
590 |
+
),
|
591 |
+
),
|
592 |
+
|
593 |
+
'btn-align' => array(
|
594 |
+
'type' => 'select',
|
595 |
+
'label' => __('Navigation Alignment', 'wpinked-widgets'),
|
596 |
+
'default' => 'ends',
|
597 |
+
'options' => array(
|
598 |
+
'left' => __('Left', 'wpinked-widgets'),
|
599 |
+
'right' => __('Right', 'wpinked-widgets'),
|
600 |
+
'center' => __('Center', 'wpinked-widgets'),
|
601 |
+
'ends' => __('Ends', 'wpinked-widgets'),
|
602 |
+
),
|
603 |
+
),
|
604 |
+
|
605 |
+
'btn-size' => array(
|
606 |
+
'type' => 'select',
|
607 |
+
'label' => __('Button Size', 'wpinked-widgets'),
|
608 |
+
'default' => 'standard',
|
609 |
+
'options' => array(
|
610 |
+
'tiny' => __('Tiny', 'wpinked-widgets'),
|
611 |
+
'small' => __('Small', 'wpinked-widgets'),
|
612 |
+
'standard' => __('Standard', 'wpinked-widgets'),
|
613 |
+
'large' => __('Large', 'wpinked-widgets'),
|
614 |
+
),
|
615 |
+
),
|
616 |
+
|
617 |
+
'btn-clr' => array(
|
618 |
+
'type' => 'color',
|
619 |
+
'label' => __('Button Highlight Color', 'wpinked-widgets'),
|
620 |
+
'description' => __( 'Typically used as button background.', 'wpinked-widgets' ),
|
621 |
+
),
|
622 |
+
|
623 |
+
'btn-base' => array(
|
624 |
+
'type' => 'color',
|
625 |
+
'label' => __('Button Base Color', 'wpinked-widgets'),
|
626 |
+
'description' => __( 'Typically used as text color.', 'wpinked-widgets' ),
|
627 |
+
),
|
628 |
+
|
629 |
+
'btn-hover' => array(
|
630 |
+
'type' => 'checkbox',
|
631 |
+
'default' => true,
|
632 |
+
'label' => __('Use button hover effect ?', 'wpinked-widgets'),
|
633 |
+
),
|
634 |
|
635 |
+
'btn-click' => array(
|
636 |
+
'type' => 'checkbox',
|
637 |
+
'default' => true,
|
638 |
+
'label' => __('Use button click effect ?', 'wpinked-widgets'),
|
639 |
+
),
|
640 |
+
|
641 |
+
'btn-corners' => array(
|
642 |
+
'type' => 'select',
|
643 |
+
'label' => __('Button Corners', 'wpinked-widgets'),
|
644 |
+
'default' => '0.25em',
|
645 |
+
'options' => array(
|
646 |
+
'0em' => __('Sharp', 'wpinked-widgets'),
|
647 |
+
'0.25em' => __('Slightly curved', 'wpinked-widgets'),
|
648 |
+
'0.75em' => __('Highly curved', 'wpinked-widgets'),
|
649 |
+
'1.5em' => __('Round', 'wpinked-widgets'),
|
650 |
+
),
|
651 |
+
),
|
652 |
)
|
653 |
),
|
654 |
),
|
670 |
|
671 |
wp_enqueue_script( 'iw-blog-init', siteorigin_widget_get_plugin_dir_url('ink-blog') . 'scripts/equalizer.init.js', array( 'iw-equalizer-js' ), INKED_SO_WIDGETS, true );
|
672 |
|
673 |
+
wp_enqueue_script( 'jquery' );
|
674 |
+
|
675 |
wp_enqueue_style( 'iw-blog', siteorigin_widget_get_plugin_dir_url('ink-blog') . 'styles/blog.css', array(), INKED_SO_WIDGETS );
|
676 |
|
677 |
parent::enqueue_frontend_scripts( $instance );
|
706 |
'btn-size' => $instance['styling']['btn-size'],
|
707 |
'btn-clr' => $instance['styling']['btn-clr'],
|
708 |
'btn-base' => $instance['styling']['btn-base'],
|
709 |
+
'btn-crnr' => $instance['styling']['btn-corners'],
|
710 |
+
'navi-theme' => $instance['pagination']['btn-theme'],
|
711 |
+
'navi-align' => $instance['pagination']['btn-align'],
|
712 |
+
'navi-size' => $instance['pagination']['btn-size'],
|
713 |
+
'navi-clr' => $instance['pagination']['btn-clr'],
|
714 |
+
'navi-base' => $instance['pagination']['btn-base'],
|
715 |
+
'navi-crnr' => $instance['pagination']['btn-corners'],
|
716 |
);
|
717 |
}
|
718 |
|
719 |
}
|
720 |
|
721 |
+
siteorigin_widget_register('ink-blog', __FILE__, 'Inked_Blog_SO_Widget');
|
widgets/ink-blgs-widget/styles/blog.css
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
-
.iw-so-article-btn
|
|
|
2 |
-webkit-appearance: none;
|
3 |
-moz-appearance: none;
|
4 |
cursor: pointer;
|
@@ -9,15 +10,20 @@
|
|
9 |
text-align: center;
|
10 |
text-decoration: none;
|
11 |
display: inline-block;
|
12 |
-
-webkit-transition: all 0.15s ease-in-out;
|
13 |
-
-moz-transition: all 0.15s ease-in-out;
|
14 |
-
-ms-transition: all 0.15s ease-in-out;
|
15 |
-
-o-transition: all 0.15s ease-in-out;
|
16 |
-
transition: all 0.15s ease-in-out;
|
17 |
}
|
18 |
|
19 |
@media only screen and (min-width: 40.0625em) {
|
20 |
-
.iw-so-article-btn
|
21 |
-
|
|
|
22 |
}
|
23 |
}
|
|
|
|
|
|
|
|
1 |
+
.iw-so-article-btn,
|
2 |
+
.iw-so-navi-btn {
|
3 |
-webkit-appearance: none;
|
4 |
-moz-appearance: none;
|
5 |
cursor: pointer;
|
10 |
text-align: center;
|
11 |
text-decoration: none;
|
12 |
display: inline-block;
|
13 |
+
-webkit-transition: all 0.15s ease-in-out;
|
14 |
+
-moz-transition: all 0.15s ease-in-out;
|
15 |
+
-ms-transition: all 0.15s ease-in-out;
|
16 |
+
-o-transition: all 0.15s ease-in-out;
|
17 |
+
transition: all 0.15s ease-in-out;
|
18 |
}
|
19 |
|
20 |
@media only screen and (min-width: 40.0625em) {
|
21 |
+
.iw-so-article-btn,
|
22 |
+
.iw-so-navi-btn {
|
23 |
+
display: inline-block;
|
24 |
}
|
25 |
}
|
26 |
+
|
27 |
+
.iw-so-blog-pagination {
|
28 |
+
list-style: none;
|
29 |
+
}
|
widgets/ink-blgs-widget/styles/button.less
CHANGED
@@ -20,35 +20,36 @@
|
|
20 |
|
21 |
border-radius: @btn-crnr;
|
22 |
color: @btn-base;
|
|
|
23 |
|
24 |
-
.btn-size() when (@btn-size = tiny) {
|
25 |
-
font-size: 0.75em;
|
26 |
-
padding: 0.625em 1.25em;
|
27 |
}
|
28 |
-
.btn-size() when (@btn-size = small) {
|
29 |
-
font-size: 0.9em;
|
30 |
-
padding: 0.875em 1.75em;
|
31 |
}
|
32 |
-
.btn-size() when (@btn-size = standard) {
|
33 |
-
font-size: 1.2em;
|
34 |
-
padding: 1em 2em ;
|
35 |
}
|
36 |
-
.btn-size() when (@btn-size = large) {
|
37 |
-
font-size: 1.75em;
|
38 |
-
padding: 1.125em 2.25em;
|
39 |
}
|
40 |
.btn-size();
|
41 |
|
42 |
-
.btn-theme() when (@btn-theme = classic) {
|
43 |
-
.gradient(@btn-clr, darken(@btn-clr, 15%), @btn-clr);
|
44 |
border: 1px solid;
|
45 |
-
border-color: darken(@btn-clr, 8%) darken(@btn-clr, 10%) darken(@btn-clr, 13%) darken(@btn-clr, 10%);
|
46 |
}
|
47 |
-
.btn-theme() when (@btn-theme = flat) {
|
48 |
-
background: @btn-clr;
|
49 |
-
border: 1px solid @btn-clr;
|
50 |
}
|
51 |
-
.btn-theme() when (@btn-theme = outline) {
|
52 |
background: transparent;
|
53 |
border: 2px solid @btn-clr;
|
54 |
color: @btn-clr;
|
@@ -57,66 +58,66 @@
|
|
57 |
background: @btn-clr;
|
58 |
box-shadow: 0px 5px 0px 0px darken(@btn-clr, 10%);
|
59 |
}
|
60 |
-
.btn-theme() when (@btn-theme = shadow) {
|
61 |
.drop-shadow(1px, 1px, 4px, 0.4);
|
62 |
-
background: @btn-clr;
|
63 |
-
border: 1px solid @btn-clr;
|
64 |
}
|
65 |
-
.btn-theme() when (@btn-theme = deline) {
|
66 |
-
background: @btn-clr;
|
67 |
border: 2px solid @btn-clr;
|
68 |
}
|
69 |
.btn-theme();
|
70 |
|
71 |
&:hover,
|
72 |
&:focus {
|
73 |
-
.dft-theme() when (@btn-theme = classic) {
|
74 |
color: @btn-base;
|
75 |
}
|
76 |
-
.dft-theme() when (@btn-theme = flat) {
|
77 |
-
color: @btn-base;
|
78 |
}
|
79 |
-
.dft-theme() when (@btn-theme = outline) {
|
80 |
color: @btn-clr;
|
81 |
}
|
82 |
.dft-theme() when (@btn-theme = threed) {
|
83 |
color: @btn-base;
|
84 |
}
|
85 |
-
.dft-theme() when (@btn-theme = shadow) {
|
86 |
-
color: @btn-base;
|
87 |
}
|
88 |
-
.dft-theme() when (@btn-theme = deline) {
|
89 |
color: @btn-base;
|
90 |
}
|
91 |
.dft-theme();
|
92 |
}
|
93 |
}
|
94 |
-
.iw-so-article-btn-hover {
|
95 |
&:hover,
|
96 |
&:focus {
|
97 |
color: @btn-base;
|
98 |
-
.btn-hover() when (@btn-theme = classic) {
|
99 |
.gradient(lighten(@btn-clr, 2%), darken(@btn-clr, 20%), lighten(@btn-clr, 2%));
|
100 |
border-color: darken(@btn-clr, 4%) darken(@btn-clr, 6%) darken(@btn-clr, 18%) darken(@btn-clr, 6%);
|
101 |
-
color: @btn-base;
|
102 |
}
|
103 |
-
.btn-hover() when (@btn-theme = flat) {
|
104 |
-
background: darken(@btn-clr, 7.5%);
|
105 |
-
border-color: darken(@btn-clr, 7.5%);
|
106 |
}
|
107 |
-
.btn-hover() when (@btn-theme = outline) {
|
108 |
background: @btn-clr;
|
109 |
color: @btn-base;
|
110 |
}
|
111 |
-
.btn-hover() when (@btn-theme = threed) {
|
112 |
background: lighten(@btn-clr, 10%);
|
113 |
}
|
114 |
-
.btn-hover() when (@btn-theme = shadow) {
|
115 |
-
background: lighten(@btn-clr, 5%);
|
116 |
border-color: lighten(@btn-clr, 5%);
|
117 |
.drop-shadow(1px, 1px, 8px, 0.4);
|
118 |
}
|
119 |
-
.btn-hover() when (@btn-theme = deline) {
|
120 |
color: @btn-clr;
|
121 |
background: transparent;
|
122 |
}
|
@@ -128,13 +129,13 @@
|
|
128 |
.btn-active() when (@btn-theme = classic) {
|
129 |
.box-shadow(inset 0 3px 25px darken(@btn-clr, 25%));
|
130 |
}
|
131 |
-
.btn-active() when (@btn-theme = flat) {
|
132 |
-
background: darken(@btn-clr, 15%);
|
133 |
-
border-color: darken(@btn-clr, 15%);
|
134 |
}
|
135 |
.btn-active() when (@btn-theme = outline) {
|
136 |
-
background: lighten(@btn-clr, 10%);
|
137 |
-
border-color: lighten(@btn-clr, 10%);
|
138 |
color: @btn-base;
|
139 |
}
|
140 |
.btn-active() when (@btn-theme = threed) {
|
@@ -145,15 +146,15 @@
|
|
145 |
transform: translate(0, 5px);
|
146 |
box-shadow: 0px 1px 0px 0px;
|
147 |
}
|
148 |
-
.btn-active() when (@btn-theme = shadow) {
|
149 |
-
background: darken(@btn-clr, 4%);
|
150 |
-
border-color: darken(@btn-clr, 4%);
|
151 |
}
|
152 |
-
.btn-active() when (@btn-theme = deline) {
|
153 |
color: lighten(@btn-clr, 20%);
|
154 |
border-color: lighten(@btn-clr, 20%);
|
155 |
background: transparent;
|
156 |
}
|
157 |
.btn-active();
|
158 |
}
|
159 |
-
}
|
20 |
|
21 |
border-radius: @btn-crnr;
|
22 |
color: @btn-base;
|
23 |
+
text-decoration: none;
|
24 |
|
25 |
+
.btn-size() when (@btn-size = tiny) {
|
26 |
+
font-size: 0.75em;
|
27 |
+
padding: 0.625em 1.25em;
|
28 |
}
|
29 |
+
.btn-size() when (@btn-size = small) {
|
30 |
+
font-size: 0.9em;
|
31 |
+
padding: 0.875em 1.75em;
|
32 |
}
|
33 |
+
.btn-size() when (@btn-size = standard) {
|
34 |
+
font-size: 1.2em;
|
35 |
+
padding: 1em 2em ;
|
36 |
}
|
37 |
+
.btn-size() when (@btn-size = large) {
|
38 |
+
font-size: 1.75em;
|
39 |
+
padding: 1.125em 2.25em;
|
40 |
}
|
41 |
.btn-size();
|
42 |
|
43 |
+
.btn-theme() when (@btn-theme = classic) {
|
44 |
+
.gradient(@btn-clr, darken(@btn-clr, 15%), @btn-clr);
|
45 |
border: 1px solid;
|
46 |
+
border-color: darken(@btn-clr, 8%) darken(@btn-clr, 10%) darken(@btn-clr, 13%) darken(@btn-clr, 10%);
|
47 |
}
|
48 |
+
.btn-theme() when (@btn-theme = flat) {
|
49 |
+
background: @btn-clr;
|
50 |
+
border: 1px solid @btn-clr;
|
51 |
}
|
52 |
+
.btn-theme() when (@btn-theme = outline) {
|
53 |
background: transparent;
|
54 |
border: 2px solid @btn-clr;
|
55 |
color: @btn-clr;
|
58 |
background: @btn-clr;
|
59 |
box-shadow: 0px 5px 0px 0px darken(@btn-clr, 10%);
|
60 |
}
|
61 |
+
.btn-theme() when (@btn-theme = shadow) {
|
62 |
.drop-shadow(1px, 1px, 4px, 0.4);
|
63 |
+
background: @btn-clr;
|
64 |
+
border: 1px solid @btn-clr;
|
65 |
}
|
66 |
+
.btn-theme() when (@btn-theme = deline) {
|
67 |
+
background: @btn-clr;
|
68 |
border: 2px solid @btn-clr;
|
69 |
}
|
70 |
.btn-theme();
|
71 |
|
72 |
&:hover,
|
73 |
&:focus {
|
74 |
+
.dft-theme() when (@btn-theme = classic) {
|
75 |
color: @btn-base;
|
76 |
}
|
77 |
+
.dft-theme() when (@btn-theme = flat) {
|
78 |
+
color: @btn-base;
|
79 |
}
|
80 |
+
.dft-theme() when (@btn-theme = outline) {
|
81 |
color: @btn-clr;
|
82 |
}
|
83 |
.dft-theme() when (@btn-theme = threed) {
|
84 |
color: @btn-base;
|
85 |
}
|
86 |
+
.dft-theme() when (@btn-theme = shadow) {
|
87 |
+
color: @btn-base;
|
88 |
}
|
89 |
+
.dft-theme() when (@btn-theme = deline) {
|
90 |
color: @btn-base;
|
91 |
}
|
92 |
.dft-theme();
|
93 |
}
|
94 |
}
|
95 |
+
.iw-so-article-btn-hover {
|
96 |
&:hover,
|
97 |
&:focus {
|
98 |
color: @btn-base;
|
99 |
+
.btn-hover() when (@btn-theme = classic) {
|
100 |
.gradient(lighten(@btn-clr, 2%), darken(@btn-clr, 20%), lighten(@btn-clr, 2%));
|
101 |
border-color: darken(@btn-clr, 4%) darken(@btn-clr, 6%) darken(@btn-clr, 18%) darken(@btn-clr, 6%);
|
102 |
+
color: @btn-base;
|
103 |
}
|
104 |
+
.btn-hover() when (@btn-theme = flat) {
|
105 |
+
background: darken(@btn-clr, 7.5%);
|
106 |
+
border-color: darken(@btn-clr, 7.5%);
|
107 |
}
|
108 |
+
.btn-hover() when (@btn-theme = outline) {
|
109 |
background: @btn-clr;
|
110 |
color: @btn-base;
|
111 |
}
|
112 |
+
.btn-hover() when (@btn-theme = threed) {
|
113 |
background: lighten(@btn-clr, 10%);
|
114 |
}
|
115 |
+
.btn-hover() when (@btn-theme = shadow) {
|
116 |
+
background: lighten(@btn-clr, 5%);
|
117 |
border-color: lighten(@btn-clr, 5%);
|
118 |
.drop-shadow(1px, 1px, 8px, 0.4);
|
119 |
}
|
120 |
+
.btn-hover() when (@btn-theme = deline) {
|
121 |
color: @btn-clr;
|
122 |
background: transparent;
|
123 |
}
|
129 |
.btn-active() when (@btn-theme = classic) {
|
130 |
.box-shadow(inset 0 3px 25px darken(@btn-clr, 25%));
|
131 |
}
|
132 |
+
.btn-active() when (@btn-theme = flat) {
|
133 |
+
background: darken(@btn-clr, 15%);
|
134 |
+
border-color: darken(@btn-clr, 15%);
|
135 |
}
|
136 |
.btn-active() when (@btn-theme = outline) {
|
137 |
+
background: lighten(@btn-clr, 10%);
|
138 |
+
border-color: lighten(@btn-clr, 10%);
|
139 |
color: @btn-base;
|
140 |
}
|
141 |
.btn-active() when (@btn-theme = threed) {
|
146 |
transform: translate(0, 5px);
|
147 |
box-shadow: 0px 1px 0px 0px;
|
148 |
}
|
149 |
+
.btn-active() when (@btn-theme = shadow) {
|
150 |
+
background: darken(@btn-clr, 4%);
|
151 |
+
border-color: darken(@btn-clr, 4%);
|
152 |
}
|
153 |
+
.btn-active() when (@btn-theme = deline) {
|
154 |
color: lighten(@btn-clr, 20%);
|
155 |
border-color: lighten(@btn-clr, 20%);
|
156 |
background: transparent;
|
157 |
}
|
158 |
.btn-active();
|
159 |
}
|
160 |
+
}
|
widgets/ink-blgs-widget/styles/navigation.less
ADDED
@@ -0,0 +1,170 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
@import "../../../../so-widgets-bundle/base/less/mixins";
|
2 |
+
|
3 |
+
@navi-theme: flat;
|
4 |
+
@navi-align: left;
|
5 |
+
@navi-size: standard;
|
6 |
+
@navi-clr: #333;
|
7 |
+
@navi-base: #fff;
|
8 |
+
@navi-crnr: 0em;
|
9 |
+
|
10 |
+
.iw-so-blog-pagination {
|
11 |
+
.clearfix();
|
12 |
+
|
13 |
+
.btn-align() when (@navi-align = left) { text-align: left }
|
14 |
+
.btn-align() when (@navi-align = right) { text-align: right }
|
15 |
+
.btn-align() when (@navi-align = center) { text-align: center }
|
16 |
+
.btn-align();
|
17 |
+
|
18 |
+
& .iw-so-blog-previous {
|
19 |
+
.btn-prev() when (@navi-align = ends) { float: left }
|
20 |
+
.btn-prev();
|
21 |
+
}
|
22 |
+
|
23 |
+
& .iw-so-blog-next {
|
24 |
+
.btn-next() when (@navi-align = ends) { float: right }
|
25 |
+
.btn-next();
|
26 |
+
}
|
27 |
+
}
|
28 |
+
|
29 |
+
.iw-so-navi-btn {
|
30 |
+
|
31 |
+
border-radius: @navi-crnr;
|
32 |
+
color: @navi-base;
|
33 |
+
text-decoration: none;
|
34 |
+
|
35 |
+
.btn-size() when (@navi-size = tiny) {
|
36 |
+
font-size: 0.75em;
|
37 |
+
padding: 0.625em 1.25em;
|
38 |
+
}
|
39 |
+
.btn-size() when (@navi-size = small) {
|
40 |
+
font-size: 0.9em;
|
41 |
+
padding: 0.875em 1.75em;
|
42 |
+
}
|
43 |
+
.btn-size() when (@navi-size = standard) {
|
44 |
+
font-size: 1.2em;
|
45 |
+
padding: 1em 2em ;
|
46 |
+
}
|
47 |
+
.btn-size() when (@navi-size = large) {
|
48 |
+
font-size: 1.75em;
|
49 |
+
padding: 1.125em 2.25em;
|
50 |
+
}
|
51 |
+
.btn-size();
|
52 |
+
|
53 |
+
.btn-theme() when (@navi-theme = classic) {
|
54 |
+
.gradient(@navi-clr, darken(@navi-clr, 15%), @navi-clr);
|
55 |
+
border: 1px solid;
|
56 |
+
border-color: darken(@navi-clr, 8%) darken(@navi-clr, 10%) darken(@navi-clr, 13%) darken(@navi-clr, 10%);
|
57 |
+
}
|
58 |
+
.btn-theme() when (@navi-theme = flat) {
|
59 |
+
background: @navi-clr;
|
60 |
+
border: 1px solid @navi-clr;
|
61 |
+
}
|
62 |
+
.btn-theme() when (@navi-theme = outline) {
|
63 |
+
background: transparent;
|
64 |
+
border: 2px solid @navi-clr;
|
65 |
+
color: @navi-clr;
|
66 |
+
}
|
67 |
+
.btn-theme() when (@navi-theme = threed) {
|
68 |
+
background: @navi-clr;
|
69 |
+
box-shadow: 0px 5px 0px 0px darken(@navi-clr, 10%);
|
70 |
+
}
|
71 |
+
.btn-theme() when (@navi-theme = shadow) {
|
72 |
+
.drop-shadow(1px, 1px, 4px, 0.4);
|
73 |
+
background: @navi-clr;
|
74 |
+
border: 1px solid @navi-clr;
|
75 |
+
}
|
76 |
+
.btn-theme() when (@navi-theme = deline) {
|
77 |
+
background: @navi-clr;
|
78 |
+
border: 2px solid @navi-clr;
|
79 |
+
}
|
80 |
+
.btn-theme();
|
81 |
+
|
82 |
+
&:hover,
|
83 |
+
&:focus {
|
84 |
+
.dft-theme() when (@navi-theme = classic) {
|
85 |
+
color: @navi-base;
|
86 |
+
}
|
87 |
+
.dft-theme() when (@navi-theme = flat) {
|
88 |
+
color: @navi-base;
|
89 |
+
}
|
90 |
+
.dft-theme() when (@navi-theme = outline) {
|
91 |
+
color: @navi-clr;
|
92 |
+
}
|
93 |
+
.dft-theme() when (@navi-theme = threed) {
|
94 |
+
color: @navi-base;
|
95 |
+
}
|
96 |
+
.dft-theme() when (@navi-theme = shadow) {
|
97 |
+
color: @navi-base;
|
98 |
+
}
|
99 |
+
.dft-theme() when (@navi-theme = deline) {
|
100 |
+
color: @navi-base;
|
101 |
+
}
|
102 |
+
.dft-theme();
|
103 |
+
}
|
104 |
+
}
|
105 |
+
.iw-so-navi-btn-hover {
|
106 |
+
&:hover,
|
107 |
+
&:focus {
|
108 |
+
color: @navi-base;
|
109 |
+
.btn-hover() when (@navi-theme = classic) {
|
110 |
+
.gradient(lighten(@navi-clr, 2%), darken(@navi-clr, 20%), lighten(@navi-clr, 2%));
|
111 |
+
border-color: darken(@navi-clr, 4%) darken(@navi-clr, 6%) darken(@navi-clr, 18%) darken(@navi-clr, 6%);
|
112 |
+
color: @navi-base;
|
113 |
+
}
|
114 |
+
.btn-hover() when (@navi-theme = flat) {
|
115 |
+
background: darken(@navi-clr, 7.5%);
|
116 |
+
border-color: darken(@navi-clr, 7.5%);
|
117 |
+
}
|
118 |
+
.btn-hover() when (@navi-theme = outline) {
|
119 |
+
background: @navi-clr;
|
120 |
+
color: @navi-base;
|
121 |
+
}
|
122 |
+
.btn-hover() when (@navi-theme = threed) {
|
123 |
+
background: lighten(@navi-clr, 10%);
|
124 |
+
}
|
125 |
+
.btn-hover() when (@navi-theme = shadow) {
|
126 |
+
background: lighten(@navi-clr, 5%);
|
127 |
+
border-color: lighten(@navi-clr, 5%);
|
128 |
+
.drop-shadow(1px, 1px, 8px, 0.4);
|
129 |
+
}
|
130 |
+
.btn-hover() when (@navi-theme = deline) {
|
131 |
+
color: @navi-clr;
|
132 |
+
background: transparent;
|
133 |
+
}
|
134 |
+
.btn-hover();
|
135 |
+
}
|
136 |
+
}
|
137 |
+
.iw-so-navi-btn-click {
|
138 |
+
&:active {
|
139 |
+
.btn-active() when (@navi-theme = classic) {
|
140 |
+
.box-shadow(inset 0 3px 25px darken(@navi-clr, 25%));
|
141 |
+
}
|
142 |
+
.btn-active() when (@navi-theme = flat) {
|
143 |
+
background: darken(@navi-clr, 15%);
|
144 |
+
border-color: darken(@navi-clr, 15%);
|
145 |
+
}
|
146 |
+
.btn-active() when (@navi-theme = outline) {
|
147 |
+
background: lighten(@navi-clr, 10%);
|
148 |
+
border-color: lighten(@navi-clr, 10%);
|
149 |
+
color: @navi-base;
|
150 |
+
}
|
151 |
+
.btn-active() when (@navi-theme = threed) {
|
152 |
+
-webkit-transform: translate(0, 5px);
|
153 |
+
-moz-transform: translate(0, 5px);
|
154 |
+
-ms-transform: translate(0, 5px);
|
155 |
+
-o-transform: translate(0, 5px);
|
156 |
+
transform: translate(0, 5px);
|
157 |
+
box-shadow: 0px 1px 0px 0px;
|
158 |
+
}
|
159 |
+
.btn-active() when (@navi-theme = shadow) {
|
160 |
+
background: darken(@navi-clr, 4%);
|
161 |
+
border-color: darken(@navi-clr, 4%);
|
162 |
+
}
|
163 |
+
.btn-active() when (@navi-theme = deline) {
|
164 |
+
color: lighten(@navi-clr, 20%);
|
165 |
+
border-color: lighten(@navi-clr, 20%);
|
166 |
+
background: transparent;
|
167 |
+
}
|
168 |
+
.btn-active();
|
169 |
+
}
|
170 |
+
}
|
widgets/ink-blgs-widget/styles/thumb-above.less
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
@import "../../../../so-widgets-bundle/base/less/mixins";
|
2 |
@import "button";
|
|
|
3 |
|
4 |
@gap: 0;
|
5 |
@t-size: 2em;
|
@@ -35,14 +36,14 @@
|
|
35 |
-o-transform: scale(1);
|
36 |
transform: scale(1);
|
37 |
.transition(all, .25s, linear);
|
38 |
-
.img-expand-def() when (@img-e = '' ) {
|
39 |
-webkit-transform: translateZ(0);
|
40 |
-moz-transform: translateZ(0);
|
41 |
-ms-transform: translateZ(0);
|
42 |
-o-transform: translateZ(0);
|
43 |
transform: translateZ(0);
|
44 |
}
|
45 |
-
.img-expand-def();
|
46 |
}
|
47 |
[class^="sow-icon-"] {
|
48 |
position: absolute;
|
@@ -65,12 +66,12 @@
|
|
65 |
&:focus {
|
66 |
img {
|
67 |
font-size: @img-e;
|
68 |
-
.img-expand() when (@img-e = 1 ) {
|
69 |
-webkit-transform: scale(1.1);
|
70 |
-moz-transform: scale(1.1);
|
71 |
-ms-transform: scale(1.1);
|
72 |
-o-transform: scale(1.1);
|
73 |
-
transform: scale(1.1);
|
74 |
}
|
75 |
.img-expand();
|
76 |
opacity: @img-ol-o;
|
@@ -98,7 +99,7 @@
|
|
98 |
&:focus {
|
99 |
color: @hl-clr;
|
100 |
}
|
101 |
-
}
|
102 |
}
|
103 |
|
104 |
.iw-so-article-byline-above,
|
@@ -113,7 +114,7 @@
|
|
113 |
&:focus {
|
114 |
color: @hl-clr;
|
115 |
}
|
116 |
-
}
|
117 |
}
|
118 |
|
119 |
.iw-so-article-byline-above {
|
@@ -137,4 +138,4 @@
|
|
137 |
color: @e-clr;
|
138 |
}
|
139 |
}
|
140 |
-
}
|
1 |
@import "../../../../so-widgets-bundle/base/less/mixins";
|
2 |
@import "button";
|
3 |
+
@import "navigation";
|
4 |
|
5 |
@gap: 0;
|
6 |
@t-size: 2em;
|
36 |
-o-transform: scale(1);
|
37 |
transform: scale(1);
|
38 |
.transition(all, .25s, linear);
|
39 |
+
.img-expand-def() when (@img-e = '' ) {
|
40 |
-webkit-transform: translateZ(0);
|
41 |
-moz-transform: translateZ(0);
|
42 |
-ms-transform: translateZ(0);
|
43 |
-o-transform: translateZ(0);
|
44 |
transform: translateZ(0);
|
45 |
}
|
46 |
+
.img-expand-def();
|
47 |
}
|
48 |
[class^="sow-icon-"] {
|
49 |
position: absolute;
|
66 |
&:focus {
|
67 |
img {
|
68 |
font-size: @img-e;
|
69 |
+
.img-expand() when (@img-e = 1 ) {
|
70 |
-webkit-transform: scale(1.1);
|
71 |
-moz-transform: scale(1.1);
|
72 |
-ms-transform: scale(1.1);
|
73 |
-o-transform: scale(1.1);
|
74 |
+
transform: scale(1.1);
|
75 |
}
|
76 |
.img-expand();
|
77 |
opacity: @img-ol-o;
|
99 |
&:focus {
|
100 |
color: @hl-clr;
|
101 |
}
|
102 |
+
}
|
103 |
}
|
104 |
|
105 |
.iw-so-article-byline-above,
|
114 |
&:focus {
|
115 |
color: @hl-clr;
|
116 |
}
|
117 |
+
}
|
118 |
}
|
119 |
|
120 |
.iw-so-article-byline-above {
|
138 |
color: @e-clr;
|
139 |
}
|
140 |
}
|
141 |
+
}
|
widgets/ink-blgs-widget/styles/thumb-behind.less
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
@import "../../../../so-widgets-bundle/base/less/mixins";
|
2 |
@import "button";
|
|
|
3 |
|
4 |
@gap: 0;
|
5 |
@t-size: 2em;
|
@@ -90,7 +91,7 @@
|
|
90 |
&:focus {
|
91 |
color: @hl-clr;
|
92 |
}
|
93 |
-
}
|
94 |
}
|
95 |
|
96 |
.iw-so-article-byline-above,
|
@@ -105,7 +106,7 @@
|
|
105 |
&:focus {
|
106 |
color: @hl-clr;
|
107 |
}
|
108 |
-
}
|
109 |
}
|
110 |
|
111 |
.iw-so-article-byline-above {
|
@@ -129,4 +130,4 @@
|
|
129 |
color: @e-clr;
|
130 |
}
|
131 |
}
|
132 |
-
}
|
1 |
@import "../../../../so-widgets-bundle/base/less/mixins";
|
2 |
@import "button";
|
3 |
+
@import "navigation";
|
4 |
|
5 |
@gap: 0;
|
6 |
@t-size: 2em;
|
91 |
&:focus {
|
92 |
color: @hl-clr;
|
93 |
}
|
94 |
+
}
|
95 |
}
|
96 |
|
97 |
.iw-so-article-byline-above,
|
106 |
&:focus {
|
107 |
color: @hl-clr;
|
108 |
}
|
109 |
+
}
|
110 |
}
|
111 |
|
112 |
.iw-so-article-byline-above {
|
130 |
color: @e-clr;
|
131 |
}
|
132 |
}
|
133 |
+
}
|
widgets/ink-blgs-widget/styles/thumb-left.less
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
@import "../../../../so-widgets-bundle/base/less/mixins";
|
2 |
@import "button";
|
|
|
3 |
|
4 |
@gap: 0;
|
5 |
@t-size: 2em;
|
@@ -35,14 +36,14 @@
|
|
35 |
-o-transform: scale(1);
|
36 |
transform: scale(1);
|
37 |
.transition(all, .25s, linear);
|
38 |
-
.img-expand-def() when (@img-e = '' ) {
|
39 |
-webkit-transform: translateZ(0);
|
40 |
-moz-transform: translateZ(0);
|
41 |
-ms-transform: translateZ(0);
|
42 |
-o-transform: translateZ(0);
|
43 |
transform: translateZ(0);
|
44 |
}
|
45 |
-
.img-expand-def();
|
46 |
}
|
47 |
[class^="sow-icon-"] {
|
48 |
position: absolute;
|
@@ -64,13 +65,13 @@
|
|
64 |
&:hover,
|
65 |
&:focus {
|
66 |
img {
|
67 |
-
font-size: @img-e;
|
68 |
-
.img-expand() when (@img-e = 1 ) {
|
69 |
-webkit-transform: scale(1.1);
|
70 |
-moz-transform: scale(1.1);
|
71 |
-ms-transform: scale(1.1);
|
72 |
-o-transform: scale(1.1);
|
73 |
-
transform: scale(1.1);
|
74 |
}
|
75 |
.img-expand();
|
76 |
opacity: @img-ol-o;
|
@@ -98,7 +99,7 @@
|
|
98 |
&:focus {
|
99 |
color: @hl-clr;
|
100 |
}
|
101 |
-
}
|
102 |
}
|
103 |
|
104 |
.iw-so-article-byline-above,
|
@@ -113,7 +114,7 @@
|
|
113 |
&:focus {
|
114 |
color: @hl-clr;
|
115 |
}
|
116 |
-
}
|
117 |
}
|
118 |
|
119 |
.iw-so-article-byline-above {
|
@@ -137,4 +138,4 @@
|
|
137 |
color: @e-clr;
|
138 |
}
|
139 |
}
|
140 |
-
}
|
1 |
@import "../../../../so-widgets-bundle/base/less/mixins";
|
2 |
@import "button";
|
3 |
+
@import "navigation";
|
4 |
|
5 |
@gap: 0;
|
6 |
@t-size: 2em;
|
36 |
-o-transform: scale(1);
|
37 |
transform: scale(1);
|
38 |
.transition(all, .25s, linear);
|
39 |
+
.img-expand-def() when (@img-e = '' ) {
|
40 |
-webkit-transform: translateZ(0);
|
41 |
-moz-transform: translateZ(0);
|
42 |
-ms-transform: translateZ(0);
|
43 |
-o-transform: translateZ(0);
|
44 |
transform: translateZ(0);
|
45 |
}
|
46 |
+
.img-expand-def();
|
47 |
}
|
48 |
[class^="sow-icon-"] {
|
49 |
position: absolute;
|
65 |
&:hover,
|
66 |
&:focus {
|
67 |
img {
|
68 |
+
font-size: @img-e;
|
69 |
+
.img-expand() when (@img-e = 1 ) {
|
70 |
-webkit-transform: scale(1.1);
|
71 |
-moz-transform: scale(1.1);
|
72 |
-ms-transform: scale(1.1);
|
73 |
-o-transform: scale(1.1);
|
74 |
+
transform: scale(1.1);
|
75 |
}
|
76 |
.img-expand();
|
77 |
opacity: @img-ol-o;
|
99 |
&:focus {
|
100 |
color: @hl-clr;
|
101 |
}
|
102 |
+
}
|
103 |
}
|
104 |
|
105 |
.iw-so-article-byline-above,
|
114 |
&:focus {
|
115 |
color: @hl-clr;
|
116 |
}
|
117 |
+
}
|
118 |
}
|
119 |
|
120 |
.iw-so-article-byline-above {
|
138 |
color: @e-clr;
|
139 |
}
|
140 |
}
|
141 |
+
}
|
widgets/ink-blgs-widget/styles/thumb-none.less
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
@import "../../../../so-widgets-bundle/base/less/mixins";
|
2 |
@import "button";
|
|
|
3 |
|
4 |
@gap: 0;
|
5 |
@t-size: 2em;
|
@@ -62,7 +63,7 @@
|
|
62 |
}
|
63 |
h2,
|
64 |
p {
|
65 |
-
.icon-display() when (@format = 1) {
|
66 |
padding-left: @gap-left; }
|
67 |
.icon-display();
|
68 |
}
|
@@ -95,7 +96,7 @@
|
|
95 |
&:focus {
|
96 |
color: @hl-clr;
|
97 |
}
|
98 |
-
}
|
99 |
}
|
100 |
|
101 |
.iw-so-article-byline-above {
|
@@ -119,4 +120,4 @@
|
|
119 |
color: @e-clr;
|
120 |
}
|
121 |
}
|
122 |
-
}
|
1 |
@import "../../../../so-widgets-bundle/base/less/mixins";
|
2 |
@import "button";
|
3 |
+
@import "navigation";
|
4 |
|
5 |
@gap: 0;
|
6 |
@t-size: 2em;
|
63 |
}
|
64 |
h2,
|
65 |
p {
|
66 |
+
.icon-display() when (@format = 1) {
|
67 |
padding-left: @gap-left; }
|
68 |
.icon-display();
|
69 |
}
|
96 |
&:focus {
|
97 |
color: @hl-clr;
|
98 |
}
|
99 |
+
}
|
100 |
}
|
101 |
|
102 |
.iw-so-article-byline-above {
|
120 |
color: @e-clr;
|
121 |
}
|
122 |
}
|
123 |
+
}
|
widgets/ink-blgs-widget/styles/thumb-right.less
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
@import "../../../../so-widgets-bundle/base/less/mixins";
|
2 |
@import "button";
|
|
|
3 |
|
4 |
@gap: 0;
|
5 |
@t-size: 2em;
|
@@ -35,14 +36,14 @@
|
|
35 |
-o-transform: scale(1);
|
36 |
transform: scale(1);
|
37 |
.transition(all, .25s, linear);
|
38 |
-
.img-expand-def() when (@img-e = '' ) {
|
39 |
-webkit-transform: translateZ(0);
|
40 |
-moz-transform: translateZ(0);
|
41 |
-ms-transform: translateZ(0);
|
42 |
-o-transform: translateZ(0);
|
43 |
transform: translateZ(0);
|
44 |
}
|
45 |
-
.img-expand-def();
|
46 |
}
|
47 |
[class^="sow-icon-"] {
|
48 |
position: absolute;
|
@@ -64,13 +65,13 @@
|
|
64 |
&:hover,
|
65 |
&:focus {
|
66 |
img {
|
67 |
-
font-size: @img-e;
|
68 |
-
.img-expand() when (@img-e = 1 ) {
|
69 |
-webkit-transform: scale(1.1);
|
70 |
-moz-transform: scale(1.1);
|
71 |
-ms-transform: scale(1.1);
|
72 |
-o-transform: scale(1.1);
|
73 |
-
transform: scale(1.1);
|
74 |
}
|
75 |
.img-expand();
|
76 |
opacity: @img-ol-o;
|
@@ -98,7 +99,7 @@
|
|
98 |
&:focus {
|
99 |
color: @hl-clr;
|
100 |
}
|
101 |
-
}
|
102 |
}
|
103 |
|
104 |
.iw-so-article-byline-above,
|
@@ -113,7 +114,7 @@
|
|
113 |
&:focus {
|
114 |
color: @hl-clr;
|
115 |
}
|
116 |
-
}
|
117 |
}
|
118 |
|
119 |
.iw-so-article-byline-above {
|
@@ -137,4 +138,4 @@
|
|
137 |
color: @e-clr;
|
138 |
}
|
139 |
}
|
140 |
-
}
|
1 |
@import "../../../../so-widgets-bundle/base/less/mixins";
|
2 |
@import "button";
|
3 |
+
@import "navigation";
|
4 |
|
5 |
@gap: 0;
|
6 |
@t-size: 2em;
|
36 |
-o-transform: scale(1);
|
37 |
transform: scale(1);
|
38 |
.transition(all, .25s, linear);
|
39 |
+
.img-expand-def() when (@img-e = '' ) {
|
40 |
-webkit-transform: translateZ(0);
|
41 |
-moz-transform: translateZ(0);
|
42 |
-ms-transform: translateZ(0);
|
43 |
-o-transform: translateZ(0);
|
44 |
transform: translateZ(0);
|
45 |
}
|
46 |
+
.img-expand-def();
|
47 |
}
|
48 |
[class^="sow-icon-"] {
|
49 |
position: absolute;
|
65 |
&:hover,
|
66 |
&:focus {
|
67 |
img {
|
68 |
+
font-size: @img-e;
|
69 |
+
.img-expand() when (@img-e = 1 ) {
|
70 |
-webkit-transform: scale(1.1);
|
71 |
-moz-transform: scale(1.1);
|
72 |
-ms-transform: scale(1.1);
|
73 |
-o-transform: scale(1.1);
|
74 |
+
transform: scale(1.1);
|
75 |
}
|
76 |
.img-expand();
|
77 |
opacity: @img-ol-o;
|
99 |
&:focus {
|
100 |
color: @hl-clr;
|
101 |
}
|
102 |
+
}
|
103 |
}
|
104 |
|
105 |
.iw-so-article-byline-above,
|
114 |
&:focus {
|
115 |
color: @hl-clr;
|
116 |
}
|
117 |
+
}
|
118 |
}
|
119 |
|
120 |
.iw-so-article-byline-above {
|
138 |
color: @e-clr;
|
139 |
}
|
140 |
}
|
141 |
+
}
|
widgets/ink-blgs-widget/tpl/thumb-above.php
CHANGED
@@ -8,9 +8,14 @@ $btn_class = array('iw-so-article-btn');
|
|
8 |
if( !empty($instance['styling']['btn-hover']) ) $btn_class[] = 'iw-so-article-btn-hover';
|
9 |
if( !empty($instance['styling']['btn-click']) ) $btn_class[] = 'iw-so-article-btn-click';
|
10 |
|
11 |
-
$
|
12 |
-
|
13 |
-
);
|
|
|
|
|
|
|
|
|
|
|
14 |
|
15 |
if( $instance['design']['columns'] == 1 ):
|
16 |
$cols = ' iw-small-12';
|
@@ -23,13 +28,29 @@ elseif( $instance['design']['columns'] == 4 ):
|
|
23 |
endif;
|
24 |
|
25 |
if( !empty($instance['title']) ) echo $args['before_title'] . esc_html($instance['title']) . $args['after_title'];
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
?>
|
27 |
|
28 |
<?php
|
29 |
// Setting up posts query
|
|
|
|
|
|
|
|
|
|
|
30 |
|
31 |
$post_selector_pseudo_query = $instance['posts'];
|
32 |
$processed_query = siteorigin_widget_post_selector_process_query( $post_selector_pseudo_query );
|
|
|
|
|
|
|
|
|
|
|
33 |
$query_result = new WP_Query( $processed_query );
|
34 |
?>
|
35 |
|
@@ -39,104 +60,108 @@ $query_result = new WP_Query( $processed_query );
|
|
39 |
|
40 |
if($query_result->have_posts()) : ?>
|
41 |
|
42 |
-
<div
|
43 |
|
44 |
-
|
45 |
|
46 |
-
|
47 |
|
48 |
-
<div class="iw-
|
49 |
|
50 |
-
<div class="iw-
|
51 |
|
52 |
-
<div class="iw-
|
53 |
|
54 |
-
<
|
55 |
-
<?php the_post_thumbnail($instance['design']['img-size']); ?>
|
56 |
-
<?php
|
57 |
-
if ( get_post_format() && $instance['design']['format'] ):
|
58 |
-
echo siteorigin_widget_get_icon( $instance['icons'][get_post_format()], $icon_styles );
|
59 |
-
elseif ( $instance['design']['format'] ):
|
60 |
-
echo siteorigin_widget_get_icon( $instance['icons']['standard'], $icon_styles );
|
61 |
-
endif;
|
62 |
-
?>
|
63 |
-
</a>
|
64 |
|
65 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
|
67 |
-
|
68 |
|
69 |
-
|
70 |
|
71 |
-
<div class="iw-
|
72 |
|
73 |
-
|
74 |
|
75 |
-
<?php
|
76 |
|
77 |
-
|
78 |
|
79 |
-
<?php echo
|
80 |
|
81 |
-
|
82 |
|
83 |
-
|
84 |
|
85 |
-
|
86 |
|
87 |
-
|
88 |
|
89 |
-
<?php
|
90 |
|
91 |
-
|
92 |
|
93 |
-
<?php echo
|
94 |
|
95 |
-
|
96 |
|
97 |
-
|
98 |
|
99 |
-
|
100 |
|
101 |
-
|
102 |
-
<?php global $more; $more = 1; the_content(); ?>
|
103 |
-
</div>
|
104 |
|
105 |
-
|
|
|
|
|
106 |
|
107 |
-
|
108 |
-
|
109 |
-
|
|
|
|
|
|
|
|
|
|
|
110 |
<?php wpinked_so_post_excerpt( $instance['design']['excerpt-length'], $instance['design']['excerpt-after'] ); ?>
|
111 |
-
|
112 |
-
|
113 |
-
<?php wpinked_so_post_excerpt( $instance['design']['excerpt-length'], $instance['design']['excerpt-after'] ); ?>
|
114 |
-
<?php endif; ?>
|
115 |
-
</p>
|
116 |
|
117 |
-
|
118 |
|
119 |
-
|
120 |
|
121 |
-
|
122 |
|
123 |
-
|
124 |
|
125 |
-
|
126 |
|
127 |
-
|
128 |
|
129 |
-
|
130 |
|
131 |
-
|
132 |
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
|
|
|
|
138 |
|
139 |
-
|
140 |
|
141 |
</div>
|
142 |
|
@@ -144,10 +169,40 @@ if($query_result->have_posts()) : ?>
|
|
144 |
|
145 |
</div>
|
146 |
|
147 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
148 |
|
149 |
-
<?php
|
150 |
|
151 |
</div>
|
152 |
|
153 |
-
<?php endif; ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
if( !empty($instance['styling']['btn-hover']) ) $btn_class[] = 'iw-so-article-btn-hover';
|
9 |
if( !empty($instance['styling']['btn-click']) ) $btn_class[] = 'iw-so-article-btn-click';
|
10 |
|
11 |
+
$navi_class = array('iw-so-navi-btn');
|
12 |
+
if( !empty($instance['pagination']['btn-hover']) ) $navi_class[] = 'iw-so-navi-btn-hover';
|
13 |
+
if( !empty($instance['pagination']['btn-click']) ) $navi_class[] = 'iw-so-navi-btn-click';
|
14 |
+
|
15 |
+
$navi_attributes = esc_attr(implode(' ', $navi_class));
|
16 |
+
|
17 |
+
$navi_previous = siteorigin_widget_get_icon( $instance['pagination']['newer-icon'] ) . ' ' . $instance['pagination']['newer-text'];
|
18 |
+
$navi_next = $instance['pagination']['older-text'] . ' ' . siteorigin_widget_get_icon( $instance['pagination']['older-icon'] );
|
19 |
|
20 |
if( $instance['design']['columns'] == 1 ):
|
21 |
$cols = ' iw-small-12';
|
28 |
endif;
|
29 |
|
30 |
if( !empty($instance['title']) ) echo $args['before_title'] . esc_html($instance['title']) . $args['after_title'];
|
31 |
+
|
32 |
+
$h = $instance['design']['title-tag'];
|
33 |
+
|
34 |
+
$unique = $instance['_sow_form_id'];
|
35 |
+
|
36 |
+
$count = 1;
|
37 |
?>
|
38 |
|
39 |
<?php
|
40 |
// Setting up posts query
|
41 |
+
global $paged, $query_result;
|
42 |
+
|
43 |
+
$this_post = $post->ID;
|
44 |
+
|
45 |
+
$paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1;
|
46 |
|
47 |
$post_selector_pseudo_query = $instance['posts'];
|
48 |
$processed_query = siteorigin_widget_post_selector_process_query( $post_selector_pseudo_query );
|
49 |
+
|
50 |
+
if ( $instance['pagination']['activate'] ):
|
51 |
+
$processed_query['paged'] = $paged;
|
52 |
+
endif;
|
53 |
+
|
54 |
$query_result = new WP_Query( $processed_query );
|
55 |
?>
|
56 |
|
60 |
|
61 |
if($query_result->have_posts()) : ?>
|
62 |
|
63 |
+
<div id="<? echo $unique; ?>">
|
64 |
|
65 |
+
<div class="iw-row" data-equalizer>
|
66 |
|
67 |
+
<?php while($query_result->have_posts()) : $query_result->the_post(); ?>
|
68 |
|
69 |
+
<div class="iw-so-article<?php echo $cols; ?> iw-cols <?php wpinked_so_blog_post_col( $count, $instance['design']['columns'] ); ?>" data-equalizer-watch>
|
70 |
|
71 |
+
<div class="iw-row iw-collapse iw-so-thumb-above">
|
72 |
|
73 |
+
<div class="iw-small-12 iw-cols">
|
74 |
|
75 |
+
<div class="iw-so-article-thumb">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
|
77 |
+
<a href="<?php the_permalink(); ?>">
|
78 |
+
<?php the_post_thumbnail($instance['design']['img-size']); ?>
|
79 |
+
<?php
|
80 |
+
if ( get_post_format() && $instance['design']['format'] ):
|
81 |
+
echo siteorigin_widget_get_icon( $instance['icons'][get_post_format()], $icon_styles );
|
82 |
+
elseif ( $instance['design']['format'] ):
|
83 |
+
echo siteorigin_widget_get_icon( $instance['icons']['standard'], $icon_styles );
|
84 |
+
endif;
|
85 |
+
?>
|
86 |
+
</a>
|
87 |
|
88 |
+
</div>
|
89 |
|
90 |
+
</div>
|
91 |
|
92 |
+
<div class="iw-small-12 iw-cols">
|
93 |
|
94 |
+
<div class="iw-so-article-content">
|
95 |
|
96 |
+
<?php if ($instance['design']['byline-above']) : ?>
|
97 |
|
98 |
+
<?php $byline_above = apply_filters( 'wpinked_byline', $instance['design']['byline-above'] ); ?>
|
99 |
|
100 |
+
<p class="iw-so-article-byline-above <?php echo $instance['styling']['align']; ?>">
|
101 |
|
102 |
+
<?php echo sprintf( $byline_above, get_the_date(), get_the_category_list($instance['design']['cats']), '<a href="' . get_author_posts_url( $id ) . '">' . get_the_author() . '</a>', get_comments_number() ); ?>
|
103 |
|
104 |
+
</p>
|
105 |
|
106 |
+
<?php endif; ?>
|
107 |
|
108 |
+
<<?php echo $h; ?> class="iw-so-article-title <?php echo $instance['styling']['align']; ?>"><a href="<?php the_permalink(); ?>"><?php the_title() ?></a></<?php echo $h; ?>>
|
109 |
|
110 |
+
<?php if ($instance['design']['byline-below']) : ?>
|
111 |
|
112 |
+
<?php $byline_below = apply_filters( 'wpinked_byline', $instance['design']['byline-below'] ); ?>
|
113 |
|
114 |
+
<p class="iw-so-article-byline-below <?php echo $instance['styling']['align']; ?>">
|
115 |
|
116 |
+
<?php echo sprintf( $byline_below, get_the_date(), get_the_category_list($instance['design']['cats']), '<a href="' . get_author_posts_url( $id ) . '">' . get_the_author() . '</a>', get_comments_number() ); ?>
|
117 |
|
118 |
+
</p>
|
119 |
|
120 |
+
<?php endif; ?>
|
121 |
|
122 |
+
<?php if ( $instance['design']['content'] ): ?>
|
|
|
|
|
123 |
|
124 |
+
<div class="iw-so-article-full">
|
125 |
+
<?php global $more; $more = 1; the_content(); ?>
|
126 |
+
</div>
|
127 |
|
128 |
+
<?php elseif ( $instance['design']['excerpt'] ): ?>
|
129 |
+
|
130 |
+
<p class="iw-so-article-excerpt <?php echo $instance['styling']['align']; ?>">
|
131 |
+
<?php if ( $instance['design']['e-link'] ): ?>
|
132 |
+
<a href="<?php the_permalink(); ?>">
|
133 |
+
<?php wpinked_so_post_excerpt( $instance['design']['excerpt-length'], $instance['design']['excerpt-after'] ); ?>
|
134 |
+
</a>
|
135 |
+
<?php else: ?>
|
136 |
<?php wpinked_so_post_excerpt( $instance['design']['excerpt-length'], $instance['design']['excerpt-after'] ); ?>
|
137 |
+
<?php endif; ?>
|
138 |
+
</p>
|
|
|
|
|
|
|
139 |
|
140 |
+
<?php endif; ?>
|
141 |
|
142 |
+
<?php if ($instance['design']['byline-end']) : ?>
|
143 |
|
144 |
+
<?php $byline_end = apply_filters( 'wpinked_byline', $instance['design']['byline-end'] ); ?>
|
145 |
|
146 |
+
<p class="iw-so-article-byline-end <?php echo $instance['styling']['align']; ?>">
|
147 |
|
148 |
+
<?php echo sprintf( $byline_end, get_the_date(), get_the_category_list($instance['design']['cats']), '<a href="' . get_author_posts_url( $id ) . '">' . get_the_author() . '</a>', get_comments_number() ); ?>
|
149 |
|
150 |
+
</p>
|
151 |
|
152 |
+
<?php endif; ?>
|
153 |
|
154 |
+
<?php if ($instance['design']['button']) : ?>
|
155 |
|
156 |
+
<div class="iw-so-article-button">
|
157 |
+
<a class="<?php echo esc_attr(implode(' ', $btn_class)); ?>" href="<?php the_permalink(); ?>">
|
158 |
+
<?php echo $instance['design']['btn-text']; ?>
|
159 |
+
</a>
|
160 |
+
</div>
|
161 |
+
|
162 |
+
<?php endif; ?>
|
163 |
|
164 |
+
</div>
|
165 |
|
166 |
</div>
|
167 |
|
169 |
|
170 |
</div>
|
171 |
|
172 |
+
<?php endwhile; wp_reset_postdata(); ?>
|
173 |
+
|
174 |
+
</div>
|
175 |
+
|
176 |
+
<?php if ( $instance['pagination']['activate'] ): ?>
|
177 |
+
|
178 |
+
<ul id='iw-so-blog-pagination' class="iw-so-blog-pagination">
|
179 |
+
<li class="iw-so-blog-previous"><?php echo str_replace ( '<a', '<a class="' . $navi_attributes . '"', get_previous_posts_link( $navi_previous, $query_result->max_num_pages) ) ?></li>
|
180 |
+
<li class="iw-so-blog-next"><?php echo str_replace ( '<a', '<a class="' . $navi_attributes . '"', get_next_posts_link( $navi_next, $query_result->max_num_pages) ) ?></li>
|
181 |
+
</ul>
|
182 |
|
183 |
+
<?php endif; ?>
|
184 |
|
185 |
</div>
|
186 |
|
187 |
+
<?php endif; ?>
|
188 |
+
|
189 |
+
<?php if ( $instance['pagination']['activate'] && $instance['pagination']['type'] == 'ajax' ): ?>
|
190 |
+
|
191 |
+
<script>
|
192 |
+
jQuery(document).ready(function(){
|
193 |
+
// AJAX pagination
|
194 |
+
jQuery(function(jQuery) {
|
195 |
+
jQuery('#<?php echo $unique; ?>').on('click', '#iw-so-blog-pagination a', function(e){
|
196 |
+
e.preventDefault();
|
197 |
+
var link = jQuery(this).attr('href');
|
198 |
+
jQuery('#<?php echo $unique; ?>').fadeOut(500, function(){
|
199 |
+
jQuery(this).load(link + ' #<?php echo $unique; ?>', function() {
|
200 |
+
jQuery(this).fadeIn(500);
|
201 |
+
});
|
202 |
+
});
|
203 |
+
});
|
204 |
+
});
|
205 |
+
});
|
206 |
+
</script>
|
207 |
+
|
208 |
+
<?php endif; ?>
|
widgets/ink-blgs-widget/tpl/thumb-behind.php
CHANGED
@@ -8,6 +8,15 @@ $btn_class = array('iw-so-article-btn');
|
|
8 |
if( !empty($instance['styling']['btn-hover']) ) $btn_class[] = 'iw-so-article-btn-hover';
|
9 |
if( !empty($instance['styling']['btn-click']) ) $btn_class[] = 'iw-so-article-btn-click';
|
10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
if( $instance['design']['columns'] == 1 ):
|
12 |
$cols = ' iw-small-12';
|
13 |
elseif( $instance['design']['columns'] == 2 ):
|
@@ -20,15 +29,26 @@ endif;
|
|
20 |
|
21 |
if( !empty($instance['title']) ) echo $args['before_title'] . esc_html($instance['title']) . $args['after_title'];
|
22 |
|
|
|
|
|
|
|
|
|
|
|
23 |
?>
|
24 |
|
25 |
<?php
|
26 |
// Setting up posts query
|
|
|
27 |
|
28 |
-
$
|
29 |
|
|
|
30 |
$processed_query = siteorigin_widget_post_selector_process_query( $post_selector_pseudo_query );
|
31 |
|
|
|
|
|
|
|
|
|
32 |
$query_result = new WP_Query( $processed_query );
|
33 |
?>
|
34 |
|
@@ -38,112 +58,146 @@ $query_result = new WP_Query( $processed_query );
|
|
38 |
|
39 |
if($query_result->have_posts()) : ?>
|
40 |
|
41 |
-
<div
|
|
|
|
|
42 |
|
43 |
-
|
44 |
|
45 |
-
|
46 |
|
47 |
-
|
48 |
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
|
53 |
-
|
54 |
|
55 |
-
|
56 |
|
57 |
-
|
58 |
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
|
67 |
-
|
68 |
|
69 |
-
|
70 |
|
71 |
-
|
72 |
|
73 |
-
|
74 |
|
75 |
-
|
76 |
|
77 |
-
|
78 |
|
79 |
-
|
80 |
|
81 |
-
|
82 |
|
83 |
-
|
84 |
|
85 |
-
|
86 |
|
87 |
-
|
88 |
|
89 |
-
|
90 |
|
91 |
-
|
92 |
|
93 |
-
|
94 |
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
|
99 |
-
|
100 |
|
101 |
-
|
102 |
-
|
103 |
-
|
|
|
|
|
|
|
104 |
<?php wpinked_so_post_excerpt( $instance['design']['excerpt-length'], $instance['design']['excerpt-after'] ); ?>
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
</p>
|
110 |
|
111 |
-
|
112 |
|
113 |
-
|
114 |
|
115 |
-
|
116 |
|
117 |
-
|
118 |
|
119 |
-
|
120 |
|
121 |
-
|
122 |
|
123 |
-
|
124 |
|
125 |
-
|
|
|
|
|
|
|
|
|
126 |
|
127 |
-
|
128 |
-
<a class="<?php echo esc_attr(implode(' ', $btn_class)); ?>" href="<?php the_permalink(); ?>">
|
129 |
-
<?php echo $instance['design']['btn-text']; ?>
|
130 |
-
</a>
|
131 |
-
</div>
|
132 |
|
133 |
-
|
134 |
|
135 |
</div>
|
136 |
|
137 |
-
|
138 |
|
139 |
-
|
140 |
|
141 |
</div>
|
142 |
|
143 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
144 |
|
145 |
-
<?php
|
146 |
|
147 |
</div>
|
148 |
|
149 |
-
<?php endif; ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
if( !empty($instance['styling']['btn-hover']) ) $btn_class[] = 'iw-so-article-btn-hover';
|
9 |
if( !empty($instance['styling']['btn-click']) ) $btn_class[] = 'iw-so-article-btn-click';
|
10 |
|
11 |
+
$navi_class = array('iw-so-navi-btn');
|
12 |
+
if( !empty($instance['pagination']['btn-hover']) ) $navi_class[] = 'iw-so-navi-btn-hover';
|
13 |
+
if( !empty($instance['pagination']['btn-click']) ) $navi_class[] = 'iw-so-navi-btn-click';
|
14 |
+
|
15 |
+
$navi_attributes = esc_attr(implode(' ', $navi_class));
|
16 |
+
|
17 |
+
$navi_previous = siteorigin_widget_get_icon( $instance['pagination']['newer-icon'] ) . ' ' . $instance['pagination']['newer-text'];
|
18 |
+
$navi_next = $instance['pagination']['older-text'] . ' ' . siteorigin_widget_get_icon( $instance['pagination']['older-icon'] );
|
19 |
+
|
20 |
if( $instance['design']['columns'] == 1 ):
|
21 |
$cols = ' iw-small-12';
|
22 |
elseif( $instance['design']['columns'] == 2 ):
|
29 |
|
30 |
if( !empty($instance['title']) ) echo $args['before_title'] . esc_html($instance['title']) . $args['after_title'];
|
31 |
|
32 |
+
$h = $instance['design']['title-tag'];
|
33 |
+
|
34 |
+
$unique = $instance['_sow_form_id'];
|
35 |
+
|
36 |
+
$count = 1;
|
37 |
?>
|
38 |
|
39 |
<?php
|
40 |
// Setting up posts query
|
41 |
+
global $paged, $query_result;
|
42 |
|
43 |
+
$paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1;
|
44 |
|
45 |
+
$post_selector_pseudo_query = $instance['posts'];
|
46 |
$processed_query = siteorigin_widget_post_selector_process_query( $post_selector_pseudo_query );
|
47 |
|
48 |
+
if ( $instance['pagination']['activate'] ):
|
49 |
+
$processed_query['paged'] = $paged;
|
50 |
+
endif;
|
51 |
+
|
52 |
$query_result = new WP_Query( $processed_query );
|
53 |
?>
|
54 |
|
58 |
|
59 |
if($query_result->have_posts()) : ?>
|
60 |
|
61 |
+
<div id="<? echo $unique; ?>">
|
62 |
+
|
63 |
+
<div class="iw-row iw-collapse" data-equalizer>
|
64 |
|
65 |
+
<?php while($query_result->have_posts()) : $query_result->the_post(); ?>
|
66 |
|
67 |
+
<div class="iw-so-article<?php echo $cols; ?> iw-cols <?php wpinked_so_blog_post_col( $count, $instance['design']['columns'] ); ?>" data-equalizer-watch>
|
68 |
|
69 |
+
<div class="iw-row <?php if (!$instance['styling']['gap-bw']){echo 'iw-collapse'; } ?> iw-so-thumb-behind">
|
70 |
|
71 |
+
<?php if ( has_post_thumbnail() ) :
|
72 |
+
$thumbnail = wp_get_attachment_url( get_post_thumbnail_id() );
|
73 |
+
endif; ?>
|
74 |
|
75 |
+
<div class="iw-small-12 iw-cols" data-equalizer-watch>
|
76 |
|
77 |
+
<div class="iw-so-article-bg iw-blg-thumb-bg" style="background-image: url('<?php echo $thumbnail; ?>');" data-equalizer-watch>
|
78 |
|
79 |
+
<div class="iw-so-article-content iw-blg-thumb-ol" data-equalizer-watch>
|
80 |
|
81 |
+
<?php
|
82 |
+
if ( get_post_format() && $instance['design']['format'] ):
|
83 |
+
echo siteorigin_widget_get_icon( $instance['icons'][get_post_format()], $icon_styles );
|
84 |
+
elseif ( $instance['design']['format'] ):
|
85 |
+
echo siteorigin_widget_get_icon( $instance['icons']['standard'], $icon_styles );
|
86 |
+
endif;
|
87 |
+
?>
|
88 |
|
89 |
+
<?php if ($instance['design']['byline-above']) : ?>
|
90 |
|
91 |
+
<?php $byline_above = apply_filters( 'wpinked_byline', $instance['design']['byline-above'] ); ?>
|
92 |
|
93 |
+
<p class="iw-so-article-byline-above <?php echo $instance['styling']['align']; ?>">
|
94 |
|
95 |
+
<?php echo sprintf( $byline_above, get_the_date(), get_the_category_list(', '), '<a href="' . get_author_posts_url( $id ) . '">' . get_the_author() . '</a>', get_comments_number() ); ?>
|
96 |
|
97 |
+
</p>
|
98 |
|
99 |
+
<?php endif; ?>
|
100 |
|
101 |
+
<<?php echo $h; ?> class="iw-so-article-title <?php echo $instance['styling']['align']; ?>"><a href="<?php the_permalink(); ?>"><?php the_title() ?></a></<?php echo $h; ?>>
|
102 |
|
103 |
+
<?php if ($instance['design']['byline-below']) : ?>
|
104 |
|
105 |
+
<?php $byline_below = apply_filters( 'wpinked_byline', $instance['design']['byline-below'] ); ?>
|
106 |
|
107 |
+
<p class="iw-so-article-byline-below <?php echo $instance['styling']['align']; ?>">
|
108 |
|
109 |
+
<?php echo sprintf( $byline_below, get_the_date(), get_the_category_list(', '), '<a href="' . get_author_posts_url( $id ) . '">' . get_the_author() . '</a>', get_comments_number() ); ?>
|
110 |
|
111 |
+
</p>
|
112 |
|
113 |
+
<?php endif; ?>
|
114 |
|
115 |
+
<?php if ( $instance['design']['content'] ): ?>
|
116 |
|
117 |
+
<div class="iw-so-article-full">
|
118 |
+
<?php global $more; $more = 1; the_content(); ?>
|
119 |
+
</div>
|
120 |
|
121 |
+
<?php elseif ( $instance['design']['excerpt'] ): ?>
|
122 |
|
123 |
+
<p class="iw-so-article-excerpt <?php echo $instance['styling']['align']; ?>">
|
124 |
+
<?php if ( $instance['design']['e-link'] ): ?>
|
125 |
+
<a href="<?php the_permalink(); ?>">
|
126 |
+
<?php wpinked_so_post_excerpt( $instance['design']['excerpt-length'], $instance['design']['excerpt-after'] ); ?>
|
127 |
+
</a>
|
128 |
+
<?php else: ?>
|
129 |
<?php wpinked_so_post_excerpt( $instance['design']['excerpt-length'], $instance['design']['excerpt-after'] ); ?>
|
130 |
+
<?php endif; ?>
|
131 |
+
</p>
|
132 |
+
|
133 |
+
<?php endif; ?>
|
|
|
134 |
|
135 |
+
<?php if ($instance['design']['byline-end']) : ?>
|
136 |
|
137 |
+
<?php $byline_end = apply_filters( 'wpinked_byline', $instance['design']['byline-end'] ); ?>
|
138 |
|
139 |
+
<p class="iw-so-article-byline-end <?php echo $instance['styling']['align']; ?>">
|
140 |
|
141 |
+
<?php echo sprintf( $byline_end, get_the_date(), get_the_category_list($instance['design']['cats']), '<a href="' . get_author_posts_url( $id ) . '">' . get_the_author() . '</a>', get_comments_number() ); ?>
|
142 |
|
143 |
+
</p>
|
144 |
|
145 |
+
<?php endif; ?>
|
146 |
|
147 |
+
<?php if ($instance['design']['button']) : ?>
|
148 |
|
149 |
+
<div class="iw-so-article-button">
|
150 |
+
<a class="<?php echo esc_attr(implode(' ', $btn_class)); ?>" href="<?php the_permalink(); ?>">
|
151 |
+
<?php echo $instance['design']['btn-text']; ?>
|
152 |
+
</a>
|
153 |
+
</div>
|
154 |
|
155 |
+
<?php endif; ?>
|
|
|
|
|
|
|
|
|
156 |
|
157 |
+
</div>
|
158 |
|
159 |
</div>
|
160 |
|
161 |
+
</div>
|
162 |
|
163 |
+
</div>
|
164 |
|
165 |
</div>
|
166 |
|
167 |
+
<?php endwhile; wp_reset_postdata(); ?>
|
168 |
+
|
169 |
+
</div>
|
170 |
+
|
171 |
+
<?php if ( $instance['pagination']['activate'] ): ?>
|
172 |
+
|
173 |
+
<ul id='iw-so-blog-pagination' class="iw-so-blog-pagination">
|
174 |
+
<li class="iw-so-blog-previous"><?php echo str_replace ( '<a', '<a class="' . $navi_attributes . '"', get_previous_posts_link( $navi_previous, $query_result->max_num_pages) ) ?></li>
|
175 |
+
<li class="iw-so-blog-next"><?php echo str_replace ( '<a', '<a class="' . $navi_attributes . '"', get_next_posts_link( $navi_next, $query_result->max_num_pages) ) ?></li>
|
176 |
+
</ul>
|
177 |
|
178 |
+
<?php endif; ?>
|
179 |
|
180 |
</div>
|
181 |
|
182 |
+
<?php endif; ?>
|
183 |
+
|
184 |
+
<?php if ( $instance['pagination']['activate'] && $instance['pagination']['type'] == 'ajax' ): ?>
|
185 |
+
|
186 |
+
<script>
|
187 |
+
jQuery(document).ready(function(){
|
188 |
+
// AJAX pagination
|
189 |
+
jQuery(function(jQuery) {
|
190 |
+
jQuery('#<?php echo $unique; ?>').on('click', '#iw-so-blog-pagination a', function(e){
|
191 |
+
e.preventDefault();
|
192 |
+
var link = jQuery(this).attr('href');
|
193 |
+
jQuery('#<?php echo $unique; ?>').fadeOut(500, function(){
|
194 |
+
jQuery(this).load(link + ' #<?php echo $unique; ?>', function() {
|
195 |
+
jQuery(this).fadeIn(500);
|
196 |
+
});
|
197 |
+
});
|
198 |
+
});
|
199 |
+
});
|
200 |
+
});
|
201 |
+
</script>
|
202 |
+
|
203 |
+
<?php endif; ?>
|
widgets/ink-blgs-widget/tpl/thumb-left.php
CHANGED
@@ -8,6 +8,15 @@ $btn_class = array('iw-so-article-btn');
|
|
8 |
if( !empty($instance['styling']['btn-hover']) ) $btn_class[] = 'iw-so-article-btn-hover';
|
9 |
if( !empty($instance['styling']['btn-click']) ) $btn_class[] = 'iw-so-article-btn-click';
|
10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
if( $instance['design']['columns'] == 1 ):
|
12 |
$cols = ' iw-small-12';
|
13 |
elseif( $instance['design']['columns'] == 2 ):
|
@@ -27,13 +36,27 @@ else:
|
|
27 |
endif;
|
28 |
|
29 |
if( !empty($instance['title']) ) echo $args['before_title'] . esc_html($instance['title']) . $args['after_title'];
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
?>
|
31 |
|
32 |
<?php
|
33 |
// Setting up posts query
|
|
|
|
|
|
|
34 |
|
35 |
$post_selector_pseudo_query = $instance['posts'];
|
36 |
$processed_query = siteorigin_widget_post_selector_process_query( $post_selector_pseudo_query );
|
|
|
|
|
|
|
|
|
|
|
37 |
$query_result = new WP_Query( $processed_query );
|
38 |
?>
|
39 |
|
@@ -43,110 +66,145 @@ $query_result = new WP_Query( $processed_query );
|
|
43 |
|
44 |
if($query_result->have_posts()) : ?>
|
45 |
|
46 |
-
<div
|
47 |
|
48 |
-
|
49 |
|
50 |
-
|
51 |
|
52 |
-
<div class="iw-
|
53 |
|
54 |
-
<div class="iw-
|
55 |
|
56 |
-
<div class="iw-
|
57 |
|
58 |
-
<
|
59 |
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
|
|
|
|
|
|
67 |
|
68 |
-
|
69 |
|
70 |
-
|
71 |
|
72 |
-
|
73 |
|
74 |
-
|
75 |
|
76 |
-
|
77 |
|
78 |
-
|
79 |
|
80 |
-
|
81 |
|
82 |
-
|
83 |
|
84 |
-
|
85 |
|
86 |
-
|
87 |
|
88 |
-
|
89 |
|
90 |
-
|
91 |
|
92 |
-
|
93 |
|
94 |
-
|
95 |
|
96 |
-
|
97 |
|
98 |
-
|
99 |
|
100 |
-
|
101 |
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
|
106 |
-
|
107 |
|
108 |
-
|
109 |
-
|
110 |
-
|
|
|
|
|
|
|
111 |
<?php wpinked_so_post_excerpt( $instance['design']['excerpt-length'], $instance['design']['excerpt-after'] ); ?>
|
112 |
-
|
113 |
-
|
114 |
-
<?php wpinked_so_post_excerpt( $instance['design']['excerpt-length'], $instance['design']['excerpt-after'] ); ?>
|
115 |
-
<?php endif; ?>
|
116 |
-
</p>
|
117 |
|
118 |
-
|
119 |
|
120 |
-
|
121 |
|
122 |
-
|
123 |
|
124 |
-
|
125 |
|
126 |
-
|
127 |
|
128 |
-
|
129 |
|
130 |
-
|
131 |
|
132 |
-
|
133 |
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
|
|
|
|
139 |
|
140 |
-
|
141 |
|
142 |
</div>
|
143 |
|
144 |
</div>
|
145 |
|
146 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
147 |
|
148 |
-
<?php
|
149 |
|
150 |
</div>
|
151 |
|
152 |
-
<?php endif; ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
if( !empty($instance['styling']['btn-hover']) ) $btn_class[] = 'iw-so-article-btn-hover';
|
9 |
if( !empty($instance['styling']['btn-click']) ) $btn_class[] = 'iw-so-article-btn-click';
|
10 |
|
11 |
+
$navi_class = array('iw-so-navi-btn');
|
12 |
+
if( !empty($instance['pagination']['btn-hover']) ) $navi_class[] = 'iw-so-navi-btn-hover';
|
13 |
+
if( !empty($instance['pagination']['btn-click']) ) $navi_class[] = 'iw-so-navi-btn-click';
|
14 |
+
|
15 |
+
$navi_attributes = esc_attr(implode(' ', $navi_class));
|
16 |
+
|
17 |
+
$navi_previous = siteorigin_widget_get_icon( $instance['pagination']['newer-icon'] ) . ' ' . $instance['pagination']['newer-text'];
|
18 |
+
$navi_next = $instance['pagination']['older-text'] . ' ' . siteorigin_widget_get_icon( $instance['pagination']['older-icon'] );
|
19 |
+
|
20 |
if( $instance['design']['columns'] == 1 ):
|
21 |
$cols = ' iw-small-12';
|
22 |
elseif( $instance['design']['columns'] == 2 ):
|
36 |
endif;
|
37 |
|
38 |
if( !empty($instance['title']) ) echo $args['before_title'] . esc_html($instance['title']) . $args['after_title'];
|
39 |
+
|
40 |
+
$h = $instance['design']['title-tag'];
|
41 |
+
|
42 |
+
$unique = $instance['_sow_form_id'];
|
43 |
+
|
44 |
+
$count = 1;
|
45 |
?>
|
46 |
|
47 |
<?php
|
48 |
// Setting up posts query
|
49 |
+
global $paged, $query_result;
|
50 |
+
|
51 |
+
$paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1;
|
52 |
|
53 |
$post_selector_pseudo_query = $instance['posts'];
|
54 |
$processed_query = siteorigin_widget_post_selector_process_query( $post_selector_pseudo_query );
|
55 |
+
|
56 |
+
if ( $instance['pagination']['activate'] ):
|
57 |
+
$processed_query['paged'] = $paged;
|
58 |
+
endif;
|
59 |
+
|
60 |
$query_result = new WP_Query( $processed_query );
|
61 |
?>
|
62 |
|
66 |
|
67 |
if($query_result->have_posts()) : ?>
|
68 |
|
69 |
+
<div id="<? echo $unique; ?>">
|
70 |
|
71 |
+
<div class="iw-row" data-equalizer>
|
72 |
|
73 |
+
<?php while($query_result->have_posts()) : $query_result->the_post(); ?>
|
74 |
|
75 |
+
<div class="iw-so-article<?php echo $cols; ?> iw-cols <?php wpinked_so_blog_post_col( $count, $instance['design']['columns'] ); ?>" data-equalizer-watch>
|
76 |
|
77 |
+
<div class="iw-row iw-so-thumb-left">
|
78 |
|
79 |
+
<div class="iw-left iw-cols<?php echo $img_col_class; ?>">
|
80 |
|
81 |
+
<div class="iw-so-article-thumb">
|
82 |
|
83 |
+
<a href="<?php the_permalink(); ?>">
|
84 |
+
<center><?php the_post_thumbnail($instance['design']['img-size']); ?></center>
|
85 |
+
<?php
|
86 |
+
if ( get_post_format() && $instance['design']['format'] ):
|
87 |
+
echo siteorigin_widget_get_icon( $instance['icons'][get_post_format()], $icon_styles );
|
88 |
+
elseif ( $instance['design']['format'] ):
|
89 |
+
echo siteorigin_widget_get_icon( $instance['icons']['standard'], $icon_styles );
|
90 |
+
endif;
|
91 |
+
?>
|
92 |
+
</a>
|
93 |
|
94 |
+
</div>
|
95 |
|
96 |
+
</div>
|
97 |
|
98 |
+
<div class="iw-right iw-cols<?php echo $ctnt_col_class; ?>">
|
99 |
|
100 |
+
<?php if ($instance['design']['byline-above']) : ?>
|
101 |
|
102 |
+
<?php $byline_above = apply_filters( 'wpinked_byline', $instance['design']['byline-above'] ); ?>
|
103 |
|
104 |
+
<p class="iw-so-article-byline-above <?php echo $instance['styling']['align']; ?>">
|
105 |
|
106 |
+
<?php echo sprintf( $byline_above, get_the_date(), get_the_category_list($instance['design']['cats']), '<a href="' . get_author_posts_url( $id ) . '">' . get_the_author() . '</a>', get_comments_number() ); ?>
|
107 |
|
108 |
+
</p>
|
109 |
|
110 |
+
<?php endif; ?>
|
111 |
|
112 |
+
<<?php echo $h; ?> class="iw-so-article-title <?php echo $instance['styling']['align']; ?>"><a href="<?php the_permalink(); ?>"><?php the_title() ?></a></<?php echo $h; ?>>
|
113 |
|
114 |
+
<?php if ($instance['design']['byline-below']) : ?>
|
115 |
|
116 |
+
<?php $byline_below = apply_filters( 'wpinked_byline', $instance['design']['byline-below'] ); ?>
|
117 |
|
118 |
+
<p class="iw-so-article-byline-below <?php echo $instance['styling']['align']; ?>">
|
119 |
|
120 |
+
<?php echo sprintf( $byline_below, get_the_date(), get_the_category_list($instance['design']['cats']), '<a href="' . get_author_posts_url( $id ) . '">' . get_the_author() . '</a>', get_comments_number() ); ?>
|
121 |
|
122 |
+
</p>
|
123 |
|
124 |
+
<?php endif; ?>
|
125 |
|
126 |
+
<?php if ( $instance['design']['content'] ): ?>
|
127 |
|
128 |
+
<div class="iw-so-article-full">
|
129 |
+
<?php global $more; $more = 1; the_content(); ?>
|
130 |
+
</div>
|
131 |
|
132 |
+
<?php elseif ( $instance['design']['excerpt'] ): ?>
|
133 |
|
134 |
+
<p class="iw-so-article-excerpt <?php echo $instance['styling']['align']; ?>">
|
135 |
+
<?php if ( $instance['design']['e-link'] ): ?>
|
136 |
+
<a href="<?php the_permalink(); ?>">
|
137 |
+
<?php wpinked_so_post_excerpt( $instance['design']['excerpt-length'], $instance['design']['excerpt-after'] ); ?>
|
138 |
+
</a>
|
139 |
+
<?php else: ?>
|
140 |
<?php wpinked_so_post_excerpt( $instance['design']['excerpt-length'], $instance['design']['excerpt-after'] ); ?>
|
141 |
+
<?php endif; ?>
|
142 |
+
</p>
|
|
|
|
|
|
|
143 |
|
144 |
+
<?php endif; ?>
|
145 |
|
146 |
+
<?php if ($instance['design']['byline-end']) : ?>
|
147 |
|
148 |
+
<?php $byline_end = apply_filters( 'wpinked_byline', $instance['design']['byline-end'] ); ?>
|
149 |
|
150 |
+
<p class="iw-so-article-byline-end <?php echo $instance['styling']['align']; ?>">
|
151 |
|
152 |
+
<?php echo sprintf( $byline_end, get_the_date(), get_the_category_list($instance['design']['cats']), '<a href="' . get_author_posts_url( $id ) . '">' . get_the_author() . '</a>', get_comments_number() ); ?>
|
153 |
|
154 |
+
</p>
|
155 |
|
156 |
+
<?php endif; ?>
|
157 |
|
158 |
+
<?php if ($instance['design']['button']) : ?>
|
159 |
|
160 |
+
<div class="iw-so-article-button">
|
161 |
+
<a class="<?php echo esc_attr(implode(' ', $btn_class)); ?>" href="<?php the_permalink(); ?>">
|
162 |
+
<?php echo $instance['design']['btn-text']; ?>
|
163 |
+
</a>
|
164 |
+
</div>
|
165 |
+
|
166 |
+
<?php endif; ?>
|
167 |
|
168 |
+
</div>
|
169 |
|
170 |
</div>
|
171 |
|
172 |
</div>
|
173 |
|
174 |
+
<?php endwhile; wp_reset_postdata(); ?>
|
175 |
+
|
176 |
+
</div>
|
177 |
+
|
178 |
+
<?php if ( $instance['pagination']['activate'] ): ?>
|
179 |
+
|
180 |
+
<ul id='iw-so-blog-pagination' class="iw-so-blog-pagination">
|
181 |
+
<li class="iw-so-blog-previous"><?php echo str_replace ( '<a', '<a class="' . $navi_attributes . '"', get_previous_posts_link( $navi_previous, $query_result->max_num_pages) ) ?></li>
|
182 |
+
<li class="iw-so-blog-next"><?php echo str_replace ( '<a', '<a class="' . $navi_attributes . '"', get_next_posts_link( $navi_next, $query_result->max_num_pages) ) ?></li>
|
183 |
+
</ul>
|
184 |
|
185 |
+
<?php endif; ?>
|
186 |
|
187 |
</div>
|
188 |
|
189 |
+
<?php endif; ?>
|
190 |
+
|
191 |
+
<?php if ( $instance['pagination']['activate'] && $instance['pagination']['type'] == 'ajax' ): ?>
|
192 |
+
|
193 |
+
<script>
|
194 |
+
jQuery(document).ready(function(){
|
195 |
+
// AJAX pagination
|
196 |
+
jQuery(function(jQuery) {
|
197 |
+
jQuery('#<?php echo $unique; ?>').on('click', '#iw-so-blog-pagination a', function(e){
|
198 |
+
e.preventDefault();
|
199 |
+
var link = jQuery(this).attr('href');
|
200 |
+
jQuery('#<?php echo $unique; ?>').fadeOut(500, function(){
|
201 |
+
jQuery(this).load(link + ' #<?php echo $unique; ?>', function() {
|
202 |
+
jQuery(this).fadeIn(500);
|
203 |
+
});
|
204 |
+
});
|
205 |
+
});
|
206 |
+
});
|
207 |
+
});
|
208 |
+
</script>
|
209 |
+
|
210 |
+
<?php endif; ?>
|
widgets/ink-blgs-widget/tpl/thumb-none.php
CHANGED
@@ -8,6 +8,15 @@ $btn_class = array('iw-so-article-btn');
|
|
8 |
if( !empty($instance['styling']['btn-hover']) ) $btn_class[] = 'iw-so-article-btn-hover';
|
9 |
if( !empty($instance['styling']['btn-click']) ) $btn_class[] = 'iw-so-article-btn-click';
|
10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
if( $instance['design']['columns'] == 1 ):
|
12 |
$cols = ' iw-small-12';
|
13 |
elseif( $instance['design']['columns'] == 2 ):
|
@@ -19,14 +28,34 @@ elseif( $instance['design']['columns'] == 4 ):
|
|
19 |
endif;
|
20 |
|
21 |
if( !empty($instance['title']) ) echo $args['before_title'] . esc_html($instance['title']) . $args['after_title'];
|
|
|
|
|
|
|
|
|
22 |
?>
|
23 |
|
24 |
<?php
|
25 |
// Setting up posts query
|
|
|
|
|
|
|
|
|
|
|
26 |
|
27 |
$post_selector_pseudo_query = $instance['posts'];
|
28 |
$processed_query = siteorigin_widget_post_selector_process_query( $post_selector_pseudo_query );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
$query_result = new WP_Query( $processed_query );
|
|
|
|
|
30 |
?>
|
31 |
|
32 |
<?php
|
@@ -35,100 +64,136 @@ $query_result = new WP_Query( $processed_query );
|
|
35 |
|
36 |
if($query_result->have_posts()) : ?>
|
37 |
|
38 |
-
<div
|
|
|
|
|
39 |
|
40 |
-
|
41 |
|
42 |
-
|
43 |
|
44 |
-
|
45 |
|
46 |
-
|
47 |
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
|
56 |
-
|
57 |
|
58 |
-
|
59 |
|
60 |
-
|
61 |
|
62 |
-
|
63 |
|
64 |
-
|
65 |
|
66 |
-
|
67 |
|
68 |
-
|
69 |
|
70 |
-
|
71 |
|
72 |
-
|
73 |
|
74 |
-
|
75 |
|
76 |
-
|
77 |
|
78 |
-
|
79 |
|
80 |
-
|
81 |
|
82 |
-
|
83 |
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
|
88 |
-
|
89 |
|
90 |
-
|
91 |
-
|
92 |
-
|
|
|
|
|
|
|
93 |
<?php wpinked_so_post_excerpt( $instance['design']['excerpt-length'], $instance['design']['excerpt-after'] ); ?>
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
</p>
|
99 |
|
100 |
-
|
101 |
|
102 |
-
|
103 |
|
104 |
-
|
105 |
|
106 |
-
|
107 |
|
108 |
-
|
109 |
|
110 |
-
|
111 |
|
112 |
-
|
113 |
|
114 |
-
|
|
|
|
|
|
|
|
|
115 |
|
116 |
-
|
117 |
-
<a class="<?php echo esc_attr(implode(' ', $btn_class)); ?>" href="<?php the_permalink(); ?>">
|
118 |
-
<?php echo $instance['design']['btn-text']; ?>
|
119 |
-
</a>
|
120 |
-
</div>
|
121 |
|
122 |
-
|
123 |
|
124 |
</div>
|
125 |
|
126 |
</div>
|
127 |
|
128 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
129 |
|
130 |
-
<?php
|
131 |
|
132 |
</div>
|
133 |
|
134 |
-
<?php endif; ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
if( !empty($instance['styling']['btn-hover']) ) $btn_class[] = 'iw-so-article-btn-hover';
|
9 |
if( !empty($instance['styling']['btn-click']) ) $btn_class[] = 'iw-so-article-btn-click';
|
10 |
|
11 |
+
$navi_class = array('iw-so-navi-btn');
|
12 |
+
if( !empty($instance['pagination']['btn-hover']) ) $navi_class[] = 'iw-so-navi-btn-hover';
|
13 |
+
if( !empty($instance['pagination']['btn-click']) ) $navi_class[] = 'iw-so-navi-btn-click';
|
14 |
+
|
15 |
+
$navi_attributes = esc_attr(implode(' ', $navi_class));
|
16 |
+
|
17 |
+
$navi_previous = siteorigin_widget_get_icon( $instance['pagination']['newer-icon'] ) . ' ' . $instance['pagination']['newer-text'];
|
18 |
+
$navi_next = $instance['pagination']['older-text'] . ' ' . siteorigin_widget_get_icon( $instance['pagination']['older-icon'] );
|
19 |
+
|
20 |
if( $instance['design']['columns'] == 1 ):
|
21 |
$cols = ' iw-small-12';
|
22 |
elseif( $instance['design']['columns'] == 2 ):
|
28 |
endif;
|
29 |
|
30 |
if( !empty($instance['title']) ) echo $args['before_title'] . esc_html($instance['title']) . $args['after_title'];
|
31 |
+
|
32 |
+
$h = $instance['design']['title-tag'];
|
33 |
+
|
34 |
+
$unique = $instance['_sow_form_id'];
|
35 |
?>
|
36 |
|
37 |
<?php
|
38 |
// Setting up posts query
|
39 |
+
global $paged, $query_result;
|
40 |
+
|
41 |
+
$this_post = get_the_ID();
|
42 |
+
|
43 |
+
$paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1;
|
44 |
|
45 |
$post_selector_pseudo_query = $instance['posts'];
|
46 |
$processed_query = siteorigin_widget_post_selector_process_query( $post_selector_pseudo_query );
|
47 |
+
|
48 |
+
if ( $instance['pagination']['activate'] ):
|
49 |
+
$processed_query['paged'] = $paged;
|
50 |
+
endif;
|
51 |
+
|
52 |
+
if( $instance['current'] ):
|
53 |
+
$processed_query['post__not_in'] = array($this_post);
|
54 |
+
endif;
|
55 |
+
|
56 |
$query_result = new WP_Query( $processed_query );
|
57 |
+
|
58 |
+
$count = 1;
|
59 |
?>
|
60 |
|
61 |
<?php
|
64 |
|
65 |
if($query_result->have_posts()) : ?>
|
66 |
|
67 |
+
<div id="<? echo $unique; ?>">
|
68 |
+
|
69 |
+
<div class="iw-row" data-equalizer>
|
70 |
|
71 |
+
<?php while($query_result->have_posts()) : $query_result->the_post(); ?>
|
72 |
|
73 |
+
<div class="iw-so-article<?php echo $cols; ?> iw-cols <?php wpinked_so_blog_post_col( $count, $instance['design']['columns'] ); ?>" data-equalizer-watch>
|
74 |
|
75 |
+
<div class="iw-row iw-so-thumb-none">
|
76 |
|
77 |
+
<div class="iw-small-12 iw-cols iw-so-article-content">
|
78 |
|
79 |
+
<?php
|
80 |
+
if ( get_post_format() && $instance['design']['format'] ):
|
81 |
+
echo siteorigin_widget_get_icon( $instance['icons'][get_post_format()], $icon_styles );
|
82 |
+
elseif ( $instance['design']['format'] ):
|
83 |
+
echo siteorigin_widget_get_icon( $instance['icons']['standard'], $icon_styles );
|
84 |
+
endif;
|
85 |
+
?>
|
86 |
|
87 |
+
<?php if ($instance['design']['byline-above']) : ?>
|
88 |
|
89 |
+
<?php $byline_above = apply_filters( 'wpinked_byline', $instance['design']['byline-above'] ); ?>
|
90 |
|
91 |
+
<p class="iw-so-article-byline-above <?php echo $instance['styling']['align']; ?>">
|
92 |
|
93 |
+
<?php echo sprintf( $byline_above, get_the_date(), get_the_category_list($instance['design']['cats']), '<a href="' . get_author_posts_url( $id ) . '">' . get_the_author() . '</a>', get_comments_number() ); ?>
|
94 |
|
95 |
+
</p>
|
96 |
|
97 |
+
<?php endif; ?>
|
98 |
|
99 |
+
<<?php echo $h; ?> class="iw-so-article-title <?php echo $instance['styling']['align']; ?>"><a href="<?php the_permalink(); ?>"><?php the_title() ?></a></<?php echo $h; ?>>
|
100 |
|
101 |
+
<?php if ($instance['design']['byline-below']) : ?>
|
102 |
|
103 |
+
<?php $byline_below = apply_filters( 'wpinked_byline', $instance['design']['byline-below'] ); ?>
|
104 |
|
105 |
+
<p class="iw-so-article-byline-below <?php echo $instance['styling']['align']; ?>">
|
106 |
|
107 |
+
<?php echo sprintf( $byline_below, get_the_date(), get_the_category_list($instance['design']['cats']), '<a href="' . get_author_posts_url( $id ) . '">' . get_the_author() . '</a>', get_comments_number() ); ?>
|
108 |
|
109 |
+
</p>
|
110 |
|
111 |
+
<?php endif; ?>
|
112 |
|
113 |
+
<?php if ( $instance['design']['content'] ): ?>
|
114 |
|
115 |
+
<div class="iw-so-article-full">
|
116 |
+
<?php global $more; $more = 1; the_content(); ?>
|
117 |
+
</div>
|
118 |
|
119 |
+
<?php elseif ( $instance['design']['excerpt'] ): ?>
|
120 |
|
121 |
+
<p class="iw-so-article-excerpt <?php echo $instance['styling']['align']; ?>">
|
122 |
+
<?php if ( $instance['design']['e-link'] ): ?>
|
123 |
+
<a href="<?php the_permalink(); ?>">
|
124 |
+
<?php wpinked_so_post_excerpt( $instance['design']['excerpt-length'], $instance['design']['excerpt-after'] ); ?>
|
125 |
+
</a>
|
126 |
+
<?php else: ?>
|
127 |
<?php wpinked_so_post_excerpt( $instance['design']['excerpt-length'], $instance['design']['excerpt-after'] ); ?>
|
128 |
+
<?php endif; ?>
|
129 |
+
</p>
|
130 |
+
|
131 |
+
<?php endif; ?>
|
|
|
132 |
|
133 |
+
<?php if ($instance['design']['byline-end']) : ?>
|
134 |
|
135 |
+
<?php $byline_end = apply_filters( 'wpinked_byline', $instance['design']['byline-end'] ); ?>
|
136 |
|
137 |
+
<p class="iw-so-article-byline-end <?php echo $instance['styling']['align']; ?>">
|
138 |
|
139 |
+
<?php echo sprintf( $byline_end, get_the_date(), get_the_category_list($instance['design']['cats']), '<a href="' . get_author_posts_url( $id ) . '">' . get_the_author() . '</a>', get_comments_number() ); ?>
|
140 |
|
141 |
+
</p>
|
142 |
|
143 |
+
<?php endif; ?>
|
144 |
|
145 |
+
<?php if ($instance['design']['button']) : ?>
|
146 |
|
147 |
+
<div class="iw-so-article-button">
|
148 |
+
<a class="<?php echo esc_attr(implode(' ', $btn_class)); ?>" href="<?php the_permalink(); ?>">
|
149 |
+
<?php echo $instance['design']['btn-text']; ?>
|
150 |
+
</a>
|
151 |
+
</div>
|
152 |
|
153 |
+
<?php endif; ?>
|
|
|
|
|
|
|
|
|
154 |
|
155 |
+
</div>
|
156 |
|
157 |
</div>
|
158 |
|
159 |
</div>
|
160 |
|
161 |
+
<?php $count++; ?>
|
162 |
+
|
163 |
+
<?php endwhile; wp_reset_postdata(); ?>
|
164 |
+
|
165 |
+
</div>
|
166 |
+
|
167 |
+
<?php if ( $instance['pagination']['activate'] ): ?>
|
168 |
+
|
169 |
+
<ul id='iw-so-blog-pagination' class="iw-so-blog-pagination">
|
170 |
+
<li class="iw-so-blog-previous"><?php echo str_replace ( '<a', '<a class="' . $navi_attributes . '"', get_previous_posts_link( $navi_previous, $query_result->max_num_pages) ) ?></li>
|
171 |
+
<li class="iw-so-blog-next"><?php echo str_replace ( '<a', '<a class="' . $navi_attributes . '"', get_next_posts_link( $navi_next, $query_result->max_num_pages) ) ?></li>
|
172 |
+
</ul>
|
173 |
|
174 |
+
<?php endif; ?>
|
175 |
|
176 |
</div>
|
177 |
|
178 |
+
<?php endif; ?>
|
179 |
+
|
180 |
+
<?php if ( $instance['pagination']['activate'] && $instance['pagination']['type'] == 'ajax' ): ?>
|
181 |
+
|
182 |
+
<script>
|
183 |
+
jQuery(document).ready(function(){
|
184 |
+
// AJAX pagination
|
185 |
+
jQuery(function(jQuery) {
|
186 |
+
jQuery('#<?php echo $unique; ?>').on('click', '#iw-so-blog-pagination a', function(e){
|
187 |
+
e.preventDefault();
|
188 |
+
var link = jQuery(this).attr('href');
|
189 |
+
jQuery('#<?php echo $unique; ?>').fadeOut(500, function(){
|
190 |
+
jQuery(this).load(link + ' #<?php echo $unique; ?>', function() {
|
191 |
+
jQuery(this).fadeIn(500);
|
192 |
+
});
|
193 |
+
});
|
194 |
+
});
|
195 |
+
});
|
196 |
+
});
|
197 |
+
</script>
|
198 |
+
|
199 |
+
<?php endif; ?>
|
widgets/ink-blgs-widget/tpl/thumb-right.php
CHANGED
@@ -8,6 +8,15 @@ $btn_class = array('iw-so-article-btn');
|
|
8 |
if( !empty($instance['styling']['btn-hover']) ) $btn_class[] = 'iw-so-article-btn-hover';
|
9 |
if( !empty($instance['styling']['btn-click']) ) $btn_class[] = 'iw-so-article-btn-click';
|
10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
if( $instance['design']['columns'] == 1 ):
|
12 |
$cols = ' iw-small-12';
|
13 |
elseif( $instance['design']['columns'] == 2 ):
|
@@ -27,13 +36,27 @@ else:
|
|
27 |
endif;
|
28 |
|
29 |
if( !empty($instance['title']) ) echo $args['before_title'] . esc_html($instance['title']) . $args['after_title'];
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
?>
|
31 |
|
32 |
<?php
|
33 |
// Setting up posts query
|
|
|
|
|
|
|
34 |
|
35 |
$post_selector_pseudo_query = $instance['posts'];
|
36 |
$processed_query = siteorigin_widget_post_selector_process_query( $post_selector_pseudo_query );
|
|
|
|
|
|
|
|
|
|
|
37 |
$query_result = new WP_Query( $processed_query );
|
38 |
?>
|
39 |
|
@@ -43,110 +66,145 @@ $query_result = new WP_Query( $processed_query );
|
|
43 |
|
44 |
if($query_result->have_posts()) : ?>
|
45 |
|
46 |
-
<div
|
47 |
|
48 |
-
|
49 |
|
50 |
-
|
51 |
|
52 |
-
<div class="iw-
|
53 |
|
54 |
-
<div class="iw-
|
55 |
|
56 |
-
<div class="iw-
|
57 |
|
58 |
-
<
|
59 |
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
|
|
|
|
|
|
67 |
|
68 |
-
|
69 |
|
70 |
-
|
71 |
|
72 |
-
|
73 |
|
74 |
-
|
75 |
|
76 |
-
|
77 |
|
78 |
-
|
79 |
|
80 |
-
|
81 |
|
82 |
-
|
83 |
|
84 |
-
|
85 |
|
86 |
-
|
87 |
|
88 |
-
|
89 |
|
90 |
-
|
91 |
|
92 |
-
|
93 |
|
94 |
-
|
95 |
|
96 |
-
|
97 |
|
98 |
-
|
99 |
|
100 |
-
|
101 |
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
|
106 |
-
|
107 |
|
108 |
-
|
109 |
-
|
110 |
-
|
|
|
|
|
|
|
111 |
<?php wpinked_so_post_excerpt( $instance['design']['excerpt-length'], $instance['design']['excerpt-after'] ); ?>
|
112 |
-
|
113 |
-
|
114 |
-
<?php wpinked_so_post_excerpt( $instance['design']['excerpt-length'], $instance['design']['excerpt-after'] ); ?>
|
115 |
-
<?php endif; ?>
|
116 |
-
</p>
|
117 |
|
118 |
-
|
119 |
|
120 |
-
|
121 |
|
122 |
-
|
123 |
|
124 |
-
|
125 |
|
126 |
-
|
127 |
|
128 |
-
|
129 |
|
130 |
-
|
131 |
|
132 |
-
|
133 |
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
|
|
|
|
139 |
|
140 |
-
|
141 |
|
142 |
</div>
|
143 |
|
144 |
</div>
|
145 |
|
146 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
147 |
|
148 |
-
<?php
|
149 |
|
150 |
</div>
|
151 |
|
152 |
-
<?php endif; ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
if( !empty($instance['styling']['btn-hover']) ) $btn_class[] = 'iw-so-article-btn-hover';
|
9 |
if( !empty($instance['styling']['btn-click']) ) $btn_class[] = 'iw-so-article-btn-click';
|
10 |
|
11 |
+
$navi_class = array('iw-so-navi-btn');
|
12 |
+
if( !empty($instance['pagination']['btn-hover']) ) $navi_class[] = 'iw-so-navi-btn-hover';
|
13 |
+
if( !empty($instance['pagination']['btn-click']) ) $navi_class[] = 'iw-so-navi-btn-click';
|
14 |
+
|
15 |
+
$navi_attributes = esc_attr(implode(' ', $navi_class));
|
16 |
+
|
17 |
+
$navi_previous = siteorigin_widget_get_icon( $instance['pagination']['newer-icon'] ) . ' ' . $instance['pagination']['newer-text'];
|
18 |
+
$navi_next = $instance['pagination']['older-text'] . ' ' . siteorigin_widget_get_icon( $instance['pagination']['older-icon'] );
|
19 |
+
|
20 |
if( $instance['design']['columns'] == 1 ):
|
21 |
$cols = ' iw-small-12';
|
22 |
elseif( $instance['design']['columns'] == 2 ):
|
36 |
endif;
|
37 |
|
38 |
if( !empty($instance['title']) ) echo $args['before_title'] . esc_html($instance['title']) . $args['after_title'];
|
39 |
+
|
40 |
+
$h = $instance['design']['title-tag'];
|
41 |
+
|
42 |
+
$unique = $instance['_sow_form_id'];
|
43 |
+
|
44 |
+
$count = 1;
|
45 |
?>
|
46 |
|
47 |
<?php
|
48 |
// Setting up posts query
|
49 |
+
global $paged, $query_result;
|
50 |
+
|
51 |
+
$paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1;
|
52 |
|
53 |
$post_selector_pseudo_query = $instance['posts'];
|
54 |
$processed_query = siteorigin_widget_post_selector_process_query( $post_selector_pseudo_query );
|
55 |
+
|
56 |
+
if ( $instance['pagination']['activate'] ):
|
57 |
+
$processed_query['paged'] = $paged;
|
58 |
+
endif;
|
59 |
+
|
60 |
$query_result = new WP_Query( $processed_query );
|
61 |
?>
|
62 |
|
66 |
|
67 |
if($query_result->have_posts()) : ?>
|
68 |
|
69 |
+
<div id="<? echo $unique; ?>">
|
70 |
|
71 |
+
<div class="iw-row" data-equalizer>
|
72 |
|
73 |
+
<?php while($query_result->have_posts()) : $query_result->the_post(); ?>
|
74 |
|
75 |
+
<div class="iw-so-article<?php echo $cols; ?> iw-cols <?php wpinked_so_blog_post_col( $count, $instance['design']['columns'] ); ?>" data-equalizer-watch>
|
76 |
|
77 |
+
<div class="iw-row iw-so-thumb-right">
|
78 |
|
79 |
+
<div class="iw-right iw-cols<?php echo $img_col_class; ?>">
|
80 |
|
81 |
+
<div class="iw-so-article-thumb">
|
82 |
|
83 |
+
<a href="<?php the_permalink(); ?>">
|
84 |
+
<center><?php the_post_thumbnail($instance['design']['img-size']); ?></center>
|
85 |
+
<?php
|
86 |
+
if ( get_post_format() && $instance['design']['format'] ):
|
87 |
+
echo siteorigin_widget_get_icon( $instance['icons'][get_post_format()], $icon_styles );
|
88 |
+
elseif ( $instance['design']['format'] ):
|
89 |
+
echo siteorigin_widget_get_icon( $instance['icons']['standard'], $icon_styles );
|
90 |
+
endif;
|
91 |
+
?>
|
92 |
+
</a>
|
93 |
|
94 |
+
</div>
|
95 |
|
96 |
+
</div>
|
97 |
|
98 |
+
<div class="iw-left iw-cols<?php echo $ctnt_col_class; ?>">
|
99 |
|
100 |
+
<?php if ($instance['design']['byline-above']) : ?>
|
101 |
|
102 |
+
<?php $byline_above = apply_filters( 'wpinked_byline', $instance['design']['byline-above'] ); ?>
|
103 |
|
104 |
+
<p class="iw-so-article-byline-above <?php echo $instance['styling']['align']; ?>">
|
105 |
|
106 |
+
<?php echo sprintf( $byline_above, get_the_date(), get_the_category_list($instance['design']['cats']), '<a href="' . get_author_posts_url( $id ) . '">' . get_the_author() . '</a>', get_comments_number() ); ?>
|
107 |
|
108 |
+
</p>
|
109 |
|
110 |
+
<?php endif; ?>
|
111 |
|
112 |
+
<<?php echo $h; ?> class="iw-so-article-title <?php echo $instance['styling']['align']; ?>"><a href="<?php the_permalink(); ?>"><?php the_title() ?></a></<?php echo $h; ?>>
|
113 |
|
114 |
+
<?php if ($instance['design']['byline-below']) : ?>
|
115 |
|
116 |
+
<?php $byline_below = apply_filters( 'wpinked_byline', $instance['design']['byline-below'] ); ?>
|
117 |
|
118 |
+
<p class="iw-so-article-byline-below <?php echo $instance['styling']['align']; ?>">
|
119 |
|
120 |
+
<?php echo sprintf( $byline_below, get_the_date(), get_the_category_list($instance['design']['cats']), '<a href="' . get_author_posts_url( $id ) . '">' . get_the_author() . '</a>', get_comments_number() ); ?>
|
121 |
|
122 |
+
</p>
|
123 |
|
124 |
+
<?php endif; ?>
|
125 |
|
126 |
+
<?php if ( $instance['design']['content'] ): ?>
|
127 |
|
128 |
+
<div class="iw-so-article-full">
|
129 |
+
<?php global $more; $more = 1; the_content(); ?>
|
130 |
+
</div>
|
131 |
|
132 |
+
<?php elseif ( $instance['design']['excerpt'] ): ?>
|
133 |
|
134 |
+
<p class="iw-so-article-excerpt <?php echo $instance['styling']['align']; ?>">
|
135 |
+
<?php if ( $instance['design']['e-link'] ): ?>
|
136 |
+
<a href="<?php the_permalink(); ?>">
|
137 |
+
<?php wpinked_so_post_excerpt( $instance['design']['excerpt-length'], $instance['design']['excerpt-after'] ); ?>
|
138 |
+
</a>
|
139 |
+
<?php else: ?>
|
140 |
<?php wpinked_so_post_excerpt( $instance['design']['excerpt-length'], $instance['design']['excerpt-after'] ); ?>
|
141 |
+
<?php endif; ?>
|
142 |
+
</p>
|
|
|
|
|
|
|
143 |
|
144 |
+
<?php endif; ?>
|
145 |
|
146 |
+
<?php if ($instance['design']['byline-end']) : ?>
|
147 |
|
148 |
+
<?php $byline_end = apply_filters( 'wpinked_byline', $instance['design']['byline-end'] ); ?>
|
149 |
|
150 |
+
<p class="iw-so-article-byline-end <?php echo $instance['styling']['align']; ?>">
|
151 |
|
152 |
+
<?php echo sprintf( $byline_end, get_the_date(), get_the_category_list($instance['design']['cats']), '<a href="' . get_author_posts_url( $id ) . '">' . get_the_author() . '</a>', get_comments_number() ); ?>
|
153 |
|
154 |
+
</p>
|
155 |
|
156 |
+
<?php endif; ?>
|
157 |
|
158 |
+
<?php if ($instance['design']['button']) : ?>
|
159 |
|
160 |
+
<div class="iw-so-article-button">
|
161 |
+
<a class="<?php echo esc_attr(implode(' ', $btn_class)); ?>" href="<?php the_permalink(); ?>">
|
162 |
+
<?php echo $instance['design']['btn-text']; ?>
|
163 |
+
</a>
|
164 |
+
</div>
|
165 |
+
|
166 |
+
<?php endif; ?>
|
167 |
|
168 |
+
</div>
|
169 |
|
170 |
</div>
|
171 |
|
172 |
</div>
|
173 |
|
174 |
+
<?php endwhile; wp_reset_postdata(); ?>
|
175 |
+
|
176 |
+
</div>
|
177 |
+
|
178 |
+
<?php if ( $instance['pagination']['activate'] ): ?>
|
179 |
+
|
180 |
+
<ul id='iw-so-blog-pagination' class="iw-so-blog-pagination">
|
181 |
+
<li class="iw-so-blog-previous"><?php echo str_replace ( '<a', '<a class="' . $navi_attributes . '"', get_previous_posts_link( $navi_previous, $query_result->max_num_pages) ) ?></li>
|
182 |
+
<li class="iw-so-blog-next"><?php echo str_replace ( '<a', '<a class="' . $navi_attributes . '"', get_next_posts_link( $navi_next, $query_result->max_num_pages) ) ?></li>
|
183 |
+
</ul>
|
184 |
|
185 |
+
<?php endif; ?>
|
186 |
|
187 |
</div>
|
188 |
|
189 |
+
<?php endif; ?>
|
190 |
+
|
191 |
+
<?php if ( $instance['pagination']['activate'] && $instance['pagination']['type'] == 'ajax' ): ?>
|
192 |
+
|
193 |
+
<script>
|
194 |
+
jQuery(document).ready(function(){
|
195 |
+
// AJAX pagination
|
196 |
+
jQuery(function(jQuery) {
|
197 |
+
jQuery('#<?php echo $unique; ?>').on('click', '#iw-so-blog-pagination a', function(e){
|
198 |
+
e.preventDefault();
|
199 |
+
var link = jQuery(this).attr('href');
|
200 |
+
jQuery('#<?php echo $unique; ?>').fadeOut(500, function(){
|
201 |
+
jQuery(this).load(link + ' #<?php echo $unique; ?>', function() {
|
202 |
+
jQuery(this).fadeIn(500);
|
203 |
+
});
|
204 |
+
});
|
205 |
+
});
|
206 |
+
});
|
207 |
+
});
|
208 |
+
</script>
|
209 |
+
|
210 |
+
<?php endif; ?>
|
widgets/ink-crlc-widget/assets/banner.svg
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2 |
+
<svg width="240px" height="240px" viewBox="0 0 240 240" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
|
3 |
+
<!-- Generator: Sketch 3.3.2 (12043) - http://www.bohemiancoding.com/sketch -->
|
4 |
+
<title>so-banners</title>
|
5 |
+
<desc>Created with Sketch.</desc>
|
6 |
+
<defs></defs>
|
7 |
+
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
|
8 |
+
<g id="Circle-Counter" sketch:type="MSLayerGroup">
|
9 |
+
<rect id="BG" fill="#E74C3C" sketch:type="MSShapeGroup" x="0" y="0" width="240" height="240"></rect>
|
10 |
+
<g id="Group" transform="translate(55.000000, 55.000000)">
|
11 |
+
<circle id="Oval-3" stroke="#F7EBE8" stroke-width="4" sketch:type="MSShapeGroup" cx="65.5" cy="65.5" r="62.5"></circle>
|
12 |
+
<text id="%" sketch:type="MSTextLayer" font-family="Open Sans" font-size="32" font-weight="260" fill="#F7EBE8">
|
13 |
+
<tspan x="53" y="74">%</tspan>
|
14 |
+
</text>
|
15 |
+
<path d="M65.5,0.5 L65.5,5.5" id="Line" stroke="#E74C3C" stroke-linecap="square" sketch:type="MSShapeGroup"></path>
|
16 |
+
<path d="M5.5,66.5 L0.5,66.5" id="Line" stroke="#E74C3C" stroke-linecap="square" sketch:type="MSShapeGroup"></path>
|
17 |
+
<path d="M61.2013043,1.7311079 C61.2013043,1.7311079 52.675262,2.03734556 40.3242199,7.36391627 C34.9339633,9.68854464 29.6969495,13.4963704 24.7557117,17.4498838 C19.8735469,21.3561326 16.0196961,27.6205295 12.419824,33.7225593 C8.81995187,39.8245891 8.12861187,41.4628315 7.02782689,45.141745 C5.38892125,50.6191016 4.85169531,65.682974 4.85169531,65.682974" id="curve" stroke="#E74C3C" stroke-width="7" stroke-linecap="square" sketch:type="MSShapeGroup" transform="translate(33.026500, 33.707041) rotate(3.000000) translate(-33.026500, -33.707041) "></path>
|
18 |
+
</g>
|
19 |
+
</g>
|
20 |
+
</g>
|
21 |
+
</svg>
|
widgets/ink-crlc-widget/ink-crlc-widget.php
ADDED
@@ -0,0 +1,191 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
Widget Name: Inked Circle Counter
|
5 |
+
Description: Animated circles to display your stats.
|
6 |
+
Author: wpinked
|
7 |
+
Author URI: https://wpinked.com
|
8 |
+
*/
|
9 |
+
|
10 |
+
class Inked_Circle_Counter_SO_Widget extends SiteOrigin_Widget {
|
11 |
+
|
12 |
+
function __construct() {
|
13 |
+
|
14 |
+
parent::__construct(
|
15 |
+
|
16 |
+
'ink-circle-count',
|
17 |
+
|
18 |
+
__('Inked Circle Counter', 'wpinked-widgets'),
|
19 |
+
|
20 |
+
array(
|
21 |
+
'description' => __('Animated circles to display your stats.', 'wpinked-widgets'),
|
22 |
+
'help' => 'http://docs.wpinked.com/widgets-for-siteorigin/circle-counter-widget'
|
23 |
+
),
|
24 |
+
|
25 |
+
array(
|
26 |
+
),
|
27 |
+
|
28 |
+
array(
|
29 |
+
|
30 |
+
'admin' => array(
|
31 |
+
'type' => 'text',
|
32 |
+
'label' => __('Admin Label', 'wpinked-widgets'),
|
33 |
+
'default' => ''
|
34 |
+
),
|
35 |
+
|
36 |
+
'circle' => array(
|
37 |
+
'type' => 'section',
|
38 |
+
'label' => __( 'Circle Settings' , 'wpinked-widgets' ),
|
39 |
+
'hide' => true,
|
40 |
+
'fields' => array(
|
41 |
+
|
42 |
+
'title' => array(
|
43 |
+
'type' => 'text',
|
44 |
+
'label' => __('Title', 'wpinked-widgets'),
|
45 |
+
'default' => ''
|
46 |
+
),
|
47 |
+
|
48 |
+
'title-pos' => array(
|
49 |
+
'type' => 'select',
|
50 |
+
'label' => __('Title Position', 'wpinked-widgets'),
|
51 |
+
'default' => 'above',
|
52 |
+
'options' => array(
|
53 |
+
'above' => __('Above', 'wpinked-widgets'),
|
54 |
+
'below' => __('Below', 'wpinked-widgets')
|
55 |
+
),
|
56 |
+
),
|
57 |
+
|
58 |
+
'percent' => array(
|
59 |
+
'type' => 'slider',
|
60 |
+
'label' => __( 'Percentage', 'wpinked-widgets' ),
|
61 |
+
'default' => 50,
|
62 |
+
'min' => 0,
|
63 |
+
'max' => 100,
|
64 |
+
'integer' => true
|
65 |
+
),
|
66 |
+
|
67 |
+
'percent-show' => array(
|
68 |
+
'type' => 'checkbox',
|
69 |
+
'label' => __( 'Show Percentage ?', 'wpinked-widgets' ),
|
70 |
+
'default' => true
|
71 |
+
),
|
72 |
+
|
73 |
+
'percent-prefix' => array(
|
74 |
+
'type' => 'text',
|
75 |
+
'label' => __( 'Percentage Prefix', 'wpinked-widgets' ),
|
76 |
+
'default' => ''
|
77 |
+
),
|
78 |
+
|
79 |
+
'percent-suffix' => array(
|
80 |
+
'type' => 'text',
|
81 |
+
'label' => __( 'Percentage Suffix', 'wpinked-widgets' ),
|
82 |
+
'default' => ''
|
83 |
+
),
|
84 |
+
|
85 |
+
)
|
86 |
+
),
|
87 |
+
|
88 |
+
'styling' => array(
|
89 |
+
'type' => 'section',
|
90 |
+
'label' => __( 'Styling' , 'wpinked-widgets' ),
|
91 |
+
'hide' => true,
|
92 |
+
'fields' => array(
|
93 |
+
|
94 |
+
'title' => array(
|
95 |
+
'type' => 'color',
|
96 |
+
'label' => __( 'Title Color', 'wpinked-widgets' ),
|
97 |
+
'default' => ''
|
98 |
+
),
|
99 |
+
|
100 |
+
'percent' => array(
|
101 |
+
'type' => 'color',
|
102 |
+
'label' => __( 'Percentage Color', 'wpinked-widgets' ),
|
103 |
+
'default' => ''
|
104 |
+
),
|
105 |
+
|
106 |
+
'percent-size' => array(
|
107 |
+
'type' => 'text',
|
108 |
+
'label' => __( 'Percentage Size', 'wpinked-widgets' ),
|
109 |
+
'default' => '',
|
110 |
+
'description' => __( 'Enter the units, eg: px, em, rem, ...', 'wpinked-widgets' ),
|
111 |
+
),
|
112 |
+
|
113 |
+
'bar' => array(
|
114 |
+
'type' => 'color',
|
115 |
+
'label' => __( 'Bar Color', 'wpinked-widgets' ),
|
116 |
+
'default' => ''
|
117 |
+
),
|
118 |
+
|
119 |
+
'track' => array(
|
120 |
+
'type' => 'color',
|
121 |
+
'label' => __( 'Bar Background Color', 'wpinked-widgets' ),
|
122 |
+
'default' => ''
|
123 |
+
),
|
124 |
+
|
125 |
+
'shape' => array(
|
126 |
+
'type' => 'select',
|
127 |
+
'label' => __('Bar Shape', 'wpinked-widgets'),
|
128 |
+
'default' => 'butt',
|
129 |
+
'options' => array(
|
130 |
+
'butt' => __('Butt', 'wpinked-widgets'),
|
131 |
+
'round' => __('Round', 'wpinked-widgets'),
|
132 |
+
'square' => __('Square', 'wpinked-widgets'),
|
133 |
+
),
|
134 |
+
),
|
135 |
+
|
136 |
+
'width' => array(
|
137 |
+
'type' => 'number',
|
138 |
+
'label' => __( 'Bar Width', 'wpinked-widgets' ),
|
139 |
+
'default' => '3',
|
140 |
+
'description' => __( 'Value in px.', 'wpinked-widgets' ),
|
141 |
+
),
|
142 |
+
|
143 |
+
'size' => array(
|
144 |
+
'type' => 'number',
|
145 |
+
'label' => __( 'Bar Size', 'wpinked-widgets' ),
|
146 |
+
'default' => '200',
|
147 |
+
'description' => __( 'Value in px.', 'wpinked-widgets' ),
|
148 |
+
),
|
149 |
+
|
150 |
+
)
|
151 |
+
),
|
152 |
+
),
|
153 |
+
|
154 |
+
//The $base_folder path string.
|
155 |
+
plugin_dir_path(__FILE__)
|
156 |
+
);
|
157 |
+
}
|
158 |
+
|
159 |
+
function get_template_name($instance) {
|
160 |
+
return 'circle';
|
161 |
+
}
|
162 |
+
|
163 |
+
function get_style_name($instance) {
|
164 |
+
return 'circle';
|
165 |
+
}
|
166 |
+
|
167 |
+
function enqueue_frontend_scripts( $instance ) {
|
168 |
+
|
169 |
+
wp_enqueue_script( 'iw-countto-js' );
|
170 |
+
|
171 |
+
wp_register_script( 'iw-circle-js', siteorigin_widget_get_plugin_dir_url('ink-circle-count') . 'scripts/easypie.js', array( 'iw-waypoint-js' ), INKED_SO_WIDGETS, true );
|
172 |
+
|
173 |
+
wp_enqueue_script( 'iw-circle-init', siteorigin_widget_get_plugin_dir_url('ink-circle-count') . 'scripts/circle.init.js', array( 'iw-circle-js' ), INKED_SO_WIDGETS, true );
|
174 |
+
|
175 |
+
parent::enqueue_frontend_scripts( $instance );
|
176 |
+
}
|
177 |
+
|
178 |
+
function get_less_variables($instance) {
|
179 |
+
if( empty( $instance ) ) return array();
|
180 |
+
|
181 |
+
return array(
|
182 |
+
'title' => $instance['styling']['title'],
|
183 |
+
'percent' => $instance['styling']['percent'],
|
184 |
+
'per-size' => $instance['styling']['percent-size'],
|
185 |
+
'size' => $instance['styling']['size'],
|
186 |
+
);
|
187 |
+
}
|
188 |
+
|
189 |
+
}
|
190 |
+
|
191 |
+
siteorigin_widget_register('ink-circle-count', __FILE__, 'Inked_Circle_Counter_SO_Widget');
|
widgets/ink-crlc-widget/scripts/circle.init.js
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
( function($) {
|
2 |
+
|
3 |
+
$(document).ready( function() {
|
4 |
+
|
5 |
+
$( '.iw-so-circle-chart' ).waypoint( {
|
6 |
+
offset: '75%',
|
7 |
+
handler: function() {
|
8 |
+
$(this.element).easyPieChart();
|
9 |
+
$(this.element).css('min-height', 'auto')
|
10 |
+
$(this.element).find('.iw-so-circle-timer').countTo();
|
11 |
+
this.destroy()
|
12 |
+
}
|
13 |
+
} );
|
14 |
+
|
15 |
+
});
|
16 |
+
|
17 |
+
})( jQuery );
|
widgets/ink-crlc-widget/scripts/easypie.js
ADDED
@@ -0,0 +1,364 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**!
|
2 |
+
* easy-pie-chart
|
3 |
+
* Lightweight plugin to render simple, animated and retina optimized pie charts
|
4 |
+
*
|
5 |
+
* @license
|
6 |
+
* @author Robert Fleischmann <rendro87@gmail.com> (http://robert-fleischmann.de)
|
7 |
+
* @version 2.1.7
|
8 |
+
**/
|
9 |
+
|
10 |
+
(function (root, factory) {
|
11 |
+
if (typeof define === 'function' && define.amd) {
|
12 |
+
// AMD. Register as an anonymous module unless amdModuleId is set
|
13 |
+
define(["jquery"], function (a0) {
|
14 |
+
return (factory(a0));
|
15 |
+
});
|
16 |
+
} else if (typeof exports === 'object') {
|
17 |
+
// Node. Does not work with strict CommonJS, but
|
18 |
+
// only CommonJS-like environments that support module.exports,
|
19 |
+
// like Node.
|
20 |
+
module.exports = factory(require("jquery"));
|
21 |
+
} else {
|
22 |
+
factory(jQuery);
|
23 |
+
}
|
24 |
+
}(this, function ($) {
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Renderer to render the chart on a canvas object
|
28 |
+
* @param {DOMElement} el DOM element to host the canvas (root of the plugin)
|
29 |
+
* @param {object} options options object of the plugin
|
30 |
+
*/
|
31 |
+
var CanvasRenderer = function(el, options) {
|
32 |
+
var cachedBackground;
|
33 |
+
var canvas = document.createElement('canvas');
|
34 |
+
|
35 |
+
el.appendChild(canvas);
|
36 |
+
|
37 |
+
if (typeof(G_vmlCanvasManager) === 'object') {
|
38 |
+
G_vmlCanvasManager.initElement(canvas);
|
39 |
+
}
|
40 |
+
|
41 |
+
var ctx = canvas.getContext('2d');
|
42 |
+
|
43 |
+
canvas.width = canvas.height = options.size;
|
44 |
+
|
45 |
+
// canvas on retina devices
|
46 |
+
var scaleBy = 1;
|
47 |
+
if (window.devicePixelRatio > 1) {
|
48 |
+
scaleBy = window.devicePixelRatio;
|
49 |
+
canvas.style.width = canvas.style.height = [options.size, 'px'].join('');
|
50 |
+
canvas.width = canvas.height = options.size * scaleBy;
|
51 |
+
ctx.scale(scaleBy, scaleBy);
|
52 |
+
}
|
53 |
+
|
54 |
+
// move 0,0 coordinates to the center
|
55 |
+
ctx.translate(options.size / 2, options.size / 2);
|
56 |
+
|
57 |
+
// rotate canvas -90deg
|
58 |
+
ctx.rotate((-1 / 2 + options.rotate / 180) * Math.PI);
|
59 |
+
|
60 |
+
var radius = (options.size - options.lineWidth) / 2;
|
61 |
+
if (options.scaleColor && options.scaleLength) {
|
62 |
+
radius -= options.scaleLength + 2; // 2 is the distance between scale and bar
|
63 |
+
}
|
64 |
+
|
65 |
+
// IE polyfill for Date
|
66 |
+
Date.now = Date.now || function() {
|
67 |
+
return +(new Date());
|
68 |
+
};
|
69 |
+
|
70 |
+
/**
|
71 |
+
* Draw a circle around the center of the canvas
|
72 |
+
* @param {strong} color Valid CSS color string
|
73 |
+
* @param {number} lineWidth Width of the line in px
|
74 |
+
* @param {number} percent Percentage to draw (float between -1 and 1)
|
75 |
+
*/
|
76 |
+
var drawCircle = function(color, lineWidth, percent) {
|
77 |
+
percent = Math.min(Math.max(-1, percent || 0), 1);
|
78 |
+
var isNegative = percent <= 0 ? true : false;
|
79 |
+
|
80 |
+
ctx.beginPath();
|
81 |
+
ctx.arc(0, 0, radius, 0, Math.PI * 2 * percent, isNegative);
|
82 |
+
|
83 |
+
ctx.strokeStyle = color;
|
84 |
+
ctx.lineWidth = lineWidth;
|
85 |
+
|
86 |
+
ctx.stroke();
|
87 |
+
};
|
88 |
+
|
89 |
+
/**
|
90 |
+
* Draw the scale of the chart
|
91 |
+
*/
|
92 |
+
var drawScale = function() {
|
93 |
+
var offset;
|
94 |
+
var length;
|
95 |
+
|
96 |
+
ctx.lineWidth = 1;
|
97 |
+
ctx.fillStyle = options.scaleColor;
|
98 |
+
|
99 |
+
ctx.save();
|
100 |
+
for (var i = 24; i > 0; --i) {
|
101 |
+
if (i % 6 === 0) {
|
102 |
+
length = options.scaleLength;
|
103 |
+
offset = 0;
|
104 |
+
} else {
|
105 |
+
length = options.scaleLength * 0.6;
|
106 |
+
offset = options.scaleLength - length;
|
107 |
+
}
|
108 |
+
ctx.fillRect(-options.size/2 + offset, 0, length, 1);
|
109 |
+
ctx.rotate(Math.PI / 12);
|
110 |
+
}
|
111 |
+
ctx.restore();
|
112 |
+
};
|
113 |
+
|
114 |
+
/**
|
115 |
+
* Request animation frame wrapper with polyfill
|
116 |
+
* @return {function} Request animation frame method or timeout fallback
|
117 |
+
*/
|
118 |
+
var reqAnimationFrame = (function() {
|
119 |
+
return window.requestAnimationFrame ||
|
120 |
+
window.webkitRequestAnimationFrame ||
|
121 |
+
window.mozRequestAnimationFrame ||
|
122 |
+
function(callback) {
|
123 |
+
window.setTimeout(callback, 1000 / 60);
|
124 |
+
};
|
125 |
+
}());
|
126 |
+
|
127 |
+
/**
|
128 |
+
* Draw the background of the plugin including the scale and the track
|
129 |
+
*/
|
130 |
+
var drawBackground = function() {
|
131 |
+
if(options.scaleColor) drawScale();
|
132 |
+
if(options.trackColor) drawCircle(options.trackColor, options.trackWidth || options.lineWidth, 1);
|
133 |
+
};
|
134 |
+
|
135 |
+
/**
|
136 |
+
* Canvas accessor
|
137 |
+
*/
|
138 |
+
this.getCanvas = function() {
|
139 |
+
return canvas;
|
140 |
+
};
|
141 |
+
|
142 |
+
/**
|
143 |
+
* Canvas 2D context 'ctx' accessor
|
144 |
+
*/
|
145 |
+
this.getCtx = function() {
|
146 |
+
return ctx;
|
147 |
+
};
|
148 |
+
|
149 |
+
/**
|
150 |
+
* Clear the complete canvas
|
151 |
+
*/
|
152 |
+
this.clear = function() {
|
153 |
+
ctx.clearRect(options.size / -2, options.size / -2, options.size, options.size);
|
154 |
+
};
|
155 |
+
|
156 |
+
/**
|
157 |
+
* Draw the complete chart
|
158 |
+
* @param {number} percent Percent shown by the chart between -100 and 100
|
159 |
+
*/
|
160 |
+
this.draw = function(percent) {
|
161 |
+
// do we need to render a background
|
162 |
+
if (!!options.scaleColor || !!options.trackColor) {
|
163 |
+
// getImageData and putImageData are supported
|
164 |
+
if (ctx.getImageData && ctx.putImageData) {
|
165 |
+
if (!cachedBackground) {
|
166 |
+
drawBackground();
|
167 |
+
cachedBackground = ctx.getImageData(0, 0, options.size * scaleBy, options.size * scaleBy);
|
168 |
+
} else {
|
169 |
+
ctx.putImageData(cachedBackground, 0, 0);
|
170 |
+
}
|
171 |
+
} else {
|
172 |
+
this.clear();
|
173 |
+
drawBackground();
|
174 |
+
}
|
175 |
+
} else {
|
176 |
+
this.clear();
|
177 |
+
}
|
178 |
+
|
179 |
+
ctx.lineCap = options.lineCap;
|
180 |
+
|
181 |
+
// if barcolor is a function execute it and pass the percent as a value
|
182 |
+
var color;
|
183 |
+
if (typeof(options.barColor) === 'function') {
|
184 |
+
color = options.barColor(percent);
|
185 |
+
} else {
|
186 |
+
color = options.barColor;
|
187 |
+
}
|
188 |
+
|
189 |
+
// draw bar
|
190 |
+
drawCircle(color, options.lineWidth, percent / 100);
|
191 |
+
}.bind(this);
|
192 |
+
|
193 |
+
/**
|
194 |
+
* Animate from some percent to some other percentage
|
195 |
+
* @param {number} from Starting percentage
|
196 |
+
* @param {number} to Final percentage
|
197 |
+
*/
|
198 |
+
this.animate = function(from, to) {
|
199 |
+
var startTime = Date.now();
|
200 |
+
options.onStart(from, to);
|
201 |
+
var animation = function() {
|
202 |
+
var process = Math.min(Date.now() - startTime, options.animate.duration);
|
203 |
+
var currentValue = options.easing(this, process, from, to - from, options.animate.duration);
|
204 |
+
this.draw(currentValue);
|
205 |
+
options.onStep(from, to, currentValue);
|
206 |
+
if (process >= options.animate.duration) {
|
207 |
+
options.onStop(from, to);
|
208 |
+
} else {
|
209 |
+
reqAnimationFrame(animation);
|
210 |
+
}
|
211 |
+
}.bind(this);
|
212 |
+
|
213 |
+
reqAnimationFrame(animation);
|
214 |
+
}.bind(this);
|
215 |
+
};
|
216 |
+
|
217 |
+
var EasyPieChart = function(el, opts) {
|
218 |
+
var defaultOptions = {
|
219 |
+
barColor: '#ef1e25',
|
220 |
+
trackColor: '#f9f9f9',
|
221 |
+
scaleColor: '#dfe0e0',
|
222 |
+
scaleLength: 5,
|
223 |
+
lineCap: 'round',
|
224 |
+
lineWidth: 3,
|
225 |
+
trackWidth: undefined,
|
226 |
+
size: 110,
|
227 |
+
rotate: 0,
|
228 |
+
animate: {
|
229 |
+
duration: 1000,
|
230 |
+
enabled: true
|
231 |
+
},
|
232 |
+
easing: function (x, t, b, c, d) { // more can be found here: http://gsgd.co.uk/sandbox/jquery/easing/
|
233 |
+
t = t / (d/2);
|
234 |
+
if (t < 1) {
|
235 |
+
return c / 2 * t * t + b;
|
236 |
+
}
|
237 |
+
return -c/2 * ((--t)*(t-2) - 1) + b;
|
238 |
+
},
|
239 |
+
onStart: function(from, to) {
|
240 |
+
return;
|
241 |
+
},
|
242 |
+
onStep: function(from, to, currentValue) {
|
243 |
+
return;
|
244 |
+
},
|
245 |
+
onStop: function(from, to) {
|
246 |
+
return;
|
247 |
+
}
|
248 |
+
};
|
249 |
+
|
250 |
+
// detect present renderer
|
251 |
+
if (typeof(CanvasRenderer) !== 'undefined') {
|
252 |
+
defaultOptions.renderer = CanvasRenderer;
|
253 |
+
} else if (typeof(SVGRenderer) !== 'undefined') {
|
254 |
+
defaultOptions.renderer = SVGRenderer;
|
255 |
+
} else {
|
256 |
+
throw new Error('Please load either the SVG- or the CanvasRenderer');
|
257 |
+
}
|
258 |
+
|
259 |
+
var options = {};
|
260 |
+
var currentValue = 0;
|
261 |
+
|
262 |
+
/**
|
263 |
+
* Initialize the plugin by creating the options object and initialize rendering
|
264 |
+
*/
|
265 |
+
var init = function() {
|
266 |
+
this.el = el;
|
267 |
+
this.options = options;
|
268 |
+
|
269 |
+
// merge user options into default options
|
270 |
+
for (var i in defaultOptions) {
|
271 |
+
if (defaultOptions.hasOwnProperty(i)) {
|
272 |
+
options[i] = opts && typeof(opts[i]) !== 'undefined' ? opts[i] : defaultOptions[i];
|
273 |
+
if (typeof(options[i]) === 'function') {
|
274 |
+
options[i] = options[i].bind(this);
|
275 |
+
}
|
276 |
+
}
|
277 |
+
}
|
278 |
+
|
279 |
+
// check for jQuery easing
|
280 |
+
if (typeof(options.easing) === 'string' && typeof(jQuery) !== 'undefined' && jQuery.isFunction(jQuery.easing[options.easing])) {
|
281 |
+
options.easing = jQuery.easing[options.easing];
|
282 |
+
} else {
|
283 |
+
options.easing = defaultOptions.easing;
|
284 |
+
}
|
285 |
+
|
286 |
+
// process earlier animate option to avoid bc breaks
|
287 |
+
if (typeof(options.animate) === 'number') {
|
288 |
+
options.animate = {
|
289 |
+
duration: options.animate,
|
290 |
+
enabled: true
|
291 |
+
};
|
292 |
+
}
|
293 |
+
|
294 |
+
if (typeof(options.animate) === 'boolean' && !options.animate) {
|
295 |
+
options.animate = {
|
296 |
+
duration: 1000,
|
297 |
+
enabled: options.animate
|
298 |
+
};
|
299 |
+
}
|
300 |
+
|
301 |
+
// create renderer
|
302 |
+
this.renderer = new options.renderer(el, options);
|
303 |
+
|
304 |
+
// initial draw
|
305 |
+
this.renderer.draw(currentValue);
|
306 |
+
|
307 |
+
// initial update
|
308 |
+
if (el.dataset && el.dataset.percent) {
|
309 |
+
this.update(parseFloat(el.dataset.percent));
|
310 |
+
} else if (el.getAttribute && el.getAttribute('data-percent')) {
|
311 |
+
this.update(parseFloat(el.getAttribute('data-percent')));
|
312 |
+
}
|
313 |
+
}.bind(this);
|
314 |
+
|
315 |
+
/**
|
316 |
+
* Update the value of the chart
|
317 |
+
* @param {number} newValue Number between 0 and 100
|
318 |
+
* @return {object} Instance of the plugin for method chaining
|
319 |
+
*/
|
320 |
+
this.update = function(newValue) {
|
321 |
+
newValue = parseFloat(newValue);
|
322 |
+
if (options.animate.enabled) {
|
323 |
+
this.renderer.animate(currentValue, newValue);
|
324 |
+
} else {
|
325 |
+
this.renderer.draw(newValue);
|
326 |
+
}
|
327 |
+
currentValue = newValue;
|
328 |
+
return this;
|
329 |
+
}.bind(this);
|
330 |
+
|
331 |
+
/**
|
332 |
+
* Disable animation
|
333 |
+
* @return {object} Instance of the plugin for method chaining
|
334 |
+
*/
|
335 |
+
this.disableAnimation = function() {
|
336 |
+
options.animate.enabled = false;
|
337 |
+
return this;
|
338 |
+
};
|
339 |
+
|
340 |
+
/**
|
341 |
+
* Enable animation
|
342 |
+
* @return {object} Instance of the plugin for method chaining
|
343 |
+
*/
|
344 |
+
this.enableAnimation = function() {
|
345 |
+
options.animate.enabled = true;
|
346 |
+
return this;
|
347 |
+
};
|
348 |
+
|
349 |
+
init();
|
350 |
+
};
|
351 |
+
|
352 |
+
$.fn.easyPieChart = function(options) {
|
353 |
+
return this.each(function() {
|
354 |
+
var instanceOptions;
|
355 |
+
|
356 |
+
if (!$.data(this, 'easyPieChart')) {
|
357 |
+
instanceOptions = $.extend({}, options, $(this).data());
|
358 |
+
$.data(this, 'easyPieChart', new EasyPieChart(this, instanceOptions));
|
359 |
+
}
|
360 |
+
});
|
361 |
+
};
|
362 |
+
|
363 |
+
|
364 |
+
}));
|
widgets/ink-crlc-widget/styles/circle.less
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
@title: inherit;
|
2 |
+
@percent: inherit;
|
3 |
+
@per-size: inherit;
|
4 |
+
@size: 0;
|
5 |
+
|
6 |
+
.iw-so-circle-chart {
|
7 |
+
position: relative;
|
8 |
+
min-height: (@size + 10px);
|
9 |
+
}
|
10 |
+
|
11 |
+
.iw-so-circle-percent {
|
12 |
+
position: absolute;
|
13 |
+
top: 50%;
|
14 |
+
left: 50%;
|
15 |
+
-moz-transform: translate(-50%, -50%);
|
16 |
+
-webkit-transform: translate(-50%, -50%);
|
17 |
+
-o-transform: translate(-50%, -50%);
|
18 |
+
-ms-transform: translate(-50%, -50%);
|
19 |
+
transform: translate(-50%, -50%);
|
20 |
+
margin: 0;
|
21 |
+
font-size: @per-size;
|
22 |
+
color: @percent;
|
23 |
+
}
|
24 |
+
|
25 |
+
.iw-so-circle-title {
|
26 |
+
color: @title;
|
27 |
+
}
|
28 |
+
|
29 |
+
canvas {
|
30 |
+
max-width: 100%;
|
31 |
+
}
|
widgets/ink-crlc-widget/tpl/circle.php
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$circle_attributes = array('data-scale-color' => 'false' );
|
3 |
+
if(!empty($instance['circle']['percent'])) $circle_attributes['data-percent'] = esc_attr($instance['circle']['percent']);
|
4 |
+
if(!empty($instance['styling']['bar'])) $circle_attributes['data-bar-color'] = esc_attr($instance['styling']['bar']);
|
5 |
+
if(!empty($instance['styling']['track'])) $circle_attributes['data-track-color'] = esc_attr($instance['styling']['track']);
|
6 |
+
if(!empty($instance['styling']['shape'])) $circle_attributes['data-line-cap'] = esc_attr($instance['styling']['shape']);
|
7 |
+
if(!empty($instance['styling']['width'])) $circle_attributes['data-line-width'] = esc_attr($instance['styling']['width']);
|
8 |
+
if(!empty($instance['styling']['size'])) $circle_attributes['data-size'] = esc_attr($instance['styling']['size']);
|
9 |
+
?>
|
10 |
+
|
11 |
+
<div class="iw-so-circle">
|
12 |
+
|
13 |
+
<?php if ($instance['circle']['title'] && $instance['circle']['title-pos'] == 'above') : ?>
|
14 |
+
<h3 class="iw-so-circle-title iw-text-center"><?php echo $instance['circle']['title']; ?></h3>
|
15 |
+
<?php endif; ?>
|
16 |
+
<center>
|
17 |
+
<div class="iw-so-circle-chart" <?php foreach($circle_attributes as $name => $val) echo $name . '="' . $val . '" ' ?>>
|
18 |
+
<?php if ($instance['circle']['percent-show']) : ?>
|
19 |
+
<p class="iw-so-circle-percent">
|
20 |
+
<?php echo $instance['circle']['percent-prefix']; ?><span class="iw-so-circle-timer" data-from="0" data-to="<?php echo $instance['circle']['percent']; ?>" data-speed="1000" data-refresh-interval="50"></span><?php echo $instance['circle']['percent-suffix']; ?>
|
21 |
+
</p>
|
22 |
+
<?php endif; ?>
|
23 |
+
</div>
|
24 |
+
</center>
|
25 |
+
<?php if ($instance['circle']['title'] && $instance['circle']['title-pos'] == 'below') : ?>
|
26 |
+
<h3 class="iw-so-circle-title iw-text-center"><?php echo $instance['circle']['title']; ?></h3>
|
27 |
+
<?php endif; ?>
|
28 |
+
|
29 |
+
</div>
|
widgets/ink-fard-widget/ink-fard-widget.php
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
<?php
|
2 |
|
3 |
/*
|
4 |
Widget Name: Inked Filter Accordion
|
@@ -227,7 +227,7 @@ class Inked_Filter_Accordion_SO_Widget extends SiteOrigin_Widget {
|
|
227 |
'type' => 'color',
|
228 |
'label' => __( 'Title Color', 'wpinked-widgets' ),
|
229 |
'default' => ''
|
230 |
-
),
|
231 |
|
232 |
'title-h' => array(
|
233 |
'type' => 'color',
|
@@ -272,10 +272,12 @@ class Inked_Filter_Accordion_SO_Widget extends SiteOrigin_Widget {
|
|
272 |
|
273 |
function enqueue_frontend_scripts( $instance ) {
|
274 |
|
275 |
-
wp_register_script( 'iw-
|
|
|
|
|
|
|
|
|
276 |
|
277 |
-
wp_enqueue_script( 'iw-filter-init', siteorigin_widget_get_plugin_dir_url('ink-filt-ardn') . 'scripts/filter.init.js', array( 'iw-accordion-js', 'iw-mixitup-js' ), INKED_SO_WIDGETS, true );
|
278 |
-
|
279 |
wp_enqueue_style( 'iw-filt-ardn', siteorigin_widget_get_plugin_dir_url('ink-filt-ardn') . 'styles/accordion.css', array(), INKED_SO_WIDGETS );
|
280 |
|
281 |
parent::enqueue_frontend_scripts( $instance );
|
@@ -291,7 +293,7 @@ class Inked_Filter_Accordion_SO_Widget extends SiteOrigin_Widget {
|
|
291 |
'title-bg' => $instance['styling']['title-bg'],
|
292 |
'title-h' => $instance['styling']['title-h'],
|
293 |
'title-h-bg' => $instance['styling']['title-h-bg'],
|
294 |
-
'cont-bg' => $instance['styling']['content-bg'],
|
295 |
'icon-open' => $instance['styling']['icon-open'],
|
296 |
'icon-close' => $instance['styling']['icon-close'],
|
297 |
'type-th' => $instance['styling']['type-theme'],
|
@@ -303,4 +305,4 @@ class Inked_Filter_Accordion_SO_Widget extends SiteOrigin_Widget {
|
|
303 |
|
304 |
}
|
305 |
|
306 |
-
siteorigin_widget_register('ink-filt-ardn', __FILE__, 'Inked_Filter_Accordion_SO_Widget');
|
1 |
+
<?php
|
2 |
|
3 |
/*
|
4 |
Widget Name: Inked Filter Accordion
|
227 |
'type' => 'color',
|
228 |
'label' => __( 'Title Color', 'wpinked-widgets' ),
|
229 |
'default' => ''
|
230 |
+
),
|
231 |
|
232 |
'title-h' => array(
|
233 |
'type' => 'color',
|
272 |
|
273 |
function enqueue_frontend_scripts( $instance ) {
|
274 |
|
275 |
+
wp_register_script( 'iw-faccordion-js', siteorigin_widget_get_plugin_dir_url('ink-filt-ardn') . 'scripts/accordion.js', array( 'iw-foundation-js' ), INKED_SO_WIDGETS, true );
|
276 |
+
|
277 |
+
wp_enqueue_script( 'iw-filter-init', siteorigin_widget_get_plugin_dir_url('ink-filt-ardn') . 'scripts/filter.init.js', array( 'iw-mixitup-js' ), INKED_SO_WIDGETS, true );
|
278 |
+
|
279 |
+
wp_enqueue_script( 'iw-faccordion-init', siteorigin_widget_get_plugin_dir_url('ink-filt-ardn') . 'scripts/accordion.init.js', array( 'iw-faccordion-js' ), INKED_SO_WIDGETS, true );
|
280 |
|
|
|
|
|
281 |
wp_enqueue_style( 'iw-filt-ardn', siteorigin_widget_get_plugin_dir_url('ink-filt-ardn') . 'styles/accordion.css', array(), INKED_SO_WIDGETS );
|
282 |
|
283 |
parent::enqueue_frontend_scripts( $instance );
|
293 |
'title-bg' => $instance['styling']['title-bg'],
|
294 |
'title-h' => $instance['styling']['title-h'],
|
295 |
'title-h-bg' => $instance['styling']['title-h-bg'],
|
296 |
+
'cont-bg' => $instance['styling']['content-bg'],
|
297 |
'icon-open' => $instance['styling']['icon-open'],
|
298 |
'icon-close' => $instance['styling']['icon-close'],
|
299 |
'type-th' => $instance['styling']['type-theme'],
|
305 |
|
306 |
}
|
307 |
|
308 |
+
siteorigin_widget_register('ink-filt-ardn', __FILE__, 'Inked_Filter_Accordion_SO_Widget');
|
widgets/ink-fard-widget/scripts/accordion.init.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
jQuery(document).foundation();
|
widgets/ink-fard-widget/scripts/accordion.js
ADDED
@@ -0,0 +1,125 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
;(function ($, window, document, undefined) {
|
2 |
+
'use strict';
|
3 |
+
|
4 |
+
Foundation.libs.accordion = {
|
5 |
+
name : 'accordion',
|
6 |
+
|
7 |
+
version : '5.5.3',
|
8 |
+
|
9 |
+
settings : {
|
10 |
+
content_class : 'content',
|
11 |
+
active_class : 'active',
|
12 |
+
multi_expand : false,
|
13 |
+
toggleable : true,
|
14 |
+
callback : function () {}
|
15 |
+
},
|
16 |
+
|
17 |
+
init : function (scope, method, options) {
|
18 |
+
this.bindings(method, options);
|
19 |
+
},
|
20 |
+
|
21 |
+
events : function (instance) {
|
22 |
+
var self = this;
|
23 |
+
var S = this.S;
|
24 |
+
self.create(this.S(instance));
|
25 |
+
|
26 |
+
S(this.scope)
|
27 |
+
.off('.fndtn.accordion')
|
28 |
+
.on('click.fndtn.accordion', '[' + this.attr_name() + '] > dd > a, [' + this.attr_name() + '] > li > a', function (e) {
|
29 |
+
var accordion = S(this).closest('[' + self.attr_name() + ']'),
|
30 |
+
groupSelector = self.attr_name() + '=' + accordion.attr(self.attr_name()),
|
31 |
+
settings = accordion.data(self.attr_name(true) + '-init') || self.settings,
|
32 |
+
target = S('#' + this.href.split('#')[1]),
|
33 |
+
aunts = $('> dd, > li', accordion),
|
34 |
+
siblings = aunts.children('.' + settings.content_class),
|
35 |
+
active_content = siblings.filter('.' + settings.active_class);
|
36 |
+
|
37 |
+
e.preventDefault();
|
38 |
+
|
39 |
+
if (accordion.attr(self.attr_name())) {
|
40 |
+
siblings = siblings.add('[' + groupSelector + '] dd > ' + '.' + settings.content_class + ', [' + groupSelector + '] li > ' + '.' + settings.content_class);
|
41 |
+
aunts = aunts.add('[' + groupSelector + '] dd, [' + groupSelector + '] li');
|
42 |
+
}
|
43 |
+
|
44 |
+
if (settings.toggleable && target.is(active_content)) {
|
45 |
+
target.parent('dd, li').toggleClass(settings.active_class, false);
|
46 |
+
target.toggleClass(settings.active_class, false);
|
47 |
+
S(this).attr('aria-expanded', function(i, attr){
|
48 |
+
return attr === 'true' ? 'false' : 'true';
|
49 |
+
});
|
50 |
+
settings.callback(target);
|
51 |
+
target.triggerHandler('toggled', [accordion]);
|
52 |
+
accordion.triggerHandler('toggled', [target]);
|
53 |
+
return;
|
54 |
+
}
|
55 |
+
|
56 |
+
if (!settings.multi_expand) {
|
57 |
+
siblings.removeClass(settings.active_class);
|
58 |
+
aunts.removeClass(settings.active_class);
|
59 |
+
aunts.children('a').attr('aria-expanded','false');
|
60 |
+
}
|
61 |
+
|
62 |
+
target.addClass(settings.active_class).parent().addClass(settings.active_class);
|
63 |
+
settings.callback(target);
|
64 |
+
target.triggerHandler('toggled', [accordion]);
|
65 |
+
accordion.triggerHandler('toggled', [target]);
|
66 |
+
S(this).attr('aria-expanded','true');
|
67 |
+
});
|
68 |
+
},
|
69 |
+
|
70 |
+
create: function($instance) {
|
71 |
+
var self = this,
|
72 |
+
accordion = $instance,
|
73 |
+
aunts = $('> .accordion-navigation', accordion),
|
74 |
+
settings = accordion.data(self.attr_name(true) + '-init') || self.settings;
|
75 |
+
|
76 |
+
aunts.children('a').attr('aria-expanded','false');
|
77 |
+
aunts.has('.' + settings.content_class + '.' + settings.active_class).addClass(settings.active_class).children('a').attr('aria-expanded','true');
|
78 |
+
|
79 |
+
if (settings.multi_expand) {
|
80 |
+
$instance.attr('aria-multiselectable','true');
|
81 |
+
}
|
82 |
+
},
|
83 |
+
|
84 |
+
toggle : function(options) {
|
85 |
+
var options = typeof options !== 'undefined' ? options : {};
|
86 |
+
var selector = typeof options.selector !== 'undefined' ? options.selector : '';
|
87 |
+
var toggle_state = typeof options.toggle_state !== 'undefined' ? options.toggle_state : '';
|
88 |
+
var $accordion = typeof options.$accordion !== 'undefined' ? options.$accordion : this.S(this.scope).closest('[' + this.attr_name() + ']');
|
89 |
+
|
90 |
+
var $items = $accordion.find('> dd' + selector + ', > li' + selector);
|
91 |
+
if ( $items.length < 1 ) {
|
92 |
+
if ( window.console ) {
|
93 |
+
console.error('Selection not found.', selector);
|
94 |
+
}
|
95 |
+
return false;
|
96 |
+
}
|
97 |
+
|
98 |
+
var S = this.S;
|
99 |
+
var active_class = this.settings.active_class;
|
100 |
+
$items.each(function() {
|
101 |
+
var $item = S(this);
|
102 |
+
var is_active = $item.hasClass(active_class);
|
103 |
+
if ( ( is_active && toggle_state === 'close' ) || ( !is_active && toggle_state === 'open' ) || toggle_state === '' ) {
|
104 |
+
$item.find('> a').trigger('click.fndtn.accordion');
|
105 |
+
}
|
106 |
+
});
|
107 |
+
},
|
108 |
+
|
109 |
+
open : function(options) {
|
110 |
+
var options = typeof options !== 'undefined' ? options : {};
|
111 |
+
options.toggle_state = 'open';
|
112 |
+
this.toggle(options);
|
113 |
+
},
|
114 |
+
|
115 |
+
close : function(options) {
|
116 |
+
var options = typeof options !== 'undefined' ? options : {};
|
117 |
+
options.toggle_state = 'close';
|
118 |
+
this.toggle(options);
|
119 |
+
},
|
120 |
+
|
121 |
+
off : function () {},
|
122 |
+
|
123 |
+
reflow : function () {}
|
124 |
+
};
|
125 |
+
}(jQuery, window, window.document));
|
widgets/ink-fard-widget/scripts/filter.init.js
CHANGED
@@ -1,5 +1,3 @@
|
|
1 |
-
jQuery(document).foundation();
|
2 |
-
|
3 |
( function($) {
|
4 |
|
5 |
$(document).ready( function() {
|
@@ -8,4 +6,4 @@ jQuery(document).foundation();
|
|
8 |
|
9 |
});
|
10 |
|
11 |
-
})( jQuery );
|
|
|
|
|
1 |
( function($) {
|
2 |
|
3 |
$(document).ready( function() {
|
6 |
|
7 |
});
|
8 |
|
9 |
+
})( jQuery );
|
widgets/ink-fard-widget/tpl/accordion.php
CHANGED
@@ -14,13 +14,19 @@ if($instance['toggleable']):
|
|
14 |
endif;
|
15 |
|
16 |
$acc_no = 1;
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
?>
|
18 |
|
19 |
<div class="iw-so-filter-acrdn-terms">
|
20 |
<ul class="iw-so-acrdn-terms">
|
21 |
-
<?php
|
22 |
echo '<li><a class="filter" data-filter="all">' . $instance['all'] . '</a></li>';
|
23 |
-
|
24 |
foreach ( $instance['filters'] as $term ) {
|
25 |
echo '<li><a class="filter" data-filter=".' . $term['slug'] . '" >' . $term['name'] .'</a></li>';
|
26 |
}
|
@@ -30,17 +36,17 @@ $acc_no = 1;
|
|
30 |
|
31 |
<ul class="accordion" id="Container" data-accordion data-options="<?php echo $expand . $toggleable; ?>">
|
32 |
|
33 |
-
<?php foreach( $instance['toggles'] as $i => $toggle ) { ?>
|
34 |
-
|
35 |
<li class="accordion-navigation mix <?php echo $toggle['slugs']; ?>">
|
36 |
|
37 |
-
<a href="#<?php echo $
|
38 |
<?php echo $toggle['title']; ?>
|
39 |
<span class="iw-so-tgl-open"><?php echo siteorigin_widget_get_icon( $instance['icon-open'], $icon_styles ); ?></span>
|
40 |
<span class="iw-so-tgl-close"><?php echo siteorigin_widget_get_icon( $instance['icon-close'], $icon_styles ); ?></span>
|
41 |
</a>
|
42 |
|
43 |
-
<div id="<?php echo $
|
44 |
|
45 |
<?php echo $toggle['content']; ?>
|
46 |
|
@@ -52,4 +58,4 @@ $acc_no = 1;
|
|
52 |
|
53 |
<?php } ?>
|
54 |
|
55 |
-
</ul>
|
14 |
endif;
|
15 |
|
16 |
$acc_no = 1;
|
17 |
+
|
18 |
+
if( $instance['id'] ):
|
19 |
+
$unique = $instance['id'];
|
20 |
+
else :
|
21 |
+
$unique = 'fard-' . $instance['_sow_form_id'];
|
22 |
+
endif;
|
23 |
?>
|
24 |
|
25 |
<div class="iw-so-filter-acrdn-terms">
|
26 |
<ul class="iw-so-acrdn-terms">
|
27 |
+
<?php
|
28 |
echo '<li><a class="filter" data-filter="all">' . $instance['all'] . '</a></li>';
|
29 |
+
|
30 |
foreach ( $instance['filters'] as $term ) {
|
31 |
echo '<li><a class="filter" data-filter=".' . $term['slug'] . '" >' . $term['name'] .'</a></li>';
|
32 |
}
|
36 |
|
37 |
<ul class="accordion" id="Container" data-accordion data-options="<?php echo $expand . $toggleable; ?>">
|
38 |
|
39 |
+
<?php foreach( $instance['toggles'] as $i => $toggle ) { ?>
|
40 |
+
|
41 |
<li class="accordion-navigation mix <?php echo $toggle['slugs']; ?>">
|
42 |
|
43 |
+
<a href="#<?php echo $unique . '-' . $acc_no; ?>" class="<?php echo $instance['styling']['text']; ?>">
|
44 |
<?php echo $toggle['title']; ?>
|
45 |
<span class="iw-so-tgl-open"><?php echo siteorigin_widget_get_icon( $instance['icon-open'], $icon_styles ); ?></span>
|
46 |
<span class="iw-so-tgl-close"><?php echo siteorigin_widget_get_icon( $instance['icon-close'], $icon_styles ); ?></span>
|
47 |
</a>
|
48 |
|
49 |
+
<div id="<?php echo $unique . '-' . $acc_no; ?>" class="content<?php echo ($toggle['active'] == 1 ? ' active' : '' ); ?>">
|
50 |
|
51 |
<?php echo $toggle['content']; ?>
|
52 |
|
58 |
|
59 |
<?php } ?>
|
60 |
|
61 |
+
</ul>
|
widgets/ink-numc-widget/assets/banner.svg
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2 |
+
<svg width="240px" height="240px" viewBox="0 0 240 240" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
|
3 |
+
<!-- Generator: Sketch 3.3.2 (12043) - http://www.bohemiancoding.com/sketch -->
|
4 |
+
<title>so-banners</title>
|
5 |
+
<desc>Created with Sketch.</desc>
|
6 |
+
<defs></defs>
|
7 |
+
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
|
8 |
+
<g id="Number-Counter" sketch:type="MSLayerGroup">
|
9 |
+
<rect id="BG" fill="#E74C3C" sketch:type="MSShapeGroup" x="0" y="0" width="240" height="240"></rect>
|
10 |
+
<g id="Group" transform="translate(52.000000, 88.000000)" font-size="48" font-family="Open Sans" fill="#F7EBE8" sketch:type="MSTextLayer" font-weight="260">
|
11 |
+
<text id="123">
|
12 |
+
<tspan x="0" y="51">12345</tspan>
|
13 |
+
</text>
|
14 |
+
</g>
|
15 |
+
</g>
|
16 |
+
</g>
|
17 |
+
</svg>
|
widgets/ink-numc-widget/ink-numc-widget.php
ADDED
@@ -0,0 +1,157 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
Widget Name: Inked Number Counter
|
5 |
+
Description: Animated numbers to display your stats.
|
6 |
+
Author: wpinked
|
7 |
+
Author URI: https://wpinked.com
|
8 |
+
*/
|
9 |
+
|
10 |
+
class Inked_Number_Counter_SO_Widget extends SiteOrigin_Widget {
|
11 |
+
|
12 |
+
function __construct() {
|
13 |
+
|
14 |
+
parent::__construct(
|
15 |
+
|
16 |
+
'ink-num-count',
|
17 |
+
|
18 |
+
__('Inked Number Counter', 'wpinked-widgets'),
|
19 |
+
|
20 |
+
array(
|
21 |
+
'description' => __('Animated numbers to display your stats.', 'wpinked-widgets'),
|
22 |
+
'help' => 'http://docs.wpinked.com/widgets-for-siteorigin/number-counter-widget'
|
23 |
+
),
|
24 |
+
|
25 |
+
array(
|
26 |
+
),
|
27 |
+
|
28 |
+
array(
|
29 |
+
|
30 |
+
'admin' => array(
|
31 |
+
'type' => 'text',
|
32 |
+
'label' => __('Admin Label', 'wpinked-widgets'),
|
33 |
+
'default' => ''
|
34 |
+
),
|
35 |
+
|
36 |
+
'number' => array(
|
37 |
+
'type' => 'section',
|
38 |
+
'label' => __( 'Number Settings' , 'wpinked-widgets' ),
|
39 |
+
'hide' => true,
|
40 |
+
'fields' => array(
|
41 |
+
|
42 |
+
'start' => array(
|
43 |
+
'type' => 'text',
|
44 |
+
'label' => __( 'Start', 'wpinked-widgets' ),
|
45 |
+
'default' => '0'
|
46 |
+
),
|
47 |
+
|
48 |
+
'end' => array(
|
49 |
+
'type' => 'text',
|
50 |
+
'label' => __( 'End', 'wpinked-widgets' ),
|
51 |
+
'default' => '300'
|
52 |
+
),
|
53 |
+
|
54 |
+
'speed' => array(
|
55 |
+
'type' => 'text',
|
56 |
+
'label' => __( 'Speed', 'wpinked-widgets' ),
|
57 |
+
'default' => '1000',
|
58 |
+
'description' => __( 'Number in milliseconds', 'wpinked-widgets' ),
|
59 |
+
),
|
60 |
+
|
61 |
+
'prefix' => array(
|
62 |
+
'type' => 'text',
|
63 |
+
'label' => __( 'Number Prefix', 'wpinked-widgets' ),
|
64 |
+
'default' => ''
|
65 |
+
),
|
66 |
+
|
67 |
+
'suffix' => array(
|
68 |
+
'type' => 'text',
|
69 |
+
'label' => __( 'Number Suffix', 'wpinked-widgets' ),
|
70 |
+
'default' => ''
|
71 |
+
),
|
72 |
+
|
73 |
+
'title' => array(
|
74 |
+
'type' => 'text',
|
75 |
+
'label' => __('Title', 'wpinked-widgets'),
|
76 |
+
'default' => ''
|
77 |
+
),
|
78 |
+
|
79 |
+
'title-pos' => array(
|
80 |
+
'type' => 'select',
|
81 |
+
'label' => __('Title Position', 'wpinked-widgets'),
|
82 |
+
'default' => 'above',
|
83 |
+
'options' => array(
|
84 |
+
'above' => __('Above', 'wpinked-widgets'),
|
85 |
+
'below' => __('Below', 'wpinked-widgets')
|
86 |
+
),
|
87 |
+
),
|
88 |
+
|
89 |
+
)
|
90 |
+
|
91 |
+
),
|
92 |
+
|
93 |
+
'styling' => array(
|
94 |
+
'type' => 'section',
|
95 |
+
'label' => __( 'Styling' , 'wpinked-widgets' ),
|
96 |
+
'hide' => true,
|
97 |
+
'fields' => array(
|
98 |
+
|
99 |
+
'title' => array(
|
100 |
+
'type' => 'color',
|
101 |
+
'label' => __( 'Title Color', 'wpinked-widgets' ),
|
102 |
+
'default' => ''
|
103 |
+
),
|
104 |
+
|
105 |
+
'number' => array(
|
106 |
+
'type' => 'color',
|
107 |
+
'label' => __( 'Number Color', 'wpinked-widgets' ),
|
108 |
+
'default' => ''
|
109 |
+
),
|
110 |
+
|
111 |
+
'number-size' => array(
|
112 |
+
'type' => 'text',
|
113 |
+
'label' => __( 'Number Size', 'wpinked-widgets' ),
|
114 |
+
'default' => '',
|
115 |
+
'description' => __( 'Enter the units, eg: px, em, rem, ...', 'wpinked-widgets' ),
|
116 |
+
),
|
117 |
+
|
118 |
+
)
|
119 |
+
),
|
120 |
+
),
|
121 |
+
|
122 |
+
//The $base_folder path string.
|
123 |
+
plugin_dir_path(__FILE__)
|
124 |
+
);
|
125 |
+
}
|
126 |
+
|
127 |
+
function get_template_name($instance) {
|
128 |
+
return 'number';
|
129 |
+
}
|
130 |
+
|
131 |
+
function get_style_name($instance) {
|
132 |
+
return 'number';
|
133 |
+
}
|
134 |
+
|
135 |
+
function enqueue_frontend_scripts( $instance ) {
|
136 |
+
|
137 |
+
wp_enqueue_script( 'iw-countto-js' );
|
138 |
+
|
139 |
+
wp_enqueue_script( 'iw-num-js', siteorigin_widget_get_plugin_dir_url('ink-num-count') . 'scripts/countto.init.js', array( 'iw-countto-js', 'iw-waypoint-js' ), INKED_SO_WIDGETS, true );
|
140 |
+
|
141 |
+
parent::enqueue_frontend_scripts( $instance );
|
142 |
+
}
|
143 |
+
|
144 |
+
function get_less_variables($instance) {
|
145 |
+
if( empty( $instance ) ) return array();
|
146 |
+
|
147 |
+
return array(
|
148 |
+
'title' => $instance['styling']['title'],
|
149 |
+
't-pos' => $instance['number']['title-pos'],
|
150 |
+
'num' => $instance['styling']['number'],
|
151 |
+
'num-size' => $instance['styling']['number-size'],
|
152 |
+
);
|
153 |
+
}
|
154 |
+
|
155 |
+
}
|
156 |
+
|
157 |
+
siteorigin_widget_register('ink-num-count', __FILE__, 'Inked_Number_Counter_SO_Widget');
|
widgets/ink-numc-widget/scripts/countto.init.js
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
( function($) {
|
2 |
+
|
3 |
+
$(document).ready( function() {
|
4 |
+
|
5 |
+
$( '.iw-so-number-timer' ).waypoint( {
|
6 |
+
offset: '75%',
|
7 |
+
handler: function() {
|
8 |
+
$(this.element).countTo();
|
9 |
+
this.destroy()
|
10 |
+
}
|
11 |
+
} );
|
12 |
+
|
13 |
+
});
|
14 |
+
|
15 |
+
})( jQuery );
|
widgets/ink-numc-widget/styles/number.less
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
@title: inherit;
|
2 |
+
@num: inherit;
|
3 |
+
@num-size: inherit;
|
4 |
+
@t-pos: below;
|
5 |
+
|
6 |
+
.iw-so-number-title {
|
7 |
+
color: @title;
|
8 |
+
.position() when (@t-pos = above) { margin-top: 0; }
|
9 |
+
.position() when (@t-pos = below) { margin-bottom: 0; }
|
10 |
+
.position();
|
11 |
+
}
|
12 |
+
.iw-so-number-count {
|
13 |
+
color: @num;
|
14 |
+
font-size: @num-size;
|
15 |
+
line-height: @num-size;
|
16 |
+
margin: 0;
|
17 |
+
}
|
18 |
+
.iw-so-number {
|
19 |
+
padding: 30px 15px;
|
20 |
+
}
|
widgets/ink-numc-widget/tpl/number.php
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$number_attributes = array('data-refresh-interval' => '50' );
|
3 |
+
if(!empty($instance['number']['start'])) $number_attributes['data-from'] = esc_attr($instance['number']['start']);
|
4 |
+
if(!empty($instance['number']['end'])) $number_attributes['data-to'] = esc_attr($instance['number']['end']);
|
5 |
+
if(!empty($instance['number']['speed'])) $number_attributes['data-speed'] = esc_attr($instance['number']['speed']);
|
6 |
+
?>
|
7 |
+
|
8 |
+
<div class="iw-so-number">
|
9 |
+
|
10 |
+
<?php if ($instance['number']['title'] && $instance['number']['title-pos'] == 'above') : ?>
|
11 |
+
<h3 class="iw-so-number-title iw-text-center"><?php echo $instance['number']['title']; ?></h3>
|
12 |
+
<?php endif; ?>
|
13 |
+
|
14 |
+
<p class="iw-so-number-count iw-text-center">
|
15 |
+
<?php echo $instance['number']['prefix']; ?><span class="iw-so-number-timer" <?php foreach($number_attributes as $name => $val) echo $name . '="' . $val . '" ' ?>></span><?php echo $instance['number']['suffix']; ?>
|
16 |
+
</p>
|
17 |
+
|
18 |
+
<?php if ($instance['number']['title'] && $instance['number']['title-pos'] == 'below') : ?>
|
19 |
+
<h3 class="iw-so-number-title iw-text-center"><?php echo $instance['number']['title']; ?></h3>
|
20 |
+
<?php endif; ?>
|
21 |
+
|
22 |
+
</div>
|
widgets/ink-tabb-widget/ink-tabb-widget.php
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
<?php
|
2 |
|
3 |
/*
|
4 |
Widget Name: Inked Tabs
|
@@ -54,7 +54,7 @@ class Inked_Tabs_SO_Widget extends SiteOrigin_Widget {
|
|
54 |
'type' => 'text',
|
55 |
'label' => __('Title', 'wpinked-widgets'),
|
56 |
'default' => ''
|
57 |
-
),
|
58 |
|
59 |
'active' => array(
|
60 |
'type' => 'checkbox',
|
@@ -195,4 +195,4 @@ class Inked_Tabs_SO_Widget extends SiteOrigin_Widget {
|
|
195 |
|
196 |
}
|
197 |
|
198 |
-
siteorigin_widget_register('ink-tabs', __FILE__, 'Inked_Tabs_SO_Widget');
|
1 |
+
<?php
|
2 |
|
3 |
/*
|
4 |
Widget Name: Inked Tabs
|
54 |
'type' => 'text',
|
55 |
'label' => __('Title', 'wpinked-widgets'),
|
56 |
'default' => ''
|
57 |
+
),
|
58 |
|
59 |
'active' => array(
|
60 |
'type' => 'checkbox',
|
195 |
|
196 |
}
|
197 |
|
198 |
+
siteorigin_widget_register('ink-tabs', __FILE__, 'Inked_Tabs_SO_Widget');
|
widgets/ink-tabb-widget/tpl/tabs.php
CHANGED
@@ -6,12 +6,18 @@ if(!empty($instance['icon']['color'])) $icon_styles[] = 'color: '.$instance['ico
|
|
6 |
|
7 |
$tab_no = 1;
|
8 |
$cnt_no = 1;
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
?>
|
10 |
|
11 |
<ul class="tabs<?php echo ($instance['styling']['orientation'] == 'vertical' ? ' vertical' : ''); ?>" data-tab>
|
12 |
|
13 |
<?php foreach( $instance['tabs'] as $i => $tab ) { ?>
|
14 |
-
<li class="tab-title<?php echo ($tab['active'] == 1 ? ' active' : '' ); ?>"><a href="#<?php echo $
|
15 |
<?php echo siteorigin_widget_get_icon( $tab['icon'], $icon_styles ); ?>
|
16 |
<?php echo $tab['title']; ?>
|
17 |
</a></li>
|
@@ -22,10 +28,10 @@ $cnt_no = 1;
|
|
22 |
<div class="tabs-content<?php echo ($instance['styling']['orientation'] == 'vertical' ? ' vertical' : ''); ?>">
|
23 |
|
24 |
<?php foreach( $instance['tabs'] as $i => $tab ) : ?>
|
25 |
-
<div class="content<?php echo ($tab['active'] == 1 ? ' active' : '' ); ?>" id="<?php echo $
|
26 |
<?php echo $tab['content']; ?>
|
27 |
</div>
|
28 |
<?php $cnt_no++; ?>
|
29 |
<?php endforeach; ?>
|
30 |
|
31 |
-
</div>
|
6 |
|
7 |
$tab_no = 1;
|
8 |
$cnt_no = 1;
|
9 |
+
|
10 |
+
if( $instance['id'] ):
|
11 |
+
$unique = $instance['id'];
|
12 |
+
else :
|
13 |
+
$unique = 'tab-' . $instance['_sow_form_id'];
|
14 |
+
endif;
|
15 |
?>
|
16 |
|
17 |
<ul class="tabs<?php echo ($instance['styling']['orientation'] == 'vertical' ? ' vertical' : ''); ?>" data-tab>
|
18 |
|
19 |
<?php foreach( $instance['tabs'] as $i => $tab ) { ?>
|
20 |
+
<li class="tab-title<?php echo ($tab['active'] == 1 ? ' active' : '' ); ?>"><a href="#<?php echo $unique . '-' . $tab_no; ?>" href="#">
|
21 |
<?php echo siteorigin_widget_get_icon( $tab['icon'], $icon_styles ); ?>
|
22 |
<?php echo $tab['title']; ?>
|
23 |
</a></li>
|
28 |
<div class="tabs-content<?php echo ($instance['styling']['orientation'] == 'vertical' ? ' vertical' : ''); ?>">
|
29 |
|
30 |
<?php foreach( $instance['tabs'] as $i => $tab ) : ?>
|
31 |
+
<div class="content<?php echo ($tab['active'] == 1 ? ' active' : '' ); ?>" id="<?php echo $unique . '-' . $cnt_no; ?>">
|
32 |
<?php echo $tab['content']; ?>
|
33 |
</div>
|
34 |
<?php $cnt_no++; ?>
|
35 |
<?php endforeach; ?>
|
36 |
|
37 |
+
</div>
|