Version Description
Download this release
Release Info
Code changes from version 1.3.57 to 1.3.59
- admin/import/class-wordpress-importer.php +1378 -1378
- admin/includes/wpr-render-templates.php +250 -250
- admin/includes/wpr-templates-actions.php +12 -4
- admin/includes/wpr-templates-library.php +4 -4
- admin/includes/wpr-templates-shortcode.php +50 -50
- admin/plugin-options.php +2 -1
- admin/templates-kit.php +786 -706
- admin/templates/views/astra/class-astra-compat.php +84 -84
- admin/templates/views/storefront/class-storefront-compat.php +105 -105
- admin/templates/wpr-canvas.php +66 -66
- admin/templates/wpr-templates-data.php +890 -890
- admin/templates/wpr-templates-library-blocks.php +167 -167
- admin/templates/wpr-templates-library-pages.php +81 -0
- admin/templates/wpr-templates-library-popups.php +108 -108
- admin/templates/wpr-templates-pages.php +51 -51
- assets/css/admin/plugin-options.css +1131 -1131
- assets/css/admin/premade-blocks.css +442 -442
- assets/css/admin/wporg-theme-notice.css +2 -2
- assets/css/lib/animations/text-animations.css +843 -843
- assets/css/lib/animations/wpr-animations.css +1300 -1300
- assets/css/lib/animations/wpr-link-animations.css +191 -191
- assets/css/library-frontend.css +708 -708
- assets/css/library-frontend.min.css +711 -711
- assets/js/admin/lib/iconpicker/fontawesome-iconpicker.min.css +7 -7
- assets/js/admin/lib/iconpicker/fontawesome-iconpicker.min.js +3 -3
- assets/js/admin/lib/wp-color-picker-alpha.min.js +11 -11
- assets/js/editor.js +385 -385
- assets/js/editor.min.js +490 -490
- assets/js/lib/flipster/jquery.flipster.min.js +2 -2
- assets/js/lib/gmap/markerclusterer.js +1320 -1320
- assets/js/lib/jarallax/jarallax.js +1032 -1032
- assets/js/lib/jquery-event-move/jquery.event.move.js +584 -584
- assets/js/lib/lightgallery/lightgallery.js +1522 -2912
admin/import/class-wordpress-importer.php
CHANGED
@@ -1,1378 +1,1378 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
4 |
-
exit; // Exit if accessed directly.
|
5 |
-
}
|
6 |
-
|
7 |
-
if ( ! defined( 'WP_LOAD_IMPORTERS' ) )
|
8 |
-
return;
|
9 |
-
|
10 |
-
/** Display verbose errors */
|
11 |
-
define( 'IMPORT_DEBUG', false );
|
12 |
-
|
13 |
-
// Load Importer API
|
14 |
-
require_once ABSPATH . 'wp-admin/includes/import.php';
|
15 |
-
|
16 |
-
if ( ! class_exists( 'WP_Importer' ) ) {
|
17 |
-
$class_wp_importer = ABSPATH . 'wp-admin/includes/class-wp-importer.php';
|
18 |
-
if ( file_exists( $class_wp_importer ) )
|
19 |
-
require $class_wp_importer;
|
20 |
-
}
|
21 |
-
|
22 |
-
// include WXR file parsers
|
23 |
-
require WPR_ADDONS_PATH .'admin/import/class-parsers.php';
|
24 |
-
|
25 |
-
class WP_Import extends WP_Importer {
|
26 |
-
const DEFAULT_BUMP_REQUEST_TIMEOUT = 60;
|
27 |
-
const DEFAULT_ALLOW_CREATE_USERS = true;
|
28 |
-
const DEFAULT_IMPORT_ATTACHMENT_SIZE_LIMIT = 0; // 0 = unlimited.
|
29 |
-
|
30 |
-
/**
|
31 |
-
* @var string
|
32 |
-
*/
|
33 |
-
private $requested_file_path;
|
34 |
-
|
35 |
-
/**
|
36 |
-
* @var array
|
37 |
-
*/
|
38 |
-
private $args;
|
39 |
-
|
40 |
-
/**
|
41 |
-
* @var array
|
42 |
-
*/
|
43 |
-
private $output = [
|
44 |
-
'status' => 'failed',
|
45 |
-
'errors' => [],
|
46 |
-
];
|
47 |
-
|
48 |
-
/*
|
49 |
-
* WXR attachment ID
|
50 |
-
*/
|
51 |
-
private $id;
|
52 |
-
|
53 |
-
// Information to import from WXR file.
|
54 |
-
private $version;
|
55 |
-
private $authors = [];
|
56 |
-
private $posts = [];
|
57 |
-
private $terms = [];
|
58 |
-
private $categories = [];
|
59 |
-
private $tags = [];
|
60 |
-
private $base_url = '';
|
61 |
-
private $page_on_front;
|
62 |
-
|
63 |
-
// Mappings from old information to new.
|
64 |
-
private $processed_authors = [];
|
65 |
-
private $author_mapping = [];
|
66 |
-
private $processed_terms = [];
|
67 |
-
private $processed_posts = [];
|
68 |
-
private $post_orphans = [];
|
69 |
-
private $processed_menu_items = [];
|
70 |
-
private $menu_item_orphans = [];
|
71 |
-
private $missing_menu_items = [];
|
72 |
-
|
73 |
-
private $fetch_attachments = false;
|
74 |
-
private $url_remap = [];
|
75 |
-
private $featured_images = [];
|
76 |
-
|
77 |
-
/**
|
78 |
-
* Parses filename from a Content-Disposition header value.
|
79 |
-
*
|
80 |
-
* As per RFC6266:
|
81 |
-
*
|
82 |
-
* content-disposition = "Content-Disposition" ":"
|
83 |
-
* disposition-type *( ";" disposition-parm )
|
84 |
-
*
|
85 |
-
* disposition-type = "inline" | "attachment" | disp-ext-type
|
86 |
-
* ; case-insensitive
|
87 |
-
* disp-ext-type = token
|
88 |
-
*
|
89 |
-
* disposition-parm = filename-parm | disp-ext-parm
|
90 |
-
*
|
91 |
-
* filename-parm = "filename" "=" value
|
92 |
-
* | "filename*" "=" ext-value
|
93 |
-
*
|
94 |
-
* disp-ext-parm = token "=" value
|
95 |
-
* | ext-token "=" ext-value
|
96 |
-
* ext-token = <the characters in token, followed by "*">
|
97 |
-
*
|
98 |
-
* @param string[] $disposition_header List of Content-Disposition header values.
|
99 |
-
*
|
100 |
-
* @return string|null Filename if available, or null if not found.
|
101 |
-
* @link http://tools.ietf.org/html/rfc2388
|
102 |
-
* @link http://tools.ietf.org/html/rfc6266
|
103 |
-
*
|
104 |
-
* @see WP_REST_Attachments_Controller::get_filename_from_disposition()
|
105 |
-
*
|
106 |
-
*/
|
107 |
-
protected static function get_filename_from_disposition( $disposition_header ) {
|
108 |
-
// Get the filename.
|
109 |
-
$filename = null;
|
110 |
-
|
111 |
-
foreach ( $disposition_header as $value ) {
|
112 |
-
$value = trim( $value );
|
113 |
-
|
114 |
-
if ( strpos( $value, ';' ) === false ) {
|
115 |
-
continue;
|
116 |
-
}
|
117 |
-
|
118 |
-
list( $type, $attr_parts ) = explode( ';', $value, 2 );
|
119 |
-
|
120 |
-
$attr_parts = explode( ';', $attr_parts );
|
121 |
-
$attributes = [];
|
122 |
-
|
123 |
-
foreach ( $attr_parts as $part ) {
|
124 |
-
if ( strpos( $part, '=' ) === false ) {
|
125 |
-
continue;
|
126 |
-
}
|
127 |
-
|
128 |
-
list( $key, $value ) = explode( '=', $part, 2 );
|
129 |
-
|
130 |
-
$attributes[ trim( $key ) ] = trim( $value );
|
131 |
-
}
|
132 |
-
|
133 |
-
if ( empty( $attributes['filename'] ) ) {
|
134 |
-
continue;
|
135 |
-
}
|
136 |
-
|
137 |
-
$filename = trim( $attributes['filename'] );
|
138 |
-
|
139 |
-
// Unquote quoted filename, but after trimming.
|
140 |
-
if ( substr( $filename, 0, 1 ) === '"' && substr( $filename, -1, 1 ) === '"' ) {
|
141 |
-
$filename = substr( $filename, 1, -1 );
|
142 |
-
}
|
143 |
-
}
|
144 |
-
|
145 |
-
return $filename;
|
146 |
-
}
|
147 |
-
|
148 |
-
/**
|
149 |
-
* Retrieves file extension by mime type.
|
150 |
-
*
|
151 |
-
* @param string $mime_type Mime type to search extension for.
|
152 |
-
*
|
153 |
-
* @return string|null File extension if available, or null if not found.
|
154 |
-
*/
|
155 |
-
protected static function get_file_extension_by_mime_type( $mime_type ) {
|
156 |
-
static $map = null;
|
157 |
-
|
158 |
-
if ( is_array( $map ) ) {
|
159 |
-
return isset( $map[ $mime_type ] ) ? $map[ $mime_type ] : null;
|
160 |
-
}
|
161 |
-
|
162 |
-
$mime_types = wp_get_mime_types();
|
163 |
-
$map = array_flip( $mime_types );
|
164 |
-
|
165 |
-
// Some types have multiple extensions, use only the first one.
|
166 |
-
foreach ( $map as $type => $extensions ) {
|
167 |
-
$map[ $type ] = strtok( $extensions, '|' );
|
168 |
-
}
|
169 |
-
|
170 |
-
return isset( $map[ $mime_type ] ) ? $map[ $mime_type ] : null;
|
171 |
-
}
|
172 |
-
|
173 |
-
/**
|
174 |
-
* The main controller for the actual import stage.
|
175 |
-
*
|
176 |
-
* @param string $file Path to the WXR file for importing
|
177 |
-
*/
|
178 |
-
private function import( $file ) {
|
179 |
-
add_filter( 'import_post_meta_key', function ( $key ) {
|
180 |
-
return $this->is_valid_meta_key( $key );
|
181 |
-
} );
|
182 |
-
add_filter( 'http_request_timeout', function () {
|
183 |
-
return self::DEFAULT_BUMP_REQUEST_TIMEOUT;
|
184 |
-
} );
|
185 |
-
|
186 |
-
if ( ! $this->import_start( $file ) ) {
|
187 |
-
return;
|
188 |
-
}
|
189 |
-
|
190 |
-
$this->set_author_mapping();
|
191 |
-
|
192 |
-
wp_suspend_cache_invalidation( true );
|
193 |
-
$imported_summary = [
|
194 |
-
'categories' => $this->process_categories(),
|
195 |
-
'tags' => $this->process_tags(),
|
196 |
-
'terms' => $this->process_terms(),
|
197 |
-
'posts' => $this->process_posts(),
|
198 |
-
];
|
199 |
-
wp_suspend_cache_invalidation( false );
|
200 |
-
|
201 |
-
// Update incorrect/missing information in the DB.
|
202 |
-
$this->backfill_parents();
|
203 |
-
$this->backfill_attachment_urls();
|
204 |
-
$this->remap_featured_images();
|
205 |
-
|
206 |
-
$this->import_end();
|
207 |
-
|
208 |
-
$is_some_succeed = false;
|
209 |
-
foreach ( $imported_summary as $item ) {
|
210 |
-
if ( $item > 0 ) {
|
211 |
-
$is_some_succeed = true;
|
212 |
-
break;
|
213 |
-
}
|
214 |
-
}
|
215 |
-
|
216 |
-
if ( $is_some_succeed ) {
|
217 |
-
$this->output['status'] = 'success';
|
218 |
-
$this->output['summary'] = $imported_summary;
|
219 |
-
}
|
220 |
-
}
|
221 |
-
|
222 |
-
/**
|
223 |
-
* Parses the WXR file and prepares us for the task of processing parsed data.
|
224 |
-
*
|
225 |
-
* @param string $file Path to the WXR file for importing
|
226 |
-
*/
|
227 |
-
private function import_start( $file ) {
|
228 |
-
if ( ! is_file( $file ) ) {
|
229 |
-
$this->output['errors'] = [ esc_html__( 'The file does not exist, please try again.', 'wpr-addons' ) ];
|
230 |
-
|
231 |
-
return false;
|
232 |
-
}
|
233 |
-
|
234 |
-
$import_data = $this->parse( $file );
|
235 |
-
|
236 |
-
if ( is_wp_error( $import_data ) ) {
|
237 |
-
$this->output['errors'] = [ $import_data->get_error_message() ];
|
238 |
-
|
239 |
-
return false;
|
240 |
-
}
|
241 |
-
|
242 |
-
$this->version = $import_data['version'];
|
243 |
-
$this->set_authors_from_import( $import_data );
|
244 |
-
$this->posts = $import_data['posts'];
|
245 |
-
$this->terms = $import_data['terms'];
|
246 |
-
$this->categories = $import_data['categories'];
|
247 |
-
$this->tags = $import_data['tags'];
|
248 |
-
$this->base_url = esc_url( $import_data['base_url'] );
|
249 |
-
$this->page_on_front = $import_data['page_on_front'];
|
250 |
-
|
251 |
-
wp_defer_term_counting( true );
|
252 |
-
wp_defer_comment_counting( true );
|
253 |
-
|
254 |
-
do_action( 'import_start' );
|
255 |
-
|
256 |
-
return true;
|
257 |
-
}
|
258 |
-
|
259 |
-
/**
|
260 |
-
* Performs post-import cleanup of files and the cache
|
261 |
-
*/
|
262 |
-
private function import_end() {
|
263 |
-
wp_import_cleanup( $this->id );
|
264 |
-
|
265 |
-
wp_cache_flush();
|
266 |
-
|
267 |
-
foreach ( get_taxonomies() as $tax ) {
|
268 |
-
delete_option( "{$tax}_children" );
|
269 |
-
_get_term_hierarchy( $tax );
|
270 |
-
}
|
271 |
-
|
272 |
-
wp_defer_term_counting( false );
|
273 |
-
wp_defer_comment_counting( false );
|
274 |
-
|
275 |
-
do_action( 'import_end' );
|
276 |
-
}
|
277 |
-
|
278 |
-
/**
|
279 |
-
* Retrieve authors from parsed WXR data and set it to `$this->>authors`.
|
280 |
-
*
|
281 |
-
* Uses the provided author information from WXR 1.1 files
|
282 |
-
* or extracts info from each post for WXR 1.0 files
|
283 |
-
*
|
284 |
-
* @param array $import_data Data returned by a WXR parser
|
285 |
-
*/
|
286 |
-
private function set_authors_from_import( $import_data ) {
|
287 |
-
if ( ! empty( $import_data['authors'] ) ) {
|
288 |
-
$this->authors = $import_data['authors'];
|
289 |
-
// No author information, grab it from the posts.
|
290 |
-
} else {
|
291 |
-
foreach ( $import_data['posts'] as $post ) {
|
292 |
-
$login = sanitize_user( $post['post_author'], true );
|
293 |
-
|
294 |
-
if ( empty( $login ) ) {
|
295 |
-
/* translators: %s: Post author. */
|
296 |
-
$this->output['errors'][] = sprintf( esc_html__( 'Failed to import author %s. Their posts will be attributed to the current user.', 'wpr-addons' ), $post['post_author'] );
|
297 |
-
continue;
|
298 |
-
}
|
299 |
-
|
300 |
-
if ( ! isset( $this->authors[ $login ] ) ) {
|
301 |
-
$this->authors[ $login ] = [
|
302 |
-
'author_login' => $login,
|
303 |
-
'author_display_name' => $post['post_author'],
|
304 |
-
];
|
305 |
-
}
|
306 |
-
}
|
307 |
-
}
|
308 |
-
}
|
309 |
-
|
310 |
-
/**
|
311 |
-
* Map old author logins to local user IDs based on decisions made
|
312 |
-
* in import options form. Can map to an existing user, create a new user
|
313 |
-
* or falls back to the current user in case of error with either of the previous
|
314 |
-
*/
|
315 |
-
private function set_author_mapping() {
|
316 |
-
if ( ! isset( $this->args['imported_authors'] ) ) {
|
317 |
-
return;
|
318 |
-
}
|
319 |
-
|
320 |
-
$create_users = apply_filters( 'import_allow_create_users', self::DEFAULT_ALLOW_CREATE_USERS );
|
321 |
-
|
322 |
-
foreach ( (array) $this->args['imported_authors'] as $i => $old_login ) {
|
323 |
-
// Multisite adds strtolower to sanitize_user. Need to sanitize here to stop breakage in process_posts.
|
324 |
-
$santized_old_login = sanitize_user( $old_login, true );
|
325 |
-
$old_id = isset( $this->authors[ $old_login ]['author_id'] ) ? intval( $this->authors[ $old_login ]['author_id'] ) : false;
|
326 |
-
|
327 |
-
if ( ! empty( $this->args['user_map'][ $i ] ) ) {
|
328 |
-
$user = get_userdata( intval( $this->args['user_map'][ $i ] ) );
|
329 |
-
if ( isset( $user->ID ) ) {
|
330 |
-
if ( $old_id ) {
|
331 |
-
$this->processed_authors[ $old_id ] = $user->ID;
|
332 |
-
}
|
333 |
-
$this->author_mapping[ $santized_old_login ] = $user->ID;
|
334 |
-
}
|
335 |
-
} elseif ( $create_users ) {
|
336 |
-
$user_id = 0;
|
337 |
-
if ( ! empty( $this->args['user_new'][ $i ] ) ) {
|
338 |
-
$user_id = wp_create_user( $this->args['user_new'][ $i ], wp_generate_password() );
|
339 |
-
} elseif ( '1.0' !== $this->version ) {
|
340 |
-
$user_data = [
|
341 |
-
'user_login' => $old_login,
|
342 |
-
'user_pass' => wp_generate_password(),
|
343 |
-
'user_email' => isset( $this->authors[ $old_login ]['author_email'] ) ? $this->authors[ $old_login ]['author_email'] : '',
|
344 |
-
'display_name' => $this->authors[ $old_login ]['author_display_name'],
|
345 |
-
'first_name' => isset( $this->authors[ $old_login ]['author_first_name'] ) ? $this->authors[ $old_login ]['author_first_name'] : '',
|
346 |
-
'last_name' => isset( $this->authors[ $old_login ]['author_last_name'] ) ? $this->authors[ $old_login ]['author_last_name'] : '',
|
347 |
-
];
|
348 |
-
$user_id = wp_insert_user( $user_data );
|
349 |
-
}
|
350 |
-
|
351 |
-
if ( ! is_wp_error( $user_id ) ) {
|
352 |
-
if ( $old_id ) {
|
353 |
-
$this->processed_authors[ $old_id ] = $user_id;
|
354 |
-
}
|
355 |
-
$this->author_mapping[ $santized_old_login ] = $user_id;
|
356 |
-
} else {
|
357 |
-
/* translators: %s: Author display name. */
|
358 |
-
$error = sprintf( esc_html__( 'Failed to create new user for %s. Their posts will be attributed to the current user.', 'wpr-addons' ), $this->authors[ $old_login ]['author_display_name'] );
|
359 |
-
|
360 |
-
if ( defined( 'IMPORT_DEBUG' ) && IMPORT_DEBUG ) {
|
361 |
-
$error .= PHP_EOL . $user_id->get_error_message();
|
362 |
-
}
|
363 |
-
|
364 |
-
$this->output['errors'][] = $error;
|
365 |
-
}
|
366 |
-
}
|
367 |
-
|
368 |
-
// Failsafe: if the user_id was invalid, default to the current user.
|
369 |
-
if ( ! isset( $this->author_mapping[ $santized_old_login ] ) ) {
|
370 |
-
if ( $old_id ) {
|
371 |
-
$this->processed_authors[ $old_id ] = (int) get_current_user_id();
|
372 |
-
}
|
373 |
-
$this->author_mapping[ $santized_old_login ] = (int) get_current_user_id();
|
374 |
-
}
|
375 |
-
}
|
376 |
-
}
|
377 |
-
|
378 |
-
/**
|
379 |
-
* Create new categories based on import information
|
380 |
-
*
|
381 |
-
* Doesn't create a new category if its slug already exists
|
382 |
-
*
|
383 |
-
* @return int number of imported categories.
|
384 |
-
*/
|
385 |
-
private function process_categories() {
|
386 |
-
$result = 0;
|
387 |
-
|
388 |
-
$this->categories = apply_filters( 'wp_import_categories', $this->categories );
|
389 |
-
|
390 |
-
if ( empty( $this->categories ) ) {
|
391 |
-
return $result;
|
392 |
-
}
|
393 |
-
|
394 |
-
foreach ( $this->categories as $cat ) {
|
395 |
-
// if the category already exists leave it alone
|
396 |
-
$term_id = term_exists( $cat['category_nicename'], 'category' );
|
397 |
-
if ( $term_id ) {
|
398 |
-
if ( is_array( $term_id ) ) {
|
399 |
-
$term_id = $term_id['term_id'];
|
400 |
-
}
|
401 |
-
if ( isset( $cat['term_id'] ) ) {
|
402 |
-
$this->processed_terms[ intval( $cat['term_id'] ) ] = (int) $term_id;
|
403 |
-
}
|
404 |
-
continue;
|
405 |
-
}
|
406 |
-
|
407 |
-
$parent = empty( $cat['category_parent'] ) ? 0 : category_exists( $cat['category_parent'] );
|
408 |
-
$description = isset( $cat['category_description'] ) ? $cat['category_description'] : '';
|
409 |
-
|
410 |
-
$data = [
|
411 |
-
'category_nicename' => $cat['category_nicename'],
|
412 |
-
'category_parent' => $parent,
|
413 |
-
'cat_name' => wp_slash( $cat['cat_name'] ),
|
414 |
-
'category_description' => wp_slash( $description ),
|
415 |
-
];
|
416 |
-
|
417 |
-
$id = wp_insert_category( $data );
|
418 |
-
if ( ! is_wp_error( $id ) && $id > 0 ) {
|
419 |
-
if ( isset( $cat['term_id'] ) ) {
|
420 |
-
$this->processed_terms[ intval( $cat['term_id'] ) ] = $id;
|
421 |
-
}
|
422 |
-
$result++;
|
423 |
-
} else {
|
424 |
-
/* translators: %s: Category name. */
|
425 |
-
$error = sprintf( esc_html__( 'Failed to import category %s', 'wpr-addons' ), $cat['category_nicename'] );
|
426 |
-
|
427 |
-
if ( defined( 'IMPORT_DEBUG' ) && IMPORT_DEBUG ) {
|
428 |
-
$error .= PHP_EOL . $id->get_error_message();
|
429 |
-
}
|
430 |
-
|
431 |
-
$this->output['errors'][] = $error;
|
432 |
-
continue;
|
433 |
-
}
|
434 |
-
|
435 |
-
$this->process_termmeta( $cat, $id );
|
436 |
-
add_term_meta( $id, '_wpr_demo_import_item', true );
|
437 |
-
}
|
438 |
-
|
439 |
-
unset( $this->categories );
|
440 |
-
|
441 |
-
return $result;
|
442 |
-
}
|
443 |
-
|
444 |
-
/**
|
445 |
-
* Create new post tags based on import information
|
446 |
-
*
|
447 |
-
* Doesn't create a tag if its slug already exists
|
448 |
-
*
|
449 |
-
* @return int number of imported tags.
|
450 |
-
*/
|
451 |
-
private function process_tags() {
|
452 |
-
$result = 0;
|
453 |
-
|
454 |
-
$this->tags = apply_filters( 'wp_import_tags', $this->tags );
|
455 |
-
|
456 |
-
if ( empty( $this->tags ) ) {
|
457 |
-
return $result;
|
458 |
-
}
|
459 |
-
|
460 |
-
foreach ( $this->tags as $tag ) {
|
461 |
-
// if the tag already exists leave it alone
|
462 |
-
$term_id = term_exists( $tag['tag_slug'], 'post_tag' );
|
463 |
-
if ( $term_id ) {
|
464 |
-
if ( is_array( $term_id ) ) {
|
465 |
-
$term_id = $term_id['term_id'];
|
466 |
-
}
|
467 |
-
if ( isset( $tag['term_id'] ) ) {
|
468 |
-
$this->processed_terms[ intval( $tag['term_id'] ) ] = (int) $term_id;
|
469 |
-
}
|
470 |
-
continue;
|
471 |
-
}
|
472 |
-
|
473 |
-
$description = isset( $tag['tag_description'] ) ? $tag['tag_description'] : '';
|
474 |
-
$args = [
|
475 |
-
'slug' => $tag['tag_slug'],
|
476 |
-
'description' => wp_slash( $description ),
|
477 |
-
];
|
478 |
-
|
479 |
-
$id = wp_insert_term( wp_slash( $tag['tag_name'] ), 'post_tag', $args );
|
480 |
-
if ( ! is_wp_error( $id ) ) {
|
481 |
-
if ( isset( $tag['term_id'] ) ) {
|
482 |
-
$this->processed_terms[ intval( $tag['term_id'] ) ] = $id['term_id'];
|
483 |
-
}
|
484 |
-
$result++;
|
485 |
-
} else {
|
486 |
-
/* translators: %s: Tag name. */
|
487 |
-
$error = sprintf( esc_html__( 'Failed to import post tag %s', 'wpr-addons' ), $tag['tag_name'] );
|
488 |
-
|
489 |
-
if ( defined( 'IMPORT_DEBUG' ) && IMPORT_DEBUG ) {
|
490 |
-
$error .= PHP_EOL . $id->get_error_message();
|
491 |
-
}
|
492 |
-
|
493 |
-
$this->output['errors'][] = $error;
|
494 |
-
continue;
|
495 |
-
}
|
496 |
-
|
497 |
-
$this->process_termmeta( $tag, $id['term_id'] );
|
498 |
-
add_term_meta( $id['term_id'], '_wpr_demo_import_item', true );
|
499 |
-
}
|
500 |
-
|
501 |
-
unset( $this->tags );
|
502 |
-
|
503 |
-
return $result;
|
504 |
-
}
|
505 |
-
|
506 |
-
/**
|
507 |
-
* Create new terms based on import information
|
508 |
-
*
|
509 |
-
* Doesn't create a term its slug already exists
|
510 |
-
*
|
511 |
-
* @return int number of imported terms.
|
512 |
-
*/
|
513 |
-
private function process_terms() {
|
514 |
-
$result = 0;
|
515 |
-
|
516 |
-
$this->terms = apply_filters( 'wp_import_terms', $this->terms );
|
517 |
-
|
518 |
-
if ( empty( $this->terms ) ) {
|
519 |
-
return $result;
|
520 |
-
}
|
521 |
-
|
522 |
-
foreach ( $this->terms as $term ) {
|
523 |
-
// if the term already exists in the correct taxonomy leave it alone
|
524 |
-
$term_id = term_exists( $term['slug'], $term['term_taxonomy'] );
|
525 |
-
if ( $term_id ) {
|
526 |
-
if ( is_array( $term_id ) ) {
|
527 |
-
$term_id = $term_id['term_id'];
|
528 |
-
}
|
529 |
-
if ( isset( $term['term_id'] ) ) {
|
530 |
-
$this->processed_terms[ intval( $term['term_id'] ) ] = (int) $term_id;
|
531 |
-
}
|
532 |
-
continue;
|
533 |
-
}
|
534 |
-
|
535 |
-
if ( empty( $term['term_parent'] ) ) {
|
536 |
-
$parent = 0;
|
537 |
-
} else {
|
538 |
-
$parent = term_exists( $term['term_parent'], $term['term_taxonomy'] );
|
539 |
-
if ( is_array( $parent ) ) {
|
540 |
-
$parent = $parent['term_id'];
|
541 |
-
}
|
542 |
-
}
|
543 |
-
|
544 |
-
$description = isset( $term['term_description'] ) ? $term['term_description'] : '';
|
545 |
-
$args = [
|
546 |
-
'slug' => $term['slug'],
|
547 |
-
'description' => wp_slash( $description ),
|
548 |
-
'parent' => (int) $parent,
|
549 |
-
];
|
550 |
-
|
551 |
-
$id = wp_insert_term( wp_slash( $term['term_name'] ), $term['term_taxonomy'], $args );
|
552 |
-
if ( ! is_wp_error( $id ) ) {
|
553 |
-
if ( isset( $term['term_id'] ) ) {
|
554 |
-
$this->processed_terms[ intval( $term['term_id'] ) ] = $id['term_id'];
|
555 |
-
}
|
556 |
-
$result++;
|
557 |
-
} else {
|
558 |
-
/* translators: 1: Term taxonomy, 2: Term name. */
|
559 |
-
$error = sprintf( esc_html__( 'Failed to import %1$s %2$s', 'wpr-addons' ), $term['term_taxonomy'], $term['term_name'] );
|
560 |
-
|
561 |
-
if ( defined( 'IMPORT_DEBUG' ) && IMPORT_DEBUG ) {
|
562 |
-
$error .= PHP_EOL . $id->get_error_message();
|
563 |
-
}
|
564 |
-
|
565 |
-
$this->output['errors'][] = $error;
|
566 |
-
continue;
|
567 |
-
}
|
568 |
-
|
569 |
-
$this->process_termmeta( $term, $id['term_id'] );
|
570 |
-
add_term_meta( $id['term_id'], '_wpr_demo_import_item', true );
|
571 |
-
}
|
572 |
-
|
573 |
-
unset( $this->terms );
|
574 |
-
|
575 |
-
return $result;
|
576 |
-
}
|
577 |
-
|
578 |
-
/**
|
579 |
-
* Add metadata to imported term.
|
580 |
-
*
|
581 |
-
* @param array $term Term data from WXR import.
|
582 |
-
* @param int $term_id ID of the newly created term.
|
583 |
-
*/
|
584 |
-
private function process_termmeta( $term, $term_id ) {
|
585 |
-
if ( ! function_exists( 'add_term_meta' ) ) {
|
586 |
-
return;
|
587 |
-
}
|
588 |
-
|
589 |
-
if ( ! isset( $term['termmeta'] ) ) {
|
590 |
-
$term['termmeta'] = [];
|
591 |
-
}
|
592 |
-
|
593 |
-
/**
|
594 |
-
* Filters the metadata attached to an imported term.
|
595 |
-
*
|
596 |
-
* @param array $termmeta Array of term meta.
|
597 |
-
* @param int $term_id ID of the newly created term.
|
598 |
-
* @param array $term Term data from the WXR import.
|
599 |
-
*/
|
600 |
-
$term['termmeta'] = apply_filters( 'wp_import_term_meta', $term['termmeta'], $term_id, $term );
|
601 |
-
|
602 |
-
if ( empty( $term['termmeta'] ) ) {
|
603 |
-
return;
|
604 |
-
}
|
605 |
-
|
606 |
-
foreach ( $term['termmeta'] as $meta ) {
|
607 |
-
/**
|
608 |
-
* Filters the meta key for an imported piece of term meta.
|
609 |
-
*
|
610 |
-
* @param string $meta_key Meta key.
|
611 |
-
* @param int $term_id ID of the newly created term.
|
612 |
-
* @param array $term Term data from the WXR import.
|
613 |
-
*/
|
614 |
-
$key = apply_filters( 'import_term_meta_key', $meta['key'], $term_id, $term );
|
615 |
-
if ( ! $key ) {
|
616 |
-
continue;
|
617 |
-
}
|
618 |
-
|
619 |
-
// Export gets meta straight from the DB so could have a serialized string
|
620 |
-
$value = maybe_unserialize( $meta['value'] );
|
621 |
-
|
622 |
-
add_term_meta( $term_id, wp_slash( $key ), wp_slash_strings_only( $value ) );
|
623 |
-
|
624 |
-
/**
|
625 |
-
* Fires after term meta is imported.
|
626 |
-
*
|
627 |
-
* @param int $term_id ID of the newly created term.
|
628 |
-
* @param string $key Meta key.
|
629 |
-
* @param mixed $value Meta value.
|
630 |
-
*/
|
631 |
-
do_action( 'import_term_meta', $term_id, $key, $value );
|
632 |
-
}
|
633 |
-
}
|
634 |
-
|
635 |
-
/**
|
636 |
-
* Create new posts based on import information
|
637 |
-
*
|
638 |
-
* Posts marked as having a parent which doesn't exist will become top level items.
|
639 |
-
* Doesn't create a new post if: the post type doesn't exist, the given post ID
|
640 |
-
* is already noted as imported or a post with the same title and date already exists.
|
641 |
-
* Note that new/updated terms, comments and meta are imported for the last of the above.
|
642 |
-
*
|
643 |
-
* @return array the ids of succeed/failed imported posts.
|
644 |
-
*/
|
645 |
-
private function process_posts() {
|
646 |
-
$result = [
|
647 |
-
'succeed' => [],
|
648 |
-
'failed' => [],
|
649 |
-
];
|
650 |
-
|
651 |
-
$this->posts = apply_filters( 'wp_import_posts', $this->posts );
|
652 |
-
|
653 |
-
foreach ( $this->posts as $post ) {
|
654 |
-
$post = apply_filters( 'wp_import_post_data_raw', $post );
|
655 |
-
|
656 |
-
if ( ! post_type_exists( $post['post_type'] ) ) {
|
657 |
-
/* translators: 1: Post title, 2: Post type. */
|
658 |
-
$this->output['errors'][] = sprintf( esc_html__( 'Failed to import %1$s: Invalid post type %2$s', 'wpr-addons' ), $post['post_title'], $post['post_type'] );
|
659 |
-
do_action( 'wp_import_post_exists', $post );
|
660 |
-
continue;
|
661 |
-
}
|
662 |
-
|
663 |
-
if ( isset( $this->processed_posts[ $post['post_id'] ] ) && ! empty( $post['post_id'] ) ) {
|
664 |
-
continue;
|
665 |
-
}
|
666 |
-
|
667 |
-
if ( 'auto-draft' === $post['status'] ) {
|
668 |
-
continue;
|
669 |
-
}
|
670 |
-
|
671 |
-
if ( 'nav_menu_item' === $post['post_type'] ) {
|
672 |
-
$this->process_menu_item( $post );
|
673 |
-
continue;
|
674 |
-
}
|
675 |
-
|
676 |
-
$post_type_object = get_post_type_object( $post['post_type'] );
|
677 |
-
|
678 |
-
$post_parent = (int) $post['post_parent'];
|
679 |
-
if ( $post_parent ) {
|
680 |
-
// if we already know the parent, map it to the new local ID.
|
681 |
-
if ( isset( $this->processed_posts[ $post_parent ] ) ) {
|
682 |
-
$post_parent = $this->processed_posts[ $post_parent ];
|
683 |
-
// otherwise record the parent for later.
|
684 |
-
} else {
|
685 |
-
$this->post_orphans[ intval( $post['post_id'] ) ] = $post_parent;
|
686 |
-
$post_parent = 0;
|
687 |
-
}
|
688 |
-
}
|
689 |
-
|
690 |
-
// Map the post author.
|
691 |
-
$author = sanitize_user( $post['post_author'], true );
|
692 |
-
if ( isset( $this->author_mapping[ $author ] ) ) {
|
693 |
-
$author = $this->author_mapping[ $author ];
|
694 |
-
} else {
|
695 |
-
$author = (int) get_current_user_id();
|
696 |
-
}
|
697 |
-
|
698 |
-
$postdata = [
|
699 |
-
'import_id' => $post['post_id'],
|
700 |
-
'post_author' => $author,
|
701 |
-
'post_content' => $post['post_content'],
|
702 |
-
'post_excerpt' => $post['post_excerpt'],
|
703 |
-
'post_title' => $post['post_title'],
|
704 |
-
'post_status' => $post['status'],
|
705 |
-
'post_name' => $post['post_name'],
|
706 |
-
'comment_status' => $post['comment_status'],
|
707 |
-
'ping_status' => $post['ping_status'],
|
708 |
-
'guid' => $post['guid'],
|
709 |
-
'post_parent' => $post_parent,
|
710 |
-
'menu_order' => $post['menu_order'],
|
711 |
-
'post_type' => $post['post_type'],
|
712 |
-
'post_password' => $post['post_password'],
|
713 |
-
'post_date' => $post['post_date'],
|
714 |
-
];
|
715 |
-
|
716 |
-
$original_post_id = $post['post_id'];
|
717 |
-
$postdata = apply_filters( 'wp_import_post_data_processed', $postdata, $post );
|
718 |
-
|
719 |
-
$postdata = wp_slash( $postdata );
|
720 |
-
|
721 |
-
if ( 'attachment' === $postdata['post_type'] ) {
|
722 |
-
$remote_url = ! empty( $post['attachment_url'] ) ? $post['attachment_url'] : $post['guid'];
|
723 |
-
|
724 |
-
// try to use _wp_attached file for upload folder placement to ensure the same location as the export site
|
725 |
-
// e.g. location is 2003/05/image.jpg but the attachment post_date is 2010/09, see media_handle_upload()
|
726 |
-
$postdata['upload_date'] = $post['post_date'];
|
727 |
-
if ( isset( $post['postmeta'] ) ) {
|
728 |
-
foreach ( $post['postmeta'] as $meta ) {
|
729 |
-
if ( '_wp_attached_file' === $meta['key'] ) {
|
730 |
-
if ( preg_match( '%^[0-9]{4}/[0-9]{2}%', $meta['value'], $matches ) ) {
|
731 |
-
$postdata['upload_date'] = $matches[0];
|
732 |
-
}
|
733 |
-
break;
|
734 |
-
}
|
735 |
-
}
|
736 |
-
}
|
737 |
-
|
738 |
-
$post_id = $this->process_attachment( $postdata, $remote_url );
|
739 |
-
$comment_post_id = $post_id;
|
740 |
-
} else {
|
741 |
-
$post_id = wp_insert_post( $postdata, true );
|
742 |
-
$comment_post_id = $post_id;
|
743 |
-
do_action( 'wp_import_insert_post', $post_id, $original_post_id, $postdata, $post );
|
744 |
-
}
|
745 |
-
|
746 |
-
if ( is_wp_error( $post_id ) ) {
|
747 |
-
/* translators: 1: Post type singular label, 2: Post title. */
|
748 |
-
$error = sprintf( __( 'Failed to import %1$s %2$s', 'wpr-addons' ), $post_type_object->labels->singular_name, $post['post_title'] );
|
749 |
-
|
750 |
-
if ( defined( 'IMPORT_DEBUG' ) && IMPORT_DEBUG ) {
|
751 |
-
$error .= PHP_EOL . $post_id->get_error_message();
|
752 |
-
}
|
753 |
-
|
754 |
-
$result['failed'][] = $original_post_id;
|
755 |
-
|
756 |
-
$this->output['errors'][] = $error;
|
757 |
-
|
758 |
-
continue;
|
759 |
-
}
|
760 |
-
|
761 |
-
$result['succeed'][ $original_post_id ] = $post_id;
|
762 |
-
|
763 |
-
if ( 1 === $post['is_sticky'] ) {
|
764 |
-
stick_post( $post_id );
|
765 |
-
}
|
766 |
-
|
767 |
-
if ( $this->page_on_front === $original_post_id ) {
|
768 |
-
update_option( 'page_on_front', $post_id );
|
769 |
-
}
|
770 |
-
|
771 |
-
// Map pre-import ID to local ID.
|
772 |
-
$this->processed_posts[ intval( $post['post_id'] ) ] = (int) $post_id;
|
773 |
-
|
774 |
-
if ( ! isset( $post['terms'] ) ) {
|
775 |
-
$post['terms'] = [];
|
776 |
-
}
|
777 |
-
|
778 |
-
$post['terms'] = apply_filters( 'wp_import_post_terms', $post['terms'], $post_id, $post );
|
779 |
-
|
780 |
-
// add categories, tags and other terms
|
781 |
-
if ( ! empty( $post['terms'] ) ) {
|
782 |
-
$terms_to_set = [];
|
783 |
-
foreach ( $post['terms'] as $term ) {
|
784 |
-
// back compat with WXR 1.0 map 'tag' to 'post_tag'
|
785 |
-
$taxonomy = ( 'tag' === $term['domain'] ) ? 'post_tag' : $term['domain'];
|
786 |
-
$term_exists = term_exists( $term['slug'], $taxonomy );
|
787 |
-
$term_id = is_array( $term_exists ) ? $term_exists['term_id'] : $term_exists;
|
788 |
-
if ( ! $term_id ) {
|
789 |
-
$t = wp_insert_term( $term['name'], $taxonomy, [ 'slug' => $term['slug'] ] );
|
790 |
-
if ( ! is_wp_error( $t ) ) {
|
791 |
-
$term_id = $t['term_id'];
|
792 |
-
do_action( 'wp_import_insert_term', $t, $term, $post_id, $post );
|
793 |
-
} else {
|
794 |
-
/* translators: 1: Taxonomy name, 2: Term name. */
|
795 |
-
$error = sprintf( esc_html__( 'Failed to import %1$s %2$s', 'wpr-addons' ), $taxonomy, $term['name'] );
|
796 |
-
|
797 |
-
if ( defined( 'IMPORT_DEBUG' ) && IMPORT_DEBUG ) {
|
798 |
-
$error .= PHP_EOL . $t->get_error_message();
|
799 |
-
}
|
800 |
-
|
801 |
-
$this->output['errors'][] = $error;
|
802 |
-
|
803 |
-
do_action( 'wp_import_insert_term_failed', $t, $term, $post_id, $post );
|
804 |
-
continue;
|
805 |
-
}
|
806 |
-
}
|
807 |
-
$terms_to_set[ $taxonomy ][] = intval( $term_id );
|
808 |
-
}
|
809 |
-
|
810 |
-
foreach ( $terms_to_set as $tax => $ids ) {
|
811 |
-
$tt_ids = wp_set_post_terms( $post_id, $ids, $tax );
|
812 |
-
do_action( 'wp_import_set_post_terms', $tt_ids, $ids, $tax, $post_id, $post );
|
813 |
-
}
|
814 |
-
unset( $post['terms'], $terms_to_set );
|
815 |
-
}
|
816 |
-
|
817 |
-
if ( ! isset( $post['comments'] ) ) {
|
818 |
-
$post['comments'] = [];
|
819 |
-
}
|
820 |
-
|
821 |
-
$post['comments'] = apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post );
|
822 |
-
|
823 |
-
// Add/update comments.
|
824 |
-
if ( ! empty( $post['comments'] ) ) {
|
825 |
-
$num_comments = 0;
|
826 |
-
$inserted_comments = [];
|
827 |
-
foreach ( $post['comments'] as $comment ) {
|
828 |
-
$comment_id = $comment['comment_id'];
|
829 |
-
$newcomments[ $comment_id ]['comment_post_ID'] = $comment_post_id;
|
830 |
-
$newcomments[ $comment_id ]['comment_author'] = $comment['comment_author'];
|
831 |
-
$newcomments[ $comment_id ]['comment_author_email'] = $comment['comment_author_email'];
|
832 |
-
$newcomments[ $comment_id ]['comment_author_IP'] = $comment['comment_author_IP'];
|
833 |
-
$newcomments[ $comment_id ]['comment_author_url'] = $comment['comment_author_url'];
|
834 |
-
$newcomments[ $comment_id ]['comment_date'] = $comment['comment_date'];
|
835 |
-
$newcomments[ $comment_id ]['comment_date_gmt'] = $comment['comment_date_gmt'];
|
836 |
-
$newcomments[ $comment_id ]['comment_content'] = $comment['comment_content'];
|
837 |
-
$newcomments[ $comment_id ]['comment_approved'] = $comment['comment_approved'];
|
838 |
-
$newcomments[ $comment_id ]['comment_type'] = $comment['comment_type'];
|
839 |
-
$newcomments[ $comment_id ]['comment_parent'] = $comment['comment_parent'];
|
840 |
-
$newcomments[ $comment_id ]['commentmeta'] = isset( $comment['commentmeta'] ) ? $comment['commentmeta'] : [];
|
841 |
-
if ( isset( $this->processed_authors[ $comment['comment_user_id'] ] ) ) {
|
842 |
-
$newcomments[ $comment_id ]['user_id'] = $this->processed_authors[ $comment['comment_user_id'] ];
|
843 |
-
}
|
844 |
-
}
|
845 |
-
|
846 |
-
ksort( $newcomments );
|
847 |
-
|
848 |
-
foreach ( $newcomments as $key => $comment ) {
|
849 |
-
if ( isset( $inserted_comments[ $comment['comment_parent'] ] ) ) {
|
850 |
-
$comment['comment_parent'] = $inserted_comments[ $comment['comment_parent'] ];
|
851 |
-
}
|
852 |
-
|
853 |
-
$comment_data = wp_slash( $comment );
|
854 |
-
unset( $comment_data['commentmeta'] ); // Handled separately, wp_insert_comment() also expects `comment_meta`.
|
855 |
-
$comment_data = wp_filter_comment( $comment_data );
|
856 |
-
|
857 |
-
$inserted_comments[ $key ] = wp_insert_comment( $comment_data );
|
858 |
-
|
859 |
-
do_action( 'wp_import_insert_comment', $inserted_comments[ $key ], $comment, $comment_post_id, $post );
|
860 |
-
|
861 |
-
foreach ( $comment['commentmeta'] as $meta ) {
|
862 |
-
$value = maybe_unserialize( $meta['value'] );
|
863 |
-
|
864 |
-
add_comment_meta( $inserted_comments[ $key ], wp_slash( $meta['key'] ), wp_slash_strings_only( $value ) );
|
865 |
-
}
|
866 |
-
|
867 |
-
$num_comments++;
|
868 |
-
}
|
869 |
-
unset( $newcomments, $inserted_comments, $post['comments'] );
|
870 |
-
}
|
871 |
-
|
872 |
-
if ( ! isset( $post['postmeta'] ) ) {
|
873 |
-
$post['postmeta'] = [];
|
874 |
-
}
|
875 |
-
|
876 |
-
$post['postmeta'] = apply_filters( 'wp_import_post_meta', $post['postmeta'], $post_id, $post );
|
877 |
-
|
878 |
-
// Add/update post meta.
|
879 |
-
if ( ! empty( $post['postmeta'] ) ) {
|
880 |
-
foreach ( $post['postmeta'] as $meta ) {
|
881 |
-
$key = apply_filters( 'import_post_meta_key', $meta['key'], $post_id, $post );
|
882 |
-
$value = false;
|
883 |
-
|
884 |
-
if ( '_edit_last' === $key ) {
|
885 |
-
if ( isset( $this->processed_authors[ intval( $meta['value'] ) ] ) ) {
|
886 |
-
$value = $this->processed_authors[ intval( $meta['value'] ) ];
|
887 |
-
} else {
|
888 |
-
$key = false;
|
889 |
-
}
|
890 |
-
}
|
891 |
-
|
892 |
-
if ( $key ) {
|
893 |
-
// Export gets meta straight from the DB so could have a serialized string.
|
894 |
-
if ( ! $value ) {
|
895 |
-
$value = maybe_unserialize( $meta['value'] );
|
896 |
-
}
|
897 |
-
|
898 |
-
add_post_meta( $post_id, wp_slash( $key ), wp_slash_strings_only( $value ) );
|
899 |
-
|
900 |
-
do_action( 'import_post_meta', $post_id, $key, $value );
|
901 |
-
|
902 |
-
// If the post has a featured image, take note of this in case of remap.
|
903 |
-
if ( '_thumbnail_id' === $key ) {
|
904 |
-
$this->featured_images[ $post_id ] = (int) $value;
|
905 |
-
}
|
906 |
-
}
|
907 |
-
}
|
908 |
-
}
|
909 |
-
|
910 |
-
// Mark items as WPR Imported
|
911 |
-
add_post_meta( $post_id, '_wpr_demo_import_item', true );
|
912 |
-
|
913 |
-
}
|
914 |
-
|
915 |
-
unset( $this->posts );
|
916 |
-
|
917 |
-
return $result;
|
918 |
-
}
|
919 |
-
|
920 |
-
/**
|
921 |
-
* Attempt to create a new menu item from import data
|
922 |
-
*
|
923 |
-
* Fails for draft, orphaned menu items and those without an associated nav_menu
|
924 |
-
* or an invalid nav_menu term. If the post type or term object which the menu item
|
925 |
-
* represents doesn't exist then the menu item will not be imported (waits until the
|
926 |
-
* end of the import to retry again before discarding).
|
927 |
-
*
|
928 |
-
* @param array $item Menu item details from WXR file
|
929 |
-
*/
|
930 |
-
private function process_menu_item( $item ) {
|
931 |
-
// Skip draft, orphaned menu items.
|
932 |
-
if ( 'draft' === $item['status'] ) {
|
933 |
-
return;
|
934 |
-
}
|
935 |
-
|
936 |
-
$menu_slug = false;
|
937 |
-
if ( isset( $item['terms'] ) ) {
|
938 |
-
// Loop through terms, assume first nav_menu term is correct menu.
|
939 |
-
foreach ( $item['terms'] as $term ) {
|
940 |
-
if ( 'nav_menu' === $term['domain'] ) {
|
941 |
-
$menu_slug = $term['slug'];
|
942 |
-
break;
|
943 |
-
}
|
944 |
-
}
|
945 |
-
}
|
946 |
-
|
947 |
-
// No nav_menu term associated with this menu item.
|
948 |
-
if ( ! $menu_slug ) {
|
949 |
-
$this->output['errors'][] = esc_html__( 'Menu item skipped due to missing menu slug', 'wpr-addons' );
|
950 |
-
|
951 |
-
return;
|
952 |
-
}
|
953 |
-
|
954 |
-
$menu_id = term_exists( $menu_slug, 'nav_menu' );
|
955 |
-
if ( ! $menu_id ) {
|
956 |
-
/* translators: %s: Menu slug. */
|
957 |
-
$this->output['errors'][] = sprintf( esc_html__( 'Menu item skipped due to invalid menu slug: %s', 'wpr-addons' ), $menu_slug );
|
958 |
-
|
959 |
-
return;
|
960 |
-
} else {
|
961 |
-
$menu_id = is_array( $menu_id ) ? $menu_id['term_id'] : $menu_id;
|
962 |
-
}
|
963 |
-
|
964 |
-
$post_meta_key_value = [];
|
965 |
-
foreach ( $item['postmeta'] as $meta ) {
|
966 |
-
$post_meta_key_value[ $meta['key'] ] = $meta['value'];
|
967 |
-
}
|
968 |
-
|
969 |
-
// Duke - Import Menu Items Post Meta
|
970 |
-
$backup_menu_item_meta = [];
|
971 |
-
$backup_menu_item_meta['postmeta'] = $item['postmeta'];
|
972 |
-
|
973 |
-
foreach ( $item['postmeta'] as $meta ) {
|
974 |
-
${$meta['key']} = $meta['value'];
|
975 |
-
}
|
976 |
-
// End.
|
977 |
-
|
978 |
-
$_menu_item_object_id = $post_meta_key_value['_menu_item_object_id'];
|
979 |
-
if ( 'taxonomy' === $post_meta_key_value['_menu_item_type'] && isset( $this->processed_terms[ intval( $_menu_item_object_id ) ] ) ) {
|
980 |
-
$_menu_item_object_id = $this->processed_terms[ intval( $_menu_item_object_id ) ];
|
981 |
-
} elseif ( 'post_type' === $post_meta_key_value['_menu_item_type'] && isset( $this->processed_posts[ intval( $_menu_item_object_id ) ] ) ) {
|
982 |
-
$_menu_item_object_id = $this->processed_posts[ intval( $_menu_item_object_id ) ];
|
983 |
-
} elseif ( 'custom' !== $post_meta_key_value['_menu_item_type'] ) {
|
984 |
-
// Associated object is missing or not imported yet, we'll retry later.
|
985 |
-
$this->missing_menu_items[] = $item;
|
986 |
-
|
987 |
-
return;
|
988 |
-
}
|
989 |
-
|
990 |
-
$_menu_item_menu_item_parent = $post_meta_key_value['_menu_item_menu_item_parent']; // Duke - fix "_menu_item_menu_item_parent" dash was added
|
991 |
-
if ( isset( $this->processed_menu_items[ intval( $_menu_item_menu_item_parent ) ] ) ) {
|
992 |
-
$_menu_item_menu_item_parent = $this->processed_menu_items[ intval( $_menu_item_menu_item_parent ) ];
|
993 |
-
} elseif ( $_menu_item_menu_item_parent ) {
|
994 |
-
$this->menu_item_orphans[ intval( $item['post_id'] ) ] = (int) $_menu_item_menu_item_parent;
|
995 |
-
$_menu_item_menu_item_parent = 0;
|
996 |
-
}
|
997 |
-
|
998 |
-
// wp_update_nav_menu_item expects CSS classes as a space separated string
|
999 |
-
$_menu_item_classes = maybe_unserialize( $post_meta_key_value['_menu_item_classes'] );
|
1000 |
-
if ( is_array( $_menu_item_classes ) ) {
|
1001 |
-
$_menu_item_classes = implode( ' ', $_menu_item_classes );
|
1002 |
-
}
|
1003 |
-
|
1004 |
-
$args = [
|
1005 |
-
'menu-item-object-id' => $_menu_item_object_id,
|
1006 |
-
'menu-item-object' => $post_meta_key_value['_menu_item_object'],
|
1007 |
-
'menu-item-parent-id' => $_menu_item_menu_item_parent,
|
1008 |
-
'menu-item-position' => intval( $item['menu_order'] ),
|
1009 |
-
'menu-item-type' => $post_meta_key_value['_menu_item_type'],
|
1010 |
-
'menu-item-title' => $item['post_title'],
|
1011 |
-
'menu-item-url' => $post_meta_key_value['_menu_item_url'],
|
1012 |
-
'menu-item-description' => $item['post_content'],
|
1013 |
-
'menu-item-attr-title' => $item['post_excerpt'],
|
1014 |
-
'menu-item-target' => $post_meta_key_value['_menu_item_target'],
|
1015 |
-
'menu-item-classes' => $_menu_item_classes,
|
1016 |
-
'menu-item-xfn' => $post_meta_key_value['_menu_item_xfn'],
|
1017 |
-
'menu-item-status' => $item['status'],
|
1018 |
-
];
|
1019 |
-
|
1020 |
-
$id = wp_update_nav_menu_item( $menu_id, 0, $args );
|
1021 |
-
if ( $id && ! is_wp_error( $id ) ) {
|
1022 |
-
// Duke - Import Menu Items Post Meta
|
1023 |
-
$menu_item_db_id = $id;
|
1024 |
-
$backup_menu_item_meta['postmeta'] = apply_filters('wordpress_importer_menu_items_meta_import', $backup_menu_item_meta['postmeta'], $id);
|
1025 |
-
$skip_meta_items = [
|
1026 |
-
'_menu_item_type',
|
1027 |
-
'_menu_item_menu_item_parent',
|
1028 |
-
'_menu_item_object_id',
|
1029 |
-
'_menu_item_object',
|
1030 |
-
'_menu_item_target',
|
1031 |
-
'_menu_item_classes',
|
1032 |
-
'_menu_item_xfn',
|
1033 |
-
'_menu_item_url'
|
1034 |
-
];
|
1035 |
-
if ( is_array($backup_menu_item_meta['postmeta']) && !empty($backup_menu_item_meta['postmeta']) ) {
|
1036 |
-
foreach ( $backup_menu_item_meta['postmeta'] as $meta ) {
|
1037 |
-
if ( !in_array($meta['key'], $skip_meta_items) ) {
|
1038 |
-
update_post_meta( $menu_item_db_id, $meta['key'], maybe_unserialize($meta['value']));
|
1039 |
-
}
|
1040 |
-
}
|
1041 |
-
}
|
1042 |
-
// End.
|
1043 |
-
|
1044 |
-
$this->processed_menu_items[ intval( $item['post_id'] ) ] = (int) $id;
|
1045 |
-
}
|
1046 |
-
}
|
1047 |
-
|
1048 |
-
/**
|
1049 |
-
* If fetching attachments is enabled then attempt to create a new attachment
|
1050 |
-
*
|
1051 |
-
* @param array $post Attachment post details from WXR
|
1052 |
-
* @param string $url URL to fetch attachment from
|
1053 |
-
*
|
1054 |
-
* @return int|WP_Error Post ID on success, WP_Error otherwise
|
1055 |
-
*/
|
1056 |
-
private function process_attachment( $post, $url ) {
|
1057 |
-
|
1058 |
-
if ( ! $this->fetch_attachments ) {
|
1059 |
-
return new WP_Error( 'attachment_processing_error', esc_html__( 'Fetching attachments is not enabled', 'wpr-addons' ) );
|
1060 |
-
}
|
1061 |
-
|
1062 |
-
// if the URL is absolute, but does not contain address, then upload it assuming base_site_url.
|
1063 |
-
if ( preg_match( '|^/[\w\W]+$|', $url ) ) {
|
1064 |
-
$url = rtrim( $this->base_url, '/' ) . $url;
|
1065 |
-
}
|
1066 |
-
|
1067 |
-
$upload = $this->fetch_remote_file( $url, $post );
|
1068 |
-
if ( is_wp_error( $upload ) ) {
|
1069 |
-
return $upload;
|
1070 |
-
}
|
1071 |
-
|
1072 |
-
$info = wp_check_filetype( $upload['file'] );
|
1073 |
-
if ( $info ) {
|
1074 |
-
$post['post_mime_type'] = $info['type'];
|
1075 |
-
} else {
|
1076 |
-
return new WP_Error( 'attachment_processing_error', esc_html__( 'Invalid file type', 'wpr-addons' ) );
|
1077 |
-
}
|
1078 |
-
|
1079 |
-
$post['guid'] = $upload['url'];
|
1080 |
-
|
1081 |
-
// As per wp-admin/includes/upload.php.
|
1082 |
-
$post_id = wp_insert_attachment( $post, $upload['file'] );
|
1083 |
-
wp_update_attachment_metadata( $post_id, wp_generate_attachment_metadata( $post_id, $upload['file'] ) );
|
1084 |
-
add_post_meta( $post_id, '_wpr_demo_import_item', true );
|
1085 |
-
|
1086 |
-
// Remap resized image URLs, works by stripping the extension and remapping the URL stub.
|
1087 |
-
if ( preg_match( '!^image/!', $info['type'] ) ) {
|
1088 |
-
$parts = pathinfo( $url );
|
1089 |
-
$name = basename( $parts['basename'], ".{$parts['extension']}" ); // PATHINFO_FILENAME in PHP 5.2
|
1090 |
-
|
1091 |
-
$parts_new = pathinfo( $upload['url'] );
|
1092 |
-
$name_new = basename( $parts_new['basename'], ".{$parts_new['extension']}" );
|
1093 |
-
|
1094 |
-
$this->url_remap[ $parts['dirname'] . '/' . $name ] = $parts_new['dirname'] . '/' . $name_new;
|
1095 |
-
}
|
1096 |
-
|
1097 |
-
return $post_id;
|
1098 |
-
}
|
1099 |
-
|
1100 |
-
/**
|
1101 |
-
* Attempt to download a remote file attachment
|
1102 |
-
*
|
1103 |
-
* @param string $url URL of item to fetch
|
1104 |
-
* @param array $post Attachment details
|
1105 |
-
*
|
1106 |
-
* @return array|WP_Error Local file location details on success, WP_Error otherwise
|
1107 |
-
*/
|
1108 |
-
private function fetch_remote_file( $url, $post ) {
|
1109 |
-
// Extract the file name from the URL.
|
1110 |
-
$file_name = basename( parse_url( $url, PHP_URL_PATH ) );
|
1111 |
-
|
1112 |
-
if ( ! $file_name ) {
|
1113 |
-
$file_name = md5( $url );
|
1114 |
-
}
|
1115 |
-
|
1116 |
-
$tmp_file_name = wp_tempnam( $file_name );
|
1117 |
-
if ( ! $tmp_file_name ) {
|
1118 |
-
return new WP_Error( 'import_no_file', esc_html__( 'Could not create temporary file.', 'wpr-addons' ) );
|
1119 |
-
}
|
1120 |
-
|
1121 |
-
// Fetch the remote URL and write it to the placeholder file.
|
1122 |
-
$remote_response = wp_safe_remote_get( $url, [
|
1123 |
-
'timeout' => 300,
|
1124 |
-
'stream' => true,
|
1125 |
-
'filename' => $tmp_file_name,
|
1126 |
-
'headers' => [
|
1127 |
-
'Accept-Encoding' => 'identity',
|
1128 |
-
],
|
1129 |
-
] );
|
1130 |
-
|
1131 |
-
if ( is_wp_error( $remote_response ) ) {
|
1132 |
-
@unlink( $tmp_file_name );
|
1133 |
-
|
1134 |
-
return new WP_Error( 'import_file_error', sprintf( /* translators: 1: WordPress error message, 2: WordPress error code. */ esc_html__( 'Request failed due to an error: %1$s (%2$s)', 'wpr-addons' ), esc_html( $remote_response->get_error_message() ), esc_html( $remote_response->get_error_code() ) ) );
|
1135 |
-
}
|
1136 |
-
|
1137 |
-
$remote_response_code = (int) wp_remote_retrieve_response_code( $remote_response );
|
1138 |
-
|
1139 |
-
// Make sure the fetch was successful.
|
1140 |
-
if ( 200 !== $remote_response_code ) {
|
1141 |
-
@unlink( $tmp_file_name );
|
1142 |
-
|
1143 |
-
return new WP_Error( 'import_file_error', sprintf( /* translators: 1: HTTP error message, 2: HTTP error code. */ esc_html__( 'Remote server returned the following unexpected result: %1$s (%2$s)', 'wpr-addons' ), get_status_header_desc( $remote_response_code ), esc_html( $remote_response_code ) ) );
|
1144 |
-
}
|
1145 |
-
|
1146 |
-
$headers = wp_remote_retrieve_headers( $remote_response );
|
1147 |
-
|
1148 |
-
// Request failed.
|
1149 |
-
if ( ! $headers ) {
|
1150 |
-
@unlink( $tmp_file_name );
|
1151 |
-
|
1152 |
-
return new WP_Error( 'import_file_error', esc_html__( 'Remote server did not respond', 'wpr-addons' ) );
|
1153 |
-
}
|
1154 |
-
|
1155 |
-
$filesize = (int) filesize( $tmp_file_name );
|
1156 |
-
|
1157 |
-
if ( 0 === $filesize ) {
|
1158 |
-
@unlink( $tmp_file_name );
|
1159 |
-
|
1160 |
-
return new WP_Error( 'import_file_error', esc_html__( 'Zero size file downloaded', 'wpr-addons' ) );
|
1161 |
-
}
|
1162 |
-
|
1163 |
-
if ( ! isset( $headers['content-encoding'] ) && isset( $headers['content-length'] ) && $filesize !== (int) $headers['content-length'] ) {
|
1164 |
-
@unlink( $tmp_file_name );
|
1165 |
-
|
1166 |
-
return new WP_Error( 'import_file_error', esc_html__( 'Downloaded file has incorrect size', 'wpr-addons' ) );
|
1167 |
-
}
|
1168 |
-
|
1169 |
-
$max_size = (int) apply_filters( 'import_attachment_size_limit', self::DEFAULT_IMPORT_ATTACHMENT_SIZE_LIMIT );
|
1170 |
-
if ( ! empty( $max_size ) && $filesize > $max_size ) {
|
1171 |
-
@unlink( $tmp_file_name );
|
1172 |
-
|
1173 |
-
/* translators: %s: Max file size. */
|
1174 |
-
return new WP_Error( 'import_file_error', sprintf( esc_html__( 'Remote file is too large, limit is %s', 'wpr-addons' ), size_format( $max_size ) ) );
|
1175 |
-
}
|
1176 |
-
|
1177 |
-
// Override file name with Content-Disposition header value.
|
1178 |
-
if ( ! empty( $headers['content-disposition'] ) ) {
|
1179 |
-
$file_name_from_disposition = self::get_filename_from_disposition( (array) $headers['content-disposition'] );
|
1180 |
-
if ( $file_name_from_disposition ) {
|
1181 |
-
$file_name = $file_name_from_disposition;
|
1182 |
-
}
|
1183 |
-
}
|
1184 |
-
|
1185 |
-
// Set file extension if missing.
|
1186 |
-
$file_ext = pathinfo( $file_name, PATHINFO_EXTENSION );
|
1187 |
-
if ( ! $file_ext && ! empty( $headers['content-type'] ) ) {
|
1188 |
-
$extension = self::get_file_extension_by_mime_type( $headers['content-type'] );
|
1189 |
-
if ( $extension ) {
|
1190 |
-
$file_name = "{$file_name}.{$extension}";
|
1191 |
-
}
|
1192 |
-
}
|
1193 |
-
|
1194 |
-
// Handle the upload like _wp_handle_upload() does.
|
1195 |
-
$wp_filetype = wp_check_filetype_and_ext( $tmp_file_name, $file_name );
|
1196 |
-
$ext = empty( $wp_filetype['ext'] ) ? '' : $wp_filetype['ext'];
|
1197 |
-
$type = empty( $wp_filetype['type'] ) ? '' : $wp_filetype['type'];
|
1198 |
-
$proper_filename = empty( $wp_filetype['proper_filename'] ) ? '' : $wp_filetype['proper_filename'];
|
1199 |
-
|
1200 |
-
// Check to see if wp_check_filetype_and_ext() determined the filename was incorrect.
|
1201 |
-
if ( $proper_filename ) {
|
1202 |
-
$file_name = $proper_filename;
|
1203 |
-
}
|
1204 |
-
|
1205 |
-
if ( ( ! $type || ! $ext ) && ! current_user_can( 'unfiltered_upload' ) ) {
|
1206 |
-
return new WP_Error( 'import_file_error', esc_html__( 'Sorry, this file type is not permitted for security reasons.', 'wpr-addons' ) );
|
1207 |
-
}
|
1208 |
-
|
1209 |
-
$uploads = wp_upload_dir( $post['upload_date'] );
|
1210 |
-
if ( ! ( $uploads && false === $uploads['error'] ) ) {
|
1211 |
-
return new WP_Error( 'upload_dir_error', $uploads['error'] );
|
1212 |
-
}
|
1213 |
-
|
1214 |
-
// Move the file to the uploads dir.
|
1215 |
-
$file_name = wp_unique_filename( $uploads['path'], $file_name );
|
1216 |
-
$new_file = $uploads['path'] . "/$file_name";
|
1217 |
-
$move_new_file = copy( $tmp_file_name, $new_file );
|
1218 |
-
|
1219 |
-
if ( ! $move_new_file ) {
|
1220 |
-
@unlink( $tmp_file_name );
|
1221 |
-
|
1222 |
-
return new WP_Error( 'import_file_error', esc_html__( 'The uploaded file could not be moved', 'wpr-addons' ) );
|
1223 |
-
}
|
1224 |
-
|
1225 |
-
// Set correct file permissions.
|
1226 |
-
$stat = stat( dirname( $new_file ) );
|
1227 |
-
$perms = $stat['mode'] & 0000666;
|
1228 |
-
chmod( $new_file, $perms );
|
1229 |
-
|
1230 |
-
$upload = [
|
1231 |
-
'file' => $new_file,
|
1232 |
-
'url' => $uploads['url'] . "/$file_name",
|
1233 |
-
'type' => $wp_filetype['type'],
|
1234 |
-
'error' => false,
|
1235 |
-
];
|
1236 |
-
|
1237 |
-
// Keep track of the old and new urls so we can substitute them later.
|
1238 |
-
$this->url_remap[ $url ] = $upload['url'];
|
1239 |
-
$this->url_remap[ $post['guid'] ] = $upload['url']; // r13735, really needed?
|
1240 |
-
// Keep track of the destination if the remote url is redirected somewhere else.
|
1241 |
-
if ( isset( $headers['x-final-location'] ) && $headers['x-final-location'] !== $url ) {
|
1242 |
-
$this->url_remap[ $headers['x-final-location'] ] = $upload['url'];
|
1243 |
-
}
|
1244 |
-
|
1245 |
-
return $upload;
|
1246 |
-
}
|
1247 |
-
|
1248 |
-
/**
|
1249 |
-
* Attempt to associate posts and menu items with previously missing parents
|
1250 |
-
*
|
1251 |
-
* An imported post's parent may not have been imported when it was first created
|
1252 |
-
* so try again. Similarly for child menu items and menu items which were missing
|
1253 |
-
* the object (e.g. post) they represent in the menu
|
1254 |
-
*/
|
1255 |
-
private function backfill_parents() {
|
1256 |
-
global $wpdb;
|
1257 |
-
|
1258 |
-
// Find parents for post orphans.
|
1259 |
-
foreach ( $this->post_orphans as $child_id => $parent_id ) {
|
1260 |
-
$local_child_id = false;
|
1261 |
-
$local_parent_id = false;
|
1262 |
-
|
1263 |
-
if ( isset( $this->processed_posts[ $child_id ] ) ) {
|
1264 |
-
$local_child_id = $this->processed_posts[ $child_id ];
|
1265 |
-
}
|
1266 |
-
if ( isset( $this->processed_posts[ $parent_id ] ) ) {
|
1267 |
-
$local_parent_id = $this->processed_posts[ $parent_id ];
|
1268 |
-
}
|
1269 |
-
|
1270 |
-
if ( $local_child_id && $local_parent_id ) {
|
1271 |
-
$wpdb->update( $wpdb->posts, [ 'post_parent' => $local_parent_id ], [ 'ID' => $local_child_id ], '%d', '%d' );
|
1272 |
-
clean_post_cache( $local_child_id );
|
1273 |
-
}
|
1274 |
-
}
|
1275 |
-
|
1276 |
-
// All other posts/terms are imported, retry menu items with missing associated object.
|
1277 |
-
$missing_menu_items = $this->missing_menu_items;
|
1278 |
-
foreach ( $missing_menu_items as $item ) {
|
1279 |
-
$this->process_menu_item( $item );
|
1280 |
-
}
|
1281 |
-
|
1282 |
-
// Find parents for menu item orphans.
|
1283 |
-
foreach ( $this->menu_item_orphans as $child_id => $parent_id ) {
|
1284 |
-
$local_child_id = 0;
|
1285 |
-
$local_parent_id = 0;
|
1286 |
-
if ( isset( $this->processed_menu_items[ $child_id ] ) ) {
|
1287 |
-
$local_child_id = $this->processed_menu_items[ $child_id ];
|
1288 |
-
}
|
1289 |
-
if ( isset( $this->processed_menu_items[ $parent_id ] ) ) {
|
1290 |
-
$local_parent_id = $this->processed_menu_items[ $parent_id ];
|
1291 |
-
}
|
1292 |
-
|
1293 |
-
if ( $local_child_id && $local_parent_id ) {
|
1294 |
-
update_post_meta( $local_child_id, '_menu_item_menu_item_parent', (int) $local_parent_id );
|
1295 |
-
}
|
1296 |
-
}
|
1297 |
-
}
|
1298 |
-
|
1299 |
-
/**
|
1300 |
-
* Use stored mapping information to update old attachment URLs
|
1301 |
-
*/
|
1302 |
-
private function backfill_attachment_urls() {
|
1303 |
-
global $wpdb;
|
1304 |
-
// Make sure we do the longest urls first, in case one is a substring of another.
|
1305 |
-
uksort( $this->url_remap, function ( $a, $b ) {
|
1306 |
-
// Return the difference in length between two strings.
|
1307 |
-
return strlen( $b ) - strlen( $a );
|
1308 |
-
} );
|
1309 |
-
|
1310 |
-
foreach ( $this->url_remap as $from_url => $to_url ) {
|
1311 |
-
// Remap urls in post_content.
|
1312 |
-
$wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->posts} SET post_content = REPLACE(post_content, %s, %s)", $from_url, $to_url ) );
|
1313 |
-
// Remap enclosure urls.
|
1314 |
-
$wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->postmeta} SET meta_value = REPLACE(meta_value, %s, %s) WHERE meta_key='enclosure'", $from_url, $to_url ) );
|
1315 |
-
}
|
1316 |
-
}
|
1317 |
-
|
1318 |
-
/**
|
1319 |
-
* Update _thumbnail_id meta to new, imported attachment IDs
|
1320 |
-
*/
|
1321 |
-
private function remap_featured_images() {
|
1322 |
-
// Cycle through posts that have a featured image.
|
1323 |
-
foreach ( $this->featured_images as $post_id => $value ) {
|
1324 |
-
if ( isset( $this->processed_posts[ $value ] ) ) {
|
1325 |
-
$new_id = $this->processed_posts[ $value ];
|
1326 |
-
// Only update if there's a difference.
|
1327 |
-
if ( $new_id !== $value ) {
|
1328 |
-
update_post_meta( $post_id, '_thumbnail_id', $new_id );
|
1329 |
-
}
|
1330 |
-
}
|
1331 |
-
}
|
1332 |
-
}
|
1333 |
-
|
1334 |
-
/**
|
1335 |
-
* Parse a WXR file
|
1336 |
-
*
|
1337 |
-
* @param string $file Path to WXR file for parsing
|
1338 |
-
*
|
1339 |
-
* @return array Information gathered from the WXR file
|
1340 |
-
*/
|
1341 |
-
private function parse( $file ) {
|
1342 |
-
$parser = new WXR_Parser();
|
1343 |
-
|
1344 |
-
return $parser->parse( $file );
|
1345 |
-
}
|
1346 |
-
|
1347 |
-
/**
|
1348 |
-
* Decide if the given meta key maps to information we will want to import
|
1349 |
-
*
|
1350 |
-
* @param string $key The meta key to check
|
1351 |
-
*
|
1352 |
-
* @return string|bool The key if we do want to import, false if not
|
1353 |
-
*/
|
1354 |
-
private function is_valid_meta_key( $key ) {
|
1355 |
-
// Skip attachment metadata since we'll regenerate it from scratch.
|
1356 |
-
// Skip _edit_lock as not relevant for import
|
1357 |
-
if ( in_array( $key, [ '_wp_attached_file', '_wp_attachment_metadata', '_edit_lock' ] ) ) {
|
1358 |
-
return false;
|
1359 |
-
}
|
1360 |
-
|
1361 |
-
return $key;
|
1362 |
-
}
|
1363 |
-
|
1364 |
-
public function run() {
|
1365 |
-
$this->import( $this->requested_file_path );
|
1366 |
-
|
1367 |
-
return $this->output;
|
1368 |
-
}
|
1369 |
-
|
1370 |
-
public function __construct( $file, $args = [] ) {
|
1371 |
-
$this->requested_file_path = $file;
|
1372 |
-
$this->args = $args;
|
1373 |
-
|
1374 |
-
if ( ! empty( $this->args['fetch_attachments'] ) ) {
|
1375 |
-
$this->fetch_attachments = true;
|
1376 |
-
}
|
1377 |
-
}
|
1378 |
-
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
4 |
+
exit; // Exit if accessed directly.
|
5 |
+
}
|
6 |
+
|
7 |
+
if ( ! defined( 'WP_LOAD_IMPORTERS' ) )
|
8 |
+
return;
|
9 |
+
|
10 |
+
/** Display verbose errors */
|
11 |
+
define( 'IMPORT_DEBUG', false );
|
12 |
+
|
13 |
+
// Load Importer API
|
14 |
+
require_once ABSPATH . 'wp-admin/includes/import.php';
|
15 |
+
|
16 |
+
if ( ! class_exists( 'WP_Importer' ) ) {
|
17 |
+
$class_wp_importer = ABSPATH . 'wp-admin/includes/class-wp-importer.php';
|
18 |
+
if ( file_exists( $class_wp_importer ) )
|
19 |
+
require $class_wp_importer;
|
20 |
+
}
|
21 |
+
|
22 |
+
// include WXR file parsers
|
23 |
+
require WPR_ADDONS_PATH .'admin/import/class-parsers.php';
|
24 |
+
|
25 |
+
class WP_Import extends WP_Importer {
|
26 |
+
const DEFAULT_BUMP_REQUEST_TIMEOUT = 60;
|
27 |
+
const DEFAULT_ALLOW_CREATE_USERS = true;
|
28 |
+
const DEFAULT_IMPORT_ATTACHMENT_SIZE_LIMIT = 0; // 0 = unlimited.
|
29 |
+
|
30 |
+
/**
|
31 |
+
* @var string
|
32 |
+
*/
|
33 |
+
private $requested_file_path;
|
34 |
+
|
35 |
+
/**
|
36 |
+
* @var array
|
37 |
+
*/
|
38 |
+
private $args;
|
39 |
+
|
40 |
+
/**
|
41 |
+
* @var array
|
42 |
+
*/
|
43 |
+
private $output = [
|
44 |
+
'status' => 'failed',
|
45 |
+
'errors' => [],
|
46 |
+
];
|
47 |
+
|
48 |
+
/*
|
49 |
+
* WXR attachment ID
|
50 |
+
*/
|
51 |
+
private $id;
|
52 |
+
|
53 |
+
// Information to import from WXR file.
|
54 |
+
private $version;
|
55 |
+
private $authors = [];
|
56 |
+
private $posts = [];
|
57 |
+
private $terms = [];
|
58 |
+
private $categories = [];
|
59 |
+
private $tags = [];
|
60 |
+
private $base_url = '';
|
61 |
+
private $page_on_front;
|
62 |
+
|
63 |
+
// Mappings from old information to new.
|
64 |
+
private $processed_authors = [];
|
65 |
+
private $author_mapping = [];
|
66 |
+
private $processed_terms = [];
|
67 |
+
private $processed_posts = [];
|
68 |
+
private $post_orphans = [];
|
69 |
+
private $processed_menu_items = [];
|
70 |
+
private $menu_item_orphans = [];
|
71 |
+
private $missing_menu_items = [];
|
72 |
+
|
73 |
+
private $fetch_attachments = false;
|
74 |
+
private $url_remap = [];
|
75 |
+
private $featured_images = [];
|
76 |
+
|
77 |
+
/**
|
78 |
+
* Parses filename from a Content-Disposition header value.
|
79 |
+
*
|
80 |
+
* As per RFC6266:
|
81 |
+
*
|
82 |
+
* content-disposition = "Content-Disposition" ":"
|
83 |
+
* disposition-type *( ";" disposition-parm )
|
84 |
+
*
|
85 |
+
* disposition-type = "inline" | "attachment" | disp-ext-type
|
86 |
+
* ; case-insensitive
|
87 |
+
* disp-ext-type = token
|
88 |
+
*
|
89 |
+
* disposition-parm = filename-parm | disp-ext-parm
|
90 |
+
*
|
91 |
+
* filename-parm = "filename" "=" value
|
92 |
+
* | "filename*" "=" ext-value
|
93 |
+
*
|
94 |
+
* disp-ext-parm = token "=" value
|
95 |
+
* | ext-token "=" ext-value
|
96 |
+
* ext-token = <the characters in token, followed by "*">
|
97 |
+
*
|
98 |
+
* @param string[] $disposition_header List of Content-Disposition header values.
|
99 |
+
*
|
100 |
+
* @return string|null Filename if available, or null if not found.
|
101 |
+
* @link http://tools.ietf.org/html/rfc2388
|
102 |
+
* @link http://tools.ietf.org/html/rfc6266
|
103 |
+
*
|
104 |
+
* @see WP_REST_Attachments_Controller::get_filename_from_disposition()
|
105 |
+
*
|
106 |
+
*/
|
107 |
+
protected static function get_filename_from_disposition( $disposition_header ) {
|
108 |
+
// Get the filename.
|
109 |
+
$filename = null;
|
110 |
+
|
111 |
+
foreach ( $disposition_header as $value ) {
|
112 |
+
$value = trim( $value );
|
113 |
+
|
114 |
+
if ( strpos( $value, ';' ) === false ) {
|
115 |
+
continue;
|
116 |
+
}
|
117 |
+
|
118 |
+
list( $type, $attr_parts ) = explode( ';', $value, 2 );
|
119 |
+
|
120 |
+
$attr_parts = explode( ';', $attr_parts );
|
121 |
+
$attributes = [];
|
122 |
+
|
123 |
+
foreach ( $attr_parts as $part ) {
|
124 |
+
if ( strpos( $part, '=' ) === false ) {
|
125 |
+
continue;
|
126 |
+
}
|
127 |
+
|
128 |
+
list( $key, $value ) = explode( '=', $part, 2 );
|
129 |
+
|
130 |
+
$attributes[ trim( $key ) ] = trim( $value );
|
131 |
+
}
|
132 |
+
|
133 |
+
if ( empty( $attributes['filename'] ) ) {
|
134 |
+
continue;
|
135 |
+
}
|
136 |
+
|
137 |
+
$filename = trim( $attributes['filename'] );
|
138 |
+
|
139 |
+
// Unquote quoted filename, but after trimming.
|
140 |
+
if ( substr( $filename, 0, 1 ) === '"' && substr( $filename, -1, 1 ) === '"' ) {
|
141 |
+
$filename = substr( $filename, 1, -1 );
|
142 |
+
}
|
143 |
+
}
|
144 |
+
|
145 |
+
return $filename;
|
146 |
+
}
|
147 |
+
|
148 |
+
/**
|
149 |
+
* Retrieves file extension by mime type.
|
150 |
+
*
|
151 |
+
* @param string $mime_type Mime type to search extension for.
|
152 |
+
*
|
153 |
+
* @return string|null File extension if available, or null if not found.
|
154 |
+
*/
|
155 |
+
protected static function get_file_extension_by_mime_type( $mime_type ) {
|
156 |
+
static $map = null;
|
157 |
+
|
158 |
+
if ( is_array( $map ) ) {
|
159 |
+
return isset( $map[ $mime_type ] ) ? $map[ $mime_type ] : null;
|
160 |
+
}
|
161 |
+
|
162 |
+
$mime_types = wp_get_mime_types();
|
163 |
+
$map = array_flip( $mime_types );
|
164 |
+
|
165 |
+
// Some types have multiple extensions, use only the first one.
|
166 |
+
foreach ( $map as $type => $extensions ) {
|
167 |
+
$map[ $type ] = strtok( $extensions, '|' );
|
168 |
+
}
|
169 |
+
|
170 |
+
return isset( $map[ $mime_type ] ) ? $map[ $mime_type ] : null;
|
171 |
+
}
|
172 |
+
|
173 |
+
/**
|
174 |
+
* The main controller for the actual import stage.
|
175 |
+
*
|
176 |
+
* @param string $file Path to the WXR file for importing
|
177 |
+
*/
|
178 |
+
private function import( $file ) {
|
179 |
+
add_filter( 'import_post_meta_key', function ( $key ) {
|
180 |
+
return $this->is_valid_meta_key( $key );
|
181 |
+
} );
|
182 |
+
add_filter( 'http_request_timeout', function () {
|
183 |
+
return self::DEFAULT_BUMP_REQUEST_TIMEOUT;
|
184 |
+
} );
|
185 |
+
|
186 |
+
if ( ! $this->import_start( $file ) ) {
|
187 |
+
return;
|
188 |
+
}
|
189 |
+
|
190 |
+
$this->set_author_mapping();
|
191 |
+
|
192 |
+
wp_suspend_cache_invalidation( true );
|
193 |
+
$imported_summary = [
|
194 |
+
'categories' => $this->process_categories(),
|
195 |
+
'tags' => $this->process_tags(),
|
196 |
+
'terms' => $this->process_terms(),
|
197 |
+
'posts' => $this->process_posts(),
|
198 |
+
];
|
199 |
+
wp_suspend_cache_invalidation( false );
|
200 |
+
|
201 |
+
// Update incorrect/missing information in the DB.
|
202 |
+
$this->backfill_parents();
|
203 |
+
$this->backfill_attachment_urls();
|
204 |
+
$this->remap_featured_images();
|
205 |
+
|
206 |
+
$this->import_end();
|
207 |
+
|
208 |
+
$is_some_succeed = false;
|
209 |
+
foreach ( $imported_summary as $item ) {
|
210 |
+
if ( $item > 0 ) {
|
211 |
+
$is_some_succeed = true;
|
212 |
+
break;
|
213 |
+
}
|
214 |
+
}
|
215 |
+
|
216 |
+
if ( $is_some_succeed ) {
|
217 |
+
$this->output['status'] = 'success';
|
218 |
+
$this->output['summary'] = $imported_summary;
|
219 |
+
}
|
220 |
+
}
|
221 |
+
|
222 |
+
/**
|
223 |
+
* Parses the WXR file and prepares us for the task of processing parsed data.
|
224 |
+
*
|
225 |
+
* @param string $file Path to the WXR file for importing
|
226 |
+
*/
|
227 |
+
private function import_start( $file ) {
|
228 |
+
if ( ! is_file( $file ) ) {
|
229 |
+
$this->output['errors'] = [ esc_html__( 'The file does not exist, please try again.', 'wpr-addons' ) ];
|
230 |
+
|
231 |
+
return false;
|
232 |
+
}
|
233 |
+
|
234 |
+
$import_data = $this->parse( $file );
|
235 |
+
|
236 |
+
if ( is_wp_error( $import_data ) ) {
|
237 |
+
$this->output['errors'] = [ $import_data->get_error_message() ];
|
238 |
+
|
239 |
+
return false;
|
240 |
+
}
|
241 |
+
|
242 |
+
$this->version = $import_data['version'];
|
243 |
+
$this->set_authors_from_import( $import_data );
|
244 |
+
$this->posts = $import_data['posts'];
|
245 |
+
$this->terms = $import_data['terms'];
|
246 |
+
$this->categories = $import_data['categories'];
|
247 |
+
$this->tags = $import_data['tags'];
|
248 |
+
$this->base_url = esc_url( $import_data['base_url'] );
|
249 |
+
$this->page_on_front = $import_data['page_on_front'];
|
250 |
+
|
251 |
+
wp_defer_term_counting( true );
|
252 |
+
wp_defer_comment_counting( true );
|
253 |
+
|
254 |
+
do_action( 'import_start' );
|
255 |
+
|
256 |
+
return true;
|
257 |
+
}
|
258 |
+
|
259 |
+
/**
|
260 |
+
* Performs post-import cleanup of files and the cache
|
261 |
+
*/
|
262 |
+
private function import_end() {
|
263 |
+
wp_import_cleanup( $this->id );
|
264 |
+
|
265 |
+
wp_cache_flush();
|
266 |
+
|
267 |
+
foreach ( get_taxonomies() as $tax ) {
|
268 |
+
delete_option( "{$tax}_children" );
|
269 |
+
_get_term_hierarchy( $tax );
|
270 |
+
}
|
271 |
+
|
272 |
+
wp_defer_term_counting( false );
|
273 |
+
wp_defer_comment_counting( false );
|
274 |
+
|
275 |
+
do_action( 'import_end' );
|
276 |
+
}
|
277 |
+
|
278 |
+
/**
|
279 |
+
* Retrieve authors from parsed WXR data and set it to `$this->>authors`.
|
280 |
+
*
|
281 |
+
* Uses the provided author information from WXR 1.1 files
|
282 |
+
* or extracts info from each post for WXR 1.0 files
|
283 |
+
*
|
284 |
+
* @param array $import_data Data returned by a WXR parser
|
285 |
+
*/
|
286 |
+
private function set_authors_from_import( $import_data ) {
|
287 |
+
if ( ! empty( $import_data['authors'] ) ) {
|
288 |
+
$this->authors = $import_data['authors'];
|
289 |
+
// No author information, grab it from the posts.
|
290 |
+
} else {
|
291 |
+
foreach ( $import_data['posts'] as $post ) {
|
292 |
+
$login = sanitize_user( $post['post_author'], true );
|
293 |
+
|
294 |
+
if ( empty( $login ) ) {
|
295 |
+
/* translators: %s: Post author. */
|
296 |
+
$this->output['errors'][] = sprintf( esc_html__( 'Failed to import author %s. Their posts will be attributed to the current user.', 'wpr-addons' ), $post['post_author'] );
|
297 |
+
continue;
|
298 |
+
}
|
299 |
+
|
300 |
+
if ( ! isset( $this->authors[ $login ] ) ) {
|
301 |
+
$this->authors[ $login ] = [
|
302 |
+
'author_login' => $login,
|
303 |
+
'author_display_name' => $post['post_author'],
|
304 |
+
];
|
305 |
+
}
|
306 |
+
}
|
307 |
+
}
|
308 |
+
}
|
309 |
+
|
310 |
+
/**
|
311 |
+
* Map old author logins to local user IDs based on decisions made
|
312 |
+
* in import options form. Can map to an existing user, create a new user
|
313 |
+
* or falls back to the current user in case of error with either of the previous
|
314 |
+
*/
|
315 |
+
private function set_author_mapping() {
|
316 |
+
if ( ! isset( $this->args['imported_authors'] ) ) {
|
317 |
+
return;
|
318 |
+
}
|
319 |
+
|
320 |
+
$create_users = apply_filters( 'import_allow_create_users', self::DEFAULT_ALLOW_CREATE_USERS );
|
321 |
+
|
322 |
+
foreach ( (array) $this->args['imported_authors'] as $i => $old_login ) {
|
323 |
+
// Multisite adds strtolower to sanitize_user. Need to sanitize here to stop breakage in process_posts.
|
324 |
+
$santized_old_login = sanitize_user( $old_login, true );
|
325 |
+
$old_id = isset( $this->authors[ $old_login ]['author_id'] ) ? intval( $this->authors[ $old_login ]['author_id'] ) : false;
|
326 |
+
|
327 |
+
if ( ! empty( $this->args['user_map'][ $i ] ) ) {
|
328 |
+
$user = get_userdata( intval( $this->args['user_map'][ $i ] ) );
|
329 |
+
if ( isset( $user->ID ) ) {
|
330 |
+
if ( $old_id ) {
|
331 |
+
$this->processed_authors[ $old_id ] = $user->ID;
|
332 |
+
}
|
333 |
+
$this->author_mapping[ $santized_old_login ] = $user->ID;
|
334 |
+
}
|
335 |
+
} elseif ( $create_users ) {
|
336 |
+
$user_id = 0;
|
337 |
+
if ( ! empty( $this->args['user_new'][ $i ] ) ) {
|
338 |
+
$user_id = wp_create_user( $this->args['user_new'][ $i ], wp_generate_password() );
|
339 |
+
} elseif ( '1.0' !== $this->version ) {
|
340 |
+
$user_data = [
|
341 |
+
'user_login' => $old_login,
|
342 |
+
'user_pass' => wp_generate_password(),
|
343 |
+
'user_email' => isset( $this->authors[ $old_login ]['author_email'] ) ? $this->authors[ $old_login ]['author_email'] : '',
|
344 |
+
'display_name' => $this->authors[ $old_login ]['author_display_name'],
|
345 |
+
'first_name' => isset( $this->authors[ $old_login ]['author_first_name'] ) ? $this->authors[ $old_login ]['author_first_name'] : '',
|
346 |
+
'last_name' => isset( $this->authors[ $old_login ]['author_last_name'] ) ? $this->authors[ $old_login ]['author_last_name'] : '',
|
347 |
+
];
|
348 |
+
$user_id = wp_insert_user( $user_data );
|
349 |
+
}
|
350 |
+
|
351 |
+
if ( ! is_wp_error( $user_id ) ) {
|
352 |
+
if ( $old_id ) {
|
353 |
+
$this->processed_authors[ $old_id ] = $user_id;
|
354 |
+
}
|
355 |
+
$this->author_mapping[ $santized_old_login ] = $user_id;
|
356 |
+
} else {
|
357 |
+
/* translators: %s: Author display name. */
|
358 |
+
$error = sprintf( esc_html__( 'Failed to create new user for %s. Their posts will be attributed to the current user.', 'wpr-addons' ), $this->authors[ $old_login ]['author_display_name'] );
|
359 |
+
|
360 |
+
if ( defined( 'IMPORT_DEBUG' ) && IMPORT_DEBUG ) {
|
361 |
+
$error .= PHP_EOL . $user_id->get_error_message();
|
362 |
+
}
|
363 |
+
|
364 |
+
$this->output['errors'][] = $error;
|
365 |
+
}
|
366 |
+
}
|
367 |
+
|
368 |
+
// Failsafe: if the user_id was invalid, default to the current user.
|
369 |
+
if ( ! isset( $this->author_mapping[ $santized_old_login ] ) ) {
|
370 |
+
if ( $old_id ) {
|
371 |
+
$this->processed_authors[ $old_id ] = (int) get_current_user_id();
|
372 |
+
}
|
373 |
+
$this->author_mapping[ $santized_old_login ] = (int) get_current_user_id();
|
374 |
+
}
|
375 |
+
}
|
376 |
+
}
|
377 |
+
|
378 |
+
/**
|
379 |
+
* Create new categories based on import information
|
380 |
+
*
|
381 |
+
* Doesn't create a new category if its slug already exists
|
382 |
+
*
|
383 |
+
* @return int number of imported categories.
|
384 |
+
*/
|
385 |
+
private function process_categories() {
|
386 |
+
$result = 0;
|
387 |
+
|
388 |
+
$this->categories = apply_filters( 'wp_import_categories', $this->categories );
|
389 |
+
|
390 |
+
if ( empty( $this->categories ) ) {
|
391 |
+
return $result;
|
392 |
+
}
|
393 |
+
|
394 |
+
foreach ( $this->categories as $cat ) {
|
395 |
+
// if the category already exists leave it alone
|
396 |
+
$term_id = term_exists( $cat['category_nicename'], 'category' );
|
397 |
+
if ( $term_id ) {
|
398 |
+
if ( is_array( $term_id ) ) {
|
399 |
+
$term_id = $term_id['term_id'];
|
400 |
+
}
|
401 |
+
if ( isset( $cat['term_id'] ) ) {
|
402 |
+
$this->processed_terms[ intval( $cat['term_id'] ) ] = (int) $term_id;
|
403 |
+
}
|
404 |
+
continue;
|
405 |
+
}
|
406 |
+
|
407 |
+
$parent = empty( $cat['category_parent'] ) ? 0 : category_exists( $cat['category_parent'] );
|
408 |
+
$description = isset( $cat['category_description'] ) ? $cat['category_description'] : '';
|
409 |
+
|
410 |
+
$data = [
|
411 |
+
'category_nicename' => $cat['category_nicename'],
|
412 |
+
'category_parent' => $parent,
|
413 |
+
'cat_name' => wp_slash( $cat['cat_name'] ),
|
414 |
+
'category_description' => wp_slash( $description ),
|
415 |
+
];
|
416 |
+
|
417 |
+
$id = wp_insert_category( $data );
|
418 |
+
if ( ! is_wp_error( $id ) && $id > 0 ) {
|
419 |
+
if ( isset( $cat['term_id'] ) ) {
|
420 |
+
$this->processed_terms[ intval( $cat['term_id'] ) ] = $id;
|
421 |
+
}
|
422 |
+
$result++;
|
423 |
+
} else {
|
424 |
+
/* translators: %s: Category name. */
|
425 |
+
$error = sprintf( esc_html__( 'Failed to import category %s', 'wpr-addons' ), $cat['category_nicename'] );
|
426 |
+
|
427 |
+
if ( defined( 'IMPORT_DEBUG' ) && IMPORT_DEBUG ) {
|
428 |
+
$error .= PHP_EOL . $id->get_error_message();
|
429 |
+
}
|
430 |
+
|
431 |
+
$this->output['errors'][] = $error;
|
432 |
+
continue;
|
433 |
+
}
|
434 |
+
|
435 |
+
$this->process_termmeta( $cat, $id );
|
436 |
+
add_term_meta( $id, '_wpr_demo_import_item', true );
|
437 |
+
}
|
438 |
+
|
439 |
+
unset( $this->categories );
|
440 |
+
|
441 |
+
return $result;
|
442 |
+
}
|
443 |
+
|
444 |
+
/**
|
445 |
+
* Create new post tags based on import information
|
446 |
+
*
|
447 |
+
* Doesn't create a tag if its slug already exists
|
448 |
+
*
|
449 |
+
* @return int number of imported tags.
|
450 |
+
*/
|
451 |
+
private function process_tags() {
|
452 |
+
$result = 0;
|
453 |
+
|
454 |
+
$this->tags = apply_filters( 'wp_import_tags', $this->tags );
|
455 |
+
|
456 |
+
if ( empty( $this->tags ) ) {
|
457 |
+
return $result;
|
458 |
+
}
|
459 |
+
|
460 |
+
foreach ( $this->tags as $tag ) {
|
461 |
+
// if the tag already exists leave it alone
|
462 |
+
$term_id = term_exists( $tag['tag_slug'], 'post_tag' );
|
463 |
+
if ( $term_id ) {
|
464 |
+
if ( is_array( $term_id ) ) {
|
465 |
+
$term_id = $term_id['term_id'];
|
466 |
+
}
|
467 |
+
if ( isset( $tag['term_id'] ) ) {
|
468 |
+
$this->processed_terms[ intval( $tag['term_id'] ) ] = (int) $term_id;
|
469 |
+
}
|
470 |
+
continue;
|
471 |
+
}
|
472 |
+
|
473 |
+
$description = isset( $tag['tag_description'] ) ? $tag['tag_description'] : '';
|
474 |
+
$args = [
|
475 |
+
'slug' => $tag['tag_slug'],
|
476 |
+
'description' => wp_slash( $description ),
|
477 |
+
];
|
478 |
+
|
479 |
+
$id = wp_insert_term( wp_slash( $tag['tag_name'] ), 'post_tag', $args );
|
480 |
+
if ( ! is_wp_error( $id ) ) {
|
481 |
+
if ( isset( $tag['term_id'] ) ) {
|
482 |
+
$this->processed_terms[ intval( $tag['term_id'] ) ] = $id['term_id'];
|
483 |
+
}
|
484 |
+
$result++;
|
485 |
+
} else {
|
486 |
+
/* translators: %s: Tag name. */
|
487 |
+
$error = sprintf( esc_html__( 'Failed to import post tag %s', 'wpr-addons' ), $tag['tag_name'] );
|
488 |
+
|
489 |
+
if ( defined( 'IMPORT_DEBUG' ) && IMPORT_DEBUG ) {
|
490 |
+
$error .= PHP_EOL . $id->get_error_message();
|
491 |
+
}
|
492 |
+
|
493 |
+
$this->output['errors'][] = $error;
|
494 |
+
continue;
|
495 |
+
}
|
496 |
+
|
497 |
+
$this->process_termmeta( $tag, $id['term_id'] );
|
498 |
+
add_term_meta( $id['term_id'], '_wpr_demo_import_item', true );
|
499 |
+
}
|
500 |
+
|
501 |
+
unset( $this->tags );
|
502 |
+
|
503 |
+
return $result;
|
504 |
+
}
|
505 |
+
|
506 |
+
/**
|
507 |
+
* Create new terms based on import information
|
508 |
+
*
|
509 |
+
* Doesn't create a term its slug already exists
|
510 |
+
*
|
511 |
+
* @return int number of imported terms.
|
512 |
+
*/
|
513 |
+
private function process_terms() {
|
514 |
+
$result = 0;
|
515 |
+
|
516 |
+
$this->terms = apply_filters( 'wp_import_terms', $this->terms );
|
517 |
+
|
518 |
+
if ( empty( $this->terms ) ) {
|
519 |
+
return $result;
|
520 |
+
}
|
521 |
+
|
522 |
+
foreach ( $this->terms as $term ) {
|
523 |
+
// if the term already exists in the correct taxonomy leave it alone
|
524 |
+
$term_id = term_exists( $term['slug'], $term['term_taxonomy'] );
|
525 |
+
if ( $term_id ) {
|
526 |
+
if ( is_array( $term_id ) ) {
|
527 |
+
$term_id = $term_id['term_id'];
|
528 |
+
}
|
529 |
+
if ( isset( $term['term_id'] ) ) {
|
530 |
+
$this->processed_terms[ intval( $term['term_id'] ) ] = (int) $term_id;
|
531 |
+
}
|
532 |
+
continue;
|
533 |
+
}
|
534 |
+
|
535 |
+
if ( empty( $term['term_parent'] ) ) {
|
536 |
+
$parent = 0;
|
537 |
+
} else {
|
538 |
+
$parent = term_exists( $term['term_parent'], $term['term_taxonomy'] );
|
539 |
+
if ( is_array( $parent ) ) {
|
540 |
+
$parent = $parent['term_id'];
|
541 |
+
}
|
542 |
+
}
|
543 |
+
|
544 |
+
$description = isset( $term['term_description'] ) ? $term['term_description'] : '';
|
545 |
+
$args = [
|
546 |
+
'slug' => $term['slug'],
|
547 |
+
'description' => wp_slash( $description ),
|
548 |
+
'parent' => (int) $parent,
|
549 |
+
];
|
550 |
+
|
551 |
+
$id = wp_insert_term( wp_slash( $term['term_name'] ), $term['term_taxonomy'], $args );
|
552 |
+
if ( ! is_wp_error( $id ) ) {
|
553 |
+
if ( isset( $term['term_id'] ) ) {
|
554 |
+
$this->processed_terms[ intval( $term['term_id'] ) ] = $id['term_id'];
|
555 |
+
}
|
556 |
+
$result++;
|
557 |
+
} else {
|
558 |
+
/* translators: 1: Term taxonomy, 2: Term name. */
|
559 |
+
$error = sprintf( esc_html__( 'Failed to import %1$s %2$s', 'wpr-addons' ), $term['term_taxonomy'], $term['term_name'] );
|
560 |
+
|
561 |
+
if ( defined( 'IMPORT_DEBUG' ) && IMPORT_DEBUG ) {
|
562 |
+
$error .= PHP_EOL . $id->get_error_message();
|
563 |
+
}
|
564 |
+
|
565 |
+
$this->output['errors'][] = $error;
|
566 |
+
continue;
|
567 |
+
}
|
568 |
+
|
569 |
+
$this->process_termmeta( $term, $id['term_id'] );
|
570 |
+
add_term_meta( $id['term_id'], '_wpr_demo_import_item', true );
|
571 |
+
}
|
572 |
+
|
573 |
+
unset( $this->terms );
|
574 |
+
|
575 |
+
return $result;
|
576 |
+
}
|
577 |
+
|
578 |
+
/**
|
579 |
+
* Add metadata to imported term.
|
580 |
+
*
|
581 |
+
* @param array $term Term data from WXR import.
|
582 |
+
* @param int $term_id ID of the newly created term.
|
583 |
+
*/
|
584 |
+
private function process_termmeta( $term, $term_id ) {
|
585 |
+
if ( ! function_exists( 'add_term_meta' ) ) {
|
586 |
+
return;
|
587 |
+
}
|
588 |
+
|
589 |
+
if ( ! isset( $term['termmeta'] ) ) {
|
590 |
+
$term['termmeta'] = [];
|
591 |
+
}
|
592 |
+
|
593 |
+
/**
|
594 |
+
* Filters the metadata attached to an imported term.
|
595 |
+
*
|
596 |
+
* @param array $termmeta Array of term meta.
|
597 |
+
* @param int $term_id ID of the newly created term.
|
598 |
+
* @param array $term Term data from the WXR import.
|
599 |
+
*/
|
600 |
+
$term['termmeta'] = apply_filters( 'wp_import_term_meta', $term['termmeta'], $term_id, $term );
|
601 |
+
|
602 |
+
if ( empty( $term['termmeta'] ) ) {
|
603 |
+
return;
|
604 |
+
}
|
605 |
+
|
606 |
+
foreach ( $term['termmeta'] as $meta ) {
|
607 |
+
/**
|
608 |
+
* Filters the meta key for an imported piece of term meta.
|
609 |
+
*
|
610 |
+
* @param string $meta_key Meta key.
|
611 |
+
* @param int $term_id ID of the newly created term.
|
612 |
+
* @param array $term Term data from the WXR import.
|
613 |
+
*/
|
614 |
+
$key = apply_filters( 'import_term_meta_key', $meta['key'], $term_id, $term );
|
615 |
+
if ( ! $key ) {
|
616 |
+
continue;
|
617 |
+
}
|
618 |
+
|
619 |
+
// Export gets meta straight from the DB so could have a serialized string
|
620 |
+
$value = maybe_unserialize( $meta['value'] );
|
621 |
+
|
622 |
+
add_term_meta( $term_id, wp_slash( $key ), wp_slash_strings_only( $value ) );
|
623 |
+
|
624 |
+
/**
|
625 |
+
* Fires after term meta is imported.
|
626 |
+
*
|
627 |
+
* @param int $term_id ID of the newly created term.
|
628 |
+
* @param string $key Meta key.
|
629 |
+
* @param mixed $value Meta value.
|
630 |
+
*/
|
631 |
+
do_action( 'import_term_meta', $term_id, $key, $value );
|
632 |
+
}
|
633 |
+
}
|
634 |
+
|
635 |
+
/**
|
636 |
+
* Create new posts based on import information
|
637 |
+
*
|
638 |
+
* Posts marked as having a parent which doesn't exist will become top level items.
|
639 |
+
* Doesn't create a new post if: the post type doesn't exist, the given post ID
|
640 |
+
* is already noted as imported or a post with the same title and date already exists.
|
641 |
+
* Note that new/updated terms, comments and meta are imported for the last of the above.
|
642 |
+
*
|
643 |
+
* @return array the ids of succeed/failed imported posts.
|
644 |
+
*/
|
645 |
+
private function process_posts() {
|
646 |
+
$result = [
|
647 |
+
'succeed' => [],
|
648 |
+
'failed' => [],
|
649 |
+
];
|
650 |
+
|
651 |
+
$this->posts = apply_filters( 'wp_import_posts', $this->posts );
|
652 |
+
|
653 |
+
foreach ( $this->posts as $post ) {
|
654 |
+
$post = apply_filters( 'wp_import_post_data_raw', $post );
|
655 |
+
|
656 |
+
if ( ! post_type_exists( $post['post_type'] ) ) {
|
657 |
+
/* translators: 1: Post title, 2: Post type. */
|
658 |
+
$this->output['errors'][] = sprintf( esc_html__( 'Failed to import %1$s: Invalid post type %2$s', 'wpr-addons' ), $post['post_title'], $post['post_type'] );
|
659 |
+
do_action( 'wp_import_post_exists', $post );
|
660 |
+
continue;
|
661 |
+
}
|
662 |
+
|
663 |
+
if ( isset( $this->processed_posts[ $post['post_id'] ] ) && ! empty( $post['post_id'] ) ) {
|
664 |
+
continue;
|
665 |
+
}
|
666 |
+
|
667 |
+
if ( 'auto-draft' === $post['status'] ) {
|
668 |
+
continue;
|
669 |
+
}
|
670 |
+
|
671 |
+
if ( 'nav_menu_item' === $post['post_type'] ) {
|
672 |
+
$this->process_menu_item( $post );
|
673 |
+
continue;
|
674 |
+
}
|
675 |
+
|
676 |
+
$post_type_object = get_post_type_object( $post['post_type'] );
|
677 |
+
|
678 |
+
$post_parent = (int) $post['post_parent'];
|
679 |
+
if ( $post_parent ) {
|
680 |
+
// if we already know the parent, map it to the new local ID.
|
681 |
+
if ( isset( $this->processed_posts[ $post_parent ] ) ) {
|
682 |
+
$post_parent = $this->processed_posts[ $post_parent ];
|
683 |
+
// otherwise record the parent for later.
|
684 |
+
} else {
|
685 |
+
$this->post_orphans[ intval( $post['post_id'] ) ] = $post_parent;
|
686 |
+
$post_parent = 0;
|
687 |
+
}
|
688 |
+
}
|
689 |
+
|
690 |
+
// Map the post author.
|
691 |
+
$author = sanitize_user( $post['post_author'], true );
|
692 |
+
if ( isset( $this->author_mapping[ $author ] ) ) {
|
693 |
+
$author = $this->author_mapping[ $author ];
|
694 |
+
} else {
|
695 |
+
$author = (int) get_current_user_id();
|
696 |
+
}
|
697 |
+
|
698 |
+
$postdata = [
|
699 |
+
'import_id' => $post['post_id'],
|
700 |
+
'post_author' => $author,
|
701 |
+
'post_content' => $post['post_content'],
|
702 |
+
'post_excerpt' => $post['post_excerpt'],
|
703 |
+
'post_title' => $post['post_title'],
|
704 |
+
'post_status' => $post['status'],
|
705 |
+
'post_name' => $post['post_name'],
|
706 |
+
'comment_status' => $post['comment_status'],
|
707 |
+
'ping_status' => $post['ping_status'],
|
708 |
+
'guid' => $post['guid'],
|
709 |
+
'post_parent' => $post_parent,
|
710 |
+
'menu_order' => $post['menu_order'],
|
711 |
+
'post_type' => $post['post_type'],
|
712 |
+
'post_password' => $post['post_password'],
|
713 |
+
'post_date' => $post['post_date'],
|
714 |
+
];
|
715 |
+
|
716 |
+
$original_post_id = $post['post_id'];
|
717 |
+
$postdata = apply_filters( 'wp_import_post_data_processed', $postdata, $post );
|
718 |
+
|
719 |
+
$postdata = wp_slash( $postdata );
|
720 |
+
|
721 |
+
if ( 'attachment' === $postdata['post_type'] ) {
|
722 |
+
$remote_url = ! empty( $post['attachment_url'] ) ? $post['attachment_url'] : $post['guid'];
|
723 |
+
|
724 |
+
// try to use _wp_attached file for upload folder placement to ensure the same location as the export site
|
725 |
+
// e.g. location is 2003/05/image.jpg but the attachment post_date is 2010/09, see media_handle_upload()
|
726 |
+
$postdata['upload_date'] = $post['post_date'];
|
727 |
+
if ( isset( $post['postmeta'] ) ) {
|
728 |
+
foreach ( $post['postmeta'] as $meta ) {
|
729 |
+
if ( '_wp_attached_file' === $meta['key'] ) {
|
730 |
+
if ( preg_match( '%^[0-9]{4}/[0-9]{2}%', $meta['value'], $matches ) ) {
|
731 |
+
$postdata['upload_date'] = $matches[0];
|
732 |
+
}
|
733 |
+
break;
|
734 |
+
}
|
735 |
+
}
|
736 |
+
}
|
737 |
+
|
738 |
+
$post_id = $this->process_attachment( $postdata, $remote_url );
|
739 |
+
$comment_post_id = $post_id;
|
740 |
+
} else {
|
741 |
+
$post_id = wp_insert_post( $postdata, true );
|
742 |
+
$comment_post_id = $post_id;
|
743 |
+
do_action( 'wp_import_insert_post', $post_id, $original_post_id, $postdata, $post );
|
744 |
+
}
|
745 |
+
|
746 |
+
if ( is_wp_error( $post_id ) ) {
|
747 |
+
/* translators: 1: Post type singular label, 2: Post title. */
|
748 |
+
$error = sprintf( __( 'Failed to import %1$s %2$s', 'wpr-addons' ), $post_type_object->labels->singular_name, $post['post_title'] );
|
749 |
+
|
750 |
+
if ( defined( 'IMPORT_DEBUG' ) && IMPORT_DEBUG ) {
|
751 |
+
$error .= PHP_EOL . $post_id->get_error_message();
|
752 |
+
}
|
753 |
+
|
754 |
+
$result['failed'][] = $original_post_id;
|
755 |
+
|
756 |
+
$this->output['errors'][] = $error;
|
757 |
+
|
758 |
+
continue;
|
759 |
+
}
|
760 |
+
|
761 |
+
$result['succeed'][ $original_post_id ] = $post_id;
|
762 |
+
|
763 |
+
if ( 1 === $post['is_sticky'] ) {
|
764 |
+
stick_post( $post_id );
|
765 |
+
}
|
766 |
+
|
767 |
+
if ( $this->page_on_front === $original_post_id ) {
|
768 |
+
update_option( 'page_on_front', $post_id );
|
769 |
+
}
|
770 |
+
|
771 |
+
// Map pre-import ID to local ID.
|
772 |
+
$this->processed_posts[ intval( $post['post_id'] ) ] = (int) $post_id;
|
773 |
+
|
774 |
+
if ( ! isset( $post['terms'] ) ) {
|
775 |
+
$post['terms'] = [];
|
776 |
+
}
|
777 |
+
|
778 |
+
$post['terms'] = apply_filters( 'wp_import_post_terms', $post['terms'], $post_id, $post );
|
779 |
+
|
780 |
+
// add categories, tags and other terms
|
781 |
+
if ( ! empty( $post['terms'] ) ) {
|
782 |
+
$terms_to_set = [];
|
783 |
+
foreach ( $post['terms'] as $term ) {
|
784 |
+
// back compat with WXR 1.0 map 'tag' to 'post_tag'
|
785 |
+
$taxonomy = ( 'tag' === $term['domain'] ) ? 'post_tag' : $term['domain'];
|
786 |
+
$term_exists = term_exists( $term['slug'], $taxonomy );
|
787 |
+
$term_id = is_array( $term_exists ) ? $term_exists['term_id'] : $term_exists;
|
788 |
+
if ( ! $term_id ) {
|
789 |
+
$t = wp_insert_term( $term['name'], $taxonomy, [ 'slug' => $term['slug'] ] );
|
790 |
+
if ( ! is_wp_error( $t ) ) {
|
791 |
+
$term_id = $t['term_id'];
|
792 |
+
do_action( 'wp_import_insert_term', $t, $term, $post_id, $post );
|
793 |
+
} else {
|
794 |
+
/* translators: 1: Taxonomy name, 2: Term name. */
|
795 |
+
$error = sprintf( esc_html__( 'Failed to import %1$s %2$s', 'wpr-addons' ), $taxonomy, $term['name'] );
|
796 |
+
|
797 |
+
if ( defined( 'IMPORT_DEBUG' ) && IMPORT_DEBUG ) {
|
798 |
+
$error .= PHP_EOL . $t->get_error_message();
|
799 |
+
}
|
800 |
+
|
801 |
+
$this->output['errors'][] = $error;
|
802 |
+
|
803 |
+
do_action( 'wp_import_insert_term_failed', $t, $term, $post_id, $post );
|
804 |
+
continue;
|
805 |
+
}
|
806 |
+
}
|
807 |
+
$terms_to_set[ $taxonomy ][] = intval( $term_id );
|
808 |
+
}
|
809 |
+
|
810 |
+
foreach ( $terms_to_set as $tax => $ids ) {
|
811 |
+
$tt_ids = wp_set_post_terms( $post_id, $ids, $tax );
|
812 |
+
do_action( 'wp_import_set_post_terms', $tt_ids, $ids, $tax, $post_id, $post );
|
813 |
+
}
|
814 |
+
unset( $post['terms'], $terms_to_set );
|
815 |
+
}
|
816 |
+
|
817 |
+
if ( ! isset( $post['comments'] ) ) {
|
818 |
+
$post['comments'] = [];
|
819 |
+
}
|
820 |
+
|
821 |
+
$post['comments'] = apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post );
|
822 |
+
|
823 |
+
// Add/update comments.
|
824 |
+
if ( ! empty( $post['comments'] ) ) {
|
825 |
+
$num_comments = 0;
|
826 |
+
$inserted_comments = [];
|
827 |
+
foreach ( $post['comments'] as $comment ) {
|
828 |
+
$comment_id = $comment['comment_id'];
|
829 |
+
$newcomments[ $comment_id ]['comment_post_ID'] = $comment_post_id;
|
830 |
+
$newcomments[ $comment_id ]['comment_author'] = $comment['comment_author'];
|
831 |
+
$newcomments[ $comment_id ]['comment_author_email'] = $comment['comment_author_email'];
|
832 |
+
$newcomments[ $comment_id ]['comment_author_IP'] = $comment['comment_author_IP'];
|
833 |
+
$newcomments[ $comment_id ]['comment_author_url'] = $comment['comment_author_url'];
|
834 |
+
$newcomments[ $comment_id ]['comment_date'] = $comment['comment_date'];
|
835 |
+
$newcomments[ $comment_id ]['comment_date_gmt'] = $comment['comment_date_gmt'];
|
836 |
+
$newcomments[ $comment_id ]['comment_content'] = $comment['comment_content'];
|
837 |
+
$newcomments[ $comment_id ]['comment_approved'] = $comment['comment_approved'];
|
838 |
+
$newcomments[ $comment_id ]['comment_type'] = $comment['comment_type'];
|
839 |
+
$newcomments[ $comment_id ]['comment_parent'] = $comment['comment_parent'];
|
840 |
+
$newcomments[ $comment_id ]['commentmeta'] = isset( $comment['commentmeta'] ) ? $comment['commentmeta'] : [];
|
841 |
+
if ( isset( $this->processed_authors[ $comment['comment_user_id'] ] ) ) {
|
842 |
+
$newcomments[ $comment_id ]['user_id'] = $this->processed_authors[ $comment['comment_user_id'] ];
|
843 |
+
}
|
844 |
+
}
|
845 |
+
|
846 |
+
ksort( $newcomments );
|
847 |
+
|
848 |
+
foreach ( $newcomments as $key => $comment ) {
|
849 |
+
if ( isset( $inserted_comments[ $comment['comment_parent'] ] ) ) {
|
850 |
+
$comment['comment_parent'] = $inserted_comments[ $comment['comment_parent'] ];
|
851 |
+
}
|
852 |
+
|
853 |
+
$comment_data = wp_slash( $comment );
|
854 |
+
unset( $comment_data['commentmeta'] ); // Handled separately, wp_insert_comment() also expects `comment_meta`.
|
855 |
+
$comment_data = wp_filter_comment( $comment_data );
|
856 |
+
|
857 |
+
$inserted_comments[ $key ] = wp_insert_comment( $comment_data );
|
858 |
+
|
859 |
+
do_action( 'wp_import_insert_comment', $inserted_comments[ $key ], $comment, $comment_post_id, $post );
|
860 |
+
|
861 |
+
foreach ( $comment['commentmeta'] as $meta ) {
|
862 |
+
$value = maybe_unserialize( $meta['value'] );
|
863 |
+
|
864 |
+
add_comment_meta( $inserted_comments[ $key ], wp_slash( $meta['key'] ), wp_slash_strings_only( $value ) );
|
865 |
+
}
|
866 |
+
|
867 |
+
$num_comments++;
|
868 |
+
}
|
869 |
+
unset( $newcomments, $inserted_comments, $post['comments'] );
|
870 |
+
}
|
871 |
+
|
872 |
+
if ( ! isset( $post['postmeta'] ) ) {
|
873 |
+
$post['postmeta'] = [];
|
874 |
+
}
|
875 |
+
|
876 |
+
$post['postmeta'] = apply_filters( 'wp_import_post_meta', $post['postmeta'], $post_id, $post );
|
877 |
+
|
878 |
+
// Add/update post meta.
|
879 |
+
if ( ! empty( $post['postmeta'] ) ) {
|
880 |
+
foreach ( $post['postmeta'] as $meta ) {
|
881 |
+
$key = apply_filters( 'import_post_meta_key', $meta['key'], $post_id, $post );
|
882 |
+
$value = false;
|
883 |
+
|
884 |
+
if ( '_edit_last' === $key ) {
|
885 |
+
if ( isset( $this->processed_authors[ intval( $meta['value'] ) ] ) ) {
|
886 |
+
$value = $this->processed_authors[ intval( $meta['value'] ) ];
|
887 |
+
} else {
|
888 |
+
$key = false;
|
889 |
+
}
|
890 |
+
}
|
891 |
+
|
892 |
+
if ( $key ) {
|
893 |
+
// Export gets meta straight from the DB so could have a serialized string.
|
894 |
+
if ( ! $value ) {
|
895 |
+
$value = maybe_unserialize( $meta['value'] );
|
896 |
+
}
|
897 |
+
|
898 |
+
add_post_meta( $post_id, wp_slash( $key ), wp_slash_strings_only( $value ) );
|
899 |
+
|
900 |
+
do_action( 'import_post_meta', $post_id, $key, $value );
|
901 |
+
|
902 |
+
// If the post has a featured image, take note of this in case of remap.
|
903 |
+
if ( '_thumbnail_id' === $key ) {
|
904 |
+
$this->featured_images[ $post_id ] = (int) $value;
|
905 |
+
}
|
906 |
+
}
|
907 |
+
}
|
908 |
+
}
|
909 |
+
|
910 |
+
// Mark items as WPR Imported
|
911 |
+
add_post_meta( $post_id, '_wpr_demo_import_item', true );
|
912 |
+
|
913 |
+
}
|
914 |
+
|
915 |
+
unset( $this->posts );
|
916 |
+
|
917 |
+
return $result;
|
918 |
+
}
|
919 |
+
|
920 |
+
/**
|
921 |
+
* Attempt to create a new menu item from import data
|
922 |
+
*
|
923 |
+
* Fails for draft, orphaned menu items and those without an associated nav_menu
|
924 |
+
* or an invalid nav_menu term. If the post type or term object which the menu item
|
925 |
+
* represents doesn't exist then the menu item will not be imported (waits until the
|
926 |
+
* end of the import to retry again before discarding).
|
927 |
+
*
|
928 |
+
* @param array $item Menu item details from WXR file
|
929 |
+
*/
|
930 |
+
private function process_menu_item( $item ) {
|
931 |
+
// Skip draft, orphaned menu items.
|
932 |
+
if ( 'draft' === $item['status'] ) {
|
933 |
+
return;
|
934 |
+
}
|
935 |
+
|
936 |
+
$menu_slug = false;
|
937 |
+
if ( isset( $item['terms'] ) ) {
|
938 |
+
// Loop through terms, assume first nav_menu term is correct menu.
|
939 |
+
foreach ( $item['terms'] as $term ) {
|
940 |
+
if ( 'nav_menu' === $term['domain'] ) {
|
941 |
+
$menu_slug = $term['slug'];
|
942 |
+
break;
|
943 |
+
}
|
944 |
+
}
|
945 |
+
}
|
946 |
+
|
947 |
+
// No nav_menu term associated with this menu item.
|
948 |
+
if ( ! $menu_slug ) {
|
949 |
+
$this->output['errors'][] = esc_html__( 'Menu item skipped due to missing menu slug', 'wpr-addons' );
|
950 |
+
|
951 |
+
return;
|
952 |
+
}
|
953 |
+
|
954 |
+
$menu_id = term_exists( $menu_slug, 'nav_menu' );
|
955 |
+
if ( ! $menu_id ) {
|
956 |
+
/* translators: %s: Menu slug. */
|
957 |
+
$this->output['errors'][] = sprintf( esc_html__( 'Menu item skipped due to invalid menu slug: %s', 'wpr-addons' ), $menu_slug );
|
958 |
+
|
959 |
+
return;
|
960 |
+
} else {
|
961 |
+
$menu_id = is_array( $menu_id ) ? $menu_id['term_id'] : $menu_id;
|
962 |
+
}
|
963 |
+
|
964 |
+
$post_meta_key_value = [];
|
965 |
+
foreach ( $item['postmeta'] as $meta ) {
|
966 |
+
$post_meta_key_value[ $meta['key'] ] = $meta['value'];
|
967 |
+
}
|
968 |
+
|
969 |
+
// Duke - Import Menu Items Post Meta
|
970 |
+
$backup_menu_item_meta = [];
|
971 |
+
$backup_menu_item_meta['postmeta'] = $item['postmeta'];
|
972 |
+
|
973 |
+
foreach ( $item['postmeta'] as $meta ) {
|
974 |
+
${$meta['key']} = $meta['value'];
|
975 |
+
}
|
976 |
+
// End.
|
977 |
+
|
978 |
+
$_menu_item_object_id = $post_meta_key_value['_menu_item_object_id'];
|
979 |
+
if ( 'taxonomy' === $post_meta_key_value['_menu_item_type'] && isset( $this->processed_terms[ intval( $_menu_item_object_id ) ] ) ) {
|
980 |
+
$_menu_item_object_id = $this->processed_terms[ intval( $_menu_item_object_id ) ];
|
981 |
+
} elseif ( 'post_type' === $post_meta_key_value['_menu_item_type'] && isset( $this->processed_posts[ intval( $_menu_item_object_id ) ] ) ) {
|
982 |
+
$_menu_item_object_id = $this->processed_posts[ intval( $_menu_item_object_id ) ];
|
983 |
+
} elseif ( 'custom' !== $post_meta_key_value['_menu_item_type'] ) {
|
984 |
+
// Associated object is missing or not imported yet, we'll retry later.
|
985 |
+
$this->missing_menu_items[] = $item;
|
986 |
+
|
987 |
+
return;
|
988 |
+
}
|
989 |
+
|
990 |
+
$_menu_item_menu_item_parent = $post_meta_key_value['_menu_item_menu_item_parent']; // Duke - fix "_menu_item_menu_item_parent" dash was added
|
991 |
+
if ( isset( $this->processed_menu_items[ intval( $_menu_item_menu_item_parent ) ] ) ) {
|
992 |
+
$_menu_item_menu_item_parent = $this->processed_menu_items[ intval( $_menu_item_menu_item_parent ) ];
|
993 |
+
} elseif ( $_menu_item_menu_item_parent ) {
|
994 |
+
$this->menu_item_orphans[ intval( $item['post_id'] ) ] = (int) $_menu_item_menu_item_parent;
|
995 |
+
$_menu_item_menu_item_parent = 0;
|
996 |
+
}
|
997 |
+
|
998 |
+
// wp_update_nav_menu_item expects CSS classes as a space separated string
|
999 |
+
$_menu_item_classes = maybe_unserialize( $post_meta_key_value['_menu_item_classes'] );
|
1000 |
+
if ( is_array( $_menu_item_classes ) ) {
|
1001 |
+
$_menu_item_classes = implode( ' ', $_menu_item_classes );
|
1002 |
+
}
|
1003 |
+
|
1004 |
+
$args = [
|
1005 |
+
'menu-item-object-id' => $_menu_item_object_id,
|
1006 |
+
'menu-item-object' => $post_meta_key_value['_menu_item_object'],
|
1007 |
+
'menu-item-parent-id' => $_menu_item_menu_item_parent,
|
1008 |
+
'menu-item-position' => intval( $item['menu_order'] ),
|
1009 |
+
'menu-item-type' => $post_meta_key_value['_menu_item_type'],
|
1010 |
+
'menu-item-title' => $item['post_title'],
|
1011 |
+
'menu-item-url' => $post_meta_key_value['_menu_item_url'],
|
1012 |
+
'menu-item-description' => $item['post_content'],
|
1013 |
+
'menu-item-attr-title' => $item['post_excerpt'],
|
1014 |
+
'menu-item-target' => $post_meta_key_value['_menu_item_target'],
|
1015 |
+
'menu-item-classes' => $_menu_item_classes,
|
1016 |
+
'menu-item-xfn' => $post_meta_key_value['_menu_item_xfn'],
|
1017 |
+
'menu-item-status' => $item['status'],
|
1018 |
+
];
|
1019 |
+
|
1020 |
+
$id = wp_update_nav_menu_item( $menu_id, 0, $args );
|
1021 |
+
if ( $id && ! is_wp_error( $id ) ) {
|
1022 |
+
// Duke - Import Menu Items Post Meta
|
1023 |
+
$menu_item_db_id = $id;
|
1024 |
+
$backup_menu_item_meta['postmeta'] = apply_filters('wordpress_importer_menu_items_meta_import', $backup_menu_item_meta['postmeta'], $id);
|
1025 |
+
$skip_meta_items = [
|
1026 |
+
'_menu_item_type',
|
1027 |
+
'_menu_item_menu_item_parent',
|
1028 |
+
'_menu_item_object_id',
|
1029 |
+
'_menu_item_object',
|
1030 |
+
'_menu_item_target',
|
1031 |
+
'_menu_item_classes',
|
1032 |
+
'_menu_item_xfn',
|
1033 |
+
'_menu_item_url'
|
1034 |
+
];
|
1035 |
+
if ( is_array($backup_menu_item_meta['postmeta']) && !empty($backup_menu_item_meta['postmeta']) ) {
|
1036 |
+
foreach ( $backup_menu_item_meta['postmeta'] as $meta ) {
|
1037 |
+
if ( !in_array($meta['key'], $skip_meta_items) ) {
|
1038 |
+
update_post_meta( $menu_item_db_id, $meta['key'], maybe_unserialize($meta['value']));
|
1039 |
+
}
|
1040 |
+
}
|
1041 |
+
}
|
1042 |
+
// End.
|
1043 |
+
|
1044 |
+
$this->processed_menu_items[ intval( $item['post_id'] ) ] = (int) $id;
|
1045 |
+
}
|
1046 |
+
}
|
1047 |
+
|
1048 |
+
/**
|
1049 |
+
* If fetching attachments is enabled then attempt to create a new attachment
|
1050 |
+
*
|
1051 |
+
* @param array $post Attachment post details from WXR
|
1052 |
+
* @param string $url URL to fetch attachment from
|
1053 |
+
*
|
1054 |
+
* @return int|WP_Error Post ID on success, WP_Error otherwise
|
1055 |
+
*/
|
1056 |
+
private function process_attachment( $post, $url ) {
|
1057 |
+
|
1058 |
+
if ( ! $this->fetch_attachments ) {
|
1059 |
+
return new WP_Error( 'attachment_processing_error', esc_html__( 'Fetching attachments is not enabled', 'wpr-addons' ) );
|
1060 |
+
}
|
1061 |
+
|
1062 |
+
// if the URL is absolute, but does not contain address, then upload it assuming base_site_url.
|
1063 |
+
if ( preg_match( '|^/[\w\W]+$|', $url ) ) {
|
1064 |
+
$url = rtrim( $this->base_url, '/' ) . $url;
|
1065 |
+
}
|
1066 |
+
|
1067 |
+
$upload = $this->fetch_remote_file( $url, $post );
|
1068 |
+
if ( is_wp_error( $upload ) ) {
|
1069 |
+
return $upload;
|
1070 |
+
}
|
1071 |
+
|
1072 |
+
$info = wp_check_filetype( $upload['file'] );
|
1073 |
+
if ( $info ) {
|
1074 |
+
$post['post_mime_type'] = $info['type'];
|
1075 |
+
} else {
|
1076 |
+
return new WP_Error( 'attachment_processing_error', esc_html__( 'Invalid file type', 'wpr-addons' ) );
|
1077 |
+
}
|
1078 |
+
|
1079 |
+
$post['guid'] = $upload['url'];
|
1080 |
+
|
1081 |
+
// As per wp-admin/includes/upload.php.
|
1082 |
+
$post_id = wp_insert_attachment( $post, $upload['file'] );
|
1083 |
+
wp_update_attachment_metadata( $post_id, wp_generate_attachment_metadata( $post_id, $upload['file'] ) );
|
1084 |
+
add_post_meta( $post_id, '_wpr_demo_import_item', true );
|
1085 |
+
|
1086 |
+
// Remap resized image URLs, works by stripping the extension and remapping the URL stub.
|
1087 |
+
if ( preg_match( '!^image/!', $info['type'] ) ) {
|
1088 |
+
$parts = pathinfo( $url );
|
1089 |
+
$name = basename( $parts['basename'], ".{$parts['extension']}" ); // PATHINFO_FILENAME in PHP 5.2
|
1090 |
+
|
1091 |
+
$parts_new = pathinfo( $upload['url'] );
|
1092 |
+
$name_new = basename( $parts_new['basename'], ".{$parts_new['extension']}" );
|
1093 |
+
|
1094 |
+
$this->url_remap[ $parts['dirname'] . '/' . $name ] = $parts_new['dirname'] . '/' . $name_new;
|
1095 |
+
}
|
1096 |
+
|
1097 |
+
return $post_id;
|
1098 |
+
}
|
1099 |
+
|
1100 |
+
/**
|
1101 |
+
* Attempt to download a remote file attachment
|
1102 |
+
*
|
1103 |
+
* @param string $url URL of item to fetch
|
1104 |
+
* @param array $post Attachment details
|
1105 |
+
*
|
1106 |
+
* @return array|WP_Error Local file location details on success, WP_Error otherwise
|
1107 |
+
*/
|
1108 |
+
private function fetch_remote_file( $url, $post ) {
|
1109 |
+
// Extract the file name from the URL.
|
1110 |
+
$file_name = basename( parse_url( $url, PHP_URL_PATH ) );
|
1111 |
+
|
1112 |
+
if ( ! $file_name ) {
|
1113 |
+
$file_name = md5( $url );
|
1114 |
+
}
|
1115 |
+
|
1116 |
+
$tmp_file_name = wp_tempnam( $file_name );
|
1117 |
+
if ( ! $tmp_file_name ) {
|
1118 |
+
return new WP_Error( 'import_no_file', esc_html__( 'Could not create temporary file.', 'wpr-addons' ) );
|
1119 |
+
}
|
1120 |
+
|
1121 |
+
// Fetch the remote URL and write it to the placeholder file.
|
1122 |
+
$remote_response = wp_safe_remote_get( $url, [
|
1123 |
+
'timeout' => 300,
|
1124 |
+
'stream' => true,
|
1125 |
+
'filename' => $tmp_file_name,
|
1126 |
+
'headers' => [
|
1127 |
+
'Accept-Encoding' => 'identity',
|
1128 |
+
],
|
1129 |
+
] );
|
1130 |
+
|
1131 |
+
if ( is_wp_error( $remote_response ) ) {
|
1132 |
+
@unlink( $tmp_file_name );
|
1133 |
+
|
1134 |
+
return new WP_Error( 'import_file_error', sprintf( /* translators: 1: WordPress error message, 2: WordPress error code. */ esc_html__( 'Request failed due to an error: %1$s (%2$s)', 'wpr-addons' ), esc_html( $remote_response->get_error_message() ), esc_html( $remote_response->get_error_code() ) ) );
|
1135 |
+
}
|
1136 |
+
|
1137 |
+
$remote_response_code = (int) wp_remote_retrieve_response_code( $remote_response );
|
1138 |
+
|
1139 |
+
// Make sure the fetch was successful.
|
1140 |
+
if ( 200 !== $remote_response_code ) {
|
1141 |
+
@unlink( $tmp_file_name );
|
1142 |
+
|
1143 |
+
return new WP_Error( 'import_file_error', sprintf( /* translators: 1: HTTP error message, 2: HTTP error code. */ esc_html__( 'Remote server returned the following unexpected result: %1$s (%2$s)', 'wpr-addons' ), get_status_header_desc( $remote_response_code ), esc_html( $remote_response_code ) ) );
|
1144 |
+
}
|
1145 |
+
|
1146 |
+
$headers = wp_remote_retrieve_headers( $remote_response );
|
1147 |
+
|
1148 |
+
// Request failed.
|
1149 |
+
if ( ! $headers ) {
|
1150 |
+
@unlink( $tmp_file_name );
|
1151 |
+
|
1152 |
+
return new WP_Error( 'import_file_error', esc_html__( 'Remote server did not respond', 'wpr-addons' ) );
|
1153 |
+
}
|
1154 |
+
|
1155 |
+
$filesize = (int) filesize( $tmp_file_name );
|
1156 |
+
|
1157 |
+
if ( 0 === $filesize ) {
|
1158 |
+
@unlink( $tmp_file_name );
|
1159 |
+
|
1160 |
+
return new WP_Error( 'import_file_error', esc_html__( 'Zero size file downloaded', 'wpr-addons' ) );
|
1161 |
+
}
|
1162 |
+
|
1163 |
+
if ( ! isset( $headers['content-encoding'] ) && isset( $headers['content-length'] ) && $filesize !== (int) $headers['content-length'] ) {
|
1164 |
+
@unlink( $tmp_file_name );
|
1165 |
+
|
1166 |
+
return new WP_Error( 'import_file_error', esc_html__( 'Downloaded file has incorrect size', 'wpr-addons' ) );
|
1167 |
+
}
|
1168 |
+
|
1169 |
+
$max_size = (int) apply_filters( 'import_attachment_size_limit', self::DEFAULT_IMPORT_ATTACHMENT_SIZE_LIMIT );
|
1170 |
+
if ( ! empty( $max_size ) && $filesize > $max_size ) {
|
1171 |
+
@unlink( $tmp_file_name );
|
1172 |
+
|
1173 |
+
/* translators: %s: Max file size. */
|
1174 |
+
return new WP_Error( 'import_file_error', sprintf( esc_html__( 'Remote file is too large, limit is %s', 'wpr-addons' ), size_format( $max_size ) ) );
|
1175 |
+
}
|
1176 |
+
|
1177 |
+
// Override file name with Content-Disposition header value.
|
1178 |
+
if ( ! empty( $headers['content-disposition'] ) ) {
|
1179 |
+
$file_name_from_disposition = self::get_filename_from_disposition( (array) $headers['content-disposition'] );
|
1180 |
+
if ( $file_name_from_disposition ) {
|
1181 |
+
$file_name = $file_name_from_disposition;
|
1182 |
+
}
|
1183 |
+
}
|
1184 |
+
|
1185 |
+
// Set file extension if missing.
|
1186 |
+
$file_ext = pathinfo( $file_name, PATHINFO_EXTENSION );
|
1187 |
+
if ( ! $file_ext && ! empty( $headers['content-type'] ) ) {
|
1188 |
+
$extension = self::get_file_extension_by_mime_type( $headers['content-type'] );
|
1189 |
+
if ( $extension ) {
|
1190 |
+
$file_name = "{$file_name}.{$extension}";
|
1191 |
+
}
|
1192 |
+
}
|
1193 |
+
|
1194 |
+
// Handle the upload like _wp_handle_upload() does.
|
1195 |
+
$wp_filetype = wp_check_filetype_and_ext( $tmp_file_name, $file_name );
|
1196 |
+
$ext = empty( $wp_filetype['ext'] ) ? '' : $wp_filetype['ext'];
|
1197 |
+
$type = empty( $wp_filetype['type'] ) ? '' : $wp_filetype['type'];
|
1198 |
+
$proper_filename = empty( $wp_filetype['proper_filename'] ) ? '' : $wp_filetype['proper_filename'];
|
1199 |
+
|
1200 |
+
// Check to see if wp_check_filetype_and_ext() determined the filename was incorrect.
|
1201 |
+
if ( $proper_filename ) {
|
1202 |
+
$file_name = $proper_filename;
|
1203 |
+
}
|
1204 |
+
|
1205 |
+
if ( ( ! $type || ! $ext ) && ! current_user_can( 'unfiltered_upload' ) ) {
|
1206 |
+
return new WP_Error( 'import_file_error', esc_html__( 'Sorry, this file type is not permitted for security reasons.', 'wpr-addons' ) );
|
1207 |
+
}
|
1208 |
+
|
1209 |
+
$uploads = wp_upload_dir( $post['upload_date'] );
|
1210 |
+
if ( ! ( $uploads && false === $uploads['error'] ) ) {
|
1211 |
+
return new WP_Error( 'upload_dir_error', $uploads['error'] );
|
1212 |
+
}
|
1213 |
+
|
1214 |
+
// Move the file to the uploads dir.
|
1215 |
+
$file_name = wp_unique_filename( $uploads['path'], $file_name );
|
1216 |
+
$new_file = $uploads['path'] . "/$file_name";
|
1217 |
+
$move_new_file = copy( $tmp_file_name, $new_file );
|
1218 |
+
|
1219 |
+
if ( ! $move_new_file ) {
|
1220 |
+
@unlink( $tmp_file_name );
|
1221 |
+
|
1222 |
+
return new WP_Error( 'import_file_error', esc_html__( 'The uploaded file could not be moved', 'wpr-addons' ) );
|
1223 |
+
}
|
1224 |
+
|
1225 |
+
// Set correct file permissions.
|
1226 |
+
$stat = stat( dirname( $new_file ) );
|
1227 |
+
$perms = $stat['mode'] & 0000666;
|
1228 |
+
chmod( $new_file, $perms );
|
1229 |
+
|
1230 |
+
$upload = [
|
1231 |
+
'file' => $new_file,
|
1232 |
+
'url' => $uploads['url'] . "/$file_name",
|
1233 |
+
'type' => $wp_filetype['type'],
|
1234 |
+
'error' => false,
|
1235 |
+
];
|
1236 |
+
|
1237 |
+
// Keep track of the old and new urls so we can substitute them later.
|
1238 |
+
$this->url_remap[ $url ] = $upload['url'];
|
1239 |
+
$this->url_remap[ $post['guid'] ] = $upload['url']; // r13735, really needed?
|
1240 |
+
// Keep track of the destination if the remote url is redirected somewhere else.
|
1241 |
+
if ( isset( $headers['x-final-location'] ) && $headers['x-final-location'] !== $url ) {
|
1242 |
+
$this->url_remap[ $headers['x-final-location'] ] = $upload['url'];
|
1243 |
+
}
|
1244 |
+
|
1245 |
+
return $upload;
|
1246 |
+
}
|
1247 |
+
|
1248 |
+
/**
|
1249 |
+
* Attempt to associate posts and menu items with previously missing parents
|
1250 |
+
*
|
1251 |
+
* An imported post's parent may not have been imported when it was first created
|
1252 |
+
* so try again. Similarly for child menu items and menu items which were missing
|
1253 |
+
* the object (e.g. post) they represent in the menu
|
1254 |
+
*/
|
1255 |
+
private function backfill_parents() {
|
1256 |
+
global $wpdb;
|
1257 |
+
|
1258 |
+
// Find parents for post orphans.
|
1259 |
+
foreach ( $this->post_orphans as $child_id => $parent_id ) {
|
1260 |
+
$local_child_id = false;
|
1261 |
+
$local_parent_id = false;
|
1262 |
+
|
1263 |
+
if ( isset( $this->processed_posts[ $child_id ] ) ) {
|
1264 |
+
$local_child_id = $this->processed_posts[ $child_id ];
|
1265 |
+
}
|
1266 |
+
if ( isset( $this->processed_posts[ $parent_id ] ) ) {
|
1267 |
+
$local_parent_id = $this->processed_posts[ $parent_id ];
|
1268 |
+
}
|
1269 |
+
|
1270 |
+
if ( $local_child_id && $local_parent_id ) {
|
1271 |
+
$wpdb->update( $wpdb->posts, [ 'post_parent' => $local_parent_id ], [ 'ID' => $local_child_id ], '%d', '%d' );
|
1272 |
+
clean_post_cache( $local_child_id );
|
1273 |
+
}
|
1274 |
+
}
|
1275 |
+
|
1276 |
+
// All other posts/terms are imported, retry menu items with missing associated object.
|
1277 |
+
$missing_menu_items = $this->missing_menu_items;
|
1278 |
+
foreach ( $missing_menu_items as $item ) {
|
1279 |
+
$this->process_menu_item( $item );
|
1280 |
+
}
|
1281 |
+
|
1282 |
+
// Find parents for menu item orphans.
|
1283 |
+
foreach ( $this->menu_item_orphans as $child_id => $parent_id ) {
|
1284 |
+
$local_child_id = 0;
|
1285 |
+
$local_parent_id = 0;
|
1286 |
+
if ( isset( $this->processed_menu_items[ $child_id ] ) ) {
|
1287 |
+
$local_child_id = $this->processed_menu_items[ $child_id ];
|
1288 |
+
}
|
1289 |
+
if ( isset( $this->processed_menu_items[ $parent_id ] ) ) {
|
1290 |
+
$local_parent_id = $this->processed_menu_items[ $parent_id ];
|
1291 |
+
}
|
1292 |
+
|
1293 |
+
if ( $local_child_id && $local_parent_id ) {
|
1294 |
+
update_post_meta( $local_child_id, '_menu_item_menu_item_parent', (int) $local_parent_id );
|
1295 |
+
}
|
1296 |
+
}
|
1297 |
+
}
|
1298 |
+
|
1299 |
+
/**
|
1300 |
+
* Use stored mapping information to update old attachment URLs
|
1301 |
+
*/
|
1302 |
+
private function backfill_attachment_urls() {
|
1303 |
+
global $wpdb;
|
1304 |
+
// Make sure we do the longest urls first, in case one is a substring of another.
|
1305 |
+
uksort( $this->url_remap, function ( $a, $b ) {
|
1306 |
+
// Return the difference in length between two strings.
|
1307 |
+
return strlen( $b ) - strlen( $a );
|
1308 |
+
} );
|
1309 |
+
|
1310 |
+
foreach ( $this->url_remap as $from_url => $to_url ) {
|
1311 |
+
// Remap urls in post_content.
|
1312 |
+
$wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->posts} SET post_content = REPLACE(post_content, %s, %s)", $from_url, $to_url ) );
|
1313 |
+
// Remap enclosure urls.
|
1314 |
+
$wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->postmeta} SET meta_value = REPLACE(meta_value, %s, %s) WHERE meta_key='enclosure'", $from_url, $to_url ) );
|
1315 |
+
}
|
1316 |
+
}
|
1317 |
+
|
1318 |
+
/**
|
1319 |
+
* Update _thumbnail_id meta to new, imported attachment IDs
|
1320 |
+
*/
|
1321 |
+
private function remap_featured_images() {
|
1322 |
+
// Cycle through posts that have a featured image.
|
1323 |
+
foreach ( $this->featured_images as $post_id => $value ) {
|
1324 |
+
if ( isset( $this->processed_posts[ $value ] ) ) {
|
1325 |
+
$new_id = $this->processed_posts[ $value ];
|
1326 |
+
// Only update if there's a difference.
|
1327 |
+
if ( $new_id !== $value ) {
|
1328 |
+
update_post_meta( $post_id, '_thumbnail_id', $new_id );
|
1329 |
+
}
|
1330 |
+
}
|
1331 |
+
}
|
1332 |
+
}
|
1333 |
+
|
1334 |
+
/**
|
1335 |
+
* Parse a WXR file
|
1336 |
+
*
|
1337 |
+
* @param string $file Path to WXR file for parsing
|
1338 |
+
*
|
1339 |
+
* @return array Information gathered from the WXR file
|
1340 |
+
*/
|
1341 |
+
private function parse( $file ) {
|
1342 |
+
$parser = new WXR_Parser();
|
1343 |
+
|
1344 |
+
return $parser->parse( $file );
|
1345 |
+
}
|
1346 |
+
|
1347 |
+
/**
|
1348 |
+
* Decide if the given meta key maps to information we will want to import
|
1349 |
+
*
|
1350 |
+
* @param string $key The meta key to check
|
1351 |
+
*
|
1352 |
+
* @return string|bool The key if we do want to import, false if not
|
1353 |
+
*/
|
1354 |
+
private function is_valid_meta_key( $key ) {
|
1355 |
+
// Skip attachment metadata since we'll regenerate it from scratch.
|
1356 |
+
// Skip _edit_lock as not relevant for import
|
1357 |
+
if ( in_array( $key, [ '_wp_attached_file', '_wp_attachment_metadata', '_edit_lock' ] ) ) {
|
1358 |
+
return false;
|
1359 |
+
}
|
1360 |
+
|
1361 |
+
return $key;
|
1362 |
+
}
|
1363 |
+
|
1364 |
+
public function run() {
|
1365 |
+
$this->import( $this->requested_file_path );
|
1366 |
+
|
1367 |
+
return $this->output;
|
1368 |
+
}
|
1369 |
+
|
1370 |
+
public function __construct( $file, $args = [] ) {
|
1371 |
+
$this->requested_file_path = $file;
|
1372 |
+
$this->args = $args;
|
1373 |
+
|
1374 |
+
if ( ! empty( $this->args['fetch_attachments'] ) ) {
|
1375 |
+
$this->fetch_attachments = true;
|
1376 |
+
}
|
1377 |
+
}
|
1378 |
+
}
|
admin/includes/wpr-render-templates.php
CHANGED
@@ -1,251 +1,251 @@
|
|
1 |
-
<?php
|
2 |
-
namespace WprAddons\Admin\Includes;
|
3 |
-
|
4 |
-
use WprAddons\Classes\Utilities;
|
5 |
-
|
6 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
7 |
-
exit; // Exit if accessed directly.
|
8 |
-
}
|
9 |
-
|
10 |
-
/**
|
11 |
-
* WPR_Render_Templates setup
|
12 |
-
*
|
13 |
-
* @since 1.0
|
14 |
-
*/
|
15 |
-
class WPR_Render_Templates {
|
16 |
-
|
17 |
-
/**
|
18 |
-
** Instance of Elemenntor Frontend class.
|
19 |
-
*
|
20 |
-
** @var \Elementor\Frontend()
|
21 |
-
*/
|
22 |
-
private static $elementor_instance;
|
23 |
-
|
24 |
-
/**
|
25 |
-
** Get Current Theme.
|
26 |
-
*/
|
27 |
-
public $current_theme;
|
28 |
-
|
29 |
-
/**
|
30 |
-
** Royal Themes Array.
|
31 |
-
*/
|
32 |
-
public $royal_themes;
|
33 |
-
|
34 |
-
|
35 |
-
/**
|
36 |
-
** Constructor
|
37 |
-
*/
|
38 |
-
public function __construct( $only_hf = false ) {
|
39 |
-
|
40 |
-
// Elementor Frontend
|
41 |
-
self::$elementor_instance = \Elementor\Plugin::instance();
|
42 |
-
|
43 |
-
// Ative Theme
|
44 |
-
$this->current_theme = get_template();
|
45 |
-
|
46 |
-
// Royal Themes
|
47 |
-
$this->royal_themes = ['ashe', 'ashe-pro', 'ashe-pro-premium', 'bard', 'bard-pro', 'bard-pro-premium'];
|
48 |
-
|
49 |
-
// Popular Themes
|
50 |
-
if ( 'astra' === $this->current_theme ) {
|
51 |
-
require_once(__DIR__ . '/../templates/views/astra/class-astra-compat.php');
|
52 |
-
|
53 |
-
} elseif ( 'generatepress' === $this->current_theme ) {
|
54 |
-
require_once(__DIR__ . '/../templates/views/generatepress/class-generatepress-compat.php');
|
55 |
-
|
56 |
-
} elseif ( 'oceanwp' === $this->current_theme ) {
|
57 |
-
require_once(__DIR__ . '/../templates/views/oceanwp/class-oceanwp-compat.php');
|
58 |
-
|
59 |
-
} elseif ( 'storefront' === $this->current_theme ) {
|
60 |
-
require_once(__DIR__ . '/../templates/views/storefront/class-storefront-compat.php');
|
61 |
-
|
62 |
-
// Other Themes
|
63 |
-
} else {
|
64 |
-
add_action( 'wp', [ $this, 'global_compatibility' ] );
|
65 |
-
}
|
66 |
-
|
67 |
-
// Scripts and Styles
|
68 |
-
add_action( 'wp_enqueue_scripts', [ $this, 'enqueue_scripts' ] );
|
69 |
-
|
70 |
-
// Theme Builder
|
71 |
-
if ( !$only_hf ) { // Prevent Loading in Header or Footer Templates
|
72 |
-
add_filter( 'template_include', [ $this, 'convert_to_canvas' ], 12 ); // 12 after WP Pages and WooCommerce.
|
73 |
-
add_action( 'elementor/page_templates/canvas/wpr_print_content', [ $this, 'canvas_page_content_display' ] );
|
74 |
-
}
|
75 |
-
}
|
76 |
-
|
77 |
-
public function global_compatibility() {
|
78 |
-
add_action( 'get_header', [ $this, 'replace_header' ] );
|
79 |
-
add_action( 'elementor/page_templates/canvas/before_content', [ $this, 'add_canvas_header' ] );
|
80 |
-
|
81 |
-
add_action( 'get_footer', [ $this, 'replace_footer' ] );
|
82 |
-
add_action( 'elementor/page_templates/canvas/after_content', [ $this, 'add_canvas_footer' ], 9 );
|
83 |
-
}
|
84 |
-
|
85 |
-
/**
|
86 |
-
** Check if a Template has Conditions
|
87 |
-
*/
|
88 |
-
public function is_template_available( $type ) {
|
89 |
-
if ( 'content' === $type ) {
|
90 |
-
return !is_null(WPR_Conditions_Manager::canvas_page_content_display_conditions()) ? true : false;
|
91 |
-
} else {
|
92 |
-
$conditions = json_decode( get_option('wpr_'. $type .'_conditions', '[]'), true );
|
93 |
-
$template = WPR_Conditions_Manager::header_footer_display_conditions( $conditions );
|
94 |
-
return (!empty( $conditions ) && !is_null($template)) ? true : false;
|
95 |
-
}
|
96 |
-
}
|
97 |
-
|
98 |
-
/**
|
99 |
-
** Header
|
100 |
-
*/
|
101 |
-
public function replace_header() {
|
102 |
-
if ( $this->is_template_available('header') ) {
|
103 |
-
if ( ! in_array($this->current_theme, $this->royal_themes) ) {
|
104 |
-
require __DIR__ . '/../templates/views/theme-header.php';
|
105 |
-
} else {
|
106 |
-
require __DIR__ . '/../templates/views/royal/theme-header-royal.php';
|
107 |
-
}
|
108 |
-
|
109 |
-
$templates = [];
|
110 |
-
$templates[] = 'header.php';
|
111 |
-
|
112 |
-
remove_all_actions( 'wp_head' ); // Avoid running wp_head hooks again.
|
113 |
-
|
114 |
-
ob_start();
|
115 |
-
locate_template( $templates, true );
|
116 |
-
ob_get_clean();
|
117 |
-
}
|
118 |
-
}
|
119 |
-
|
120 |
-
public function add_canvas_header() {
|
121 |
-
if ( $this->is_template_available('header') ) {
|
122 |
-
$conditions = json_decode( get_option('wpr_header_conditions', '[]'), true );
|
123 |
-
$template_slug = WPR_Conditions_Manager::header_footer_display_conditions($conditions);
|
124 |
-
$template_id = Utilities::get_template_id($template_slug);
|
125 |
-
$show_on_canvas = get_post_meta($template_id, 'wpr_header_show_on_canvas', true);
|
126 |
-
|
127 |
-
if ( !empty($show_on_canvas) && 'true' === $show_on_canvas && 0 === strpos($template_slug, 'user-header-') ) {
|
128 |
-
Utilities::render_elementor_template($template_slug);
|
129 |
-
}
|
130 |
-
}
|
131 |
-
}
|
132 |
-
|
133 |
-
/**
|
134 |
-
** Footer
|
135 |
-
*/
|
136 |
-
public function replace_footer() {
|
137 |
-
if ( $this->is_template_available('footer') ) {
|
138 |
-
if ( ! in_array($this->current_theme, $this->royal_themes) ) {
|
139 |
-
require __DIR__ . '/../templates/views/theme-footer.php';
|
140 |
-
} else {
|
141 |
-
require __DIR__ . '/../templates/views/royal/theme-footer-royal.php';
|
142 |
-
}
|
143 |
-
|
144 |
-
$templates = [];
|
145 |
-
$templates[] = 'footer.php';
|
146 |
-
|
147 |
-
remove_all_actions( 'wp_footer' ); // Avoid running wp_footer hooks again.
|
148 |
-
|
149 |
-
ob_start();
|
150 |
-
locate_template( $templates, true );
|
151 |
-
ob_get_clean();
|
152 |
-
}
|
153 |
-
}
|
154 |
-
|
155 |
-
public function add_canvas_footer() {
|
156 |
-
if ( $this->is_template_available('footer') ) {
|
157 |
-
$conditions = json_decode( get_option('wpr_footer_conditions', '[]'), true );
|
158 |
-
$template_slug = WPR_Conditions_Manager::header_footer_display_conditions($conditions);
|
159 |
-
$template_id = Utilities::get_template_id($template_slug);
|
160 |
-
$show_on_canvas = get_post_meta($template_id, 'wpr_footer_show_on_canvas', true);
|
161 |
-
|
162 |
-
if ( !empty($show_on_canvas) && 'true' === $show_on_canvas && 0 === strpos($template_slug, 'user-footer-') ) {
|
163 |
-
Utilities::render_elementor_template($template_slug);
|
164 |
-
}
|
165 |
-
}
|
166 |
-
}
|
167 |
-
|
168 |
-
public function convert_to_canvas( $template ) {
|
169 |
-
$is_theme_builder_edit = \Elementor\Plugin::$instance->preview->is_preview_mode() && Utilities::is_theme_builder_template() ? true : false;
|
170 |
-
$_wp_page_template = get_post_meta(get_the_ID(), '_wp_page_template', true);
|
171 |
-
|
172 |
-
if ( $this->is_template_available('content') || $is_theme_builder_edit ) {
|
173 |
-
if ( (is_page() || is_single()) && 'elementor_canvas' === $_wp_page_template && !$is_theme_builder_edit ) {
|
174 |
-
return $template;
|
175 |
-
} else {
|
176 |
-
return WPR_ADDONS_PATH . 'admin/templates/wpr-canvas.php';
|
177 |
-
}
|
178 |
-
} else {
|
179 |
-
return $template;
|
180 |
-
}
|
181 |
-
}
|
182 |
-
|
183 |
-
/**
|
184 |
-
** Theme Builder Content Display
|
185 |
-
*/
|
186 |
-
public function canvas_page_content_display() {
|
187 |
-
// Get Template
|
188 |
-
$template = WPR_Conditions_Manager::canvas_page_content_display_conditions();
|
189 |
-
|
190 |
-
// Display Template
|
191 |
-
Utilities::render_elementor_template( $template );
|
192 |
-
}
|
193 |
-
|
194 |
-
/**
|
195 |
-
* Enqueue styles and scripts.
|
196 |
-
*/
|
197 |
-
public function enqueue_scripts() {
|
198 |
-
|
199 |
-
if ( class_exists( '\Elementor\Plugin' ) ) {
|
200 |
-
$elementor = \Elementor\Plugin::instance();
|
201 |
-
$elementor->frontend->enqueue_styles();
|
202 |
-
}
|
203 |
-
|
204 |
-
if ( class_exists( '\ElementorPro\Plugin' ) ) {
|
205 |
-
$elementor_pro = \ElementorPro\Plugin::instance();
|
206 |
-
$elementor_pro->enqueue_styles();
|
207 |
-
}
|
208 |
-
|
209 |
-
// Load Header Template CSS File
|
210 |
-
$heder_conditions = json_decode( get_option('wpr_header_conditions', '[]'), true );
|
211 |
-
$header_template_id = Utilities::get_template_id(WPR_Conditions_Manager::header_footer_display_conditions($heder_conditions));
|
212 |
-
|
213 |
-
if ( false !== $header_template_id ) {
|
214 |
-
if ( class_exists( '\Elementor\Core\Files\CSS\Post' ) ) {
|
215 |
-
$header_css_file = new \Elementor\Core\Files\CSS\Post( $header_template_id );
|
216 |
-
} elseif ( class_exists( '\Elementor\Post_CSS_File' ) ) {
|
217 |
-
$header_css_file = new \Elementor\Post_CSS_File( $header_template_id );
|
218 |
-
}
|
219 |
-
|
220 |
-
$header_css_file->enqueue();
|
221 |
-
}
|
222 |
-
|
223 |
-
// Load Footer Template CSS File
|
224 |
-
$footer_conditions = json_decode( get_option('wpr_footer_conditions', '[]'), true );
|
225 |
-
$footer_template_id = Utilities::get_template_id(WPR_Conditions_Manager::header_footer_display_conditions($footer_conditions));
|
226 |
-
|
227 |
-
if ( false !== $footer_template_id ) {
|
228 |
-
if ( class_exists( '\Elementor\Core\Files\CSS\Post' ) ) {
|
229 |
-
$footer_css_file = new \Elementor\Core\Files\CSS\Post( $footer_template_id );
|
230 |
-
} elseif ( class_exists( '\Elementor\Post_CSS_File' ) ) {
|
231 |
-
$footer_css_file = new \Elementor\Post_CSS_File( $footer_template_id );
|
232 |
-
}
|
233 |
-
|
234 |
-
$footer_css_file->enqueue();
|
235 |
-
}
|
236 |
-
|
237 |
-
// Load Canvas Content Template CSS File
|
238 |
-
$canvas_template_id = Utilities::get_template_id(WPR_Conditions_Manager::canvas_page_content_display_conditions());
|
239 |
-
|
240 |
-
if ( false !== $canvas_template_id ) {
|
241 |
-
if ( class_exists( '\Elementor\Core\Files\CSS\Post' ) ) {
|
242 |
-
$footer_css_file = new \Elementor\Core\Files\CSS\Post( $canvas_template_id );
|
243 |
-
} elseif ( class_exists( '\Elementor\Post_CSS_File' ) ) {
|
244 |
-
$footer_css_file = new \Elementor\Post_CSS_File( $canvas_template_id );
|
245 |
-
}
|
246 |
-
|
247 |
-
$footer_css_file->enqueue();
|
248 |
-
}
|
249 |
-
}
|
250 |
-
|
251 |
}
|
1 |
+
<?php
|
2 |
+
namespace WprAddons\Admin\Includes;
|
3 |
+
|
4 |
+
use WprAddons\Classes\Utilities;
|
5 |
+
|
6 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
7 |
+
exit; // Exit if accessed directly.
|
8 |
+
}
|
9 |
+
|
10 |
+
/**
|
11 |
+
* WPR_Render_Templates setup
|
12 |
+
*
|
13 |
+
* @since 1.0
|
14 |
+
*/
|
15 |
+
class WPR_Render_Templates {
|
16 |
+
|
17 |
+
/**
|
18 |
+
** Instance of Elemenntor Frontend class.
|
19 |
+
*
|
20 |
+
** @var \Elementor\Frontend()
|
21 |
+
*/
|
22 |
+
private static $elementor_instance;
|
23 |
+
|
24 |
+
/**
|
25 |
+
** Get Current Theme.
|
26 |
+
*/
|
27 |
+
public $current_theme;
|
28 |
+
|
29 |
+
/**
|
30 |
+
** Royal Themes Array.
|
31 |
+
*/
|
32 |
+
public $royal_themes;
|
33 |
+
|
34 |
+
|
35 |
+
/**
|
36 |
+
** Constructor
|
37 |
+
*/
|
38 |
+
public function __construct( $only_hf = false ) {
|
39 |
+
|
40 |
+
// Elementor Frontend
|
41 |
+
self::$elementor_instance = \Elementor\Plugin::instance();
|
42 |
+
|
43 |
+
// Ative Theme
|
44 |
+
$this->current_theme = get_template();
|
45 |
+
|
46 |
+
// Royal Themes
|
47 |
+
$this->royal_themes = ['ashe', 'ashe-pro', 'ashe-pro-premium', 'bard', 'bard-pro', 'bard-pro-premium'];
|
48 |
+
|
49 |
+
// Popular Themes
|
50 |
+
if ( 'astra' === $this->current_theme ) {
|
51 |
+
require_once(__DIR__ . '/../templates/views/astra/class-astra-compat.php');
|
52 |
+
|
53 |
+
} elseif ( 'generatepress' === $this->current_theme ) {
|
54 |
+
require_once(__DIR__ . '/../templates/views/generatepress/class-generatepress-compat.php');
|
55 |
+
|
56 |
+
} elseif ( 'oceanwp' === $this->current_theme ) {
|
57 |
+
require_once(__DIR__ . '/../templates/views/oceanwp/class-oceanwp-compat.php');
|
58 |
+
|
59 |
+
} elseif ( 'storefront' === $this->current_theme ) {
|
60 |
+
require_once(__DIR__ . '/../templates/views/storefront/class-storefront-compat.php');
|
61 |
+
|
62 |
+
// Other Themes
|
63 |
+
} else {
|
64 |
+
add_action( 'wp', [ $this, 'global_compatibility' ] );
|
65 |
+
}
|
66 |
+
|
67 |
+
// Scripts and Styles
|
68 |
+
add_action( 'wp_enqueue_scripts', [ $this, 'enqueue_scripts' ] );
|
69 |
+
|
70 |
+
// Theme Builder
|
71 |
+
if ( !$only_hf ) { // Prevent Loading in Header or Footer Templates
|
72 |
+
add_filter( 'template_include', [ $this, 'convert_to_canvas' ], 12 ); // 12 after WP Pages and WooCommerce.
|
73 |
+
add_action( 'elementor/page_templates/canvas/wpr_print_content', [ $this, 'canvas_page_content_display' ] );
|
74 |
+
}
|
75 |
+
}
|
76 |
+
|
77 |
+
public function global_compatibility() {
|
78 |
+
add_action( 'get_header', [ $this, 'replace_header' ] );
|
79 |
+
add_action( 'elementor/page_templates/canvas/before_content', [ $this, 'add_canvas_header' ] );
|
80 |
+
|
81 |
+
add_action( 'get_footer', [ $this, 'replace_footer' ] );
|
82 |
+
add_action( 'elementor/page_templates/canvas/after_content', [ $this, 'add_canvas_footer' ], 9 );
|
83 |
+
}
|
84 |
+
|
85 |
+
/**
|
86 |
+
** Check if a Template has Conditions
|
87 |
+
*/
|
88 |
+
public function is_template_available( $type ) {
|
89 |
+
if ( 'content' === $type ) {
|
90 |
+
return !is_null(WPR_Conditions_Manager::canvas_page_content_display_conditions()) ? true : false;
|
91 |
+
} else {
|
92 |
+
$conditions = json_decode( get_option('wpr_'. $type .'_conditions', '[]'), true );
|
93 |
+
$template = WPR_Conditions_Manager::header_footer_display_conditions( $conditions );
|
94 |
+
return (!empty( $conditions ) && !is_null($template)) ? true : false;
|
95 |
+
}
|
96 |
+
}
|
97 |
+
|
98 |
+
/**
|
99 |
+
** Header
|
100 |
+
*/
|
101 |
+
public function replace_header() {
|
102 |
+
if ( $this->is_template_available('header') ) {
|
103 |
+
if ( ! in_array($this->current_theme, $this->royal_themes) ) {
|
104 |
+
require __DIR__ . '/../templates/views/theme-header.php';
|
105 |
+
} else {
|
106 |
+
require __DIR__ . '/../templates/views/royal/theme-header-royal.php';
|
107 |
+
}
|
108 |
+
|
109 |
+
$templates = [];
|
110 |
+
$templates[] = 'header.php';
|
111 |
+
|
112 |
+
remove_all_actions( 'wp_head' ); // Avoid running wp_head hooks again.
|
113 |
+
|
114 |
+
ob_start();
|
115 |
+
locate_template( $templates, true );
|
116 |
+
ob_get_clean();
|
117 |
+
}
|
118 |
+
}
|
119 |
+
|
120 |
+
public function add_canvas_header() {
|
121 |
+
if ( $this->is_template_available('header') ) {
|
122 |
+
$conditions = json_decode( get_option('wpr_header_conditions', '[]'), true );
|
123 |
+
$template_slug = WPR_Conditions_Manager::header_footer_display_conditions($conditions);
|
124 |
+
$template_id = Utilities::get_template_id($template_slug);
|
125 |
+
$show_on_canvas = get_post_meta($template_id, 'wpr_header_show_on_canvas', true);
|
126 |
+
|
127 |
+
if ( !empty($show_on_canvas) && 'true' === $show_on_canvas && 0 === strpos($template_slug, 'user-header-') ) {
|
128 |
+
Utilities::render_elementor_template($template_slug);
|
129 |
+
}
|
130 |
+
}
|
131 |
+
}
|
132 |
+
|
133 |
+
/**
|
134 |
+
** Footer
|
135 |
+
*/
|
136 |
+
public function replace_footer() {
|
137 |
+
if ( $this->is_template_available('footer') ) {
|
138 |
+
if ( ! in_array($this->current_theme, $this->royal_themes) ) {
|
139 |
+
require __DIR__ . '/../templates/views/theme-footer.php';
|
140 |
+
} else {
|
141 |
+
require __DIR__ . '/../templates/views/royal/theme-footer-royal.php';
|
142 |
+
}
|
143 |
+
|
144 |
+
$templates = [];
|
145 |
+
$templates[] = 'footer.php';
|
146 |
+
|
147 |
+
remove_all_actions( 'wp_footer' ); // Avoid running wp_footer hooks again.
|
148 |
+
|
149 |
+
ob_start();
|
150 |
+
locate_template( $templates, true );
|
151 |
+
ob_get_clean();
|
152 |
+
}
|
153 |
+
}
|
154 |
+
|
155 |
+
public function add_canvas_footer() {
|
156 |
+
if ( $this->is_template_available('footer') ) {
|
157 |
+
$conditions = json_decode( get_option('wpr_footer_conditions', '[]'), true );
|
158 |
+
$template_slug = WPR_Conditions_Manager::header_footer_display_conditions($conditions);
|
159 |
+
$template_id = Utilities::get_template_id($template_slug);
|
160 |
+
$show_on_canvas = get_post_meta($template_id, 'wpr_footer_show_on_canvas', true);
|
161 |
+
|
162 |
+
if ( !empty($show_on_canvas) && 'true' === $show_on_canvas && 0 === strpos($template_slug, 'user-footer-') ) {
|
163 |
+
Utilities::render_elementor_template($template_slug);
|
164 |
+
}
|
165 |
+
}
|
166 |
+
}
|
167 |
+
|
168 |
+
public function convert_to_canvas( $template ) {
|
169 |
+
$is_theme_builder_edit = \Elementor\Plugin::$instance->preview->is_preview_mode() && Utilities::is_theme_builder_template() ? true : false;
|
170 |
+
$_wp_page_template = get_post_meta(get_the_ID(), '_wp_page_template', true);
|
171 |
+
|
172 |
+
if ( $this->is_template_available('content') || $is_theme_builder_edit ) {
|
173 |
+
if ( (is_page() || is_single()) && 'elementor_canvas' === $_wp_page_template && !$is_theme_builder_edit ) {
|
174 |
+
return $template;
|
175 |
+
} else {
|
176 |
+
return WPR_ADDONS_PATH . 'admin/templates/wpr-canvas.php';
|
177 |
+
}
|
178 |
+
} else {
|
179 |
+
return $template;
|
180 |
+
}
|
181 |
+
}
|
182 |
+
|
183 |
+
/**
|
184 |
+
** Theme Builder Content Display
|
185 |
+
*/
|
186 |
+
public function canvas_page_content_display() {
|
187 |
+
// Get Template
|
188 |
+
$template = WPR_Conditions_Manager::canvas_page_content_display_conditions();
|
189 |
+
|
190 |
+
// Display Template
|
191 |
+
Utilities::render_elementor_template( $template );
|
192 |
+
}
|
193 |
+
|
194 |
+
/**
|
195 |
+
* Enqueue styles and scripts.
|
196 |
+
*/
|
197 |
+
public function enqueue_scripts() {
|
198 |
+
|
199 |
+
if ( class_exists( '\Elementor\Plugin' ) ) {
|
200 |
+
$elementor = \Elementor\Plugin::instance();
|
201 |
+
$elementor->frontend->enqueue_styles();
|
202 |
+
}
|
203 |
+
|
204 |
+
if ( class_exists( '\ElementorPro\Plugin' ) ) {
|
205 |
+
$elementor_pro = \ElementorPro\Plugin::instance();
|
206 |
+
$elementor_pro->enqueue_styles();
|
207 |
+
}
|
208 |
+
|
209 |
+
// Load Header Template CSS File
|
210 |
+
$heder_conditions = json_decode( get_option('wpr_header_conditions', '[]'), true );
|
211 |
+
$header_template_id = Utilities::get_template_id(WPR_Conditions_Manager::header_footer_display_conditions($heder_conditions));
|
212 |
+
|
213 |
+
if ( false !== $header_template_id ) {
|
214 |
+
if ( class_exists( '\Elementor\Core\Files\CSS\Post' ) ) {
|
215 |
+
$header_css_file = new \Elementor\Core\Files\CSS\Post( $header_template_id );
|
216 |
+
} elseif ( class_exists( '\Elementor\Post_CSS_File' ) ) {
|
217 |
+
$header_css_file = new \Elementor\Post_CSS_File( $header_template_id );
|
218 |
+
}
|
219 |
+
|
220 |
+
$header_css_file->enqueue();
|
221 |
+
}
|
222 |
+
|
223 |
+
// Load Footer Template CSS File
|
224 |
+
$footer_conditions = json_decode( get_option('wpr_footer_conditions', '[]'), true );
|
225 |
+
$footer_template_id = Utilities::get_template_id(WPR_Conditions_Manager::header_footer_display_conditions($footer_conditions));
|
226 |
+
|
227 |
+
if ( false !== $footer_template_id ) {
|
228 |
+
if ( class_exists( '\Elementor\Core\Files\CSS\Post' ) ) {
|
229 |
+
$footer_css_file = new \Elementor\Core\Files\CSS\Post( $footer_template_id );
|
230 |
+
} elseif ( class_exists( '\Elementor\Post_CSS_File' ) ) {
|
231 |
+
$footer_css_file = new \Elementor\Post_CSS_File( $footer_template_id );
|
232 |
+
}
|
233 |
+
|
234 |
+
$footer_css_file->enqueue();
|
235 |
+
}
|
236 |
+
|
237 |
+
// Load Canvas Content Template CSS File
|
238 |
+
$canvas_template_id = Utilities::get_template_id(WPR_Conditions_Manager::canvas_page_content_display_conditions());
|
239 |
+
|
240 |
+
if ( false !== $canvas_template_id ) {
|
241 |
+
if ( class_exists( '\Elementor\Core\Files\CSS\Post' ) ) {
|
242 |
+
$footer_css_file = new \Elementor\Core\Files\CSS\Post( $canvas_template_id );
|
243 |
+
} elseif ( class_exists( '\Elementor\Post_CSS_File' ) ) {
|
244 |
+
$footer_css_file = new \Elementor\Post_CSS_File( $canvas_template_id );
|
245 |
+
}
|
246 |
+
|
247 |
+
$footer_css_file->enqueue();
|
248 |
+
}
|
249 |
+
}
|
250 |
+
|
251 |
}
|
admin/includes/wpr-templates-actions.php
CHANGED
@@ -163,9 +163,11 @@ class WPR_Templates_Actions {
|
|
163 |
public function wpr_import_library_template() {
|
164 |
$source = new WPR_Library_Source();
|
165 |
$slug = isset($_POST['slug']) ? sanitize_text_field(wp_unslash($_POST['slug'])) : '';
|
|
|
166 |
|
167 |
$data = $source->get_data([
|
168 |
-
'template_id' => $slug
|
|
|
169 |
]);
|
170 |
|
171 |
echo json_encode($data);
|
@@ -310,12 +312,18 @@ class WPR_Library_Source extends \Elementor\TemplateLibrary\Source_Base {
|
|
310 |
return $templates[ $template_id ];
|
311 |
}
|
312 |
|
313 |
-
public function request_template_data( $template_id ) {
|
314 |
if ( empty( $template_id ) ) {
|
315 |
return;
|
316 |
}
|
317 |
|
318 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
319 |
'timeout' => 60,
|
320 |
'sslverify' => false
|
321 |
] );
|
@@ -324,7 +332,7 @@ class WPR_Library_Source extends \Elementor\TemplateLibrary\Source_Base {
|
|
324 |
}
|
325 |
|
326 |
public function get_data( array $args ) {//TODO: FIX - This function imports placeholder images in library
|
327 |
-
$data = $this->request_template_data( $args['template_id'] );
|
328 |
|
329 |
$data = json_decode( $data, true );
|
330 |
|
163 |
public function wpr_import_library_template() {
|
164 |
$source = new WPR_Library_Source();
|
165 |
$slug = isset($_POST['slug']) ? sanitize_text_field(wp_unslash($_POST['slug'])) : '';
|
166 |
+
$kit = isset($_POST['kit']) ? sanitize_text_field(wp_unslash($_POST['kit'])) : '';
|
167 |
|
168 |
$data = $source->get_data([
|
169 |
+
'template_id' => $slug,
|
170 |
+
'kit_id' => $kit
|
171 |
]);
|
172 |
|
173 |
echo json_encode($data);
|
312 |
return $templates[ $template_id ];
|
313 |
}
|
314 |
|
315 |
+
public function request_template_data( $template_id, $kit_id ) {
|
316 |
if ( empty( $template_id ) ) {
|
317 |
return;
|
318 |
}
|
319 |
|
320 |
+
if ( '' !== $kit_id ) {
|
321 |
+
$url = 'https://royal-elementor-addons.com/library/templates-kit/'. $kit_id .'/';
|
322 |
+
} else {
|
323 |
+
$url = 'https://royal-elementor-addons.com/library/premade-styles/';
|
324 |
+
}
|
325 |
+
|
326 |
+
$response = wp_remote_get( $url . $template_id .'.json', [
|
327 |
'timeout' => 60,
|
328 |
'sslverify' => false
|
329 |
] );
|
332 |
}
|
333 |
|
334 |
public function get_data( array $args ) {//TODO: FIX - This function imports placeholder images in library
|
335 |
+
$data = $this->request_template_data( $args['template_id'], $args['kit_id'] );
|
336 |
|
337 |
$data = json_decode( $data, true );
|
338 |
|
admin/includes/wpr-templates-library.php
CHANGED
@@ -9,8 +9,8 @@ use WprAddons\Admin\Includes\WPR_Templates_Shortcode;
|
|
9 |
use WprAddons\Admin\Includes\WPR_Templates_Modal_Popups;
|
10 |
use WprAddons\Admin\Includes\WPR_Templates_Actions;
|
11 |
use WprAddons\Admin\Templates\WPR_Templates_Library_Blocks;
|
12 |
-
use WprAddons\Admin\Templates\WPR_Templates_Library_Popups;
|
13 |
use WprAddons\Admin\Templates\WPR_Templates_Library_Pages;
|
|
|
14 |
use WprAddons\Classes\Utilities;
|
15 |
|
16 |
/**
|
@@ -45,12 +45,12 @@ class WPR_Templates_Library {
|
|
45 |
// Add Blocks to Library
|
46 |
new WPR_Templates_Library_Blocks();
|
47 |
|
48 |
-
// Add Popups to Library
|
49 |
-
new WPR_Templates_Library_Popups();
|
50 |
-
|
51 |
// Add Pages to Library
|
52 |
// new WPR_Templates_Library_Pages();
|
53 |
|
|
|
|
|
|
|
54 |
// Enable Elementor for 'wpr_templates'
|
55 |
$this->add_elementor_cpt_support();
|
56 |
|
9 |
use WprAddons\Admin\Includes\WPR_Templates_Modal_Popups;
|
10 |
use WprAddons\Admin\Includes\WPR_Templates_Actions;
|
11 |
use WprAddons\Admin\Templates\WPR_Templates_Library_Blocks;
|
|
|
12 |
use WprAddons\Admin\Templates\WPR_Templates_Library_Pages;
|
13 |
+
use WprAddons\Admin\Templates\WPR_Templates_Library_Popups;
|
14 |
use WprAddons\Classes\Utilities;
|
15 |
|
16 |
/**
|
45 |
// Add Blocks to Library
|
46 |
new WPR_Templates_Library_Blocks();
|
47 |
|
|
|
|
|
|
|
48 |
// Add Pages to Library
|
49 |
// new WPR_Templates_Library_Pages();
|
50 |
|
51 |
+
// Add Popups to Library
|
52 |
+
new WPR_Templates_Library_Popups();
|
53 |
+
|
54 |
// Enable Elementor for 'wpr_templates'
|
55 |
$this->add_elementor_cpt_support();
|
56 |
|
admin/includes/wpr-templates-shortcode.php
CHANGED
@@ -1,51 +1,51 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
namespace WprAddons\Admin\Includes;
|
4 |
-
|
5 |
-
use Elementor;
|
6 |
-
|
7 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
8 |
-
exit; // Exit if accessed directly.
|
9 |
-
}
|
10 |
-
|
11 |
-
/**
|
12 |
-
* WPR_Templates_Shortcode setup
|
13 |
-
*
|
14 |
-
* @since 1.0
|
15 |
-
*/
|
16 |
-
class WPR_Templates_Shortcode {
|
17 |
-
|
18 |
-
public function __construct() {
|
19 |
-
add_shortcode( 'wpr-template', [ $this, 'shortcode' ] );
|
20 |
-
|
21 |
-
add_action('elementor/element/after_section_start', [ $this, 'extend_shortcode' ], 10, 3 );
|
22 |
-
}
|
23 |
-
|
24 |
-
public function shortcode( $attributes = [] ) {
|
25 |
-
if ( empty( $attributes['id'] ) ) {
|
26 |
-
return '';
|
27 |
-
}
|
28 |
-
|
29 |
-
$edit_link = '<span class="wpr-template-edit-btn" data-permalink="'. esc_url(get_permalink($attributes['id'])) .'">Edit Template</span>';
|
30 |
-
|
31 |
-
$type = get_post_meta(get_the_ID(), '_wpr_template_type', true);
|
32 |
-
$has_css = 'internal' === get_option( 'elementor_css_print_method' ) || '' !== $type;
|
33 |
-
|
34 |
-
return Elementor\Plugin::instance()->frontend->get_builder_content_for_display( $attributes['id'], $has_css ) . $edit_link;
|
35 |
-
}
|
36 |
-
|
37 |
-
public function extend_shortcode( $section, $section_id, $args ) {
|
38 |
-
if ( $section->get_name() == 'shortcode' && $section_id == 'section_shortcode' ) {
|
39 |
-
$section->add_control(
|
40 |
-
'select_template' ,
|
41 |
-
[
|
42 |
-
'label' => esc_html__( 'Select Template', 'wpr-addons' ),
|
43 |
-
'type' => 'wpr-ajax-select2',
|
44 |
-
'options' => 'ajaxselect2/get_elementor_templates',
|
45 |
-
'label_block' => true,
|
46 |
-
]
|
47 |
-
);
|
48 |
-
}
|
49 |
-
}
|
50 |
-
|
51 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace WprAddons\Admin\Includes;
|
4 |
+
|
5 |
+
use Elementor;
|
6 |
+
|
7 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
8 |
+
exit; // Exit if accessed directly.
|
9 |
+
}
|
10 |
+
|
11 |
+
/**
|
12 |
+
* WPR_Templates_Shortcode setup
|
13 |
+
*
|
14 |
+
* @since 1.0
|
15 |
+
*/
|
16 |
+
class WPR_Templates_Shortcode {
|
17 |
+
|
18 |
+
public function __construct() {
|
19 |
+
add_shortcode( 'wpr-template', [ $this, 'shortcode' ] );
|
20 |
+
|
21 |
+
add_action('elementor/element/after_section_start', [ $this, 'extend_shortcode' ], 10, 3 );
|
22 |
+
}
|
23 |
+
|
24 |
+
public function shortcode( $attributes = [] ) {
|
25 |
+
if ( empty( $attributes['id'] ) ) {
|
26 |
+
return '';
|
27 |
+
}
|
28 |
+
|
29 |
+
$edit_link = '<span class="wpr-template-edit-btn" data-permalink="'. esc_url(get_permalink($attributes['id'])) .'">Edit Template</span>';
|
30 |
+
|
31 |
+
$type = get_post_meta(get_the_ID(), '_wpr_template_type', true);
|
32 |
+
$has_css = 'internal' === get_option( 'elementor_css_print_method' ) || '' !== $type;
|
33 |
+
|
34 |
+
return Elementor\Plugin::instance()->frontend->get_builder_content_for_display( $attributes['id'], $has_css ) . $edit_link;
|
35 |
+
}
|
36 |
+
|
37 |
+
public function extend_shortcode( $section, $section_id, $args ) {
|
38 |
+
if ( $section->get_name() == 'shortcode' && $section_id == 'section_shortcode' ) {
|
39 |
+
$section->add_control(
|
40 |
+
'select_template' ,
|
41 |
+
[
|
42 |
+
'label' => esc_html__( 'Select Template', 'wpr-addons' ),
|
43 |
+
'type' => 'wpr-ajax-select2',
|
44 |
+
'options' => 'ajaxselect2/get_elementor_templates',
|
45 |
+
'label_block' => true,
|
46 |
+
]
|
47 |
+
);
|
48 |
+
}
|
49 |
+
}
|
50 |
+
|
51 |
}
|
admin/plugin-options.php
CHANGED
@@ -7,6 +7,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
7 |
use WprAddons\Admin\Includes\WPR_Templates_Loop;
|
8 |
use WprAddonsPro\Admin\Wpr_White_Label;
|
9 |
use WprAddons\Classes\Utilities;
|
|
|
10 |
|
11 |
// Register Menus
|
12 |
function wpr_addons_add_admin_menu() {
|
@@ -114,7 +115,7 @@ function wpr_register_addons_settings() {
|
|
114 |
}
|
115 |
|
116 |
function wpr_addons_settings_page() {
|
117 |
-
|
118 |
?>
|
119 |
|
120 |
<div class="wrap wpr-settings-page-wrap">
|
7 |
use WprAddons\Admin\Includes\WPR_Templates_Loop;
|
8 |
use WprAddonsPro\Admin\Wpr_White_Label;
|
9 |
use WprAddons\Classes\Utilities;
|
10 |
+
use WprAddons\Admin\Templates\WPR_Templates_Data;
|
11 |
|
12 |
// Register Menus
|
13 |
function wpr_addons_add_admin_menu() {
|
115 |
}
|
116 |
|
117 |
function wpr_addons_settings_page() {
|
118 |
+
|
119 |
?>
|
120 |
|
121 |
<div class="wrap wpr-settings-page-wrap">
|
admin/templates-kit.php
CHANGED
@@ -1,707 +1,787 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
4 |
-
exit; // Exit if accessed directly.
|
5 |
-
}
|
6 |
-
|
7 |
-
use WprAddons\Admin\Templates\WPR_Templates_Data;
|
8 |
-
use WprAddons\Classes\Utilities;
|
9 |
-
use Elementor\Plugin;
|
10 |
-
|
11 |
-
// Register Menus
|
12 |
-
function wpr_addons_add_templates_kit_menu() {
|
13 |
-
add_submenu_page( 'wpr-addons', 'Templates Kit', 'Templates Kit', 'manage_options', 'wpr-templates-kit', 'wpr_addons_templates_kit_page' );
|
14 |
-
}
|
15 |
-
add_action( 'admin_menu', 'wpr_addons_add_templates_kit_menu' );
|
16 |
-
|
17 |
-
// Import Template Kit
|
18 |
-
add_action( 'wp_ajax_wpr_activate_required_theme', 'wpr_activate_required_theme' );
|
19 |
-
add_action( 'wp_ajax_wpr_activate_required_plugins', 'wpr_activate_required_plugins' );
|
20 |
-
add_action( 'wp_ajax_wpr_fix_royal_compatibility', 'wpr_fix_royal_compatibility' );
|
21 |
-
add_action( 'wp_ajax_wpr_reset_previous_import', 'wpr_reset_previous_import' );
|
22 |
-
add_action( 'wp_ajax_wpr_import_templates_kit', 'wpr_import_templates_kit' );
|
23 |
-
add_action( 'wp_ajax_wpr_final_settings_setup', 'wpr_final_settings_setup' );
|
24 |
-
add_action( 'wp_ajax_wpr_search_query_results', 'wpr_search_query_results' );
|
25 |
-
add_action( 'init', 'disable_default_woo_pages_creation', 2 );
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
<
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
<span
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
<li data-filter="
|
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 |
-
echo '<
|
106 |
-
echo '<
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
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 |
-
|
142 |
-
|
143 |
-
|
144 |
-
<
|
145 |
-
<
|
146 |
-
<
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
<
|
155 |
-
</div>
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
}
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
if ( !is_plugin_active( '
|
223 |
-
activate_plugin( '
|
224 |
-
}
|
225 |
-
} elseif ( '
|
226 |
-
if ( !is_plugin_active( '
|
227 |
-
activate_plugin( '
|
228 |
-
}
|
229 |
-
}
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
'
|
246 |
-
'
|
247 |
-
'
|
248 |
-
'
|
249 |
-
'
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
//
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
//
|
303 |
-
|
304 |
-
|
305 |
-
//
|
306 |
-
|
307 |
-
|
308 |
-
//
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
//
|
351 |
-
$
|
352 |
-
|
353 |
-
'
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
'
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
$
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
$
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
update_option(
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
update_option('
|
516 |
-
update_option('
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
update_option('
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
)
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
$
|
580 |
-
$
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
//
|
620 |
-
$
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
if (
|
670 |
-
|
671 |
-
}
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
707 |
}
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
4 |
+
exit; // Exit if accessed directly.
|
5 |
+
}
|
6 |
+
|
7 |
+
use WprAddons\Admin\Templates\WPR_Templates_Data;
|
8 |
+
use WprAddons\Classes\Utilities;
|
9 |
+
use Elementor\Plugin;
|
10 |
+
|
11 |
+
// Register Menus
|
12 |
+
function wpr_addons_add_templates_kit_menu() {
|
13 |
+
add_submenu_page( 'wpr-addons', 'Templates Kit', 'Templates Kit', 'manage_options', 'wpr-templates-kit', 'wpr_addons_templates_kit_page' );
|
14 |
+
}
|
15 |
+
add_action( 'admin_menu', 'wpr_addons_add_templates_kit_menu' );
|
16 |
+
|
17 |
+
// Import Template Kit
|
18 |
+
add_action( 'wp_ajax_wpr_activate_required_theme', 'wpr_activate_required_theme' );
|
19 |
+
add_action( 'wp_ajax_wpr_activate_required_plugins', 'wpr_activate_required_plugins' );
|
20 |
+
add_action( 'wp_ajax_wpr_fix_royal_compatibility', 'wpr_fix_royal_compatibility' );
|
21 |
+
add_action( 'wp_ajax_wpr_reset_previous_import', 'wpr_reset_previous_import' );
|
22 |
+
add_action( 'wp_ajax_wpr_import_templates_kit', 'wpr_import_templates_kit' );
|
23 |
+
add_action( 'wp_ajax_wpr_final_settings_setup', 'wpr_final_settings_setup' );
|
24 |
+
add_action( 'wp_ajax_wpr_search_query_results', 'wpr_search_query_results' );
|
25 |
+
add_action( 'init', 'disable_default_woo_pages_creation', 2 );
|
26 |
+
|
27 |
+
// Set Image Timeout
|
28 |
+
if ( version_compare( get_bloginfo( 'version' ), '5.1.0', '>=' ) ) {
|
29 |
+
add_filter( 'http_request_timeout', 'set_image_request_timeout', 10, 2 );
|
30 |
+
}
|
31 |
+
|
32 |
+
/**
|
33 |
+
** Render Templates Kit Page
|
34 |
+
*/
|
35 |
+
function wpr_addons_templates_kit_page() {
|
36 |
+
|
37 |
+
?>
|
38 |
+
|
39 |
+
<div class="wpr-templates-kit-page">
|
40 |
+
|
41 |
+
<header>
|
42 |
+
<div class="wpr-templates-kit-logo">
|
43 |
+
<div><img src="<?php echo !empty(get_option('wpr_wl_plugin_logo')) ? esc_url(wp_get_attachment_image_src(get_option('wpr_wl_plugin_logo'), 'full')[0]) : esc_url(WPR_ADDONS_ASSETS_URL .'img/logo-40x40.png'); ?>"></div>
|
44 |
+
<div class="back-btn"><?php printf( esc_html__('%s Back to Library', 'wpr-addons'), '<span class="dashicons dashicons-arrow-left-alt2"></span>'); ?></div>
|
45 |
+
</div>
|
46 |
+
|
47 |
+
<div class="wpr-templates-kit-search">
|
48 |
+
<input type="text" autocomplete="off" placeholder="<?php esc_html_e('Search Templates Kit...', 'wpr-addons'); ?>">
|
49 |
+
<span class="dashicons dashicons-search"></span>
|
50 |
+
</div>
|
51 |
+
|
52 |
+
<div class="wpr-templates-kit-price-filter">
|
53 |
+
<span data-price="mixed"><?php esc_html_e('Price: Mixed', 'wpr-addons'); ?></span>
|
54 |
+
<span class="dashicons dashicons-arrow-down-alt2"></span>
|
55 |
+
<ul>
|
56 |
+
<li><?php esc_html_e('Mixed', 'wpr-addons'); ?></li>
|
57 |
+
<li><?php esc_html_e('Free', 'wpr-addons'); ?></li>
|
58 |
+
<li><?php esc_html_e('Premium', 'wpr-addons'); ?></li>
|
59 |
+
</ul>
|
60 |
+
</div>
|
61 |
+
|
62 |
+
<div class="wpr-templates-kit-filters">
|
63 |
+
<div>Filter: All</div>
|
64 |
+
<ul>
|
65 |
+
<li data-filter="all">Blog</li>
|
66 |
+
<li data-filter="blog">Blog</li>
|
67 |
+
<li data-filter="business">Business</li>
|
68 |
+
<li data-filter="ecommerce">eCommerce</li>
|
69 |
+
<li data-filter="beauty">Beauty</li>
|
70 |
+
</ul>
|
71 |
+
</div>
|
72 |
+
</header>
|
73 |
+
|
74 |
+
<div class="wpr-templates-kit-page-title">
|
75 |
+
<h1><?php esc_html_e('Royal Elementor Templates Kit', 'wpr-addons'); ?></h1>
|
76 |
+
<p><?php esc_html_e('Import any Templates Kit with just a Single click', 'wpr-addons'); ?></p>
|
77 |
+
<p>
|
78 |
+
<a href="https://www.youtube.com/watch?v=kl2xBoWW81o" class="wpr-options-button button" target="_blank">
|
79 |
+
<?php esc_html_e('Video Tutorial', 'wpr-addons'); ?>
|
80 |
+
<span class="dashicons dashicons-video-alt3"></span>
|
81 |
+
</a>
|
82 |
+
</p>
|
83 |
+
</div>
|
84 |
+
|
85 |
+
<div class="wpr-templates-kit-grid main-grid" data-theme-status="<?php echo esc_attr(get_theme_status()); ?>">
|
86 |
+
<?php
|
87 |
+
$kits = WPR_Templates_Data::get_available_kits();
|
88 |
+
$sorted_kits = [];
|
89 |
+
|
90 |
+
foreach ($kits as $slug => $kit) {
|
91 |
+
foreach ($kit as $version => $data ) {
|
92 |
+
$sorted_kits[$slug .'-'. $version] = $data;
|
93 |
+
}
|
94 |
+
}
|
95 |
+
|
96 |
+
// Sort by Priority
|
97 |
+
uasort($sorted_kits, function ($item1, $item2) {
|
98 |
+
if ($item1['priority'] == $item2['priority']) return 0;
|
99 |
+
return $item1['priority'] < $item2['priority'] ? -1 : 1;
|
100 |
+
});
|
101 |
+
|
102 |
+
// Loop
|
103 |
+
foreach ($sorted_kits as $kit_id => $data) {
|
104 |
+
echo '<div class="grid-item" data-kit-id="'. esc_attr($kit_id) .'" data-tags="'. esc_attr($data['tags']) .'" data-plugins="'. esc_attr($data['plugins']) .'" data-pages="'. esc_attr($data['pages']) .'" data-price="'. esc_attr($data['price']) .'">';
|
105 |
+
echo '<div class="image-wrap">';
|
106 |
+
echo '<img src="'. esc_url('https://royal-elementor-addons.com/library/templates-kit/'. $kit_id .'/home.jpg') .'">';
|
107 |
+
echo '<div class="image-overlay"><span class="dashicons dashicons-search"></span></div>';
|
108 |
+
echo '</div>';
|
109 |
+
echo '<footer>';
|
110 |
+
echo '<h3>'. esc_html($data['name']) .'</h3>';
|
111 |
+
if ( $data['woo-builder'] ) {
|
112 |
+
echo '<span class="wpr-woo-builder-label">'. esc_html__( 'Woo Builder', 'wpr-addons' ) .'</span>';
|
113 |
+
} elseif ( $data['theme-builder'] ) {
|
114 |
+
echo '<span class="wpr-theme-builder-label">'. esc_html__( 'Theme Builder', 'wpr-addons' ) .'</span>';
|
115 |
+
}
|
116 |
+
echo '</footer>';
|
117 |
+
echo '</div>';
|
118 |
+
}
|
119 |
+
|
120 |
+
?>
|
121 |
+
|
122 |
+
</div>
|
123 |
+
|
124 |
+
<div class="wpr-templates-kit-single">
|
125 |
+
<div class="wpr-templates-kit-grid single-grid"></div>
|
126 |
+
|
127 |
+
<footer class="action-buttons-wrap">
|
128 |
+
<a href="https://royal-elementor-addons.com/" class="preview-demo button" target="_blank"><?php esc_html_e('Preview Demo', 'wpr-addons'); ?> <span class="dashicons dashicons-external"></span></a>
|
129 |
+
|
130 |
+
<div class="import-template-buttons">
|
131 |
+
<?php
|
132 |
+
echo '<button class="import-kit button">'. esc_html__('Import Templates Kit', 'wpr-addons') .' <span class="dashicons dashicons-download"></span></button>';
|
133 |
+
echo '<a href="https://royal-elementor-addons.com/?ref=rea-plugin-backend-templates-upgrade-pro#purchasepro" class="get-access button" target="_blank">'. esc_html__('Get Access', 'wpr-addons') .' <span class="dashicons dashicons-external"></span></a>';
|
134 |
+
?>
|
135 |
+
<button class="import-template button"><?php printf( esc_html__( 'Import %s Template', 'wpr-addons' ), '<strong></strong>' ); ?></button>
|
136 |
+
|
137 |
+
</div>
|
138 |
+
</footer>
|
139 |
+
</div>
|
140 |
+
|
141 |
+
<div class="wpr-import-kit-popup-wrap">
|
142 |
+
<div class="overlay"></div>
|
143 |
+
<div class="wpr-import-kit-popup">
|
144 |
+
<header>
|
145 |
+
<h3><?php esc_html_e('Template Kit is being imported', 'wpr-addons'); ?><span>.</span></h3>
|
146 |
+
<span class="dashicons dashicons-no-alt close-btn"></span>
|
147 |
+
</header>
|
148 |
+
<div class="content">
|
149 |
+
<p><?php esc_html_e('The import process can take a few seconds depending on the size of the kit you are importing and speed of the connection.', 'wpr-addons'); ?></p>
|
150 |
+
<p><?php esc_html_e('Please do NOT close this browser window until import is completed.', 'wpr-addons'); ?></p>
|
151 |
+
|
152 |
+
<div class="progress-wrap">
|
153 |
+
<div class="progress-bar"></div>
|
154 |
+
<strong></strong>
|
155 |
+
</div>
|
156 |
+
|
157 |
+
<div class="wpr-import-help">
|
158 |
+
<a href="https://royal-elementor-addons.com/contactus/?ref=rea-plugin-backend-templates-import-screen" target="_blank">Having trouble with template import? Get help <span class="dashicons dashicons-sos"></span></a>
|
159 |
+
</div>
|
160 |
+
</div>
|
161 |
+
</div>
|
162 |
+
</div>
|
163 |
+
|
164 |
+
<div class="wpr-templates-kit-not-found">
|
165 |
+
<img src="<?php echo esc_url(WPR_ADDONS_ASSETS_URL .'img/not-found.png'); ?>">
|
166 |
+
<h1><?php esc_html_e('No Search Results Found.', 'wpr-addons'); ?></h1>
|
167 |
+
<p><?php esc_html_e('Cant find a Templates Kit you are looking for?', 'wpr-addons'); ?></p>
|
168 |
+
<a href="https://royal-elementor-addons.com/library/request-new-kit-red.html" target="_blank"><?php esc_html_e('Request Templates Kit.', 'wpr-addons'); ?></a>
|
169 |
+
</div>
|
170 |
+
|
171 |
+
</div>
|
172 |
+
|
173 |
+
|
174 |
+
<?php
|
175 |
+
|
176 |
+
} // End wpr_addons_templates_kit_page()
|
177 |
+
|
178 |
+
/**
|
179 |
+
** Get Theme Status
|
180 |
+
*/
|
181 |
+
function get_theme_status() {
|
182 |
+
$theme = wp_get_theme();
|
183 |
+
|
184 |
+
// Theme installed and activate.
|
185 |
+
if ( 'Royal Elementor Kit' === $theme->name || 'Royal Elementor Kit' === $theme->parent_theme ) {
|
186 |
+
return 'req-theme-active';
|
187 |
+
}
|
188 |
+
|
189 |
+
// Theme installed but not activate.
|
190 |
+
foreach ( (array) wp_get_themes() as $theme_dir => $theme ) {
|
191 |
+
if ( 'Royal Elementor Kit' === $theme->name || 'Royal Elementor Kit' === $theme->parent_theme ) {
|
192 |
+
return 'req-theme-inactive';
|
193 |
+
}
|
194 |
+
}
|
195 |
+
|
196 |
+
return 'req-theme-not-installed';
|
197 |
+
}
|
198 |
+
|
199 |
+
/**
|
200 |
+
** Install/Activate Required Theme
|
201 |
+
*/
|
202 |
+
function wpr_activate_required_theme() {
|
203 |
+
// Get Current Theme
|
204 |
+
$theme = get_option('stylesheet');
|
205 |
+
|
206 |
+
// Activate Royal Elementor Kit Theme
|
207 |
+
if ( 'ashe-pro-premium' !== $theme && 'bard-pro-premium' !== $theme
|
208 |
+
&& 'vayne-pro-premium' !== $theme && 'kayn-pro-premium' !== $theme ) {
|
209 |
+
switch_theme( 'royal-elementor-kit' );
|
210 |
+
set_transient( 'royal-elementor-kit_activation_notice', true );
|
211 |
+
}
|
212 |
+
|
213 |
+
// TODO: maybe return back - 'ashe' !== $theme && 'bard' !== $theme &&
|
214 |
+
}
|
215 |
+
|
216 |
+
/**
|
217 |
+
** Activate Required Plugins
|
218 |
+
*/
|
219 |
+
function wpr_activate_required_plugins() {
|
220 |
+
if ( isset($_POST['plugin']) ) {
|
221 |
+
if ( 'contact-form-7' == $_POST['plugin'] ) {
|
222 |
+
if ( !is_plugin_active( 'contact-form-7/wp-contact-form-7.php' ) ) {
|
223 |
+
activate_plugin( 'contact-form-7/wp-contact-form-7.php' );
|
224 |
+
}
|
225 |
+
} elseif ( 'woocommerce' == $_POST['plugin'] ) {
|
226 |
+
if ( !is_plugin_active( 'woocommerce/woocommerce.php' ) ) {
|
227 |
+
activate_plugin( 'woocommerce/woocommerce.php' );
|
228 |
+
}
|
229 |
+
} elseif ( 'media-library-assistant' == $_POST['plugin'] ) {
|
230 |
+
if ( !is_plugin_active( 'media-library-assistant/index.php' ) ) {
|
231 |
+
activate_plugin( 'media-library-assistant/index.php' );
|
232 |
+
}
|
233 |
+
}
|
234 |
+
}
|
235 |
+
}
|
236 |
+
|
237 |
+
/**
|
238 |
+
** Deactivate Extra Plugins
|
239 |
+
*/
|
240 |
+
function wpr_fix_royal_compatibility() {
|
241 |
+
// Get currently active plugins
|
242 |
+
$active_plugins = (array) get_option( 'active_plugins', array() );
|
243 |
+
$active_plugins = array_values($active_plugins);
|
244 |
+
$required_plugins = [
|
245 |
+
'elementor/elementor.php',
|
246 |
+
'royal-elementor-addons/wpr-addons.php',
|
247 |
+
'royal-elementor-addons-pro/wpr-addons-pro.php',
|
248 |
+
'wpr-addons-pro/wpr-addons-pro.php',
|
249 |
+
'contact-form-7/wp-contact-form-7.php',
|
250 |
+
'woocommerce/woocommerce.php',
|
251 |
+
'really-simple-ssl/rlrsssl-really-simple-ssl.php',
|
252 |
+
'wp-mail-smtp/wp_mail_smtp.php',
|
253 |
+
'updraftplus/updraftplus.php',
|
254 |
+
'temporary-login-without-password/temporary-login-without-password.php',
|
255 |
+
'wp-reset/wp-reset.php'
|
256 |
+
];
|
257 |
+
|
258 |
+
// Deactivate Extra Import Plugins
|
259 |
+
foreach ( $active_plugins as $key => $value ) {
|
260 |
+
if ( ! in_array($value, $required_plugins) ) {
|
261 |
+
$active_key = array_search($value, $active_plugins);;
|
262 |
+
unset($active_plugins[$active_key]);
|
263 |
+
}
|
264 |
+
}
|
265 |
+
|
266 |
+
// Set Active Plugins
|
267 |
+
update_option( 'active_plugins', array_values($active_plugins) );
|
268 |
+
|
269 |
+
// Get Current Theme
|
270 |
+
$theme = get_option('stylesheet');
|
271 |
+
|
272 |
+
// Activate Royal Elementor Kit Theme
|
273 |
+
if ( 'ashe-pro-premium' !== $theme && 'bard-pro-premium' !== $theme
|
274 |
+
&& 'vayne-pro-premium' !== $theme && 'kayn-pro-premium' !== $theme ) {
|
275 |
+
switch_theme( 'royal-elementor-kit' );
|
276 |
+
set_transient( 'royal-elementor-kit_activation_notice', true );
|
277 |
+
}
|
278 |
+
}
|
279 |
+
|
280 |
+
/**
|
281 |
+
** Import Template Kit
|
282 |
+
*/
|
283 |
+
function wpr_import_templates_kit() {
|
284 |
+
|
285 |
+
// Temp Define Importers
|
286 |
+
if ( ! defined('WP_LOAD_IMPORTERS') ) {
|
287 |
+
define('WP_LOAD_IMPORTERS', true);
|
288 |
+
}
|
289 |
+
|
290 |
+
// Include if Class Does NOT Exist
|
291 |
+
if ( ! class_exists( 'WP_Import' ) ) {
|
292 |
+
$class_wp_importer = WPR_ADDONS_PATH .'admin/import/class-wordpress-importer.php';
|
293 |
+
if ( file_exists( $class_wp_importer ) ) {
|
294 |
+
require $class_wp_importer;
|
295 |
+
}
|
296 |
+
}
|
297 |
+
|
298 |
+
if ( class_exists( 'WP_Import' ) ) {
|
299 |
+
$kit = isset($_POST['wpr_templates_kit']) ? sanitize_file_name(wp_unslash($_POST['wpr_templates_kit'])) : '';
|
300 |
+
$file = isset($_POST['wpr_templates_kit_single']) ? sanitize_file_name(wp_unslash($_POST['wpr_templates_kit_single'])) : '';
|
301 |
+
|
302 |
+
// Tmp
|
303 |
+
update_option( 'wpr-import-kit-id', $kit );
|
304 |
+
|
305 |
+
// Regenerate Extra Image Sizes
|
306 |
+
add_filter( 'intermediate_image_sizes_advanced', 'disable_extra_image_sizes', 10, 3 );
|
307 |
+
|
308 |
+
// No Limit for Execution
|
309 |
+
set_time_limit(0);
|
310 |
+
|
311 |
+
// Download Import File
|
312 |
+
$local_file_path = download_template( $kit, $file );
|
313 |
+
|
314 |
+
// Prepare for Import
|
315 |
+
$wp_import = new WP_Import( $local_file_path, ['fetch_attachments' => true] );
|
316 |
+
|
317 |
+
// Import
|
318 |
+
ob_start();
|
319 |
+
$wp_import->run();
|
320 |
+
ob_end_clean();
|
321 |
+
|
322 |
+
// Delete Import File
|
323 |
+
unlink( $local_file_path );
|
324 |
+
|
325 |
+
// Send to JS
|
326 |
+
echo esc_html(serialize( $wp_import ));
|
327 |
+
}
|
328 |
+
|
329 |
+
}
|
330 |
+
|
331 |
+
/**
|
332 |
+
** Download Template
|
333 |
+
*/
|
334 |
+
function download_template( $kit, $file ) {
|
335 |
+
$file = ! $file ? 'main' : $file;
|
336 |
+
|
337 |
+
// Avoid Cache
|
338 |
+
$randomNum = substr(str_shuffle("0123456789abcdefghijklmnopqrstvwxyzABCDEFGHIJKLMNOPQRSTVWXYZ"), 0, 7);
|
339 |
+
|
340 |
+
// Remote and Local Files
|
341 |
+
$remote_file_url = 'https://royal-elementor-addons.com/library/templates-kit/'. $kit .'/main.xml?='. $randomNum;
|
342 |
+
|
343 |
+
// If the function it's not available, require it.
|
344 |
+
if ( ! function_exists( 'download_url' ) ) {
|
345 |
+
require_once ABSPATH . 'wp-admin/includes/file.php';
|
346 |
+
}
|
347 |
+
|
348 |
+
$tmp_file = download_url( $remote_file_url );
|
349 |
+
|
350 |
+
// WP Error.
|
351 |
+
if ( is_wp_error( $tmp_file ) ) {
|
352 |
+
// Fallback URL
|
353 |
+
$remote_file_url = 'https://mysitetutorial.com/library/templates-kit/'. $kit .'/main.xml?='. $randomNum;
|
354 |
+
$tmp_file = download_url( $remote_file_url );
|
355 |
+
|
356 |
+
if ( is_wp_error( $tmp_file ) ) {
|
357 |
+
wp_send_json_error([
|
358 |
+
'error' => esc_html__('Error: Import File download failed.', 'wpr-addons'),
|
359 |
+
'help' => esc_html__('Please contact Customer Support and send this Error.', 'wpr-addons')
|
360 |
+
]);
|
361 |
+
return false;
|
362 |
+
}
|
363 |
+
}
|
364 |
+
|
365 |
+
// Array based on $_FILE as seen in PHP file uploads.
|
366 |
+
$file_args = [
|
367 |
+
'name' => 'main.xml',
|
368 |
+
'tmp_name' => $tmp_file,
|
369 |
+
'error' => 0,
|
370 |
+
'size' => filesize( $tmp_file ),
|
371 |
+
];
|
372 |
+
|
373 |
+
$defaults = array(
|
374 |
+
'test_form' => false,
|
375 |
+
'test_size' => true,
|
376 |
+
'test_upload' => true,
|
377 |
+
'mimes' => [
|
378 |
+
'xml' => 'text/xml',
|
379 |
+
'json' => 'text/plain',
|
380 |
+
],
|
381 |
+
'wp_handle_sideload' => 'upload',
|
382 |
+
);
|
383 |
+
|
384 |
+
// Move the temporary file into the uploads directory.
|
385 |
+
$local_file = wp_handle_sideload( $file_args, $defaults );
|
386 |
+
|
387 |
+
if ( isset( $local_file['error'] ) ) {
|
388 |
+
wp_send_json_error([
|
389 |
+
'error' => esc_html__('Error: Import File upload failed.', 'wpr-addons'),
|
390 |
+
'help' => esc_html__('Please contact Customer Support and send this Error.', 'wpr-addons')
|
391 |
+
]);
|
392 |
+
return false;
|
393 |
+
}
|
394 |
+
|
395 |
+
// Success.
|
396 |
+
return $local_file['file'];
|
397 |
+
}
|
398 |
+
|
399 |
+
/**
|
400 |
+
** Reset Previous Import
|
401 |
+
*/
|
402 |
+
function wpr_reset_previous_import() {
|
403 |
+
$args = [
|
404 |
+
'post_type' => [
|
405 |
+
'page',
|
406 |
+
'post',
|
407 |
+
'product',
|
408 |
+
'wpr_mega_menu',
|
409 |
+
'wpr_templates',
|
410 |
+
'elementor_library',
|
411 |
+
'attachment'
|
412 |
+
],
|
413 |
+
'post_status' => 'any',
|
414 |
+
'posts_per_page' => '-1',
|
415 |
+
'meta_key' => '_wpr_demo_import_item'
|
416 |
+
];
|
417 |
+
|
418 |
+
$imported_items = new WP_Query ( $args );
|
419 |
+
|
420 |
+
if ( $imported_items->have_posts() ) {
|
421 |
+
while ( $imported_items->have_posts() ) {
|
422 |
+
$imported_items->the_post();
|
423 |
+
|
424 |
+
// Dont Delete Elementor Kit
|
425 |
+
if ( 'Default Kit' == get_the_title() ) {
|
426 |
+
continue;
|
427 |
+
}
|
428 |
+
|
429 |
+
// Delete Posts
|
430 |
+
wp_delete_post( get_the_ID(), true );
|
431 |
+
}
|
432 |
+
|
433 |
+
// Reset
|
434 |
+
wp_reset_query();
|
435 |
+
|
436 |
+
$imported_terms = get_terms([
|
437 |
+
'meta_key' => '_wpr_demo_import_item',
|
438 |
+
'posts_per_page' => -1,
|
439 |
+
'hide_empty' => false,
|
440 |
+
]);
|
441 |
+
|
442 |
+
if ( !empty($imported_terms) ) {
|
443 |
+
foreach( $imported_terms as $imported_term ) {
|
444 |
+
// Delete Terms
|
445 |
+
wp_delete_term( $imported_term->term_id, $imported_term->taxonomy );
|
446 |
+
}
|
447 |
+
}
|
448 |
+
|
449 |
+
wp_send_json_success( esc_html__('Previous Import Files have been successfully Reset.', 'wpr-addons') );
|
450 |
+
} else {
|
451 |
+
wp_send_json_success( esc_html__('There is no Data for Reset.', 'wpr-addons') );
|
452 |
+
}
|
453 |
+
}
|
454 |
+
|
455 |
+
/**
|
456 |
+
** Import Elementor Site Settings
|
457 |
+
*/
|
458 |
+
function import_elementor_site_settings( $kit ) {
|
459 |
+
// Avoid Cache
|
460 |
+
// $randomNum = substr(str_shuffle("0123456789abcdefghijklmnopqrstvwxyzABCDEFGHIJKLMNOPQRSTVWXYZ"), 0, 7);
|
461 |
+
|
462 |
+
// Get Remote File
|
463 |
+
$site_settings = @file_get_contents('https://royal-elementor-addons.com/library/templates-kit/'. $kit .'/site-settings.json');
|
464 |
+
|
465 |
+
if ( false !== $site_settings ) {
|
466 |
+
$site_settings = json_decode($site_settings, true);
|
467 |
+
|
468 |
+
if ( ! empty($site_settings['settings']) ) {
|
469 |
+
$default_kit = \Elementor\Plugin::$instance->documents->get_doc_for_frontend( get_option( 'elementor_active_kit' ) );
|
470 |
+
|
471 |
+
$kit_settings = $default_kit->get_settings();
|
472 |
+
$new_settings = $site_settings['settings'];
|
473 |
+
$settings = array_merge($kit_settings, $new_settings);
|
474 |
+
|
475 |
+
$default_kit->save( [ 'settings' => $settings ] );
|
476 |
+
}
|
477 |
+
}
|
478 |
+
}
|
479 |
+
|
480 |
+
/**
|
481 |
+
** Setup WPR Templates
|
482 |
+
*/
|
483 |
+
function setup_wpr_templates( $kit ) {
|
484 |
+
$kit = isset($kit) ? sanitize_text_field(wp_unslash($kit)) : '';
|
485 |
+
|
486 |
+
// Check if kit has Theme Builder templates
|
487 |
+
$kit_name = substr($kit, 0, strripos($kit, '-v'));
|
488 |
+
$kit_version = substr($kit, (strripos($kit, '-v') + 1), strlen($kit));
|
489 |
+
$get_available_kits = WPR_Templates_Data::get_available_kits();
|
490 |
+
$has_theme_builder = $get_available_kits[$kit_name][$kit_version]['theme-builder'];
|
491 |
+
$has_woo_builder = $get_available_kits[$kit_name][$kit_version]['woo-builder'];
|
492 |
+
$has_off_canvas = $get_available_kits[$kit_name][$kit_version]['off-canvas'];
|
493 |
+
|
494 |
+
// Set Home & Blog Pages
|
495 |
+
$home_page = get_page_by_path('home-'. $kit);
|
496 |
+
$blog_page = get_page_by_path('blog-'. $kit);
|
497 |
+
|
498 |
+
if ( $home_page ) {
|
499 |
+
update_option( 'show_on_front', 'page' );
|
500 |
+
update_option( 'page_on_front', $home_page->ID );
|
501 |
+
|
502 |
+
if ( $blog_page ) {
|
503 |
+
update_option( 'page_for_posts', $blog_page->ID );
|
504 |
+
}
|
505 |
+
}
|
506 |
+
|
507 |
+
// Set Headers and Footers
|
508 |
+
update_option('wpr_header_conditions', '{"user-header-'. $kit .'-header":["global"]}');
|
509 |
+
update_post_meta( Utilities::get_template_id('user-header-'. $kit), 'wpr_header_show_on_canvas', 'true' );
|
510 |
+
update_option('wpr_footer_conditions', '{"user-footer-'. $kit .'-footer":["global"]}');
|
511 |
+
update_post_meta( Utilities::get_template_id('user-footer-'. $kit), 'wpr_footer_show_on_canvas', 'true' );
|
512 |
+
|
513 |
+
// Theme Builder
|
514 |
+
if ( $has_theme_builder ) {
|
515 |
+
update_option('wpr_archive_conditions', '{"user-archive-'. $kit .'-blog":["archive/posts"],"user-archive-'. $kit .'-author":["archive/author"],"user-archive-'. $kit .'-date":["archive/date"],"user-archive-'. $kit .'-category-tag":["archive/categories/all","archive/tags/all"],"user-archive-'. $kit .'-search":["archive/search"]}');
|
516 |
+
update_option('wpr_single_conditions', '{"user-single-'. $kit .'-404":["single/page_404"],"user-single-'. $kit .'-post":["single/posts/all"],"user-single-'. $kit .'-page":["single/pages/all"]}');
|
517 |
+
}
|
518 |
+
|
519 |
+
// WooCommerce Builder
|
520 |
+
if ( $has_woo_builder ) {
|
521 |
+
update_option('wpr_product_archive_conditions', '{"user-product_archive-'. $kit .'-shop":["product_archive/products"],"user-product_archive-'. $kit .'-product-category-tag":["product_archive/product_cat/all","product_archive/product_tag/all"]}');
|
522 |
+
update_option('wpr_product_single_conditions', '{"user-product_single-'. $kit .'-product":["product_single/product"]}');
|
523 |
+
|
524 |
+
$shop_id = get_page_by_path('shop-'. $kit) ? get_page_by_path('shop-'. $kit)->ID : '';
|
525 |
+
$cart_id = get_page_by_path('cart-'. $kit) ? get_page_by_path('cart-'. $kit)->ID : '';
|
526 |
+
$checkout_id = get_page_by_path('checkout-'. $kit) ? get_page_by_path('checkout-'. $kit)->ID : '';
|
527 |
+
$myaccount_id = get_page_by_path('my-account-'. $kit) ? get_page_by_path('my-account-'. $kit)->ID : '';
|
528 |
+
|
529 |
+
update_option('woocommerce_shop_page_id', $shop_id);
|
530 |
+
update_option('woocommerce_cart_page_id', $cart_id);
|
531 |
+
update_option('woocommerce_checkout_page_id', $checkout_id);
|
532 |
+
|
533 |
+
if ( '' !== $myaccount_id ) {
|
534 |
+
update_option('woocommerce_myaccount_page_id', $myaccount_id);
|
535 |
+
}
|
536 |
+
|
537 |
+
// Update Options
|
538 |
+
update_option( 'woocommerce_queue_flush_rewrite_rules', 'yes' );
|
539 |
+
|
540 |
+
// Enable Elementor Builder for WooCommerce CPT
|
541 |
+
// $cpt_support = get_option( 'elementor_cpt_support' );
|
542 |
+
|
543 |
+
// if ( ! in_array( 'product', $cpt_support ) ) {
|
544 |
+
// $cpt_support[] = 'product';
|
545 |
+
// update_option( 'elementor_cpt_support', $cpt_support );
|
546 |
+
// }
|
547 |
+
}
|
548 |
+
|
549 |
+
// Set Popups
|
550 |
+
if ( $has_off_canvas ) {
|
551 |
+
update_option('wpr_popup_conditions', '{"user-popup-'. $kit .'-off-canvas":["global"],"user-popup-'. $kit .'-popup":["global"]}');
|
552 |
+
} else {
|
553 |
+
update_option('wpr_popup_conditions', '{"user-popup-'. $kit .'-popup":["global"]}');
|
554 |
+
}
|
555 |
+
}
|
556 |
+
|
557 |
+
/**
|
558 |
+
** Fix Elementor Images
|
559 |
+
*/
|
560 |
+
function wpr_fix_elementor_images() {
|
561 |
+
$args = array(
|
562 |
+
'post_type' => ['wpr_templates', 'wpr_mega_menu', 'page'],
|
563 |
+
'posts_per_page' => '-1',
|
564 |
+
'meta_key' => '_elementor_version'
|
565 |
+
);
|
566 |
+
$elementor_pages = new WP_Query ( $args );
|
567 |
+
|
568 |
+
// Check that we have query results.
|
569 |
+
if ( $elementor_pages->have_posts() ) {
|
570 |
+
|
571 |
+
// Start looping over the query results.
|
572 |
+
while ( $elementor_pages->have_posts() ) {
|
573 |
+
|
574 |
+
$elementor_pages->the_post();
|
575 |
+
|
576 |
+
// Replace Demo with Current
|
577 |
+
$site_url = get_site_url();
|
578 |
+
$site_url = str_replace( '/', '\/', $site_url );
|
579 |
+
$demo_site_url = 'https://demosites.royal-elementor-addons.com/'. get_option('wpr-import-kit-id');
|
580 |
+
$demo_site_url = str_replace( '/', '\/', $demo_site_url );
|
581 |
+
|
582 |
+
// Elementor Data
|
583 |
+
$data = get_post_meta( get_the_ID(), '_elementor_data', true );
|
584 |
+
|
585 |
+
if ( ! empty( $data ) ) {
|
586 |
+
$data = preg_replace('/\\\{1}\/sites\\\{1}\/\d+/', '', $data);
|
587 |
+
$data = str_replace( $demo_site_url, $site_url, $data );
|
588 |
+
$data = json_decode( $data, true );
|
589 |
+
}
|
590 |
+
|
591 |
+
update_metadata( 'post', get_the_ID(), '_elementor_data', $data );
|
592 |
+
|
593 |
+
// Elementor Page Settings
|
594 |
+
$page_settings = get_post_meta( get_the_ID(), '_elementor_page_settings', true );
|
595 |
+
$page_settings = json_encode($page_settings);
|
596 |
+
|
597 |
+
if ( ! empty( $page_settings ) ) {
|
598 |
+
$page_settings = preg_replace('/\\\{1}\/sites\\\{1}\/\d+/', '', $page_settings);
|
599 |
+
$page_settings = str_replace( $demo_site_url, $site_url, $page_settings );
|
600 |
+
$page_settings = json_decode( $page_settings, true );
|
601 |
+
}
|
602 |
+
|
603 |
+
update_metadata( 'post', get_the_ID(), '_elementor_page_settings', $page_settings );
|
604 |
+
|
605 |
+
}
|
606 |
+
|
607 |
+
}
|
608 |
+
|
609 |
+
// Clear Elementor Cache
|
610 |
+
Plugin::$instance->files_manager->clear_cache();
|
611 |
+
}
|
612 |
+
|
613 |
+
/**
|
614 |
+
** Final Settings Setup
|
615 |
+
*/
|
616 |
+
function wpr_final_settings_setup() {
|
617 |
+
$kit = !empty(get_option('wpr-import-kit-id')) ? esc_html(get_option('wpr-import-kit-id')) : '';
|
618 |
+
|
619 |
+
// Elementor Site Settings
|
620 |
+
import_elementor_site_settings($kit);
|
621 |
+
|
622 |
+
// Setup WPR Templates
|
623 |
+
setup_wpr_templates($kit);
|
624 |
+
|
625 |
+
// Fix Elementor Images
|
626 |
+
wpr_fix_elementor_images();
|
627 |
+
|
628 |
+
// Track Kit
|
629 |
+
wpr_track_imported_kit( $kit );
|
630 |
+
|
631 |
+
// Clear DB
|
632 |
+
delete_option('wpr-import-kit-id');
|
633 |
+
|
634 |
+
// Delete Hello World Post
|
635 |
+
$post = get_page_by_path('hello-world', OBJECT, 'post');
|
636 |
+
if ( $post ) {
|
637 |
+
wp_delete_post($post->ID,true);
|
638 |
+
}
|
639 |
+
|
640 |
+
// Regenerate Extra Image Sizes
|
641 |
+
regenerate_extra_image_sizes();
|
642 |
+
}
|
643 |
+
|
644 |
+
/**
|
645 |
+
** Regenerate Extra Image Sizes
|
646 |
+
*/
|
647 |
+
function disable_extra_image_sizes( $new_sizes, $image_meta, $attachment_id ) {
|
648 |
+
$all_attachments = get_option( 'st_attachments', array() );
|
649 |
+
|
650 |
+
// If the cron job is already scheduled, bail.
|
651 |
+
if ( in_array( $attachment_id, $all_attachments, true ) ) {
|
652 |
+
return $new_sizes;
|
653 |
+
}
|
654 |
+
|
655 |
+
$all_attachments[] = $attachment_id;
|
656 |
+
|
657 |
+
update_option( 'st_attachments', $all_attachments, 'no' );
|
658 |
+
|
659 |
+
// Return blank array of sizes to not generate any sizes in this request.
|
660 |
+
return array();
|
661 |
+
}
|
662 |
+
|
663 |
+
/**
|
664 |
+
** Regenerate Extra Image Sizes
|
665 |
+
*/
|
666 |
+
function regenerate_extra_image_sizes() {
|
667 |
+
$all_attachments = get_option( 'st_attachments', array() );
|
668 |
+
|
669 |
+
if ( empty( $all_attachments ) ) {
|
670 |
+
return;
|
671 |
+
}
|
672 |
+
|
673 |
+
foreach ( $all_attachments as $attachment_id ) {
|
674 |
+
$file = get_attached_file( $attachment_id );
|
675 |
+
if ( false !== $file ) {
|
676 |
+
wp_generate_attachment_metadata( $attachment_id, $file );
|
677 |
+
}
|
678 |
+
}
|
679 |
+
update_option( 'st_attachments', array(), 'no' );
|
680 |
+
}
|
681 |
+
|
682 |
+
/**
|
683 |
+
** Validate Image Extension
|
684 |
+
*/
|
685 |
+
function wpr_validate_image_ext( $link = '' ) {
|
686 |
+
return preg_match( '/^((https?:\/\/)|(www\.))([a-z0-9-].?)+(:[0-9]+)?\/[\w\-\@]+\.(jpg|png|gif|jpeg|svg)\/?$/i', $link );
|
687 |
+
}
|
688 |
+
|
689 |
+
/**
|
690 |
+
** Set Timeout for Image Request
|
691 |
+
*/
|
692 |
+
function set_image_request_timeout( $timeout_value, $url ) {
|
693 |
+
if ( strpos( $url, 'https://royal-elementor-addons.com/' ) === false ) {
|
694 |
+
return $timeout_value;
|
695 |
+
}
|
696 |
+
|
697 |
+
$valid_ext = preg_match( '/^((https?:\/\/)|(www\.))([a-z0-9-].?)+(:[0-9]+)?\/[\w\-\@]+\.(jpg|png|gif|jpeg|svg)\/?$/i', $url );
|
698 |
+
|
699 |
+
if ( $valid_ext ) {
|
700 |
+
$timeout_value = 300;
|
701 |
+
}
|
702 |
+
|
703 |
+
return $timeout_value;
|
704 |
+
}
|
705 |
+
|
706 |
+
/**
|
707 |
+
** Prevent WooCommerce creating default pages
|
708 |
+
*/
|
709 |
+
function disable_default_woo_pages_creation() {
|
710 |
+
add_filter( 'woocommerce_create_pages', '__return_empty_array' );
|
711 |
+
}
|
712 |
+
|
713 |
+
/**
|
714 |
+
** Add .xml and .svg files as supported format in the uploader.
|
715 |
+
*/
|
716 |
+
function custom_upload_mimes( $mimes ) {
|
717 |
+
// Allow SVG files.
|
718 |
+
$mimes['svg'] = 'image/svg+xml';
|
719 |
+
$mimes['svgz'] = 'image/svg+xml';
|
720 |
+
|
721 |
+
// Allow XML files.
|
722 |
+
$mimes['xml'] = 'text/xml';
|
723 |
+
|
724 |
+
// Allow JSON files.
|
725 |
+
$mimes['json'] = 'application/json';
|
726 |
+
|
727 |
+
return $mimes;
|
728 |
+
}
|
729 |
+
|
730 |
+
add_filter( 'upload_mimes', 'custom_upload_mimes', 99 );
|
731 |
+
|
732 |
+
function real_mime_types_5_1_0( $defaults, $file, $filename, $mimes, $real_mime ) {
|
733 |
+
return real_mimes( $defaults, $filename );
|
734 |
+
}
|
735 |
+
|
736 |
+
function real_mime_types( $defaults, $file, $filename, $mimes ) {
|
737 |
+
return real_mimes( $defaults, $filename );
|
738 |
+
}
|
739 |
+
|
740 |
+
function real_mimes( $defaults, $filename ) {
|
741 |
+
if ( strpos( $filename, 'main' ) !== false ) {
|
742 |
+
$defaults['ext'] = 'xml';
|
743 |
+
$defaults['type'] = 'text/xml';
|
744 |
+
}
|
745 |
+
|
746 |
+
return $defaults;
|
747 |
+
}
|
748 |
+
|
749 |
+
if ( version_compare( get_bloginfo( 'version' ), '5.1.0', '>=' ) ) {
|
750 |
+
add_filter( 'wp_check_filetype_and_ext', 'real_mime_types_5_1_0', 10, 5, 99 );
|
751 |
+
} else {
|
752 |
+
add_filter( 'wp_check_filetype_and_ext', 'real_mime_types', 10, 4 );
|
753 |
+
}
|
754 |
+
|
755 |
+
/**
|
756 |
+
** Search Query Results
|
757 |
+
*/
|
758 |
+
function wpr_search_query_results() {
|
759 |
+
// Freemius OptIn
|
760 |
+
if ( ! ( wpr_fs()->is_registered() && wpr_fs()->is_tracking_allowed() || wpr_fs()->is_pending_activation() ) ) {
|
761 |
+
return;
|
762 |
+
}
|
763 |
+
|
764 |
+
$search_query = isset($_POST['search_query']) ? sanitize_text_field(wp_unslash($_POST['search_query'])) : '';
|
765 |
+
|
766 |
+
wp_remote_post( 'http://reastats.kinsta.cloud/wp-json/templates-kit-search/data', [
|
767 |
+
'body' => [
|
768 |
+
'search_query' => $search_query
|
769 |
+
]
|
770 |
+
] );
|
771 |
+
}
|
772 |
+
|
773 |
+
/**
|
774 |
+
** Search Query Results
|
775 |
+
*/
|
776 |
+
function wpr_track_imported_kit( $kit ) {
|
777 |
+
// Freemius OptIn
|
778 |
+
if ( ! ( wpr_fs()->is_registered() && wpr_fs()->is_tracking_allowed() || wpr_fs()->is_pending_activation() ) ) {
|
779 |
+
return;
|
780 |
+
}
|
781 |
+
|
782 |
+
wp_remote_post( 'http://reastats.kinsta.cloud/wp-json/templates-kit-import/data', [
|
783 |
+
'body' => [
|
784 |
+
'imported_kit' => $kit
|
785 |
+
]
|
786 |
+
] );
|
787 |
}
|
admin/templates/views/astra/class-astra-compat.php
CHANGED
@@ -1,84 +1,84 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
use WprAddons\Admin\Includes\WPR_Render_Templates;
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Wpr_Astra_Compat setup
|
7 |
-
*
|
8 |
-
*/
|
9 |
-
|
10 |
-
/**
|
11 |
-
* Astra theme compatibility.
|
12 |
-
*/
|
13 |
-
class Wpr_Astra_Compat {
|
14 |
-
|
15 |
-
/**
|
16 |
-
* Instance of Wpr_Astra_Compat.
|
17 |
-
*
|
18 |
-
* @var Wpr_Astra_Compat
|
19 |
-
*/
|
20 |
-
private static $instance;
|
21 |
-
|
22 |
-
/**
|
23 |
-
* WPR_Render_Templates() Class
|
24 |
-
*/
|
25 |
-
private $render_templates;
|
26 |
-
|
27 |
-
/**
|
28 |
-
* Initiator
|
29 |
-
*/
|
30 |
-
public static function instance() {
|
31 |
-
if ( ! isset( self::$instance ) ) {
|
32 |
-
self::$instance = new Wpr_Astra_Compat();
|
33 |
-
|
34 |
-
add_action( 'wp', [ self::$instance, 'hooks' ] );
|
35 |
-
}
|
36 |
-
|
37 |
-
return self::$instance;
|
38 |
-
}
|
39 |
-
|
40 |
-
/**
|
41 |
-
* Run all the Actions / Filters.
|
42 |
-
*/
|
43 |
-
public function hooks() {
|
44 |
-
$this->render_templates = new WPR_Render_Templates( true );
|
45 |
-
|
46 |
-
if ( $this->render_templates->is_template_available('header') ) {
|
47 |
-
add_action( 'template_redirect', [ $this, 'astra_setup_header' ], 10 );
|
48 |
-
add_action( 'astra_header', [$this->render_templates, 'replace_header'] );
|
49 |
-
add_action( 'elementor/page_templates/canvas/before_content', [ $this->render_templates, 'add_canvas_header' ] );
|
50 |
-
}
|
51 |
-
|
52 |
-
if ( $this->render_templates->is_template_available('footer') ) {
|
53 |
-
add_action( 'template_redirect', [ $this, 'astra_setup_footer' ], 10 );
|
54 |
-
add_action( 'astra_footer', [$this->render_templates, 'replace_footer'] );
|
55 |
-
add_action( 'elementor/page_templates/canvas/after_content', [ $this->render_templates, 'add_canvas_footer' ] );
|
56 |
-
}
|
57 |
-
}
|
58 |
-
|
59 |
-
/**
|
60 |
-
* Disable header from the theme.
|
61 |
-
*/
|
62 |
-
public function astra_setup_header() {
|
63 |
-
remove_action( 'astra_header', 'astra_header_markup' );
|
64 |
-
|
65 |
-
// Remove the new header builder action.
|
66 |
-
if ( class_exists( '\Astra_Builder_Helper' ) && \Astra_Builder_Helper::$is_header_footer_builder_active ) {
|
67 |
-
remove_action( 'astra_header', [ Astra_Builder_Header::get_instance(), 'prepare_header_builder_markup' ] );
|
68 |
-
}
|
69 |
-
}
|
70 |
-
|
71 |
-
/**
|
72 |
-
* Disable footer from the theme.
|
73 |
-
*/
|
74 |
-
public function astra_setup_footer() {
|
75 |
-
remove_action( 'astra_footer', 'astra_footer_markup' );
|
76 |
-
|
77 |
-
// Remove the new footer builder action.
|
78 |
-
if ( class_exists( '\Astra_Builder_Helper' ) && \Astra_Builder_Helper::$is_header_footer_builder_active ) {
|
79 |
-
remove_action( 'astra_footer', [ Astra_Builder_Footer::get_instance(), 'footer_markup' ] );
|
80 |
-
}
|
81 |
-
}
|
82 |
-
}
|
83 |
-
|
84 |
-
Wpr_Astra_Compat::instance();
|
1 |
+
<?php
|
2 |
+
|
3 |
+
use WprAddons\Admin\Includes\WPR_Render_Templates;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Wpr_Astra_Compat setup
|
7 |
+
*
|
8 |
+
*/
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Astra theme compatibility.
|
12 |
+
*/
|
13 |
+
class Wpr_Astra_Compat {
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Instance of Wpr_Astra_Compat.
|
17 |
+
*
|
18 |
+
* @var Wpr_Astra_Compat
|
19 |
+
*/
|
20 |
+
private static $instance;
|
21 |
+
|
22 |
+
/**
|
23 |
+
* WPR_Render_Templates() Class
|
24 |
+
*/
|
25 |
+
private $render_templates;
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Initiator
|
29 |
+
*/
|
30 |
+
public static function instance() {
|
31 |
+
if ( ! isset( self::$instance ) ) {
|
32 |
+
self::$instance = new Wpr_Astra_Compat();
|
33 |
+
|
34 |
+
add_action( 'wp', [ self::$instance, 'hooks' ] );
|
35 |
+
}
|
36 |
+
|
37 |
+
return self::$instance;
|
38 |
+
}
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Run all the Actions / Filters.
|
42 |
+
*/
|
43 |
+
public function hooks() {
|
44 |
+
$this->render_templates = new WPR_Render_Templates( true );
|
45 |
+
|
46 |
+
if ( $this->render_templates->is_template_available('header') ) {
|
47 |
+
add_action( 'template_redirect', [ $this, 'astra_setup_header' ], 10 );
|
48 |
+
add_action( 'astra_header', [$this->render_templates, 'replace_header'] );
|
49 |
+
add_action( 'elementor/page_templates/canvas/before_content', [ $this->render_templates, 'add_canvas_header' ] );
|
50 |
+
}
|
51 |
+
|
52 |
+
if ( $this->render_templates->is_template_available('footer') ) {
|
53 |
+
add_action( 'template_redirect', [ $this, 'astra_setup_footer' ], 10 );
|
54 |
+
add_action( 'astra_footer', [$this->render_templates, 'replace_footer'] );
|
55 |
+
add_action( 'elementor/page_templates/canvas/after_content', [ $this->render_templates, 'add_canvas_footer' ] );
|
56 |
+
}
|
57 |
+
}
|
58 |
+
|
59 |
+
/**
|
60 |
+
* Disable header from the theme.
|
61 |
+
*/
|
62 |
+
public function astra_setup_header() {
|
63 |
+
remove_action( 'astra_header', 'astra_header_markup' );
|
64 |
+
|
65 |
+
// Remove the new header builder action.
|
66 |
+
if ( class_exists( '\Astra_Builder_Helper' ) && \Astra_Builder_Helper::$is_header_footer_builder_active ) {
|
67 |
+
remove_action( 'astra_header', [ Astra_Builder_Header::get_instance(), 'prepare_header_builder_markup' ] );
|
68 |
+
}
|
69 |
+
}
|
70 |
+
|
71 |
+
/**
|
72 |
+
* Disable footer from the theme.
|
73 |
+
*/
|
74 |
+
public function astra_setup_footer() {
|
75 |
+
remove_action( 'astra_footer', 'astra_footer_markup' );
|
76 |
+
|
77 |
+
// Remove the new footer builder action.
|
78 |
+
if ( class_exists( '\Astra_Builder_Helper' ) && \Astra_Builder_Helper::$is_header_footer_builder_active ) {
|
79 |
+
remove_action( 'astra_footer', [ Astra_Builder_Footer::get_instance(), 'footer_markup' ] );
|
80 |
+
}
|
81 |
+
}
|
82 |
+
}
|
83 |
+
|
84 |
+
Wpr_Astra_Compat::instance();
|
admin/templates/views/storefront/class-storefront-compat.php
CHANGED
@@ -1,105 +1,105 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
use WprAddons\Admin\Includes\WPR_Render_Templates;
|
4 |
-
|
5 |
-
/**
|
6 |
-
*
|
7 |
-
*/
|
8 |
-
class Wpr_Storefront_Compat {
|
9 |
-
|
10 |
-
/**
|
11 |
-
* Instance of Wpr_Storefront_Compat.
|
12 |
-
*
|
13 |
-
* @var Wpr_Storefront_Compat
|
14 |
-
*/
|
15 |
-
private static $instance;
|
16 |
-
|
17 |
-
/**
|
18 |
-
* WPR_Render_Templates() Class
|
19 |
-
*/
|
20 |
-
private $render_templates;
|
21 |
-
|
22 |
-
/**
|
23 |
-
* Initiator
|
24 |
-
*/
|
25 |
-
public static function instance() {
|
26 |
-
if ( ! isset( self::$instance ) ) {
|
27 |
-
self::$instance = new Wpr_Storefront_Compat();
|
28 |
-
|
29 |
-
add_action( 'wp', [ self::$instance, 'hooks' ] );
|
30 |
-
}
|
31 |
-
|
32 |
-
return self::$instance;
|
33 |
-
}
|
34 |
-
|
35 |
-
/**
|
36 |
-
* Run all the Actions / Filters.
|
37 |
-
*/
|
38 |
-
public function hooks() {
|
39 |
-
$this->render_templates = new WPR_Render_Templates( true );
|
40 |
-
|
41 |
-
if ( $this->render_templates->is_template_available('header') ) {
|
42 |
-
add_action( 'template_redirect', [ $this, 'setup_header' ], 10 );
|
43 |
-
add_action( 'storefront_before_header', [$this->render_templates, 'replace_header'], 500 );
|
44 |
-
add_action( 'elementor/page_templates/canvas/before_content', [ $this->render_templates, 'add_canvas_header' ] );
|
45 |
-
}
|
46 |
-
|
47 |
-
if ( $this->render_templates->is_template_available('footer') ) {
|
48 |
-
add_action( 'template_redirect', [ $this, 'setup_footer' ], 10 );
|
49 |
-
add_action( 'storefront_after_footer', [$this->render_templates, 'replace_footer'], 500 );
|
50 |
-
add_action( 'elementor/page_templates/canvas/after_content', [ $this->render_templates, 'add_canvas_footer' ] );
|
51 |
-
}
|
52 |
-
|
53 |
-
if ( $this->render_templates->is_template_available('header') || $this->render_templates->is_template_available('footer') ) {
|
54 |
-
add_action( 'wp_head', [ $this, 'styles' ] );
|
55 |
-
}
|
56 |
-
}
|
57 |
-
|
58 |
-
/**
|
59 |
-
* Add inline CSS to hide empty divs for header and footer in storefront
|
60 |
-
*
|
61 |
-
* @since 1.2.0
|
62 |
-
* @return void
|
63 |
-
*/
|
64 |
-
public function styles() {
|
65 |
-
$css = '<style id="wpr-disable-storefront-hf">';
|
66 |
-
|
67 |
-
if ( $this->render_templates->is_template_available('header') ) {
|
68 |
-
$css .= '.site-header {
|
69 |
-
display: none;
|
70 |
-
}';
|
71 |
-
}
|
72 |
-
|
73 |
-
if ( $this->render_templates->is_template_available('footer') ) {
|
74 |
-
$css .= '.site-footer {
|
75 |
-
display: none;
|
76 |
-
}';
|
77 |
-
}
|
78 |
-
|
79 |
-
$css .= '</style>';
|
80 |
-
|
81 |
-
// Echo plain CSS (no user input or variables)
|
82 |
-
echo ''. $css; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
83 |
-
}
|
84 |
-
|
85 |
-
/**
|
86 |
-
* Disable header from the theme.
|
87 |
-
*/
|
88 |
-
public function setup_header() {
|
89 |
-
for ( $priority = 0; $priority < 200; $priority ++ ) {
|
90 |
-
remove_all_actions( 'storefront_header', $priority );
|
91 |
-
}
|
92 |
-
}
|
93 |
-
|
94 |
-
/**
|
95 |
-
* Disable footer from the theme.
|
96 |
-
*/
|
97 |
-
public function setup_footer() {
|
98 |
-
for ( $priority = 0; $priority < 200; $priority ++ ) {
|
99 |
-
remove_all_actions( 'storefront_footer', $priority );
|
100 |
-
}
|
101 |
-
}
|
102 |
-
|
103 |
-
}
|
104 |
-
|
105 |
-
Wpr_Storefront_Compat::instance();
|
1 |
+
<?php
|
2 |
+
|
3 |
+
use WprAddons\Admin\Includes\WPR_Render_Templates;
|
4 |
+
|
5 |
+
/**
|
6 |
+
* Storefront theme compatibility.
|
7 |
+
*/
|
8 |
+
class Wpr_Storefront_Compat {
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Instance of Wpr_Storefront_Compat.
|
12 |
+
*
|
13 |
+
* @var Wpr_Storefront_Compat
|
14 |
+
*/
|
15 |
+
private static $instance;
|
16 |
+
|
17 |
+
/**
|
18 |
+
* WPR_Render_Templates() Class
|
19 |
+
*/
|
20 |
+
private $render_templates;
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Initiator
|
24 |
+
*/
|
25 |
+
public static function instance() {
|
26 |
+
if ( ! isset( self::$instance ) ) {
|
27 |
+
self::$instance = new Wpr_Storefront_Compat();
|
28 |
+
|
29 |
+
add_action( 'wp', [ self::$instance, 'hooks' ] );
|
30 |
+
}
|
31 |
+
|
32 |
+
return self::$instance;
|
33 |
+
}
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Run all the Actions / Filters.
|
37 |
+
*/
|
38 |
+
public function hooks() {
|
39 |
+
$this->render_templates = new WPR_Render_Templates( true );
|
40 |
+
|
41 |
+
if ( $this->render_templates->is_template_available('header') ) {
|
42 |
+
add_action( 'template_redirect', [ $this, 'setup_header' ], 10 );
|
43 |
+
add_action( 'storefront_before_header', [$this->render_templates, 'replace_header'], 500 );
|
44 |
+
add_action( 'elementor/page_templates/canvas/before_content', [ $this->render_templates, 'add_canvas_header' ] );
|
45 |
+
}
|
46 |
+
|
47 |
+
if ( $this->render_templates->is_template_available('footer') ) {
|
48 |
+
add_action( 'template_redirect', [ $this, 'setup_footer' ], 10 );
|
49 |
+
add_action( 'storefront_after_footer', [$this->render_templates, 'replace_footer'], 500 );
|
50 |
+
add_action( 'elementor/page_templates/canvas/after_content', [ $this->render_templates, 'add_canvas_footer' ] );
|
51 |
+
}
|
52 |
+
|
53 |
+
if ( $this->render_templates->is_template_available('header') || $this->render_templates->is_template_available('footer') ) {
|
54 |
+
add_action( 'wp_head', [ $this, 'styles' ] );
|
55 |
+
}
|
56 |
+
}
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Add inline CSS to hide empty divs for header and footer in storefront
|
60 |
+
*
|
61 |
+
* @since 1.2.0
|
62 |
+
* @return void
|
63 |
+
*/
|
64 |
+
public function styles() {
|
65 |
+
$css = '<style id="wpr-disable-storefront-hf">';
|
66 |
+
|
67 |
+
if ( $this->render_templates->is_template_available('header') ) {
|
68 |
+
$css .= '.site-header {
|
69 |
+
display: none;
|
70 |
+
}';
|
71 |
+
}
|
72 |
+
|
73 |
+
if ( $this->render_templates->is_template_available('footer') ) {
|
74 |
+
$css .= '.site-footer {
|
75 |
+
display: none;
|
76 |
+
}';
|
77 |
+
}
|
78 |
+
|
79 |
+
$css .= '</style>';
|
80 |
+
|
81 |
+
// Echo plain CSS (no user input or variables)
|
82 |
+
echo ''. $css; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
83 |
+
}
|
84 |
+
|
85 |
+
/**
|
86 |
+
* Disable header from the theme.
|
87 |
+
*/
|
88 |
+
public function setup_header() {
|
89 |
+
for ( $priority = 0; $priority < 200; $priority ++ ) {
|
90 |
+
remove_all_actions( 'storefront_header', $priority );
|
91 |
+
}
|
92 |
+
}
|
93 |
+
|
94 |
+
/**
|
95 |
+
* Disable footer from the theme.
|
96 |
+
*/
|
97 |
+
public function setup_footer() {
|
98 |
+
for ( $priority = 0; $priority < 200; $priority ++ ) {
|
99 |
+
remove_all_actions( 'storefront_footer', $priority );
|
100 |
+
}
|
101 |
+
}
|
102 |
+
|
103 |
+
}
|
104 |
+
|
105 |
+
Wpr_Storefront_Compat::instance();
|
admin/templates/wpr-canvas.php
CHANGED
@@ -1,66 +1,66 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
use Elementor\Utils;
|
4 |
-
use WprAddons\Classes\Utilities;
|
5 |
-
|
6 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
7 |
-
exit; // Exit if accessed directly.
|
8 |
-
}
|
9 |
-
|
10 |
-
\Elementor\Plugin::$instance->frontend->add_body_class( 'elementor-template-canvas' );
|
11 |
-
|
12 |
-
$is_preview_mode = \Elementor\Plugin::$instance->preview->is_preview_mode();
|
13 |
-
// $woocommerce_class = $is_preview_mode && class_exists( 'WooCommerce' ) ? 'woocommerce woocommerce-page woocommerce-shop canvas-test' : '';
|
14 |
-
$woocommerce_class = $is_preview_mode && class_exists( 'WooCommerce' ) ? 'woocommerce woocommerce-page' : '';
|
15 |
-
|
16 |
-
?>
|
17 |
-
<!DOCTYPE html>
|
18 |
-
<html <?php language_attributes(); ?>>
|
19 |
-
<head>
|
20 |
-
<meta charset="<?php bloginfo( 'charset' ); ?>">
|
21 |
-
<?php if ( ! current_theme_supports( 'title-tag' ) ) : ?>
|
22 |
-
<title><?php echo wp_get_document_title(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></title>
|
23 |
-
<?php endif; ?>
|
24 |
-
<?php wp_head(); ?>
|
25 |
-
<?php
|
26 |
-
|
27 |
-
// Keep the following line after `wp_head()` call, to ensure it's not overridden by another templates.
|
28 |
-
Utils::print_unescaped_internal_string( Utils::get_meta_viewport( 'canvas' ) );
|
29 |
-
?>
|
30 |
-
</head>
|
31 |
-
|
32 |
-
<body <?php body_class($woocommerce_class); ?>>
|
33 |
-
<?php
|
34 |
-
Elementor\Modules\PageTemplates\Module::body_open();
|
35 |
-
/**
|
36 |
-
* Before canvas page template content.
|
37 |
-
*
|
38 |
-
* Fires before the content of Elementor canvas page template.
|
39 |
-
*
|
40 |
-
* @since 1.0.0
|
41 |
-
*/
|
42 |
-
do_action( 'elementor/page_templates/canvas/before_content' );
|
43 |
-
|
44 |
-
// Elementor Editor
|
45 |
-
if (( \Elementor\Plugin::$instance->preview->is_preview_mode() && Utilities::is_theme_builder_template()) || is_singular('wpr_mega_menu') ) {
|
46 |
-
\Elementor\Plugin::$instance->modules_manager->get_modules( 'page-templates' )->print_content();
|
47 |
-
|
48 |
-
// Frontend
|
49 |
-
} else {
|
50 |
-
// Display Custom Elementor Templates
|
51 |
-
do_action( 'elementor/page_templates/canvas/wpr_print_content' );
|
52 |
-
}
|
53 |
-
|
54 |
-
/**
|
55 |
-
* After canvas page template content.
|
56 |
-
*
|
57 |
-
* Fires after the content of Elementor canvas page template.
|
58 |
-
*
|
59 |
-
* @since 1.0.0
|
60 |
-
*/
|
61 |
-
do_action( 'elementor/page_templates/canvas/after_content' );
|
62 |
-
|
63 |
-
wp_footer();
|
64 |
-
?>
|
65 |
-
</body>
|
66 |
-
</html>
|
1 |
+
<?php
|
2 |
+
|
3 |
+
use Elementor\Utils;
|
4 |
+
use WprAddons\Classes\Utilities;
|
5 |
+
|
6 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
7 |
+
exit; // Exit if accessed directly.
|
8 |
+
}
|
9 |
+
|
10 |
+
\Elementor\Plugin::$instance->frontend->add_body_class( 'elementor-template-canvas' );
|
11 |
+
|
12 |
+
$is_preview_mode = \Elementor\Plugin::$instance->preview->is_preview_mode();
|
13 |
+
// $woocommerce_class = $is_preview_mode && class_exists( 'WooCommerce' ) ? 'woocommerce woocommerce-page woocommerce-shop canvas-test' : '';
|
14 |
+
$woocommerce_class = $is_preview_mode && class_exists( 'WooCommerce' ) ? 'woocommerce woocommerce-page' : '';
|
15 |
+
|
16 |
+
?>
|
17 |
+
<!DOCTYPE html>
|
18 |
+
<html <?php language_attributes(); ?>>
|
19 |
+
<head>
|
20 |
+
<meta charset="<?php bloginfo( 'charset' ); ?>">
|
21 |
+
<?php if ( ! current_theme_supports( 'title-tag' ) ) : ?>
|
22 |
+
<title><?php echo wp_get_document_title(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></title>
|
23 |
+
<?php endif; ?>
|
24 |
+
<?php wp_head(); ?>
|
25 |
+
<?php
|
26 |
+
|
27 |
+
// Keep the following line after `wp_head()` call, to ensure it's not overridden by another templates.
|
28 |
+
Utils::print_unescaped_internal_string( Utils::get_meta_viewport( 'canvas' ) );
|
29 |
+
?>
|
30 |
+
</head>
|
31 |
+
|
32 |
+
<body <?php body_class($woocommerce_class); ?>>
|
33 |
+
<?php
|
34 |
+
Elementor\Modules\PageTemplates\Module::body_open();
|
35 |
+
/**
|
36 |
+
* Before canvas page template content.
|
37 |
+
*
|
38 |
+
* Fires before the content of Elementor canvas page template.
|
39 |
+
*
|
40 |
+
* @since 1.0.0
|
41 |
+
*/
|
42 |
+
do_action( 'elementor/page_templates/canvas/before_content' );
|
43 |
+
|
44 |
+
// Elementor Editor
|
45 |
+
if (( \Elementor\Plugin::$instance->preview->is_preview_mode() && Utilities::is_theme_builder_template()) || is_singular('wpr_mega_menu') ) {
|
46 |
+
\Elementor\Plugin::$instance->modules_manager->get_modules( 'page-templates' )->print_content();
|
47 |
+
|
48 |
+
// Frontend
|
49 |
+
} else {
|
50 |
+
// Display Custom Elementor Templates
|
51 |
+
do_action( 'elementor/page_templates/canvas/wpr_print_content' );
|
52 |
+
}
|
53 |
+
|
54 |
+
/**
|
55 |
+
* After canvas page template content.
|
56 |
+
*
|
57 |
+
* Fires after the content of Elementor canvas page template.
|
58 |
+
*
|
59 |
+
* @since 1.0.0
|
60 |
+
*/
|
61 |
+
do_action( 'elementor/page_templates/canvas/after_content' );
|
62 |
+
|
63 |
+
wp_footer();
|
64 |
+
?>
|
65 |
+
</body>
|
66 |
+
</html>
|
admin/templates/wpr-templates-data.php
CHANGED
@@ -1,891 +1,891 @@
|
|
1 |
-
<?php
|
2 |
-
namespace WprAddons\Admin\Templates;
|
3 |
-
|
4 |
-
use WprAddons\Plugin;
|
5 |
-
|
6 |
-
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
7 |
-
|
8 |
-
class WPR_Templates_Data {
|
9 |
-
public static function get_available_kits() {
|
10 |
-
$is_pro_active = wpr_fs()->can_use_premium_code() && defined('WPR_ADDONS_PRO_VERSION');
|
11 |
-
$is_cf7_active = is_plugin_active('contact-form-7/wp-contact-form-7.php') ? 'true' : 'false';
|
12 |
-
$is_mla_active = is_plugin_active('media-library-assistant/index.php') ? 'true' : 'false';
|
13 |
-
$is_woo_active = is_plugin_active('woocommerce/woocommerce.php') ? 'true' : 'false';
|
14 |
-
|
15 |
-
return [
|
16 |
-
'grocery-store' => [
|
17 |
-
'v1' => [
|
18 |
-
'name' => 'Grocery Store',
|
19 |
-
'pages' => 'home,shop,single-product,my-account,about,contact,',
|
20 |
-
'plugins' => '{"contact-form-7":'. $is_cf7_active .',"woocommerce":'. $is_woo_active .'}',
|
21 |
-
'tags' => 'shop shopping woo-commerce woocommerce estore ecommerce product online eshopping market reseller ecommerce shop',
|
22 |
-
'theme-builder' => false,
|
23 |
-
'woo-builder' => true,
|
24 |
-
'off-canvas' => false,
|
25 |
-
'price' => $is_pro_active ? 'free' : 'pro',
|
26 |
-
'priority' => 4,
|
27 |
-
],
|
28 |
-
],
|
29 |
-
'furniture-shop' => [
|
30 |
-
'v1' => [
|
31 |
-
'name' => 'Furniture Shop',
|
32 |
-
'pages' => 'home,shop-v1,shop-v2,single-product,my-account,about,contact,',
|
33 |
-
'plugins' => '{"contact-form-7":'. $is_cf7_active .',"woocommerce":'. $is_woo_active .'}',
|
34 |
-
'tags' => 'shop shopping woo-commerce woocommerce estore ecommerce product online furniture home office eshopping market reseller ecommerce shop ',
|
35 |
-
'theme-builder' => false,
|
36 |
-
'woo-builder' => true,
|
37 |
-
'off-canvas' => true,
|
38 |
-
'price' => $is_pro_active ? 'free' : 'pro',
|
39 |
-
'priority' => 5,
|
40 |
-
],
|
41 |
-
],
|
42 |
-
'estore' => [
|
43 |
-
'v1' => [
|
44 |
-
'name' => 'Electronic Store',
|
45 |
-
'pages' => 'home,shop,single-product,blog,faq,about,contact,',
|
46 |
-
'plugins' => '{"contact-form-7":'. $is_cf7_active .',"woocommerce":'. $is_woo_active .'}',
|
47 |
-
'tags' => 'shop shopping woo-commerce woocommerce estore ecommerce product online market reseller ecommerce shop gadget iphone phone electronic ',
|
48 |
-
'theme-builder' => true,
|
49 |
-
'woo-builder' => true,
|
50 |
-
'off-canvas' => false,
|
51 |
-
'price' => $is_pro_active ? 'free' : 'pro',
|
52 |
-
'priority' => 4,
|
53 |
-
],
|
54 |
-
],
|
55 |
-
'woo-food' => [
|
56 |
-
'v1' => [
|
57 |
-
'name' => 'Food Delivery',
|
58 |
-
'pages' => 'home,home-v2,food,single-product,about,contact,faq,blog,',
|
59 |
-
'plugins' => '{"contact-form-7":'. $is_cf7_active .',"woocommerce":'. $is_woo_active .'}',
|
60 |
-
'tags' => 'shop woo-commerce woocommerce ecommerce product online eshopping market ecommerce shop food delivery restaurant fast food pizzeria burger recipes cooking pizza restaurant snack',
|
61 |
-
'theme-builder' => true,
|
62 |
-
'woo-builder' => true,
|
63 |
-
'off-canvas' => false,
|
64 |
-
'price' => $is_pro_active ? 'free' : 'pro',
|
65 |
-
'priority' => 144,
|
66 |
-
],
|
67 |
-
],
|
68 |
-
'fashion' => [
|
69 |
-
'v1' => [
|
70 |
-
'name' => 'Fashion',
|
71 |
-
'pages' => 'home,shop-v1,shop-v2,single-product,blog,my-account,about,faq,contact,',
|
72 |
-
'plugins' => '{"contact-form-7":'. $is_cf7_active .',"woocommerce":'. $is_woo_active .'}',
|
73 |
-
'tags' => 'shop shopping woo-commerce woocommerce estore ecommerce product ecommerce shop online boutique clothes eshopping fashion designer market reseller digital purchases',
|
74 |
-
'theme-builder' => true,
|
75 |
-
'woo-builder' => true,
|
76 |
-
'off-canvas' => false,
|
77 |
-
'price' => $is_pro_active ? 'free' : 'pro',
|
78 |
-
'priority' => 2,
|
79 |
-
],
|
80 |
-
],
|
81 |
-
'wooshop' => [
|
82 |
-
'v1' => [
|
83 |
-
'name' => 'Woo Shop',
|
84 |
-
'pages' => 'home,shop,single-product,about,contact,',
|
85 |
-
'plugins' => '{"contact-form-7":'. $is_cf7_active .',"woocommerce":'. $is_woo_active .'}',
|
86 |
-
'tags' => 'shop shopping woo-commerce woocommerce estore ecommerce shop ecommerce product online shop online store boutique clothes eshopping fashion designer market reseller digital purchases',
|
87 |
-
'theme-builder' => false,
|
88 |
-
'woo-builder' => true,
|
89 |
-
'off-canvas' => false,
|
90 |
-
'price' => $is_pro_active ? 'free' : 'free',
|
91 |
-
'priority' => 3,
|
92 |
-
],
|
93 |
-
],
|
94 |
-
'personal-blog' => [
|
95 |
-
'v1' => [
|
96 |
-
'name' => 'Personal Blog',
|
97 |
-
'pages' => 'home,home-v1,home-v2,home-v3,lifestyle,about,contact,',
|
98 |
-
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
99 |
-
'tags' => 'blog blogger posts personal blog lifestyle blogger theme builder grid slider news',
|
100 |
-
'theme-builder' => true,
|
101 |
-
'woo-builder' => false,
|
102 |
-
'off-canvas' => false,
|
103 |
-
'price' => $is_pro_active ? 'free' : 'pro',
|
104 |
-
'priority' => 2,
|
105 |
-
],
|
106 |
-
'v2' => [
|
107 |
-
'name' => 'Personal Blog',
|
108 |
-
'pages' => 'home,single,category,about,contact,',
|
109 |
-
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
110 |
-
'tags' => 'blog blogger posts personal blog lifestyle blogger theme builder grid slider news',
|
111 |
-
'theme-builder' => true,
|
112 |
-
'woo-builder' => false,
|
113 |
-
'off-canvas' => false,
|
114 |
-
'price' => $is_pro_active ? 'free' : 'pro',
|
115 |
-
'priority' => 4,
|
116 |
-
],
|
117 |
-
],
|
118 |
-
'food-blog' => [
|
119 |
-
'v1' => [
|
120 |
-
'name' => 'Food Blog',
|
121 |
-
'pages' => 'home,home-v1,home-v2,home-v3,category,about,contact,',
|
122 |
-
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
123 |
-
'tags' => 'food blog posts food blogger theme builder recipes cooking grid slider',
|
124 |
-
'theme-builder' => true,
|
125 |
-
'woo-builder' => false,
|
126 |
-
'off-canvas' => false,
|
127 |
-
'price' => $is_pro_active ? 'free' : 'pro',
|
128 |
-
'priority' => 20,
|
129 |
-
],
|
130 |
-
],
|
131 |
-
'magazine-blog' => [
|
132 |
-
'v1' => [
|
133 |
-
'name' => 'Magazine Blog',
|
134 |
-
'pages' => 'home,home-v1,home-v2,category,about,contact,',
|
135 |
-
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
136 |
-
'tags' => 'blogger blog posts content news newspaper journal magazine business blog publishing theme builder sports grid slider',
|
137 |
-
'theme-builder' => true,
|
138 |
-
'woo-builder' => false,
|
139 |
-
'off-canvas' => false,
|
140 |
-
'price' => $is_pro_active ? 'free' : 'pro',
|
141 |
-
'priority' => 6,
|
142 |
-
],
|
143 |
-
'v2' => [
|
144 |
-
'name' => 'Magazine Blog',
|
145 |
-
'pages' => 'home,home-v1,home-v2,category,about,contact,',
|
146 |
-
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
147 |
-
'tags' => 'blogger blog posts content news newspaper journal magazine business blog publishing theme builder sports grid slider',
|
148 |
-
'theme-builder' => true,
|
149 |
-
'woo-builder' => false,
|
150 |
-
'off-canvas' => false,
|
151 |
-
'price' => $is_pro_active ? 'free' : 'pro',
|
152 |
-
'priority' => 50,
|
153 |
-
],
|
154 |
-
'v3' => [
|
155 |
-
'name' => 'Magazine Blog',
|
156 |
-
'pages' => 'home,category,about,contact,',
|
157 |
-
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
158 |
-
'tags' => 'blogger blog posts content news newspaper journal magazine business blog publishing theme builder sports grid slider',
|
159 |
-
'theme-builder' => true,
|
160 |
-
'woo-builder' => false,
|
161 |
-
'off-canvas' => false,
|
162 |
-
'price' => $is_pro_active ? 'free' : 'pro',
|
163 |
-
'priority' => 30,
|
164 |
-
],
|
165 |
-
],
|
166 |
-
'nature' => [
|
167 |
-
'v1' => [
|
168 |
-
'name' => 'nature',
|
169 |
-
'pages' => 'home,about,services,projects,contact,',
|
170 |
-
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
171 |
-
'tags' => 'nature influencer travel blogger blog content slider tourism influencers creator travel forest slider generic multipurpose national-park nature-park sanctuary wilderness hitchhiking mountain river lakes outdoors',
|
172 |
-
'theme-builder' => true,
|
173 |
-
'woo-builder' => false,
|
174 |
-
'off-canvas' => false,
|
175 |
-
'price' => $is_pro_active ? 'free' : 'free',
|
176 |
-
'priority' => 60,
|
177 |
-
],
|
178 |
-
],
|
179 |
-
'travel-agency' => [
|
180 |
-
'v1' => [
|
181 |
-
'name' => 'Travel agency',
|
182 |
-
'pages' => 'home,tours,gallery,services,reviews,about,contact,',
|
183 |
-
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
184 |
-
'tags' => 'nature influencer travel blogger blog content slider tourism influencers creator travel forest slider generic multipurpose national-park nature-park sanctuary wilderness hitchhiking mountain river lakes outdoors travel agency company office travel services',
|
185 |
-
'theme-builder' => true,
|
186 |
-
'woo-builder' => false,
|
187 |
-
'off-canvas' => false,
|
188 |
-
'price' => $is_pro_active ? 'free' : 'free',
|
189 |
-
'priority' => 61,
|
190 |
-
],
|
191 |
-
],
|
192 |
-
'digital-marketing-agency' => [
|
193 |
-
'v1' => [
|
194 |
-
'name' => 'Digital Marketing Agency',
|
195 |
-
'pages' => 'home,seo,branding,marketing,social,blog,about,contact,',
|
196 |
-
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
197 |
-
'tags' => 'digital agency company corporate digital services office agency web digital marketing seo social media branding',
|
198 |
-
'theme-builder' => true,
|
199 |
-
'woo-builder' => false,
|
200 |
-
'off-canvas' => false,
|
201 |
-
'price' => $is_pro_active ? 'free' : 'free',
|
202 |
-
'priority' => 1,
|
203 |
-
],
|
204 |
-
'v2' => [
|
205 |
-
'name' => 'Digital Marketing Agency 2',
|
206 |
-
'pages' => 'home,seo,social,web,email,blog,about,team,contact,pricing1,pricing2,pricing3,casestudy,',
|
207 |
-
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
208 |
-
'tags' => 'digital agency company corporate digital services office agency web digital marketing seo social media branding',
|
209 |
-
'theme-builder' => true,
|
210 |
-
'woo-builder' => false,
|
211 |
-
'off-canvas' => false,
|
212 |
-
'price' => $is_pro_active ? 'free' : 'pro',
|
213 |
-
'priority' => 1,
|
214 |
-
],
|
215 |
-
],
|
216 |
-
'digital-agency-dark' => [
|
217 |
-
'v1' => [
|
218 |
-
'name' => 'Digital Agency Dark',
|
219 |
-
'pages' => 'home,about,services,team,portfolio,blog,contact,',
|
220 |
-
'plugins' => '{"contact-form-7":'. $is_cf7_active .', "media-library-assistant":'. $is_mla_active .'}',
|
221 |
-
'tags' => 'digital agency company corporate digital services office agency web digital marketing seo social media branding dark black',
|
222 |
-
'theme-builder' => true,
|
223 |
-
'woo-builder' => false,
|
224 |
-
'off-canvas' => false,
|
225 |
-
'price' => $is_pro_active ? 'free' : 'free',
|
226 |
-
'priority' => 3,
|
227 |
-
],
|
228 |
-
],
|
229 |
-
'one-page' => [
|
230 |
-
'v1' => [
|
231 |
-
'name' => 'OnePage - Digital Marketing Agency',
|
232 |
-
'pages' => 'home,blog,',
|
233 |
-
'plugins' => '{"contact-form-7":'. $is_cf7_active .', "media-library-assistant":'. $is_mla_active .'}',
|
234 |
-
'tags' => 'digital agency company corporate digital services office agency web digital marketing seo social media branding one page onepage one pages parallax single page',
|
235 |
-
'theme-builder' => true,
|
236 |
-
'woo-builder' => false,
|
237 |
-
'off-canvas' => false,
|
238 |
-
'price' => $is_pro_active ? 'free' : 'free',
|
239 |
-
'priority' => 7,
|
240 |
-
],
|
241 |
-
],
|
242 |
-
'travel-blog' => [
|
243 |
-
'v1' => [
|
244 |
-
'name' => 'Travel Blog',
|
245 |
-
'pages' => 'home,home-v1,home-v2,category,about,contact,',
|
246 |
-
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
247 |
-
'tags' => 'nature influencer travel blogger blog posts content tourism influencers creator travel forest slider generic multipurpose national-park nature-park sanctuary wilderness slider hitchhiking mountain river lakes outdoors theme builder traveler hiking grid',
|
248 |
-
'theme-builder' => true,
|
249 |
-
'woo-builder' => false,
|
250 |
-
'off-canvas' => false,
|
251 |
-
'price' => $is_pro_active ? 'free' : 'pro',
|
252 |
-
'priority' => 71,
|
253 |
-
],
|
254 |
-
],
|
255 |
-
'portfolio' => [
|
256 |
-
'v1' => [
|
257 |
-
'name' => 'Portfolio/CV',
|
258 |
-
'pages' => 'home,about,portfolio,contact,',
|
259 |
-
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
260 |
-
'tags' => 'portfolio personal cv designer ux artist artwork personal resume photographer grid',
|
261 |
-
'theme-builder' => false,
|
262 |
-
'woo-builder' => false,
|
263 |
-
'off-canvas' => false,
|
264 |
-
'price' => $is_pro_active ? 'free' : 'free',
|
265 |
-
'priority' => 80,
|
266 |
-
],
|
267 |
-
],
|
268 |
-
'nft-portfolio' => [
|
269 |
-
'v1' => [
|
270 |
-
'name' => 'NFT',
|
271 |
-
'pages' => 'home,about,blog,roadmap,team,nft,faq,comingsoon,',
|
272 |
-
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
273 |
-
'tags' => 'portfolio blockchain nft crypto collection minting listing metavers digital currency art',
|
274 |
-
'theme-builder' => false,
|
275 |
-
'woo-builder' => false,
|
276 |
-
'off-canvas' => false,
|
277 |
-
'price' => $is_pro_active ? 'free' : 'free',
|
278 |
-
'priority' => 81,
|
279 |
-
],
|
280 |
-
],
|
281 |
-
'pizza' => [
|
282 |
-
'v1' => [
|
283 |
-
'name' => 'Pizza Restaurant',
|
284 |
-
'pages' => 'home,menu,about,offer,gallery,contact,',
|
285 |
-
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
286 |
-
'tags' => 'pizza italian restaurant food slider pasta fastfood fast food recipes cooking slider',
|
287 |
-
'theme-builder' => false,
|
288 |
-
'woo-builder' => false,
|
289 |
-
'off-canvas' => false,
|
290 |
-
'price' => $is_pro_active ? 'free' : 'free',
|
291 |
-
'priority' => 90,
|
292 |
-
],
|
293 |
-
],
|
294 |
-
'pet-care' => [
|
295 |
-
'v1' => [
|
296 |
-
'name' => 'Pet Care',
|
297 |
-
'pages' => 'home,about,services,reviews,contact,',
|
298 |
-
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
299 |
-
'tags' => 'pet care dog care grooming pet minding pet sitting pet training pet walking cat animal dogs dog training',
|
300 |
-
'theme-builder' => false,
|
301 |
-
'woo-builder' => false,
|
302 |
-
'off-canvas' => false,
|
303 |
-
'price' => $is_pro_active ? 'free' : 'free',
|
304 |
-
'priority' => 91,
|
305 |
-
],
|
306 |
-
],
|
307 |
-
'travel' => [
|
308 |
-
'v1' => [
|
309 |
-
'name' => 'Travel Blogger & Influencer',
|
310 |
-
'pages' => 'home,about,stories,contact,',
|
311 |
-
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
312 |
-
'tags' => 'nature influencer travel blogger blog content tourism influencers creator travel forest slider generic multipurpose national-park nature-park sanctuary wilderness hitchhiking mountain river lakes outdoors',
|
313 |
-
'theme-builder' => false,
|
314 |
-
'woo-builder' => false,
|
315 |
-
'off-canvas' => false,
|
316 |
-
'price' => $is_pro_active ? 'free' : 'free',
|
317 |
-
'priority' => 100,
|
318 |
-
],
|
319 |
-
],
|
320 |
-
'cybersecurity' => [
|
321 |
-
'v1' => [
|
322 |
-
'name' => 'Cybersecurity',
|
323 |
-
'pages' => 'home,about,services,pricing,contact,',
|
324 |
-
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
325 |
-
'tags' => 'cybersecurity data protection hacker security dark digital technology cybercrime computer windows technician',
|
326 |
-
'theme-builder' => false,
|
327 |
-
'woo-builder' => false,
|
328 |
-
'off-canvas' => false,
|
329 |
-
'price' => $is_pro_active ? 'free' : 'free',
|
330 |
-
'priority' => 110,
|
331 |
-
],
|
332 |
-
],
|
333 |
-
'charity' => [
|
334 |
-
'v1' => [
|
335 |
-
'name' => 'Charity',
|
336 |
-
'pages' => 'home,home-v1,contact,whatwedo,whoweare,partners,',
|
337 |
-
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
338 |
-
'tags' => 'charity donate church foundation giving non-profit organization kids charity help children save life donation fundrising ngo fundraising corona fundraising nonprofit non profit',
|
339 |
-
'theme-builder' => false,
|
340 |
-
'woo-builder' => false,
|
341 |
-
'off-canvas' => false,
|
342 |
-
'price' => $is_pro_active ? 'free' : 'free',
|
343 |
-
'priority' => 111,
|
344 |
-
],
|
345 |
-
],
|
346 |
-
'photographer' => [
|
347 |
-
'v1' => [
|
348 |
-
'name' => 'Photographer Portfolio Dark',
|
349 |
-
'pages' => 'home,about,services,portfolio,contact,',
|
350 |
-
'plugins' => '{"contact-form-7":'. $is_cf7_active .', "media-library-assistant":'. $is_mla_active .'}',
|
351 |
-
'tags' => 'portfolio personal cv designer ux artist artwork personal resume camera fashion lens modelling photographer photography videography wedding shoot grid ',
|
352 |
-
'theme-builder' => false,
|
353 |
-
'woo-builder' => false,
|
354 |
-
'off-canvas' => false,
|
355 |
-
'price' => $is_pro_active ? 'free' : 'free',
|
356 |
-
'priority' => 120,
|
357 |
-
],
|
358 |
-
'v2' => [
|
359 |
-
'name' => 'Photographer Portfolio Light',
|
360 |
-
'pages' => 'home,about,services,portfolio,contact,',
|
361 |
-
'plugins' => '{"contact-form-7":'. $is_cf7_active .', "media-library-assistant":'. $is_mla_active .'}',
|
362 |
-
'tags' => 'portfolio personal cv designer ux artist artwork personal resume camera fashion lens modelling photographer photography videography wedding shoot grid ',
|
363 |
-
'theme-builder' => false,
|
364 |
-
'woo-builder' => false,
|
365 |
-
'off-canvas' => false,
|
366 |
-
'price' => $is_pro_active ? 'free' : 'free',
|
367 |
-
'priority' => 130,
|
368 |
-
],
|
369 |
-
],
|
370 |
-
'cryptocurrency' => [
|
371 |
-
'v1' => [
|
372 |
-
'name' => 'Cryptocurrency',
|
373 |
-
'pages' => 'home,about,services,token,pricing,contact,',
|
374 |
-
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
375 |
-
'tags' => 'cryptocurrency bitcoin ethereum etherium blockchain protection nft coin corporate crypto dark startup token digital',
|
376 |
-
'theme-builder' => false,
|
377 |
-
'woo-builder' => false,
|
378 |
-
'off-canvas' => false,
|
379 |
-
'price' => $is_pro_active ? 'free' : 'free',
|
380 |
-
'priority' => 150,
|
381 |
-
],
|
382 |
-
],
|
383 |
-
'skincare' => [
|
384 |
-
'v1' => [
|
385 |
-
'name' => 'Skin Care',
|
386 |
-
'pages' => 'home,about,services,procedures,gallery,pricing,contact,',
|
387 |
-
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
388 |
-
'tags' => 'skincare skin care beauty clean face skin-beauty health wellness',
|
389 |
-
'theme-builder' => false,
|
390 |
-
'woo-builder' => false,
|
391 |
-
'off-canvas' => false,
|
392 |
-
'price' => $is_pro_active ? 'free' : 'free',
|
393 |
-
'priority' => 160,
|
394 |
-
],
|
395 |
-
],
|
396 |
-
'lawyer' => [
|
397 |
-
'v1' => [
|
398 |
-
'name' => 'Lawyer',
|
399 |
-
'pages' => 'home,practice,faq,reviews,attorney,contact,',
|
400 |
-
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
401 |
-
'tags' => 'lawyers criminal defence lawyer firm divorce lawyer family lawyer law legal firm ',
|
402 |
-
'theme-builder' => false,
|
403 |
-
'woo-builder' => false,
|
404 |
-
'off-canvas' => false,
|
405 |
-
'price' => $is_pro_active ? 'free' : 'free',
|
406 |
-
'priority' => 170,
|
407 |
-
],
|
408 |
-
],
|
409 |
-
'medical' => [
|
410 |
-
'v1' => [
|
411 |
-
'name' => 'Medical',
|
412 |
-
'pages' => 'home,about,services,doctors,contact,',
|
413 |
-
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
414 |
-
'tags' => 'medical clinic dental health healthcare doctor therapist wellness treatment cure',
|
415 |
-
'theme-builder' => false,
|
416 |
-
'woo-builder' => false,
|
417 |
-
'off-canvas' => false,
|
418 |
-
'price' => $is_pro_active ? 'free' : 'free',
|
419 |
-
'priority' => 180,
|
420 |
-
],
|
421 |
-
],
|
422 |
-
'digitalagency' => [
|
423 |
-
'v1' => [
|
424 |
-
'name' => 'Digital Agency',
|
425 |
-
'pages' => 'home,about,services,contact,',
|
426 |
-
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
427 |
-
'tags' => 'digital agency company corporate digital services office agency web marketing',
|
428 |
-
'theme-builder' => false,
|
429 |
-
'woo-builder' => false,
|
430 |
-
'off-canvas' => false,
|
431 |
-
'price' => $is_pro_active ? 'free' : 'free',
|
432 |
-
'priority' => 190,
|
433 |
-
],
|
434 |
-
'v2' => [
|
435 |
-
'name' => 'Digital Agency',
|
436 |
-
'pages' => 'home,about,services,pricing,contact,',
|
437 |
-
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
438 |
-
'tags' => 'digital agency company corporate digital services office agency web marketing slider',
|
439 |
-
'theme-builder' => false,
|
440 |
-
'woo-builder' => false,
|
441 |
-
'off-canvas' => false,
|
442 |
-
'price' => $is_pro_active ? 'free' : 'free',
|
443 |
-
'priority' => 200,
|
444 |
-
],
|
445 |
-
],
|
446 |
-
'drone' => [
|
447 |
-
'v1' => [
|
448 |
-
'name' => 'Drone Project',
|
449 |
-
'pages' => 'home,about,gallery,services,contact,',
|
450 |
-
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
451 |
-
'tags' => 'drone photography aerial photo ',
|
452 |
-
'theme-builder' => false,
|
453 |
-
'woo-builder' => false,
|
454 |
-
'off-canvas' => false,
|
455 |
-
'price' => $is_pro_active ? 'free' : 'free',
|
456 |
-
'priority' => 210,
|
457 |
-
],
|
458 |
-
],
|
459 |
-
'architecture' => [
|
460 |
-
'v1' => [
|
461 |
-
'name' => 'Architecture 1',
|
462 |
-
'pages' => 'home,about,portfolio,services,faq,contact,',
|
463 |
-
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
464 |
-
'tags' => 'architecture company slider interior design designer landscaping office zoning building slider',
|
465 |
-
'theme-builder' => false,
|
466 |
-
'woo-builder' => false,
|
467 |
-
'off-canvas' => false,
|
468 |
-
'price' => $is_pro_active ? 'free' : 'pro',
|
469 |
-
'priority' => 220,
|
470 |
-
],
|
471 |
-
'v2' => [
|
472 |
-
'name' => 'Architecture 2',
|
473 |
-
'pages' => 'home,about,projects,services,team,pricing,faq,contact,',
|
474 |
-
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
475 |
-
'tags' => 'architecture company slider interior design designer landscaping office zoning building slider architecture commercial construction creative decorations exterior designer home decorations interior designer landscape design modern real-estate residential',
|
476 |
-
'theme-builder' => true,
|
477 |
-
'woo-builder' => false,
|
478 |
-
'off-canvas' => false,
|
479 |
-
'price' => $is_pro_active ? 'free' : 'pro',
|
480 |
-
'priority' => 223,
|
481 |
-
],
|
482 |
-
],
|
483 |
-
'fooddelivery' => [
|
484 |
-
'v1' => [
|
485 |
-
'name' => 'Food Delivery',
|
486 |
-
'pages' => 'home,services,blog,faq,contact,',
|
487 |
-
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
488 |
-
'tags' => 'fooddelivery fast food chain restaurant service hotel italian pasta pizza pizzeria burger recipes cooking',
|
489 |
-
'theme-builder' => false,
|
490 |
-
'woo-builder' => false,
|
491 |
-
'off-canvas' => false,
|
492 |
-
'price' => $is_pro_active ? 'free' : 'pro',
|
493 |
-
'priority' => 230,
|
494 |
-
],
|
495 |
-
],
|
496 |
-
'construction' => [
|
497 |
-
'v1' => [
|
498 |
-
'name' => 'Construction',
|
499 |
-
'pages' => 'home,about,services,projects,pricing,contact,faq,',
|
500 |
-
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
501 |
-
'tags' => 'construction architecture company interior office real estate',
|
502 |
-
'theme-builder' => false,
|
503 |
-
'woo-builder' => false,
|
504 |
-
'off-canvas' => false,
|
505 |
-
'price' => $is_pro_active ? 'free' : 'free',
|
506 |
-
'priority' => 240,
|
507 |
-
],
|
508 |
-
],
|
509 |
-
'ittech' => [
|
510 |
-
'v1' => [
|
511 |
-
'name' => 'IT Tech v1',
|
512 |
-
'pages' => 'home,about,services,pricing,faq,contact,',
|
513 |
-
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
514 |
-
'tags' => 'ittech advanced technology it technique computer windows technician digital',
|
515 |
-
'theme-builder' => false,
|
516 |
-
'woo-builder' => false,
|
517 |
-
'off-canvas' => false,
|
518 |
-
'price' => $is_pro_active ? 'free' : 'free',
|
519 |
-
'priority' => 5,
|
520 |
-
],
|
521 |
-
'v2' => [
|
522 |
-
'name' => 'IT Tech v2',
|
523 |
-
'pages' => 'home,about,services,pricing,faq,contact,',
|
524 |
-
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
525 |
-
'tags' => 'ittech advanced technology it technique computer windows technician digital',
|
526 |
-
'theme-builder' => false,
|
527 |
-
'woo-builder' => false,
|
528 |
-
'off-canvas' => false,
|
529 |
-
'price' => $is_pro_active ? 'free' : 'free',
|
530 |
-
'priority' => 260,
|
531 |
-
],
|
532 |
-
],
|
533 |
-
'carwash' => [
|
534 |
-
'v1' => [
|
535 |
-
'name' => 'Carwash',
|
536 |
-
'pages' => 'home,about,services,contact,',
|
537 |
-
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
538 |
-
'tags' => 'vehicle car wash cleaning painting service maintenance care bike motorcycle detailing',
|
539 |
-
'theme-builder' => false,
|
540 |
-
'woo-builder' => false,
|
541 |
-
'off-canvas' => false,
|
542 |
-
'price' => $is_pro_active ? 'free' : 'free',
|
543 |
-
'priority' => 252,
|
544 |
-
],
|
545 |
-
],
|
546 |
-
'realestate' => [
|
547 |
-
'v1' => [
|
548 |
-
'name' => 'Real Estate',
|
549 |
-
'pages' => 'home,properties,about,services,faq,contact,',
|
550 |
-
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
551 |
-
'tags' => 'real estate agency company construction property rentals estate sales developers',
|
552 |
-
'theme-builder' => false,
|
553 |
-
'woo-builder' => false,
|
554 |
-
'off-canvas' => false,
|
555 |
-
'price' => $is_pro_active ? 'free' : 'pro',
|
556 |
-
'priority' => 270,
|
557 |
-
],
|
558 |
-
],
|
559 |
-
'restaurant' => [
|
560 |
-
'v1' => [
|
561 |
-
'name' => 'Restaurant',
|
562 |
-
'pages' => 'home,about,gallery,menu,contact,',
|
563 |
-
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
564 |
-
'tags' => 'restaurant fastfood slider hotel italian pizza pizzeria pasta dinner fast food wine recipe recipes cooking slider',
|
565 |
-
'theme-builder' => false,
|
566 |
-
'woo-builder' => false,
|
567 |
-
'off-canvas' => false,
|
568 |
-
'price' => $is_pro_active ? 'free' : 'free',
|
569 |
-
'priority' => 280,
|
570 |
-
],
|
571 |
-
],
|
572 |
-
'winebar' => [
|
573 |
-
'v1' => [
|
574 |
-
'name' => 'Wine Bar & Restaurant',
|
575 |
-
'pages' => 'home,story,wines,dishes,events,contact,',
|
576 |
-
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
577 |
-
'tags' => 'wine bar winery beer drink alcohol pub events dish wines italian restaurant food slider recipes cooking recipes slider',
|
578 |
-
'theme-builder' => false,
|
579 |
-
'woo-builder' => false,
|
580 |
-
'off-canvas' => false,
|
581 |
-
'price' => $is_pro_active ? 'free' : 'free',
|
582 |
-
'priority' => 290,
|
583 |
-
],
|
584 |
-
],
|
585 |
-
'wedding' => [
|
586 |
-
'v1' => [
|
587 |
-
'name' => 'Wedding',
|
588 |
-
'pages' => 'home,about,services,blog,gallery,contact,',
|
589 |
-
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
590 |
-
'tags' => 'wedding party event slider invitation planner slider photography photographer',
|
591 |
-
'theme-builder' => false,
|
592 |
-
'woo-builder' => false,
|
593 |
-
'off-canvas' => false,
|
594 |
-
'price' => $is_pro_active ? 'free' : 'free',
|
595 |
-
'priority' => 300,
|
596 |
-
],
|
597 |
-
],
|
598 |
-
];
|
599 |
-
}
|
600 |
-
|
601 |
-
public static function get_available_blocks() {
|
602 |
-
return [
|
603 |
-
'grid' => [
|
604 |
-
'v1' => ['type' => 'iframe', 'url' => 'grid/v1/'],
|
605 |
-
'v2' => ['type' => 'iframe', 'url' => 'grid/v2/'],
|
606 |
-
'v3' => ['type' => 'iframe', 'url' => 'grid/v3/'],
|
607 |
-
'v4' => ['type' => 'iframe', 'url' => 'grid/v4/'],
|
608 |
-
'v5-pro' => ['type' => 'iframe', 'url' => 'grid/v5/'],
|
609 |
-
'v6-pro' => ['type' => 'iframe', 'url' => 'grid/v6/'],
|
610 |
-
'v7-pro' => ['type' => 'iframe', 'url' => 'grid/v7/'],
|
611 |
-
'v8-pro' => ['type' => 'iframe', 'url' => 'grid/v8/'],
|
612 |
-
'v9-pro' => ['type' => 'iframe', 'url' => 'grid/v9/'],
|
613 |
-
'v10-pro' => ['type' => 'iframe', 'url' => 'grid/v10/'],
|
614 |
-
'v11' => ['type' => 'iframe', 'url' => 'grid/v11/'],
|
615 |
-
'v12' => ['type' => 'iframe', 'url' => 'grid/v12/'],
|
616 |
-
'v13' => ['type' => 'iframe', 'url' => 'grid/v13/'],
|
617 |
-
'v14' => ['type' => 'iframe', 'url' => 'grid/v14/'],
|
618 |
-
],
|
619 |
-
'woo-grid' => [
|
620 |
-
'v1' => ['type' => 'iframe', 'url' => 'woocommerce-grid/v1/'],
|
621 |
-
'v2' => ['type' => 'iframe', 'url' => 'woocommerce-grid/v2/'],
|
622 |
-
'v3-pro' => ['type' => 'iframe', 'url' => 'woocommerce-grid/v3/'],
|
623 |
-
'v4-pro' => ['type' => 'iframe', 'url' => 'woocommerce-grid/v4/'],
|
624 |
-
'v5-pro' => ['type' => 'iframe', 'url' => 'woocommerce-grid/v5/'],
|
625 |
-
'v6-pro' => ['type' => 'iframe', 'url' => 'woocommerce-grid/v6/'],
|
626 |
-
'v7-pro' => ['type' => 'iframe', 'url' => 'woocommerce-grid/v7/'],
|
627 |
-
'v8-pro' => ['type' => 'iframe', 'url' => 'woocommerce-grid/v8/'],
|
628 |
-
'v9-pro' => ['type' => 'iframe', 'url' => 'woocommerce-grid/v9/'],
|
629 |
-
],
|
630 |
-
'media-grid' => [
|
631 |
-
'v1' => ['type' => 'iframe', 'url' => 'image-grid/v1/'],
|
632 |
-
'v2' => ['type' => 'iframe', 'url' => 'image-grid/v2/'],
|
633 |
-
],
|
634 |
-
'magazine-grid' => [
|
635 |
-
'v1' => ['type' => 'iframe', 'url' => 'magazine-grid/v1/'],
|
636 |
-
'v2' => ['type' => 'iframe', 'url' => 'magazine-grid/v2/'],
|
637 |
-
// 'v3' => ['type' => 'iframe', 'url' => 'magazine-grid/v3/', 'sub' => 'carousel'], <-- Keep as example
|
638 |
-
'v3-pro' => ['type' => 'iframe', 'url' => 'magazine-grid/v3/'],
|
639 |
-
'v4-pro' => ['type' => 'iframe', 'url' => 'magazine-grid/v4/'],
|
640 |
-
'v5-pro' => ['type' => 'iframe', 'url' => 'magazine-grid/v5/'],
|
641 |
-
'v6-pro' => ['type' => 'iframe', 'url' => 'magazine-grid/v6/'],
|
642 |
-
'v7-pro' => ['type' => 'iframe', 'url' => 'magazine-grid/v7/'],
|
643 |
-
'v8-pro' => ['type' => 'iframe', 'url' => 'magazine-grid/v8/'],
|
644 |
-
],
|
645 |
-
'advanced-slider' => [
|
646 |
-
'v1' => ['type' => 'iframe', 'url' => 'advanced-slider/v1/'],
|
647 |
-
'v2' => ['type' => 'iframe', 'url' => 'advanced-slider/v2/'],
|
648 |
-
'v3' => ['type' => 'iframe', 'url' => 'advanced-slider/v3/'],
|
649 |
-
'v4-pro' => ['type' => 'iframe', 'url' => 'advanced-slider/v4/'],
|
650 |
-
'v5-pro' => ['type' => 'iframe', 'url' => 'advanced-slider/v5/'],
|
651 |
-
'v6-pro' => ['type' => 'iframe', 'url' => 'advanced-slider/v6/'],
|
652 |
-
'v7-pro' => ['type' => 'iframe', 'url' => 'advanced-slider/v7/'],
|
653 |
-
'v8-pro' => ['type' => 'iframe', 'url' => 'advanced-slider/v8/'],
|
654 |
-
],
|
655 |
-
'posts-timeline' => [
|
656 |
-
'v1' => ['type' => 'iframe', 'url' => 'timeline/v1/'],
|
657 |
-
'v2' => ['type' => 'iframe', 'url' => 'timeline/v2/'],
|
658 |
-
'v3' => ['type' => 'iframe', 'url' => 'timeline/v3/'],
|
659 |
-
'v4' => ['type' => 'iframe', 'url' => 'timeline/v4/'],
|
660 |
-
'v5' => ['type' => 'iframe', 'url' => 'timeline/v5/'],
|
661 |
-
],
|
662 |
-
'testimonial' => [
|
663 |
-
'v1' => ['type' => 'iframe', 'url' => 'testimonial-slider/v1/'],
|
664 |
-
'v2' => ['type' => 'iframe', 'url' => 'testimonial-slider/v2/'],
|
665 |
-
'v3' => ['type' => 'iframe', 'url' => 'testimonial-slider/v3/'],
|
666 |
-
'v4' => ['type' => 'iframe', 'url' => 'testimonial-slider/v4/'],
|
667 |
-
'v5-pro' => ['type' => 'iframe', 'url' => 'testimonial-slider/v5/'],
|
668 |
-
'v6-pro' => ['type' => 'iframe', 'url' => 'testimonial-slider/v6/'],
|
669 |
-
'v7-pro' => ['type' => 'iframe', 'url' => 'testimonial-slider/v7/'],
|
670 |
-
'v8-pro' => ['type' => 'iframe', 'url' => 'testimonial-slider/v8/'],
|
671 |
-
'v9-pro' => ['type' => 'iframe', 'url' => 'testimonial-slider/v9/'],
|
672 |
-
],
|
673 |
-
'nav-menu' => [
|
674 |
-
'v1' => ['type' => 'iframe', 'url' => 'nav-menu/v1/'],
|
675 |
-
'v2' => ['type' => 'iframe', 'url' => 'nav-menu/v2/'],
|
676 |
-
'v3' => ['type' => 'iframe', 'url' => 'nav-menu/v3/'],
|
677 |
-
'v4' => ['type' => 'iframe', 'url' => 'nav-menu/v4/'],
|
678 |
-
'v5' => ['type' => 'iframe', 'url' => 'nav-menu/v5/'],
|
679 |
-
'v6' => ['type' => 'iframe', 'url' => 'nav-menu/v6/'],
|
680 |
-
],
|
681 |
-
'onepage-nav' => [
|
682 |
-
'v1' => ['type' => 'iframe', 'url' => 'one-page-navigation/v1/'],
|
683 |
-
'v2' => ['type' => 'iframe', 'url' => 'one-page-navigation/v2/'],
|
684 |
-
'v3' => ['type' => 'iframe', 'url' => 'one-page-navigation/v3/'],
|
685 |
-
'v4-pro' => ['type' => 'iframe', 'url' => 'one-page-navigation/v4/'],
|
686 |
-
],
|
687 |
-
'pricing-table' => [
|
688 |
-
'v1' => ['type' => 'iframe', 'url' => 'pricing-table/v1/'],
|
689 |
-
'v2' => ['type' => 'iframe', 'url' => 'pricing-table/v2/'],
|
690 |
-
'v3' => ['type' => 'iframe', 'url' => 'pricing-table/v3/'],
|
691 |
-
'v4' => ['type' => 'iframe', 'url' => 'pricing-table/v4/'],
|
692 |
-
'v5' => ['type' => 'iframe', 'url' => 'pricing-table/v5/'],
|
693 |
-
'v6-pro' => ['type' => 'iframe', 'url' => 'pricing-table/v6/'],
|
694 |
-
'v7-pro' => ['type' => 'iframe', 'url' => 'pricing-table/v7/'],
|
695 |
-
'v8-pro' => ['type' => 'iframe', 'url' => 'pricing-table/v8/'],
|
696 |
-
],
|
697 |
-
'content-toggle' => [
|
698 |
-
'v1' => ['type' => 'iframe', 'url' => 'content-toggle/v1/'],
|
699 |
-
'v2' => ['type' => 'iframe', 'url' => 'content-toggle/v2/'],
|
700 |
-
'v3-pro' => ['type' => 'iframe', 'url' => 'content-toggle/v3/'],
|
701 |
-
'v4-pro' => ['type' => 'iframe', 'url' => 'content-toggle/v4/'],
|
702 |
-
],
|
703 |
-
'data-table' => [
|
704 |
-
'v1' => ['type' => 'iframe', 'url' => 'data-table/v1/'],
|
705 |
-
'v2' => ['type' => 'iframe', 'url' => 'data-table/v2/'],
|
706 |
-
'v3' => ['type' => 'iframe', 'url' => 'data-table/v3/'],
|
707 |
-
'v4-pro' => ['type' => 'iframe', 'url' => 'data-table/v4/'],
|
708 |
-
'v5-pro' => ['type' => 'iframe', 'url' => 'data-table/v5/'],
|
709 |
-
'v6-pro' => ['type' => 'iframe', 'url' => 'data-table/v6/'],
|
710 |
-
'v7-pro' => ['type' => 'iframe', 'url' => 'data-table/v7/'],
|
711 |
-
'v8-pro' => ['type' => 'iframe', 'url' => 'data-table/v8/'],
|
712 |
-
],
|
713 |
-
'countdown' => [
|
714 |
-
'v1' => ['type' => 'iframe', 'url' => 'countdown/v1/'],
|
715 |
-
'v2' => ['type' => 'iframe', 'url' => 'countdown/v2/'],
|
716 |
-
'v3' => ['type' => 'iframe', 'url' => 'countdown/v3/'],
|
717 |
-
],
|
718 |
-
'progress-bar' => [
|
719 |
-
'v1' => ['type' => 'iframe', 'url' => 'progress-bar/v1/'],
|
720 |
-
'v2' => ['type' => 'iframe', 'url' => 'progress-bar/v2/'],
|
721 |
-
'v3' => ['type' => 'iframe', 'url' => 'progress-bar/v3/'],
|
722 |
-
],
|
723 |
-
'tabs' => [
|
724 |
-
'v1' => ['type' => 'iframe', 'url' => 'tabs/v1/'],
|
725 |
-
'v2' => ['type' => 'iframe', 'url' => 'tabs/v2/'],
|
726 |
-
'v3' => ['type' => 'iframe', 'url' => 'tabs/v3/'],
|
727 |
-
],
|
728 |
-
'advanced-text' => [
|
729 |
-
'v1' => ['type' => 'iframe', 'url' => 'advanced-text/v1/'],
|
730 |
-
'v2' => ['type' => 'iframe', 'url' => 'advanced-text/v2/'],
|
731 |
-
'v3' => ['type' => 'iframe', 'url' => 'advanced-text/v3/'],
|
732 |
-
'v4' => ['type' => 'iframe', 'url' => 'advanced-text/v4/'],
|
733 |
-
'v5' => ['type' => 'iframe', 'url' => 'advanced-text/v5/'],
|
734 |
-
'v6' => ['type' => 'iframe', 'url' => 'advanced-text/v6/'],
|
735 |
-
'v7-pro' => ['type' => 'iframe', 'url' => 'advanced-text/v7/'],
|
736 |
-
'v8-pro' => ['type' => 'iframe', 'url' => 'advanced-text/v8/'],
|
737 |
-
'v9-pro' => ['type' => 'iframe', 'url' => 'advanced-text/v9/'],
|
738 |
-
'v10-pro' => ['type' => 'iframe', 'url' => 'advanced-text/v10/'],
|
739 |
-
'v11-pro' => ['type' => 'iframe', 'url' => 'advanced-text/v11/'],
|
740 |
-
'v12-pro' => ['type' => 'iframe', 'url' => 'advanced-text/v12/'],
|
741 |
-
],
|
742 |
-
'flip-box' => [
|
743 |
-
'v1' => ['type' => 'iframe', 'url' => 'flip-box/v1/'],
|
744 |
-
'v2' => ['type' => 'iframe', 'url' => 'flip-box/v2/'],
|
745 |
-
'v3' => ['type' => 'iframe', 'url' => 'flip-box/v3/'],
|
746 |
-
'v4-pro' => ['type' => 'iframe', 'url' => 'flip-box/v4/'],
|
747 |
-
],
|
748 |
-
'promo-box' => [
|
749 |
-
'v1' => ['type' => 'iframe', 'url' => 'promo-box/v1/'],
|
750 |
-
'v2' => ['type' => 'iframe', 'url' => 'promo-box/v2/'],
|
751 |
-
'v3' => ['type' => 'iframe', 'url' => 'promo-box/v3/'],
|
752 |
-
'v4-pro' => ['type' => 'iframe', 'url' => 'promo-box/v4/'],
|
753 |
-
'v5-pro' => ['type' => 'iframe', 'url' => 'promo-box/v5/'],
|
754 |
-
'v6-pro' => ['type' => 'iframe', 'url' => 'promo-box/v6/'],
|
755 |
-
],
|
756 |
-
'before-after' => [
|
757 |
-
'v1' => ['type' => 'iframe', 'url' => 'before-and-after/v1/'],
|
758 |
-
'v2' => ['type' => 'iframe', 'url' => 'before-and-after/v2/'],
|
759 |
-
'v3' => ['type' => 'iframe', 'url' => 'before-and-after/v3/'],
|
760 |
-
],
|
761 |
-
'image-hotspots' => [
|
762 |
-
'v1' => ['type' => 'iframe', 'url' => 'image-hotspot/v1/'],
|
763 |
-
'v2' => ['type' => 'iframe', 'url' => 'image-hotspot/v2/'],
|
764 |
-
'v3' => ['type' => 'iframe', 'url' => 'image-hotspot/v3/'],
|
765 |
-
],
|
766 |
-
'forms' => [],
|
767 |
-
'mailchimp' => [
|
768 |
-
'v1' => ['type' => 'iframe', 'url' => 'mailchimp/v1/'],
|
769 |
-
'v2' => ['type' => 'iframe', 'url' => 'mailchimp/v2/'],
|
770 |
-
'v3' => ['type' => 'iframe', 'url' => 'mailchimp/v3/'],
|
771 |
-
'v4' => ['type' => 'iframe', 'url' => 'mailchimp/v4/'],
|
772 |
-
'v5' => ['type' => 'iframe', 'url' => 'mailchimp/v5/'],
|
773 |
-
'v6-pro' => ['type' => 'iframe', 'url' => 'mailchimp/v6/'],
|
774 |
-
'v7-pro' => ['type' => 'iframe', 'url' => 'mailchimp/v7/'],
|
775 |
-
'v8-pro' => ['type' => 'iframe', 'url' => 'mailchimp/v8/'],
|
776 |
-
],
|
777 |
-
'content-ticker' => [
|
778 |
-
'v1' => ['type' => 'iframe', 'url' => 'content-ticker/v1/'],
|
779 |
-
'v2' => ['type' => 'iframe', 'url' => 'content-ticker/v2/'],
|
780 |
-
'v3' => ['type' => 'iframe', 'url' => 'content-ticker/v3/'],
|
781 |
-
'v4-pro' => ['type' => 'iframe', 'url' => 'content-ticker/v4/'],
|
782 |
-
'v5-pro' => ['type' => 'iframe', 'url' => 'content-ticker/v5/'],
|
783 |
-
'v6-pro' => ['type' => 'iframe', 'url' => 'content-ticker/v6/'],
|
784 |
-
],
|
785 |
-
'button' => [
|
786 |
-
'v1' => ['type' => 'iframe', 'url' => 'button/v1/'],
|
787 |
-
'v2' => ['type' => 'iframe', 'url' => 'button/v2/'],
|
788 |
-
'v3' => ['type' => 'iframe', 'url' => 'button/v3/'],
|
789 |
-
'v4' => ['type' => 'iframe', 'url' => 'button/v4/'],
|
790 |
-
'v5' => ['type' => 'iframe', 'url' => 'button/v5/'],
|
791 |
-
],
|
792 |
-
'dual-button' => [
|
793 |
-
'v1' => ['type' => 'iframe', 'url' => 'dual-button/v1/'],
|
794 |
-
'v2' => ['type' => 'iframe', 'url' => 'dual-button/v2/'],
|
795 |
-
'v3' => ['type' => 'iframe', 'url' => 'dual-button/v3/'],
|
796 |
-
],
|
797 |
-
'team-member' => [
|
798 |
-
'v1' => ['type' => 'iframe', 'url' => 'team-member/v1/'],
|
799 |
-
'v2' => ['type' => 'iframe', 'url' => 'team-member/v2/'],
|
800 |
-
'v3' => ['type' => 'iframe', 'url' => 'team-member/v3/'],
|
801 |
-
'v4' => ['type' => 'iframe', 'url' => 'team-member/v4/'],
|
802 |
-
'v5' => ['type' => 'iframe', 'url' => 'team-member/v5/'],
|
803 |
-
'v6-pro' => ['type' => 'iframe', 'url' => 'team-member/v6/'],
|
804 |
-
'v7-pro' => ['type' => 'iframe', 'url' => 'team-member/v7/'],
|
805 |
-
'v8-pro' => ['type' => 'iframe', 'url' => 'team-member/v8/'],
|
806 |
-
],
|
807 |
-
'google-maps' => [
|
808 |
-
'v1' => ['type' => 'iframe', 'url' => 'google-map/v1/'],
|
809 |
-
'v2' => ['type' => 'iframe', 'url' => 'google-map/v2/'],
|
810 |
-
'v3' => ['type' => 'iframe', 'url' => 'google-map/v3/'],
|
811 |
-
'v4' => ['type' => 'iframe', 'url' => 'google-map/v4/'],
|
812 |
-
'v5' => ['type' => 'iframe', 'url' => 'google-map/v5/'],
|
813 |
-
],
|
814 |
-
'price-list' => [
|
815 |
-
'v1' => ['type' => 'iframe', 'url' => 'price-list/v1/'],
|
816 |
-
'v2' => ['type' => 'iframe', 'url' => 'price-list/v2/'],
|
817 |
-
'v3' => ['type' => 'iframe', 'url' => 'price-list/v3/'],
|
818 |
-
'v4-pro' => ['type' => 'iframe', 'url' => 'price-list/v4/'],
|
819 |
-
'v5-pro' => ['type' => 'iframe', 'url' => 'price-list/v5/'],
|
820 |
-
'v6-pro' => ['type' => 'iframe', 'url' => 'price-list/v6/'],
|
821 |
-
'v7-pro' => ['type' => 'iframe', 'url' => 'price-list/v7/'],
|
822 |
-
],
|
823 |
-
'business-hours' => [
|
824 |
-
'v1' => ['type' => 'iframe', 'url' => 'business-hours/v1/'],
|
825 |
-
'v2' => ['type' => 'iframe', 'url' => 'business-hours/v2/'],
|
826 |
-
'v3' => ['type' => 'iframe', 'url' => 'business-hours/v3/'],
|
827 |
-
],
|
828 |
-
'sharing-buttons' => [
|
829 |
-
'v1' => ['type' => 'iframe', 'url' => 'sharing-button/v1/'],
|
830 |
-
'v2' => ['type' => 'iframe', 'url' => 'sharing-button/v2/'],
|
831 |
-
'v3' => ['type' => 'iframe', 'url' => 'sharing-button/v3/'],
|
832 |
-
'v4-pro' => ['type' => 'iframe', 'url' => 'sharing-button/v4/'],
|
833 |
-
'v5-pro' => ['type' => 'iframe', 'url' => 'sharing-button/v5/'],
|
834 |
-
],
|
835 |
-
'logo' => [],
|
836 |
-
'search' => [
|
837 |
-
'v1' => ['type' => 'iframe', 'url' => 'search/v1/'],
|
838 |
-
'v2' => ['type' => 'iframe', 'url' => 'search/v2/'],
|
839 |
-
'v3' => ['type' => 'iframe', 'url' => 'search/v3/'],
|
840 |
-
],
|
841 |
-
'phone-call' => [],
|
842 |
-
'back-to-top' => [],
|
843 |
-
'lottie-animations' => [],
|
844 |
-
'popup-trigger' => [],
|
845 |
-
];
|
846 |
-
}
|
847 |
-
|
848 |
-
public static function get_available_popups() {
|
849 |
-
return [
|
850 |
-
// 'contact' => [
|
851 |
-
// 'v1' => ['type' => 'iframe', 'url' => 'search/v1/'],
|
852 |
-
// 'v2' => ['type' => 'iframe', 'url' => 'search/v2/'],
|
853 |
-
// 'v3' => ['type' => 'iframe', 'url' => 'search/v3/'],
|
854 |
-
// ],
|
855 |
-
'cookie' => [
|
856 |
-
'v1' => ['type' => 'image', 'url' => 'popups/cookie/v1-preview.jpg'],
|
857 |
-
'v2-pro' => ['type' => 'image', 'url' => 'popups/cookie/v2-pro-preview.jpg'],
|
858 |
-
'v3-pro' => ['type' => 'image', 'url' => 'popups/cookie/v3-pro-preview.jpg'],
|
859 |
-
'v4-pro' => ['type' => 'image', 'url' => 'popups/cookie/v4-pro-preview.jpg'],
|
860 |
-
],
|
861 |
-
'discount' => [
|
862 |
-
'v1' => ['type' => 'image', 'url' => 'popups/discount/v1-preview.jpg'],
|
863 |
-
'v2' => ['type' => 'image', 'url' => 'popups/discount/v2-preview.jpg'],
|
864 |
-
'v3-pro' => ['type' => 'image', 'url' => 'popups/discount/v3-pro-preview.jpg'],
|
865 |
-
'v4-pro' => ['type' => 'image', 'url' => 'popups/discount/v4-pro-preview.jpg'],
|
866 |
-
'v5' => ['type' => 'image', 'url' => 'popups/discount/v5-preview.jpg'],
|
867 |
-
'v6' => ['type' => 'image', 'url' => 'popups/discount/v6-preview.jpg'],
|
868 |
-
'v7-pro' => ['type' => 'image', 'url' => 'popups/discount/v7-pro-preview.jpg'],
|
869 |
-
'v8-pro' => ['type' => 'image', 'url' => 'popups/discount/v8-pro-preview.jpg'],
|
870 |
-
'v9' => ['type' => 'image', 'url' => 'popups/discount/v9-preview.jpg'],
|
871 |
-
'v10' => ['type' => 'image', 'url' => 'popups/discount/v10-preview.jpg'],
|
872 |
-
'v11-pro' => ['type' => 'image', 'url' => 'popups/discount/v11-pro-preview.jpg'],
|
873 |
-
'v12-pro' => ['type' => 'image', 'url' => 'popups/discount/v12-pro-preview.jpg'],
|
874 |
-
'v13-pro' => ['type' => 'image', 'url' => 'popups/discount/v13-pro-preview.jpg'],
|
875 |
-
'v14' => ['type' => 'image', 'url' => 'popups/discount/v14-preview.jpg'],
|
876 |
-
'v15' => ['type' => 'image', 'url' => 'popups/discount/v15-preview.jpg'],
|
877 |
-
'v16-pro' => ['type' => 'image', 'url' => 'popups/discount/v16-pro-preview.jpg'],
|
878 |
-
],
|
879 |
-
'subscribe' => [
|
880 |
-
'v1-pro' => ['type' => 'image', 'url' => 'popups/subscribe/v1-pro-preview.jpg'],
|
881 |
-
'v2-pro' => ['type' => 'image', 'url' => 'popups/subscribe/v2-pro-preview.jpg'],
|
882 |
-
'v3-pro' => ['type' => 'image', 'url' => 'popups/subscribe/v3-pro-preview.jpg'],
|
883 |
-
],
|
884 |
-
'yesno' => [
|
885 |
-
'v1-pro' => ['type' => 'image', 'url' => 'popups/yesno/v1-pro-preview.jpg'],
|
886 |
-
'v2-pro' => ['type' => 'image', 'url' => 'popups/yesno/v2-pro-preview.jpg'],
|
887 |
-
'v3-pro' => ['type' => 'image', 'url' => 'popups/yesno/v3-pro-preview.jpg'],
|
888 |
-
],
|
889 |
-
];
|
890 |
-
}
|
891 |
}
|
1 |
+
<?php
|
2 |
+
namespace WprAddons\Admin\Templates;
|
3 |
+
|
4 |
+
use WprAddons\Plugin;
|
5 |
+
|
6 |
+
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
7 |
+
|
8 |
+
class WPR_Templates_Data {
|
9 |
+
public static function get_available_kits() {
|
10 |
+
$is_pro_active = wpr_fs()->can_use_premium_code() && defined('WPR_ADDONS_PRO_VERSION');
|
11 |
+
$is_cf7_active = is_plugin_active('contact-form-7/wp-contact-form-7.php') ? 'true' : 'false';
|
12 |
+
$is_mla_active = is_plugin_active('media-library-assistant/index.php') ? 'true' : 'false';
|
13 |
+
$is_woo_active = is_plugin_active('woocommerce/woocommerce.php') ? 'true' : 'false';
|
14 |
+
|
15 |
+
return [
|
16 |
+
'grocery-store' => [
|
17 |
+
'v1' => [
|
18 |
+
'name' => 'Grocery Store',
|
19 |
+
'pages' => 'home,shop,single-product,my-account,about,contact,',
|
20 |
+
'plugins' => '{"contact-form-7":'. $is_cf7_active .',"woocommerce":'. $is_woo_active .'}',
|
21 |
+
'tags' => 'shop shopping woo-commerce woocommerce estore ecommerce product online eshopping market reseller ecommerce shop',
|
22 |
+
'theme-builder' => false,
|
23 |
+
'woo-builder' => true,
|
24 |
+
'off-canvas' => false,
|
25 |
+
'price' => $is_pro_active ? 'free' : 'pro',
|
26 |
+
'priority' => 4,
|
27 |
+
],
|
28 |
+
],
|
29 |
+
'furniture-shop' => [
|
30 |
+
'v1' => [
|
31 |
+
'name' => 'Furniture Shop',
|
32 |
+
'pages' => 'home,shop-v1,shop-v2,single-product,my-account,about,contact,',
|
33 |
+
'plugins' => '{"contact-form-7":'. $is_cf7_active .',"woocommerce":'. $is_woo_active .'}',
|
34 |
+
'tags' => 'shop shopping woo-commerce woocommerce estore ecommerce product online furniture home office eshopping market reseller ecommerce shop ',
|
35 |
+
'theme-builder' => false,
|
36 |
+
'woo-builder' => true,
|
37 |
+
'off-canvas' => true,
|
38 |
+
'price' => $is_pro_active ? 'free' : 'pro',
|
39 |
+
'priority' => 5,
|
40 |
+
],
|
41 |
+
],
|
42 |
+
'estore' => [
|
43 |
+
'v1' => [
|
44 |
+
'name' => 'Electronic Store',
|
45 |
+
'pages' => 'home,shop,single-product,blog,faq,about,contact,',
|
46 |
+
'plugins' => '{"contact-form-7":'. $is_cf7_active .',"woocommerce":'. $is_woo_active .'}',
|
47 |
+
'tags' => 'shop shopping woo-commerce woocommerce estore ecommerce product online market reseller ecommerce shop gadget iphone phone electronic ',
|
48 |
+
'theme-builder' => true,
|
49 |
+
'woo-builder' => true,
|
50 |
+
'off-canvas' => false,
|
51 |
+
'price' => $is_pro_active ? 'free' : 'pro',
|
52 |
+
'priority' => 4,
|
53 |
+
],
|
54 |
+
],
|
55 |
+
'woo-food' => [
|
56 |
+
'v1' => [
|
57 |
+
'name' => 'Food Delivery',
|
58 |
+
'pages' => 'home,home-v2,food,single-product,about,contact,faq,blog,',
|
59 |
+
'plugins' => '{"contact-form-7":'. $is_cf7_active .',"woocommerce":'. $is_woo_active .'}',
|
60 |
+
'tags' => 'shop woo-commerce woocommerce ecommerce product online eshopping market ecommerce shop food delivery restaurant fast food pizzeria burger recipes cooking pizza restaurant snack',
|
61 |
+
'theme-builder' => true,
|
62 |
+
'woo-builder' => true,
|
63 |
+
'off-canvas' => false,
|
64 |
+
'price' => $is_pro_active ? 'free' : 'pro',
|
65 |
+
'priority' => 144,
|
66 |
+
],
|
67 |
+
],
|
68 |
+
'fashion' => [
|
69 |
+
'v1' => [
|
70 |
+
'name' => 'Fashion',
|
71 |
+
'pages' => 'home,shop-v1,shop-v2,single-product,blog,my-account,about,faq,contact,',
|
72 |
+
'plugins' => '{"contact-form-7":'. $is_cf7_active .',"woocommerce":'. $is_woo_active .'}',
|
73 |
+
'tags' => 'shop shopping woo-commerce woocommerce estore ecommerce product ecommerce shop online boutique clothes eshopping fashion designer market reseller digital purchases',
|
74 |
+
'theme-builder' => true,
|
75 |
+
'woo-builder' => true,
|
76 |
+
'off-canvas' => false,
|
77 |
+
'price' => $is_pro_active ? 'free' : 'pro',
|
78 |
+
'priority' => 2,
|
79 |
+
],
|
80 |
+
],
|
81 |
+
'wooshop' => [
|
82 |
+
'v1' => [
|
83 |
+
'name' => 'Woo Shop',
|
84 |
+
'pages' => 'home,shop,single-product,about,contact,',
|
85 |
+
'plugins' => '{"contact-form-7":'. $is_cf7_active .',"woocommerce":'. $is_woo_active .'}',
|
86 |
+
'tags' => 'shop shopping woo-commerce woocommerce estore ecommerce shop ecommerce product online shop online store boutique clothes eshopping fashion designer market reseller digital purchases',
|
87 |
+
'theme-builder' => false,
|
88 |
+
'woo-builder' => true,
|
89 |
+
'off-canvas' => false,
|
90 |
+
'price' => $is_pro_active ? 'free' : 'free',
|
91 |
+
'priority' => 3,
|
92 |
+
],
|
93 |
+
],
|
94 |
+
'personal-blog' => [
|
95 |
+
'v1' => [
|
96 |
+
'name' => 'Personal Blog',
|
97 |
+
'pages' => 'home,home-v1,home-v2,home-v3,lifestyle,about,contact,',
|
98 |
+
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
99 |
+
'tags' => 'blog blogger posts personal blog lifestyle blogger theme builder grid slider news',
|
100 |
+
'theme-builder' => true,
|
101 |
+
'woo-builder' => false,
|
102 |
+
'off-canvas' => false,
|
103 |
+
'price' => $is_pro_active ? 'free' : 'pro',
|
104 |
+
'priority' => 2,
|
105 |
+
],
|
106 |
+
'v2' => [
|
107 |
+
'name' => 'Personal Blog',
|
108 |
+
'pages' => 'home,single,category,about,contact,',
|
109 |
+
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
110 |
+
'tags' => 'blog blogger posts personal blog lifestyle blogger theme builder grid slider news',
|
111 |
+
'theme-builder' => true,
|
112 |
+
'woo-builder' => false,
|
113 |
+
'off-canvas' => false,
|
114 |
+
'price' => $is_pro_active ? 'free' : 'pro',
|
115 |
+
'priority' => 4,
|
116 |
+
],
|
117 |
+
],
|
118 |
+
'food-blog' => [
|
119 |
+
'v1' => [
|
120 |
+
'name' => 'Food Blog',
|
121 |
+
'pages' => 'home,home-v1,home-v2,home-v3,category,about,contact,',
|
122 |
+
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
123 |
+
'tags' => 'food blog posts food blogger theme builder recipes cooking grid slider',
|
124 |
+
'theme-builder' => true,
|
125 |
+
'woo-builder' => false,
|
126 |
+
'off-canvas' => false,
|
127 |
+
'price' => $is_pro_active ? 'free' : 'pro',
|
128 |
+
'priority' => 20,
|
129 |
+
],
|
130 |
+
],
|
131 |
+
'magazine-blog' => [
|
132 |
+
'v1' => [
|
133 |
+
'name' => 'Magazine Blog',
|
134 |
+
'pages' => 'home,home-v1,home-v2,category,about,contact,',
|
135 |
+
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
136 |
+
'tags' => 'blogger blog posts content news newspaper journal magazine business blog publishing theme builder sports grid slider',
|
137 |
+
'theme-builder' => true,
|
138 |
+
'woo-builder' => false,
|
139 |
+
'off-canvas' => false,
|
140 |
+
'price' => $is_pro_active ? 'free' : 'pro',
|
141 |
+
'priority' => 6,
|
142 |
+
],
|
143 |
+
'v2' => [
|
144 |
+
'name' => 'Magazine Blog',
|
145 |
+
'pages' => 'home,home-v1,home-v2,category,about,contact,',
|
146 |
+
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
147 |
+
'tags' => 'blogger blog posts content news newspaper journal magazine business blog publishing theme builder sports grid slider',
|
148 |
+
'theme-builder' => true,
|
149 |
+
'woo-builder' => false,
|
150 |
+
'off-canvas' => false,
|
151 |
+
'price' => $is_pro_active ? 'free' : 'pro',
|
152 |
+
'priority' => 50,
|
153 |
+
],
|
154 |
+
'v3' => [
|
155 |
+
'name' => 'Magazine Blog',
|
156 |
+
'pages' => 'home,category,about,contact,',
|
157 |
+
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
158 |
+
'tags' => 'blogger blog posts content news newspaper journal magazine business blog publishing theme builder sports grid slider',
|
159 |
+
'theme-builder' => true,
|
160 |
+
'woo-builder' => false,
|
161 |
+
'off-canvas' => false,
|
162 |
+
'price' => $is_pro_active ? 'free' : 'pro',
|
163 |
+
'priority' => 30,
|
164 |
+
],
|
165 |
+
],
|
166 |
+
'nature' => [
|
167 |
+
'v1' => [
|
168 |
+
'name' => 'nature',
|
169 |
+
'pages' => 'home,about,services,projects,contact,',
|
170 |
+
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
171 |
+
'tags' => 'nature influencer travel blogger blog content slider tourism influencers creator travel forest slider generic multipurpose national-park nature-park sanctuary wilderness hitchhiking mountain river lakes outdoors',
|
172 |
+
'theme-builder' => true,
|
173 |
+
'woo-builder' => false,
|
174 |
+
'off-canvas' => false,
|
175 |
+
'price' => $is_pro_active ? 'free' : 'free',
|
176 |
+
'priority' => 60,
|
177 |
+
],
|
178 |
+
],
|
179 |
+
'travel-agency' => [
|
180 |
+
'v1' => [
|
181 |
+
'name' => 'Travel agency',
|
182 |
+
'pages' => 'home,tours,gallery,services,reviews,about,contact,',
|
183 |
+
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
184 |
+
'tags' => 'nature influencer travel blogger blog content slider tourism influencers creator travel forest slider generic multipurpose national-park nature-park sanctuary wilderness hitchhiking mountain river lakes outdoors travel agency company office travel services',
|
185 |
+
'theme-builder' => true,
|
186 |
+
'woo-builder' => false,
|
187 |
+
'off-canvas' => false,
|
188 |
+
'price' => $is_pro_active ? 'free' : 'free',
|
189 |
+
'priority' => 61,
|
190 |
+
],
|
191 |
+
],
|
192 |
+
'digital-marketing-agency' => [
|
193 |
+
'v1' => [
|
194 |
+
'name' => 'Digital Marketing Agency',
|
195 |
+
'pages' => 'home,seo,branding,marketing,social,blog,about,contact,',
|
196 |
+
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
197 |
+
'tags' => 'digital agency company corporate digital services office agency web digital marketing seo social media branding',
|
198 |
+
'theme-builder' => true,
|
199 |
+
'woo-builder' => false,
|
200 |
+
'off-canvas' => false,
|
201 |
+
'price' => $is_pro_active ? 'free' : 'free',
|
202 |
+
'priority' => 1,
|
203 |
+
],
|
204 |
+
'v2' => [
|
205 |
+
'name' => 'Digital Marketing Agency 2',
|
206 |
+
'pages' => 'home,seo,social,web,email,blog,about,team,contact,pricing1,pricing2,pricing3,casestudy,',
|
207 |
+
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
208 |
+
'tags' => 'digital agency company corporate digital services office agency web digital marketing seo social media branding',
|
209 |
+
'theme-builder' => true,
|
210 |
+
'woo-builder' => false,
|
211 |
+
'off-canvas' => false,
|
212 |
+
'price' => $is_pro_active ? 'free' : 'pro',
|
213 |
+
'priority' => 1,
|
214 |
+
],
|
215 |
+
],
|
216 |
+
'digital-agency-dark' => [
|
217 |
+
'v1' => [
|
218 |
+
'name' => 'Digital Agency Dark',
|
219 |
+
'pages' => 'home,about,services,team,portfolio,blog,contact,',
|
220 |
+
'plugins' => '{"contact-form-7":'. $is_cf7_active .', "media-library-assistant":'. $is_mla_active .'}',
|
221 |
+
'tags' => 'digital agency company corporate digital services office agency web digital marketing seo social media branding dark black',
|
222 |
+
'theme-builder' => true,
|
223 |
+
'woo-builder' => false,
|
224 |
+
'off-canvas' => false,
|
225 |
+
'price' => $is_pro_active ? 'free' : 'free',
|
226 |
+
'priority' => 3,
|
227 |
+
],
|
228 |
+
],
|
229 |
+
'one-page' => [
|
230 |
+
'v1' => [
|
231 |
+
'name' => 'OnePage - Digital Marketing Agency',
|
232 |
+
'pages' => 'home,blog,',
|
233 |
+
'plugins' => '{"contact-form-7":'. $is_cf7_active .', "media-library-assistant":'. $is_mla_active .'}',
|
234 |
+
'tags' => 'digital agency company corporate digital services office agency web digital marketing seo social media branding one page onepage one pages parallax single page',
|
235 |
+
'theme-builder' => true,
|
236 |
+
'woo-builder' => false,
|
237 |
+
'off-canvas' => false,
|
238 |
+
'price' => $is_pro_active ? 'free' : 'free',
|
239 |
+
'priority' => 7,
|
240 |
+
],
|
241 |
+
],
|
242 |
+
'travel-blog' => [
|
243 |
+
'v1' => [
|
244 |
+
'name' => 'Travel Blog',
|
245 |
+
'pages' => 'home,home-v1,home-v2,category,about,contact,',
|
246 |
+
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
247 |
+
'tags' => 'nature influencer travel blogger blog posts content tourism influencers creator travel forest slider generic multipurpose national-park nature-park sanctuary wilderness slider hitchhiking mountain river lakes outdoors theme builder traveler hiking grid',
|
248 |
+
'theme-builder' => true,
|
249 |
+
'woo-builder' => false,
|
250 |
+
'off-canvas' => false,
|
251 |
+
'price' => $is_pro_active ? 'free' : 'pro',
|
252 |
+
'priority' => 71,
|
253 |
+
],
|
254 |
+
],
|
255 |
+
'portfolio' => [
|
256 |
+
'v1' => [
|
257 |
+
'name' => 'Portfolio/CV',
|
258 |
+
'pages' => 'home,about,portfolio,contact,',
|
259 |
+
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
260 |
+
'tags' => 'portfolio personal cv designer ux artist artwork personal resume photographer grid',
|
261 |
+
'theme-builder' => false,
|
262 |
+
'woo-builder' => false,
|
263 |
+
'off-canvas' => false,
|
264 |
+
'price' => $is_pro_active ? 'free' : 'free',
|
265 |
+
'priority' => 80,
|
266 |
+
],
|
267 |
+
],
|
268 |
+
'nft-portfolio' => [
|
269 |
+
'v1' => [
|
270 |
+
'name' => 'NFT',
|
271 |
+
'pages' => 'home,about,blog,roadmap,team,nft,faq,comingsoon,',
|
272 |
+
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
273 |
+
'tags' => 'portfolio blockchain nft crypto collection minting listing metavers digital currency art',
|
274 |
+
'theme-builder' => false,
|
275 |
+
'woo-builder' => false,
|
276 |
+
'off-canvas' => false,
|
277 |
+
'price' => $is_pro_active ? 'free' : 'free',
|
278 |
+
'priority' => 81,
|
279 |
+
],
|
280 |
+
],
|
281 |
+
'pizza' => [
|
282 |
+
'v1' => [
|
283 |
+
'name' => 'Pizza Restaurant',
|
284 |
+
'pages' => 'home,menu,about,offer,gallery,contact,',
|
285 |
+
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
286 |
+
'tags' => 'pizza italian restaurant food slider pasta fastfood fast food recipes cooking slider',
|
287 |
+
'theme-builder' => false,
|
288 |
+
'woo-builder' => false,
|
289 |
+
'off-canvas' => false,
|
290 |
+
'price' => $is_pro_active ? 'free' : 'free',
|
291 |
+
'priority' => 90,
|
292 |
+
],
|
293 |
+
],
|
294 |
+
'pet-care' => [
|
295 |
+
'v1' => [
|
296 |
+
'name' => 'Pet Care',
|
297 |
+
'pages' => 'home,about,services,reviews,contact,',
|
298 |
+
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
299 |
+
'tags' => 'pet care dog care grooming pet minding pet sitting pet training pet walking cat animal dogs dog training',
|
300 |
+
'theme-builder' => false,
|
301 |
+
'woo-builder' => false,
|
302 |
+
'off-canvas' => false,
|
303 |
+
'price' => $is_pro_active ? 'free' : 'free',
|
304 |
+
'priority' => 91,
|
305 |
+
],
|
306 |
+
],
|
307 |
+
'travel' => [
|
308 |
+
'v1' => [
|
309 |
+
'name' => 'Travel Blogger & Influencer',
|
310 |
+
'pages' => 'home,about,stories,contact,',
|
311 |
+
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
312 |
+
'tags' => 'nature influencer travel blogger blog content tourism influencers creator travel forest slider generic multipurpose national-park nature-park sanctuary wilderness hitchhiking mountain river lakes outdoors',
|
313 |
+
'theme-builder' => false,
|
314 |
+
'woo-builder' => false,
|
315 |
+
'off-canvas' => false,
|
316 |
+
'price' => $is_pro_active ? 'free' : 'free',
|
317 |
+
'priority' => 100,
|
318 |
+
],
|
319 |
+
],
|
320 |
+
'cybersecurity' => [
|
321 |
+
'v1' => [
|
322 |
+
'name' => 'Cybersecurity',
|
323 |
+
'pages' => 'home,about,services,pricing,contact,',
|
324 |
+
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
325 |
+
'tags' => 'cybersecurity data protection hacker security dark digital technology cybercrime computer windows technician',
|
326 |
+
'theme-builder' => false,
|
327 |
+
'woo-builder' => false,
|
328 |
+
'off-canvas' => false,
|
329 |
+
'price' => $is_pro_active ? 'free' : 'free',
|
330 |
+
'priority' => 110,
|
331 |
+
],
|
332 |
+
],
|
333 |
+
'charity' => [
|
334 |
+
'v1' => [
|
335 |
+
'name' => 'Charity',
|
336 |
+
'pages' => 'home,home-v1,contact,whatwedo,whoweare,partners,',
|
337 |
+
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
338 |
+
'tags' => 'charity donate church foundation giving non-profit organization kids charity help children save life donation fundrising ngo fundraising corona fundraising nonprofit non profit',
|
339 |
+
'theme-builder' => false,
|
340 |
+
'woo-builder' => false,
|
341 |
+
'off-canvas' => false,
|
342 |
+
'price' => $is_pro_active ? 'free' : 'free',
|
343 |
+
'priority' => 111,
|
344 |
+
],
|
345 |
+
],
|
346 |
+
'photographer' => [
|
347 |
+
'v1' => [
|
348 |
+
'name' => 'Photographer Portfolio Dark',
|
349 |
+
'pages' => 'home,about,services,portfolio,contact,',
|
350 |
+
'plugins' => '{"contact-form-7":'. $is_cf7_active .', "media-library-assistant":'. $is_mla_active .'}',
|
351 |
+
'tags' => 'portfolio personal cv designer ux artist artwork personal resume camera fashion lens modelling photographer photography videography wedding shoot grid ',
|
352 |
+
'theme-builder' => false,
|
353 |
+
'woo-builder' => false,
|
354 |
+
'off-canvas' => false,
|
355 |
+
'price' => $is_pro_active ? 'free' : 'free',
|
356 |
+
'priority' => 120,
|
357 |
+
],
|
358 |
+
'v2' => [
|
359 |
+
'name' => 'Photographer Portfolio Light',
|
360 |
+
'pages' => 'home,about,services,portfolio,contact,',
|
361 |
+
'plugins' => '{"contact-form-7":'. $is_cf7_active .', "media-library-assistant":'. $is_mla_active .'}',
|
362 |
+
'tags' => 'portfolio personal cv designer ux artist artwork personal resume camera fashion lens modelling photographer photography videography wedding shoot grid ',
|
363 |
+
'theme-builder' => false,
|
364 |
+
'woo-builder' => false,
|
365 |
+
'off-canvas' => false,
|
366 |
+
'price' => $is_pro_active ? 'free' : 'free',
|
367 |
+
'priority' => 130,
|
368 |
+
],
|
369 |
+
],
|
370 |
+
'cryptocurrency' => [
|
371 |
+
'v1' => [
|
372 |
+
'name' => 'Cryptocurrency',
|
373 |
+
'pages' => 'home,about,services,token,pricing,contact,',
|
374 |
+
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
375 |
+
'tags' => 'cryptocurrency bitcoin ethereum etherium blockchain protection nft coin corporate crypto dark startup token digital',
|
376 |
+
'theme-builder' => false,
|
377 |
+
'woo-builder' => false,
|
378 |
+
'off-canvas' => false,
|
379 |
+
'price' => $is_pro_active ? 'free' : 'free',
|
380 |
+
'priority' => 150,
|
381 |
+
],
|
382 |
+
],
|
383 |
+
'skincare' => [
|
384 |
+
'v1' => [
|
385 |
+
'name' => 'Skin Care',
|
386 |
+
'pages' => 'home,about,services,procedures,gallery,pricing,contact,',
|
387 |
+
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
388 |
+
'tags' => 'skincare skin care beauty clean face skin-beauty health wellness',
|
389 |
+
'theme-builder' => false,
|
390 |
+
'woo-builder' => false,
|
391 |
+
'off-canvas' => false,
|
392 |
+
'price' => $is_pro_active ? 'free' : 'free',
|
393 |
+
'priority' => 160,
|
394 |
+
],
|
395 |
+
],
|
396 |
+
'lawyer' => [
|
397 |
+
'v1' => [
|
398 |
+
'name' => 'Lawyer',
|
399 |
+
'pages' => 'home,practice,faq,reviews,attorney,contact,',
|
400 |
+
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
401 |
+
'tags' => 'lawyers criminal defence lawyer firm divorce lawyer family lawyer law legal firm ',
|
402 |
+
'theme-builder' => false,
|
403 |
+
'woo-builder' => false,
|
404 |
+
'off-canvas' => false,
|
405 |
+
'price' => $is_pro_active ? 'free' : 'free',
|
406 |
+
'priority' => 170,
|
407 |
+
],
|
408 |
+
],
|
409 |
+
'medical' => [
|
410 |
+
'v1' => [
|
411 |
+
'name' => 'Medical',
|
412 |
+
'pages' => 'home,about,services,doctors,contact,',
|
413 |
+
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
414 |
+
'tags' => 'medical clinic dental health healthcare doctor therapist wellness treatment cure',
|
415 |
+
'theme-builder' => false,
|
416 |
+
'woo-builder' => false,
|
417 |
+
'off-canvas' => false,
|
418 |
+
'price' => $is_pro_active ? 'free' : 'free',
|
419 |
+
'priority' => 180,
|
420 |
+
],
|
421 |
+
],
|
422 |
+
'digitalagency' => [
|
423 |
+
'v1' => [
|
424 |
+
'name' => 'Digital Agency',
|
425 |
+
'pages' => 'home,about,services,contact,',
|
426 |
+
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
427 |
+
'tags' => 'digital agency company corporate digital services office agency web marketing',
|
428 |
+
'theme-builder' => false,
|
429 |
+
'woo-builder' => false,
|
430 |
+
'off-canvas' => false,
|
431 |
+
'price' => $is_pro_active ? 'free' : 'free',
|
432 |
+
'priority' => 190,
|
433 |
+
],
|
434 |
+
'v2' => [
|
435 |
+
'name' => 'Digital Agency',
|
436 |
+
'pages' => 'home,about,services,pricing,contact,',
|
437 |
+
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
438 |
+
'tags' => 'digital agency company corporate digital services office agency web marketing slider',
|
439 |
+
'theme-builder' => false,
|
440 |
+
'woo-builder' => false,
|
441 |
+
'off-canvas' => false,
|
442 |
+
'price' => $is_pro_active ? 'free' : 'free',
|
443 |
+
'priority' => 200,
|
444 |
+
],
|
445 |
+
],
|
446 |
+
'drone' => [
|
447 |
+
'v1' => [
|
448 |
+
'name' => 'Drone Project',
|
449 |
+
'pages' => 'home,about,gallery,services,contact,',
|
450 |
+
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
451 |
+
'tags' => 'drone photography aerial photo ',
|
452 |
+
'theme-builder' => false,
|
453 |
+
'woo-builder' => false,
|
454 |
+
'off-canvas' => false,
|
455 |
+
'price' => $is_pro_active ? 'free' : 'free',
|
456 |
+
'priority' => 210,
|
457 |
+
],
|
458 |
+
],
|
459 |
+
'architecture' => [
|
460 |
+
'v1' => [
|
461 |
+
'name' => 'Architecture 1',
|
462 |
+
'pages' => 'home,about,portfolio,services,faq,contact,',
|
463 |
+
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
464 |
+
'tags' => 'architecture company slider interior design designer landscaping office zoning building slider',
|
465 |
+
'theme-builder' => false,
|
466 |
+
'woo-builder' => false,
|
467 |
+
'off-canvas' => false,
|
468 |
+
'price' => $is_pro_active ? 'free' : 'pro',
|
469 |
+
'priority' => 220,
|
470 |
+
],
|
471 |
+
'v2' => [
|
472 |
+
'name' => 'Architecture 2',
|
473 |
+
'pages' => 'home,about,projects,services,team,pricing,faq,contact,',
|
474 |
+
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
475 |
+
'tags' => 'architecture company slider interior design designer landscaping office zoning building slider architecture commercial construction creative decorations exterior designer home decorations interior designer landscape design modern real-estate residential',
|
476 |
+
'theme-builder' => true,
|
477 |
+
'woo-builder' => false,
|
478 |
+
'off-canvas' => false,
|
479 |
+
'price' => $is_pro_active ? 'free' : 'pro',
|
480 |
+
'priority' => 223,
|
481 |
+
],
|
482 |
+
],
|
483 |
+
'fooddelivery' => [
|
484 |
+
'v1' => [
|
485 |
+
'name' => 'Food Delivery',
|
486 |
+
'pages' => 'home,services,blog,faq,contact,',
|
487 |
+
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
488 |
+
'tags' => 'fooddelivery fast food chain restaurant service hotel italian pasta pizza pizzeria burger recipes cooking',
|
489 |
+
'theme-builder' => false,
|
490 |
+
'woo-builder' => false,
|
491 |
+
'off-canvas' => false,
|
492 |
+
'price' => $is_pro_active ? 'free' : 'pro',
|
493 |
+
'priority' => 230,
|
494 |
+
],
|
495 |
+
],
|
496 |
+
'construction' => [
|
497 |
+
'v1' => [
|
498 |
+
'name' => 'Construction',
|
499 |
+
'pages' => 'home,about,services,projects,pricing,contact,faq,',
|
500 |
+
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
501 |
+
'tags' => 'construction architecture company interior office real estate',
|
502 |
+
'theme-builder' => false,
|
503 |
+
'woo-builder' => false,
|
504 |
+
'off-canvas' => false,
|
505 |
+
'price' => $is_pro_active ? 'free' : 'free',
|
506 |
+
'priority' => 240,
|
507 |
+
],
|
508 |
+
],
|
509 |
+
'ittech' => [
|
510 |
+
'v1' => [
|
511 |
+
'name' => 'IT Tech v1',
|
512 |
+
'pages' => 'home,about,services,pricing,faq,contact,',
|
513 |
+
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
514 |
+
'tags' => 'ittech advanced technology it technique computer windows technician digital',
|
515 |
+
'theme-builder' => false,
|
516 |
+
'woo-builder' => false,
|
517 |
+
'off-canvas' => false,
|
518 |
+
'price' => $is_pro_active ? 'free' : 'free',
|
519 |
+
'priority' => 5,
|
520 |
+
],
|
521 |
+
'v2' => [
|
522 |
+
'name' => 'IT Tech v2',
|
523 |
+
'pages' => 'home,about,services,pricing,faq,contact,',
|
524 |
+
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
525 |
+
'tags' => 'ittech advanced technology it technique computer windows technician digital',
|
526 |
+
'theme-builder' => false,
|
527 |
+
'woo-builder' => false,
|
528 |
+
'off-canvas' => false,
|
529 |
+
'price' => $is_pro_active ? 'free' : 'free',
|
530 |
+
'priority' => 260,
|
531 |
+
],
|
532 |
+
],
|
533 |
+
'carwash' => [
|
534 |
+
'v1' => [
|
535 |
+
'name' => 'Carwash',
|
536 |
+
'pages' => 'home,about,services,contact,',
|
537 |
+
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
538 |
+
'tags' => 'vehicle car wash cleaning painting service maintenance care bike motorcycle detailing',
|
539 |
+
'theme-builder' => false,
|
540 |
+
'woo-builder' => false,
|
541 |
+
'off-canvas' => false,
|
542 |
+
'price' => $is_pro_active ? 'free' : 'free',
|
543 |
+
'priority' => 252,
|
544 |
+
],
|
545 |
+
],
|
546 |
+
'realestate' => [
|
547 |
+
'v1' => [
|
548 |
+
'name' => 'Real Estate',
|
549 |
+
'pages' => 'home,properties,about,services,faq,contact,',
|
550 |
+
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
551 |
+
'tags' => 'real estate agency company construction property rentals estate sales developers',
|
552 |
+
'theme-builder' => false,
|
553 |
+
'woo-builder' => false,
|
554 |
+
'off-canvas' => false,
|
555 |
+
'price' => $is_pro_active ? 'free' : 'pro',
|
556 |
+
'priority' => 270,
|
557 |
+
],
|
558 |
+
],
|
559 |
+
'restaurant' => [
|
560 |
+
'v1' => [
|
561 |
+
'name' => 'Restaurant',
|
562 |
+
'pages' => 'home,about,gallery,menu,contact,',
|
563 |
+
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
564 |
+
'tags' => 'restaurant fastfood slider hotel italian pizza pizzeria pasta dinner fast food wine recipe recipes cooking slider',
|
565 |
+
'theme-builder' => false,
|
566 |
+
'woo-builder' => false,
|
567 |
+
'off-canvas' => false,
|
568 |
+
'price' => $is_pro_active ? 'free' : 'free',
|
569 |
+
'priority' => 280,
|
570 |
+
],
|
571 |
+
],
|
572 |
+
'winebar' => [
|
573 |
+
'v1' => [
|
574 |
+
'name' => 'Wine Bar & Restaurant',
|
575 |
+
'pages' => 'home,story,wines,dishes,events,contact,',
|
576 |
+
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
577 |
+
'tags' => 'wine bar winery beer drink alcohol pub events dish wines italian restaurant food slider recipes cooking recipes slider',
|
578 |
+
'theme-builder' => false,
|
579 |
+
'woo-builder' => false,
|
580 |
+
'off-canvas' => false,
|
581 |
+
'price' => $is_pro_active ? 'free' : 'free',
|
582 |
+
'priority' => 290,
|
583 |
+
],
|
584 |
+
],
|
585 |
+
'wedding' => [
|
586 |
+
'v1' => [
|
587 |
+
'name' => 'Wedding',
|
588 |
+
'pages' => 'home,about,services,blog,gallery,contact,',
|
589 |
+
'plugins' => '{"contact-form-7":'. $is_cf7_active .'}',
|
590 |
+
'tags' => 'wedding party event slider invitation planner slider photography photographer',
|
591 |
+
'theme-builder' => false,
|
592 |
+
'woo-builder' => false,
|
593 |
+
'off-canvas' => false,
|
594 |
+
'price' => $is_pro_active ? 'free' : 'free',
|
595 |
+
'priority' => 300,
|
596 |
+
],
|
597 |
+
],
|
598 |
+
];
|
599 |
+
}
|
600 |
+
|
601 |
+
public static function get_available_blocks() {
|
602 |
+
return [
|
603 |
+
'grid' => [
|
604 |
+
'v1' => ['type' => 'iframe', 'url' => 'grid/v1/'],
|
605 |
+
'v2' => ['type' => 'iframe', 'url' => 'grid/v2/'],
|
606 |
+
'v3' => ['type' => 'iframe', 'url' => 'grid/v3/'],
|
607 |
+
'v4' => ['type' => 'iframe', 'url' => 'grid/v4/'],
|
608 |
+
'v5-pro' => ['type' => 'iframe', 'url' => 'grid/v5/'],
|
609 |
+
'v6-pro' => ['type' => 'iframe', 'url' => 'grid/v6/'],
|
610 |
+
'v7-pro' => ['type' => 'iframe', 'url' => 'grid/v7/'],
|
611 |
+
'v8-pro' => ['type' => 'iframe', 'url' => 'grid/v8/'],
|
612 |
+
'v9-pro' => ['type' => 'iframe', 'url' => 'grid/v9/'],
|
613 |
+
'v10-pro' => ['type' => 'iframe', 'url' => 'grid/v10/'],
|
614 |
+
'v11' => ['type' => 'iframe', 'url' => 'grid/v11/'],
|
615 |
+
'v12' => ['type' => 'iframe', 'url' => 'grid/v12/'],
|
616 |
+
'v13' => ['type' => 'iframe', 'url' => 'grid/v13/'],
|
617 |
+
'v14' => ['type' => 'iframe', 'url' => 'grid/v14/'],
|
618 |
+
],
|
619 |
+
'woo-grid' => [
|
620 |
+
'v1' => ['type' => 'iframe', 'url' => 'woocommerce-grid/v1/'],
|
621 |
+
'v2' => ['type' => 'iframe', 'url' => 'woocommerce-grid/v2/'],
|
622 |
+
'v3-pro' => ['type' => 'iframe', 'url' => 'woocommerce-grid/v3/'],
|
623 |
+
'v4-pro' => ['type' => 'iframe', 'url' => 'woocommerce-grid/v4/'],
|
624 |
+
'v5-pro' => ['type' => 'iframe', 'url' => 'woocommerce-grid/v5/'],
|
625 |
+
'v6-pro' => ['type' => 'iframe', 'url' => 'woocommerce-grid/v6/'],
|
626 |
+
'v7-pro' => ['type' => 'iframe', 'url' => 'woocommerce-grid/v7/'],
|
627 |
+
'v8-pro' => ['type' => 'iframe', 'url' => 'woocommerce-grid/v8/'],
|
628 |
+
'v9-pro' => ['type' => 'iframe', 'url' => 'woocommerce-grid/v9/'],
|
629 |
+
],
|
630 |
+
'media-grid' => [
|
631 |
+
'v1' => ['type' => 'iframe', 'url' => 'image-grid/v1/'],
|
632 |
+
'v2' => ['type' => 'iframe', 'url' => 'image-grid/v2/'],
|
633 |
+
],
|
634 |
+
'magazine-grid' => [
|
635 |
+
'v1' => ['type' => 'iframe', 'url' => 'magazine-grid/v1/'],
|
636 |
+
'v2' => ['type' => 'iframe', 'url' => 'magazine-grid/v2/'],
|
637 |
+
// 'v3' => ['type' => 'iframe', 'url' => 'magazine-grid/v3/', 'sub' => 'carousel'], <-- Keep as example
|
638 |
+
'v3-pro' => ['type' => 'iframe', 'url' => 'magazine-grid/v3/'],
|
639 |
+
'v4-pro' => ['type' => 'iframe', 'url' => 'magazine-grid/v4/'],
|
640 |
+
'v5-pro' => ['type' => 'iframe', 'url' => 'magazine-grid/v5/'],
|
641 |
+
'v6-pro' => ['type' => 'iframe', 'url' => 'magazine-grid/v6/'],
|
642 |
+
'v7-pro' => ['type' => 'iframe', 'url' => 'magazine-grid/v7/'],
|
643 |
+
'v8-pro' => ['type' => 'iframe', 'url' => 'magazine-grid/v8/'],
|
644 |
+
],
|
645 |
+
'advanced-slider' => [
|
646 |
+
'v1' => ['type' => 'iframe', 'url' => 'advanced-slider/v1/'],
|
647 |
+
'v2' => ['type' => 'iframe', 'url' => 'advanced-slider/v2/'],
|
648 |
+
'v3' => ['type' => 'iframe', 'url' => 'advanced-slider/v3/'],
|
649 |
+
'v4-pro' => ['type' => 'iframe', 'url' => 'advanced-slider/v4/'],
|
650 |
+
'v5-pro' => ['type' => 'iframe', 'url' => 'advanced-slider/v5/'],
|
651 |
+
'v6-pro' => ['type' => 'iframe', 'url' => 'advanced-slider/v6/'],
|
652 |
+
'v7-pro' => ['type' => 'iframe', 'url' => 'advanced-slider/v7/'],
|
653 |
+
'v8-pro' => ['type' => 'iframe', 'url' => 'advanced-slider/v8/'],
|
654 |
+
],
|
655 |
+
'posts-timeline' => [
|
656 |
+
'v1' => ['type' => 'iframe', 'url' => 'timeline/v1/'],
|
657 |
+
'v2' => ['type' => 'iframe', 'url' => 'timeline/v2/'],
|
658 |
+
'v3' => ['type' => 'iframe', 'url' => 'timeline/v3/'],
|
659 |
+
'v4' => ['type' => 'iframe', 'url' => 'timeline/v4/'],
|
660 |
+
'v5' => ['type' => 'iframe', 'url' => 'timeline/v5/'],
|
661 |
+
],
|
662 |
+
'testimonial' => [
|
663 |
+
'v1' => ['type' => 'iframe', 'url' => 'testimonial-slider/v1/'],
|
664 |
+
'v2' => ['type' => 'iframe', 'url' => 'testimonial-slider/v2/'],
|
665 |
+
'v3' => ['type' => 'iframe', 'url' => 'testimonial-slider/v3/'],
|
666 |
+
'v4' => ['type' => 'iframe', 'url' => 'testimonial-slider/v4/'],
|
667 |
+
'v5-pro' => ['type' => 'iframe', 'url' => 'testimonial-slider/v5/'],
|
668 |
+
'v6-pro' => ['type' => 'iframe', 'url' => 'testimonial-slider/v6/'],
|
669 |
+
'v7-pro' => ['type' => 'iframe', 'url' => 'testimonial-slider/v7/'],
|
670 |
+
'v8-pro' => ['type' => 'iframe', 'url' => 'testimonial-slider/v8/'],
|
671 |
+
'v9-pro' => ['type' => 'iframe', 'url' => 'testimonial-slider/v9/'],
|
672 |
+
],
|
673 |
+
'nav-menu' => [
|
674 |
+
'v1' => ['type' => 'iframe', 'url' => 'nav-menu/v1/'],
|
675 |
+
'v2' => ['type' => 'iframe', 'url' => 'nav-menu/v2/'],
|
676 |
+
'v3' => ['type' => 'iframe', 'url' => 'nav-menu/v3/'],
|
677 |
+
'v4' => ['type' => 'iframe', 'url' => 'nav-menu/v4/'],
|
678 |
+
'v5' => ['type' => 'iframe', 'url' => 'nav-menu/v5/'],
|
679 |
+
'v6' => ['type' => 'iframe', 'url' => 'nav-menu/v6/'],
|
680 |
+
],
|
681 |
+
'onepage-nav' => [
|
682 |
+
'v1' => ['type' => 'iframe', 'url' => 'one-page-navigation/v1/'],
|
683 |
+
'v2' => ['type' => 'iframe', 'url' => 'one-page-navigation/v2/'],
|
684 |
+
'v3' => ['type' => 'iframe', 'url' => 'one-page-navigation/v3/'],
|
685 |
+
'v4-pro' => ['type' => 'iframe', 'url' => 'one-page-navigation/v4/'],
|
686 |
+
],
|
687 |
+
'pricing-table' => [
|
688 |
+
'v1' => ['type' => 'iframe', 'url' => 'pricing-table/v1/'],
|
689 |
+
'v2' => ['type' => 'iframe', 'url' => 'pricing-table/v2/'],
|
690 |
+
'v3' => ['type' => 'iframe', 'url' => 'pricing-table/v3/'],
|
691 |
+
'v4' => ['type' => 'iframe', 'url' => 'pricing-table/v4/'],
|
692 |
+
'v5' => ['type' => 'iframe', 'url' => 'pricing-table/v5/'],
|
693 |
+
'v6-pro' => ['type' => 'iframe', 'url' => 'pricing-table/v6/'],
|
694 |
+
'v7-pro' => ['type' => 'iframe', 'url' => 'pricing-table/v7/'],
|
695 |
+
'v8-pro' => ['type' => 'iframe', 'url' => 'pricing-table/v8/'],
|
696 |
+
],
|
697 |
+
'content-toggle' => [
|
698 |
+
'v1' => ['type' => 'iframe', 'url' => 'content-toggle/v1/'],
|
699 |
+
'v2' => ['type' => 'iframe', 'url' => 'content-toggle/v2/'],
|
700 |
+
'v3-pro' => ['type' => 'iframe', 'url' => 'content-toggle/v3/'],
|
701 |
+
'v4-pro' => ['type' => 'iframe', 'url' => 'content-toggle/v4/'],
|
702 |
+
],
|
703 |
+
'data-table' => [
|
704 |
+
'v1' => ['type' => 'iframe', 'url' => 'data-table/v1/'],
|
705 |
+
'v2' => ['type' => 'iframe', 'url' => 'data-table/v2/'],
|
706 |
+
'v3' => ['type' => 'iframe', 'url' => 'data-table/v3/'],
|
707 |
+
'v4-pro' => ['type' => 'iframe', 'url' => 'data-table/v4/'],
|
708 |
+
'v5-pro' => ['type' => 'iframe', 'url' => 'data-table/v5/'],
|
709 |
+
'v6-pro' => ['type' => 'iframe', 'url' => 'data-table/v6/'],
|
710 |
+
'v7-pro' => ['type' => 'iframe', 'url' => 'data-table/v7/'],
|
711 |
+
'v8-pro' => ['type' => 'iframe', 'url' => 'data-table/v8/'],
|
712 |
+
],
|
713 |
+
'countdown' => [
|
714 |
+
'v1' => ['type' => 'iframe', 'url' => 'countdown/v1/'],
|
715 |
+
'v2' => ['type' => 'iframe', 'url' => 'countdown/v2/'],
|
716 |
+
'v3' => ['type' => 'iframe', 'url' => 'countdown/v3/'],
|
717 |
+
],
|
718 |
+
'progress-bar' => [
|
719 |
+
'v1' => ['type' => 'iframe', 'url' => 'progress-bar/v1/'],
|
720 |
+
'v2' => ['type' => 'iframe', 'url' => 'progress-bar/v2/'],
|
721 |
+
'v3' => ['type' => 'iframe', 'url' => 'progress-bar/v3/'],
|
722 |
+
],
|
723 |
+
'tabs' => [
|
724 |
+
'v1' => ['type' => 'iframe', 'url' => 'tabs/v1/'],
|
725 |
+
'v2' => ['type' => 'iframe', 'url' => 'tabs/v2/'],
|
726 |
+
'v3' => ['type' => 'iframe', 'url' => 'tabs/v3/'],
|
727 |
+
],
|
728 |
+
'advanced-text' => [
|
729 |
+
'v1' => ['type' => 'iframe', 'url' => 'advanced-text/v1/'],
|
730 |
+
'v2' => ['type' => 'iframe', 'url' => 'advanced-text/v2/'],
|
731 |
+
'v3' => ['type' => 'iframe', 'url' => 'advanced-text/v3/'],
|
732 |
+
'v4' => ['type' => 'iframe', 'url' => 'advanced-text/v4/'],
|
733 |
+
'v5' => ['type' => 'iframe', 'url' => 'advanced-text/v5/'],
|
734 |
+
'v6' => ['type' => 'iframe', 'url' => 'advanced-text/v6/'],
|
735 |
+
'v7-pro' => ['type' => 'iframe', 'url' => 'advanced-text/v7/'],
|
736 |
+
'v8-pro' => ['type' => 'iframe', 'url' => 'advanced-text/v8/'],
|
737 |
+
'v9-pro' => ['type' => 'iframe', 'url' => 'advanced-text/v9/'],
|
738 |
+
'v10-pro' => ['type' => 'iframe', 'url' => 'advanced-text/v10/'],
|
739 |
+
'v11-pro' => ['type' => 'iframe', 'url' => 'advanced-text/v11/'],
|
740 |
+
'v12-pro' => ['type' => 'iframe', 'url' => 'advanced-text/v12/'],
|
741 |
+
],
|
742 |
+
'flip-box' => [
|
743 |
+
'v1' => ['type' => 'iframe', 'url' => 'flip-box/v1/'],
|
744 |
+
'v2' => ['type' => 'iframe', 'url' => 'flip-box/v2/'],
|
745 |
+
'v3' => ['type' => 'iframe', 'url' => 'flip-box/v3/'],
|
746 |
+
'v4-pro' => ['type' => 'iframe', 'url' => 'flip-box/v4/'],
|
747 |
+
],
|
748 |
+
'promo-box' => [
|
749 |
+
'v1' => ['type' => 'iframe', 'url' => 'promo-box/v1/'],
|
750 |
+
'v2' => ['type' => 'iframe', 'url' => 'promo-box/v2/'],
|
751 |
+
'v3' => ['type' => 'iframe', 'url' => 'promo-box/v3/'],
|
752 |
+
'v4-pro' => ['type' => 'iframe', 'url' => 'promo-box/v4/'],
|
753 |
+
'v5-pro' => ['type' => 'iframe', 'url' => 'promo-box/v5/'],
|
754 |
+
'v6-pro' => ['type' => 'iframe', 'url' => 'promo-box/v6/'],
|
755 |
+
],
|
756 |
+
'before-after' => [
|
757 |
+
'v1' => ['type' => 'iframe', 'url' => 'before-and-after/v1/'],
|
758 |
+
'v2' => ['type' => 'iframe', 'url' => 'before-and-after/v2/'],
|
759 |
+
'v3' => ['type' => 'iframe', 'url' => 'before-and-after/v3/'],
|
760 |
+
],
|
761 |
+
'image-hotspots' => [
|
762 |
+
'v1' => ['type' => 'iframe', 'url' => 'image-hotspot/v1/'],
|
763 |
+
'v2' => ['type' => 'iframe', 'url' => 'image-hotspot/v2/'],
|
764 |
+
'v3' => ['type' => 'iframe', 'url' => 'image-hotspot/v3/'],
|
765 |
+
],
|
766 |
+
'forms' => [],
|
767 |
+
'mailchimp' => [
|
768 |
+
'v1' => ['type' => 'iframe', 'url' => 'mailchimp/v1/'],
|
769 |
+
'v2' => ['type' => 'iframe', 'url' => 'mailchimp/v2/'],
|
770 |
+
'v3' => ['type' => 'iframe', 'url' => 'mailchimp/v3/'],
|
771 |
+
'v4' => ['type' => 'iframe', 'url' => 'mailchimp/v4/'],
|
772 |
+
'v5' => ['type' => 'iframe', 'url' => 'mailchimp/v5/'],
|
773 |
+
'v6-pro' => ['type' => 'iframe', 'url' => 'mailchimp/v6/'],
|
774 |
+
'v7-pro' => ['type' => 'iframe', 'url' => 'mailchimp/v7/'],
|
775 |
+
'v8-pro' => ['type' => 'iframe', 'url' => 'mailchimp/v8/'],
|
776 |
+
],
|
777 |
+
'content-ticker' => [
|
778 |
+
'v1' => ['type' => 'iframe', 'url' => 'content-ticker/v1/'],
|
779 |
+
'v2' => ['type' => 'iframe', 'url' => 'content-ticker/v2/'],
|
780 |
+
'v3' => ['type' => 'iframe', 'url' => 'content-ticker/v3/'],
|
781 |
+
'v4-pro' => ['type' => 'iframe', 'url' => 'content-ticker/v4/'],
|
782 |
+
'v5-pro' => ['type' => 'iframe', 'url' => 'content-ticker/v5/'],
|
783 |
+
'v6-pro' => ['type' => 'iframe', 'url' => 'content-ticker/v6/'],
|
784 |
+
],
|
785 |
+
'button' => [
|
786 |
+
'v1' => ['type' => 'iframe', 'url' => 'button/v1/'],
|
787 |
+
'v2' => ['type' => 'iframe', 'url' => 'button/v2/'],
|
788 |
+
'v3' => ['type' => 'iframe', 'url' => 'button/v3/'],
|
789 |
+
'v4' => ['type' => 'iframe', 'url' => 'button/v4/'],
|
790 |
+
'v5' => ['type' => 'iframe', 'url' => 'button/v5/'],
|
791 |
+
],
|
792 |
+
'dual-button' => [
|
793 |
+
'v1' => ['type' => 'iframe', 'url' => 'dual-button/v1/'],
|
794 |
+
'v2' => ['type' => 'iframe', 'url' => 'dual-button/v2/'],
|
795 |
+
'v3' => ['type' => 'iframe', 'url' => 'dual-button/v3/'],
|
796 |
+
],
|
797 |
+
'team-member' => [
|
798 |
+
'v1' => ['type' => 'iframe', 'url' => 'team-member/v1/'],
|
799 |
+
'v2' => ['type' => 'iframe', 'url' => 'team-member/v2/'],
|
800 |
+
'v3' => ['type' => 'iframe', 'url' => 'team-member/v3/'],
|
801 |
+
'v4' => ['type' => 'iframe', 'url' => 'team-member/v4/'],
|
802 |
+
'v5' => ['type' => 'iframe', 'url' => 'team-member/v5/'],
|
803 |
+
'v6-pro' => ['type' => 'iframe', 'url' => 'team-member/v6/'],
|
804 |
+
'v7-pro' => ['type' => 'iframe', 'url' => 'team-member/v7/'],
|
805 |
+
'v8-pro' => ['type' => 'iframe', 'url' => 'team-member/v8/'],
|
806 |
+
],
|
807 |
+
'google-maps' => [
|
808 |
+
'v1' => ['type' => 'iframe', 'url' => 'google-map/v1/'],
|
809 |
+
'v2' => ['type' => 'iframe', 'url' => 'google-map/v2/'],
|
810 |
+
'v3' => ['type' => 'iframe', 'url' => 'google-map/v3/'],
|
811 |
+
'v4' => ['type' => 'iframe', 'url' => 'google-map/v4/'],
|
812 |
+
'v5' => ['type' => 'iframe', 'url' => 'google-map/v5/'],
|
813 |
+
],
|
814 |
+
'price-list' => [
|
815 |
+
'v1' => ['type' => 'iframe', 'url' => 'price-list/v1/'],
|
816 |
+
'v2' => ['type' => 'iframe', 'url' => 'price-list/v2/'],
|
817 |
+
'v3' => ['type' => 'iframe', 'url' => 'price-list/v3/'],
|
818 |
+
'v4-pro' => ['type' => 'iframe', 'url' => 'price-list/v4/'],
|
819 |
+
'v5-pro' => ['type' => 'iframe', 'url' => 'price-list/v5/'],
|
820 |
+
'v6-pro' => ['type' => 'iframe', 'url' => 'price-list/v6/'],
|
821 |
+
'v7-pro' => ['type' => 'iframe', 'url' => 'price-list/v7/'],
|
822 |
+
],
|
823 |
+
'business-hours' => [
|
824 |
+
'v1' => ['type' => 'iframe', 'url' => 'business-hours/v1/'],
|
825 |
+
'v2' => ['type' => 'iframe', 'url' => 'business-hours/v2/'],
|
826 |
+
'v3' => ['type' => 'iframe', 'url' => 'business-hours/v3/'],
|
827 |
+
],
|
828 |
+
'sharing-buttons' => [
|
829 |
+
'v1' => ['type' => 'iframe', 'url' => 'sharing-button/v1/'],
|
830 |
+
'v2' => ['type' => 'iframe', 'url' => 'sharing-button/v2/'],
|
831 |
+
'v3' => ['type' => 'iframe', 'url' => 'sharing-button/v3/'],
|
832 |
+
'v4-pro' => ['type' => 'iframe', 'url' => 'sharing-button/v4/'],
|
833 |
+
'v5-pro' => ['type' => 'iframe', 'url' => 'sharing-button/v5/'],
|
834 |
+
],
|
835 |
+
'logo' => [],
|
836 |
+
'search' => [
|
837 |
+
'v1' => ['type' => 'iframe', 'url' => 'search/v1/'],
|
838 |
+
'v2' => ['type' => 'iframe', 'url' => 'search/v2/'],
|
839 |
+
'v3' => ['type' => 'iframe', 'url' => 'search/v3/'],
|
840 |
+
],
|
841 |
+
'phone-call' => [],
|
842 |
+
'back-to-top' => [],
|
843 |
+
'lottie-animations' => [],
|
844 |
+
'popup-trigger' => [],
|
845 |
+
];
|
846 |
+
}
|
847 |
+
|
848 |
+
public static function get_available_popups() {
|
849 |
+
return [
|
850 |
+
// 'contact' => [
|
851 |
+
// 'v1' => ['type' => 'iframe', 'url' => 'search/v1/'],
|
852 |
+
// 'v2' => ['type' => 'iframe', 'url' => 'search/v2/'],
|
853 |
+
// 'v3' => ['type' => 'iframe', 'url' => 'search/v3/'],
|
854 |
+
// ],
|
855 |
+
'cookie' => [
|
856 |
+
'v1' => ['type' => 'image', 'url' => 'popups/cookie/v1-preview.jpg'],
|
857 |
+
'v2-pro' => ['type' => 'image', 'url' => 'popups/cookie/v2-pro-preview.jpg'],
|
858 |
+
'v3-pro' => ['type' => 'image', 'url' => 'popups/cookie/v3-pro-preview.jpg'],
|
859 |
+
'v4-pro' => ['type' => 'image', 'url' => 'popups/cookie/v4-pro-preview.jpg'],
|
860 |
+
],
|
861 |
+
'discount' => [
|
862 |
+
'v1' => ['type' => 'image', 'url' => 'popups/discount/v1-preview.jpg'],
|
863 |
+
'v2' => ['type' => 'image', 'url' => 'popups/discount/v2-preview.jpg'],
|
864 |
+
'v3-pro' => ['type' => 'image', 'url' => 'popups/discount/v3-pro-preview.jpg'],
|
865 |
+
'v4-pro' => ['type' => 'image', 'url' => 'popups/discount/v4-pro-preview.jpg'],
|
866 |
+
'v5' => ['type' => 'image', 'url' => 'popups/discount/v5-preview.jpg'],
|
867 |
+
'v6' => ['type' => 'image', 'url' => 'popups/discount/v6-preview.jpg'],
|
868 |
+
'v7-pro' => ['type' => 'image', 'url' => 'popups/discount/v7-pro-preview.jpg'],
|
869 |
+
'v8-pro' => ['type' => 'image', 'url' => 'popups/discount/v8-pro-preview.jpg'],
|
870 |
+
'v9' => ['type' => 'image', 'url' => 'popups/discount/v9-preview.jpg'],
|
871 |
+
'v10' => ['type' => 'image', 'url' => 'popups/discount/v10-preview.jpg'],
|
872 |
+
'v11-pro' => ['type' => 'image', 'url' => 'popups/discount/v11-pro-preview.jpg'],
|
873 |
+
'v12-pro' => ['type' => 'image', 'url' => 'popups/discount/v12-pro-preview.jpg'],
|
874 |
+
'v13-pro' => ['type' => 'image', 'url' => 'popups/discount/v13-pro-preview.jpg'],
|
875 |
+
'v14' => ['type' => 'image', 'url' => 'popups/discount/v14-preview.jpg'],
|
876 |
+
'v15' => ['type' => 'image', 'url' => 'popups/discount/v15-preview.jpg'],
|
877 |
+
'v16-pro' => ['type' => 'image', 'url' => 'popups/discount/v16-pro-preview.jpg'],
|
878 |
+
],
|
879 |
+
'subscribe' => [
|
880 |
+
'v1-pro' => ['type' => 'image', 'url' => 'popups/subscribe/v1-pro-preview.jpg'],
|
881 |
+
'v2-pro' => ['type' => 'image', 'url' => 'popups/subscribe/v2-pro-preview.jpg'],
|
882 |
+
'v3-pro' => ['type' => 'image', 'url' => 'popups/subscribe/v3-pro-preview.jpg'],
|
883 |
+
],
|
884 |
+
'yesno' => [
|
885 |
+
'v1-pro' => ['type' => 'image', 'url' => 'popups/yesno/v1-pro-preview.jpg'],
|
886 |
+
'v2-pro' => ['type' => 'image', 'url' => 'popups/yesno/v2-pro-preview.jpg'],
|
887 |
+
'v3-pro' => ['type' => 'image', 'url' => 'popups/yesno/v3-pro-preview.jpg'],
|
888 |
+
],
|
889 |
+
];
|
890 |
+
}
|
891 |
}
|
admin/templates/wpr-templates-library-blocks.php
CHANGED
@@ -1,167 +1,167 @@
|
|
1 |
-
<?php
|
2 |
-
namespace WprAddons\Admin\Templates;
|
3 |
-
use WprAddons\Classes\Utilities;
|
4 |
-
use WprAddons\Admin\Templates\WPR_Templates_Data;
|
5 |
-
|
6 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
7 |
-
exit; // Exit if accessed directly.
|
8 |
-
}
|
9 |
-
|
10 |
-
/**
|
11 |
-
* WPR_Templates_Library_Blocks setup
|
12 |
-
*
|
13 |
-
* @since 1.0
|
14 |
-
*/
|
15 |
-
class WPR_Templates_Library_Blocks {
|
16 |
-
|
17 |
-
/**
|
18 |
-
** Constructor
|
19 |
-
*/
|
20 |
-
public function __construct() {
|
21 |
-
|
22 |
-
// Template Library Popup
|
23 |
-
add_action( 'wp_ajax_render_library_templates_blocks', [ $this, 'render_library_templates_blocks' ] );
|
24 |
-
|
25 |
-
}
|
26 |
-
|
27 |
-
/**
|
28 |
-
** Template Library Popup
|
29 |
-
*/
|
30 |
-
public static function render_library_templates_blocks() {
|
31 |
-
|
32 |
-
?>
|
33 |
-
|
34 |
-
<div class="wpr-tplib-sidebar">
|
35 |
-
<div class="wpr-tplib-search">
|
36 |
-
<input type="text" placeholder="Search Template">
|
37 |
-
<i class="eicon-search"></i>
|
38 |
-
</div>
|
39 |
-
|
40 |
-
<div class="wpr-tplib-filters-wrap">
|
41 |
-
<div class="wpr-tplib-filters">
|
42 |
-
<h3>
|
43 |
-
<span data-filter="all"><?php esc_html_e( 'Category', 'wpr-addons' ); ?></span>
|
44 |
-
<i class="fas fa-angle-down"></i>
|
45 |
-
</h3>
|
46 |
-
|
47 |
-
<div class="wpr-tplib-filters-list">
|
48 |
-
<ul>
|
49 |
-
|
50 |
-
<li data-filter="all"><?php esc_html_e( 'All', 'wpr-addons' ) ?></li>
|
51 |
-
|
52 |
-
<?php
|
53 |
-
|
54 |
-
$modules = Utilities::get_available_modules( Utilities::get_registered_modules() );
|
55 |
-
|
56 |
-
$exclude_widgets = [
|
57 |
-
'logo',
|
58 |
-
'mega-menu',
|
59 |
-
'forms',
|
60 |
-
'phone-call',
|
61 |
-
'back-to-top',
|
62 |
-
'popup-trigger',
|
63 |
-
'lottie-animations',
|
64 |
-
'taxonomy-list',
|
65 |
-
'page-list',
|
66 |
-
'elementor-template',
|
67 |
-
'flip-carousel',
|
68 |
-
'feature-list',
|
69 |
-
'dual-color-heading',
|
70 |
-
'reading-progress-bar',
|
71 |
-
'image-accordion',
|
72 |
-
'advanced-accordion',
|
73 |
-
'charts',
|
74 |
-
];
|
75 |
-
|
76 |
-
foreach ($modules as $title => $slug) {
|
77 |
-
if ( ! in_array($slug[0], $exclude_widgets) ) {
|
78 |
-
echo '<li data-filter="'. esc_attr($slug[0]) .'">'. esc_html($title) .'</li>';
|
79 |
-
}
|
80 |
-
}
|
81 |
-
|
82 |
-
?>
|
83 |
-
</ul>
|
84 |
-
</div>
|
85 |
-
</div>
|
86 |
-
|
87 |
-
<div class="wpr-tplib-sub-filters">
|
88 |
-
<ul>
|
89 |
-
<li data-sub-filter="all" class="wpr-tplib-activ-filter"><?php esc_html_e( 'All', 'wpr-addons' ); ?></li>
|
90 |
-
<li data-sub-filter="grid"><?php esc_html_e( 'Grid', 'wpr-addons' ) ?></li>
|
91 |
-
<li data-sub-filter="slider"><?php esc_html_e( 'Slider', 'wpr-addons' ) ?></li>
|
92 |
-
<li data-sub-filter="carousel"><?php esc_html_e( 'Carousel', 'wpr-addons' ) ?></li>
|
93 |
-
</ul>
|
94 |
-
</div>
|
95 |
-
</div>
|
96 |
-
</div>
|
97 |
-
|
98 |
-
<div class="wpr-tplib-template-gird elementor-clearfix">
|
99 |
-
<div class="wpr-tplib-template-gird-inner">
|
100 |
-
|
101 |
-
<?php
|
102 |
-
|
103 |
-
foreach ($modules as $title => $data) :
|
104 |
-
$module_slug = $data[0];
|
105 |
-
$blocks = WPR_Templates_Data::get_available_blocks();
|
106 |
-
|
107 |
-
if ( !isset($blocks[$module_slug]) ) {
|
108 |
-
continue;
|
109 |
-
}
|
110 |
-
|
111 |
-
for ( $i=0; $i < count($blocks[$module_slug]); $i++ ) :
|
112 |
-
|
113 |
-
$template_slug = array_keys($blocks[$module_slug])[$i];
|
114 |
-
$template_sub = isset($blocks[$module_slug][$template_slug]['sub']) ? $blocks[$module_slug][$template_slug]['sub'] : '';
|
115 |
-
$template_title = $title .' '. $template_slug;
|
116 |
-
$preview_type = $blocks[$module_slug][$template_slug]['type'];
|
117 |
-
$preview_url = $blocks[$module_slug][$template_slug]['url'];
|
118 |
-
$template_class = (strpos($template_slug, 'pro') && !wpr_fs()->can_use_premium_code()) || (strpos($template_slug, 'zzz') && !wpr_fs()->can_use_premium_code()) ? ' wpr-tplib-pro-wrap' : '';
|
119 |
-
|
120 |
-
if (defined('WPR_ADDONS_PRO_VERSION') && wpr_fs()->can_use_premium_code()) {
|
121 |
-
$template_class .= ' wpr-tplib-pro-active';
|
122 |
-
}
|
123 |
-
|
124 |
-
$template_slug_for_image = strpos($template_slug, 'zzz') ? substr($template_slug, 0, -4) : $template_slug;
|
125 |
-
|
126 |
-
?>
|
127 |
-
|
128 |
-
<div class="wpr-tplib-template-wrap<?php echo esc_attr($template_class); ?>">
|
129 |
-
<div class="wpr-tplib-template" data-slug="<?php echo esc_attr($template_slug); ?>" data-filter="<?php echo esc_attr($module_slug); ?>" data-sub-filter="<?php echo esc_attr($template_sub); ?>" data-preview-type="<?php echo esc_attr($preview_type); ?>" data-preview-url="<?php echo esc_attr($preview_url); ?>">
|
130 |
-
<div class="wpr-tplib-template-media">
|
131 |
-
<img src="<?php echo esc_url('https://royal-elementor-addons.com/library/premade-styles/'. $module_slug .'/'. $template_slug_for_image .'.jpg'); ?>">
|
132 |
-
<div class="wpr-tplib-template-media-overlay">
|
133 |
-
<i class="eicon-eye"></i>
|
134 |
-
</div>
|
135 |
-
</div>
|
136 |
-
<div class="wpr-tplib-template-footer elementor-clearfix">
|
137 |
-
<?php if ( !defined('WPR_ADDONS_PRO_VERSION') && ! wpr_fs()->can_use_premium_code() ) : ?>
|
138 |
-
<h3><?php echo strpos($template_slug, 'pro') ? esc_html(str_replace('-pro', ' Pro', $template_title)) : esc_html(str_replace('-zzz', ' Pro', $template_title)); ?></h3>
|
139 |
-
<?php else : ?>
|
140 |
-
<h3><?php echo strpos($template_slug, 'pro') ? esc_html(str_replace('-pro', '', $template_title)) : esc_html(str_replace('-zzz', '', $template_title)); ?></h3>
|
141 |
-
<?php endif; ?>
|
142 |
-
|
143 |
-
<?php if ( ( strpos($template_slug, 'pro') && !wpr_fs()->can_use_premium_code() ) || ( strpos($template_slug, 'zzz') ) && !wpr_fs()->can_use_premium_code() ) : ?>
|
144 |
-
<span class="wpr-tplib-insert-template wpr-tplib-insert-pro"><i class="eicon-star"></i> <span><?php esc_html_e( 'Go Pro', 'wpr-addons' ); ?></span></span>
|
145 |
-
<?php else : ?>
|
146 |
-
<span class="wpr-tplib-insert-template"><i class="eicon-file-download"></i> <span><?php esc_html_e( 'Insert', 'wpr-addons' ); ?></span></span>
|
147 |
-
<?php endif; ?>
|
148 |
-
</div>
|
149 |
-
</div>
|
150 |
-
</div>
|
151 |
-
|
152 |
-
<?php endfor; ?>
|
153 |
-
<?php endforeach;?>
|
154 |
-
|
155 |
-
</div>
|
156 |
-
</div>
|
157 |
-
|
158 |
-
<?php
|
159 |
-
|
160 |
-
$current_screen = get_current_screen();
|
161 |
-
|
162 |
-
if ( !(isset($current_screen) && 'royal-addons_page_wpr-premade-blocks' === $current_screen->id) ) {
|
163 |
-
exit;
|
164 |
-
}
|
165 |
-
}
|
166 |
-
|
167 |
-
}
|
1 |
+
<?php
|
2 |
+
namespace WprAddons\Admin\Templates;
|
3 |
+
use WprAddons\Classes\Utilities;
|
4 |
+
use WprAddons\Admin\Templates\WPR_Templates_Data;
|
5 |
+
|
6 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
7 |
+
exit; // Exit if accessed directly.
|
8 |
+
}
|
9 |
+
|
10 |
+
/**
|
11 |
+
* WPR_Templates_Library_Blocks setup
|
12 |
+
*
|
13 |
+
* @since 1.0
|
14 |
+
*/
|
15 |
+
class WPR_Templates_Library_Blocks {
|
16 |
+
|
17 |
+
/**
|
18 |
+
** Constructor
|
19 |
+
*/
|
20 |
+
public function __construct() {
|
21 |
+
|
22 |
+
// Template Library Popup
|
23 |
+
add_action( 'wp_ajax_render_library_templates_blocks', [ $this, 'render_library_templates_blocks' ] );
|
24 |
+
|
25 |
+
}
|
26 |
+
|
27 |
+
/**
|
28 |
+
** Template Library Popup
|
29 |
+
*/
|
30 |
+
public static function render_library_templates_blocks() {
|
31 |
+
|
32 |
+
?>
|
33 |
+
|
34 |
+
<div class="wpr-tplib-sidebar">
|
35 |
+
<div class="wpr-tplib-search">
|
36 |
+
<input type="text" placeholder="Search Template">
|
37 |
+
<i class="eicon-search"></i>
|
38 |
+
</div>
|
39 |
+
|
40 |
+
<div class="wpr-tplib-filters-wrap">
|
41 |
+
<div class="wpr-tplib-filters">
|
42 |
+
<h3>
|
43 |
+
<span data-filter="all"><?php esc_html_e( 'Category', 'wpr-addons' ); ?></span>
|
44 |
+
<i class="fas fa-angle-down"></i>
|
45 |
+
</h3>
|
46 |
+
|
47 |
+
<div class="wpr-tplib-filters-list">
|
48 |
+
<ul>
|
49 |
+
|
50 |
+
<li data-filter="all"><?php esc_html_e( 'All', 'wpr-addons' ) ?></li>
|
51 |
+
|
52 |
+
<?php
|
53 |
+
|
54 |
+
$modules = Utilities::get_available_modules( Utilities::get_registered_modules() );
|
55 |
+
|
56 |
+
$exclude_widgets = [
|
57 |
+
'logo',
|
58 |
+
'mega-menu',
|
59 |
+
'forms',
|
60 |
+
'phone-call',
|
61 |
+
'back-to-top',
|
62 |
+
'popup-trigger',
|
63 |
+
'lottie-animations',
|
64 |
+
'taxonomy-list',
|
65 |
+
'page-list',
|
66 |
+
'elementor-template',
|
67 |
+
'flip-carousel',
|
68 |
+
'feature-list',
|
69 |
+
'dual-color-heading',
|
70 |
+
'reading-progress-bar',
|
71 |
+
'image-accordion',
|
72 |
+
'advanced-accordion',
|
73 |
+
'charts',
|
74 |
+
];
|
75 |
+
|
76 |
+
foreach ($modules as $title => $slug) {
|
77 |
+
if ( ! in_array($slug[0], $exclude_widgets) ) {
|
78 |
+
echo '<li data-filter="'. esc_attr($slug[0]) .'">'. esc_html($title) .'</li>';
|
79 |
+
}
|
80 |
+
}
|
81 |
+
|
82 |
+
?>
|
83 |
+
</ul>
|
84 |
+
</div>
|
85 |
+
</div>
|
86 |
+
|
87 |
+
<div class="wpr-tplib-sub-filters">
|
88 |
+
<ul>
|
89 |
+
<li data-sub-filter="all" class="wpr-tplib-activ-filter"><?php esc_html_e( 'All', 'wpr-addons' ); ?></li>
|
90 |
+
<li data-sub-filter="grid"><?php esc_html_e( 'Grid', 'wpr-addons' ) ?></li>
|
91 |
+
<li data-sub-filter="slider"><?php esc_html_e( 'Slider', 'wpr-addons' ) ?></li>
|
92 |
+
<li data-sub-filter="carousel"><?php esc_html_e( 'Carousel', 'wpr-addons' ) ?></li>
|
93 |
+
</ul>
|
94 |
+
</div>
|
95 |
+
</div>
|
96 |
+
</div>
|
97 |
+
|
98 |
+
<div class="wpr-tplib-template-gird elementor-clearfix">
|
99 |
+
<div class="wpr-tplib-template-gird-inner">
|
100 |
+
|
101 |
+
<?php
|
102 |
+
|
103 |
+
foreach ($modules as $title => $data) :
|
104 |
+
$module_slug = $data[0];
|
105 |
+
$blocks = WPR_Templates_Data::get_available_blocks();
|
106 |
+
|
107 |
+
if ( !isset($blocks[$module_slug]) ) {
|
108 |
+
continue;
|
109 |
+
}
|
110 |
+
|
111 |
+
for ( $i=0; $i < count($blocks[$module_slug]); $i++ ) :
|
112 |
+
|
113 |
+
$template_slug = array_keys($blocks[$module_slug])[$i];
|
114 |
+
$template_sub = isset($blocks[$module_slug][$template_slug]['sub']) ? $blocks[$module_slug][$template_slug]['sub'] : '';
|
115 |
+
$template_title = $title .' '. $template_slug;
|
116 |
+
$preview_type = $blocks[$module_slug][$template_slug]['type'];
|
117 |
+
$preview_url = $blocks[$module_slug][$template_slug]['url'];
|
118 |
+
$template_class = (strpos($template_slug, 'pro') && !wpr_fs()->can_use_premium_code()) || (strpos($template_slug, 'zzz') && !wpr_fs()->can_use_premium_code()) ? ' wpr-tplib-pro-wrap' : '';
|
119 |
+
|
120 |
+
if (defined('WPR_ADDONS_PRO_VERSION') && wpr_fs()->can_use_premium_code()) {
|
121 |
+
$template_class .= ' wpr-tplib-pro-active';
|
122 |
+
}
|
123 |
+
|
124 |
+
$template_slug_for_image = strpos($template_slug, 'zzz') ? substr($template_slug, 0, -4) : $template_slug;
|
125 |
+
|
126 |
+
?>
|
127 |
+
|
128 |
+
<div class="wpr-tplib-template-wrap<?php echo esc_attr($template_class); ?>">
|
129 |
+
<div class="wpr-tplib-template" data-slug="<?php echo esc_attr($template_slug); ?>" data-filter="<?php echo esc_attr($module_slug); ?>" data-sub-filter="<?php echo esc_attr($template_sub); ?>" data-preview-type="<?php echo esc_attr($preview_type); ?>" data-preview-url="<?php echo esc_attr($preview_url); ?>">
|
130 |
+
<div class="wpr-tplib-template-media">
|
131 |
+
<img src="<?php echo esc_url('https://royal-elementor-addons.com/library/premade-styles/'. $module_slug .'/'. $template_slug_for_image .'.jpg'); ?>">
|
132 |
+
<div class="wpr-tplib-template-media-overlay">
|
133 |
+
<i class="eicon-eye"></i>
|
134 |
+
</div>
|
135 |
+
</div>
|
136 |
+
<div class="wpr-tplib-template-footer elementor-clearfix">
|
137 |
+
<?php if ( !defined('WPR_ADDONS_PRO_VERSION') && ! wpr_fs()->can_use_premium_code() ) : ?>
|
138 |
+
<h3><?php echo strpos($template_slug, 'pro') ? esc_html(str_replace('-pro', ' Pro', $template_title)) : esc_html(str_replace('-zzz', ' Pro', $template_title)); ?></h3>
|
139 |
+
<?php else : ?>
|
140 |
+
<h3><?php echo strpos($template_slug, 'pro') ? esc_html(str_replace('-pro', '', $template_title)) : esc_html(str_replace('-zzz', '', $template_title)); ?></h3>
|
141 |
+
<?php endif; ?>
|
142 |
+
|
143 |
+
<?php if ( ( strpos($template_slug, 'pro') && !wpr_fs()->can_use_premium_code() ) || ( strpos($template_slug, 'zzz') ) && !wpr_fs()->can_use_premium_code() ) : ?>
|
144 |
+
<span class="wpr-tplib-insert-template wpr-tplib-insert-pro"><i class="eicon-star"></i> <span><?php esc_html_e( 'Go Pro', 'wpr-addons' ); ?></span></span>
|
145 |
+
<?php else : ?>
|
146 |
+
<span class="wpr-tplib-insert-template"><i class="eicon-file-download"></i> <span><?php esc_html_e( 'Insert', 'wpr-addons' ); ?></span></span>
|
147 |
+
<?php endif; ?>
|
148 |
+
</div>
|
149 |
+
</div>
|
150 |
+
</div>
|
151 |
+
|
152 |
+
<?php endfor; ?>
|
153 |
+
<?php endforeach;?>
|
154 |
+
|
155 |
+
</div>
|
156 |
+
</div>
|
157 |
+
|
158 |
+
<?php
|
159 |
+
|
160 |
+
$current_screen = get_current_screen();
|
161 |
+
|
162 |
+
if ( !(isset($current_screen) && 'royal-addons_page_wpr-premade-blocks' === $current_screen->id) ) {
|
163 |
+
exit;
|
164 |
+
}
|
165 |
+
}
|
166 |
+
|
167 |
+
}
|
admin/templates/wpr-templates-library-pages.php
ADDED
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace WprAddons\Admin\Templates;
|
3 |
+
use WprAddons\Classes\Utilities;
|
4 |
+
use WprAddons\Admin\Templates\WPR_Templates_Data;
|
5 |
+
|
6 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
7 |
+
exit; // Exit if accessed directly.
|
8 |
+
}
|
9 |
+
|
10 |
+
/**
|
11 |
+
* WPR_Templates_Library_Pages setup
|
12 |
+
*
|
13 |
+
* @since 1.0
|
14 |
+
*/
|
15 |
+
class WPR_Templates_Library_Pages {
|
16 |
+
|
17 |
+
/**
|
18 |
+
** Constructor
|
19 |
+
*/
|
20 |
+
public function __construct() {
|
21 |
+
|
22 |
+
// Template Library Popup
|
23 |
+
add_action( 'wp_ajax_render_library_templates_pages', [ $this, 'render_library_templates_pages' ] );
|
24 |
+
|
25 |
+
}
|
26 |
+
|
27 |
+
/**
|
28 |
+
** Template Library Popup
|
29 |
+
*/
|
30 |
+
public static function render_library_templates_pages() {
|
31 |
+
$kits = WPR_Templates_Data::get_available_kits_for_pages();
|
32 |
+
|
33 |
+
?>
|
34 |
+
|
35 |
+
<div class="wpr-tplib-template-gird elementor-clearfix">
|
36 |
+
<div class="wpr-tplib-template-gird-inner">
|
37 |
+
|
38 |
+
<?php
|
39 |
+
|
40 |
+
foreach( $kits as $kit => $data ) :
|
41 |
+
|
42 |
+
$template_title = $data['name'];
|
43 |
+
$template_class = ('pro' === $data['price'] && !wpr_fs()->can_use_premium_code()) ? ' wpr-tplib-pro-wrap' : '';
|
44 |
+
|
45 |
+
foreach( $data['pages'] as $page ) :
|
46 |
+
|
47 |
+
?>
|
48 |
+
|
49 |
+
<div class="wpr-tplib-template-wrap<?php echo esc_attr($template_class); ?>">
|
50 |
+
<div class="wpr-tplib-template" data-slug="<?php echo esc_attr($page); ?>" data-kit="<?php echo esc_attr($kit); ?>">
|
51 |
+
<div class="wpr-tplib-template-media">
|
52 |
+
<img src="<?php echo esc_url('https://royal-elementor-addons.com/library/templates-kit/'. $kit .'/'. $page .'.jpg'); ?>">
|
53 |
+
<div class="wpr-tplib-template-media-overlay">
|
54 |
+
<i class="eicon-eye"></i>
|
55 |
+
</div>
|
56 |
+
</div>
|
57 |
+
<div class="wpr-tplib-template-footer elementor-clearfix">
|
58 |
+
<h3><?php echo esc_html($template_title .' - '. ucwords($page)); ?></h3>
|
59 |
+
|
60 |
+
<?php if ( 'pro' === $data['price'] && !wpr_fs()->can_use_premium_code() ) : ?>
|
61 |
+
<span class="wpr-tplib-insert-template wpr-tplib-insert-pro"><i class="eicon-star"></i> <span><?php esc_html_e( 'Go Pro', 'wpr-addons' ); ?></span></span>
|
62 |
+
<?php else : ?>
|
63 |
+
<span class="wpr-tplib-insert-template"><i class="eicon-file-download"></i> <span><?php esc_html_e( 'Insert', 'wpr-addons' ); ?></span></span>
|
64 |
+
<?php endif; ?>
|
65 |
+
</div>
|
66 |
+
</div>
|
67 |
+
</div>
|
68 |
+
|
69 |
+
<?php endforeach; ?>
|
70 |
+
|
71 |
+
<?php endforeach; ?>
|
72 |
+
|
73 |
+
</div>
|
74 |
+
</div>
|
75 |
+
|
76 |
+
<?php
|
77 |
+
|
78 |
+
wp_die();
|
79 |
+
}
|
80 |
+
|
81 |
+
}
|
admin/templates/wpr-templates-library-popups.php
CHANGED
@@ -1,109 +1,109 @@
|
|
1 |
-
<?php
|
2 |
-
namespace WprAddons\Admin\Templates;
|
3 |
-
use WprAddons\Classes\Utilities;
|
4 |
-
use WprAddons\Admin\Templates\WPR_Templates_Data;
|
5 |
-
|
6 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
7 |
-
exit; // Exit if accessed directly.
|
8 |
-
}
|
9 |
-
|
10 |
-
/**
|
11 |
-
* WPR_Templates_Library_Popups setup
|
12 |
-
*
|
13 |
-
* @since 1.0
|
14 |
-
*/
|
15 |
-
class WPR_Templates_Library_Popups {
|
16 |
-
|
17 |
-
/**
|
18 |
-
** Constructor
|
19 |
-
*/
|
20 |
-
public function __construct() {
|
21 |
-
|
22 |
-
// Template Library Popup
|
23 |
-
add_action( 'wp_ajax_render_library_templates_popups', [ $this, 'render_library_templates_popups' ] );
|
24 |
-
|
25 |
-
}
|
26 |
-
|
27 |
-
/**
|
28 |
-
** Template Library Popup
|
29 |
-
*/
|
30 |
-
public function render_library_templates_popups() {
|
31 |
-
|
32 |
-
?>
|
33 |
-
|
34 |
-
<div class="wpr-tplib-sidebar">
|
35 |
-
<div class="wpr-tplib-search">
|
36 |
-
<input type="text" placeholder="Search Template">
|
37 |
-
<i class="eicon-search"></i>
|
38 |
-
</div>
|
39 |
-
|
40 |
-
<div class="wpr-tplib-filters-wrap">
|
41 |
-
<div class="wpr-tplib-filters">
|
42 |
-
<h3>
|
43 |
-
<span><?php esc_html_e( 'Category', 'wpr-addons' ); ?></span>
|
44 |
-
<i class="fas fa-angle-down"></i>
|
45 |
-
</h3>
|
46 |
-
|
47 |
-
<div class="wpr-tplib-filters-list">
|
48 |
-
<ul>
|
49 |
-
<li data-filter="all"><?php esc_html_e( 'All', 'wpr-addons' ) ?></li>
|
50 |
-
<li data-filter="cookie"><?php esc_html_e( 'Cookie', 'wpr-addons' ) ?></li>
|
51 |
-
<li data-filter="discount"><?php esc_html_e( 'Discount', 'wpr-addons' ) ?></li>
|
52 |
-
<li data-filter="subscribe"><?php esc_html_e( 'Subscribe', 'wpr-addons' ) ?></li>
|
53 |
-
<li data-filter="yesno"><?php esc_html_e( 'Yes/No', 'wpr-addons' ) ?></li>
|
54 |
-
</ul>
|
55 |
-
</div>
|
56 |
-
</div>
|
57 |
-
</div>
|
58 |
-
|
59 |
-
</div>
|
60 |
-
|
61 |
-
<div class="wpr-tplib-template-gird elementor-clearfix">
|
62 |
-
<div class="wpr-tplib-template-gird-inner">
|
63 |
-
|
64 |
-
<?php
|
65 |
-
|
66 |
-
$popups = WPR_Templates_Data::get_available_popups();
|
67 |
-
|
68 |
-
foreach ($popups as $type => $data) :
|
69 |
-
|
70 |
-
for ( $i=0; $i < count($popups[$type]); $i++ ) :
|
71 |
-
|
72 |
-
$template_slug = array_keys($popups[$type])[$i];
|
73 |
-
$template_title = ucfirst($type) .' '. $template_slug;
|
74 |
-
$preview_type = $popups[$type][$template_slug]['type'];
|
75 |
-
$preview_url = $popups[$type][$template_slug]['url'];
|
76 |
-
$template_class = ( strpos($template_slug, 'pro') && ! wpr_fs()->can_use_premium_code() ) ? ' wpr-tplib-pro-wrap' : '';
|
77 |
-
|
78 |
-
?>
|
79 |
-
|
80 |
-
<div class="wpr-tplib-template-wrap<?php echo esc_attr($template_class); ?>">
|
81 |
-
<div class="wpr-tplib-template" data-slug="<?php echo esc_attr($template_slug); ?>" data-filter="<?php echo esc_attr($type); ?>" data-preview-type="<?php echo esc_attr($preview_type); ?>" data-preview-url="<?php echo esc_attr($preview_url); ?>">
|
82 |
-
<div class="wpr-tplib-template-media">
|
83 |
-
<img src="<?php echo esc_url('https://royal-elementor-addons.com/library/premade-styles/popups/'. $type .'/'. $template_slug .'.jpg'); ?>">
|
84 |
-
<div class="wpr-tplib-template-media-overlay">
|
85 |
-
<i class="eicon-eye"></i>
|
86 |
-
</div>
|
87 |
-
</div>
|
88 |
-
<div class="wpr-tplib-template-footer elementor-clearfix">
|
89 |
-
<h3><?php echo esc_html(str_replace('-pro', ' Pro', $template_title)); ?></h3>
|
90 |
-
|
91 |
-
<?php if ( strpos($template_slug, 'pro') && ! wpr_fs()->can_use_premium_code() ) : ?>
|
92 |
-
<span class="wpr-tplib-insert-template wpr-tplib-insert-pro"><i class="eicon-star"></i> <span><?php esc_html_e( 'Go Pro', 'wpr-addons' ); ?></span></span>
|
93 |
-
<?php else : ?>
|
94 |
-
<span class="wpr-tplib-insert-template"><i class="eicon-file-download"></i> <span><?php esc_html_e( 'Insert', 'wpr-addons' ); ?></span></span>
|
95 |
-
<?php endif; ?>
|
96 |
-
</div>
|
97 |
-
</div>
|
98 |
-
</div>
|
99 |
-
|
100 |
-
<?php endfor; ?>
|
101 |
-
<?php endforeach; ?>
|
102 |
-
|
103 |
-
</div>
|
104 |
-
</div>
|
105 |
-
|
106 |
-
<?php exit();
|
107 |
-
}
|
108 |
-
|
109 |
}
|
1 |
+
<?php
|
2 |
+
namespace WprAddons\Admin\Templates;
|
3 |
+
use WprAddons\Classes\Utilities;
|
4 |
+
use WprAddons\Admin\Templates\WPR_Templates_Data;
|
5 |
+
|
6 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
7 |
+
exit; // Exit if accessed directly.
|
8 |
+
}
|
9 |
+
|
10 |
+
/**
|
11 |
+
* WPR_Templates_Library_Popups setup
|
12 |
+
*
|
13 |
+
* @since 1.0
|
14 |
+
*/
|
15 |
+
class WPR_Templates_Library_Popups {
|
16 |
+
|
17 |
+
/**
|
18 |
+
** Constructor
|
19 |
+
*/
|
20 |
+
public function __construct() {
|
21 |
+
|
22 |
+
// Template Library Popup
|
23 |
+
add_action( 'wp_ajax_render_library_templates_popups', [ $this, 'render_library_templates_popups' ] );
|
24 |
+
|
25 |
+
}
|
26 |
+
|
27 |
+
/**
|
28 |
+
** Template Library Popup
|
29 |
+
*/
|
30 |
+
public function render_library_templates_popups() {
|
31 |
+
|
32 |
+
?>
|
33 |
+
|
34 |
+
<div class="wpr-tplib-sidebar">
|
35 |
+
<div class="wpr-tplib-search">
|
36 |
+
<input type="text" placeholder="Search Template">
|
37 |
+
<i class="eicon-search"></i>
|
38 |
+
</div>
|
39 |
+
|
40 |
+
<div class="wpr-tplib-filters-wrap">
|
41 |
+
<div class="wpr-tplib-filters">
|
42 |
+
<h3>
|
43 |
+
<span><?php esc_html_e( 'Category', 'wpr-addons' ); ?></span>
|
44 |
+
<i class="fas fa-angle-down"></i>
|
45 |
+
</h3>
|
46 |
+
|
47 |
+
<div class="wpr-tplib-filters-list">
|
48 |
+
<ul>
|
49 |
+
<li data-filter="all"><?php esc_html_e( 'All', 'wpr-addons' ) ?></li>
|
50 |
+
<li data-filter="cookie"><?php esc_html_e( 'Cookie', 'wpr-addons' ) ?></li>
|
51 |
+
<li data-filter="discount"><?php esc_html_e( 'Discount', 'wpr-addons' ) ?></li>
|
52 |
+
<li data-filter="subscribe"><?php esc_html_e( 'Subscribe', 'wpr-addons' ) ?></li>
|
53 |
+
<li data-filter="yesno"><?php esc_html_e( 'Yes/No', 'wpr-addons' ) ?></li>
|
54 |
+
</ul>
|
55 |
+
</div>
|
56 |
+
</div>
|
57 |
+
</div>
|
58 |
+
|
59 |
+
</div>
|
60 |
+
|
61 |
+
<div class="wpr-tplib-template-gird elementor-clearfix">
|
62 |
+
<div class="wpr-tplib-template-gird-inner">
|
63 |
+
|
64 |
+
<?php
|
65 |
+
|
66 |
+
$popups = WPR_Templates_Data::get_available_popups();
|
67 |
+
|
68 |
+
foreach ($popups as $type => $data) :
|
69 |
+
|
70 |
+
for ( $i=0; $i < count($popups[$type]); $i++ ) :
|
71 |
+
|
72 |
+
$template_slug = array_keys($popups[$type])[$i];
|
73 |
+
$template_title = ucfirst($type) .' '. $template_slug;
|
74 |
+
$preview_type = $popups[$type][$template_slug]['type'];
|
75 |
+
$preview_url = $popups[$type][$template_slug]['url'];
|
76 |
+
$template_class = ( strpos($template_slug, 'pro') && ! wpr_fs()->can_use_premium_code() ) ? ' wpr-tplib-pro-wrap' : '';
|
77 |
+
|
78 |
+
?>
|
79 |
+
|
80 |
+
<div class="wpr-tplib-template-wrap<?php echo esc_attr($template_class); ?>">
|
81 |
+
<div class="wpr-tplib-template" data-slug="<?php echo esc_attr($template_slug); ?>" data-filter="<?php echo esc_attr($type); ?>" data-preview-type="<?php echo esc_attr($preview_type); ?>" data-preview-url="<?php echo esc_attr($preview_url); ?>">
|
82 |
+
<div class="wpr-tplib-template-media">
|
83 |
+
<img src="<?php echo esc_url('https://royal-elementor-addons.com/library/premade-styles/popups/'. $type .'/'. $template_slug .'.jpg'); ?>">
|
84 |
+
<div class="wpr-tplib-template-media-overlay">
|
85 |
+
<i class="eicon-eye"></i>
|
86 |
+
</div>
|
87 |
+
</div>
|
88 |
+
<div class="wpr-tplib-template-footer elementor-clearfix">
|
89 |
+
<h3><?php echo esc_html(str_replace('-pro', ' Pro', $template_title)); ?></h3>
|
90 |
+
|
91 |
+
<?php if ( strpos($template_slug, 'pro') && ! wpr_fs()->can_use_premium_code() ) : ?>
|
92 |
+
<span class="wpr-tplib-insert-template wpr-tplib-insert-pro"><i class="eicon-star"></i> <span><?php esc_html_e( 'Go Pro', 'wpr-addons' ); ?></span></span>
|
93 |
+
<?php else : ?>
|
94 |
+
<span class="wpr-tplib-insert-template"><i class="eicon-file-download"></i> <span><?php esc_html_e( 'Insert', 'wpr-addons' ); ?></span></span>
|
95 |
+
<?php endif; ?>
|
96 |
+
</div>
|
97 |
+
</div>
|
98 |
+
</div>
|
99 |
+
|
100 |
+
<?php endfor; ?>
|
101 |
+
<?php endforeach; ?>
|
102 |
+
|
103 |
+
</div>
|
104 |
+
</div>
|
105 |
+
|
106 |
+
<?php exit();
|
107 |
+
}
|
108 |
+
|
109 |
}
|
admin/templates/wpr-templates-pages.php
CHANGED
@@ -1,52 +1,52 @@
|
|
1 |
-
<?php
|
2 |
-
namespace WprAddons\Admin\Templates;
|
3 |
-
|
4 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
5 |
-
exit; // Exit if accessed directly.
|
6 |
-
}
|
7 |
-
|
8 |
-
/**
|
9 |
-
* WPR_Templates_Library_Pages setup
|
10 |
-
*
|
11 |
-
* @since 1.0
|
12 |
-
*/
|
13 |
-
class WPR_Templates_Library_Pages {
|
14 |
-
|
15 |
-
/**
|
16 |
-
** Constructor
|
17 |
-
*/
|
18 |
-
public function __construct() {
|
19 |
-
|
20 |
-
// Template Library Popup
|
21 |
-
add_action( 'wp_ajax_render_library_templates_pages', [ $this, 'render_library_templates_pages' ] );
|
22 |
-
|
23 |
-
}
|
24 |
-
|
25 |
-
/**
|
26 |
-
** Template Library Popup
|
27 |
-
*/
|
28 |
-
public function render_library_templates_pages() {
|
29 |
-
?>
|
30 |
-
|
31 |
-
<div class="wpr-tplib-sidebar">
|
32 |
-
<ul>
|
33 |
-
<li>Home</li>
|
34 |
-
<li>Blog</li>
|
35 |
-
<li>Landing</li>
|
36 |
-
</ul>
|
37 |
-
</div>
|
38 |
-
|
39 |
-
<div class="wpr-tplib-template-gird">
|
40 |
-
<div class="wpr-tplib-template" data-slug="page-1">Page 1</div>
|
41 |
-
<div class="wpr-tplib-template" data-slug="page-2">Page 2</div>
|
42 |
-
<div class="wpr-tplib-template">Page 3</div>
|
43 |
-
<div class="wpr-tplib-template">Page 4</div>
|
44 |
-
<div class="wpr-tplib-template">Page 5</div>
|
45 |
-
<div class="wpr-tplib-template">Page 6</div>
|
46 |
-
</div>
|
47 |
-
|
48 |
-
|
49 |
-
<?php exit();
|
50 |
-
}
|
51 |
-
|
52 |
}
|
1 |
+
<?php
|
2 |
+
namespace WprAddons\Admin\Templates;
|
3 |
+
|
4 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
5 |
+
exit; // Exit if accessed directly.
|
6 |
+
}
|
7 |
+
|
8 |
+
/**
|
9 |
+
* WPR_Templates_Library_Pages setup
|
10 |
+
*
|
11 |
+
* @since 1.0
|
12 |
+
*/
|
13 |
+
class WPR_Templates_Library_Pages {
|
14 |
+
|
15 |
+
/**
|
16 |
+
** Constructor
|
17 |
+
*/
|
18 |
+
public function __construct() {
|
19 |
+
|
20 |
+
// Template Library Popup
|
21 |
+
add_action( 'wp_ajax_render_library_templates_pages', [ $this, 'render_library_templates_pages' ] );
|
22 |
+
|
23 |
+
}
|
24 |
+
|
25 |
+
/**
|
26 |
+
** Template Library Popup
|
27 |
+
*/
|
28 |
+
public function render_library_templates_pages() {
|
29 |
+
?>
|
30 |
+
|
31 |
+
<div class="wpr-tplib-sidebar">
|
32 |
+
<ul>
|
33 |
+
<li>Home</li>
|
34 |
+
<li>Blog</li>
|
35 |
+
<li>Landing</li>
|
36 |
+
</ul>
|
37 |
+
</div>
|
38 |
+
|
39 |
+
<div class="wpr-tplib-template-gird">
|
40 |
+
<div class="wpr-tplib-template" data-slug="page-1">Page 1</div>
|
41 |
+
<div class="wpr-tplib-template" data-slug="page-2">Page 2</div>
|
42 |
+
<div class="wpr-tplib-template">Page 3</div>
|
43 |
+
<div class="wpr-tplib-template">Page 4</div>
|
44 |
+
<div class="wpr-tplib-template">Page 5</div>
|
45 |
+
<div class="wpr-tplib-template">Page 6</div>
|
46 |
+
</div>
|
47 |
+
|
48 |
+
|
49 |
+
<?php exit();
|
50 |
+
}
|
51 |
+
|
52 |
}
|
assets/css/admin/plugin-options.css
CHANGED
@@ -1,1132 +1,1132 @@
|
|
1 |
-
#wpwrap {
|
2 |
-
background: #fff;
|
3 |
-
}
|
4 |
-
|
5 |
-
#wpcontent {
|
6 |
-
padding: 0;
|
7 |
-
}
|
8 |
-
|
9 |
-
.wpr-settings-page-wrap {
|
10 |
-
margin: 0;
|
11 |
-
}
|
12 |
-
|
13 |
-
.wpr-settings-page-header {
|
14 |
-
display: -webkit-box;
|
15 |
-
display: -ms-flexbox;
|
16 |
-
display: flex;
|
17 |
-
-webkit-box-orient: vertical;
|
18 |
-
-webkit-box-direction: normal;
|
19 |
-
-ms-flex-direction: column;
|
20 |
-
flex-direction: column;
|
21 |
-
padding: 10px 30px 130px;
|
22 |
-
background: #f6f6f6
|
23 |
-
}
|
24 |
-
|
25 |
-
.wpr-settings-page-header h1,
|
26 |
-
.wpr-settings-page-header p,
|
27 |
-
.wpr-settings-page-header .wpr-preview-buttons,
|
28 |
-
.wpr-settings-page-header .wpr-user-template {
|
29 |
-
-webkit-box-ordinal-group: 3;
|
30 |
-
-ms-flex-order: 2;
|
31 |
-
order: 2;
|
32 |
-
}
|
33 |
-
|
34 |
-
.wpr-settings-page-header .wpr-options-button {
|
35 |
-
-ms-flex-item-align: start;
|
36 |
-
align-self: flex-start;
|
37 |
-
}
|
38 |
-
|
39 |
-
.button.wpr-options-button .dashicons {
|
40 |
-
line-height: 30px;
|
41 |
-
font-size: 16px;
|
42 |
-
}
|
43 |
-
|
44 |
-
.wpr-preview-buttons a:last-child,
|
45 |
-
.wpr-preview-buttons a.wpr-how-to-use-theme-builder {
|
46 |
-
background-color: transparent;
|
47 |
-
border: 2px solid #6A4BFF !important;
|
48 |
-
color: #6A4BFF;
|
49 |
-
padding: 5px 22px;
|
50 |
-
}
|
51 |
-
|
52 |
-
.wpr-preview-buttons a.wpr-how-to-use-woo-builder {
|
53 |
-
background-color: transparent !important;
|
54 |
-
border: 2px solid #96588a !important;
|
55 |
-
color: #96588a !important;
|
56 |
-
padding: 5px 22px;
|
57 |
-
}
|
58 |
-
|
59 |
-
.wpr-preview-buttons a.wpr-how-to-use-woo-builder:hover,
|
60 |
-
.wpr-preview-buttons a.wpr-how-to-use-woo-builder:focus {
|
61 |
-
color: #fff !important;
|
62 |
-
background: #96588a !important;
|
63 |
-
padding: 8px 22px !important;
|
64 |
-
}
|
65 |
-
|
66 |
-
.wpr-settings-page-header h1 {
|
67 |
-
font-size: 42px;
|
68 |
-
}
|
69 |
-
|
70 |
-
.wpr-settings-page-header p {
|
71 |
-
margin-top: 5px;
|
72 |
-
color: #5a5a5a;
|
73 |
-
font-size: 16px;
|
74 |
-
margin-bottom: 30px;
|
75 |
-
}
|
76 |
-
|
77 |
-
.wpr-user-template {
|
78 |
-
position: relative;
|
79 |
-
-webkit-box-sizing: border-box;
|
80 |
-
box-sizing: border-box;
|
81 |
-
overflow: hidden;
|
82 |
-
display: inline-block;
|
83 |
-
width: 220px;
|
84 |
-
height: 50px;
|
85 |
-
line-height: 50px;
|
86 |
-
padding: 0 20px;
|
87 |
-
color: #fff;
|
88 |
-
background: #6A4BFF;
|
89 |
-
font-size: 15px;
|
90 |
-
-webkit-box-shadow: 2px 2px 5px rgba(0,0,0,0.3);
|
91 |
-
box-shadow: 2px 2px 5px rgba(0,0,0,0.3);
|
92 |
-
border-radius: 5px;
|
93 |
-
cursor: pointer;
|
94 |
-
}
|
95 |
-
|
96 |
-
.wpr-user-template .plus-icon {
|
97 |
-
float: right;
|
98 |
-
display: block;
|
99 |
-
width: 30px;
|
100 |
-
height: 30px;
|
101 |
-
line-height: 28px;
|
102 |
-
margin-top: 10px;
|
103 |
-
border-radius: 50%;
|
104 |
-
color: #333;
|
105 |
-
background-color: #fff;
|
106 |
-
font-size: 18px;
|
107 |
-
text-align: center;
|
108 |
-
}
|
109 |
-
|
110 |
-
.wpr-user-template > div {
|
111 |
-
position: absolute;
|
112 |
-
top: 0;
|
113 |
-
left: 0;
|
114 |
-
width: 100%;
|
115 |
-
height: 100%;
|
116 |
-
background: rgba(0,0,0,0.5);
|
117 |
-
}
|
118 |
-
|
119 |
-
.royal-addons_page_wpr-theme-builder .wpr-preview-buttons {
|
120 |
-
display: -webkit-box;
|
121 |
-
display: -ms-flexbox;
|
122 |
-
display: flex;
|
123 |
-
-webkit-box-orient: horizontal;
|
124 |
-
-webkit-box-direction: reverse;
|
125 |
-
-ms-flex-direction: row-reverse;
|
126 |
-
flex-direction: row-reverse;
|
127 |
-
}
|
128 |
-
|
129 |
-
.royal-addons_page_wpr-theme-builder .wpr-user-template {
|
130 |
-
margin-right: auto;
|
131 |
-
}
|
132 |
-
|
133 |
-
.wpr-settings-page {
|
134 |
-
padding: 0 30px;
|
135 |
-
}
|
136 |
-
|
137 |
-
.wpr-nav-tab-wrapper {
|
138 |
-
padding-top: 0;
|
139 |
-
border-bottom: 0;
|
140 |
-
-webkit-transform: translateY(-100%);
|
141 |
-
-ms-transform: translateY(-100%);
|
142 |
-
transform: translateY(-100%);
|
143 |
-
}
|
144 |
-
|
145 |
-
.wpr-nav-tab-wrapper a {
|
146 |
-
border: 0 !important;
|
147 |
-
padding: 13px 35px;
|
148 |
-
background-color: transparent;
|
149 |
-
font-size: 16px;
|
150 |
-
margin-left: 0;
|
151 |
-
margin-right: 15px;
|
152 |
-
border-radius: 3px 4px 0 0;
|
153 |
-
color: #333;
|
154 |
-
}
|
155 |
-
|
156 |
-
.wpr-nav-tab-wrapper a:hover {
|
157 |
-
color: #6A4BFF;
|
158 |
-
background: #fff;
|
159 |
-
}
|
160 |
-
|
161 |
-
.wpr-nav-tab-wrapper .nav-tab-active {
|
162 |
-
color: #6A4BFF;
|
163 |
-
background: #fff;
|
164 |
-
-webkit-box-shadow: 3px -2px 5px rgba(0,0,0,0.03);
|
165 |
-
box-shadow: 3px -2px 5px rgba(0,0,0,0.03);
|
166 |
-
}
|
167 |
-
|
168 |
-
.wpr-nav-tab-wrapper a:focus {
|
169 |
-
-webkit-box-shadow: none;
|
170 |
-
box-shadow: none;
|
171 |
-
}
|
172 |
-
|
173 |
-
.button.wpr-options-button {
|
174 |
-
padding: 7px 22px;
|
175 |
-
border: 0;
|
176 |
-
color: #fff;
|
177 |
-
background: #6A4BFF;
|
178 |
-
-webkit-box-shadow: 2px 2px 5px rgba(0,0,0,0.3);
|
179 |
-
box-shadow: 2px 2px 5px rgba(0,0,0,0.3);
|
180 |
-
font-size: 14px;
|
181 |
-
}
|
182 |
-
|
183 |
-
.button.wpr-options-button:hover,
|
184 |
-
.button.wpr-options-button:focus {
|
185 |
-
color: #fff;
|
186 |
-
background: #6A4BFF;
|
187 |
-
border: none;
|
188 |
-
}
|
189 |
-
|
190 |
-
@media screen and (max-width: 1355px) {
|
191 |
-
.wpr-nav-tab-wrapper a {
|
192 |
-
padding: 13px 25px;
|
193 |
-
font-size: 14px;
|
194 |
-
}
|
195 |
-
}
|
196 |
-
|
197 |
-
|
198 |
-
/*--------------------------------------------------------------
|
199 |
-
== Elements
|
200 |
-
--------------------------------------------------------------*/
|
201 |
-
.wpr-elements-toggle {
|
202 |
-
overflow: hidden;
|
203 |
-
text-align: center;
|
204 |
-
}
|
205 |
-
|
206 |
-
.wpr-elements-toggle > div {
|
207 |
-
display: inline-block;
|
208 |
-
}
|
209 |
-
|
210 |
-
.wpr-elements-toggle h3 {
|
211 |
-
float: left;
|
212 |
-
font-size: 18px;
|
213 |
-
margin: 0 20px 0 0;
|
214 |
-
}
|
215 |
-
|
216 |
-
.wpr-elements-toggle p {
|
217 |
-
margin: 10px 0 60px 0;
|
218 |
-
}
|
219 |
-
|
220 |
-
.wpr-elements-heading {
|
221 |
-
text-align: center;
|
222 |
-
margin-bottom: 30px;
|
223 |
-
}
|
224 |
-
|
225 |
-
.wpr-elements-heading h3 {
|
226 |
-
font-size: 18px;
|
227 |
-
text-align: center;
|
228 |
-
margin-bottom: 0;
|
229 |
-
}
|
230 |
-
|
231 |
-
.wpr-elements-heading .wpr-install-activate-woocommerce {
|
232 |
-
color: red;
|
233 |
-
font-weight: 700;
|
234 |
-
}
|
235 |
-
|
236 |
-
.wpr-install-activate-woocommerce .dashicons {
|
237 |
-
font-size: 18px;
|
238 |
-
}
|
239 |
-
|
240 |
-
.wpr-woo-templates,
|
241 |
-
.wpr-elements {
|
242 |
-
display: -webkit-box;
|
243 |
-
display: -ms-flexbox;
|
244 |
-
display: flex;
|
245 |
-
-ms-flex-wrap: wrap;
|
246 |
-
flex-wrap: wrap;
|
247 |
-
width: 100%;
|
248 |
-
margin-bottom: 50px;
|
249 |
-
}
|
250 |
-
|
251 |
-
.wpr-woo-templates {
|
252 |
-
margin-bottom: 0;
|
253 |
-
}
|
254 |
-
|
255 |
-
.wpr-woo-template,
|
256 |
-
.wpr-element {
|
257 |
-
-webkit-box-sizing: border-box;
|
258 |
-
box-sizing: border-box;
|
259 |
-
position: relative;
|
260 |
-
width: 24%;
|
261 |
-
padding: 22px 30px;
|
262 |
-
margin-right: 1%;
|
263 |
-
margin-bottom: 20px;
|
264 |
-
-webkit-box-shadow: 0 0 15px rgba(0,0,0,0.05);
|
265 |
-
box-shadow: 0 0 15px rgba(0,0,0,0.05);
|
266 |
-
border-radius: 4px;
|
267 |
-
}
|
268 |
-
|
269 |
-
.wpr-woo-template {
|
270 |
-
width: 100%;
|
271 |
-
}
|
272 |
-
|
273 |
-
.wpr-woo-template-info {
|
274 |
-
display: -webkit-box;
|
275 |
-
display: -ms-flexbox;
|
276 |
-
display: flex;
|
277 |
-
-webkit-box-pack: justify;
|
278 |
-
-ms-flex-pack: justify;
|
279 |
-
justify-content: space-between;
|
280 |
-
margin-top: 10px;
|
281 |
-
}
|
282 |
-
|
283 |
-
.wpr-woo-template-info .wpr-woo-template-title {
|
284 |
-
display: -webkit-inline-box;
|
285 |
-
display: -ms-inline-flexbox;
|
286 |
-
display: inline-flex;
|
287 |
-
-webkit-box-orient: vertical;
|
288 |
-
-webkit-box-direction: normal;
|
289 |
-
-ms-flex-direction: column;
|
290 |
-
flex-direction: column;
|
291 |
-
}
|
292 |
-
|
293 |
-
.wpr-woo-template-title h3 {
|
294 |
-
font-weight: 600 !important;
|
295 |
-
font-size: 13px !important;
|
296 |
-
color: #3c434a !important;
|
297 |
-
}
|
298 |
-
|
299 |
-
.wpr-woo-template-title p {
|
300 |
-
margin: 0;
|
301 |
-
font-size: 12px;
|
302 |
-
}
|
303 |
-
|
304 |
-
.wpr-woo-template-info h4 {
|
305 |
-
font-size: 1em !important;
|
306 |
-
font-weight: 600 !important;
|
307 |
-
margin: 0;
|
308 |
-
}
|
309 |
-
|
310 |
-
.wpr-element-info h3 {
|
311 |
-
float: left;
|
312 |
-
margin: 0;
|
313 |
-
color: #3a3a3a;
|
314 |
-
font-size: 16px;
|
315 |
-
}
|
316 |
-
|
317 |
-
.wpr-woo-template-info label {
|
318 |
-
min-width: 45px;
|
319 |
-
}
|
320 |
-
|
321 |
-
.wpr-woo-template-info label,
|
322 |
-
.wpr-element-info label,
|
323 |
-
.wpr-elements-toggle label {
|
324 |
-
float: right;
|
325 |
-
}
|
326 |
-
|
327 |
-
.wpr-woo-template-info span,
|
328 |
-
.wpr-element-info span {
|
329 |
-
display: block;
|
330 |
-
margin-top: 3px;
|
331 |
-
color: #999;
|
332 |
-
font-style: normal;
|
333 |
-
font-size: 12px;
|
334 |
-
}
|
335 |
-
|
336 |
-
.wpr-woo-template-info a,
|
337 |
-
.wpr-element-info a {
|
338 |
-
display: block;
|
339 |
-
clear: both;
|
340 |
-
font-size: 12px;
|
341 |
-
-webkit-box-shadow: none !important;
|
342 |
-
box-shadow: none !important;
|
343 |
-
}
|
344 |
-
|
345 |
-
.wpr-woo-template-info input,
|
346 |
-
.wpr-element-info input,
|
347 |
-
.wpr-elements-toggle input,
|
348 |
-
.wpr-setting-custom-ckbox input {
|
349 |
-
position: absolute;
|
350 |
-
z-index: -1000;
|
351 |
-
left: -1000px;
|
352 |
-
overflow: hidden;
|
353 |
-
clip: rect(0 0 0 0);
|
354 |
-
height: 1px;
|
355 |
-
width: 1px;
|
356 |
-
margin: -1px;
|
357 |
-
padding: 0;
|
358 |
-
border: 0;
|
359 |
-
}
|
360 |
-
|
361 |
-
.wpr-woo-template-info label,
|
362 |
-
.wpr-element-info label,
|
363 |
-
.wpr-elements-toggle label,
|
364 |
-
.wpr-setting-custom-ckbox label {
|
365 |
-
position: relative;
|
366 |
-
display: block;
|
367 |
-
width: 45px;
|
368 |
-
height: 23px;
|
369 |
-
border-radius: 20px;
|
370 |
-
background: #e8e8e8;
|
371 |
-
cursor: pointer;
|
372 |
-
-webkit-touch-callout: none;
|
373 |
-
-webkit-user-select: none;
|
374 |
-
-moz-user-select: none;
|
375 |
-
-ms-user-select: none;
|
376 |
-
user-select: none;
|
377 |
-
-webkit-transition: all 0.2s ease-in;
|
378 |
-
-o-transition: all 0.2s ease-in;
|
379 |
-
transition: all 0.2s ease-in;
|
380 |
-
}
|
381 |
-
|
382 |
-
.wpr-woo-template-info input + label:after,
|
383 |
-
.wpr-element-info input + label:after,
|
384 |
-
.wpr-elements-toggle input + label:after,
|
385 |
-
.wpr-setting-custom-ckbox input + label:after {
|
386 |
-
content: ' ';
|
387 |
-
display: block;
|
388 |
-
position: absolute;
|
389 |
-
top: 3px;
|
390 |
-
left: 3px;
|
391 |
-
width: 17px;
|
392 |
-
height: 17px;
|
393 |
-
border-radius: 50%;
|
394 |
-
background: #fff;
|
395 |
-
-webkit-transition: all 0.2s ease-in;
|
396 |
-
-o-transition: all 0.2s ease-in;
|
397 |
-
transition: all 0.2s ease-in;
|
398 |
-
}
|
399 |
-
|
400 |
-
.wpr-woo-template-info input:checked + label,
|
401 |
-
.wpr-element-info input:checked + label,
|
402 |
-
.wpr-elements-toggle input:checked + label,
|
403 |
-
.wpr-setting-custom-ckbox input:checked + label {
|
404 |
-
background: #6A4BFF;
|
405 |
-
}
|
406 |
-
|
407 |
-
.wpr-woo-template-info input:checked + label:after,
|
408 |
-
.wpr-element-info input:checked + label:after,
|
409 |
-
.wpr-elements-toggle input:checked + label:after,
|
410 |
-
.wpr-setting-custom-ckbox input:checked + label:after {
|
411 |
-
left: 24px;
|
412 |
-
}
|
413 |
-
|
414 |
-
.wpr-new-element:before {
|
415 |
-
content: 'NEW';
|
416 |
-
position: absolute;
|
417 |
-
top: -10px;
|
418 |
-
left: 28px;
|
419 |
-
padding: 1px 7px;
|
420 |
-
color: #fff;
|
421 |
-
background-color: #f44;
|
422 |
-
border-radius: 3px;
|
423 |
-
font-size: 10px;
|
424 |
-
font-weight: bold;
|
425 |
-
letter-spacing: 1px;
|
426 |
-
}
|
427 |
-
|
428 |
-
.wpr-pro-element:before {
|
429 |
-
content: 'PRO';
|
430 |
-
position: absolute;
|
431 |
-
top: -10px;
|
432 |
-
left: 28px;
|
433 |
-
z-index: 10;
|
434 |
-
padding: 1px 7px;
|
435 |
-
color: #fff;
|
436 |
-
background-color: #f44;
|
437 |
-
border-radius: 3px;
|
438 |
-
font-size: 10px;
|
439 |
-
font-weight: bold;
|
440 |
-
letter-spacing: 1px;
|
441 |
-
}
|
442 |
-
|
443 |
-
.wpr-pro-element > a {
|
444 |
-
display: block;
|
445 |
-
position: absolute;
|
446 |
-
top: 0;
|
447 |
-
left: 0;
|
448 |
-
z-index: 1;
|
449 |
-
width: 100%;
|
450 |
-
height: 100%;
|
451 |
-
background: rgba(0,0,0,0.1);
|
452 |
-
}
|
453 |
-
|
454 |
-
/*--------------------------------------------------------------
|
455 |
-
== My Templates
|
456 |
-
--------------------------------------------------------------*/
|
457 |
-
.wpr-my-templates-list {
|
458 |
-
width: 65%;
|
459 |
-
}
|
460 |
-
|
461 |
-
@media screen and (max-width: 1400px) {
|
462 |
-
.wpr-my-templates-list {
|
463 |
-
width: 100%;
|
464 |
-
}
|
465 |
-
}
|
466 |
-
|
467 |
-
.wpr-activate-woo-notice,
|
468 |
-
.wpr-my-templates-list li {
|
469 |
-
overflow: hidden;
|
470 |
-
padding: 20px 35px;
|
471 |
-
margin-bottom: 15px;
|
472 |
-
-webkit-box-shadow: 0 0 2px rgba(0,0,0,0.2);
|
473 |
-
box-shadow: 0 0 2px rgba(0,0,0,0.2);
|
474 |
-
}
|
475 |
-
|
476 |
-
.wpr-my-templates-list li h3 {
|
477 |
-
float: left;
|
478 |
-
margin: 0;
|
479 |
-
color: #555;
|
480 |
-
font-size: 16px;
|
481 |
-
line-height: 34px;
|
482 |
-
text-transform: capitalize;
|
483 |
-
}
|
484 |
-
|
485 |
-
.wpr-my-templates-list .wpr-action-buttons {
|
486 |
-
float: right;
|
487 |
-
}
|
488 |
-
|
489 |
-
.wpr-my-templates-list .wpr-template-conditions {
|
490 |
-
background: #b3b3b3;
|
491 |
-
}
|
492 |
-
|
493 |
-
.wpr-active-conditions-template .wpr-template-conditions {
|
494 |
-
background: #7a5ffd;
|
495 |
-
}
|
496 |
-
|
497 |
-
.wpr-my-templates-list .wpr-template-conditions:hover,
|
498 |
-
.wpr-active-conditions-template .wpr-template-conditions:hover {
|
499 |
-
background: #6A4BFF;
|
500 |
-
}
|
501 |
-
|
502 |
-
.wpr-my-templates-list .wpr-edit-template {
|
503 |
-
background: #646464;
|
504 |
-
}
|
505 |
-
|
506 |
-
.wpr-my-templates-list .wpr-edit-template:hover {
|
507 |
-
background: #535353;
|
508 |
-
}
|
509 |
-
|
510 |
-
.wpr-edit-template:focus {
|
511 |
-
-webkit-box-shadow: none !important;
|
512 |
-
box-shadow: none !important;
|
513 |
-
}
|
514 |
-
|
515 |
-
.wpr-my-templates-list .wpr-delete-template {
|
516 |
-
background: #ff5a4b;
|
517 |
-
}
|
518 |
-
|
519 |
-
.wpr-my-templates-list .wpr-delete-template:hover {
|
520 |
-
background: #FF4635;
|
521 |
-
}
|
522 |
-
|
523 |
-
.wpr-my-templates-list .wpr-action-buttons > * {
|
524 |
-
display: inline-block;
|
525 |
-
padding: 3px 20px;
|
526 |
-
margin-right: 10px;
|
527 |
-
border: 0;
|
528 |
-
letter-spacing: 0.5px;
|
529 |
-
}
|
530 |
-
|
531 |
-
.wpr-my-templates-list .wpr-action-buttons > *:last-child {
|
532 |
-
margin-right: 0;
|
533 |
-
}
|
534 |
-
|
535 |
-
.wpr-my-templates-list .wpr-action-buttons .dashicons {
|
536 |
-
font-size: 16px;
|
537 |
-
line-height: 30px;
|
538 |
-
}
|
539 |
-
|
540 |
-
.wpr-active-conditions-template {
|
541 |
-
border-left: 5px solid #6A4BFF;
|
542 |
-
background: #F6F7F7;
|
543 |
-
}
|
544 |
-
|
545 |
-
.wpr-my-templates-list .wpr-no-templates {
|
546 |
-
background: #fff !important;
|
547 |
-
}
|
548 |
-
|
549 |
-
|
550 |
-
/*--------------------------------------------------------------
|
551 |
-
== Settings
|
552 |
-
--------------------------------------------------------------*/
|
553 |
-
.wpr-settings-group:first-of-type {
|
554 |
-
margin-top: 50px;
|
555 |
-
}
|
556 |
-
|
557 |
-
.wpr-settings-group {
|
558 |
-
position: relative;
|
559 |
-
width: 35%;
|
560 |
-
background: #f9f9f9;
|
561 |
-
padding: 30px;
|
562 |
-
margin-bottom: 80px;
|
563 |
-
-webkit-box-shadow: 1px 2px 3px rgba(0,0,0,0.1);
|
564 |
-
box-shadow: 1px 2px 3px rgba(0,0,0,0.1);
|
565 |
-
border-radius: 0 3px 3px 3px;
|
566 |
-
}
|
567 |
-
|
568 |
-
.wpr-settings-group-inner {
|
569 |
-
position: relative;
|
570 |
-
}
|
571 |
-
|
572 |
-
.wpr-settings-group-title {
|
573 |
-
position: absolute;
|
574 |
-
top: 0;
|
575 |
-
left: 0;
|
576 |
-
-webkit-transform: translateY(-100%);
|
577 |
-
-ms-transform: translateY(-100%);
|
578 |
-
transform: translateY(-100%);
|
579 |
-
padding: 10px 30px;
|
580 |
-
background: #f9f9f9;
|
581 |
-
margin: 0;
|
582 |
-
-webkit-box-shadow: 0 -2px 3px rgba(0,0,0,0.05);
|
583 |
-
box-shadow: 0 -2px 3px rgba(0,0,0,0.05);
|
584 |
-
border-radius: 3px 3px 0 0;
|
585 |
-
color: #6A4BFF;
|
586 |
-
font-size: 14px;
|
587 |
-
}
|
588 |
-
|
589 |
-
.wpr-setting {
|
590 |
-
margin-bottom: 20px;
|
591 |
-
}
|
592 |
-
|
593 |
-
.wpr-setting h4 {
|
594 |
-
margin-bottom: 8px;
|
595 |
-
}
|
596 |
-
|
597 |
-
.wpr-setting input:not(input[type='checkbox']) {
|
598 |
-
border: 1px solid #e8e8e8;
|
599 |
-
width: 100%;
|
600 |
-
padding: 5px 15px;
|
601 |
-
}
|
602 |
-
|
603 |
-
.wpr-setting input[type='checkbox'] {
|
604 |
-
margin-right: 8px;
|
605 |
-
}
|
606 |
-
|
607 |
-
.wpr-settings .submit:first-of-type {
|
608 |
-
margin-top: 0;
|
609 |
-
padding-top: 0;
|
610 |
-
margin-bottom: 70px;
|
611 |
-
}
|
612 |
-
|
613 |
-
.wp-picker-clear {
|
614 |
-
width: 100px !important;
|
615 |
-
}
|
616 |
-
|
617 |
-
/*--------------------------------------------------------------
|
618 |
-
== Conditions
|
619 |
-
--------------------------------------------------------------*/
|
620 |
-
.wpr-admin-popup-wrap {
|
621 |
-
display: none;
|
622 |
-
position: fixed;
|
623 |
-
top: 0;
|
624 |
-
left: 0;
|
625 |
-
z-index: 9999;
|
626 |
-
background-color: rgba(0, 0, 0, 0.6);
|
627 |
-
width: 100%;
|
628 |
-
height: 100%;
|
629 |
-
}
|
630 |
-
|
631 |
-
.wpr-admin-popup {
|
632 |
-
display: -webkit-box;
|
633 |
-
display: -ms-flexbox;
|
634 |
-
display: flex;
|
635 |
-
-ms-flex-pack: distribute;
|
636 |
-
justify-content: space-around;
|
637 |
-
-webkit-box-align: center;
|
638 |
-
-ms-flex-align: center;
|
639 |
-
align-items: center;
|
640 |
-
-webkit-box-orient: vertical;
|
641 |
-
-webkit-box-direction: normal;
|
642 |
-
-ms-flex-direction: column;
|
643 |
-
flex-direction: column;
|
644 |
-
position: absolute;
|
645 |
-
top: 50%;
|
646 |
-
left: 50%;
|
647 |
-
-webkit-transform: translate(-50%,-50%);
|
648 |
-
-ms-transform: translate(-50%,-50%);
|
649 |
-
transform: translate(-50%,-50%);
|
650 |
-
width: 80%;
|
651 |
-
max-width: 850px;
|
652 |
-
padding: 70px 20px 20px 20px;
|
653 |
-
background-color: #F1F3F5;
|
654 |
-
}
|
655 |
-
|
656 |
-
|
657 |
-
.wpr-admin-popup .close-popup {
|
658 |
-
position: absolute;
|
659 |
-
top: 10px;
|
660 |
-
right: 15px;
|
661 |
-
font-size: 26px;
|
662 |
-
cursor: pointer;
|
663 |
-
color: #59626a;
|
664 |
-
}
|
665 |
-
|
666 |
-
.wpr-conditions.wpr-tab-archive .global-condition-select,
|
667 |
-
.wpr-conditions.wpr-tab-archive .singles-condition-select,
|
668 |
-
.wpr-conditions.wpr-tab-product_archive .global-condition-select,
|
669 |
-
.wpr-conditions.wpr-tab-product_archive .singles-condition-select,
|
670 |
-
.wpr-conditions.wpr-tab-single .global-condition-select,
|
671 |
-
.wpr-conditions.wpr-tab-single .archives-condition-select,
|
672 |
-
.wpr-conditions.wpr-tab-product_single .global-condition-select,
|
673 |
-
.wpr-conditions.wpr-tab-product_single .archives-condition-select {
|
674 |
-
display: none !important;
|
675 |
-
}
|
676 |
-
|
677 |
-
.wpr-conditions-wrap.blog-posts .singles-condition-select option:nth-child(1),
|
678 |
-
.wpr-conditions-wrap.blog-posts .singles-condition-select option:nth-child(2),
|
679 |
-
.wpr-conditions-wrap.blog-posts .singles-condition-select option:nth-child(3) {
|
680 |
-
/*display: none;*/
|
681 |
-
}
|
682 |
-
|
683 |
-
.wpr-conditions.wpr-tab-archive .archives-condition-select,
|
684 |
-
.wpr-conditions.wpr-tab-product_archive .archives-condition-select,
|
685 |
-
.wpr-conditions.wpr-tab-single .singles-condition-select,
|
686 |
-
.wpr-conditions.wpr-tab-product_single .singles-condition-select {
|
687 |
-
display: block !important;
|
688 |
-
}
|
689 |
-
|
690 |
-
.wpr-conditions-sample {
|
691 |
-
display: none !important;
|
692 |
-
}
|
693 |
-
|
694 |
-
.wpr-conditions {
|
695 |
-
position: relative;
|
696 |
-
display: -webkit-box;
|
697 |
-
display: -ms-flexbox;
|
698 |
-
display: flex;
|
699 |
-
-webkit-box-align: center;
|
700 |
-
-ms-flex-align: center;
|
701 |
-
align-items: center;
|
702 |
-
margin-top: 10px;
|
703 |
-
width: 600px;
|
704 |
-
border-radius: 3px;
|
705 |
-
border: 1px solid #e8e8e8;
|
706 |
-
background: #fff;
|
707 |
-
}
|
708 |
-
|
709 |
-
.wpr-admin-popup header {
|
710 |
-
margin-top: 0;
|
711 |
-
margin-bottom: 20px;
|
712 |
-
text-align: center;
|
713 |
-
}
|
714 |
-
|
715 |
-
.wpr-admin-popup header h2 {
|
716 |
-
margin: 25px auto;
|
717 |
-
font-size: 26px;
|
718 |
-
color: #59626a;
|
719 |
-
}
|
720 |
-
|
721 |
-
.wpr-admin-popup header p {
|
722 |
-
margin-top: 0;
|
723 |
-
margin-bottom: 0;
|
724 |
-
color: #7f8b96;
|
725 |
-
}
|
726 |
-
|
727 |
-
.wpr-conditions select {
|
728 |
-
height: 35px;
|
729 |
-
height: 100%;
|
730 |
-
padding-top: 5px;
|
731 |
-
padding-bottom: 5px;
|
732 |
-
border-radius: 0;
|
733 |
-
border: none;
|
734 |
-
-webkit-box-flex: 1;
|
735 |
-
-ms-flex-positive: 1;
|
736 |
-
flex-grow: 1;
|
737 |
-
border-right: 1px solid #e8e8e8 !important;
|
738 |
-
background-size: 14px 14px;
|
739 |
-
}
|
740 |
-
|
741 |
-
span.wpr-add-conditions {
|
742 |
-
margin-top: 30px;
|
743 |
-
background: #A4AFB7;
|
744 |
-
color: #fff;
|
745 |
-
font-weight: 600;
|
746 |
-
letter-spacing: 1px;
|
747 |
-
text-transform: uppercase;
|
748 |
-
padding: 8px 20px;
|
749 |
-
border-radius: 3px;
|
750 |
-
cursor: pointer;
|
751 |
-
}
|
752 |
-
|
753 |
-
span.wpr-add-conditions:hover {
|
754 |
-
background: #848c92;
|
755 |
-
}
|
756 |
-
|
757 |
-
input.wpr-condition-input-ids {
|
758 |
-
display: none;
|
759 |
-
padding: 5px;
|
760 |
-
outline: none;
|
761 |
-
border: none;
|
762 |
-
border-radius: 0;
|
763 |
-
}
|
764 |
-
|
765 |
-
input.wpr-condition-input-ids,
|
766 |
-
.wpr-conditions select {
|
767 |
-
-ms-flex-negative: 0;
|
768 |
-
flex-shrink: 0;
|
769 |
-
-webkit-box-flex: 1;
|
770 |
-
-ms-flex-positive: 1;
|
771 |
-
flex-grow: 1;
|
772 |
-
max-width: none;
|
773 |
-
border: none;
|
774 |
-
-webkit-box-shadow: none !important;
|
775 |
-
box-shadow: none !important;
|
776 |
-
outline: none;
|
777 |
-
margin: 0;
|
778 |
-
text-indent: 5px;
|
779 |
-
}
|
780 |
-
|
781 |
-
.wpr-canvas-condition {
|
782 |
-
display: none;
|
783 |
-
margin-top: 20px;
|
784 |
-
}
|
785 |
-
|
786 |
-
.wpr-canvas-condition label {
|
787 |
-
display: inline-block;
|
788 |
-
}
|
789 |
-
|
790 |
-
.wpr-canvas-condition span {
|
791 |
-
margin-right: 20px;
|
792 |
-
}
|
793 |
-
|
794 |
-
#wpr-woo-products-per-page {
|
795 |
-
width: 40px;
|
796 |
-
border: 1px solid #e8e8e8;
|
797 |
-
text-align: center;
|
798 |
-
-webkit-box-shadow: none !important;
|
799 |
-
box-shadow: none !important;
|
800 |
-
margin-left: 10px;
|
801 |
-
}
|
802 |
-
|
803 |
-
.wpr-delete-template-conditions {
|
804 |
-
margin-left: auto;
|
805 |
-
position: absolute;
|
806 |
-
right: -30px;
|
807 |
-
color: #C2CBD2;
|
808 |
-
font-size: 22px;
|
809 |
-
cursor: pointer;
|
810 |
-
}
|
811 |
-
|
812 |
-
.wpr-delete-template-conditions:hover {
|
813 |
-
color: #81868a;
|
814 |
-
}
|
815 |
-
|
816 |
-
.wpr-save-conditions {
|
817 |
-
padding: 8px 20px;
|
818 |
-
color: #fff;
|
819 |
-
background: #6A4BFF;
|
820 |
-
margin-left: auto;
|
821 |
-
border-radius: 3px;
|
822 |
-
margin-top: 80px;
|
823 |
-
text-transform: uppercase;
|
824 |
-
letter-spacing: 0.5px;
|
825 |
-
font-weight: 600;
|
826 |
-
cursor: pointer;
|
827 |
-
}
|
828 |
-
|
829 |
-
.wpr-user-template-popup {
|
830 |
-
padding-top: 40px;
|
831 |
-
}
|
832 |
-
|
833 |
-
.wpr-user-template-popup header {
|
834 |
-
margin-bottom: 27px;
|
835 |
-
}
|
836 |
-
|
837 |
-
.wpr-user-template-popup .wpr-create-template {
|
838 |
-
padding: 11px 20px;
|
839 |
-
margin: 25px auto;
|
840 |
-
color: #fff;
|
841 |
-
background: #6A4BFF;
|
842 |
-
border-radius: 3px;
|
843 |
-
cursor: pointer;
|
844 |
-
}
|
845 |
-
|
846 |
-
.wpr-user-template-popup p {
|
847 |
-
max-width: 70%;
|
848 |
-
margin: auto;
|
849 |
-
}
|
850 |
-
|
851 |
-
input.wpr-user-template-title {
|
852 |
-
width: 350px;
|
853 |
-
border: 1px solid #d1d1d1;
|
854 |
-
padding: 5px 10px;
|
855 |
-
border-radius: 3px;
|
856 |
-
}
|
857 |
-
|
858 |
-
input.wpr-user-template-title::-webkit-input-placeholder,
|
859 |
-
input.wpr-condition-input-ids::-webkit-input-placeholder {
|
860 |
-
color: #9a9a9a;
|
861 |
-
}
|
862 |
-
|
863 |
-
input.wpr-user-template-title::-moz-placeholder,
|
864 |
-
input.wpr-condition-input-ids::-moz-placeholder {
|
865 |
-
color: #9a9a9a;
|
866 |
-
}
|
867 |
-
|
868 |
-
input.wpr-user-template-title:-ms-input-placeholder,
|
869 |
-
input.wpr-condition-input-ids:-ms-input-placeholder {
|
870 |
-
color: #9a9a9a;
|
871 |
-
}
|
872 |
-
|
873 |
-
input.wpr-user-template-title::-ms-input-placeholder,
|
874 |
-
input.wpr-condition-input-ids::-ms-input-placeholder {
|
875 |
-
color: #9a9a9a;
|
876 |
-
}
|
877 |
-
|
878 |
-
input.wpr-user-template-title::-webkit-input-placeholder, input.wpr-condition-input-ids::-webkit-input-placeholder {
|
879 |
-
color: #9a9a9a;
|
880 |
-
}
|
881 |
-
|
882 |
-
input.wpr-user-template-title::-moz-placeholder, input.wpr-condition-input-ids::-moz-placeholder {
|
883 |
-
color: #9a9a9a;
|
884 |
-
}
|
885 |
-
|
886 |
-
input.wpr-user-template-title:-ms-input-placeholder, input.wpr-condition-input-ids:-ms-input-placeholder {
|
887 |
-
color: #9a9a9a;
|
888 |
-
}
|
889 |
-
|
890 |
-
input.wpr-user-template-title::-ms-input-placeholder, input.wpr-condition-input-ids::-ms-input-placeholder {
|
891 |
-
color: #9a9a9a;
|
892 |
-
}
|
893 |
-
|
894 |
-
input.wpr-user-template-title::placeholder,
|
895 |
-
input.wpr-condition-input-ids::placeholder {
|
896 |
-
color: #9a9a9a;
|
897 |
-
}
|
898 |
-
|
899 |
-
input.wpr-user-template-title:focus {
|
900 |
-
border-color: #6A4BFF;
|
901 |
-
-webkit-box-shadow: none;
|
902 |
-
box-shadow: none;
|
903 |
-
}
|
904 |
-
|
905 |
-
/*--------------------------------------------------------------
|
906 |
-
== White Label
|
907 |
-
--------------------------------------------------------------*/
|
908 |
-
.wpr-wl-tab-content {
|
909 |
-
display: -webkit-box;
|
910 |
-
display: -ms-flexbox;
|
911 |
-
display: flex;
|
912 |
-
-webkit-box-align: start;
|
913 |
-
-ms-flex-align: start;
|
914 |
-
align-items: flex-start;
|
915 |
-
}
|
916 |
-
|
917 |
-
.wpr-wl-tab-content .wpr-settings-group:last-of-type {
|
918 |
-
margin-top: 50px;
|
919 |
-
margin-left: 50px;
|
920 |
-
}
|
921 |
-
|
922 |
-
.wpr-setting-custom-img-upload div button {
|
923 |
-
display: -webkit-box;
|
924 |
-
display: -ms-flexbox;
|
925 |
-
display: flex;
|
926 |
-
-webkit-box-align: center;
|
927 |
-
-ms-flex-align: center;
|
928 |
-
align-items: center;
|
929 |
-
margin-top: 10px;
|
930 |
-
padding: 10px 20px;
|
931 |
-
background: #ffffff;
|
932 |
-
border: 1px solid #e8e8e8;
|
933 |
-
border-radius: 3px;
|
934 |
-
font-weight: bold;
|
935 |
-
cursor: pointer;
|
936 |
-
}
|
937 |
-
|
938 |
-
.wpr-setting-custom-img-upload div button span {
|
939 |
-
margin-left: 5px;
|
940 |
-
}
|
941 |
-
|
942 |
-
.wpr-setting-custom-img-upload div button img {
|
943 |
-
width: 50px;
|
944 |
-
}
|
945 |
-
|
946 |
-
.wpr-setting-custom-ckbox h4 {
|
947 |
-
display: -webkit-box;
|
948 |
-
display: -ms-flexbox;
|
949 |
-
display: flex;
|
950 |
-
-webkit-box-orient: horizontal;
|
951 |
-
-webkit-box-direction: normal;
|
952 |
-
-ms-flex-direction: row;
|
953 |
-
flex-direction: row;
|
954 |
-
-webkit-box-pack: justify;
|
955 |
-
-ms-flex-pack: justify;
|
956 |
-
justify-content: space-between;
|
957 |
-
}
|
958 |
-
|
959 |
-
.wpr-setting-custom-ckbox label {
|
960 |
-
background: #dddbdb;
|
961 |
-
}
|
962 |
-
|
963 |
-
.wpr-setting-custom-ckbox p {
|
964 |
-
color: #a09f9f;
|
965 |
-
}
|
966 |
-
|
967 |
-
/*--------------------------------------------------------------
|
968 |
-
== Freemius
|
969 |
-
--------------------------------------------------------------*/
|
970 |
-
#fs_connect {
|
971 |
-
margin: 40px !important;
|
972 |
-
width: 615px !important;
|
973 |
-
border-top: 3px solid #2271B1 !important;
|
974 |
-
}
|
975 |
-
|
976 |
-
#fs_connect .fs-content {
|
977 |
-
padding: 25px 20px 35px 20px !important;
|
978 |
-
}
|
979 |
-
|
980 |
-
#fs_connect .fs-visual {
|
981 |
-
background: transparent !important;
|
982 |
-
}
|
983 |
-
|
984 |
-
#fs_connect .fs-visual .fs-site-icon,
|
985 |
-
#fs_connect .fs-visual .fs-plugin-icon,
|
986 |
-
#fs_connect .fs-visual .fs-connect-logo {
|
987 |
-
top: 20px !important;
|
988 |
-
}
|
989 |
-
|
990 |
-
#fs_connect .fs-visual .fs-plugin-icon,
|
991 |
-
#fs_connect .fs-visual .fs-connect-logo,
|
992 |
-
#fs_connect .fs-visual .fs-site-icon {
|
993 |
-
border: none !important;
|
994 |
-
}
|
995 |
-
|
996 |
-
#fs_connect .fs-visual .fs-site-icon i,
|
997 |
-
#fs_connect .fs-visual img{
|
998 |
-
overflow: hidden !important;
|
999 |
-
border-radius: 100px !important;
|
1000 |
-
}
|
1001 |
-
|
1002 |
-
#fs_connect .fs-actions {
|
1003 |
-
border-top: 1px solid #F2F2F2 !important;
|
1004 |
-
background: #F2F2F2 !important;
|
1005 |
-
}
|
1006 |
-
|
1007 |
-
#fs_connect .fs-actions .button {
|
1008 |
-
font-size: 14px !important;
|
1009 |
-
}
|
1010 |
-
|
1011 |
-
#fs_connect .fs-actions .button.button-secondary {
|
1012 |
-
padding: 0 25px !important;
|
1013 |
-
}
|
1014 |
-
|
1015 |
-
#fs_connect .fs-permissions {
|
1016 |
-
margin-top: 20px !important;
|
1017 |
-
}
|
1018 |
-
|
1019 |
-
#fs_connect .fs-permissions>.fs-trigger {
|
1020 |
-
-webkit-box-shadow: none !important;
|
1021 |
-
box-shadow: none !important;
|
1022 |
-
}
|
1023 |
-
|
1024 |
-
#fs_connect .fs-permissions.fs-open ul {
|
1025 |
-
margin: 30px 20px !important;
|
1026 |
-
}
|
1027 |
-
|
1028 |
-
#fs_connect .fs-permissions ul li {
|
1029 |
-
margin-bottom: 20px !important;
|
1030 |
-
}
|
1031 |
-
|
1032 |
-
#fs_connect .fs-permissions ul li .fs-permission-description span {
|
1033 |
-
font-size: 12px !important;
|
1034 |
-
text-transform: capitalize !important;
|
1035 |
-
}
|
1036 |
-
|
1037 |
-
#fs_connect .fs-permissions ul li .fs-permission-description p {
|
1038 |
-
font-size: 11px !important;
|
1039 |
-
margin-top: 0 !important;
|
1040 |
-
}
|
1041 |
-
|
1042 |
-
#fs_connect .fs-license-key-container {
|
1043 |
-
width: 100% !important;
|
1044 |
-
margin-top: 20px;
|
1045 |
-
}
|
1046 |
-
|
1047 |
-
#pframe,
|
1048 |
-
#fs_connect.require-license-key .fs-permissions,
|
1049 |
-
#fs_connect.require-license-key .fs-terms,
|
1050 |
-
#fs_connect .fs-freemium-licensing,
|
1051 |
-
#license_issues_link {
|
1052 |
-
display: none !important;
|
1053 |
-
}
|
1054 |
-
|
1055 |
-
/*--------------------------------------------------------------
|
1056 |
-
== Settings: Pro Options
|
1057 |
-
--------------------------------------------------------------*/
|
1058 |
-
.wpr-settings-pro-overlay {
|
1059 |
-
display: -webkit-box;
|
1060 |
-
display: -ms-flexbox;
|
1061 |
-
display: flex;
|
1062 |
-
-webkit-box-orient: vertical;
|
1063 |
-
-webkit-box-direction: normal;
|
1064 |
-
-ms-flex-direction: column;
|
1065 |
-
flex-direction: column;
|
1066 |
-
-webkit-box-align: center;
|
1067 |
-
-ms-flex-align: center;
|
1068 |
-
align-items: center;
|
1069 |
-
-webkit-box-pack: center;
|
1070 |
-
-ms-flex-pack: center;
|
1071 |
-
justify-content: center;
|
1072 |
-
position: absolute;
|
1073 |
-
top: 0;
|
1074 |
-
left: 0;
|
1075 |
-
width: 100%;
|
1076 |
-
height: 100%;
|
1077 |
-
background: rgba(0,0,0,0.4);
|
1078 |
-
color: #f9f9f9;
|
1079 |
-
font-size: 16px;
|
1080 |
-
text-decoration: none;
|
1081 |
-
text-transform: uppercase;
|
1082 |
-
font-weight: bold;
|
1083 |
-
|
1084 |
-
text-shadow: 1px 1px 1px #000;
|
1085 |
-
-webkit-box-shadow: 1px 1px 15px rgba(0,0,0,0.3);
|
1086 |
-
box-shadow: 1px 1px 15px rgba(0,0,0,0.3);
|
1087 |
-
}
|
1088 |
-
|
1089 |
-
.wpr-settings-pro-overlay:hover,
|
1090 |
-
.wpr-settings-pro-overlay:focus{
|
1091 |
-
color: #f9f9f9;
|
1092 |
-
}
|
1093 |
-
|
1094 |
-
.wpr-settings-pro-overlay .dashicons {
|
1095 |
-
font-size: 50px;
|
1096 |
-
line-height: 50px;
|
1097 |
-
margin-bottom: 40px;
|
1098 |
-
-webkit-transform: translateX(-50%);
|
1099 |
-
-ms-transform: translateX(-50%);
|
1100 |
-
transform: translateX(-50%);
|
1101 |
-
}
|
1102 |
-
|
1103 |
-
.wpr-settings-pro-overlay .dashicons:nth-child(2) {
|
1104 |
-
display: none;
|
1105 |
-
}
|
1106 |
-
|
1107 |
-
.wpr-settings-pro-overlay:hover .dashicons:nth-child(2) {
|
1108 |
-
display: block;
|
1109 |
-
}
|
1110 |
-
|
1111 |
-
.wpr-settings-pro-overlay:hover .dashicons:nth-child(1) {
|
1112 |
-
display: none;
|
1113 |
-
}.example {
|
1114 |
-
display: -ms-grid;
|
1115 |
-
display: grid;
|
1116 |
-
-webkit-transition: all .5s;
|
1117 |
-
-o-transition: all .5s;
|
1118 |
-
transition: all .5s;
|
1119 |
-
-webkit-user-select: none;
|
1120 |
-
-moz-user-select: none;
|
1121 |
-
-ms-user-select: none;
|
1122 |
-
user-select: none;
|
1123 |
-
background: -webkit-gradient(linear, left top, left bottom, from(white), to(black));
|
1124 |
-
background: -o-linear-gradient(top, white, black);
|
1125 |
-
background: linear-gradient(to bottom, white, black);
|
1126 |
-
}
|
1127 |
-
|
1128 |
-
/* Disable Notices */
|
1129 |
-
.notice:not(.wpr-plugin-update-notice),
|
1130 |
-
div.fs-notice.updated, div.fs-notice.success {
|
1131 |
-
display: none !important;
|
1132 |
}
|
1 |
+
#wpwrap {
|
2 |
+
background: #fff;
|
3 |
+
}
|
4 |
+
|
5 |
+
#wpcontent {
|
6 |
+
padding: 0;
|
7 |
+
}
|
8 |
+
|
9 |
+
.wpr-settings-page-wrap {
|
10 |
+
margin: 0;
|
11 |
+
}
|
12 |
+
|
13 |
+
.wpr-settings-page-header {
|
14 |
+
display: -webkit-box;
|
15 |
+
display: -ms-flexbox;
|
16 |
+
display: flex;
|
17 |
+
-webkit-box-orient: vertical;
|
18 |
+
-webkit-box-direction: normal;
|
19 |
+
-ms-flex-direction: column;
|
20 |
+
flex-direction: column;
|
21 |
+
padding: 10px 30px 130px;
|
22 |
+
background: #f6f6f6
|
23 |
+
}
|
24 |
+
|
25 |
+
.wpr-settings-page-header h1,
|
26 |
+
.wpr-settings-page-header p,
|
27 |
+
.wpr-settings-page-header .wpr-preview-buttons,
|
28 |
+
.wpr-settings-page-header .wpr-user-template {
|
29 |
+
-webkit-box-ordinal-group: 3;
|
30 |
+
-ms-flex-order: 2;
|
31 |
+
order: 2;
|
32 |
+
}
|
33 |
+
|
34 |
+
.wpr-settings-page-header .wpr-options-button {
|
35 |
+
-ms-flex-item-align: start;
|
36 |
+
align-self: flex-start;
|
37 |
+
}
|
38 |
+
|
39 |
+
.button.wpr-options-button .dashicons {
|
40 |
+
line-height: 30px;
|
41 |
+
font-size: 16px;
|
42 |
+
}
|
43 |
+
|
44 |
+
.wpr-preview-buttons a:last-child,
|
45 |
+
.wpr-preview-buttons a.wpr-how-to-use-theme-builder {
|
46 |
+
background-color: transparent;
|
47 |
+
border: 2px solid #6A4BFF !important;
|
48 |
+
color: #6A4BFF;
|
49 |
+
padding: 5px 22px;
|
50 |
+
}
|
51 |
+
|
52 |
+
.wpr-preview-buttons a.wpr-how-to-use-woo-builder {
|
53 |
+
background-color: transparent !important;
|
54 |
+
border: 2px solid #96588a !important;
|
55 |
+
color: #96588a !important;
|
56 |
+
padding: 5px 22px;
|
57 |
+
}
|
58 |
+
|
59 |
+
.wpr-preview-buttons a.wpr-how-to-use-woo-builder:hover,
|
60 |
+
.wpr-preview-buttons a.wpr-how-to-use-woo-builder:focus {
|
61 |
+
color: #fff !important;
|
62 |
+
background: #96588a !important;
|
63 |
+
padding: 8px 22px !important;
|
64 |
+
}
|
65 |
+
|
66 |
+
.wpr-settings-page-header h1 {
|
67 |
+
font-size: 42px;
|
68 |
+
}
|
69 |
+
|
70 |
+
.wpr-settings-page-header p {
|
71 |
+
margin-top: 5px;
|
72 |
+
color: #5a5a5a;
|
73 |
+
font-size: 16px;
|
74 |
+
margin-bottom: 30px;
|
75 |
+
}
|
76 |
+
|
77 |
+
.wpr-user-template {
|
78 |
+
position: relative;
|
79 |
+
-webkit-box-sizing: border-box;
|
80 |
+
box-sizing: border-box;
|
81 |
+
overflow: hidden;
|
82 |
+
display: inline-block;
|
83 |
+
width: 220px;
|
84 |
+
height: 50px;
|
85 |
+
line-height: 50px;
|
86 |
+
padding: 0 20px;
|
87 |
+
color: #fff;
|
88 |
+
background: #6A4BFF;
|
89 |
+
font-size: 15px;
|
90 |
+
-webkit-box-shadow: 2px 2px 5px rgba(0,0,0,0.3);
|
91 |
+
box-shadow: 2px 2px 5px rgba(0,0,0,0.3);
|
92 |
+
border-radius: 5px;
|
93 |
+
cursor: pointer;
|
94 |
+
}
|
95 |
+
|
96 |
+
.wpr-user-template .plus-icon {
|
97 |
+
float: right;
|
98 |
+
display: block;
|
99 |
+
width: 30px;
|
100 |
+
height: 30px;
|
101 |
+
line-height: 28px;
|
102 |
+
margin-top: 10px;
|
103 |
+
border-radius: 50%;
|
104 |
+
color: #333;
|
105 |
+
background-color: #fff;
|
106 |
+
font-size: 18px;
|
107 |
+
text-align: center;
|
108 |
+
}
|
109 |
+
|
110 |
+
.wpr-user-template > div {
|
111 |
+
position: absolute;
|
112 |
+
top: 0;
|
113 |
+
left: 0;
|
114 |
+
width: 100%;
|
115 |
+
height: 100%;
|
116 |
+
background: rgba(0,0,0,0.5);
|
117 |
+
}
|
118 |
+
|
119 |
+
.royal-addons_page_wpr-theme-builder .wpr-preview-buttons {
|
120 |
+
display: -webkit-box;
|
121 |
+
display: -ms-flexbox;
|
122 |
+
display: flex;
|
123 |
+
-webkit-box-orient: horizontal;
|
124 |
+
-webkit-box-direction: reverse;
|
125 |
+
-ms-flex-direction: row-reverse;
|
126 |
+
flex-direction: row-reverse;
|
127 |
+
}
|
128 |
+
|
129 |
+
.royal-addons_page_wpr-theme-builder .wpr-user-template {
|
130 |
+
margin-right: auto;
|
131 |
+
}
|
132 |
+
|
133 |
+
.wpr-settings-page {
|
134 |
+
padding: 0 30px;
|
135 |
+
}
|
136 |
+
|
137 |
+
.wpr-nav-tab-wrapper {
|
138 |
+
padding-top: 0;
|
139 |
+
border-bottom: 0;
|
140 |
+
-webkit-transform: translateY(-100%);
|
141 |
+
-ms-transform: translateY(-100%);
|
142 |
+
transform: translateY(-100%);
|
143 |
+
}
|
144 |
+
|
145 |
+
.wpr-nav-tab-wrapper a {
|
146 |
+
border: 0 !important;
|
147 |
+
padding: 13px 35px;
|
148 |
+
background-color: transparent;
|
149 |
+
font-size: 16px;
|
150 |
+
margin-left: 0;
|
151 |
+
margin-right: 15px;
|
152 |
+
border-radius: 3px 4px 0 0;
|
153 |
+
color: #333;
|
154 |
+
}
|
155 |
+
|
156 |
+
.wpr-nav-tab-wrapper a:hover {
|
157 |
+
color: #6A4BFF;
|
158 |
+
background: #fff;
|
159 |
+
}
|
160 |
+
|
161 |
+
.wpr-nav-tab-wrapper .nav-tab-active {
|
162 |
+
color: #6A4BFF;
|
163 |
+
background: #fff;
|
164 |
+
-webkit-box-shadow: 3px -2px 5px rgba(0,0,0,0.03);
|
165 |
+
box-shadow: 3px -2px 5px rgba(0,0,0,0.03);
|
166 |
+
}
|
167 |
+
|
168 |
+
.wpr-nav-tab-wrapper a:focus {
|
169 |
+
-webkit-box-shadow: none;
|
170 |
+
box-shadow: none;
|
171 |
+
}
|
172 |
+
|
173 |
+
.button.wpr-options-button {
|
174 |
+
padding: 7px 22px;
|
175 |
+
border: 0;
|
176 |
+
color: #fff;
|
177 |
+
background: #6A4BFF;
|
178 |
+
-webkit-box-shadow: 2px 2px 5px rgba(0,0,0,0.3);
|
179 |
+
box-shadow: 2px 2px 5px rgba(0,0,0,0.3);
|
180 |
+
font-size: 14px;
|
181 |
+
}
|
182 |
+
|
183 |
+
.button.wpr-options-button:hover,
|
184 |
+
.button.wpr-options-button:focus {
|
185 |
+
color: #fff;
|
186 |
+
background: #6A4BFF;
|
187 |
+
border: none;
|
188 |
+
}
|
189 |
+
|
190 |
+
@media screen and (max-width: 1355px) {
|
191 |
+
.wpr-nav-tab-wrapper a {
|
192 |
+
padding: 13px 25px;
|
193 |
+
font-size: 14px;
|
194 |
+
}
|
195 |
+
}
|
196 |
+
|
197 |
+
|
198 |
+
/*--------------------------------------------------------------
|
199 |
+
== Elements
|
200 |
+
--------------------------------------------------------------*/
|
201 |
+
.wpr-elements-toggle {
|
202 |
+
overflow: hidden;
|
203 |
+
text-align: center;
|
204 |
+
}
|
205 |
+
|
206 |
+
.wpr-elements-toggle > div {
|
207 |
+
display: inline-block;
|
208 |
+
}
|
209 |
+
|
210 |
+
.wpr-elements-toggle h3 {
|
211 |
+
float: left;
|
212 |
+
font-size: 18px;
|
213 |
+
margin: 0 20px 0 0;
|
214 |
+
}
|
215 |
+
|
216 |
+
.wpr-elements-toggle p {
|
217 |
+
margin: 10px 0 60px 0;
|
218 |
+
}
|
219 |
+
|
220 |
+
.wpr-elements-heading {
|
221 |
+
text-align: center;
|
222 |
+
margin-bottom: 30px;
|
223 |
+
}
|
224 |
+
|
225 |
+
.wpr-elements-heading h3 {
|
226 |
+
font-size: 18px;
|
227 |
+
text-align: center;
|
228 |
+
margin-bottom: 0;
|
229 |
+
}
|
230 |
+
|
231 |
+
.wpr-elements-heading .wpr-install-activate-woocommerce {
|
232 |
+
color: red;
|
233 |
+
font-weight: 700;
|
234 |
+
}
|
235 |
+
|
236 |
+
.wpr-install-activate-woocommerce .dashicons {
|
237 |
+
font-size: 18px;
|
238 |
+
}
|
239 |
+
|
240 |
+
.wpr-woo-templates,
|
241 |
+
.wpr-elements {
|
242 |
+
display: -webkit-box;
|
243 |
+
display: -ms-flexbox;
|
244 |
+
display: flex;
|
245 |
+
-ms-flex-wrap: wrap;
|
246 |
+
flex-wrap: wrap;
|
247 |
+
width: 100%;
|
248 |
+
margin-bottom: 50px;
|
249 |
+
}
|
250 |
+
|
251 |
+
.wpr-woo-templates {
|
252 |
+
margin-bottom: 0;
|
253 |
+
}
|
254 |
+
|
255 |
+
.wpr-woo-template,
|
256 |
+
.wpr-element {
|
257 |
+
-webkit-box-sizing: border-box;
|
258 |
+
box-sizing: border-box;
|
259 |
+
position: relative;
|
260 |
+
width: 24%;
|
261 |
+
padding: 22px 30px;
|
262 |
+
margin-right: 1%;
|
263 |
+
margin-bottom: 20px;
|
264 |
+
-webkit-box-shadow: 0 0 15px rgba(0,0,0,0.05);
|
265 |
+
box-shadow: 0 0 15px rgba(0,0,0,0.05);
|
266 |
+
border-radius: 4px;
|
267 |
+
}
|
268 |
+
|
269 |
+
.wpr-woo-template {
|
270 |
+
width: 100%;
|
271 |
+
}
|
272 |
+
|
273 |
+
.wpr-woo-template-info {
|
274 |
+
display: -webkit-box;
|
275 |
+
display: -ms-flexbox;
|
276 |
+
display: flex;
|
277 |
+
-webkit-box-pack: justify;
|
278 |
+
-ms-flex-pack: justify;
|
279 |
+
justify-content: space-between;
|
280 |
+
margin-top: 10px;
|
281 |
+
}
|
282 |
+
|
283 |
+
.wpr-woo-template-info .wpr-woo-template-title {
|
284 |
+
display: -webkit-inline-box;
|
285 |
+
display: -ms-inline-flexbox;
|
286 |
+
display: inline-flex;
|
287 |
+
-webkit-box-orient: vertical;
|
288 |
+
-webkit-box-direction: normal;
|
289 |
+
-ms-flex-direction: column;
|
290 |
+
flex-direction: column;
|
291 |
+
}
|
292 |
+
|
293 |
+
.wpr-woo-template-title h3 {
|
294 |
+
font-weight: 600 !important;
|
295 |
+
font-size: 13px !important;
|
296 |
+
color: #3c434a !important;
|
297 |
+
}
|
298 |
+
|
299 |
+
.wpr-woo-template-title p {
|
300 |
+
margin: 0;
|
301 |
+
font-size: 12px;
|
302 |
+
}
|
303 |
+
|
304 |
+
.wpr-woo-template-info h4 {
|
305 |
+
font-size: 1em !important;
|
306 |
+
font-weight: 600 !important;
|
307 |
+
margin: 0;
|
308 |
+
}
|
309 |
+
|
310 |
+
.wpr-element-info h3 {
|
311 |
+
float: left;
|
312 |
+
margin: 0;
|
313 |
+
color: #3a3a3a;
|
314 |
+
font-size: 16px;
|
315 |
+
}
|
316 |
+
|
317 |
+
.wpr-woo-template-info label {
|
318 |
+
min-width: 45px;
|
319 |
+
}
|
320 |
+
|
321 |
+
.wpr-woo-template-info label,
|
322 |
+
.wpr-element-info label,
|
323 |
+
.wpr-elements-toggle label {
|
324 |
+
float: right;
|
325 |
+
}
|
326 |
+
|
327 |
+
.wpr-woo-template-info span,
|
328 |
+
.wpr-element-info span {
|
329 |
+
display: block;
|
330 |
+
margin-top: 3px;
|
331 |
+
color: #999;
|
332 |
+
font-style: normal;
|
333 |
+
font-size: 12px;
|
334 |
+
}
|
335 |
+
|
336 |
+
.wpr-woo-template-info a,
|
337 |
+
.wpr-element-info a {
|
338 |
+
display: block;
|
339 |
+
clear: both;
|
340 |
+
font-size: 12px;
|
341 |
+
-webkit-box-shadow: none !important;
|
342 |
+
box-shadow: none !important;
|
343 |
+
}
|
344 |
+
|
345 |
+
.wpr-woo-template-info input,
|
346 |
+
.wpr-element-info input,
|
347 |
+
.wpr-elements-toggle input,
|
348 |
+
.wpr-setting-custom-ckbox input {
|
349 |
+
position: absolute;
|
350 |
+
z-index: -1000;
|
351 |
+
left: -1000px;
|
352 |
+
overflow: hidden;
|
353 |
+
clip: rect(0 0 0 0);
|
354 |
+
height: 1px;
|
355 |
+
width: 1px;
|
356 |
+
margin: -1px;
|
357 |
+
padding: 0;
|
358 |
+
border: 0;
|
359 |
+
}
|
360 |
+
|
361 |
+
.wpr-woo-template-info label,
|
362 |
+
.wpr-element-info label,
|
363 |
+
.wpr-elements-toggle label,
|
364 |
+
.wpr-setting-custom-ckbox label {
|
365 |
+
position: relative;
|
366 |
+
display: block;
|
367 |
+
width: 45px;
|
368 |
+
height: 23px;
|
369 |
+
border-radius: 20px;
|
370 |
+
background: #e8e8e8;
|
371 |
+
cursor: pointer;
|
372 |
+
-webkit-touch-callout: none;
|
373 |
+
-webkit-user-select: none;
|
374 |
+
-moz-user-select: none;
|
375 |
+
-ms-user-select: none;
|
376 |
+
user-select: none;
|
377 |
+
-webkit-transition: all 0.2s ease-in;
|
378 |
+
-o-transition: all 0.2s ease-in;
|
379 |
+
transition: all 0.2s ease-in;
|
380 |
+
}
|
381 |
+
|
382 |
+
.wpr-woo-template-info input + label:after,
|
383 |
+
.wpr-element-info input + label:after,
|
384 |
+
.wpr-elements-toggle input + label:after,
|
385 |
+
.wpr-setting-custom-ckbox input + label:after {
|
386 |
+
content: ' ';
|
387 |
+
display: block;
|
388 |
+
position: absolute;
|
389 |
+
top: 3px;
|
390 |
+
left: 3px;
|
391 |
+
width: 17px;
|
392 |
+
height: 17px;
|
393 |
+
border-radius: 50%;
|
394 |
+
background: #fff;
|
395 |
+
-webkit-transition: all 0.2s ease-in;
|
396 |
+
-o-transition: all 0.2s ease-in;
|
397 |
+
transition: all 0.2s ease-in;
|
398 |
+
}
|
399 |
+
|
400 |
+
.wpr-woo-template-info input:checked + label,
|
401 |
+
.wpr-element-info input:checked + label,
|
402 |
+
.wpr-elements-toggle input:checked + label,
|
403 |
+
.wpr-setting-custom-ckbox input:checked + label {
|
404 |
+
background: #6A4BFF;
|
405 |
+
}
|
406 |
+
|
407 |
+
.wpr-woo-template-info input:checked + label:after,
|
408 |
+
.wpr-element-info input:checked + label:after,
|
409 |
+
.wpr-elements-toggle input:checked + label:after,
|
410 |
+
.wpr-setting-custom-ckbox input:checked + label:after {
|
411 |
+
left: 24px;
|
412 |
+
}
|
413 |
+
|
414 |
+
.wpr-new-element:before {
|
415 |
+
content: 'NEW';
|
416 |
+
position: absolute;
|
417 |
+
top: -10px;
|
418 |
+
left: 28px;
|
419 |
+
padding: 1px 7px;
|
420 |
+
color: #fff;
|
421 |
+
background-color: #f44;
|
422 |
+
border-radius: 3px;
|
423 |
+
font-size: 10px;
|
424 |
+
font-weight: bold;
|
425 |
+
letter-spacing: 1px;
|
426 |
+
}
|
427 |
+
|
428 |
+
.wpr-pro-element:before {
|
429 |
+
content: 'PRO';
|
430 |
+
position: absolute;
|
431 |
+
top: -10px;
|
432 |
+
left: 28px;
|
433 |
+
z-index: 10;
|
434 |
+
padding: 1px 7px;
|
435 |
+
color: #fff;
|
436 |
+
background-color: #f44;
|
437 |
+
border-radius: 3px;
|
438 |
+
font-size: 10px;
|
439 |
+
font-weight: bold;
|
440 |
+
letter-spacing: 1px;
|
441 |
+
}
|
442 |
+
|
443 |
+
.wpr-pro-element > a {
|
444 |
+
display: block;
|
445 |
+
position: absolute;
|
446 |
+
top: 0;
|
447 |
+
left: 0;
|
448 |
+
z-index: 1;
|
449 |
+
width: 100%;
|
450 |
+
height: 100%;
|
451 |
+
background: rgba(0,0,0,0.1);
|
452 |
+
}
|
453 |
+
|
454 |
+
/*--------------------------------------------------------------
|
455 |
+
== My Templates
|
456 |
+
--------------------------------------------------------------*/
|
457 |
+
.wpr-my-templates-list {
|
458 |
+
width: 65%;
|
459 |
+
}
|
460 |
+
|
461 |
+
@media screen and (max-width: 1400px) {
|
462 |
+
.wpr-my-templates-list {
|
463 |
+
width: 100%;
|
464 |
+
}
|
465 |
+
}
|
466 |
+
|
467 |
+
.wpr-activate-woo-notice,
|
468 |
+
.wpr-my-templates-list li {
|
469 |
+
overflow: hidden;
|
470 |
+
padding: 20px 35px;
|
471 |
+
margin-bottom: 15px;
|
472 |
+
-webkit-box-shadow: 0 0 2px rgba(0,0,0,0.2);
|
473 |
+
box-shadow: 0 0 2px rgba(0,0,0,0.2);
|
474 |
+
}
|
475 |
+
|
476 |
+
.wpr-my-templates-list li h3 {
|
477 |
+
float: left;
|
478 |
+
margin: 0;
|
479 |
+
color: #555;
|
480 |
+
font-size: 16px;
|
481 |
+
line-height: 34px;
|
482 |
+
text-transform: capitalize;
|
483 |
+
}
|
484 |
+
|
485 |
+
.wpr-my-templates-list .wpr-action-buttons {
|
486 |
+
float: right;
|
487 |
+
}
|
488 |
+
|
489 |
+
.wpr-my-templates-list .wpr-template-conditions {
|
490 |
+
background: #b3b3b3;
|
491 |
+
}
|
492 |
+
|
493 |
+
.wpr-active-conditions-template .wpr-template-conditions {
|
494 |
+
background: #7a5ffd;
|
495 |
+
}
|
496 |
+
|
497 |
+
.wpr-my-templates-list .wpr-template-conditions:hover,
|
498 |
+
.wpr-active-conditions-template .wpr-template-conditions:hover {
|
499 |
+
background: #6A4BFF;
|
500 |
+
}
|
501 |
+
|
502 |
+
.wpr-my-templates-list .wpr-edit-template {
|
503 |
+
background: #646464;
|
504 |
+
}
|
505 |
+
|
506 |
+
.wpr-my-templates-list .wpr-edit-template:hover {
|
507 |
+
background: #535353;
|
508 |
+
}
|
509 |
+
|
510 |
+
.wpr-edit-template:focus {
|
511 |
+
-webkit-box-shadow: none !important;
|
512 |
+
box-shadow: none !important;
|
513 |
+
}
|
514 |
+
|
515 |
+
.wpr-my-templates-list .wpr-delete-template {
|
516 |
+
background: #ff5a4b;
|
517 |
+
}
|
518 |
+
|
519 |
+
.wpr-my-templates-list .wpr-delete-template:hover {
|
520 |
+
background: #FF4635;
|
521 |
+
}
|
522 |
+
|
523 |
+
.wpr-my-templates-list .wpr-action-buttons > * {
|
524 |
+
display: inline-block;
|
525 |
+
padding: 3px 20px;
|
526 |
+
margin-right: 10px;
|
527 |
+
border: 0;
|
528 |
+
letter-spacing: 0.5px;
|
529 |
+
}
|
530 |
+
|
531 |
+
.wpr-my-templates-list .wpr-action-buttons > *:last-child {
|
532 |
+
margin-right: 0;
|
533 |
+
}
|
534 |
+
|
535 |
+
.wpr-my-templates-list .wpr-action-buttons .dashicons {
|
536 |
+
font-size: 16px;
|
537 |
+
line-height: 30px;
|
538 |
+
}
|
539 |
+
|
540 |
+
.wpr-active-conditions-template {
|
541 |
+
border-left: 5px solid #6A4BFF;
|
542 |
+
background: #F6F7F7;
|
543 |
+
}
|
544 |
+
|
545 |
+
.wpr-my-templates-list .wpr-no-templates {
|
546 |
+
background: #fff !important;
|
547 |
+
}
|
548 |
+
|
549 |
+
|
550 |
+
/*--------------------------------------------------------------
|
551 |
+
== Settings
|
552 |
+
--------------------------------------------------------------*/
|
553 |
+
.wpr-settings-group:first-of-type {
|
554 |
+
margin-top: 50px;
|
555 |
+
}
|
556 |
+
|
557 |
+
.wpr-settings-group {
|
558 |
+
position: relative;
|
559 |
+
width: 35%;
|
560 |
+
background: #f9f9f9;
|
561 |
+
padding: 30px;
|
562 |
+
margin-bottom: 80px;
|
563 |
+
-webkit-box-shadow: 1px 2px 3px rgba(0,0,0,0.1);
|
564 |
+
box-shadow: 1px 2px 3px rgba(0,0,0,0.1);
|
565 |
+
border-radius: 0 3px 3px 3px;
|
566 |
+
}
|
567 |
+
|
568 |
+
.wpr-settings-group-inner {
|
569 |
+
position: relative;
|
570 |
+
}
|
571 |
+
|
572 |
+
.wpr-settings-group-title {
|
573 |
+
position: absolute;
|
574 |
+
top: 0;
|
575 |
+
left: 0;
|
576 |
+
-webkit-transform: translateY(-100%);
|
577 |
+
-ms-transform: translateY(-100%);
|
578 |
+
transform: translateY(-100%);
|
579 |
+
padding: 10px 30px;
|
580 |
+
background: #f9f9f9;
|
581 |
+
margin: 0;
|
582 |
+
-webkit-box-shadow: 0 -2px 3px rgba(0,0,0,0.05);
|
583 |
+
box-shadow: 0 -2px 3px rgba(0,0,0,0.05);
|
584 |
+
border-radius: 3px 3px 0 0;
|
585 |
+
color: #6A4BFF;
|
586 |
+
font-size: 14px;
|
587 |
+
}
|
588 |
+
|
589 |
+
.wpr-setting {
|
590 |
+
margin-bottom: 20px;
|
591 |
+
}
|
592 |
+
|
593 |
+
.wpr-setting h4 {
|
594 |
+
margin-bottom: 8px;
|
595 |
+
}
|
596 |
+
|
597 |
+
.wpr-setting input:not(input[type='checkbox']) {
|
598 |
+
border: 1px solid #e8e8e8;
|
599 |
+
width: 100%;
|
600 |
+
padding: 5px 15px;
|
601 |
+
}
|
602 |
+
|
603 |
+
.wpr-setting input[type='checkbox'] {
|
604 |
+
margin-right: 8px;
|
605 |
+
}
|
606 |
+
|
607 |
+
.wpr-settings .submit:first-of-type {
|
608 |
+
margin-top: 0;
|
609 |
+
padding-top: 0;
|
610 |
+
margin-bottom: 70px;
|
611 |
+
}
|
612 |
+
|
613 |
+
.wp-picker-clear {
|
614 |
+
width: 100px !important;
|
615 |
+
}
|
616 |
+
|
617 |
+
/*--------------------------------------------------------------
|
618 |
+
== Conditions
|
619 |
+
--------------------------------------------------------------*/
|
620 |
+
.wpr-admin-popup-wrap {
|
621 |
+
display: none;
|
622 |
+
position: fixed;
|
623 |
+
top: 0;
|
624 |
+
left: 0;
|
625 |
+
z-index: 9999;
|
626 |
+
background-color: rgba(0, 0, 0, 0.6);
|
627 |
+
width: 100%;
|
628 |
+
height: 100%;
|
629 |
+
}
|
630 |
+
|
631 |
+
.wpr-admin-popup {
|
632 |
+
display: -webkit-box;
|
633 |
+
display: -ms-flexbox;
|
634 |
+
display: flex;
|
635 |
+
-ms-flex-pack: distribute;
|
636 |
+
justify-content: space-around;
|
637 |
+
-webkit-box-align: center;
|
638 |
+
-ms-flex-align: center;
|
639 |
+
align-items: center;
|
640 |
+
-webkit-box-orient: vertical;
|
641 |
+
-webkit-box-direction: normal;
|
642 |
+
-ms-flex-direction: column;
|
643 |
+
flex-direction: column;
|
644 |
+
position: absolute;
|
645 |
+
top: 50%;
|
646 |
+
left: 50%;
|
647 |
+
-webkit-transform: translate(-50%,-50%);
|
648 |
+
-ms-transform: translate(-50%,-50%);
|
649 |
+
transform: translate(-50%,-50%);
|
650 |
+
width: 80%;
|
651 |
+
max-width: 850px;
|
652 |
+
padding: 70px 20px 20px 20px;
|
653 |
+
background-color: #F1F3F5;
|
654 |
+
}
|
655 |
+
|
656 |
+
|
657 |
+
.wpr-admin-popup .close-popup {
|
658 |
+
position: absolute;
|
659 |
+
top: 10px;
|
660 |
+
right: 15px;
|
661 |
+
font-size: 26px;
|
662 |
+
cursor: pointer;
|
663 |
+
color: #59626a;
|
664 |
+
}
|
665 |
+
|
666 |
+
.wpr-conditions.wpr-tab-archive .global-condition-select,
|
667 |
+
.wpr-conditions.wpr-tab-archive .singles-condition-select,
|
668 |
+
.wpr-conditions.wpr-tab-product_archive .global-condition-select,
|
669 |
+
.wpr-conditions.wpr-tab-product_archive .singles-condition-select,
|
670 |
+
.wpr-conditions.wpr-tab-single .global-condition-select,
|
671 |
+
.wpr-conditions.wpr-tab-single .archives-condition-select,
|
672 |
+
.wpr-conditions.wpr-tab-product_single .global-condition-select,
|
673 |
+
.wpr-conditions.wpr-tab-product_single .archives-condition-select {
|
674 |
+
display: none !important;
|
675 |
+
}
|
676 |
+
|
677 |
+
.wpr-conditions-wrap.blog-posts .singles-condition-select option:nth-child(1),
|
678 |
+
.wpr-conditions-wrap.blog-posts .singles-condition-select option:nth-child(2),
|
679 |
+
.wpr-conditions-wrap.blog-posts .singles-condition-select option:nth-child(3) {
|
680 |
+
/*display: none;*/
|
681 |
+
}
|
682 |
+
|
683 |
+
.wpr-conditions.wpr-tab-archive .archives-condition-select,
|
684 |
+
.wpr-conditions.wpr-tab-product_archive .archives-condition-select,
|
685 |
+
.wpr-conditions.wpr-tab-single .singles-condition-select,
|
686 |
+
.wpr-conditions.wpr-tab-product_single .singles-condition-select {
|
687 |
+
display: block !important;
|
688 |
+
}
|
689 |
+
|
690 |
+
.wpr-conditions-sample {
|
691 |
+
display: none !important;
|
692 |
+
}
|
693 |
+
|
694 |
+
.wpr-conditions {
|
695 |
+
position: relative;
|
696 |
+
display: -webkit-box;
|
697 |
+
display: -ms-flexbox;
|
698 |
+
display: flex;
|
699 |
+
-webkit-box-align: center;
|
700 |
+
-ms-flex-align: center;
|
701 |
+
align-items: center;
|
702 |
+
margin-top: 10px;
|
703 |
+
width: 600px;
|
704 |
+
border-radius: 3px;
|
705 |
+
border: 1px solid #e8e8e8;
|
706 |
+
background: #fff;
|
707 |
+
}
|
708 |
+
|
709 |
+
.wpr-admin-popup header {
|
710 |
+
margin-top: 0;
|
711 |
+
margin-bottom: 20px;
|
712 |
+
text-align: center;
|
713 |
+
}
|
714 |
+
|
715 |
+
.wpr-admin-popup header h2 {
|
716 |
+
margin: 25px auto;
|
717 |
+
font-size: 26px;
|
718 |
+
color: #59626a;
|
719 |
+
}
|
720 |
+
|
721 |
+
.wpr-admin-popup header p {
|
722 |
+
margin-top: 0;
|
723 |
+
margin-bottom: 0;
|
724 |
+
color: #7f8b96;
|
725 |
+
}
|
726 |
+
|
727 |
+
.wpr-conditions select {
|
728 |
+
height: 35px;
|
729 |
+
height: 100%;
|
730 |
+
padding-top: 5px;
|
731 |
+
padding-bottom: 5px;
|
732 |
+
border-radius: 0;
|
733 |
+
border: none;
|
734 |
+
-webkit-box-flex: 1;
|
735 |
+
-ms-flex-positive: 1;
|
736 |
+
flex-grow: 1;
|
737 |
+
border-right: 1px solid #e8e8e8 !important;
|
738 |
+
background-size: 14px 14px;
|
739 |
+
}
|
740 |
+
|
741 |
+
span.wpr-add-conditions {
|
742 |
+
margin-top: 30px;
|
743 |
+
background: #A4AFB7;
|
744 |
+
color: #fff;
|
745 |
+
font-weight: 600;
|
746 |
+
letter-spacing: 1px;
|
747 |
+
text-transform: uppercase;
|
748 |
+
padding: 8px 20px;
|
749 |
+
border-radius: 3px;
|
750 |
+
cursor: pointer;
|
751 |
+
}
|
752 |
+
|
753 |
+
span.wpr-add-conditions:hover {
|
754 |
+
background: #848c92;
|
755 |
+
}
|
756 |
+
|
757 |
+
input.wpr-condition-input-ids {
|
758 |
+
display: none;
|
759 |
+
padding: 5px;
|
760 |
+
outline: none;
|
761 |
+
border: none;
|
762 |
+
border-radius: 0;
|
763 |
+
}
|
764 |
+
|
765 |
+
input.wpr-condition-input-ids,
|
766 |
+
.wpr-conditions select {
|
767 |
+
-ms-flex-negative: 0;
|
768 |
+
flex-shrink: 0;
|
769 |
+
-webkit-box-flex: 1;
|
770 |
+
-ms-flex-positive: 1;
|
771 |
+
flex-grow: 1;
|
772 |
+
max-width: none;
|
773 |
+
border: none;
|
774 |
+
-webkit-box-shadow: none !important;
|
775 |
+
box-shadow: none !important;
|
776 |
+
outline: none;
|
777 |
+
margin: 0;
|
778 |
+
text-indent: 5px;
|
779 |
+
}
|
780 |
+
|
781 |
+
.wpr-canvas-condition {
|
782 |
+
display: none;
|
783 |
+
margin-top: 20px;
|
784 |
+
}
|
785 |
+
|
786 |
+
.wpr-canvas-condition label {
|
787 |
+
display: inline-block;
|
788 |
+
}
|
789 |
+
|
790 |
+
.wpr-canvas-condition span {
|
791 |
+
margin-right: 20px;
|
792 |
+
}
|
793 |
+
|
794 |
+
#wpr-woo-products-per-page {
|
795 |
+
width: 40px;
|
796 |
+
border: 1px solid #e8e8e8;
|
797 |
+
text-align: center;
|
798 |
+
-webkit-box-shadow: none !important;
|
799 |
+
box-shadow: none !important;
|
800 |
+
margin-left: 10px;
|
801 |
+
}
|
802 |
+
|
803 |
+
.wpr-delete-template-conditions {
|
804 |
+
margin-left: auto;
|
805 |
+
position: absolute;
|
806 |
+
right: -30px;
|
807 |
+
color: #C2CBD2;
|
808 |
+
font-size: 22px;
|
809 |
+
cursor: pointer;
|
810 |
+
}
|
811 |
+
|
812 |
+
.wpr-delete-template-conditions:hover {
|
813 |
+
color: #81868a;
|
814 |
+
}
|
815 |
+
|
816 |
+
.wpr-save-conditions {
|
817 |
+
padding: 8px 20px;
|
818 |
+
color: #fff;
|
819 |
+
background: #6A4BFF;
|
820 |
+
margin-left: auto;
|
821 |
+
border-radius: 3px;
|
822 |
+
margin-top: 80px;
|
823 |
+
text-transform: uppercase;
|
824 |
+
letter-spacing: 0.5px;
|
825 |
+
font-weight: 600;
|
826 |
+
cursor: pointer;
|
827 |
+
}
|
828 |
+
|
829 |
+
.wpr-user-template-popup {
|
830 |
+
padding-top: 40px;
|
831 |
+
}
|
832 |
+
|
833 |
+
.wpr-user-template-popup header {
|
834 |
+
margin-bottom: 27px;
|
835 |
+
}
|
836 |
+
|
837 |
+
.wpr-user-template-popup .wpr-create-template {
|
838 |
+
padding: 11px 20px;
|
839 |
+
margin: 25px auto;
|
840 |
+
color: #fff;
|
841 |
+
background: #6A4BFF;
|
842 |
+
border-radius: 3px;
|
843 |
+
cursor: pointer;
|
844 |
+
}
|
845 |
+
|
846 |
+
.wpr-user-template-popup p {
|
847 |
+
max-width: 70%;
|
848 |
+
margin: auto;
|
849 |
+
}
|
850 |
+
|
851 |
+
input.wpr-user-template-title {
|
852 |
+
width: 350px;
|
853 |
+
border: 1px solid #d1d1d1;
|
854 |
+
padding: 5px 10px;
|
855 |
+
border-radius: 3px;
|
856 |
+
}
|
857 |
+
|
858 |
+
input.wpr-user-template-title::-webkit-input-placeholder,
|
859 |
+
input.wpr-condition-input-ids::-webkit-input-placeholder {
|
860 |
+
color: #9a9a9a;
|
861 |
+
}
|
862 |
+
|
863 |
+
input.wpr-user-template-title::-moz-placeholder,
|
864 |
+
input.wpr-condition-input-ids::-moz-placeholder {
|
865 |
+
color: #9a9a9a;
|
866 |
+
}
|
867 |
+
|
868 |
+
input.wpr-user-template-title:-ms-input-placeholder,
|
869 |
+
input.wpr-condition-input-ids:-ms-input-placeholder {
|
870 |
+
color: #9a9a9a;
|
871 |
+
}
|
872 |
+
|
873 |
+
input.wpr-user-template-title::-ms-input-placeholder,
|
874 |
+
input.wpr-condition-input-ids::-ms-input-placeholder {
|
875 |
+
color: #9a9a9a;
|
876 |
+
}
|
877 |
+
|
878 |
+
input.wpr-user-template-title::-webkit-input-placeholder, input.wpr-condition-input-ids::-webkit-input-placeholder {
|
879 |
+
color: #9a9a9a;
|
880 |
+
}
|
881 |
+
|
882 |
+
input.wpr-user-template-title::-moz-placeholder, input.wpr-condition-input-ids::-moz-placeholder {
|
883 |
+
color: #9a9a9a;
|
884 |
+
}
|
885 |
+
|
886 |
+
input.wpr-user-template-title:-ms-input-placeholder, input.wpr-condition-input-ids:-ms-input-placeholder {
|
887 |
+
color: #9a9a9a;
|
888 |
+
}
|
889 |
+
|
890 |
+
input.wpr-user-template-title::-ms-input-placeholder, input.wpr-condition-input-ids::-ms-input-placeholder {
|
891 |
+
color: #9a9a9a;
|
892 |
+
}
|
893 |
+
|
894 |
+
input.wpr-user-template-title::placeholder,
|
895 |
+
input.wpr-condition-input-ids::placeholder {
|
896 |
+
color: #9a9a9a;
|
897 |
+
}
|
898 |
+
|
899 |
+
input.wpr-user-template-title:focus {
|
900 |
+
border-color: #6A4BFF;
|
901 |
+
-webkit-box-shadow: none;
|
902 |
+
box-shadow: none;
|
903 |
+
}
|
904 |
+
|
905 |
+
/*--------------------------------------------------------------
|
906 |
+
== White Label
|
907 |
+
--------------------------------------------------------------*/
|
908 |
+
.wpr-wl-tab-content {
|
909 |
+
display: -webkit-box;
|
910 |
+
display: -ms-flexbox;
|
911 |
+
display: flex;
|
912 |
+
-webkit-box-align: start;
|
913 |
+
-ms-flex-align: start;
|
914 |
+
align-items: flex-start;
|
915 |
+
}
|
916 |
+
|
917 |
+
.wpr-wl-tab-content .wpr-settings-group:last-of-type {
|
918 |
+
margin-top: 50px;
|
919 |
+
margin-left: 50px;
|
920 |
+
}
|
921 |
+
|
922 |
+
.wpr-setting-custom-img-upload div button {
|
923 |
+
display: -webkit-box;
|
924 |
+
display: -ms-flexbox;
|
925 |
+
display: flex;
|
926 |
+
-webkit-box-align: center;
|
927 |
+
-ms-flex-align: center;
|
928 |
+
align-items: center;
|
929 |
+
margin-top: 10px;
|
930 |
+
padding: 10px 20px;
|
931 |
+
background: #ffffff;
|
932 |
+
border: 1px solid #e8e8e8;
|
933 |
+
border-radius: 3px;
|
934 |
+
font-weight: bold;
|
935 |
+
cursor: pointer;
|
936 |
+
}
|
937 |
+
|
938 |
+
.wpr-setting-custom-img-upload div button span {
|
939 |
+
margin-left: 5px;
|
940 |
+
}
|
941 |
+
|
942 |
+
.wpr-setting-custom-img-upload div button img {
|
943 |
+
width: 50px;
|
944 |
+
}
|
945 |
+
|
946 |
+
.wpr-setting-custom-ckbox h4 {
|
947 |
+
display: -webkit-box;
|
948 |
+
display: -ms-flexbox;
|
949 |
+
display: flex;
|
950 |
+
-webkit-box-orient: horizontal;
|
951 |
+
-webkit-box-direction: normal;
|
952 |
+
-ms-flex-direction: row;
|
953 |
+
flex-direction: row;
|
954 |
+
-webkit-box-pack: justify;
|
955 |
+
-ms-flex-pack: justify;
|
956 |
+
justify-content: space-between;
|
957 |
+
}
|
958 |
+
|
959 |
+
.wpr-setting-custom-ckbox label {
|
960 |
+
background: #dddbdb;
|
961 |
+
}
|
962 |
+
|
963 |
+
.wpr-setting-custom-ckbox p {
|
964 |
+
color: #a09f9f;
|
965 |
+
}
|
966 |
+
|
967 |
+
/*--------------------------------------------------------------
|
968 |
+
== Freemius
|
969 |
+
--------------------------------------------------------------*/
|
970 |
+
#fs_connect {
|
971 |
+
margin: 40px !important;
|
972 |
+
width: 615px !important;
|
973 |
+
border-top: 3px solid #2271B1 !important;
|
974 |
+
}
|
975 |
+
|
976 |
+
#fs_connect .fs-content {
|
977 |
+
padding: 25px 20px 35px 20px !important;
|
978 |
+
}
|
979 |
+
|
980 |
+
#fs_connect .fs-visual {
|
981 |
+
background: transparent !important;
|
982 |
+
}
|
983 |
+
|
984 |
+
#fs_connect .fs-visual .fs-site-icon,
|
985 |
+
#fs_connect .fs-visual .fs-plugin-icon,
|
986 |
+
#fs_connect .fs-visual .fs-connect-logo {
|
987 |
+
top: 20px !important;
|
988 |
+
}
|
989 |
+
|
990 |
+
#fs_connect .fs-visual .fs-plugin-icon,
|
991 |
+
#fs_connect .fs-visual .fs-connect-logo,
|
992 |
+
#fs_connect .fs-visual .fs-site-icon {
|
993 |
+
border: none !important;
|
994 |
+
}
|
995 |
+
|
996 |
+
#fs_connect .fs-visual .fs-site-icon i,
|
997 |
+
#fs_connect .fs-visual img{
|
998 |
+
overflow: hidden !important;
|
999 |
+
border-radius: 100px !important;
|
1000 |
+
}
|
1001 |
+
|
1002 |
+
#fs_connect .fs-actions {
|
1003 |
+
border-top: 1px solid #F2F2F2 !important;
|
1004 |
+
background: #F2F2F2 !important;
|
1005 |
+
}
|
1006 |
+
|
1007 |
+
#fs_connect .fs-actions .button {
|
1008 |
+
font-size: 14px !important;
|
1009 |
+
}
|
1010 |
+
|
1011 |
+
#fs_connect .fs-actions .button.button-secondary {
|
1012 |
+
padding: 0 25px !important;
|
1013 |
+
}
|
1014 |
+
|
1015 |
+
#fs_connect .fs-permissions {
|
1016 |
+
margin-top: 20px !important;
|
1017 |
+
}
|
1018 |
+
|
1019 |
+
#fs_connect .fs-permissions>.fs-trigger {
|
1020 |
+
-webkit-box-shadow: none !important;
|
1021 |
+
box-shadow: none !important;
|
1022 |
+
}
|
1023 |
+
|
1024 |
+
#fs_connect .fs-permissions.fs-open ul {
|
1025 |
+
margin: 30px 20px !important;
|
1026 |
+
}
|
1027 |
+
|
1028 |
+
#fs_connect .fs-permissions ul li {
|
1029 |
+
margin-bottom: 20px !important;
|
1030 |
+
}
|
1031 |
+
|
1032 |
+
#fs_connect .fs-permissions ul li .fs-permission-description span {
|
1033 |
+
font-size: 12px !important;
|
1034 |
+
text-transform: capitalize !important;
|
1035 |
+
}
|
1036 |
+
|
1037 |
+
#fs_connect .fs-permissions ul li .fs-permission-description p {
|
1038 |
+
font-size: 11px !important;
|
1039 |
+
margin-top: 0 !important;
|
1040 |
+
}
|
1041 |
+
|
1042 |
+
#fs_connect .fs-license-key-container {
|
1043 |
+
width: 100% !important;
|
1044 |
+
margin-top: 20px;
|
1045 |
+
}
|
1046 |
+
|
1047 |
+
#pframe,
|
1048 |
+
#fs_connect.require-license-key .fs-permissions,
|
1049 |
+
#fs_connect.require-license-key .fs-terms,
|
1050 |
+
#fs_connect .fs-freemium-licensing,
|
1051 |
+
#license_issues_link {
|
1052 |
+
display: none !important;
|
1053 |
+
}
|
1054 |
+
|
1055 |
+
/*--------------------------------------------------------------
|
1056 |
+
== Settings: Pro Options
|
1057 |
+
--------------------------------------------------------------*/
|
1058 |
+
.wpr-settings-pro-overlay {
|
1059 |
+
display: -webkit-box;
|
1060 |
+
display: -ms-flexbox;
|
1061 |
+
display: flex;
|
1062 |
+
-webkit-box-orient: vertical;
|
1063 |
+
-webkit-box-direction: normal;
|
1064 |
+
-ms-flex-direction: column;
|
1065 |
+
flex-direction: column;
|
1066 |
+
-webkit-box-align: center;
|
1067 |
+
-ms-flex-align: center;
|
1068 |
+
align-items: center;
|
1069 |
+
-webkit-box-pack: center;
|
1070 |
+
-ms-flex-pack: center;
|
1071 |
+
justify-content: center;
|
1072 |
+
position: absolute;
|
1073 |
+
top: 0;
|
1074 |
+
left: 0;
|
1075 |
+
width: 100%;
|
1076 |
+
height: 100%;
|
1077 |
+
background: rgba(0,0,0,0.4);
|
1078 |
+
color: #f9f9f9;
|
1079 |
+
font-size: 16px;
|
1080 |
+
text-decoration: none;
|
1081 |
+
text-transform: uppercase;
|
1082 |
+
font-weight: bold;
|
1083 |
+
|
1084 |
+
text-shadow: 1px 1px 1px #000;
|
1085 |
+
-webkit-box-shadow: 1px 1px 15px rgba(0,0,0,0.3);
|
1086 |
+
box-shadow: 1px 1px 15px rgba(0,0,0,0.3);
|
1087 |
+
}
|
1088 |
+
|
1089 |
+
.wpr-settings-pro-overlay:hover,
|
1090 |
+
.wpr-settings-pro-overlay:focus{
|
1091 |
+
color: #f9f9f9;
|
1092 |
+
}
|
1093 |
+
|
1094 |
+
.wpr-settings-pro-overlay .dashicons {
|
1095 |
+
font-size: 50px;
|
1096 |
+
line-height: 50px;
|
1097 |
+
margin-bottom: 40px;
|
1098 |
+
-webkit-transform: translateX(-50%);
|
1099 |
+
-ms-transform: translateX(-50%);
|
1100 |
+
transform: translateX(-50%);
|
1101 |
+
}
|
1102 |
+
|
1103 |
+
.wpr-settings-pro-overlay .dashicons:nth-child(2) {
|
1104 |
+
display: none;
|
1105 |
+
}
|
1106 |
+
|
1107 |
+
.wpr-settings-pro-overlay:hover .dashicons:nth-child(2) {
|
1108 |
+
display: block;
|
1109 |
+
}
|
1110 |
+
|
1111 |
+
.wpr-settings-pro-overlay:hover .dashicons:nth-child(1) {
|
1112 |
+
display: none;
|
1113 |
+
}.example {
|
1114 |
+
display: -ms-grid;
|
1115 |
+
display: grid;
|
1116 |
+
-webkit-transition: all .5s;
|
1117 |
+
-o-transition: all .5s;
|
1118 |
+
transition: all .5s;
|
1119 |
+
-webkit-user-select: none;
|
1120 |
+
-moz-user-select: none;
|
1121 |
+
-ms-user-select: none;
|
1122 |
+
user-select: none;
|
1123 |
+
background: -webkit-gradient(linear, left top, left bottom, from(white), to(black));
|
1124 |
+
background: -o-linear-gradient(top, white, black);
|
1125 |
+
background: linear-gradient(to bottom, white, black);
|
1126 |
+
}
|
1127 |
+
|
1128 |
+
/* Disable Notices */
|
1129 |
+
.notice:not(.wpr-plugin-update-notice),
|
1130 |
+
div.fs-notice.updated, div.fs-notice.success {
|
1131 |
+
display: none !important;
|
1132 |
}
|
assets/css/admin/premade-blocks.css
CHANGED
@@ -1,443 +1,443 @@
|
|
1 |
-
#wpcontent {
|
2 |
-
padding: 0;
|
3 |
-
}
|
4 |
-
|
5 |
-
.wpr-settings-page-header {
|
6 |
-
padding: 10px 30px 30px;
|
7 |
-
}
|
8 |
-
|
9 |
-
.wpr-settings-page-header h1 {
|
10 |
-
font-size: 42px;
|
11 |
-
}
|
12 |
-
|
13 |
-
.wpr-settings-page-header p {
|
14 |
-
margin-top: 5px;
|
15 |
-
color: #5a5a5a;
|
16 |
-
font-size: 16px;
|
17 |
-
margin-bottom: 30px;
|
18 |
-
}
|
19 |
-
|
20 |
-
.wpr-premade-blocks-tutorial {
|
21 |
-
display: inline-block;
|
22 |
-
margin-left: 45px;
|
23 |
-
padding: 9px 25px;
|
24 |
-
border: 0;
|
25 |
-
color: #fff;
|
26 |
-
background: #6A4BFF;
|
27 |
-
-webkit-box-shadow: 2px 2px 5px rgb(0 0 0 / 30%);
|
28 |
-
box-shadow: 2px 2px 5px rgb(0 0 0 / 30%);
|
29 |
-
font-size: 14px;
|
30 |
-
text-decoration: none;
|
31 |
-
border-radius: 3px;
|
32 |
-
}
|
33 |
-
|
34 |
-
.wpr-premade-blocks-tutorial:hover,
|
35 |
-
.wpr-premade-blocks-tutorial:focus {
|
36 |
-
color: #fff;
|
37 |
-
background: #5a39fb;
|
38 |
-
}
|
39 |
-
|
40 |
-
.wpr-tplib-content-wrap {
|
41 |
-
}
|
42 |
-
|
43 |
-
.wpr-tplib-sidebar {
|
44 |
-
padding: 30px;
|
45 |
-
display: -webkit-box;
|
46 |
-
display: -ms-flexbox;
|
47 |
-
display: flex;
|
48 |
-
}
|
49 |
-
|
50 |
-
.wpr-tplib-sidebar .wpr-tplib-search {
|
51 |
-
display: none;
|
52 |
-
position: relative;
|
53 |
-
margin: 30px 0;
|
54 |
-
}
|
55 |
-
|
56 |
-
.wpr-tplib-sidebar .wpr-tplib-search i {
|
57 |
-
position: absolute;
|
58 |
-
top: 50%;
|
59 |
-
right: 10px;
|
60 |
-
font-size: 12px;
|
61 |
-
-webkit-transform: translateY(-50%);
|
62 |
-
-ms-transform: translateY(-50%);
|
63 |
-
transform: translateY(-50%);
|
64 |
-
}
|
65 |
-
|
66 |
-
.wpr-tplib-sidebar .wpr-tplib-search input {
|
67 |
-
width: 100%;
|
68 |
-
padding: 8px 10px;
|
69 |
-
border: 0;
|
70 |
-
border-bottom: 1px solid #efefef;
|
71 |
-
}
|
72 |
-
|
73 |
-
.wpr-tplib-sidebar .wpr-tplib-search input::-webkit-input-placeholder {
|
74 |
-
color: #9a9a9a;
|
75 |
-
}
|
76 |
-
|
77 |
-
.wpr-tplib-sidebar .wpr-tplib-search input::-moz-placeholder {
|
78 |
-
color: #9a9a9a;
|
79 |
-
}
|
80 |
-
|
81 |
-
.wpr-tplib-sidebar .wpr-tplib-search input:-ms-input-placeholder {
|
82 |
-
color: #9a9a9a;
|
83 |
-
}
|
84 |
-
|
85 |
-
.wpr-tplib-sidebar .wpr-tplib-search input::-ms-input-placeholder {
|
86 |
-
color: #9a9a9a;
|
87 |
-
}
|
88 |
-
|
89 |
-
.wpr-tplib-sidebar .wpr-tplib-search input::placeholder {
|
90 |
-
color: #9a9a9a;
|
91 |
-
}
|
92 |
-
|
93 |
-
.wpr-tplib-filters-wrap {
|
94 |
-
display: -webkit-box;
|
95 |
-
display: -ms-flexbox;
|
96 |
-
display: flex;
|
97 |
-
}
|
98 |
-
|
99 |
-
.wpr-tplib-sub-filters {
|
100 |
-
display: none;
|
101 |
-
margin-left: 20px;
|
102 |
-
}
|
103 |
-
|
104 |
-
.wpr-tplib-sub-filters ul {
|
105 |
-
display: -webkit-box;
|
106 |
-
display: -ms-flexbox;
|
107 |
-
display: flex;
|
108 |
-
}
|
109 |
-
|
110 |
-
.wpr-tplib-sub-filters ul li {
|
111 |
-
padding: 10px 25px;
|
112 |
-
margin-right: 7px;
|
113 |
-
line-height: 15px;
|
114 |
-
font-size: 13px;
|
115 |
-
font-weight: normal;
|
116 |
-
background: #fff;
|
117 |
-
-webkit-box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
|
118 |
-
box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
|
119 |
-
cursor: pointer;
|
120 |
-
border-radius: 3px;
|
121 |
-
}
|
122 |
-
|
123 |
-
.wpr-tplib-sub-filters ul li:hover,
|
124 |
-
.wpr-tplib-sub-filters ul .wpr-tplib-activ-filter {
|
125 |
-
background: #6A4BFF;
|
126 |
-
color: #fff;
|
127 |
-
}
|
128 |
-
|
129 |
-
.wpr-tplib-filters {
|
130 |
-
-webkit-box-sizing: border-box;
|
131 |
-
box-sizing: border-box;
|
132 |
-
display: -webkit-box;
|
133 |
-
display: -ms-flexbox;
|
134 |
-
display: flex;
|
135 |
-
-webkit-box-orient: vertical;
|
136 |
-
-webkit-box-direction: normal;
|
137 |
-
-ms-flex-direction: column;
|
138 |
-
flex-direction: column;
|
139 |
-
-webkit-box-align: start;
|
140 |
-
-ms-flex-align: start;
|
141 |
-
align-items: flex-start;
|
142 |
-
position: relative;
|
143 |
-
width: 200px;
|
144 |
-
font-size: 14px;
|
145 |
-
font-weight: normal;
|
146 |
-
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
|
147 |
-
color: #6d7882;
|
148 |
-
}
|
149 |
-
|
150 |
-
.wpr-tplib-filters h3 {
|
151 |
-
display: -webkit-box;
|
152 |
-
display: -ms-flexbox;
|
153 |
-
display: flex;
|
154 |
-
width: 100%;
|
155 |
-
padding: 10px 15px;
|
156 |
-
margin: 0;
|
157 |
-
font-size: 13px;
|
158 |
-
font-weight: normal;
|
159 |
-
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
|
160 |
-
background: #fff;
|
161 |
-
-webkit-box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
|
162 |
-
box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
|
163 |
-
cursor: pointer;
|
164 |
-
border-radius: 3px;
|
165 |
-
}
|
166 |
-
|
167 |
-
.wpr-tplib-filters h3 span {
|
168 |
-
width: 100%;
|
169 |
-
}
|
170 |
-
|
171 |
-
.wpr-tplib-filters h3 i.fa-angle-down:before {
|
172 |
-
content: "\f347";
|
173 |
-
font-family: dashicons;
|
174 |
-
line-height: 18px;
|
175 |
-
font-weight: 400;
|
176 |
-
font-style: normal;
|
177 |
-
speak: never;
|
178 |
-
text-decoration: inherit;
|
179 |
-
text-transform: none;
|
180 |
-
text-rendering: auto;
|
181 |
-
-webkit-font-smoothing: antialiased;
|
182 |
-
-moz-osx-font-smoothing: grayscale;
|
183 |
-
font-size: 15px;
|
184 |
-
vertical-align: top;
|
185 |
-
text-align: center;
|
186 |
-
}
|
187 |
-
|
188 |
-
.wpr-tplib-filters-list {
|
189 |
-
visibility: hidden;
|
190 |
-
opacity: 0;
|
191 |
-
position: absolute;
|
192 |
-
top: 38px;
|
193 |
-
z-index: 999;
|
194 |
-
width: 700px;
|
195 |
-
padding: 20px 30px;
|
196 |
-
background: #fff;
|
197 |
-
-webkit-box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
|
198 |
-
box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
|
199 |
-
-webkit-transition: all 0.2s ease-in;
|
200 |
-
-o-transition: all 0.2s ease-in;
|
201 |
-
transition: all 0.2s ease-in;
|
202 |
-
border-radius: 3px;
|
203 |
-
}
|
204 |
-
|
205 |
-
.wpr-tplib-filters-list ul {
|
206 |
-
display: -webkit-box;
|
207 |
-
display: -ms-flexbox;
|
208 |
-
display: flex;
|
209 |
-
-ms-flex-wrap: wrap;
|
210 |
-
flex-wrap: wrap;
|
211 |
-
margin-top: 0;
|
212 |
-
}
|
213 |
-
|
214 |
-
.wpr-tplib-filters-list ul li {
|
215 |
-
-webkit-box-sizing: border-box;
|
216 |
-
box-sizing: border-box;
|
217 |
-
width: 25%;
|
218 |
-
padding: 12px;
|
219 |
-
color: #6d7882;
|
220 |
-
background: #fff;
|
221 |
-
font-size: 13px;
|
222 |
-
line-height: 1;
|
223 |
-
cursor: pointer;
|
224 |
-
}
|
225 |
-
|
226 |
-
.wpr-tplib-filters-list ul li:hover {
|
227 |
-
background: #f9f9f9;
|
228 |
-
color: #222;
|
229 |
-
}
|
230 |
-
|
231 |
-
.wpr-tplib-template-gird {
|
232 |
-
overflow: auto;
|
233 |
-
margin-left: -10px;
|
234 |
-
padding: 0 30px;
|
235 |
-
}
|
236 |
-
|
237 |
-
.elementor-clearfix:after {
|
238 |
-
content: '';
|
239 |
-
display: block;
|
240 |
-
clear: both;
|
241 |
-
width: 0;
|
242 |
-
height: 0;
|
243 |
-
}
|
244 |
-
|
245 |
-
.wpr-tplib-template-wrap {
|
246 |
-
position: relative;
|
247 |
-
float: left;
|
248 |
-
overflow: hidden;
|
249 |
-
width: 18.5%;
|
250 |
-
margin: 10px;
|
251 |
-
border-radius: 3px;
|
252 |
-
-webkit-box-shadow: 0 1px 20px 0 rgba(0,0,0,0.07);
|
253 |
-
box-shadow: 0 1px 20px 0 rgba(0,0,0,0.07);
|
254 |
-
}
|
255 |
-
|
256 |
-
.wpr-tplib-template-wrap:not(.wpr-tplib-pro-active):before {
|
257 |
-
content: 'Free';
|
258 |
-
display: block;
|
259 |
-
position: absolute;
|
260 |
-
top: 10px;
|
261 |
-
right: 10px;
|
262 |
-
z-index: 1;
|
263 |
-
width: 45px;
|
264 |
-
padding: 4px;
|
265 |
-
font-size: 11px;
|
266 |
-
font-weight: bold;
|
267 |
-
letter-spacing: 0.3px;
|
268 |
-
text-transform: uppercase;
|
269 |
-
text-align: center;
|
270 |
-
background: #555;
|
271 |
-
color: #fff;
|
272 |
-
-webkit-box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.3);
|
273 |
-
box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.3);
|
274 |
-
border-radius: 3px;
|
275 |
-
}
|
276 |
-
|
277 |
-
.wpr-tplib-pro-wrap:not(.wpr-tplib-pro-active):before {
|
278 |
-
content: 'Pro';
|
279 |
-
background: #6A4BFF;
|
280 |
-
}
|
281 |
-
|
282 |
-
@media screen and ( max-width: 1364px ) {
|
283 |
-
.wpr-tplib-template-wrap {
|
284 |
-
width: 23%;
|
285 |
-
}
|
286 |
-
}
|
287 |
-
|
288 |
-
.wpr-tplib-template {
|
289 |
-
}
|
290 |
-
|
291 |
-
.wpr-tplib-insert-template:not(.wpr-tplib-insert-pro) {
|
292 |
-
display: none;
|
293 |
-
}
|
294 |
-
|
295 |
-
.wpr-tplib-template-wrap:hover .wpr-tplib-insert-pro {
|
296 |
-
opacity: 1;
|
297 |
-
visibility: visible;
|
298 |
-
}
|
299 |
-
|
300 |
-
.wpr-tplib-template-media {
|
301 |
-
position: relative;
|
302 |
-
background-color: #e8e8e8;
|
303 |
-
}
|
304 |
-
|
305 |
-
.wpr-tplib-template-media img {
|
306 |
-
display: block;
|
307 |
-
width: 100%;
|
308 |
-
max-width: 100%;
|
309 |
-
height: auto;
|
310 |
-
}
|
311 |
-
|
312 |
-
.wpr-tplib-template-media:hover .wpr-tplib-template-media-overlay {
|
313 |
-
opacity: 1;
|
314 |
-
}
|
315 |
-
|
316 |
-
.wpr-tplib-template-media-overlay {
|
317 |
-
opacity: 0;
|
318 |
-
position: absolute;
|
319 |
-
top: 0;
|
320 |
-
left: 0;
|
321 |
-
width: 100%;
|
322 |
-
height: 100%;
|
323 |
-
background-color: rgba(0, 0, 0, 0.5);
|
324 |
-
color: #fff;
|
325 |
-
cursor: pointer;
|
326 |
-
-webkit-transition: opacity 0.1s ease-in;
|
327 |
-
-o-transition: opacity 0.1s ease-in;
|
328 |
-
transition: opacity 0.1s ease-in;
|
329 |
-
}
|
330 |
-
|
331 |
-
.wpr-tplib-template-media-overlay i {
|
332 |
-
position: absolute;
|
333 |
-
top: 50%;
|
334 |
-
left: 50%;
|
335 |
-
-webkit-transform: translate(-50%, -50%);
|
336 |
-
-ms-transform: translate(-50%, -50%);
|
337 |
-
transform: translate(-50%, -50%);
|
338 |
-
font-size: 25px;
|
339 |
-
}
|
340 |
-
|
341 |
-
.wpr-tplib-preview-wrap {
|
342 |
-
display: none;
|
343 |
-
}
|
344 |
-
|
345 |
-
.wpr-tplib-image {
|
346 |
-
display: -webkit-box;
|
347 |
-
display: -ms-flexbox;
|
348 |
-
display: flex;
|
349 |
-
-webkit-box-pack: center;
|
350 |
-
-ms-flex-pack: center;
|
351 |
-
justify-content: center;
|
352 |
-
padding: 20px;
|
353 |
-
}
|
354 |
-
|
355 |
-
.wpr-tplib-iframe {
|
356 |
-
position: relative;
|
357 |
-
padding-top: 56.25%;
|
358 |
-
}
|
359 |
-
|
360 |
-
.wpr-tplib-iframe iframe {
|
361 |
-
position: absolute;
|
362 |
-
top: 0;
|
363 |
-
left: 0;
|
364 |
-
width: 100%;
|
365 |
-
height: 100%;
|
366 |
-
border: none;
|
367 |
-
}
|
368 |
-
|
369 |
-
.wpr-tplib-template-footer {
|
370 |
-
display: -webkit-box;
|
371 |
-
display: -ms-flexbox;
|
372 |
-
display: flex;
|
373 |
-
-webkit-box-orient: vertical;
|
374 |
-
-webkit-box-direction: normal;
|
375 |
-
-ms-flex-flow: column wrap;
|
376 |
-
flex-flow: column wrap;
|
377 |
-
-ms-flex-line-pack: justify;
|
378 |
-
align-content: space-between;
|
379 |
-
-webkit-box-pack: center;
|
380 |
-
-ms-flex-pack: center;
|
381 |
-
justify-content: center;
|
382 |
-
height: 45px;
|
383 |
-
padding: 5px 15px;
|
384 |
-
background-color: #fff;
|
385 |
-
border-top: 1px solid #efefef;
|
386 |
-
}
|
387 |
-
|
388 |
-
.wpr-tplib-template-footer h3 {
|
389 |
-
overflow: hidden;
|
390 |
-
color: #6d7882;
|
391 |
-
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
|
392 |
-
font-size: 13px;
|
393 |
-
font-weight: normal;
|
394 |
-
white-space: nowrap;
|
395 |
-
-o-text-overflow: ellipsis;
|
396 |
-
text-overflow: ellipsis;
|
397 |
-
}
|
398 |
-
|
399 |
-
.wpr-tplib-template-footer .wpr-tplib-insert-template {
|
400 |
-
opacity: 0;
|
401 |
-
visibility: hidden;
|
402 |
-
padding: 6px 10px;
|
403 |
-
color: #fff;
|
404 |
-
background-color: #6A4BFF;
|
405 |
-
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
|
406 |
-
font-size: 13px;
|
407 |
-
line-height: 1;
|
408 |
-
letter-spacing: 0.3px;
|
409 |
-
border-radius: 3px;
|
410 |
-
cursor: pointer;
|
411 |
-
-webkit-transition: all 0.1s ease-in;
|
412 |
-
-o-transition: all 0.1s ease-in;
|
413 |
-
transition: all 0.1s ease-in;
|
414 |
-
}
|
415 |
-
|
416 |
-
|
417 |
-
#masonry-effect {
|
418 |
-
display: -webkit-box;
|
419 |
-
display: -ms-flexbox;
|
420 |
-
display: flex;
|
421 |
-
-webkit-box-orient: horizontal;
|
422 |
-
-webkit-box-direction: normal;
|
423 |
-
-ms-flex-direction: row;
|
424 |
-
flex-direction: row;
|
425 |
-
-ms-flex-wrap: wrap;
|
426 |
-
flex-wrap: wrap;
|
427 |
-
}
|
428 |
-
.item {
|
429 |
-
-webkit-box-sizing: border-box;
|
430 |
-
box-sizing: border-box;
|
431 |
-
-webkit-box-orient: vertical;
|
432 |
-
-webkit-box-direction: normal;
|
433 |
-
-ms-flex-direction: column;
|
434 |
-
flex-direction: column;
|
435 |
-
position: relative;
|
436 |
-
width: calc(33.3%);
|
437 |
-
}
|
438 |
-
|
439 |
-
/* Disable Notices */
|
440 |
-
.notice:not(.wpr-plugin-update-notice),
|
441 |
-
div.fs-notice.updated, div.fs-notice.success {
|
442 |
-
display: none !important;
|
443 |
}
|
1 |
+
#wpcontent {
|
2 |
+
padding: 0;
|
3 |
+
}
|
4 |
+
|
5 |
+
.wpr-settings-page-header {
|
6 |
+
padding: 10px 30px 30px;
|
7 |
+
}
|
8 |
+
|
9 |
+
.wpr-settings-page-header h1 {
|
10 |
+
font-size: 42px;
|
11 |
+
}
|
12 |
+
|
13 |
+
.wpr-settings-page-header p {
|
14 |
+
margin-top: 5px;
|
15 |
+
color: #5a5a5a;
|
16 |
+
font-size: 16px;
|
17 |
+
margin-bottom: 30px;
|
18 |
+
}
|
19 |
+
|
20 |
+
.wpr-premade-blocks-tutorial {
|
21 |
+
display: inline-block;
|
22 |
+
margin-left: 45px;
|
23 |
+
padding: 9px 25px;
|
24 |
+
border: 0;
|
25 |
+
color: #fff;
|
26 |
+
background: #6A4BFF;
|
27 |
+
-webkit-box-shadow: 2px 2px 5px rgb(0 0 0 / 30%);
|
28 |
+
box-shadow: 2px 2px 5px rgb(0 0 0 / 30%);
|
29 |
+
font-size: 14px;
|
30 |
+
text-decoration: none;
|
31 |
+
border-radius: 3px;
|
32 |
+
}
|
33 |
+
|
34 |
+
.wpr-premade-blocks-tutorial:hover,
|
35 |
+
.wpr-premade-blocks-tutorial:focus {
|
36 |
+
color: #fff;
|
37 |
+
background: #5a39fb;
|
38 |
+
}
|
39 |
+
|
40 |
+
.wpr-tplib-content-wrap {
|
41 |
+
}
|
42 |
+
|
43 |
+
.wpr-tplib-sidebar {
|
44 |
+
padding: 30px;
|
45 |
+
display: -webkit-box;
|
46 |
+
display: -ms-flexbox;
|
47 |
+
display: flex;
|
48 |
+
}
|
49 |
+
|
50 |
+
.wpr-tplib-sidebar .wpr-tplib-search {
|
51 |
+
display: none;
|
52 |
+
position: relative;
|
53 |
+
margin: 30px 0;
|
54 |
+
}
|
55 |
+
|
56 |
+
.wpr-tplib-sidebar .wpr-tplib-search i {
|
57 |
+
position: absolute;
|
58 |
+
top: 50%;
|
59 |
+
right: 10px;
|
60 |
+
font-size: 12px;
|
61 |
+
-webkit-transform: translateY(-50%);
|
62 |
+
-ms-transform: translateY(-50%);
|
63 |
+
transform: translateY(-50%);
|
64 |
+
}
|
65 |
+
|
66 |
+
.wpr-tplib-sidebar .wpr-tplib-search input {
|
67 |
+
width: 100%;
|
68 |
+
padding: 8px 10px;
|
69 |
+
border: 0;
|
70 |
+
border-bottom: 1px solid #efefef;
|
71 |
+
}
|
72 |
+
|
73 |
+
.wpr-tplib-sidebar .wpr-tplib-search input::-webkit-input-placeholder {
|
74 |
+
color: #9a9a9a;
|
75 |
+
}
|
76 |
+
|
77 |
+
.wpr-tplib-sidebar .wpr-tplib-search input::-moz-placeholder {
|
78 |
+
color: #9a9a9a;
|
79 |
+
}
|
80 |
+
|
81 |
+
.wpr-tplib-sidebar .wpr-tplib-search input:-ms-input-placeholder {
|
82 |
+
color: #9a9a9a;
|
83 |
+
}
|
84 |
+
|
85 |
+
.wpr-tplib-sidebar .wpr-tplib-search input::-ms-input-placeholder {
|
86 |
+
color: #9a9a9a;
|
87 |
+
}
|
88 |
+
|
89 |
+
.wpr-tplib-sidebar .wpr-tplib-search input::placeholder {
|
90 |
+
color: #9a9a9a;
|
91 |
+
}
|
92 |
+
|
93 |
+
.wpr-tplib-filters-wrap {
|
94 |
+
display: -webkit-box;
|
95 |
+
display: -ms-flexbox;
|
96 |
+
display: flex;
|
97 |
+
}
|
98 |
+
|
99 |
+
.wpr-tplib-sub-filters {
|
100 |
+
display: none;
|
101 |
+
margin-left: 20px;
|
102 |
+
}
|
103 |
+
|
104 |
+
.wpr-tplib-sub-filters ul {
|
105 |
+
display: -webkit-box;
|
106 |
+
display: -ms-flexbox;
|
107 |
+
display: flex;
|
108 |
+
}
|
109 |
+
|
110 |
+
.wpr-tplib-sub-filters ul li {
|
111 |
+
padding: 10px 25px;
|
112 |
+
margin-right: 7px;
|
113 |
+
line-height: 15px;
|
114 |
+
font-size: 13px;
|
115 |
+
font-weight: normal;
|
116 |
+
background: #fff;
|
117 |
+
-webkit-box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
|
118 |
+
box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
|
119 |
+
cursor: pointer;
|
120 |
+
border-radius: 3px;
|
121 |
+
}
|
122 |
+
|
123 |
+
.wpr-tplib-sub-filters ul li:hover,
|
124 |
+
.wpr-tplib-sub-filters ul .wpr-tplib-activ-filter {
|
125 |
+
background: #6A4BFF;
|
126 |
+
color: #fff;
|
127 |
+
}
|
128 |
+
|
129 |
+
.wpr-tplib-filters {
|
130 |
+
-webkit-box-sizing: border-box;
|
131 |
+
box-sizing: border-box;
|
132 |
+
display: -webkit-box;
|
133 |
+
display: -ms-flexbox;
|
134 |
+
display: flex;
|
135 |
+
-webkit-box-orient: vertical;
|
136 |
+
-webkit-box-direction: normal;
|
137 |
+
-ms-flex-direction: column;
|
138 |
+
flex-direction: column;
|
139 |
+
-webkit-box-align: start;
|
140 |
+
-ms-flex-align: start;
|
141 |
+
align-items: flex-start;
|
142 |
+
position: relative;
|
143 |
+
width: 200px;
|
144 |
+
font-size: 14px;
|
145 |
+
font-weight: normal;
|
146 |
+
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
|
147 |
+
color: #6d7882;
|
148 |
+
}
|
149 |
+
|
150 |
+
.wpr-tplib-filters h3 {
|
151 |
+
display: -webkit-box;
|
152 |
+
display: -ms-flexbox;
|
153 |
+
display: flex;
|
154 |
+
width: 100%;
|
155 |
+
padding: 10px 15px;
|
156 |
+
margin: 0;
|
157 |
+
font-size: 13px;
|
158 |
+
font-weight: normal;
|
159 |
+
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
|
160 |
+
background: #fff;
|
161 |
+
-webkit-box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
|
162 |
+
box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
|
163 |
+
cursor: pointer;
|
164 |
+
border-radius: 3px;
|
165 |
+
}
|
166 |
+
|
167 |
+
.wpr-tplib-filters h3 span {
|
168 |
+
width: 100%;
|
169 |
+
}
|
170 |
+
|
171 |
+
.wpr-tplib-filters h3 i.fa-angle-down:before {
|
172 |
+
content: "\f347";
|
173 |
+
font-family: dashicons;
|
174 |
+
line-height: 18px;
|
175 |
+
font-weight: 400;
|
176 |
+
font-style: normal;
|
177 |
+
speak: never;
|
178 |
+
text-decoration: inherit;
|
179 |
+
text-transform: none;
|
180 |
+
text-rendering: auto;
|
181 |
+
-webkit-font-smoothing: antialiased;
|
182 |
+
-moz-osx-font-smoothing: grayscale;
|
183 |
+
font-size: 15px;
|
184 |
+
vertical-align: top;
|
185 |
+
text-align: center;
|
186 |
+
}
|
187 |
+
|
188 |
+
.wpr-tplib-filters-list {
|
189 |
+
visibility: hidden;
|
190 |
+
opacity: 0;
|
191 |
+
position: absolute;
|
192 |
+
top: 38px;
|
193 |
+
z-index: 999;
|
194 |
+
width: 700px;
|
195 |
+
padding: 20px 30px;
|
196 |
+
background: #fff;
|
197 |
+
-webkit-box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
|
198 |
+
box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
|
199 |
+
-webkit-transition: all 0.2s ease-in;
|
200 |
+
-o-transition: all 0.2s ease-in;
|
201 |
+
transition: all 0.2s ease-in;
|
202 |
+
border-radius: 3px;
|
203 |
+
}
|
204 |
+
|
205 |
+
.wpr-tplib-filters-list ul {
|
206 |
+
display: -webkit-box;
|
207 |
+
display: -ms-flexbox;
|
208 |
+
display: flex;
|
209 |
+
-ms-flex-wrap: wrap;
|
210 |
+
flex-wrap: wrap;
|
211 |
+
margin-top: 0;
|
212 |
+
}
|
213 |
+
|
214 |
+
.wpr-tplib-filters-list ul li {
|
215 |
+
-webkit-box-sizing: border-box;
|
216 |
+
box-sizing: border-box;
|
217 |
+
width: 25%;
|
218 |
+
padding: 12px;
|
219 |
+
color: #6d7882;
|
220 |
+
background: #fff;
|
221 |
+
font-size: 13px;
|
222 |
+
line-height: 1;
|
223 |
+
cursor: pointer;
|
224 |
+
}
|
225 |
+
|
226 |
+
.wpr-tplib-filters-list ul li:hover {
|
227 |
+
background: #f9f9f9;
|
228 |
+
color: #222;
|
229 |
+
}
|
230 |
+
|
231 |
+
.wpr-tplib-template-gird {
|
232 |
+
overflow: auto;
|
233 |
+
margin-left: -10px;
|
234 |
+
padding: 0 30px;
|
235 |
+
}
|
236 |
+
|
237 |
+
.elementor-clearfix:after {
|
238 |
+
content: '';
|
239 |
+
display: block;
|
240 |
+
clear: both;
|
241 |
+
width: 0;
|
242 |
+
height: 0;
|
243 |
+
}
|
244 |
+
|
245 |
+
.wpr-tplib-template-wrap {
|
246 |
+
position: relative;
|
247 |
+
float: left;
|
248 |
+
overflow: hidden;
|
249 |
+
width: 18.5%;
|
250 |
+
margin: 10px;
|
251 |
+
border-radius: 3px;
|
252 |
+
-webkit-box-shadow: 0 1px 20px 0 rgba(0,0,0,0.07);
|
253 |
+
box-shadow: 0 1px 20px 0 rgba(0,0,0,0.07);
|
254 |
+
}
|
255 |
+
|
256 |
+
.wpr-tplib-template-wrap:not(.wpr-tplib-pro-active):before {
|
257 |
+
content: 'Free';
|
258 |
+
display: block;
|
259 |
+
position: absolute;
|
260 |
+
top: 10px;
|
261 |
+
right: 10px;
|
262 |
+
z-index: 1;
|
263 |
+
width: 45px;
|
264 |
+
padding: 4px;
|
265 |
+
font-size: 11px;
|
266 |
+
font-weight: bold;
|
267 |
+
letter-spacing: 0.3px;
|
268 |
+
text-transform: uppercase;
|
269 |
+
text-align: center;
|
270 |
+
background: #555;
|
271 |
+
color: #fff;
|
272 |
+
-webkit-box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.3);
|
273 |
+
box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.3);
|
274 |
+
border-radius: 3px;
|
275 |
+
}
|
276 |
+
|
277 |
+
.wpr-tplib-pro-wrap:not(.wpr-tplib-pro-active):before {
|
278 |
+
content: 'Pro';
|
279 |
+
background: #6A4BFF;
|
280 |
+
}
|
281 |
+
|
282 |
+
@media screen and ( max-width: 1364px ) {
|
283 |
+
.wpr-tplib-template-wrap {
|
284 |
+
width: 23%;
|
285 |
+
}
|
286 |
+
}
|
287 |
+
|
288 |
+
.wpr-tplib-template {
|
289 |
+
}
|
290 |
+
|
291 |
+
.wpr-tplib-insert-template:not(.wpr-tplib-insert-pro) {
|
292 |
+
display: none;
|
293 |
+
}
|
294 |
+
|
295 |
+
.wpr-tplib-template-wrap:hover .wpr-tplib-insert-pro {
|
296 |
+
opacity: 1;
|
297 |
+
visibility: visible;
|
298 |
+
}
|
299 |
+
|
300 |
+
.wpr-tplib-template-media {
|
301 |
+
position: relative;
|
302 |
+
background-color: #e8e8e8;
|
303 |
+
}
|
304 |
+
|
305 |
+
.wpr-tplib-template-media img {
|
306 |
+
display: block;
|
307 |
+
width: 100%;
|
308 |
+
max-width: 100%;
|
309 |
+
height: auto;
|
310 |
+
}
|
311 |
+
|
312 |
+
.wpr-tplib-template-media:hover .wpr-tplib-template-media-overlay {
|
313 |
+
opacity: 1;
|
314 |
+
}
|
315 |
+
|
316 |
+
.wpr-tplib-template-media-overlay {
|
317 |
+
opacity: 0;
|
318 |
+
position: absolute;
|
319 |
+
top: 0;
|
320 |
+
left: 0;
|
321 |
+
width: 100%;
|
322 |
+
height: 100%;
|
323 |
+
background-color: rgba(0, 0, 0, 0.5);
|
324 |
+
color: #fff;
|
325 |
+
cursor: pointer;
|
326 |
+
-webkit-transition: opacity 0.1s ease-in;
|
327 |
+
-o-transition: opacity 0.1s ease-in;
|
328 |
+
transition: opacity 0.1s ease-in;
|
329 |
+
}
|
330 |
+
|
331 |
+
.wpr-tplib-template-media-overlay i {
|
332 |
+
position: absolute;
|
333 |
+
top: 50%;
|
334 |
+
left: 50%;
|
335 |
+
-webkit-transform: translate(-50%, -50%);
|
336 |
+
-ms-transform: translate(-50%, -50%);
|
337 |
+
transform: translate(-50%, -50%);
|
338 |
+
font-size: 25px;
|
339 |
+
}
|
340 |
+
|
341 |
+
.wpr-tplib-preview-wrap {
|
342 |
+
display: none;
|
343 |
+
}
|
344 |
+
|
345 |
+
.wpr-tplib-image {
|
346 |
+
display: -webkit-box;
|
347 |
+
display: -ms-flexbox;
|
348 |
+
display: flex;
|
349 |
+
-webkit-box-pack: center;
|
350 |
+
-ms-flex-pack: center;
|
351 |
+
justify-content: center;
|
352 |
+
padding: 20px;
|
353 |
+
}
|
354 |
+
|
355 |
+
.wpr-tplib-iframe {
|
356 |
+
position: relative;
|
357 |
+
padding-top: 56.25%;
|
358 |
+
}
|
359 |
+
|
360 |
+
.wpr-tplib-iframe iframe {
|
361 |
+
position: absolute;
|
362 |
+
top: 0;
|
363 |
+
left: 0;
|
364 |
+
width: 100%;
|
365 |
+
height: 100%;
|
366 |
+
border: none;
|
367 |
+
}
|
368 |
+
|
369 |
+
.wpr-tplib-template-footer {
|
370 |
+
display: -webkit-box;
|
371 |
+
display: -ms-flexbox;
|
372 |
+
display: flex;
|
373 |
+
-webkit-box-orient: vertical;
|
374 |
+
-webkit-box-direction: normal;
|
375 |
+
-ms-flex-flow: column wrap;
|
376 |
+
flex-flow: column wrap;
|
377 |
+
-ms-flex-line-pack: justify;
|
378 |
+
align-content: space-between;
|
379 |
+
-webkit-box-pack: center;
|
380 |
+
-ms-flex-pack: center;
|
381 |
+
justify-content: center;
|
382 |
+
height: 45px;
|
383 |
+
padding: 5px 15px;
|
384 |
+
background-color: #fff;
|
385 |
+
border-top: 1px solid #efefef;
|
386 |
+
}
|
387 |
+
|
388 |
+
.wpr-tplib-template-footer h3 {
|
389 |
+
overflow: hidden;
|
390 |
+
color: #6d7882;
|
391 |
+
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
|
392 |
+
font-size: 13px;
|
393 |
+
font-weight: normal;
|
394 |
+
white-space: nowrap;
|
395 |
+
-o-text-overflow: ellipsis;
|
396 |
+
text-overflow: ellipsis;
|
397 |
+
}
|
398 |
+
|
399 |
+
.wpr-tplib-template-footer .wpr-tplib-insert-template {
|
400 |
+
opacity: 0;
|
401 |
+
visibility: hidden;
|
402 |
+
padding: 6px 10px;
|
403 |
+
color: #fff;
|
404 |
+
background-color: #6A4BFF;
|
405 |
+
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
|
406 |
+
font-size: 13px;
|
407 |
+
line-height: 1;
|
408 |
+
letter-spacing: 0.3px;
|
409 |
+
border-radius: 3px;
|
410 |
+
cursor: pointer;
|
411 |
+
-webkit-transition: all 0.1s ease-in;
|
412 |
+
-o-transition: all 0.1s ease-in;
|
413 |
+
transition: all 0.1s ease-in;
|
414 |
+
}
|
415 |
+
|
416 |
+
|
417 |
+
#masonry-effect {
|
418 |
+
display: -webkit-box;
|
419 |
+
display: -ms-flexbox;
|
420 |
+
display: flex;
|
421 |
+
-webkit-box-orient: horizontal;
|
422 |
+
-webkit-box-direction: normal;
|
423 |
+
-ms-flex-direction: row;
|
424 |
+
flex-direction: row;
|
425 |
+
-ms-flex-wrap: wrap;
|
426 |
+
flex-wrap: wrap;
|
427 |
+
}
|
428 |
+
.item {
|
429 |
+
-webkit-box-sizing: border-box;
|
430 |
+
box-sizing: border-box;
|
431 |
+
-webkit-box-orient: vertical;
|
432 |
+
-webkit-box-direction: normal;
|
433 |
+
-ms-flex-direction: column;
|
434 |
+
flex-direction: column;
|
435 |
+
position: relative;
|
436 |
+
width: calc(33.3%);
|
437 |
+
}
|
438 |
+
|
439 |
+
/* Disable Notices */
|
440 |
+
.notice:not(.wpr-plugin-update-notice),
|
441 |
+
div.fs-notice.updated, div.fs-notice.success {
|
442 |
+
display: none !important;
|
443 |
}
|
assets/css/admin/wporg-theme-notice.css
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
.rek-notice {
|
2 |
-
display: none !important;
|
3 |
}
|
1 |
+
.rek-notice {
|
2 |
+
display: none !important;
|
3 |
}
|
assets/css/lib/animations/text-animations.css
CHANGED
@@ -1,843 +1,843 @@
|
|
1 |
-
/*--------------------------------------------------------------
|
2 |
-
== General
|
3 |
-
--------------------------------------------------------------*/
|
4 |
-
|
5 |
-
.wpr-anim-text-inner {
|
6 |
-
display: inline-block;
|
7 |
-
position: relative;
|
8 |
-
text-align: left;
|
9 |
-
}
|
10 |
-
|
11 |
-
.wpr-anim-text-inner b {
|
12 |
-
display: inline-block;
|
13 |
-
position: absolute;
|
14 |
-
white-space: nowrap;
|
15 |
-
left: 0;
|
16 |
-
top: 0;
|
17 |
-
}
|
18 |
-
|
19 |
-
.wpr-anim-text-inner b.wpr-anim-text-visible {
|
20 |
-
position: relative;
|
21 |
-
}
|
22 |
-
|
23 |
-
|
24 |
-
/*--------------------------------------------------------------
|
25 |
-
== Rotate 1
|
26 |
-
--------------------------------------------------------------*/
|
27 |
-
|
28 |
-
.wpr-anim-text.wpr-anim-text-type-rotate-1 .wpr-anim-text-inner {
|
29 |
-
-webkit-perspective: 300px;
|
30 |
-
perspective: 300px;
|
31 |
-
}
|
32 |
-
|
33 |
-
.wpr-anim-text.wpr-anim-text-type-rotate-1 b {
|
34 |
-
opacity: 0;
|
35 |
-
-webkit-transform-origin: 50% 100%;
|
36 |
-
-ms-transform-origin: 50% 100%;
|
37 |
-
transform-origin: 50% 100%;
|
38 |
-
-webkit-transform: rotateX(180deg);
|
39 |
-
-ms-transform: rotateX(180deg);
|
40 |
-
transform: rotateX(180deg);
|
41 |
-
}
|
42 |
-
|
43 |
-
.wpr-anim-text.wpr-anim-text-type-rotate-1 b.wpr-anim-text-visible {
|
44 |
-
opacity: 1;
|
45 |
-
-webkit-transform: rotateX(0deg);
|
46 |
-
-ms-transform: rotateX(0deg);
|
47 |
-
transform: rotateX(0deg);
|
48 |
-
-webkit-animation: wpr-anim-text-rotate-1-in 1.2s;
|
49 |
-
animation: wpr-anim-text-rotate-1-in 1.2s;
|
50 |
-
}
|
51 |
-
|
52 |
-
.wpr-anim-text.wpr-anim-text-type-rotate-1 b.wpr-anim-text-hidden {
|
53 |
-
-webkit-transform: rotateX(180deg);
|
54 |
-
-ms-transform: rotateX(180deg);
|
55 |
-
transform: rotateX(180deg);
|
56 |
-
-webkit-animation: wpr-anim-text-rotate-1-out 1.2s;
|
57 |
-
animation: wpr-anim-text-rotate-1-out 1.2s;
|
58 |
-
}
|
59 |
-
|
60 |
-
@-webkit-keyframes wpr-anim-text-rotate-1-in {
|
61 |
-
0% {
|
62 |
-
-webkit-transform: rotateX(180deg);
|
63 |
-
opacity: 0;
|
64 |
-
}
|
65 |
-
35% {
|
66 |
-
-webkit-transform: rotateX(120deg);
|
67 |
-
opacity: 0;
|
68 |
-
}
|
69 |
-
65% {
|
70 |
-
opacity: 0;
|
71 |
-
}
|
72 |
-
100% {
|
73 |
-
-webkit-transform: rotateX(360deg);
|
74 |
-
opacity: 1;
|
75 |
-
}
|
76 |
-
}
|
77 |
-
|
78 |
-
@keyframes wpr-anim-text-rotate-1-in {
|
79 |
-
0% {
|
80 |
-
-webkit-transform: rotateX(180deg);
|
81 |
-
-ms-transform: rotateX(180deg);
|
82 |
-
transform: rotateX(180deg);
|
83 |
-
opacity: 0;
|
84 |
-
}
|
85 |
-
35% {
|
86 |
-
-webkit-transform: rotateX(120deg);
|
87 |
-
-ms-transform: rotateX(120deg);
|
88 |
-
transform: rotateX(120deg);
|
89 |
-
opacity: 0;
|
90 |
-
}
|
91 |
-
65% {
|
92 |
-
opacity: 0;
|
93 |
-
}
|
94 |
-
100% {
|
95 |
-
-webkit-transform: rotateX(360deg);
|
96 |
-
-ms-transform: rotateX(360deg);
|
97 |
-
transform: rotateX(360deg);
|
98 |
-
opacity: 1;
|
99 |
-
}
|
100 |
-
}
|
101 |
-
|
102 |
-
@-webkit-keyframes wpr-anim-text-rotate-1-out {
|
103 |
-
0% {
|
104 |
-
-webkit-transform: rotateX(0deg);
|
105 |
-
opacity: 1;
|
106 |
-
}
|
107 |
-
35% {
|
108 |
-
-webkit-transform: rotateX(-40deg);
|
109 |
-
opacity: 1;
|
110 |
-
}
|
111 |
-
65% {
|
112 |
-
opacity: 0;
|
113 |
-
}
|
114 |
-
100% {
|
115 |
-
-webkit-transform: rotateX(180deg);
|
116 |
-
opacity: 0;
|
117 |
-
}
|
118 |
-
}
|
119 |
-
|
120 |
-
@keyframes wpr-anim-text-rotate-1-out {
|
121 |
-
0% {
|
122 |
-
-webkit-transform: rotateX(0deg);
|
123 |
-
-ms-transform: rotateX(0deg);
|
124 |
-
transform: rotateX(0deg);
|
125 |
-
opacity: 1;
|
126 |
-
}
|
127 |
-
35% {
|
128 |
-
-webkit-transform: rotateX(-40deg);
|
129 |
-
-ms-transform: rotateX(-40deg);
|
130 |
-
transform: rotateX(-40deg);
|
131 |
-
opacity: 1;
|
132 |
-
}
|
133 |
-
65% {
|
134 |
-
opacity: 0;
|
135 |
-
}
|
136 |
-
100% {
|
137 |
-
-webkit-transform: rotateX(180deg);
|
138 |
-
-ms-transform: rotateX(180deg);
|
139 |
-
transform: rotateX(180deg);
|
140 |
-
opacity: 0;
|
141 |
-
}
|
142 |
-
}
|
143 |
-
|
144 |
-
|
145 |
-
/*--------------------------------------------------------------
|
146 |
-
== Typing
|
147 |
-
--------------------------------------------------------------*/
|
148 |
-
|
149 |
-
.wpr-anim-text.wpr-anim-text-type-typing .wpr-anim-text-inner {
|
150 |
-
vertical-align: top;
|
151 |
-
overflow: hidden;
|
152 |
-
}
|
153 |
-
|
154 |
-
.wpr-anim-text.wpr-anim-text-type-typing b {
|
155 |
-
visibility: hidden;
|
156 |
-
}
|
157 |
-
|
158 |
-
.wpr-anim-text.wpr-anim-text-type-typing b.wpr-anim-text-visible {
|
159 |
-
visibility: visible;
|
160 |
-
}
|
161 |
-
|
162 |
-
.wpr-anim-text.wpr-anim-text-type-typing i {
|
163 |
-
position: absolute;
|
164 |
-
visibility: hidden;
|
165 |
-
}
|
166 |
-
|
167 |
-
.wpr-anim-text.wpr-anim-text-type-typing i.wpr-anim-text-in {
|
168 |
-
position: relative;
|
169 |
-
visibility: visible;
|
170 |
-
}
|
171 |
-
|
172 |
-
@-webkit-keyframes wpr-anim-text-pulse {
|
173 |
-
0% {
|
174 |
-
-webkit-transform: translateY(-50%) scale(1);
|
175 |
-
opacity: 1;
|
176 |
-
}
|
177 |
-
40% {
|
178 |
-
-webkit-transform: translateY(-50%) scale(0.9);
|
179 |
-
opacity: 0;
|
180 |
-
}
|
181 |
-
100% {
|
182 |
-
-webkit-transform: translateY(-50%) scale(0);
|
183 |
-
opacity: 0;
|
184 |
-
}
|
185 |
-
}
|
186 |
-
|
187 |
-
@keyframes wpr-anim-text-pulse {
|
188 |
-
0% {
|
189 |
-
-webkit-transform: translateY(-50%) scale(1);
|
190 |
-
-ms-transform: translateY(-50%) scale(1);
|
191 |
-
transform: translateY(-50%) scale(1);
|
192 |
-
opacity: 1;
|
193 |
-
}
|
194 |
-
40% {
|
195 |
-
-webkit-transform: translateY(-50%) scale(0.9);
|
196 |
-
-ms-transform: translateY(-50%) scale(0.9);
|
197 |
-
transform: translateY(-50%) scale(0.9);
|
198 |
-
opacity: 0;
|
199 |
-
}
|
200 |
-
100% {
|
201 |
-
-webkit-transform: translateY(-50%) scale(0);
|
202 |
-
-ms-transform: translateY(-50%) scale(0);
|
203 |
-
transform: translateY(-50%) scale(0);
|
204 |
-
opacity: 0;
|
205 |
-
}
|
206 |
-
}
|
207 |
-
|
208 |
-
|
209 |
-
/*--------------------------------------------------------------
|
210 |
-
== Rotate 2
|
211 |
-
--------------------------------------------------------------*/
|
212 |
-
|
213 |
-
.wpr-anim-text.wpr-anim-text-type-rotate-2 .wpr-anim-text-inner {
|
214 |
-
-webkit-perspective: 300px;
|
215 |
-
perspective: 300px;
|
216 |
-
}
|
217 |
-
|
218 |
-
.wpr-anim-text.wpr-anim-text-type-rotate-2 i,
|
219 |
-
.wpr-anim-text.wpr-anim-text-type-rotate-2 em {
|
220 |
-
display: inline-block;
|
221 |
-
-webkit-backface-visibility: hidden;
|
222 |
-
backface-visibility: hidden;
|
223 |
-
}
|
224 |
-
|
225 |
-
.wpr-anim-text.wpr-anim-text-type-rotate-2 b {
|
226 |
-
opacity: 0;
|
227 |
-
}
|
228 |
-
|
229 |
-
.wpr-anim-text.wpr-anim-text-type-rotate-2 i {
|
230 |
-
-webkit-transform-style: preserve-3d;
|
231 |
-
transform-style: preserve-3d;
|
232 |
-
-webkit-transform: translateZ(-20px) rotateX(90deg);
|
233 |
-
-ms-transform: translateZ(-20px) rotateX(90deg);
|
234 |
-
transform: translateZ(-20px) rotateX(90deg);
|
235 |
-
opacity: 0;
|
236 |
-
}
|
237 |
-
|
238 |
-
.wpr-anim-text-visible .wpr-anim-text.wpr-anim-text-type-rotate-2 i {
|
239 |
-
opacity: 1;
|
240 |
-
}
|
241 |
-
|
242 |
-
.wpr-anim-text.wpr-anim-text-type-rotate-2 i.wpr-anim-text-in {
|
243 |
-
-webkit-animation: wpr-anim-text-rotate-2-in 0.4s forwards;
|
244 |
-
animation: wpr-anim-text-rotate-2-in 0.4s forwards;
|
245 |
-
}
|
246 |
-
|
247 |
-
.wpr-anim-text.wpr-anim-text-type-rotate-2 i.wpr-anim-text-out {
|
248 |
-
-webkit-animation: wpr-anim-text-rotate-2-out 0.4s forwards;
|
249 |
-
animation: wpr-anim-text-rotate-2-out 0.4s forwards;
|
250 |
-
}
|
251 |
-
|
252 |
-
.wpr-anim-text.wpr-anim-text-type-rotate-2 em {
|
253 |
-
-webkit-transform: translateZ(20px);
|
254 |
-
-ms-transform: translateZ(20px);
|
255 |
-
transform: translateZ(20px);
|
256 |
-
}
|
257 |
-
|
258 |
-
.no-csstransitions .wpr-anim-text.wpr-anim-text-type-rotate-2 i {
|
259 |
-
-webkit-transform: rotateX(0deg);
|
260 |
-
-ms-transform: rotateX(0deg);
|
261 |
-
transform: rotateX(0deg);
|
262 |
-
opacity: 0;
|
263 |
-
}
|
264 |
-
|
265 |
-
.no-csstransitions .wpr-anim-text.wpr-anim-text-type-rotate-2 i em {
|
266 |
-
-webkit-transform: scale(1);
|
267 |
-
-ms-transform: scale(1);
|
268 |
-
transform: scale(1);
|
269 |
-
}
|
270 |
-
|
271 |
-
.no-csstransitions .wpr-anim-text.wpr-anim-text-type-rotate-2 .wpr-anim-text-visible i {
|
272 |
-
opacity: 1;
|
273 |
-
}
|
274 |
-
|
275 |
-
@-webkit-keyframes wpr-anim-text-rotate-2-in {
|
276 |
-
0% {
|
277 |
-
opacity: 0;
|
278 |
-
-webkit-transform: translateZ(-20px) rotateX(90deg);
|
279 |
-
}
|
280 |
-
60% {
|
281 |
-
opacity: 1;
|
282 |
-
-webkit-transform: translateZ(-20px) rotateX(-10deg);
|
283 |
-
}
|
284 |
-
100% {
|
285 |
-
opacity: 1;
|
286 |
-
-webkit-transform: translateZ(-20px) rotateX(0deg);
|
287 |
-
}
|
288 |
-
}
|
289 |
-
|
290 |
-
@keyframes wpr-anim-text-rotate-2-in {
|
291 |
-
0% {
|
292 |
-
opacity: 0;
|
293 |
-
-webkit-transform: translateZ(-20px) rotateX(90deg);
|
294 |
-
-ms-transform: translateZ(-20px) rotateX(90deg);
|
295 |
-
transform: translateZ(-20px) rotateX(90deg);
|
296 |
-
}
|
297 |
-
60% {
|
298 |
-
opacity: 1;
|
299 |
-
-webkit-transform: translateZ(-20px) rotateX(-10deg);
|
300 |
-
-ms-transform: translateZ(-20px) rotateX(-10deg);
|
301 |
-
transform: translateZ(-20px) rotateX(-10deg);
|
302 |
-
}
|
303 |
-
100% {
|
304 |
-
opacity: 1;
|
305 |
-
-webkit-transform: translateZ(-20px) rotateX(0deg);
|
306 |
-
-ms-transform: translateZ(-20px) rotateX(0deg);
|
307 |
-
transform: translateZ(-20px) rotateX(0deg);
|
308 |
-
}
|
309 |
-
}
|
310 |
-
|
311 |
-
@-webkit-keyframes wpr-anim-text-rotate-2-out {
|
312 |
-
0% {
|
313 |
-
opacity: 1;
|
314 |
-
-webkit-transform: translateZ(-20px) rotateX(0);
|
315 |
-
}
|
316 |
-
60% {
|
317 |
-
opacity: 0;
|
318 |
-
-webkit-transform: translateZ(-20px) rotateX(-100deg);
|
319 |
-
}
|
320 |
-
100% {
|
321 |
-
opacity: 0;
|
322 |
-
-webkit-transform: translateZ(-20px) rotateX(-90deg);
|
323 |
-
}
|
324 |
-
}
|
325 |
-
|
326 |
-
@keyframes wpr-anim-text-rotate-2-out {
|
327 |
-
0% {
|
328 |
-
opacity: 1;
|
329 |
-
-webkit-transform: translateZ(-20px) rotateX(0);
|
330 |
-
-ms-transform: translateZ(-20px) rotateX(0);
|
331 |
-
transform: translateZ(-20px) rotateX(0);
|
332 |
-
}
|
333 |
-
60% {
|
334 |
-
opacity: 0;
|
335 |
-
-webkit-transform: translateZ(-20px) rotateX(-100deg);
|
336 |
-
-ms-transform: translateZ(-20px) rotateX(-100deg);
|
337 |
-
transform: translateZ(-20px) rotateX(-100deg);
|
338 |
-
}
|
339 |
-
100% {
|
340 |
-
opacity: 0;
|
341 |
-
-webkit-transform: translateZ(-20px) rotateX(-90deg);
|
342 |
-
-ms-transform: translateZ(-20px) rotateX(-90deg);
|
343 |
-
transform: translateZ(-20px) rotateX(-90deg);
|
344 |
-
}
|
345 |
-
}
|
346 |
-
|
347 |
-
|
348 |
-
/*--------------------------------------------------------------
|
349 |
-
== Slide
|
350 |
-
--------------------------------------------------------------*/
|
351 |
-
|
352 |
-
.wpr-anim-text.wpr-anim-text-type-slide span {
|
353 |
-
display: inline-block;
|
354 |
-
padding: .2em 0;
|
355 |
-
}
|
356 |
-
|
357 |
-
.wpr-anim-text.wpr-anim-text-type-slide .wpr-anim-text-inner {
|
358 |
-
overflow: hidden;
|
359 |
-
vertical-align: top;
|
360 |
-
}
|
361 |
-
|
362 |
-
.wpr-anim-text.wpr-anim-text-type-slide b {
|
363 |
-
opacity: 0;
|
364 |
-
top: .2em;
|
365 |
-
}
|
366 |
-
|
367 |
-
.wpr-anim-text.wpr-anim-text-type-slide b.wpr-anim-text-visible {
|
368 |
-
top: 0;
|
369 |
-
opacity: 1;
|
370 |
-
-webkit-animation: wpr-anim-text-slide-in 0.6s;
|
371 |
-
animation: wpr-anim-text-slide-in 0.6s;
|
372 |
-
}
|
373 |
-
|
374 |
-
.wpr-anim-text.wpr-anim-text-type-slide b.wpr-anim-text-hidden {
|
375 |
-
-webkit-animation: wpr-anim-text-slide-out 0.6s;
|
376 |
-
animation: wpr-anim-text-slide-out 0.6s;
|
377 |
-
}
|
378 |
-
|
379 |
-
@-webkit-keyframes wpr-anim-text-slide-in {
|
380 |
-
0% {
|
381 |
-
opacity: 0;
|
382 |
-
-webkit-transform: translateY(-100%);
|
383 |
-
}
|
384 |
-
60% {
|
385 |
-
opacity: 1;
|
386 |
-
-webkit-transform: translateY(20%);
|
387 |
-
}
|
388 |
-
100% {
|
389 |
-
opacity: 1;
|
390 |
-
-webkit-transform: translateY(0);
|
391 |
-
}
|
392 |
-
}
|
393 |
-
|
394 |
-
@keyframes wpr-anim-text-slide-in {
|
395 |
-
0% {
|
396 |
-
opacity: 0;
|
397 |
-
-webkit-transform: translateY(-100%);
|
398 |
-
-ms-transform: translateY(-100%);
|
399 |
-
transform: translateY(-100%);
|
400 |
-
}
|
401 |
-
60% {
|
402 |
-
opacity: 1;
|
403 |
-
-webkit-transform: translateY(20%);
|
404 |
-
-ms-transform: translateY(20%);
|
405 |
-
transform: translateY(20%);
|
406 |
-
}
|
407 |
-
100% {
|
408 |
-
opacity: 1;
|
409 |
-
-webkit-transform: translateY(0);
|
410 |
-
-ms-transform: translateY(0);
|
411 |
-
transform: translateY(0);
|
412 |
-
}
|
413 |
-
}
|
414 |
-
|
415 |
-
@-webkit-keyframes wpr-anim-text-slide-out {
|
416 |
-
0% {
|
417 |
-
opacity: 1;
|
418 |
-
-webkit-transform: translateY(0);
|
419 |
-
}
|
420 |
-
60% {
|
421 |
-
opacity: 0;
|
422 |
-
-webkit-transform: translateY(120%);
|
423 |
-
}
|
424 |
-
100% {
|
425 |
-
opacity: 0;
|
426 |
-
-webkit-transform: translateY(100%);
|
427 |
-
}
|
428 |
-
}
|
429 |
-
|
430 |
-
@keyframes wpr-anim-text-slide-out {
|
431 |
-
0% {
|
432 |
-
opacity: 1;
|
433 |
-
-webkit-transform: translateY(0);
|
434 |
-
-ms-transform: translateY(0);
|
435 |
-
transform: translateY(0);
|
436 |
-
}
|
437 |
-
60% {
|
438 |
-
opacity: 0;
|
439 |
-
-webkit-transform: translateY(120%);
|
440 |
-
-ms-transform: translateY(120%);
|
441 |
-
transform: translateY(120%);
|
442 |
-
}
|
443 |
-
100% {
|
444 |
-
opacity: 0;
|
445 |
-
-webkit-transform: translateY(100%);
|
446 |
-
-ms-transform: translateY(100%);
|
447 |
-
transform: translateY(100%);
|
448 |
-
}
|
449 |
-
}
|
450 |
-
|
451 |
-
|
452 |
-
/*--------------------------------------------------------------
|
453 |
-
== Clip
|
454 |
-
--------------------------------------------------------------*/
|
455 |
-
|
456 |
-
.wpr-anim-text.wpr-anim-text-type-clip span {
|
457 |
-
display: inline-block;
|
458 |
-
padding: .2em 0;
|
459 |
-
}
|
460 |
-
|
461 |
-
.wpr-anim-text.wpr-anim-text-type-clip .wpr-anim-text-inner {
|
462 |
-
overflow: hidden;
|
463 |
-
vertical-align: top;
|
464 |
-
}
|
465 |
-
|
466 |
-
.wpr-anim-text.wpr-anim-text-type-clip b {
|
467 |
-
opacity: 0;
|
468 |
-
}
|
469 |
-
|
470 |
-
.wpr-anim-text.wpr-anim-text-type-clip b.wpr-anim-text-visible {
|
471 |
-
opacity: 1;
|
472 |
-
}
|
473 |
-
|
474 |
-
|
475 |
-
/*--------------------------------------------------------------
|
476 |
-
== Zoom
|
477 |
-
--------------------------------------------------------------*/
|
478 |
-
|
479 |
-
.wpr-anim-text.wpr-anim-text-type-zoom .wpr-anim-text-inner {
|
480 |
-
-webkit-perspective: 300px;
|
481 |
-
perspective: 300px;
|
482 |
-
}
|
483 |
-
|
484 |
-
.wpr-anim-text.wpr-anim-text-type-zoom b {
|
485 |
-
opacity: 0;
|
486 |
-
}
|
487 |
-
|
488 |
-
.wpr-anim-text.wpr-anim-text-type-zoom b.wpr-anim-text-visible {
|
489 |
-
opacity: 1;
|
490 |
-
-webkit-animation: wpr-anim-text-zoom-in 0.8s;
|
491 |
-
animation: wpr-anim-text-zoom-in 0.8s;
|
492 |
-
}
|
493 |
-
|
494 |
-
.wpr-anim-text.wpr-anim-text-type-zoom b.wpr-anim-text-hidden {
|
495 |
-
-webkit-animation: wpr-anim-text-zoom-out 0.8s;
|
496 |
-
animation: wpr-anim-text-zoom-out 0.8s;
|
497 |
-
}
|
498 |
-
|
499 |
-
@-webkit-keyframes wpr-anim-text-zoom-in {
|
500 |
-
0% {
|
501 |
-
opacity: 0;
|
502 |
-
-webkit-transform: translateZ(100px);
|
503 |
-
}
|
504 |
-
100% {
|
505 |
-
opacity: 1;
|
506 |
-
-webkit-transform: translateZ(0);
|
507 |
-
}
|
508 |
-
}
|
509 |
-
|
510 |
-
@keyframes wpr-anim-text-zoom-in {
|
511 |
-
0% {
|
512 |
-
opacity: 0;
|
513 |
-
-webkit-transform: translateZ(100px);
|
514 |
-
-ms-transform: translateZ(100px);
|
515 |
-
transform: translateZ(100px);
|
516 |
-
}
|
517 |
-
100% {
|
518 |
-
opacity: 1;
|
519 |
-
-webkit-transform: translateZ(0);
|
520 |
-
-ms-transform: translateZ(0);
|
521 |
-
transform: translateZ(0);
|
522 |
-
}
|
523 |
-
}
|
524 |
-
|
525 |
-
@-webkit-keyframes wpr-anim-text-zoom-out {
|
526 |
-
0% {
|
527 |
-
opacity: 1;
|
528 |
-
-webkit-transform: translateZ(0);
|
529 |
-
}
|
530 |
-
100% {
|
531 |
-
opacity: 0;
|
532 |
-
-webkit-transform: translateZ(-100px);
|
533 |
-
}
|
534 |
-
}
|
535 |
-
|
536 |
-
@keyframes wpr-anim-text-zoom-out {
|
537 |
-
0% {
|
538 |
-
opacity: 1;
|
539 |
-
-webkit-transform: translateZ(0);
|
540 |
-
-ms-transform: translateZ(0);
|
541 |
-
transform: translateZ(0);
|
542 |
-
}
|
543 |
-
100% {
|
544 |
-
opacity: 0;
|
545 |
-
-webkit-transform: translateZ(-100px);
|
546 |
-
-ms-transform: translateZ(-100px);
|
547 |
-
transform: translateZ(-100px);
|
548 |
-
}
|
549 |
-
}
|
550 |
-
|
551 |
-
|
552 |
-
/*--------------------------------------------------------------
|
553 |
-
== Rotate-3
|
554 |
-
--------------------------------------------------------------*/
|
555 |
-
|
556 |
-
.wpr-anim-text.wpr-anim-text-type-rotate-3 .wpr-anim-text-inner {
|
557 |
-
-webkit-perspective: 300px;
|
558 |
-
perspective: 300px;
|
559 |
-
}
|
560 |
-
|
561 |
-
.wpr-anim-text.wpr-anim-text-type-rotate-3 b {
|
562 |
-
opacity: 0;
|
563 |
-
}
|
564 |
-
|
565 |
-
.wpr-anim-text.wpr-anim-text-type-rotate-3 i {
|
566 |
-
display: inline-block;
|
567 |
-
-webkit-transform: rotateY(180deg);
|
568 |
-
-ms-transform: rotateY(180deg);
|
569 |
-
transform: rotateY(180deg);
|
570 |
-
-webkit-backface-visibility: hidden;
|
571 |
-
backface-visibility: hidden;
|
572 |
-
}
|
573 |
-
|
574 |
-
.wpr-anim-text-visible .wpr-anim-text.wpr-anim-text-type-rotate-3 i {
|
575 |
-
-webkit-transform: rotateY(0deg);
|
576 |
-
-ms-transform: rotateY(0deg);
|
577 |
-
transform: rotateY(0deg);
|
578 |
-
}
|
579 |
-
|
580 |
-
.wpr-anim-text.wpr-anim-text-type-rotate-3 i.wpr-anim-text-in {
|
581 |
-
-webkit-animation: wpr-anim-text-rotate-3-in 0.6s forwards;
|
582 |
-
animation: wpr-anim-text-rotate-3-in 0.6s forwards;
|
583 |
-
}
|
584 |
-
|
585 |
-
.wpr-anim-text.wpr-anim-text-type-rotate-3 i.wpr-anim-text-out {
|
586 |
-
-webkit-animation: wpr-anim-text-rotate-3-out 0.6s forwards;
|
587 |
-
animation: wpr-anim-text-rotate-3-out 0.6s forwards;
|
588 |
-
}
|
589 |
-
|
590 |
-
.no-csstransitions .wpr-anim-text.wpr-anim-text-type-rotate-3 i {
|
591 |
-
-webkit-transform: rotateY(0deg);
|
592 |
-
-ms-transform: rotateY(0deg);
|
593 |
-
transform: rotateY(0deg);
|
594 |
-
opacity: 0;
|
595 |
-
}
|
596 |
-
|
597 |
-
.no-csstransitions .wpr-anim-text.wpr-anim-text-type-rotate-3 .wpr-anim-text-visible i {
|
598 |
-
opacity: 1;
|
599 |
-
}
|
600 |
-
|
601 |
-
@-webkit-keyframes wpr-anim-text-rotate-3-in {
|
602 |
-
0% {
|
603 |
-
-webkit-transform: rotateY(180deg);
|
604 |
-
}
|
605 |
-
100% {
|
606 |
-
-webkit-transform: rotateY(0deg);
|
607 |
-
}
|
608 |
-
}
|
609 |
-
|
610 |
-
@keyframes wpr-anim-text-rotate-3-in {
|
611 |
-
0% {
|
612 |
-
-webkit-transform: rotateY(180deg);
|
613 |
-
-ms-transform: rotateY(180deg);
|
614 |
-
transform: rotateY(180deg);
|
615 |
-
}
|
616 |
-
100% {
|
617 |
-
-webkit-transform: rotateY(0deg);
|
618 |
-
-ms-transform: rotateY(0deg);
|
619 |
-
transform: rotateY(0deg);
|
620 |
-
}
|
621 |
-
}
|
622 |
-
|
623 |
-
@-webkit-keyframes wpr-anim-text-rotate-3-out {
|
624 |
-
0% {
|
625 |
-
-webkit-transform: rotateY(0);
|
626 |
-
}
|
627 |
-
100% {
|
628 |
-
-webkit-transform: rotateY(-180deg);
|
629 |
-
}
|
630 |
-
}
|
631 |
-
|
632 |
-
@keyframes wpr-anim-text-rotate-3-out {
|
633 |
-
0% {
|
634 |
-
-webkit-transform: rotateY(0);
|
635 |
-
-ms-transform: rotateY(0);
|
636 |
-
transform: rotateY(0);
|
637 |
-
}
|
638 |
-
100% {
|
639 |
-
-webkit-transform: rotateY(-180deg);
|
640 |
-
-ms-transform: rotateY(-180deg);
|
641 |
-
transform: rotateY(-180deg);
|
642 |
-
}
|
643 |
-
}
|
644 |
-
|
645 |
-
|
646 |
-
/*--------------------------------------------------------------
|
647 |
-
== Scale
|
648 |
-
--------------------------------------------------------------*/
|
649 |
-
|
650 |
-
.wpr-anim-text.wpr-anim-text-type-scale b {
|
651 |
-
opacity: 0;
|
652 |
-
}
|
653 |
-
|
654 |
-
.wpr-anim-text.wpr-anim-text-type-scale i {
|
655 |
-
display: inline-block;
|
656 |
-
opacity: 0;
|
657 |
-
-webkit-transform: scale(0);
|
658 |
-
-ms-transform: scale(0);
|
659 |
-
transform: scale(0);
|
660 |
-
}
|
661 |
-
|
662 |
-
.wpr-anim-text-visible .wpr-anim-text.wpr-anim-text-type-scale i {
|
663 |
-
opacity: 1;
|
664 |
-
}
|
665 |
-
|
666 |
-
.wpr-anim-text.wpr-anim-text-type-scale i.wpr-anim-text-in {
|
667 |
-
-webkit-animation: wpr-anim-text-scale-up 0.6s forwards;
|
668 |
-
animation: wpr-anim-text-scale-up 0.6s forwards;
|
669 |
-
}
|
670 |
-
|
671 |
-
.wpr-anim-text.wpr-anim-text-type-scale i.wpr-anim-text-out {
|
672 |
-
-webkit-animation: wpr-anim-text-scale-down 0.6s forwards;
|
673 |
-
animation: wpr-anim-text-scale-down 0.6s forwards;
|
674 |
-
}
|
675 |
-
|
676 |
-
.no-csstransitions .wpr-anim-text.wpr-anim-text-type-scale i {
|
677 |
-
-webkit-transform: scale(1);
|
678 |
-
-ms-transform: scale(1);
|
679 |
-
transform: scale(1);
|
680 |
-
opacity: 0;
|
681 |
-
}
|
682 |
-
|
683 |
-
.no-csstransitions .wpr-anim-text.wpr-anim-text-type-scale .wpr-anim-text-visible i {
|
684 |
-
opacity: 1;
|
685 |
-
}
|
686 |
-
|
687 |
-
@-webkit-keyframes wpr-anim-text-scale-up {
|
688 |
-
0% {
|
689 |
-
-webkit-transform: scale(0);
|
690 |
-
opacity: 0;
|
691 |
-
}
|
692 |
-
60% {
|
693 |
-
-webkit-transform: scale(1.2);
|
694 |
-
opacity: 1;
|
695 |
-
}
|
696 |
-
100% {
|
697 |
-
-webkit-transform: scale(1);
|
698 |
-
opacity: 1;
|
699 |
-
}
|
700 |
-
}
|
701 |
-
|
702 |
-
@keyframes wpr-anim-text-scale-up {
|
703 |
-
0% {
|
704 |
-
-webkit-transform: scale(0);
|
705 |
-
-ms-transform: scale(0);
|
706 |
-
transform: scale(0);
|
707 |
-
opacity: 0;
|
708 |
-
}
|
709 |
-
60% {
|
710 |
-
-webkit-transform: scale(1.2);
|
711 |
-
-ms-transform: scale(1.2);
|
712 |
-
transform: scale(1.2);
|
713 |
-
opacity: 1;
|
714 |
-
}
|
715 |
-
100% {
|
716 |
-
-webkit-transform: scale(1);
|
717 |
-
-ms-transform: scale(1);
|
718 |
-
transform: scale(1);
|
719 |
-
opacity: 1;
|
720 |
-
}
|
721 |
-
}
|
722 |
-
|
723 |
-
@-webkit-keyframes wpr-anim-text-scale-down {
|
724 |
-
0% {
|
725 |
-
-webkit-transform: scale(1);
|
726 |
-
opacity: 1;
|
727 |
-
}
|
728 |
-
60% {
|
729 |
-
-webkit-transform: scale(0);
|
730 |
-
opacity: 0;
|
731 |
-
}
|
732 |
-
}
|
733 |
-
|
734 |
-
@keyframes wpr-anim-text-scale-down {
|
735 |
-
0% {
|
736 |
-
-webkit-transform: scale(1);
|
737 |
-
-ms-transform: scale(1);
|
738 |
-
transform: scale(1);
|
739 |
-
opacity: 1;
|
740 |
-
}
|
741 |
-
60% {
|
742 |
-
-webkit-transform: scale(0);
|
743 |
-
-ms-transform: scale(0);
|
744 |
-
transform: scale(0);
|
745 |
-
opacity: 0;
|
746 |
-
}
|
747 |
-
}
|
748 |
-
|
749 |
-
|
750 |
-
/*--------------------------------------------------------------
|
751 |
-
== Push
|
752 |
-
--------------------------------------------------------------*/
|
753 |
-
.wpr-anim-text-type-push {
|
754 |
-
overflow: hidden;
|
755 |
-
}
|
756 |
-
|
757 |
-
.wpr-anim-text.wpr-anim-text-type-push b {
|
758 |
-
opacity: 0;
|
759 |
-
}
|
760 |
-
|
761 |
-
.wpr-anim-text.wpr-anim-text-type-push b.wpr-anim-text-visible {
|
762 |
-
opacity: 1;
|
763 |
-
-webkit-animation: wpr-anim-text-push-in 0.6s;
|
764 |
-
animation: wpr-anim-text-push-in 0.6s;
|
765 |
-
}
|
766 |
-
|
767 |
-
.wpr-anim-text.wpr-anim-text-type-push b.wpr-anim-text-hidden {
|
768 |
-
-webkit-animation: wpr-anim-text-push-out 0.6s;
|
769 |
-
animation: wpr-anim-text-push-out 0.6s;
|
770 |
-
}
|
771 |
-
|
772 |
-
@-webkit-keyframes wpr-anim-text-push-in {
|
773 |
-
0% {
|
774 |
-
opacity: 0;
|
775 |
-
-webkit-transform: translateX(-100%);
|
776 |
-
}
|
777 |
-
60% {
|
778 |
-
opacity: 1;
|
779 |
-
-webkit-transform: translateX(10%);
|
780 |
-
}
|
781 |
-
100% {
|
782 |
-
opacity: 1;
|
783 |
-
-webkit-transform: translateX(0);
|
784 |
-
}
|
785 |
-
}
|
786 |
-
|
787 |
-
@keyframes wpr-anim-text-push-in {
|
788 |
-
0% {
|
789 |
-
opacity: 0;
|
790 |
-
-webkit-transform: translateX(-100%);
|
791 |
-
-ms-transform: translateX(-100%);
|
792 |
-
transform: translateX(-100%);
|
793 |
-
}
|
794 |
-
60% {
|
795 |
-
opacity: 1;
|
796 |
-
-webkit-transform: translateX(10%);
|
797 |
-
-ms-transform: translateX(10%);
|
798 |
-
transform: translateX(10%);
|
799 |
-
}
|
800 |
-
100% {
|
801 |
-
opacity: 1;
|
802 |
-
-webkit-transform: translateX(0);
|
803 |
-
-ms-transform: translateX(0);
|
804 |
-
transform: translateX(0);
|
805 |
-
}
|
806 |
-
}
|
807 |
-
|
808 |
-
@-webkit-keyframes wpr-anim-text-push-out {
|
809 |
-
0% {
|
810 |
-
opacity: 1;
|
811 |
-
-webkit-transform: translateX(0);
|
812 |
-
}
|
813 |
-
60% {
|
814 |
-
opacity: 0;
|
815 |
-
-webkit-transform: translateX(110%);
|
816 |
-
}
|
817 |
-
100% {
|
818 |
-
opacity: 0;
|
819 |
-
-webkit-transform: translateX(100%);
|
820 |
-
}
|
821 |
-
}
|
822 |
-
|
823 |
-
@keyframes wpr-anim-text-push-out {
|
824 |
-
0% {
|
825 |
-
opacity: 1;
|
826 |
-
-webkit-transform: translateX(0);
|
827 |
-
-ms-transform: translateX(0);
|
828 |
-
transform: translateX(0);
|
829 |
-
}
|
830 |
-
60% {
|
831 |
-
opacity: 0;
|
832 |
-
-webkit-transform: translateX(110%);
|
833 |
-
-ms-transform: translateX(110%);
|
834 |
-
transform: translateX(110%);
|
835 |
-
}
|
836 |
-
100% {
|
837 |
-
opacity: 0;
|
838 |
-
-webkit-transform: translateX(100%);
|
839 |
-
-ms-transform: translateX(100%);
|
840 |
-
transform: translateX(100%);
|
841 |
-
}
|
842 |
-
}
|
843 |
-
|
1 |
+
/*--------------------------------------------------------------
|
2 |
+
== General
|
3 |
+
--------------------------------------------------------------*/
|
4 |
+
|
5 |
+
.wpr-anim-text-inner {
|
6 |
+
display: inline-block;
|
7 |
+
position: relative;
|
8 |
+
text-align: left;
|
9 |
+
}
|
10 |
+
|
11 |
+
.wpr-anim-text-inner b {
|
12 |
+
display: inline-block;
|
13 |
+
position: absolute;
|
14 |
+
white-space: nowrap;
|
15 |
+
left: 0;
|
16 |
+
top: 0;
|
17 |
+
}
|
18 |
+
|
19 |
+
.wpr-anim-text-inner b.wpr-anim-text-visible {
|
20 |
+
position: relative;
|
21 |
+
}
|
22 |
+
|
23 |
+
|
24 |
+
/*--------------------------------------------------------------
|
25 |
+
== Rotate 1
|
26 |
+
--------------------------------------------------------------*/
|
27 |
+
|
28 |
+
.wpr-anim-text.wpr-anim-text-type-rotate-1 .wpr-anim-text-inner {
|
29 |
+
-webkit-perspective: 300px;
|
30 |
+
perspective: 300px;
|
31 |
+
}
|
32 |
+
|
33 |
+
.wpr-anim-text.wpr-anim-text-type-rotate-1 b {
|
34 |
+
opacity: 0;
|
35 |
+
-webkit-transform-origin: 50% 100%;
|
36 |
+
-ms-transform-origin: 50% 100%;
|
37 |
+
transform-origin: 50% 100%;
|
38 |
+
-webkit-transform: rotateX(180deg);
|
39 |
+
-ms-transform: rotateX(180deg);
|
40 |
+
transform: rotateX(180deg);
|
41 |
+
}
|
42 |
+
|
43 |
+
.wpr-anim-text.wpr-anim-text-type-rotate-1 b.wpr-anim-text-visible {
|
44 |
+
opacity: 1;
|
45 |
+
-webkit-transform: rotateX(0deg);
|
46 |
+
-ms-transform: rotateX(0deg);
|
47 |
+
transform: rotateX(0deg);
|
48 |
+
-webkit-animation: wpr-anim-text-rotate-1-in 1.2s;
|
49 |
+
animation: wpr-anim-text-rotate-1-in 1.2s;
|
50 |
+
}
|
51 |
+
|
52 |
+
.wpr-anim-text.wpr-anim-text-type-rotate-1 b.wpr-anim-text-hidden {
|
53 |
+
-webkit-transform: rotateX(180deg);
|
54 |
+
-ms-transform: rotateX(180deg);
|
55 |
+
transform: rotateX(180deg);
|
56 |
+
-webkit-animation: wpr-anim-text-rotate-1-out 1.2s;
|
57 |
+
animation: wpr-anim-text-rotate-1-out 1.2s;
|
58 |
+
}
|
59 |
+
|
60 |
+
@-webkit-keyframes wpr-anim-text-rotate-1-in {
|
61 |
+
0% {
|
62 |
+
-webkit-transform: rotateX(180deg);
|
63 |
+
opacity: 0;
|
64 |
+
}
|
65 |
+
35% {
|
66 |
+
-webkit-transform: rotateX(120deg);
|
67 |
+
opacity: 0;
|
68 |
+
}
|
69 |
+
65% {
|
70 |
+
opacity: 0;
|
71 |
+
}
|
72 |
+
100% {
|
73 |
+
-webkit-transform: rotateX(360deg);
|
74 |
+
opacity: 1;
|
75 |
+
}
|
76 |
+
}
|
77 |
+
|
78 |
+
@keyframes wpr-anim-text-rotate-1-in {
|
79 |
+
0% {
|
80 |
+
-webkit-transform: rotateX(180deg);
|
81 |
+
-ms-transform: rotateX(180deg);
|
82 |
+
transform: rotateX(180deg);
|
83 |
+
opacity: 0;
|
84 |
+
}
|
85 |
+
35% {
|
86 |
+
-webkit-transform: rotateX(120deg);
|
87 |
+
-ms-transform: rotateX(120deg);
|
88 |
+
transform: rotateX(120deg);
|
89 |
+
opacity: 0;
|
90 |
+
}
|
91 |
+
65% {
|
92 |
+
opacity: 0;
|
93 |
+
}
|
94 |
+
100% {
|
95 |
+
-webkit-transform: rotateX(360deg);
|
96 |
+
-ms-transform: rotateX(360deg);
|
97 |
+
transform: rotateX(360deg);
|
98 |
+
opacity: 1;
|
99 |
+
}
|
100 |
+
}
|
101 |
+
|
102 |
+
@-webkit-keyframes wpr-anim-text-rotate-1-out {
|
103 |
+
0% {
|
104 |
+
-webkit-transform: rotateX(0deg);
|
105 |
+
opacity: 1;
|
106 |
+
}
|
107 |
+
35% {
|
108 |
+
-webkit-transform: rotateX(-40deg);
|
109 |
+
opacity: 1;
|
110 |
+
}
|
111 |
+
65% {
|
112 |
+
opacity: 0;
|
113 |
+
}
|
114 |
+
100% {
|
115 |
+
-webkit-transform: rotateX(180deg);
|
116 |
+
opacity: 0;
|
117 |
+
}
|
118 |
+
}
|
119 |
+
|
120 |
+
@keyframes wpr-anim-text-rotate-1-out {
|
121 |
+
0% {
|
122 |
+
-webkit-transform: rotateX(0deg);
|
123 |
+
-ms-transform: rotateX(0deg);
|
124 |
+
transform: rotateX(0deg);
|
125 |
+
opacity: 1;
|
126 |
+
}
|
127 |
+
35% {
|
128 |
+
-webkit-transform: rotateX(-40deg);
|
129 |
+
-ms-transform: rotateX(-40deg);
|
130 |
+
transform: rotateX(-40deg);
|
131 |
+
opacity: 1;
|
132 |
+
}
|
133 |
+
65% {
|
134 |
+
opacity: 0;
|
135 |
+
}
|
136 |
+
100% {
|
137 |
+
-webkit-transform: rotateX(180deg);
|
138 |
+
-ms-transform: rotateX(180deg);
|
139 |
+
transform: rotateX(180deg);
|
140 |
+
opacity: 0;
|
141 |
+
}
|
142 |
+
}
|
143 |
+
|
144 |
+
|
145 |
+
/*--------------------------------------------------------------
|
146 |
+
== Typing
|
147 |
+
--------------------------------------------------------------*/
|
148 |
+
|
149 |
+
.wpr-anim-text.wpr-anim-text-type-typing .wpr-anim-text-inner {
|
150 |
+
vertical-align: top;
|
151 |
+
overflow: hidden;
|
152 |
+
}
|
153 |
+
|
154 |
+
.wpr-anim-text.wpr-anim-text-type-typing b {
|
155 |
+
visibility: hidden;
|
156 |
+
}
|
157 |
+
|
158 |
+
.wpr-anim-text.wpr-anim-text-type-typing b.wpr-anim-text-visible {
|
159 |
+
visibility: visible;
|
160 |
+
}
|
161 |
+
|
162 |
+
.wpr-anim-text.wpr-anim-text-type-typing i {
|
163 |
+
position: absolute;
|
164 |
+
visibility: hidden;
|
165 |
+
}
|
166 |
+
|
167 |
+
.wpr-anim-text.wpr-anim-text-type-typing i.wpr-anim-text-in {
|
168 |
+
position: relative;
|
169 |
+
visibility: visible;
|
170 |
+
}
|
171 |
+
|
172 |
+
@-webkit-keyframes wpr-anim-text-pulse {
|
173 |
+
0% {
|
174 |
+
-webkit-transform: translateY(-50%) scale(1);
|
175 |
+
opacity: 1;
|
176 |
+
}
|
177 |
+
40% {
|
178 |
+
-webkit-transform: translateY(-50%) scale(0.9);
|
179 |
+
opacity: 0;
|
180 |
+
}
|
181 |
+
100% {
|
182 |
+
-webkit-transform: translateY(-50%) scale(0);
|
183 |
+
opacity: 0;
|
184 |
+
}
|
185 |
+
}
|
186 |
+
|
187 |
+
@keyframes wpr-anim-text-pulse {
|
188 |
+
0% {
|
189 |
+
-webkit-transform: translateY(-50%) scale(1);
|
190 |
+
-ms-transform: translateY(-50%) scale(1);
|
191 |
+
transform: translateY(-50%) scale(1);
|
192 |
+
opacity: 1;
|
193 |
+
}
|
194 |
+
40% {
|
195 |
+
-webkit-transform: translateY(-50%) scale(0.9);
|
196 |
+
-ms-transform: translateY(-50%) scale(0.9);
|
197 |
+
transform: translateY(-50%) scale(0.9);
|
198 |
+
opacity: 0;
|
199 |
+
}
|
200 |
+
100% {
|
201 |
+
-webkit-transform: translateY(-50%) scale(0);
|
202 |
+
-ms-transform: translateY(-50%) scale(0);
|
203 |
+
transform: translateY(-50%) scale(0);
|
204 |
+
opacity: 0;
|
205 |
+
}
|
206 |
+
}
|
207 |
+
|
208 |
+
|
209 |
+
/*--------------------------------------------------------------
|
210 |
+
== Rotate 2
|
211 |
+
--------------------------------------------------------------*/
|
212 |
+
|
213 |
+
.wpr-anim-text.wpr-anim-text-type-rotate-2 .wpr-anim-text-inner {
|
214 |
+
-webkit-perspective: 300px;
|
215 |
+
perspective: 300px;
|
216 |
+
}
|
217 |
+
|
218 |
+
.wpr-anim-text.wpr-anim-text-type-rotate-2 i,
|
219 |
+
.wpr-anim-text.wpr-anim-text-type-rotate-2 em {
|
220 |
+
display: inline-block;
|
221 |
+
-webkit-backface-visibility: hidden;
|
222 |
+
backface-visibility: hidden;
|
223 |
+
}
|
224 |
+
|
225 |
+
.wpr-anim-text.wpr-anim-text-type-rotate-2 b {
|
226 |
+
opacity: 0;
|
227 |
+
}
|
228 |
+
|
229 |
+
.wpr-anim-text.wpr-anim-text-type-rotate-2 i {
|
230 |
+
-webkit-transform-style: preserve-3d;
|
231 |
+
transform-style: preserve-3d;
|
232 |
+
-webkit-transform: translateZ(-20px) rotateX(90deg);
|
233 |
+
-ms-transform: translateZ(-20px) rotateX(90deg);
|
234 |
+
transform: translateZ(-20px) rotateX(90deg);
|
235 |
+
opacity: 0;
|
236 |
+
}
|
237 |
+
|
238 |
+
.wpr-anim-text-visible .wpr-anim-text.wpr-anim-text-type-rotate-2 i {
|
239 |
+
opacity: 1;
|
240 |
+
}
|
241 |
+
|
242 |
+
.wpr-anim-text.wpr-anim-text-type-rotate-2 i.wpr-anim-text-in {
|
243 |
+
-webkit-animation: wpr-anim-text-rotate-2-in 0.4s forwards;
|
244 |
+
animation: wpr-anim-text-rotate-2-in 0.4s forwards;
|
245 |
+
}
|
246 |
+
|
247 |
+
.wpr-anim-text.wpr-anim-text-type-rotate-2 i.wpr-anim-text-out {
|
248 |
+
-webkit-animation: wpr-anim-text-rotate-2-out 0.4s forwards;
|
249 |
+
animation: wpr-anim-text-rotate-2-out 0.4s forwards;
|
250 |
+
}
|
251 |
+
|
252 |
+
.wpr-anim-text.wpr-anim-text-type-rotate-2 em {
|
253 |
+
-webkit-transform: translateZ(20px);
|
254 |
+
-ms-transform: translateZ(20px);
|
255 |
+
transform: translateZ(20px);
|
256 |
+
}
|
257 |
+
|
258 |
+
.no-csstransitions .wpr-anim-text.wpr-anim-text-type-rotate-2 i {
|
259 |
+
-webkit-transform: rotateX(0deg);
|
260 |
+
-ms-transform: rotateX(0deg);
|
261 |
+
transform: rotateX(0deg);
|
262 |
+
opacity: 0;
|
263 |
+
}
|
264 |
+
|
265 |
+
.no-csstransitions .wpr-anim-text.wpr-anim-text-type-rotate-2 i em {
|
266 |
+
-webkit-transform: scale(1);
|
267 |
+
-ms-transform: scale(1);
|
268 |
+
transform: scale(1);
|
269 |
+
}
|
270 |
+
|
271 |
+
.no-csstransitions .wpr-anim-text.wpr-anim-text-type-rotate-2 .wpr-anim-text-visible i {
|
272 |
+
opacity: 1;
|
273 |
+
}
|
274 |
+
|
275 |
+
@-webkit-keyframes wpr-anim-text-rotate-2-in {
|
276 |
+
0% {
|
277 |
+
opacity: 0;
|
278 |
+
-webkit-transform: translateZ(-20px) rotateX(90deg);
|
279 |
+
}
|
280 |
+
60% {
|
281 |
+
opacity: 1;
|
282 |
+
-webkit-transform: translateZ(-20px) rotateX(-10deg);
|
283 |
+
}
|
284 |
+
100% {
|
285 |
+
opacity: 1;
|
286 |
+
-webkit-transform: translateZ(-20px) rotateX(0deg);
|
287 |
+
}
|
288 |
+
}
|
289 |
+
|
290 |
+
@keyframes wpr-anim-text-rotate-2-in {
|
291 |
+
0% {
|
292 |
+
opacity: 0;
|
293 |
+
-webkit-transform: translateZ(-20px) rotateX(90deg);
|
294 |
+
-ms-transform: translateZ(-20px) rotateX(90deg);
|
295 |
+
transform: translateZ(-20px) rotateX(90deg);
|
296 |
+
}
|
297 |
+
60% {
|
298 |
+
opacity: 1;
|
299 |
+
-webkit-transform: translateZ(-20px) rotateX(-10deg);
|
300 |
+
-ms-transform: translateZ(-20px) rotateX(-10deg);
|
301 |
+
transform: translateZ(-20px) rotateX(-10deg);
|
302 |
+
}
|
303 |
+
100% {
|
304 |
+
opacity: 1;
|
305 |
+
-webkit-transform: translateZ(-20px) rotateX(0deg);
|
306 |
+
-ms-transform: translateZ(-20px) rotateX(0deg);
|
307 |
+
transform: translateZ(-20px) rotateX(0deg);
|
308 |
+
}
|
309 |
+
}
|
310 |
+
|
311 |
+
@-webkit-keyframes wpr-anim-text-rotate-2-out {
|
312 |
+
0% {
|
313 |
+
opacity: 1;
|
314 |
+
-webkit-transform: translateZ(-20px) rotateX(0);
|
315 |
+
}
|
316 |
+
60% {
|
317 |
+
opacity: 0;
|
318 |
+
-webkit-transform: translateZ(-20px) rotateX(-100deg);
|
319 |
+
}
|
320 |
+
100% {
|
321 |
+
opacity: 0;
|
322 |
+
-webkit-transform: translateZ(-20px) rotateX(-90deg);
|
323 |
+
}
|
324 |
+
}
|
325 |
+
|
326 |
+
@keyframes wpr-anim-text-rotate-2-out {
|
327 |
+
0% {
|
328 |
+
opacity: 1;
|
329 |
+
-webkit-transform: translateZ(-20px) rotateX(0);
|
330 |
+
-ms-transform: translateZ(-20px) rotateX(0);
|
331 |
+
transform: translateZ(-20px) rotateX(0);
|
332 |
+
}
|
333 |
+
60% {
|
334 |
+
opacity: 0;
|
335 |
+
-webkit-transform: translateZ(-20px) rotateX(-100deg);
|
336 |
+
-ms-transform: translateZ(-20px) rotateX(-100deg);
|
337 |
+
transform: translateZ(-20px) rotateX(-100deg);
|
338 |
+
}
|
339 |
+
100% {
|
340 |
+
opacity: 0;
|
341 |
+
-webkit-transform: translateZ(-20px) rotateX(-90deg);
|
342 |
+
-ms-transform: translateZ(-20px) rotateX(-90deg);
|
343 |
+
transform: translateZ(-20px) rotateX(-90deg);
|
344 |
+
}
|
345 |
+
}
|
346 |
+
|
347 |
+
|
348 |
+
/*--------------------------------------------------------------
|
349 |
+
== Slide
|
350 |
+
--------------------------------------------------------------*/
|
351 |
+
|
352 |
+
.wpr-anim-text.wpr-anim-text-type-slide span {
|
353 |
+
display: inline-block;
|
354 |
+
padding: .2em 0;
|
355 |
+
}
|
356 |
+
|
357 |
+
.wpr-anim-text.wpr-anim-text-type-slide .wpr-anim-text-inner {
|
358 |
+
overflow: hidden;
|
359 |
+
vertical-align: top;
|
360 |
+
}
|
361 |
+
|
362 |
+
.wpr-anim-text.wpr-anim-text-type-slide b {
|
363 |
+
opacity: 0;
|
364 |
+
top: .2em;
|
365 |
+
}
|
366 |
+
|
367 |
+
.wpr-anim-text.wpr-anim-text-type-slide b.wpr-anim-text-visible {
|
368 |
+
top: 0;
|
369 |
+
opacity: 1;
|
370 |
+
-webkit-animation: wpr-anim-text-slide-in 0.6s;
|
371 |
+
animation: wpr-anim-text-slide-in 0.6s;
|
372 |
+
}
|
373 |
+
|
374 |
+
.wpr-anim-text.wpr-anim-text-type-slide b.wpr-anim-text-hidden {
|
375 |
+
-webkit-animation: wpr-anim-text-slide-out 0.6s;
|
376 |
+
animation: wpr-anim-text-slide-out 0.6s;
|
377 |
+
}
|
378 |
+
|
379 |
+
@-webkit-keyframes wpr-anim-text-slide-in {
|
380 |
+
0% {
|
381 |
+
opacity: 0;
|
382 |
+
-webkit-transform: translateY(-100%);
|
383 |
+
}
|
384 |
+
60% {
|
385 |
+
opacity: 1;
|
386 |
+
-webkit-transform: translateY(20%);
|
387 |
+
}
|
388 |
+
100% {
|
389 |
+
opacity: 1;
|
390 |
+
-webkit-transform: translateY(0);
|
391 |
+
}
|
392 |
+
}
|
393 |
+
|
394 |
+
@keyframes wpr-anim-text-slide-in {
|
395 |
+
0% {
|
396 |
+
opacity: 0;
|
397 |
+
-webkit-transform: translateY(-100%);
|
398 |
+
-ms-transform: translateY(-100%);
|
399 |
+
transform: translateY(-100%);
|
400 |
+
}
|
401 |
+
60% {
|
402 |
+
opacity: 1;
|
403 |
+
-webkit-transform: translateY(20%);
|
404 |
+
-ms-transform: translateY(20%);
|
405 |
+
transform: translateY(20%);
|
406 |
+
}
|
407 |
+
100% {
|
408 |
+
opacity: 1;
|
409 |
+
-webkit-transform: translateY(0);
|
410 |
+
-ms-transform: translateY(0);
|
411 |
+
transform: translateY(0);
|
412 |
+
}
|
413 |
+
}
|
414 |
+
|
415 |
+
@-webkit-keyframes wpr-anim-text-slide-out {
|
416 |
+
0% {
|
417 |
+
opacity: 1;
|
418 |
+
-webkit-transform: translateY(0);
|
419 |
+
}
|
420 |
+
60% {
|
421 |
+
opacity: 0;
|
422 |
+
-webkit-transform: translateY(120%);
|
423 |
+
}
|
424 |
+
100% {
|
425 |
+
opacity: 0;
|
426 |
+
-webkit-transform: translateY(100%);
|
427 |
+
}
|
428 |
+
}
|
429 |
+
|
430 |
+
@keyframes wpr-anim-text-slide-out {
|
431 |
+
0% {
|
432 |
+
opacity: 1;
|
433 |
+
-webkit-transform: translateY(0);
|
434 |
+
-ms-transform: translateY(0);
|
435 |
+
transform: translateY(0);
|
436 |
+
}
|
437 |
+
60% {
|
438 |
+
opacity: 0;
|
439 |
+
-webkit-transform: translateY(120%);
|
440 |
+
-ms-transform: translateY(120%);
|
441 |
+
transform: translateY(120%);
|
442 |
+
}
|
443 |
+
100% {
|
444 |
+
opacity: 0;
|
445 |
+
-webkit-transform: translateY(100%);
|
446 |
+
-ms-transform: translateY(100%);
|
447 |
+
transform: translateY(100%);
|
448 |
+
}
|
449 |
+
}
|
450 |
+
|
451 |
+
|
452 |
+
/*--------------------------------------------------------------
|
453 |
+
== Clip
|
454 |
+
--------------------------------------------------------------*/
|
455 |
+
|
456 |
+
.wpr-anim-text.wpr-anim-text-type-clip span {
|
457 |
+
display: inline-block;
|
458 |
+
padding: .2em 0;
|
459 |
+
}
|
460 |
+
|
461 |
+
.wpr-anim-text.wpr-anim-text-type-clip .wpr-anim-text-inner {
|
462 |
+
overflow: hidden;
|
463 |
+
vertical-align: top;
|
464 |
+
}
|
465 |
+
|
466 |
+
.wpr-anim-text.wpr-anim-text-type-clip b {
|
467 |
+
opacity: 0;
|
468 |
+
}
|
469 |
+
|
470 |
+
.wpr-anim-text.wpr-anim-text-type-clip b.wpr-anim-text-visible {
|
471 |
+
opacity: 1;
|
472 |
+
}
|
473 |
+
|
474 |
+
|
475 |
+
/*--------------------------------------------------------------
|
476 |
+
== Zoom
|
477 |
+
--------------------------------------------------------------*/
|
478 |
+
|
479 |
+
.wpr-anim-text.wpr-anim-text-type-zoom .wpr-anim-text-inner {
|
480 |
+
-webkit-perspective: 300px;
|
481 |
+
perspective: 300px;
|
482 |
+
}
|
483 |
+
|
484 |
+
.wpr-anim-text.wpr-anim-text-type-zoom b {
|
485 |
+
opacity: 0;
|
486 |
+
}
|
487 |
+
|
488 |
+
.wpr-anim-text.wpr-anim-text-type-zoom b.wpr-anim-text-visible {
|
489 |
+
opacity: 1;
|
490 |
+
-webkit-animation: wpr-anim-text-zoom-in 0.8s;
|
491 |
+
animation: wpr-anim-text-zoom-in 0.8s;
|
492 |
+
}
|
493 |
+
|
494 |
+
.wpr-anim-text.wpr-anim-text-type-zoom b.wpr-anim-text-hidden {
|
495 |
+
-webkit-animation: wpr-anim-text-zoom-out 0.8s;
|
496 |
+
animation: wpr-anim-text-zoom-out 0.8s;
|
497 |
+
}
|
498 |
+
|
499 |
+
@-webkit-keyframes wpr-anim-text-zoom-in {
|
500 |
+
0% {
|
501 |
+
opacity: 0;
|
502 |
+
-webkit-transform: translateZ(100px);
|
503 |
+
}
|
504 |
+
100% {
|
505 |
+
opacity: 1;
|
506 |
+
-webkit-transform: translateZ(0);
|
507 |
+
}
|
508 |
+
}
|
509 |
+
|
510 |
+
@keyframes wpr-anim-text-zoom-in {
|
511 |
+
0% {
|
512 |
+
opacity: 0;
|
513 |
+
-webkit-transform: translateZ(100px);
|
514 |
+
-ms-transform: translateZ(100px);
|
515 |
+
transform: translateZ(100px);
|
516 |
+
}
|
517 |
+
100% {
|
518 |
+
opacity: 1;
|
519 |
+
-webkit-transform: translateZ(0);
|
520 |
+
-ms-transform: translateZ(0);
|
521 |
+
transform: translateZ(0);
|
522 |
+
}
|
523 |
+
}
|
524 |
+
|
525 |
+
@-webkit-keyframes wpr-anim-text-zoom-out {
|
526 |
+
0% {
|
527 |
+
opacity: 1;
|
528 |
+
-webkit-transform: translateZ(0);
|
529 |
+
}
|
530 |
+
100% {
|
531 |
+
opacity: 0;
|
532 |
+
-webkit-transform: translateZ(-100px);
|
533 |
+
}
|
534 |
+
}
|
535 |
+
|
536 |
+
@keyframes wpr-anim-text-zoom-out {
|
537 |
+
0% {
|
538 |
+
opacity: 1;
|
539 |
+
-webkit-transform: translateZ(0);
|
540 |
+
-ms-transform: translateZ(0);
|
541 |
+
transform: translateZ(0);
|
542 |
+
}
|
543 |
+
100% {
|
544 |
+
opacity: 0;
|
545 |
+
-webkit-transform: translateZ(-100px);
|
546 |
+
-ms-transform: translateZ(-100px);
|
547 |
+
transform: translateZ(-100px);
|
548 |
+
}
|
549 |
+
}
|
550 |
+
|
551 |
+
|
552 |
+
/*--------------------------------------------------------------
|
553 |
+
== Rotate-3
|
554 |
+
--------------------------------------------------------------*/
|
555 |
+
|
556 |
+
.wpr-anim-text.wpr-anim-text-type-rotate-3 .wpr-anim-text-inner {
|
557 |
+
-webkit-perspective: 300px;
|
558 |
+
perspective: 300px;
|
559 |
+
}
|
560 |
+
|
561 |
+
.wpr-anim-text.wpr-anim-text-type-rotate-3 b {
|
562 |
+
opacity: 0;
|
563 |
+
}
|
564 |
+
|
565 |
+
.wpr-anim-text.wpr-anim-text-type-rotate-3 i {
|
566 |
+
display: inline-block;
|
567 |
+
-webkit-transform: rotateY(180deg);
|
568 |
+
-ms-transform: rotateY(180deg);
|
569 |
+
transform: rotateY(180deg);
|
570 |
+
-webkit-backface-visibility: hidden;
|
571 |
+
backface-visibility: hidden;
|
572 |
+
}
|
573 |
+
|
574 |
+
.wpr-anim-text-visible .wpr-anim-text.wpr-anim-text-type-rotate-3 i {
|
575 |
+
-webkit-transform: rotateY(0deg);
|
576 |
+
-ms-transform: rotateY(0deg);
|
577 |
+
transform: rotateY(0deg);
|
578 |
+
}
|
579 |
+
|
580 |
+
.wpr-anim-text.wpr-anim-text-type-rotate-3 i.wpr-anim-text-in {
|
581 |
+
-webkit-animation: wpr-anim-text-rotate-3-in 0.6s forwards;
|
582 |
+
animation: wpr-anim-text-rotate-3-in 0.6s forwards;
|
583 |
+
}
|
584 |
+
|
585 |
+
.wpr-anim-text.wpr-anim-text-type-rotate-3 i.wpr-anim-text-out {
|
586 |
+
-webkit-animation: wpr-anim-text-rotate-3-out 0.6s forwards;
|
587 |
+
animation: wpr-anim-text-rotate-3-out 0.6s forwards;
|
588 |
+
}
|
589 |
+
|
590 |
+
.no-csstransitions .wpr-anim-text.wpr-anim-text-type-rotate-3 i {
|
591 |
+
-webkit-transform: rotateY(0deg);
|
592 |
+
-ms-transform: rotateY(0deg);
|
593 |
+
transform: rotateY(0deg);
|
594 |
+
opacity: 0;
|
595 |
+
}
|
596 |
+
|
597 |
+
.no-csstransitions .wpr-anim-text.wpr-anim-text-type-rotate-3 .wpr-anim-text-visible i {
|
598 |
+
opacity: 1;
|
599 |
+
}
|
600 |
+
|
601 |
+
@-webkit-keyframes wpr-anim-text-rotate-3-in {
|
602 |
+
0% {
|
603 |
+
-webkit-transform: rotateY(180deg);
|
604 |
+
}
|
605 |
+
100% {
|
606 |
+
-webkit-transform: rotateY(0deg);
|
607 |
+
}
|
608 |
+
}
|
609 |
+
|
610 |
+
@keyframes wpr-anim-text-rotate-3-in {
|
611 |
+
0% {
|
612 |
+
-webkit-transform: rotateY(180deg);
|
613 |
+
-ms-transform: rotateY(180deg);
|
614 |
+
transform: rotateY(180deg);
|
615 |
+
}
|
616 |
+
100% {
|
617 |
+
-webkit-transform: rotateY(0deg);
|
618 |
+
-ms-transform: rotateY(0deg);
|
619 |
+
transform: rotateY(0deg);
|
620 |
+
}
|
621 |
+
}
|
622 |
+
|
623 |
+
@-webkit-keyframes wpr-anim-text-rotate-3-out {
|
624 |
+
0% {
|
625 |
+
-webkit-transform: rotateY(0);
|
626 |
+
}
|
627 |
+
100% {
|
628 |
+
-webkit-transform: rotateY(-180deg);
|
629 |
+
}
|
630 |
+
}
|
631 |
+
|
632 |
+
@keyframes wpr-anim-text-rotate-3-out {
|
633 |
+
0% {
|
634 |
+
-webkit-transform: rotateY(0);
|
635 |
+
-ms-transform: rotateY(0);
|
636 |
+
transform: rotateY(0);
|
637 |
+
}
|
638 |
+
100% {
|
639 |
+
-webkit-transform: rotateY(-180deg);
|
640 |
+
-ms-transform: rotateY(-180deg);
|
641 |
+
transform: rotateY(-180deg);
|
642 |
+
}
|
643 |
+
}
|
644 |
+
|
645 |
+
|
646 |
+
/*--------------------------------------------------------------
|
647 |
+
== Scale
|
648 |
+
--------------------------------------------------------------*/
|
649 |
+
|
650 |
+
.wpr-anim-text.wpr-anim-text-type-scale b {
|
651 |
+
opacity: 0;
|
652 |
+
}
|
653 |
+
|
654 |
+
.wpr-anim-text.wpr-anim-text-type-scale i {
|
655 |
+
display: inline-block;
|
656 |
+
opacity: 0;
|
657 |
+
-webkit-transform: scale(0);
|
658 |
+
-ms-transform: scale(0);
|
659 |
+
transform: scale(0);
|
660 |
+
}
|
661 |
+
|
662 |
+
.wpr-anim-text-visible .wpr-anim-text.wpr-anim-text-type-scale i {
|
663 |
+
opacity: 1;
|
664 |
+
}
|
665 |
+
|
666 |
+
.wpr-anim-text.wpr-anim-text-type-scale i.wpr-anim-text-in {
|
667 |
+
-webkit-animation: wpr-anim-text-scale-up 0.6s forwards;
|
668 |
+
animation: wpr-anim-text-scale-up 0.6s forwards;
|
669 |
+
}
|
670 |
+
|
671 |
+
.wpr-anim-text.wpr-anim-text-type-scale i.wpr-anim-text-out {
|
672 |
+
-webkit-animation: wpr-anim-text-scale-down 0.6s forwards;
|
673 |
+
animation: wpr-anim-text-scale-down 0.6s forwards;
|
674 |
+
}
|
675 |
+
|
676 |
+
.no-csstransitions .wpr-anim-text.wpr-anim-text-type-scale i {
|
677 |
+
-webkit-transform: scale(1);
|
678 |
+
-ms-transform: scale(1);
|
679 |
+
transform: scale(1);
|
680 |
+
opacity: 0;
|
681 |
+
}
|
682 |
+
|
683 |
+
.no-csstransitions .wpr-anim-text.wpr-anim-text-type-scale .wpr-anim-text-visible i {
|
684 |
+
opacity: 1;
|
685 |
+
}
|
686 |
+
|
687 |
+
@-webkit-keyframes wpr-anim-text-scale-up {
|
688 |
+
0% {
|
689 |
+
-webkit-transform: scale(0);
|
690 |
+
opacity: 0;
|
691 |
+
}
|
692 |
+
60% {
|
693 |
+
-webkit-transform: scale(1.2);
|
694 |
+
opacity: 1;
|
695 |
+
}
|
696 |
+
100% {
|
697 |
+
-webkit-transform: scale(1);
|
698 |
+
opacity: 1;
|
699 |
+
}
|
700 |
+
}
|
701 |
+
|
702 |
+
@keyframes wpr-anim-text-scale-up {
|
703 |
+
0% {
|
704 |
+
-webkit-transform: scale(0);
|
705 |
+
-ms-transform: scale(0);
|
706 |
+
transform: scale(0);
|
707 |
+
opacity: 0;
|
708 |
+
}
|
709 |
+
60% {
|
710 |
+
-webkit-transform: scale(1.2);
|
711 |
+
-ms-transform: scale(1.2);
|
712 |
+
transform: scale(1.2);
|
713 |
+
opacity: 1;
|
714 |
+
}
|
715 |
+
100% {
|
716 |
+
-webkit-transform: scale(1);
|
717 |
+
-ms-transform: scale(1);
|
718 |
+
transform: scale(1);
|
719 |
+
opacity: 1;
|
720 |
+
}
|
721 |
+
}
|
722 |
+
|
723 |
+
@-webkit-keyframes wpr-anim-text-scale-down {
|
724 |
+
0% {
|
725 |
+
-webkit-transform: scale(1);
|
726 |
+
opacity: 1;
|
727 |
+
}
|
728 |
+
60% {
|
729 |
+
-webkit-transform: scale(0);
|
730 |
+
opacity: 0;
|
731 |
+
}
|
732 |
+
}
|
733 |
+
|
734 |
+
@keyframes wpr-anim-text-scale-down {
|
735 |
+
0% {
|
736 |
+
-webkit-transform: scale(1);
|
737 |
+
-ms-transform: scale(1);
|
738 |
+
transform: scale(1);
|
739 |
+
opacity: 1;
|
740 |
+
}
|
741 |
+
60% {
|
742 |
+
-webkit-transform: scale(0);
|
743 |
+
-ms-transform: scale(0);
|
744 |
+
transform: scale(0);
|
745 |
+
opacity: 0;
|
746 |
+
}
|
747 |
+
}
|
748 |
+
|
749 |
+
|
750 |
+
/*--------------------------------------------------------------
|
751 |
+
== Push
|
752 |
+
--------------------------------------------------------------*/
|
753 |
+
.wpr-anim-text-type-push {
|
754 |
+
overflow: hidden;
|
755 |
+
}
|
756 |
+
|
757 |
+
.wpr-anim-text.wpr-anim-text-type-push b {
|
758 |
+
opacity: 0;
|
759 |
+
}
|
760 |
+
|
761 |
+
.wpr-anim-text.wpr-anim-text-type-push b.wpr-anim-text-visible {
|
762 |
+
opacity: 1;
|
763 |
+
-webkit-animation: wpr-anim-text-push-in 0.6s;
|
764 |
+
animation: wpr-anim-text-push-in 0.6s;
|
765 |
+
}
|
766 |
+
|
767 |
+
.wpr-anim-text.wpr-anim-text-type-push b.wpr-anim-text-hidden {
|
768 |
+
-webkit-animation: wpr-anim-text-push-out 0.6s;
|
769 |
+
animation: wpr-anim-text-push-out 0.6s;
|
770 |
+
}
|
771 |
+
|
772 |
+
@-webkit-keyframes wpr-anim-text-push-in {
|
773 |
+
0% {
|
774 |
+
opacity: 0;
|
775 |
+
-webkit-transform: translateX(-100%);
|
776 |
+
}
|
777 |
+
60% {
|
778 |
+
opacity: 1;
|
779 |
+
-webkit-transform: translateX(10%);
|
780 |
+
}
|
781 |
+
100% {
|
782 |
+
opacity: 1;
|
783 |
+
-webkit-transform: translateX(0);
|
784 |
+
}
|
785 |
+
}
|
786 |
+
|
787 |
+
@keyframes wpr-anim-text-push-in {
|
788 |
+
0% {
|
789 |
+
opacity: 0;
|
790 |
+
-webkit-transform: translateX(-100%);
|
791 |
+
-ms-transform: translateX(-100%);
|
792 |
+
transform: translateX(-100%);
|
793 |
+
}
|
794 |
+
60% {
|
795 |
+
opacity: 1;
|
796 |
+
-webkit-transform: translateX(10%);
|
797 |
+
-ms-transform: translateX(10%);
|
798 |
+
transform: translateX(10%);
|
799 |
+
}
|
800 |
+
100% {
|
801 |
+
opacity: 1;
|
802 |
+
-webkit-transform: translateX(0);
|
803 |
+
-ms-transform: translateX(0);
|
804 |
+
transform: translateX(0);
|
805 |
+
}
|
806 |
+
}
|
807 |
+
|
808 |
+
@-webkit-keyframes wpr-anim-text-push-out {
|
809 |
+
0% {
|
810 |
+
opacity: 1;
|
811 |
+
-webkit-transform: translateX(0);
|
812 |
+
}
|
813 |
+
60% {
|
814 |
+
opacity: 0;
|
815 |
+
-webkit-transform: translateX(110%);
|
816 |
+
}
|
817 |
+
100% {
|
818 |
+
opacity: 0;
|
819 |
+
-webkit-transform: translateX(100%);
|
820 |
+
}
|
821 |
+
}
|
822 |
+
|
823 |
+
@keyframes wpr-anim-text-push-out {
|
824 |
+
0% {
|
825 |
+
opacity: 1;
|
826 |
+
-webkit-transform: translateX(0);
|
827 |
+
-ms-transform: translateX(0);
|
828 |
+
transform: translateX(0);
|
829 |
+
}
|
830 |
+
60% {
|
831 |
+
opacity: 0;
|
832 |
+
-webkit-transform: translateX(110%);
|
833 |
+
-ms-transform: translateX(110%);
|
834 |
+
transform: translateX(110%);
|
835 |
+
}
|
836 |
+
100% {
|
837 |
+
opacity: 0;
|
838 |
+
-webkit-transform: translateX(100%);
|
839 |
+
-ms-transform: translateX(100%);
|
840 |
+
transform: translateX(100%);
|
841 |
+
}
|
842 |
+
}
|
843 |
+
|
assets/css/lib/animations/wpr-animations.css
CHANGED
@@ -1,1301 +1,1301 @@
|
|
1 |
-
/*!
|
2 |
-
* WPR Animations
|
3 |
-
* Version: 1.0
|
4 |
-
* Author: WP Royal
|
5 |
-
* Author URL: https://royal-elementor-addons.com/
|
6 |
-
|
7 |
-
* WPR Animations Copyright WP Royal 2020.
|
8 |
-
*/
|
9 |
-
|
10 |
-
.wpr-anim-transparency {
|
11 |
-
opacity: 0;
|
12 |
-
}
|
13 |
-
|
14 |
-
.wpr-element-fade-in,
|
15 |
-
.wpr-overlay-fade-in {
|
16 |
-
opacity: 0;
|
17 |
-
}
|
18 |
-
|
19 |
-
.wpr-animation-wrap-active .wpr-anim-size-small.wpr-element-fade-in,
|
20 |
-
.wpr-animation-wrap-active .wpr-anim-size-small.wpr-overlay-fade-in,
|
21 |
-
.wpr-animation-wrap:hover .wpr-anim-size-small.wpr-element-fade-in,
|
22 |
-
.wpr-animation-wrap:hover .wpr-anim-size-small.wpr-overlay-fade-in,
|
23 |
-
.wpr-animation-enter > .wpr-anim-size-small.wpr-overlay-fade-in {
|
24 |
-
opacity: 0.4;
|
25 |
-
}
|
26 |
-
|
27 |
-
.wpr-animation-wrap-active .wpr-anim-size-medium.wpr-element-fade-in,
|
28 |
-
.wpr-animation-wrap-active .wpr-anim-size-medium.wpr-overlay-fade-in,
|
29 |
-
.wpr-animation-wrap:hover .wpr-anim-size-medium.wpr-element-fade-in,
|
30 |
-
.wpr-animation-wrap:hover .wpr-anim-size-medium.wpr-overlay-fade-in,
|
31 |
-
.wpr-animation-enter > .wpr-anim-size-medium.wpr-overlay-fade-in {
|
32 |
-
opacity: 0.75;
|
33 |
-
}
|
34 |
-
|
35 |
-
.wpr-animation-wrap-active .wpr-anim-size-large.wpr-element-fade-in,
|
36 |
-
.wpr-animation-wrap-active .wpr-anim-size-large.wpr-overlay-fade-in,
|
37 |
-
.wpr-animation-wrap:hover .wpr-anim-size-large.wpr-element-fade-in,
|
38 |
-
.wpr-animation-wrap:hover .wpr-anim-size-large.wpr-overlay-fade-in,
|
39 |
-
.wpr-animation-enter > .wpr-anim-size-large.wpr-overlay-fade-in {
|
40 |
-
opacity: 1;
|
41 |
-
}
|
42 |
-
|
43 |
-
.wpr-element-fade-out,
|
44 |
-
.wpr-overlay-fade-out {
|
45 |
-
opacity: 1;
|
46 |
-
}
|
47 |
-
|
48 |
-
.wpr-animation-wrap-active .wpr-anim-size-small.wpr-element-fade-out,
|
49 |
-
.wpr-animation-wrap-active .wpr-anim-size-small.wpr-overlay-fade-out,
|
50 |
-
.wpr-animation-wrap:hover .wpr-anim-size-small.wpr-element-fade-out,
|
51 |
-
.wpr-animation-wrap:hover .wpr-anim-size-small.wpr-overlay-fade-out,
|
52 |
-
.wpr-animation-enter > .wpr-anim-size-small.wpr-overlay-fade-out {
|
53 |
-
opacity: 0.75;
|
54 |
-
}
|
55 |
-
|
56 |
-
.wpr-animation-wrap-active .wpr-anim-size-medium.wpr-element-fade-out,
|
57 |
-
.wpr-animation-wrap-active .wpr-anim-size-medium.wpr-overlay-fade-out,
|
58 |
-
.wpr-animation-wrap:hover .wpr-anim-size-medium.wpr-element-fade-out,
|
59 |
-
.wpr-animation-wrap:hover .wpr-anim-size-medium.wpr-overlay-fade-out,
|
60 |
-
.wpr-animation-enter > .wpr-anim-size-medium.wpr-overlay-fade-out {
|
61 |
-
opacity: 0.4;
|
62 |
-
}
|
63 |
-
|
64 |
-
.wpr-animation-wrap-active .wpr-anim-size-large.wpr-element-fade-out,
|
65 |
-
.wpr-animation-wrap-active .wpr-anim-size-large.wpr-overlay-fade-out,
|
66 |
-
.wpr-animation-wrap-hover .wpr-anim-size-large.wpr-element-fade-out,
|
67 |
-
.wpr-animation-wrap-hover .wpr-anim-size-large.wpr-overlay-fade-out,
|
68 |
-
.wpr-animation-wrap:hover .wpr-anim-size-large.wpr-element-fade-out,
|
69 |
-
.wpr-animation-wrap:hover .wpr-anim-size-large.wpr-overlay-fade-out,
|
70 |
-
.wpr-animation-enter > .wpr-anim-size-large.wpr-overlay-fade-out {
|
71 |
-
opacity: 0;
|
72 |
-
}
|
73 |
-
|
74 |
-
.wpr-anim-size-small.wpr-element-slide-top {
|
75 |
-
-webkit-transform: translateY(-30%);
|
76 |
-
-ms-transform: translateY(-30%);
|
77 |
-
transform: translateY(-30%);
|
78 |
-
}
|
79 |
-
|
80 |
-
.wpr-anim-size-medium.wpr-element-slide-top {
|
81 |
-
-webkit-transform: translateY(-100%);
|
82 |
-
-ms-transform: translateY(-100%);
|
83 |
-
transform: translateY(-100%);
|
84 |
-
}
|
85 |
-
|
86 |
-
.wpr-anim-size-large.wpr-element-slide-top {
|
87 |
-
-webkit-transform: translateY(-200%);
|
88 |
-
-ms-transform: translateY(-200%);
|
89 |
-
transform: translateY(-200%);
|
90 |
-
}
|
91 |
-
|
92 |
-
.wpr-anim-size-small.wpr-overlay-slide-top {
|
93 |
-
-webkit-transform: translateY(-50%);
|
94 |
-
-ms-transform: translateY(-50%);
|
95 |
-
transform: translateY(-50%);
|
96 |
-
}
|
97 |
-
|
98 |
-
.wpr-anim-size-medium.wpr-overlay-slide-top {
|
99 |
-
-webkit-transform: translateY(-70%);
|
100 |
-
-ms-transform: translateY(-70%);
|
101 |
-
transform: translateY(-70%);
|
102 |
-
}
|
103 |
-
|
104 |
-
.wpr-anim-size-large.wpr-overlay-slide-top {
|
105 |
-
-webkit-transform: translateY(-100%);
|
106 |
-
-ms-transform: translateY(-100%);
|
107 |
-
transform: translateY(-100%);
|
108 |
-
}
|
109 |
-
|
110 |
-
.wpr-anim-size-small.wpr-element-slide-bottom {
|
111 |
-
-webkit-transform: translateY(30%);
|
112 |
-
-ms-transform: translateY(30%);
|
113 |
-
transform: translateY(30%);
|
114 |
-
}
|
115 |
-
|
116 |
-
.wpr-anim-size-medium.wpr-element-slide-bottom {
|
117 |
-
-webkit-transform: translateY(100%);
|
118 |
-
-ms-transform: translateY(100%);
|
119 |
-
transform: translateY(100%);
|
120 |
-
}
|
121 |
-
|
122 |
-
.wpr-anim-size-large.wpr-element-slide-bottom {
|
123 |
-
-webkit-transform: translateY(200%);
|
124 |
-
-ms-transform: translateY(200%);
|
125 |
-
transform: translateY(200%);
|
126 |
-
}
|
127 |
-
|
128 |
-
.wpr-anim-size-small.wpr-overlay-slide-bottom {
|
129 |
-
-webkit-transform: translateY(50%);
|
130 |
-
-ms-transform: translateY(50%);
|
131 |
-
transform: translateY(50%);
|
132 |
-
}
|
133 |
-
|
134 |
-
.wpr-anim-size-medium.wpr-overlay-slide-bottom {
|
135 |
-
-webkit-transform: translateY(70%);
|
136 |
-
-ms-transform: translateY(70%);
|
137 |
-
transform: translateY(70%);
|
138 |
-
}
|
139 |
-
|
140 |
-
.wpr-anim-size-large.wpr-overlay-slide-bottom {
|
141 |
-
-webkit-transform: translateY(100%);
|
142 |
-
-ms-transform: translateY(100%);
|
143 |
-
transform: translateY(100%);
|
144 |
-
}
|
145 |
-
|
146 |
-
.wpr-animation-wrap-active .wpr-element-slide-top,
|
147 |
-
.wpr-animation-wrap-active .wpr-overlay-slide-top,
|
148 |
-
.wpr-animation-wrap:hover .wpr-element-slide-top,
|
149 |
-
.wpr-animation-wrap:hover .wpr-overlay-slide-top,
|
150 |
-
.wpr-animation-enter > .wpr-overlay-slide-top,
|
151 |
-
.wpr-animation-wrap-active .wpr-element-slide-bottom,
|
152 |
-
.wpr-animation-wrap-active .wpr-overlay-slide-bottom,
|
153 |
-
.wpr-animation-wrap:hover .wpr-element-slide-bottom,
|
154 |
-
.wpr-animation-wrap:hover .wpr-overlay-slide-bottom,
|
155 |
-
.wpr-animation-enter > .wpr-overlay-slide-bottom {
|
156 |
-
opacity: 1;
|
157 |
-
-webkit-transform: translateY(0);
|
158 |
-
-ms-transform: translateY(0);
|
159 |
-
transform: translateY(0);
|
160 |
-
}
|
161 |
-
|
162 |
-
.wpr-anim-size-small.wpr-element-slide-right {
|
163 |
-
-webkit-transform: translateX(30%);
|
164 |
-
-ms-transform: translateX(30%);
|
165 |
-
transform: translateX(30%);
|
166 |
-
}
|
167 |
-
|
168 |
-
.wpr-anim-size-medium.wpr-element-slide-right {
|
169 |
-
-webkit-transform: translateX(150%);
|
170 |
-
-ms-transform: translateX(150%);
|
171 |
-
transform: translateX(150%);
|
172 |
-
}
|
173 |
-
|
174 |
-
.wpr-anim-size-large.wpr-element-slide-right {
|
175 |
-
-webkit-transform: translateX(300%);
|
176 |
-
-ms-transform: translateX(300%);
|
177 |
-
transform: translateX(300%);
|
178 |
-
}
|
179 |
-
|
180 |
-
.wpr-anim-size-small.wpr-overlay-slide-right {
|
181 |
-
-webkit-transform: translateX(50%);
|
182 |
-
-ms-transform: translateX(50%);
|
183 |
-
transform: translateX(50%);
|
184 |
-
}
|
185 |
-
|
186 |
-
.wpr-anim-size-medium.wpr-overlay-slide-right {
|
187 |
-
-webkit-transform: translateX(70%);
|
188 |
-
-ms-transform: translateX(70%);
|
189 |
-
transform: translateX(70%);
|
190 |
-
}
|
191 |
-
|
192 |
-
.wpr-anim-size-large.wpr-overlay-slide-right {
|
193 |
-
-webkit-transform: translateX(100%);
|
194 |
-
-ms-transform: translateX(100%);
|
195 |
-
transform: translateX(100%);
|
196 |
-
}
|
197 |
-
|
198 |
-
.wpr-anim-size-small.wpr-element-slide-left {
|
199 |
-
-webkit-transform: translateX(-30%);
|
200 |
-
-ms-transform: translateX(-30%);
|
201 |
-
transform: translateX(-30%);
|
202 |
-
}
|
203 |
-
|
204 |
-
.wpr-anim-size-medium.wpr-element-slide-left {
|
205 |
-
-webkit-transform: translateX(-150%);
|
206 |
-
-ms-transform: translateX(-150%);
|
207 |
-
transform: translateX(-150%);
|
208 |
-
}
|
209 |
-
|
210 |
-
.wpr-anim-size-large.wpr-element-slide-left {
|
211 |
-
-webkit-transform: translateX(-300%);
|
212 |
-
-ms-transform: translateX(-300%);
|
213 |
-
transform: translateX(-300%);
|
214 |
-
}
|
215 |
-
|
216 |
-
.wpr-anim-size-small.wpr-overlay-slide-left {
|
217 |
-
-webkit-transform: translateX(-50%);
|
218 |
-
-ms-transform: translateX(-50%);
|
219 |
-
transform: translateX(-50%);
|
220 |
-
}
|
221 |
-
|
222 |
-
.wpr-anim-size-medium.wpr-overlay-slide-left {
|
223 |
-
-webkit-transform: translateX(-70%);
|
224 |
-
-ms-transform: translateX(-70%);
|
225 |
-
transform: translateX(-70%);
|
226 |
-
}
|
227 |
-
|
228 |
-
.wpr-anim-size-large.wpr-overlay-slide-left {
|
229 |
-
-webkit-transform: translateX(-100%);
|
230 |
-
-ms-transform: translateX(-100%);
|
231 |
-
transform: translateX(-100%);
|
232 |
-
}
|
233 |
-
|
234 |
-
.wpr-animation-wrap-active .wpr-element-slide-right,
|
235 |
-
.wpr-animation-wrap-active .wpr-overlay-slide-right,
|
236 |
-
.wpr-animation-wrap:hover .wpr-element-slide-right,
|
237 |
-
.wpr-animation-wrap:hover .wpr-overlay-slide-right,
|
238 |
-
.wpr-animation-enter > .wpr-overlay-slide-right,
|
239 |
-
.wpr-animation-wrap-active .wpr-element-slide-left,
|
240 |
-
.wpr-animation-wrap-active .wpr-overlay-slide-left,
|
241 |
-
.wpr-animation-wrap-hover .wpr-element-slide-left,
|
242 |
-
.wpr-animation-wrap-hover .wpr-overlay-slide-left,
|
243 |
-
.wpr-animation-wrap:hover .wpr-element-slide-left,
|
244 |
-
.wpr-animation-wrap:hover .wpr-overlay-slide-left,
|
245 |
-
.wpr-animation-enter > .wpr-overlay-slide-left {
|
246 |
-
opacity: 1;
|
247 |
-
-webkit-transform: translateX(0);
|
248 |
-
-ms-transform: translateX(0);
|
249 |
-
transform: translateX(0);
|
250 |
-
}
|
251 |
-
|
252 |
-
.wpr-element-slide-x-right,
|
253 |
-
.wpr-element-slide-x-left {
|
254 |
-
position: relative;
|
255 |
-
overflow: hidden;
|
256 |
-
}
|
257 |
-
|
258 |
-
.wpr-element-slide-x-right .inner-block,
|
259 |
-
.wpr-element-slide-x-left .inner-block {
|
260 |
-
position: relative;
|
261 |
-
-webkit-transition-duration: inherit;
|
262 |
-
-o-transition-duration: inherit;
|
263 |
-
transition-duration: inherit;
|
264 |
-
}
|
265 |
-
|
266 |
-
.wpr-element-slide-x-right .inner-block {
|
267 |
-
right: -100%;
|
268 |
-
}
|
269 |
-
|
270 |
-
.wpr-animation-wrap-active .wpr-element-slide-x-right .inner-block,
|
271 |
-
.wpr-animation-wrap:hover .wpr-element-slide-x-right .inner-block {
|
272 |
-
right: 0;
|
273 |
-
}
|
274 |
-
|
275 |
-
.wpr-element-slide-x-left .inner-block {
|
276 |
-
left: -100%;
|
277 |
-
}
|
278 |
-
|
279 |
-
.wpr-animation-wrap-active .wpr-element-slide-x-left .inner-block,
|
280 |
-
.wpr-animation-wrap:hover .wpr-element-slide-x-left .inner-block {
|
281 |
-
left: 0;
|
282 |
-
}
|
283 |
-
|
284 |
-
.wpr-element-skew-top,
|
285 |
-
.wpr-overlay-skew-top {
|
286 |
-
-webkit-transform-origin: center top 0;
|
287 |
-
-ms-transform-origin: center top 0;
|
288 |
-
transform-origin: center top 0;
|
289 |
-
}
|
290 |
-
|
291 |
-
.wpr-overlay-skew-top {
|
292 |
-
top: 0 !important;
|
293 |
-
}
|
294 |
-
|
295 |
-
.wpr-anim-size-small.wpr-element-skew-top,
|
296 |
-
.wpr-anim-size-small.wpr-overlay-skew-top {
|
297 |
-
-webkit-transform: perspective(600px) rotateX(-30deg);
|
298 |
-
transform: perspective(600px) rotateX(-30deg);
|
299 |
-
}
|
300 |
-
|
301 |
-
.wpr-anim-size-medium.wpr-element-skew-top,
|
302 |
-
.wpr-anim-size-medium.wpr-overlay-skew-top {
|
303 |
-
-webkit-transform: perspective(600px) rotateX(-50deg);
|
304 |
-
transform: perspective(600px) rotateX(-50deg);
|
305 |
-
}
|
306 |
-
|
307 |
-
.wpr-anim-size-large.wpr-element-skew-top,
|
308 |
-
.wpr-anim-size-large.wpr-overlay-skew-top {
|
309 |
-
-webkit-transform: perspective(600px) rotateX(-90deg);
|
310 |
-
transform: perspective(600px) rotateX(-90deg);
|
311 |
-
}
|
312 |
-
|
313 |
-
.wpr-element-skew-bottom,
|
314 |
-
.wpr-overlay-skew-bottom {
|
315 |
-
-webkit-transform-origin: center bottom 0;
|
316 |
-
-ms-transform-origin: center bottom 0;
|
317 |
-
transform-origin: center bottom 0;
|
318 |
-
}
|
319 |
-
|
320 |
-
.wpr-overlay-skew-bottom {
|
321 |
-
top: auto !important;
|
322 |
-
bottom: 0 !important;
|
323 |
-
}
|
324 |
-
|
325 |
-
.wpr-anim-size-small.wpr-element-skew-bottom,
|
326 |
-
.wpr-anim-size-small.wpr-overlay-skew-bottom {
|
327 |
-
-webkit-transform: perspective(600px) rotateX(30deg);
|
328 |
-
transform: perspective(600px) rotateX(30deg);
|
329 |
-
}
|
330 |
-
|
331 |
-
.wpr-anim-size-medium.wpr-element-skew-bottom,
|
332 |
-
.wpr-anim-size-medium.wpr-overlay-skew-bottom {
|
333 |
-
-webkit-transform: perspective(600px) rotateX(50deg);
|
334 |
-
transform: perspective(600px) rotateX(50deg);
|
335 |
-
}
|
336 |
-
|
337 |
-
.wpr-anim-size-large.wpr-element-skew-bottom,
|
338 |
-
.wpr-anim-size-large.wpr-overlay-skew-bottom {
|
339 |
-
-webkit-transform: perspective(600px) rotateX(90deg);
|
340 |
-
transform: perspective(600px) rotateX(90deg);
|
341 |
-
}
|
342 |
-
|
343 |
-
.wpr-animation-wrap-active .wpr-element-skew-top,
|
344 |
-
.wpr-animation-wrap-active .wpr-overlay-skew-top,
|
345 |
-
.wpr-animation-wrap:hover .wpr-element-skew-top,
|
346 |
-
.wpr-animation-wrap:hover .wpr-overlay-skew-top,
|
347 |
-
.wpr-animation-enter > .wpr-overlay-skew-top,
|
348 |
-
.wpr-animation-wrap-active .wpr-element-skew-bottom,
|
349 |
-
.wpr-animation-wrap-active .wpr-overlay-skew-bottom,
|
350 |
-
.wpr-animation-wrap:hover .wpr-element-skew-bottom,
|
351 |
-
.wpr-animation-wrap:hover .wpr-overlay-skew-bottom,
|
352 |
-
.wpr-animation-enter > .wpr-overlay-skew-bottom {
|
353 |
-
opacity: 1;
|
354 |
-
-webkit-transform: perspective(600px) rotateX(0deg);
|
355 |
-
transform: perspective(600px) rotateX(0deg);
|
356 |
-
}
|
357 |
-
|
358 |
-
.wpr-element-skew-right,
|
359 |
-
.wpr-overlay-skew-right {
|
360 |
-
-webkit-transform-origin: center right 0;
|
361 |
-
-ms-transform-origin: center right 0;
|
362 |
-
transform-origin: center right 0;
|
363 |
-
}
|
364 |
-
|
365 |
-
.wpr-overlay-skew-right {
|
366 |
-
left: auto !important;
|
367 |
-
right: 0 !important;
|
368 |
-
}
|
369 |
-
|
370 |
-
.wpr-anim-size-small.wpr-element-skew-right,
|
371 |
-
.wpr-anim-size-small.wpr-overlay-skew-right {
|
372 |
-
-webkit-transform: perspective(600px) rotateY(-30deg);
|
373 |
-
transform: perspective(600px) rotateY(-30deg);
|
374 |
-
}
|
375 |
-
|
376 |
-
.wpr-anim-size-medium.wpr-element-skew-right,
|
377 |
-
.wpr-anim-size-medium.wpr-overlay-skew-right {
|
378 |
-
-webkit-transform: perspective(600px) rotateY(-50deg);
|
379 |
-
transform: perspective(600px) rotateY(-50deg);
|
380 |
-
}
|
381 |
-
|
382 |
-
.wpr-anim-size-large.wpr-element-skew-right,
|
383 |
-
.wpr-anim-size-large.wpr-overlay-skew-right {
|
384 |
-
-webkit-transform: perspective(600px) rotateY(-90deg);
|
385 |
-
transform: perspective(600px) rotateY(-90deg);
|
386 |
-
}
|
387 |
-
|
388 |
-
.wpr-element-skew-left,
|
389 |
-
.wpr-overlay-skew-left {
|
390 |
-
-webkit-transform-origin: center left 0;
|
391 |
-
-ms-transform-origin: center left 0;
|
392 |
-
transform-origin: center left 0;
|
393 |
-
}
|
394 |
-
|
395 |
-
.wpr-overlay-skew-left {
|
396 |
-
left: 0 !important;
|
397 |
-
}
|
398 |
-
|
399 |
-
.wpr-anim-size-small.wpr-element-skew-left,
|
400 |
-
.wpr-anim-size-small.wpr-overlay-skew-left {
|
401 |
-
-webkit-transform: perspective(600px) rotateY(30deg);
|
402 |
-
transform: perspective(600px) rotateY(30deg);
|
403 |
-
}
|
404 |
-
|
405 |
-
.wpr-anim-size-medium.wpr-element-skew-left,
|
406 |
-
.wpr-anim-size-medium.wpr-overlay-skew-left {
|
407 |
-
-webkit-transform: perspective(600px) rotateY(50deg);
|
408 |
-
transform: perspective(600px) rotateY(50deg);
|
409 |
-
}
|
410 |
-
|
411 |
-
.wpr-anim-size-large.wpr-element-skew-left,
|
412 |
-
.wpr-anim-size-large.wpr-overlay-skew-left {
|
413 |
-
-webkit-transform: perspective(600px) rotateY(90deg);
|
414 |
-
transform: perspective(600px) rotateY(90deg);
|
415 |
-
}
|
416 |
-
|
417 |
-
.wpr-animation-wrap-active .wpr-element-skew-right,
|
418 |
-
.wpr-animation-wrap-active .wpr-overlay-skew-right,
|
419 |
-
.wpr-animation-wrap:hover .wpr-element-skew-right,
|
420 |
-
.wpr-animation-wrap:hover .wpr-overlay-skew-right,
|
421 |
-
.wpr-animation-enter > .wpr-overlay-skew-right,
|
422 |
-
.wpr-animation-wrap-active .wpr-element-skew-left,
|
423 |
-
.wpr-animation-wrap-active .wpr-overlay-skew-left,
|
424 |
-
.wpr-animation-wrap:hover .wpr-element-skew-left,
|
425 |
-
.wpr-animation-wrap:hover .wpr-overlay-skew-left,
|
426 |
-
.wpr-animation-enter > .wpr-overlay-skew-left {
|
427 |
-
opacity: 1;
|
428 |
-
-webkit-transform: perspective(600px) rotateY(0deg);
|
429 |
-
transform: perspective(600px) rotateY(0deg);
|
430 |
-
}
|
431 |
-
|
432 |
-
.wpr-anim-size-small.wpr-element-scale-up,
|
433 |
-
.wpr-anim-size-small.wpr-overlay-scale-up {
|
434 |
-
-webkit-transform: scale(0.9);
|
435 |
-
-ms-transform: scale(0.9);
|
436 |
-
transform: scale(0.9);
|
437 |
-
}
|
438 |
-
|
439 |
-
.wpr-anim-size-medium.wpr-element-scale-up,
|
440 |
-
.wpr-anim-size-medium.wpr-overlay-scale-up {
|
441 |
-
-webkit-transform: scale(0.6);
|
442 |
-
-ms-transform: scale(0.6);
|
443 |
-
transform: scale(0.6);
|
444 |
-
}
|
445 |
-
|
446 |
-
.wpr-anim-size-large.wpr-element-scale-up,
|
447 |
-
.wpr-anim-size-large.wpr-overlay-scale-up {
|
448 |
-
-webkit-transform: scale(0.2);
|
449 |
-
-ms-transform: scale(0.2);
|
450 |
-
transform: scale(0.2);
|
451 |
-
}
|
452 |
-
|
453 |
-
.wpr-anim-size-small.wpr-element-scale-down,
|
454 |
-
.wpr-anim-size-small.wpr-overlay-scale-down {
|
455 |
-
-webkit-transform: scale(1.1);
|
456 |
-
-ms-transform: scale(1.1);
|
457 |
-
transform: scale(1.1);
|
458 |
-
}
|
459 |
-
|
460 |
-
.wpr-anim-size-medium.wpr-element-scale-down,
|
461 |
-
.wpr-anim-size-medium.wpr-overlay-scale-down {
|
462 |
-
-webkit-transform: scale(1.4);
|
463 |
-
-ms-transform: scale(1.4);
|
464 |
-
transform: scale(1.4);
|
465 |
-
}
|
466 |
-
|
467 |
-
.wpr-anim-size-large.wpr-element-scale-down,
|
468 |
-
.wpr-anim-size-large.wpr-overlay-scale-down {
|
469 |
-
-webkit-transform: scale(1.9);
|
470 |
-
-ms-transform: scale(1.9);
|
471 |
-
transform: scale(1.9);
|
472 |
-
}
|
473 |
-
|
474 |
-
.wpr-animation-wrap-active .wpr-element-scale-up,
|
475 |
-
.wpr-animation-wrap-active .wpr-overlay-scale-up,
|
476 |
-
.wpr-animation-wrap:hover .wpr-element-scale-up,
|
477 |
-
.wpr-animation-wrap:hover .wpr-overlay-scale-up,
|
478 |
-
.wpr-animation-enter > .wpr-overlay-scale-up,
|
479 |
-
.wpr-animation-wrap-active .wpr-element-scale-down,
|
480 |
-
.wpr-animation-wrap-active .wpr-overlay-scale-down,
|
481 |
-
.wpr-animation-wrap:hover .wpr-element-scale-down,
|
482 |
-
.wpr-animation-wrap:hover .wpr-overlay-scale-down,
|
483 |
-
.wpr-animation-enter > .wpr-overlay-scale-down {
|
484 |
-
opacity: 1;
|
485 |
-
-webkit-transform: scale(1);
|
486 |
-
-ms-transform: scale(1);
|
487 |
-
transform: scale(1);
|
488 |
-
}
|
489 |
-
|
490 |
-
.wpr-anim-size-small.wpr-element-roll-right,
|
491 |
-
.wpr-anim-size-small.wpr-overlay-roll-right {
|
492 |
-
-webkit-transform: translateX(100%) rotate(90deg);
|
493 |
-
-ms-transform: translateX(100%) rotate(90deg);
|
494 |
-
transform: translateX(100%) rotate(90deg);
|
495 |
-
}
|
496 |
-
|
497 |
-
.wpr-anim-size-medium.wpr-element-roll-right,
|
498 |
-
.wpr-anim-size-medium.wpr-overlay-roll-right {
|
499 |
-
-webkit-transform: translateX(100%) rotate(240deg);
|
500 |
-
-ms-transform: translateX(100%) rotate(240deg);
|
501 |
-
transform: translateX(100%) rotate(240deg);
|
502 |
-
}
|
503 |
-
|
504 |
-
.wpr-anim-size-large.wpr-element-roll-right,
|
505 |
-
.wpr-anim-size-large.wpr-overlay-roll-right {
|
506 |
-
-webkit-transform: translateX(100%) rotate(360deg);
|
507 |
-
-ms-transform: translateX(100%) rotate(360deg);
|
508 |
-
transform: translateX(100%) rotate(360deg);
|
509 |
-
}
|
510 |
-
|
511 |
-
.wpr-anim-size-small.wpr-element-roll-left,
|
512 |
-
.wpr-anim-size-small.wpr-overlay-roll-left {
|
513 |
-
-webkit-transform: translateX(-100%) rotate(-90deg);
|
514 |
-
-ms-transform: translateX(-100%) rotate(-90deg);
|
515 |
-
transform: translateX(-100%) rotate(-90deg);
|
516 |
-
}
|
517 |
-
|
518 |
-
.wpr-anim-size-medium.wpr-element-roll-left,
|
519 |
-
.wpr-anim-size-medium.wpr-overlay-roll-left {
|
520 |
-
-webkit-transform: translateX(-100%) rotate(-240deg);
|
521 |
-
-ms-transform: translateX(-100%) rotate(-240deg);
|
522 |
-
transform: translateX(-100%) rotate(-240deg);
|
523 |
-
}
|
524 |
-
|
525 |
-
.wpr-anim-size-large.wpr-element-roll-left,
|
526 |
-
.wpr-anim-size-large.wpr-overlay-roll-left {
|
527 |
-
-webkit-transform: translateX(-100%) rotate(-360deg);
|
528 |
-
-ms-transform: translateX(-100%) rotate(-360deg);
|
529 |
-
transform: translateX(-100%) rotate(-360deg);
|
530 |
-
}
|
531 |
-
|
532 |
-
.wpr-animation-wrap-active .wpr-element-roll-right,
|
533 |
-
.wpr-animation-wrap-active .wpr-overlay-roll-right,
|
534 |
-
.wpr-animation-wrap:hover .wpr-element-roll-right,
|
535 |
-
.wpr-animation-wrap:hover .wpr-overlay-roll-right,
|
536 |
-
.wpr-animation-enter > .wpr-overlay-roll-right,
|
537 |
-
.wpr-animation-wrap-active .wpr-element-roll-left,
|
538 |
-
.wpr-animation-wrap-active .wpr-overlay-roll-left,
|
539 |
-
.wpr-animation-wrap:hover .wpr-element-roll-left,
|
540 |
-
.wpr-animation-wrap:hover .wpr-overlay-roll-left,
|
541 |
-
.wpr-animation-enter > .wpr-overlay-roll-left {
|
542 |
-
opacity: 1;
|
543 |
-
-webkit-transform: translateX(0) rotate(0);
|
544 |
-
-ms-transform: translateX(0) rotate(0);
|
545 |
-
transform: translateX(0) rotate(0);
|
546 |
-
}
|
547 |
-
|
548 |
-
|
549 |
-
/* Timing Functions */
|
550 |
-
|
551 |
-
.wpr-anim-timing-linear {
|
552 |
-
-webkit-transition-timing-function: cubic-bezier(0.250, 0.250, 0.750, 0.750);
|
553 |
-
-o-transition-timing-function: cubic-bezier(0.250, 0.250, 0.750, 0.750);
|
554 |
-
transition-timing-function: cubic-bezier(0.250, 0.250, 0.750, 0.750);
|
555 |
-
}
|
556 |
-
|
557 |
-
.wpr-anim-timing-ease-default {
|
558 |
-
-webkit-transition-timing-function: cubic-bezier(0.250, 0.100, 0.250, 1.000);
|
559 |
-
-o-transition-timing-function: cubic-bezier(0.250, 0.100, 0.250, 1.000);
|
560 |
-
transition-timing-function: cubic-bezier(0.250, 0.100, 0.250, 1.000);
|
561 |
-
}
|
562 |
-
|
563 |
-
.wpr-anim-timing-ease-in {
|
564 |
-
-webkit-transition-timing-function: cubic-bezier(0.420, 0.000, 1.000, 1.000);
|
565 |
-
-o-transition-timing-function: cubic-bezier(0.420, 0.000, 1.000, 1.000);
|
566 |
-
transition-timing-function: cubic-bezier(0.420, 0.000, 1.000, 1.000);
|
567 |
-
}
|
568 |
-
|
569 |
-
.wpr-anim-timing-ease-out {
|
570 |
-
-webkit-transition-timing-function: cubic-bezier(0.000, 0.000, 0.580, 1.000);
|
571 |
-
-o-transition-timing-function: cubic-bezier(0.000, 0.000, 0.580, 1.000);
|
572 |
-
transition-timing-function: cubic-bezier(0.000, 0.000, 0.580, 1.000);
|
573 |
-
}
|
574 |
-
|
575 |
-
.wpr-anim-timing-ease-in-out {
|
576 |
-
-webkit-transition-timing-function: cubic-bezier(0.420, 0.000, 0.580, 1.000);
|
577 |
-
-o-transition-timing-function: cubic-bezier(0.420, 0.000, 0.580, 1.000);
|
578 |
-
transition-timing-function: cubic-bezier(0.420, 0.000, 0.580, 1.000);
|
579 |
-
}
|
580 |
-
|
581 |
-
.wpr-anim-timing-ease-in-quad {
|
582 |
-
-webkit-transition-timing-function: cubic-bezier(0.550, 0.085, 0.680, 0.530);
|
583 |
-
-o-transition-timing-function: cubic-bezier(0.550, 0.085, 0.680, 0.530);
|
584 |
-
transition-timing-function: cubic-bezier(0.550, 0.085, 0.680, 0.530);
|
585 |
-
}
|
586 |
-
|
587 |
-
.wpr-anim-timing-ease-in-cubic {
|
588 |
-
-webkit-transition-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
|
589 |
-
-o-transition-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
|
590 |
-
transition-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
|
591 |
-
}
|
592 |
-
|
593 |
-
.wpr-anim-timing-ease-in-quart {
|
594 |
-
-webkit-transition-timing-function: cubic-bezier(0.895, 0.030, 0.685, 0.220);
|
595 |
-
-o-transition-timing-function: cubic-bezier(0.895, 0.030, 0.685, 0.220);
|
596 |
-
transition-timing-function: cubic-bezier(0.895, 0.030, 0.685, 0.220);
|
597 |
-
}
|
598 |
-
|
599 |
-
.wpr-anim-timing-ease-in-quint {
|
600 |
-
-webkit-transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
|
601 |
-
-o-transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
|
602 |
-
transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
|
603 |
-
}
|
604 |
-
|
605 |
-
.wpr-anim-timing-ease-in-sine {
|
606 |
-
-webkit-transition-timing-function: cubic-bezier(0.470, 0.000, 0.745, 0.715);
|
607 |
-
-o-transition-timing-function: cubic-bezier(0.470, 0.000, 0.745, 0.715);
|
608 |
-
transition-timing-function: cubic-bezier(0.470, 0.000, 0.745, 0.715);
|
609 |
-
}
|
610 |
-
|
611 |
-
.wpr-anim-timing-ease-in-expo {
|
612 |
-
-webkit-transition-timing-function: cubic-bezier(0.950, 0.050, 0.795, 0.035);
|
613 |
-
-o-transition-timing-function: cubic-bezier(0.950, 0.050, 0.795, 0.035);
|
614 |
-
transition-timing-function: cubic-bezier(0.950, 0.050, 0.795, 0.035);
|
615 |
-
}
|
616 |
-
|
617 |
-
.wpr-anim-timing-ease-in-circ {
|
618 |
-
-webkit-transition-timing-function: cubic-bezier(0.600, 0.040, 0.980, 0.335);
|
619 |
-
-o-transition-timing-function: cubic-bezier(0.600, 0.040, 0.980, 0.335);
|
620 |
-
transition-timing-function: cubic-bezier(0.600, 0.040, 0.980, 0.335);
|
621 |
-
}
|
622 |
-
|
623 |
-
.wpr-anim-timing-ease-in-back {
|
624 |
-
-webkit-transition-timing-function: cubic-bezier(0.600, -0.280, 0.735, 0.045);
|
625 |
-
-o-transition-timing-function: cubic-bezier(0.600, -0.280, 0.735, 0.045);
|
626 |
-
transition-timing-function: cubic-bezier(0.600, -0.280, 0.735, 0.045);
|
627 |
-
}
|
628 |
-
|
629 |
-
.wpr-anim-timing-ease-out-quad {
|
630 |
-
-webkit-transition-timing-function: cubic-bezier(0.250, 0.460, 0.450, 0.940);
|
631 |
-
-o-transition-timing-function: cubic-bezier(0.250, 0.460, 0.450, 0.940);
|
632 |
-
transition-timing-function: cubic-bezier(0.250, 0.460, 0.450, 0.940);
|
633 |
-
}
|
634 |
-
|
635 |
-
.wpr-anim-timing-ease-out-cubic {
|
636 |
-
-webkit-transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
|
637 |
-
-o-transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
|
638 |
-
transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
|
639 |
-
}
|
640 |
-
|
641 |
-
.wpr-anim-timing-ease-out-quart {
|
642 |
-
-webkit-transition-timing-function: cubic-bezier(0.165, 0.840, 0.440, 1.000);
|
643 |
-
-o-transition-timing-function: cubic-bezier(0.165, 0.840, 0.440, 1.000);
|
644 |
-
transition-timing-function: cubic-bezier(0.165, 0.840, 0.440, 1.000);
|
645 |
-
}
|
646 |
-
|
647 |
-
.wpr-anim-timing-ease-out-quint {
|
648 |
-
-webkit-transition-timing-function: cubic-bezier(0.230, 1.000, 0.320, 1.000);
|
649 |
-
-o-transition-timing-function: cubic-bezier(0.230, 1.000, 0.320, 1.000);
|
650 |
-
transition-timing-function: cubic-bezier(0.230, 1.000, 0.320, 1.000);
|
651 |
-
}
|
652 |
-
|
653 |
-
.wpr-anim-timing-ease-out-sine {
|
654 |
-
-webkit-transition-timing-function: cubic-bezier(0.390, 0.575, 0.565, 1.000);
|
655 |
-
-o-transition-timing-function: cubic-bezier(0.390, 0.575, 0.565, 1.000);
|
656 |
-
transition-timing-function: cubic-bezier(0.390, 0.575, 0.565, 1.000);
|
657 |
-
}
|
658 |
-
|
659 |
-
.wpr-anim-timing-ease-out-expo {
|
660 |
-
-webkit-transition-timing-function: cubic-bezier(0.190, 1.000, 0.220, 1.000);
|
661 |
-
-o-transition-timing-function: cubic-bezier(0.190, 1.000, 0.220, 1.000);
|
662 |
-
transition-timing-function: cubic-bezier(0.190, 1.000, 0.220, 1.000);
|
663 |
-
}
|
664 |
-
|
665 |
-
.wpr-anim-timing-ease-out-circ {
|
666 |
-
-webkit-transition-timing-function: cubic-bezier(0.075, 0.820, 0.165, 1.000);
|
667 |
-
-o-transition-timing-function: cubic-bezier(0.075, 0.820, 0.165, 1.000);
|
668 |
-
transition-timing-function: cubic-bezier(0.075, 0.820, 0.165, 1.000);
|
669 |
-
}
|
670 |
-
|
671 |
-
.wpr-anim-timing-ease-out-back {
|
672 |
-
-webkit-transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1.275);
|
673 |
-
-o-transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1.275);
|
674 |
-
transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1.275);
|
675 |
-
}
|
676 |
-
|
677 |
-
.wpr-anim-timing-ease-in-out-quad {
|
678 |
-
-webkit-transition-timing-function: cubic-bezier(0.455, 0.030, 0.515, 0.955);
|
679 |
-
-o-transition-timing-function: cubic-bezier(0.455, 0.030, 0.515, 0.955);
|
680 |
-
transition-timing-function: cubic-bezier(0.455, 0.030, 0.515, 0.955)
|
681 |
-
}
|
682 |
-
|
683 |
-
.wpr-anim-timing-ease-in-out-cubic {
|
684 |
-
-webkit-transition-timing-function: cubic-bezier(0.645, 0.045, 0.355, 1.000);
|
685 |
-
-o-transition-timing-function: cubic-bezier(0.645, 0.045, 0.355, 1.000);
|
686 |
-
transition-timing-function: cubic-bezier(0.645, 0.045, 0.355, 1.000);
|
687 |
-
}
|
688 |
-
|
689 |
-
.wpr-anim-timing-ease-in-out-quart {
|
690 |
-
-webkit-transition-timing-function: cubic-bezier(0.770, 0.000, 0.175, 1.000);
|
691 |
-
-o-transition-timing-function: cubic-bezier(0.770, 0.000, 0.175, 1.000);
|
692 |
-
transition-timing-function: cubic-bezier(0.770, 0.000, 0.175, 1.000);
|
693 |
-
}
|
694 |
-
|
695 |
-
.wpr-anim-timing-ease-in-out-quint {
|
696 |
-
-webkit-transition-timing-function: cubic-bezier(0.860, 0.000, 0.070, 1.000);
|
697 |
-
-o-transition-timing-function: cubic-bezier(0.860, 0.000, 0.070, 1.000);
|
698 |
-
transition-timing-function: cubic-bezier(0.860, 0.000, 0.070, 1.000);
|
699 |
-
}
|
700 |
-
|
701 |
-
.wpr-anim-timing-ease-in-out-sine {
|
702 |
-
-webkit-transition-timing-function: cubic-bezier(0.445, 0.050, 0.550, 0.950);
|
703 |
-
-o-transition-timing-function: cubic-bezier(0.445, 0.050, 0.550, 0.950);
|
704 |
-
transition-timing-function: cubic-bezier(0.445, 0.050, 0.550, 0.950);
|
705 |
-
}
|
706 |
-
|
707 |
-
.wpr-anim-timing-ease-in-out-expo {
|
708 |
-
-webkit-transition-timing-function: cubic-bezier(1.000, 0.000, 0.000, 1.000);
|
709 |
-
-o-transition-timing-function: cubic-bezier(1.000, 0.000, 0.000, 1.000);
|
710 |
-
transition-timing-function: cubic-bezier(1.000, 0.000, 0.000, 1.000);
|
711 |
-
}
|
712 |
-
|
713 |
-
.wpr-anim-timing-ease-in-out-circ {
|
714 |
-
-webkit-transition-timing-function: cubic-bezier(0.785, 0.135, 0.150, 0.860);
|
715 |
-
-o-transition-timing-function: cubic-bezier(0.785, 0.135, 0.150, 0.860);
|
716 |
-
transition-timing-function: cubic-bezier(0.785, 0.135, 0.150, 0.860);
|
717 |
-
}
|
718 |
-
|
719 |
-
.wpr-anim-timing-ease-in-out-back {
|
720 |
-
-webkit-transition-timing-function: cubic-bezier(0.680, -0.550, 0.265, 1.550);
|
721 |
-
-o-transition-timing-function: cubic-bezier(0.680, -0.550, 0.265, 1.550);
|
722 |
-
transition-timing-function: cubic-bezier(0.680, -0.550, 0.265, 1.550);
|
723 |
-
}
|
724 |
-
|
725 |
-
|
726 |
-
/* Image Effects */
|
727 |
-
|
728 |
-
.wpr-slide.wpr-effect-dir-top:hover img {
|
729 |
-
-webkit-transform: translateY(-100%);
|
730 |
-
-ms-transform: translateY(-100%);
|
731 |
-
transform: translateY(-100%);
|
732 |
-
}
|
733 |
-
|
734 |
-
.wpr-slide.wpr-effect-dir-bottom:hover img {
|
735 |
-
-webkit-transform: translateY(100%);
|
736 |
-
-ms-transform: translateY(100%);
|
737 |
-
transform: translateY(100%);
|
738 |
-
}
|
739 |
-
|
740 |
-
.wpr-slide.wpr-effect-dir-right:hover img {
|
741 |
-
-webkit-transform: translateX(100%);
|
742 |
-
-ms-transform: translateX(100%);
|
743 |
-
transform: translateX(100%);
|
744 |
-
}
|
745 |
-
|
746 |
-
.wpr-slide.wpr-effect-dir-left:hover img {
|
747 |
-
-webkit-transform: translateX(-100%);
|
748 |
-
-ms-transform: translateX(-100%);
|
749 |
-
transform: translateX(-100%);
|
750 |
-
}
|
751 |
-
|
752 |
-
.wpr-zoom-in.wpr-effect-size-small:hover img {
|
753 |
-
-webkit-transform: scale(1.1);
|
754 |
-
-ms-transform: scale(1.1);
|
755 |
-
transform: scale(1.1);
|
756 |
-
}
|
757 |
-
|
758 |
-
.wpr-zoom-in.wpr-effect-size-medium:hover img {
|
759 |
-
-webkit-transform: scale(1.3);
|
760 |
-
-ms-transform: scale(1.3);
|
761 |
-
transform: scale(1.3);
|
762 |
-
}
|
763 |
-
|
764 |
-
.wpr-zoom-in.wpr-effect-size-large:hover img {
|
765 |
-
-webkit-transform: scale(1.5);
|
766 |
-
-ms-transform: scale(1.5);
|
767 |
-
transform: scale(1.5);
|
768 |
-
}
|
769 |
-
|
770 |
-
.wpr-zoom-out.wpr-effect-size-small img {
|
771 |
-
-webkit-transform: scale(1.1);
|
772 |
-
-ms-transform: scale(1.1);
|
773 |
-
transform: scale(1.1);
|
774 |
-
}
|
775 |
-
|
776 |
-
.wpr-zoom-out.wpr-effect-size-medium img {
|
777 |
-
-webkit-transform: scale(1.3);
|
778 |
-
-ms-transform: scale(1.3);
|
779 |
-
transform: scale(1.3);
|
780 |
-
}
|
781 |
-
|
782 |
-
.wpr-zoom-out.wpr-effect-size-large img {
|
783 |
-
-webkit-transform: scale(1.5);
|
784 |
-
-ms-transform: scale(1.5);
|
785 |
-
transform: scale(1.5);
|
786 |
-
}
|
787 |
-
|
788 |
-
.wpr-zoom-out.wpr-effect-size-small:hover img,
|
789 |
-
.wpr-zoom-out.wpr-effect-size-medium:hover img,
|
790 |
-
.wpr-zoom-out.wpr-effect-size-large:hover img {
|
791 |
-
-webkit-transform: scale(1);
|
792 |
-
-ms-transform: scale(1);
|
793 |
-
transform: scale(1);
|
794 |
-
}
|
795 |
-
|
796 |
-
.wpr-grayscale-in.wpr-effect-size-small:hover img {
|
797 |
-
-webkit-filter: grayscale(0.3);
|
798 |
-
filter: grayscale(0.3);
|
799 |
-
}
|
800 |
-
|
801 |
-
.wpr-grayscale-in.wpr-effect-size-medium:hover img {
|
802 |
-
-webkit-filter: grayscale(0.6);
|
803 |
-
filter: grayscale(0.6);
|
804 |
-
}
|
805 |
-
|
806 |
-
.wpr-grayscale-in.wpr-effect-size-large:hover img {
|
807 |
-
-webkit-filter: grayscale(1);
|
808 |
-
filter: grayscale(1);
|
809 |
-
}
|
810 |
-
|
811 |
-
.wpr-grayscale-out.wpr-effect-size-small img {
|
812 |
-
-webkit-filter: grayscale(0.3);
|
813 |
-
filter: grayscale(0.3);
|
814 |
-
}
|
815 |
-
|
816 |
-
.wpr-grayscale-out.wpr-effect-size-medium img {
|
817 |
-
-webkit-filter: grayscale(0.6);
|
818 |
-
filter: grayscale(0.6);
|
819 |
-
}
|
820 |
-
|
821 |
-
.wpr-grayscale-out.wpr-effect-size-large img {
|
822 |
-
-webkit-filter: grayscale(1);
|
823 |
-
filter: grayscale(1);
|
824 |
-
}
|
825 |
-
|
826 |
-
.wpr-grayscale-out.wpr-effect-size-small:hover img,
|
827 |
-
.wpr-grayscale-out.wpr-effect-size-medium:hover img,
|
828 |
-
.wpr-grayscale-out.wpr-effect-size-large:hover img {
|
829 |
-
-webkit-filter: grayscale(0);
|
830 |
-
filter: grayscale(0);
|
831 |
-
}
|
832 |
-
|
833 |
-
.wpr-blur-in.wpr-effect-size-small:hover img {
|
834 |
-
-webkit-filter: blur(1px);
|
835 |
-
filter: blur(1px);
|
836 |
-
}
|
837 |
-
|
838 |
-
.wpr-blur-in.wpr-effect-size-medium:hover img {
|
839 |
-
-webkit-filter: blur(3px);
|
840 |
-
filter: blur(3px);
|
841 |
-
}
|
842 |
-
|
843 |
-
.wpr-blur-in.wpr-effect-size-large:hover img {
|
844 |
-
-webkit-filter: blur(5px);
|
845 |
-
filter: blur(5px);
|
846 |
-
}
|
847 |
-
|
848 |
-
.wpr-blur-out.wpr-effect-size-small img {
|
849 |
-
-webkit-filter: blur(1px);
|
850 |
-
filter: blur(1px);
|
851 |
-
}
|
852 |
-
|
853 |
-
.wpr-blur-out.wpr-effect-size-medium img {
|
854 |
-
-webkit-filter: blur(3px);
|
855 |
-
filter: blur(3px);
|
856 |
-
}
|
857 |
-
|
858 |
-
.wpr-blur-out.wpr-effect-size-large img {
|
859 |
-
-webkit-filter: blur(5px);
|
860 |
-
filter: blur(5px);
|
861 |
-
}
|
862 |
-
|
863 |
-
.wpr-blur-out.wpr-effect-size-small:hover img,
|
864 |
-
.wpr-blur-out.wpr-effect-size-medium:hover img,
|
865 |
-
.wpr-blur-out.wpr-effect-size-large:hover img {
|
866 |
-
-webkit-filter: blur(0px);
|
867 |
-
filter: blur(0px);
|
868 |
-
}
|
869 |
-
|
870 |
-
.wpr-slide.wpr-effect-dir-top:hover .wpr-accordion-background {
|
871 |
-
-webkit-transform: translateY(-100%);
|
872 |
-
-ms-transform: translateY(-100%);
|
873 |
-
transform: translateY(-100%);
|
874 |
-
}
|
875 |
-
|
876 |
-
.wpr-slide.wpr-effect-dir-bottom:hover .wpr-accordion-background {
|
877 |
-
-webkit-transform: translateY(100%);
|
878 |
-
-ms-transform: translateY(100%);
|
879 |
-
transform: translateY(100%);
|
880 |
-
}
|
881 |
-
|
882 |
-
.wpr-slide.wpr-effect-dir-right:hover .wpr-accordion-background {
|
883 |
-
-webkit-transform: translateX(100%);
|
884 |
-
-ms-transform: translateX(100%);
|
885 |
-
transform: translateX(100%);
|
886 |
-
}
|
887 |
-
|
888 |
-
.wpr-slide.wpr-effect-dir-left:hover .wpr-accordion-background {
|
889 |
-
-webkit-transform: translateX(-100%);
|
890 |
-
-ms-transform: translateX(-100%);
|
891 |
-
transform: translateX(-100%);
|
892 |
-
}
|
893 |
-
|
894 |
-
.wpr-zoom-in.wpr-effect-size-small:hover .wpr-accordion-background {
|
895 |
-
-webkit-transform: scale(1.1);
|
896 |
-
-ms-transform: scale(1.1);
|
897 |
-
transform: scale(1.1);
|
898 |
-
}
|
899 |
-
|
900 |
-
.wpr-zoom-in.wpr-effect-size-medium:hover .wpr-accordion-background {
|
901 |
-
-webkit-transform: scale(1.3);
|
902 |
-
-ms-transform: scale(1.3);
|
903 |
-
transform: scale(1.3);
|
904 |
-
}
|
905 |
-
|
906 |
-
.wpr-zoom-in.wpr-effect-size-large:hover .wpr-accordion-background {
|
907 |
-
-webkit-transform: scale(1.5);
|
908 |
-
-ms-transform: scale(1.5);
|
909 |
-
transform: scale(1.5);
|
910 |
-
}
|
911 |
-
|
912 |
-
.wpr-zoom-out.wpr-effect-size-small .wpr-accordion-background {
|
913 |
-
-webkit-transform: scale(1.1);
|
914 |
-
-ms-transform: scale(1.1);
|
915 |
-
transform: scale(1.1);
|
916 |
-
}
|
917 |
-
|
918 |
-
.wpr-zoom-out.wpr-effect-size-medium .wpr-accordion-background {
|
919 |
-
-webkit-transform: scale(1.3);
|
920 |
-
-ms-transform: scale(1.3);
|
921 |
-
transform: scale(1.3);
|
922 |
-
}
|
923 |
-
|
924 |
-
.wpr-zoom-out.wpr-effect-size-large .wpr-accordion-background {
|
925 |
-
-webkit-transform: scale(1.5);
|
926 |
-
-ms-transform: scale(1.5);
|
927 |
-
transform: scale(1.5);
|
928 |
-
}
|
929 |
-
|
930 |
-
.wpr-zoom-out.wpr-effect-size-small:hover .wpr-accordion-background,
|
931 |
-
.wpr-zoom-out.wpr-effect-size-medium:hover .wpr-accordion-background,
|
932 |
-
.wpr-zoom-out.wpr-effect-size-large:hover .wpr-accordion-background {
|
933 |
-
-webkit-transform: scale(1);
|
934 |
-
-ms-transform: scale(1);
|
935 |
-
transform: scale(1);
|
936 |
-
}
|
937 |
-
|
938 |
-
.wpr-grayscale-in.wpr-effect-size-small:hover .wpr-accordion-background {
|
939 |
-
-webkit-filter: grayscale(0.3);
|
940 |
-
filter: grayscale(0.3);
|
941 |
-
}
|
942 |
-
|
943 |
-
.wpr-grayscale-in.wpr-effect-size-medium:hover .wpr-accordion-background {
|
944 |
-
-webkit-filter: grayscale(0.6);
|
945 |
-
filter: grayscale(0.6);
|
946 |
-
}
|
947 |
-
|
948 |
-
.wpr-grayscale-in.wpr-effect-size-large:hover .wpr-accordion-background {
|
949 |
-
-webkit-filter: grayscale(1);
|
950 |
-
filter: grayscale(1);
|
951 |
-
}
|
952 |
-
|
953 |
-
.wpr-grayscale-out.wpr-effect-size-small .wpr-accordion-background {
|
954 |
-
-webkit-filter: grayscale(0.3);
|
955 |
-
filter: grayscale(0.3);
|
956 |
-
}
|
957 |
-
|
958 |
-
.wpr-grayscale-out.wpr-effect-size-medium .wpr-accordion-background {
|
959 |
-
-webkit-filter: grayscale(0.6);
|
960 |
-
filter: grayscale(0.6);
|
961 |
-
}
|
962 |
-
|
963 |
-
.wpr-grayscale-out.wpr-effect-size-large .wpr-accordion-background {
|
964 |
-
-webkit-filter: grayscale(1);
|
965 |
-
filter: grayscale(1);
|
966 |
-
}
|
967 |
-
|
968 |
-
.wpr-grayscale-out.wpr-effect-size-small:hover .wpr-accordion-background,
|
969 |
-
.wpr-grayscale-out.wpr-effect-size-medium:hover .wpr-accordion-background,
|
970 |
-
.wpr-grayscale-out.wpr-effect-size-large:hover .wpr-accordion-background {
|
971 |
-
-webkit-filter: grayscale(0);
|
972 |
-
filter: grayscale(0);
|
973 |
-
}
|
974 |
-
|
975 |
-
.wpr-blur-in.wpr-effect-size-small:hover .wpr-accordion-background {
|
976 |
-
-webkit-filter: blur(1px);
|
977 |
-
filter: blur(1px);
|
978 |
-
}
|
979 |
-
|
980 |
-
.wpr-blur-in.wpr-effect-size-medium:hover .wpr-accordion-background {
|
981 |
-
-webkit-filter: blur(3px);
|
982 |
-
filter: blur(3px);
|
983 |
-
}
|
984 |
-
|
985 |
-
.wpr-blur-in.wpr-effect-size-large:hover .wpr-accordion-background {
|
986 |
-
-webkit-filter: blur(5px);
|
987 |
-
filter: blur(5px);
|
988 |
-
}
|
989 |
-
|
990 |
-
.wpr-blur-out.wpr-effect-size-small .wpr-accordion-background {
|
991 |
-
-webkit-filter: blur(1px);
|
992 |
-
filter: blur(1px);
|
993 |
-
}
|
994 |
-
|
995 |
-
.wpr-blur-out.wpr-effect-size-medium .wpr-accordion-background {
|
996 |
-
-webkit-filter: blur(3px);
|
997 |
-
filter: blur(3px);
|
998 |
-
}
|
999 |
-
|
1000 |
-
.wpr-blur-out.wpr-effect-size-large .wpr-accordion-background {
|
1001 |
-
-webkit-filter: blur(5px);
|
1002 |
-
filter: blur(5px);
|
1003 |
-
}
|
1004 |
-
|
1005 |
-
.wpr-blur-out.wpr-effect-size-small:hover .wpr-accordion-background,
|
1006 |
-
.wpr-blur-out.wpr-effect-size-medium:hover .wpr-accordion-background,
|
1007 |
-
.wpr-blur-out.wpr-effect-size-large:hover .wpr-accordion-background {
|
1008 |
-
-webkit-filter: blur(0px);
|
1009 |
-
filter: blur(0px);
|
1010 |
-
}
|
1011 |
-
|
1012 |
-
|
1013 |
-
/* Background Animation */
|
1014 |
-
|
1015 |
-
.wpr-animation-wrap-active .wpr-bg-anim-zoom-in,
|
1016 |
-
.wpr-animation-wrap:hover .wpr-bg-anim-zoom-in {
|
1017 |
-
-webkit-transform: scale(1.2);
|
1018 |
-
-ms-transform: scale(1.2);
|
1019 |
-
transform: scale(1.2);
|
1020 |
-
}
|
1021 |
-
|
1022 |
-
.wpr-bg-anim-zoom-out {
|
1023 |
-
-webkit-transform: scale(1.2);
|
1024 |
-
-ms-transform: scale(1.2);
|
1025 |
-
transform: scale(1.2);
|
1026 |
-
}
|
1027 |
-
|
1028 |
-
.wpr-animation-wrap-active .wpr-bg-anim-zoom-out,
|
1029 |
-
.wpr-animation-wrap:hover .wpr-bg-anim-zoom-out {
|
1030 |
-
-webkit-transform: scale(1);
|
1031 |
-
-ms-transform: scale(1);
|
1032 |
-
transform: scale(1);
|
1033 |
-
}
|
1034 |
-
|
1035 |
-
.wpr-bg-anim-move-left {
|
1036 |
-
-webkit-transform: scale(1.2) translateX(8%);
|
1037 |
-
-ms-transform: scale(1.2) translateX(8%);
|
1038 |
-
transform: scale(1.2) translateX(8%);
|
1039 |
-
}
|
1040 |
-
|
1041 |
-
.wpr-animation-wrap-active .wpr-bg-anim-move-left,
|
1042 |
-
.wpr-animation-wrap:hover .wpr-bg-anim-move-left {
|
1043 |
-
-webkit-transform: scale(1.2) translateX(-8%);
|
1044 |
-
-ms-transform: scale(1.2) translateX(-8%);
|
1045 |
-
transform: scale(1.2) translateX(-8%);
|
1046 |
-
}
|
1047 |
-
|
1048 |
-
.wpr-bg-anim-move-right {
|
1049 |
-
-webkit-transform: scale(1.2) translateX(-8%);
|
1050 |
-
-ms-transform: scale(1.2) translateX(-8%);
|
1051 |
-
transform: scale(1.2) translateX(-8%);
|
1052 |
-
}
|
1053 |
-
|
1054 |
-
.wpr-animation-wrap-active .wpr-bg-anim-move-right,
|
1055 |
-
.wpr-animation-wrap:hover .wpr-bg-anim-move-right {
|
1056 |
-
-webkit-transform: scale(1.2) translateX(8%);
|
1057 |
-
-ms-transform: scale(1.2) translateX(8%);
|
1058 |
-
transform: scale(1.2) translateX(8%);
|
1059 |
-
}
|
1060 |
-
|
1061 |
-
.wpr-bg-anim-move-up {
|
1062 |
-
-webkit-transform: scale(1.2) translateY(8%);
|
1063 |
-
-ms-transform: scale(1.2) translateY(8%);
|
1064 |
-
transform: scale(1.2) translateY(8%);
|
1065 |
-
}
|
1066 |
-
|
1067 |
-
.wpr-animation-wrap-active .wpr-bg-anim-move-up,
|
1068 |
-
.wpr-animation-wrap:hover .wpr-bg-anim-move-up {
|
1069 |
-
-webkit-transform: scale(1.2) translateY(-8%);
|
1070 |
-
-ms-transform: scale(1.2) translateY(-8%);
|
1071 |
-
transform: scale(1.2) translateY(-8%);
|
1072 |
-
}
|
1073 |
-
|
1074 |
-
.wpr-animation-wrap-active .wpr-bg-anim-move-down,
|
1075 |
-
.wpr-animation-wrap:hover .wpr-bg-anim-move-down {
|
1076 |
-
-webkit-transform: scale(1.2) translateY(-8%);
|
1077 |
-
-ms-transform: scale(1.2) translateY(-8%);
|
1078 |
-
transform: scale(1.2) translateY(-8%);
|
1079 |
-
}
|
1080 |
-
|
1081 |
-
.wpr-animation-wrap-active .wpr-bg-anim-move-down,
|
1082 |
-
.wpr-animation-wrap:hover .wpr-bg-anim-move-down {
|
1083 |
-
-webkit-transform: scale(1.2) translateY(8%);
|
1084 |
-
-ms-transform: scale(1.2) translateY(8%);
|
1085 |
-
transform: scale(1.2) translateY(8%);
|
1086 |
-
}
|
1087 |
-
|
1088 |
-
|
1089 |
-
/* Border Animations*/
|
1090 |
-
|
1091 |
-
/* Layla */
|
1092 |
-
.wpr-border-anim-layla::before,
|
1093 |
-
.wpr-border-anim-layla::after {
|
1094 |
-
position: absolute;
|
1095 |
-
content: '';
|
1096 |
-
opacity: 0;
|
1097 |
-
-webkit-transition: opacity 0.35s, -webkit-transform 0.35s;
|
1098 |
-
transition: opacity 0.35s, -webkit-transform 0.35s;
|
1099 |
-
-o-transition: opacity 0.35s, transform 0.35s;
|
1100 |
-
transition: opacity 0.35s, transform 0.35s;
|
1101 |
-
transition: opacity 0.35s, transform 0.35s, -webkit-transform 0.35s;
|
1102 |
-
}
|
1103 |
-
|
1104 |
-
.wpr-border-anim-layla::before {
|
1105 |
-
-webkit-transform: scale(0,1);
|
1106 |
-
-ms-transform: scale(0,1);
|
1107 |
-
transform: scale(0,1);
|
1108 |
-
-webkit-transform-origin: 0 0;
|
1109 |
-
-ms-transform-origin: 0 0;
|
1110 |
-
transform-origin: 0 0;
|
1111 |
-
}
|
1112 |
-
|
1113 |
-
.wpr-border-anim-layla::after {
|
1114 |
-
-webkit-transform: scale(1,0);
|
1115 |
-
-ms-transform: scale(1,0);
|
1116 |
-
transform: scale(1,0);
|
1117 |
-
-webkit-transform-origin: 100% 0;
|
1118 |
-
-ms-transform-origin: 100% 0;
|
1119 |
-
transform-origin: 100% 0;
|
1120 |
-
}
|
1121 |
-
|
1122 |
-
.wpr-animation-wrap-active .wpr-border-anim-layla::before,
|
1123 |
-
.wpr-animation-wrap-active .wpr-border-anim-layla::after,
|
1124 |
-
.wpr-animation-wrap:hover .wpr-border-anim-layla::before,
|
1125 |
-
.wpr-animation-wrap:hover .wpr-border-anim-layla::after {
|
1126 |
-
opacity: 1;
|
1127 |
-
-webkit-transform: scale(1);
|
1128 |
-
-ms-transform: scale(1);
|
1129 |
-
transform: scale(1);
|
1130 |
-
}
|
1131 |
-
|
1132 |
-
.wpr-animation-wrap-active .wpr-border-anim-layla::after,
|
1133 |
-
.wpr-animation-wrap:hover .wpr-border-anim-layla::after {
|
1134 |
-
-webkit-transition-delay: 0.15s;
|
1135 |
-
-o-transition-delay: 0.15s;
|
1136 |
-
transition-delay: 0.15s;
|
1137 |
-
}
|
1138 |
-
|
1139 |
-
/* Oscar */
|
1140 |
-
.wpr-border-anim-oscar::before {
|
1141 |
-
position: absolute;
|
1142 |
-
content: '';
|
1143 |
-
opacity: 0;
|
1144 |
-
-webkit-transition: opacity 0.35s, -webkit-transform 0.35s;
|
1145 |
-
transition: opacity 0.35s, -webkit-transform 0.35s;
|
1146 |
-
-o-transition: opacity 0.35s, transform 0.35s;
|
1147 |
-
transition: opacity 0.35s, transform 0.35s;
|
1148 |
-
transition: opacity 0.35s, transform 0.35s, -webkit-transform 0.35s;
|
1149 |
-
-webkit-transform: scale(0.9);
|
1150 |
-
-ms-transform: scale(0.9);
|
1151 |
-
transform: scale(0.9);
|
1152 |
-
}
|
1153 |
-
|
1154 |
-
.wpr-animation-wrap-active .wpr-border-anim-oscar::before,
|
1155 |
-
.wpr-animation-wrap:hover .wpr-border-anim-oscar::before {
|
1156 |
-
opacity: 1;
|
1157 |
-
-webkit-transform: scale(1);
|
1158 |
-
-ms-transform: scale(1);
|
1159 |
-
transform: scale(1);
|
1160 |
-
}
|
1161 |
-
|
1162 |
-
/* Bubba */
|
1163 |
-
.wpr-border-anim-bubba::before,
|
1164 |
-
.wpr-border-anim-bubba::after {
|
1165 |
-
position: absolute;
|
1166 |
-
content: '';
|
1167 |
-
opacity: 0;
|
1168 |
-
-webkit-transition: opacity 0.35s, -webkit-transform 0.35s;
|
1169 |
-
transition: opacity 0.35s, -webkit-transform 0.35s;
|
1170 |
-
-o-transition: opacity 0.35s, transform 0.35s;
|
1171 |
-
transition: opacity 0.35s, transform 0.35s;
|
1172 |
-
transition: opacity 0.35s, transform 0.35s, -webkit-transform 0.35s;
|
1173 |
-
}
|
1174 |
-
|
1175 |
-
.wpr-border-anim-bubba::before {
|
1176 |
-
-webkit-transform: scale(0,1);
|
1177 |
-
-ms-transform: scale(0,1);
|
1178 |
-
transform: scale(0,1);
|
1179 |
-
}
|
1180 |
-
|
1181 |
-
.wpr-border-anim-bubba::after {
|
1182 |
-
-webkit-transform: scale(1,0);
|
1183 |
-
-ms-transform: scale(1,0);
|
1184 |
-
transform: scale(1,0);
|
1185 |
-
}
|
1186 |
-
|
1187 |
-
.wpr-animation-wrap-active .wpr-border-anim-bubba::before,
|
1188 |
-
.wpr-animation-wrap-active .wpr-border-anim-bubba::after,
|
1189 |
-
.wpr-animation-wrap:hover .wpr-border-anim-bubba::before,
|
1190 |
-
.wpr-animation-wrap:hover .wpr-border-anim-bubba::after {
|
1191 |
-
opacity: 1;
|
1192 |
-
-webkit-transform: scale(1);
|
1193 |
-
-ms-transform: scale(1);
|
1194 |
-
transform: scale(1);
|
1195 |
-
}
|
1196 |
-
|
1197 |
-
/* Romeo */
|
1198 |
-
.wpr-border-anim-romeo::before,
|
1199 |
-
.wpr-border-anim-romeo::after {
|
1200 |
-
position: absolute;
|
1201 |
-
top: 50%;
|
1202 |
-
left: 50%;
|
1203 |
-
width: 80%;
|
1204 |
-
content: '';
|
1205 |
-
opacity: 0;
|
1206 |
-
-webkit-transition: opacity 0.35s, -webkit-transform 0.35s;
|
1207 |
-
transition: opacity 0.35s, -webkit-transform 0.35s;
|
1208 |
-
-o-transition: opacity 0.35s, transform 0.35s;
|
1209 |
-
transition: opacity 0.35s, transform 0.35s;
|
1210 |
-
transition: opacity 0.35s, transform 0.35s, -webkit-transform 0.35s;
|
1211 |
-
-webkit-transform: translate3d(-50%,-50%,0);
|
1212 |
-
transform: translate3d(-50%,-50%,0);
|
1213 |
-
}
|
1214 |
-
|
1215 |
-
.wpr-animation-wrap-active .wpr-border-anim-romeo::before,
|
1216 |
-
.wpr-animation-wrap:hover .wpr-border-anim-romeo::before {
|
1217 |
-
opacity: 1;
|
1218 |
-
-webkit-transform: translate3d(-50%,-50%,0) rotate(45deg);
|
1219 |
-
transform: translate3d(-50%,-50%,0) rotate(45deg);
|
1220 |
-
}
|
1221 |
-
|
1222 |
-
.wpr-animation-wrap-active .wpr-border-anim-romeo::after,
|
1223 |
-
.wpr-animation-wrap:hover .wpr-border-anim-romeo::after {
|
1224 |
-
opacity: 1;
|
1225 |
-
-webkit-transform: translate3d(-50%,-50%,0) rotate(-45deg);
|
1226 |
-
transform: translate3d(-50%,-50%,0) rotate(-45deg);
|
1227 |
-
}
|
1228 |
-
|
1229 |
-
/* Chicho */
|
1230 |
-
.wpr-border-anim-chicho::before {
|
1231 |
-
position: absolute;
|
1232 |
-
content: '';
|
1233 |
-
-webkit-transform: scale(1.1);
|
1234 |
-
-ms-transform: scale(1.1);
|
1235 |
-
transform: scale(1.1);
|
1236 |
-
opacity: 0;
|
1237 |
-
-webkit-transition: opacity 0.35s, -webkit-transform 0.35s;
|
1238 |
-
transition: opacity 0.35s, -webkit-transform 0.35s;
|
1239 |
-
-o-transition: opacity 0.35s, transform 0.35s;
|
1240 |
-
transition: opacity 0.35s, transform 0.35s;
|
1241 |
-
transition: opacity 0.35s, transform 0.35s, -webkit-transform 0.35s;
|
1242 |
-
}
|
1243 |
-
|
1244 |
-
.wpr-animation-wrap-active .wpr-border-anim-chicho::before,
|
1245 |
-
.wpr-animation-wrap:hover .wpr-border-anim-chicho::before {
|
1246 |
-
opacity: 1;
|
1247 |
-
-webkit-transform: scale(1);
|
1248 |
-
-ms-transform: scale(1);
|
1249 |
-
transform: scale(1);
|
1250 |
-
}
|
1251 |
-
|
1252 |
-
/* Apollo */
|
1253 |
-
.wpr-border-anim-apollo::before {
|
1254 |
-
position: absolute;
|
1255 |
-
top: 0;
|
1256 |
-
left: 0;
|
1257 |
-
width: 100%;
|
1258 |
-
height: 100%;
|
1259 |
-
content: '';
|
1260 |
-
-webkit-transition: -webkit-transform 0.6s;
|
1261 |
-
transition: -webkit-transform 0.6s;
|
1262 |
-
-o-transition: transform 0.6s;
|
1263 |
-
transition: transform 0.6s;
|
1264 |
-
transition: transform 0.6s, -webkit-transform 0.6s;
|
1265 |
-
-webkit-transform: scale3d(2.9,2.4,1) rotate3d(0,0,1,45deg) translate3d(0,-100%,0);
|
1266 |
-
transform: scale3d(2.9,2.4,1) rotate3d(0,0,1,45deg) translate3d(0,-100%,0);
|
1267 |
-
}
|
1268 |
-
|
1269 |
-
.wpr-animation-wrap-active .wpr-border-anim-apollo::before,
|
1270 |
-
.wpr-animation-wrap:hover .wpr-border-anim-apollo::before {
|
1271 |
-
-webkit-transform: scale3d(2.9,2.4,1) rotate3d(0,0,1,45deg) translate3d(0,100%,0);
|
1272 |
-
transform: scale3d(2.9,2.4,1) rotate3d(0,0,1,45deg) translate3d(0,100%,0);
|
1273 |
-
}
|
1274 |
-
|
1275 |
-
/* Jazz */
|
1276 |
-
.wpr-border-anim-jazz::after {
|
1277 |
-
-webkit-transition: opacity 0.35s, -webkit-transform 0.35s;
|
1278 |
-
transition: opacity 0.35s, -webkit-transform 0.35s;
|
1279 |
-
-o-transition: opacity 0.35s, transform 0.35s;
|
1280 |
-
transition: opacity 0.35s, transform 0.35s;
|
1281 |
-
transition: opacity 0.35s, transform 0.35s, -webkit-transform 0.35s;
|
1282 |
-
position: absolute;
|
1283 |
-
top: 0;
|
1284 |
-
left: 0;
|
1285 |
-
width: 100%;
|
1286 |
-
height: 100%;
|
1287 |
-
content: '';
|
1288 |
-
opacity: 0;
|
1289 |
-
-webkit-transform: rotate3d(0,0,1,45deg) scale3d(1,0,1);
|
1290 |
-
transform: rotate3d(0,0,1,45deg) scale3d(1,0,1);
|
1291 |
-
-webkit-transform-origin: 50% 50%;
|
1292 |
-
-ms-transform-origin: 50% 50%;
|
1293 |
-
transform-origin: 50% 50%;
|
1294 |
-
}
|
1295 |
-
|
1296 |
-
.wpr-animation-wrap-active .wpr-border-anim-jazz::after,
|
1297 |
-
.wpr-animation-wrap:hover .wpr-border-anim-jazz::after {
|
1298 |
-
opacity: 1;
|
1299 |
-
-webkit-transform: rotate3d(0,0,1,45deg) scale3d(1,1,1);
|
1300 |
-
transform: rotate3d(0,0,1,45deg) scale3d(1,1,1);
|
1301 |
}
|
1 |
+
/*!
|
2 |
+
* WPR Animations
|
3 |
+
* Version: 1.0
|
4 |
+
* Author: WP Royal
|
5 |
+
* Author URL: https://royal-elementor-addons.com/
|
6 |
+
|
7 |
+
* WPR Animations Copyright WP Royal 2020.
|
8 |
+
*/
|
9 |
+
|
10 |
+
.wpr-anim-transparency {
|
11 |
+
opacity: 0;
|
12 |
+
}
|
13 |
+
|
14 |
+
.wpr-element-fade-in,
|
15 |
+
.wpr-overlay-fade-in {
|
16 |
+
opacity: 0;
|
17 |
+
}
|
18 |
+
|
19 |
+
.wpr-animation-wrap-active .wpr-anim-size-small.wpr-element-fade-in,
|
20 |
+
.wpr-animation-wrap-active .wpr-anim-size-small.wpr-overlay-fade-in,
|
21 |
+
.wpr-animation-wrap:hover .wpr-anim-size-small.wpr-element-fade-in,
|
22 |
+
.wpr-animation-wrap:hover .wpr-anim-size-small.wpr-overlay-fade-in,
|
23 |
+
.wpr-animation-enter > .wpr-anim-size-small.wpr-overlay-fade-in {
|
24 |
+
opacity: 0.4;
|
25 |
+
}
|
26 |
+
|
27 |
+
.wpr-animation-wrap-active .wpr-anim-size-medium.wpr-element-fade-in,
|
28 |
+
.wpr-animation-wrap-active .wpr-anim-size-medium.wpr-overlay-fade-in,
|
29 |
+
.wpr-animation-wrap:hover .wpr-anim-size-medium.wpr-element-fade-in,
|
30 |
+
.wpr-animation-wrap:hover .wpr-anim-size-medium.wpr-overlay-fade-in,
|
31 |
+
.wpr-animation-enter > .wpr-anim-size-medium.wpr-overlay-fade-in {
|
32 |
+
opacity: 0.75;
|
33 |
+
}
|
34 |
+
|
35 |
+
.wpr-animation-wrap-active .wpr-anim-size-large.wpr-element-fade-in,
|
36 |
+
.wpr-animation-wrap-active .wpr-anim-size-large.wpr-overlay-fade-in,
|
37 |
+
.wpr-animation-wrap:hover .wpr-anim-size-large.wpr-element-fade-in,
|
38 |
+
.wpr-animation-wrap:hover .wpr-anim-size-large.wpr-overlay-fade-in,
|
39 |
+
.wpr-animation-enter > .wpr-anim-size-large.wpr-overlay-fade-in {
|
40 |
+
opacity: 1;
|
41 |
+
}
|
42 |
+
|
43 |
+
.wpr-element-fade-out,
|
44 |
+
.wpr-overlay-fade-out {
|
45 |
+
opacity: 1;
|
46 |
+
}
|
47 |
+
|
48 |
+
.wpr-animation-wrap-active .wpr-anim-size-small.wpr-element-fade-out,
|
49 |
+
.wpr-animation-wrap-active .wpr-anim-size-small.wpr-overlay-fade-out,
|
50 |
+
.wpr-animation-wrap:hover .wpr-anim-size-small.wpr-element-fade-out,
|
51 |
+
.wpr-animation-wrap:hover .wpr-anim-size-small.wpr-overlay-fade-out,
|
52 |
+
.wpr-animation-enter > .wpr-anim-size-small.wpr-overlay-fade-out {
|
53 |
+
opacity: 0.75;
|
54 |
+
}
|
55 |
+
|
56 |
+
.wpr-animation-wrap-active .wpr-anim-size-medium.wpr-element-fade-out,
|
57 |
+
.wpr-animation-wrap-active .wpr-anim-size-medium.wpr-overlay-fade-out,
|
58 |
+
.wpr-animation-wrap:hover .wpr-anim-size-medium.wpr-element-fade-out,
|
59 |
+
.wpr-animation-wrap:hover .wpr-anim-size-medium.wpr-overlay-fade-out,
|
60 |
+
.wpr-animation-enter > .wpr-anim-size-medium.wpr-overlay-fade-out {
|
61 |
+
opacity: 0.4;
|
62 |
+
}
|
63 |
+
|
64 |
+
.wpr-animation-wrap-active .wpr-anim-size-large.wpr-element-fade-out,
|
65 |
+
.wpr-animation-wrap-active .wpr-anim-size-large.wpr-overlay-fade-out,
|
66 |
+
.wpr-animation-wrap-hover .wpr-anim-size-large.wpr-element-fade-out,
|
67 |
+
.wpr-animation-wrap-hover .wpr-anim-size-large.wpr-overlay-fade-out,
|
68 |
+
.wpr-animation-wrap:hover .wpr-anim-size-large.wpr-element-fade-out,
|
69 |
+
.wpr-animation-wrap:hover .wpr-anim-size-large.wpr-overlay-fade-out,
|
70 |
+
.wpr-animation-enter > .wpr-anim-size-large.wpr-overlay-fade-out {
|
71 |
+
opacity: 0;
|
72 |
+
}
|
73 |
+
|
74 |
+
.wpr-anim-size-small.wpr-element-slide-top {
|
75 |
+
-webkit-transform: translateY(-30%);
|
76 |
+
-ms-transform: translateY(-30%);
|
77 |
+
transform: translateY(-30%);
|
78 |
+
}
|
79 |
+
|
80 |
+
.wpr-anim-size-medium.wpr-element-slide-top {
|
81 |
+
-webkit-transform: translateY(-100%);
|
82 |
+
-ms-transform: translateY(-100%);
|
83 |
+
transform: translateY(-100%);
|
84 |
+
}
|
85 |
+
|
86 |
+
.wpr-anim-size-large.wpr-element-slide-top {
|
87 |
+
-webkit-transform: translateY(-200%);
|
88 |
+
-ms-transform: translateY(-200%);
|
89 |
+
transform: translateY(-200%);
|
90 |
+
}
|
91 |
+
|
92 |
+
.wpr-anim-size-small.wpr-overlay-slide-top {
|
93 |
+
-webkit-transform: translateY(-50%);
|
94 |
+
-ms-transform: translateY(-50%);
|
95 |
+
transform: translateY(-50%);
|
96 |
+
}
|
97 |
+
|
98 |
+
.wpr-anim-size-medium.wpr-overlay-slide-top {
|
99 |
+
-webkit-transform: translateY(-70%);
|
100 |
+
-ms-transform: translateY(-70%);
|
101 |
+
transform: translateY(-70%);
|
102 |
+
}
|
103 |
+
|
104 |
+
.wpr-anim-size-large.wpr-overlay-slide-top {
|
105 |
+
-webkit-transform: translateY(-100%);
|
106 |
+
-ms-transform: translateY(-100%);
|
107 |
+
transform: translateY(-100%);
|
108 |
+
}
|
109 |
+
|
110 |
+
.wpr-anim-size-small.wpr-element-slide-bottom {
|
111 |
+
-webkit-transform: translateY(30%);
|
112 |
+
-ms-transform: translateY(30%);
|
113 |
+
transform: translateY(30%);
|
114 |
+
}
|
115 |
+
|
116 |
+
.wpr-anim-size-medium.wpr-element-slide-bottom {
|
117 |
+
-webkit-transform: translateY(100%);
|
118 |
+
-ms-transform: translateY(100%);
|
119 |
+
transform: translateY(100%);
|
120 |
+
}
|
121 |
+
|
122 |
+
.wpr-anim-size-large.wpr-element-slide-bottom {
|
123 |
+
-webkit-transform: translateY(200%);
|
124 |
+
-ms-transform: translateY(200%);
|
125 |
+
transform: translateY(200%);
|
126 |
+
}
|
127 |
+
|
128 |
+
.wpr-anim-size-small.wpr-overlay-slide-bottom {
|
129 |
+
-webkit-transform: translateY(50%);
|
130 |
+
-ms-transform: translateY(50%);
|
131 |
+
transform: translateY(50%);
|
132 |
+
}
|
133 |
+
|
134 |
+
.wpr-anim-size-medium.wpr-overlay-slide-bottom {
|
135 |
+
-webkit-transform: translateY(70%);
|
136 |
+
-ms-transform: translateY(70%);
|
137 |
+
transform: translateY(70%);
|
138 |
+
}
|
139 |
+
|
140 |
+
.wpr-anim-size-large.wpr-overlay-slide-bottom {
|
141 |
+
-webkit-transform: translateY(100%);
|
142 |
+
-ms-transform: translateY(100%);
|
143 |
+
transform: translateY(100%);
|
144 |
+
}
|
145 |
+
|
146 |
+
.wpr-animation-wrap-active .wpr-element-slide-top,
|
147 |
+
.wpr-animation-wrap-active .wpr-overlay-slide-top,
|
148 |
+
.wpr-animation-wrap:hover .wpr-element-slide-top,
|
149 |
+
.wpr-animation-wrap:hover .wpr-overlay-slide-top,
|
150 |
+
.wpr-animation-enter > .wpr-overlay-slide-top,
|
151 |
+
.wpr-animation-wrap-active .wpr-element-slide-bottom,
|
152 |
+
.wpr-animation-wrap-active .wpr-overlay-slide-bottom,
|
153 |
+
.wpr-animation-wrap:hover .wpr-element-slide-bottom,
|
154 |
+
.wpr-animation-wrap:hover .wpr-overlay-slide-bottom,
|
155 |
+
.wpr-animation-enter > .wpr-overlay-slide-bottom {
|
156 |
+
opacity: 1;
|
157 |
+
-webkit-transform: translateY(0);
|
158 |
+
-ms-transform: translateY(0);
|
159 |
+
transform: translateY(0);
|
160 |
+
}
|
161 |
+
|
162 |
+
.wpr-anim-size-small.wpr-element-slide-right {
|
163 |
+
-webkit-transform: translateX(30%);
|
164 |
+
-ms-transform: translateX(30%);
|
165 |
+
transform: translateX(30%);
|
166 |
+
}
|
167 |
+
|
168 |
+
.wpr-anim-size-medium.wpr-element-slide-right {
|
169 |
+
-webkit-transform: translateX(150%);
|
170 |
+
-ms-transform: translateX(150%);
|
171 |
+
transform: translateX(150%);
|
172 |
+
}
|
173 |
+
|
174 |
+
.wpr-anim-size-large.wpr-element-slide-right {
|
175 |
+
-webkit-transform: translateX(300%);
|
176 |
+
-ms-transform: translateX(300%);
|
177 |
+
transform: translateX(300%);
|
178 |
+
}
|
179 |
+
|
180 |
+
.wpr-anim-size-small.wpr-overlay-slide-right {
|
181 |
+
-webkit-transform: translateX(50%);
|
182 |
+
-ms-transform: translateX(50%);
|
183 |
+
transform: translateX(50%);
|
184 |
+
}
|
185 |
+
|
186 |
+
.wpr-anim-size-medium.wpr-overlay-slide-right {
|
187 |
+
-webkit-transform: translateX(70%);
|
188 |
+
-ms-transform: translateX(70%);
|
189 |
+
transform: translateX(70%);
|
190 |
+
}
|
191 |
+
|
192 |
+
.wpr-anim-size-large.wpr-overlay-slide-right {
|
193 |
+
-webkit-transform: translateX(100%);
|
194 |
+
-ms-transform: translateX(100%);
|
195 |
+
transform: translateX(100%);
|
196 |
+
}
|
197 |
+
|
198 |
+
.wpr-anim-size-small.wpr-element-slide-left {
|
199 |
+
-webkit-transform: translateX(-30%);
|
200 |
+
-ms-transform: translateX(-30%);
|
201 |
+
transform: translateX(-30%);
|
202 |
+
}
|
203 |
+
|
204 |
+
.wpr-anim-size-medium.wpr-element-slide-left {
|
205 |
+
-webkit-transform: translateX(-150%);
|
206 |
+
-ms-transform: translateX(-150%);
|
207 |
+
transform: translateX(-150%);
|
208 |
+
}
|
209 |
+
|
210 |
+
.wpr-anim-size-large.wpr-element-slide-left {
|
211 |
+
-webkit-transform: translateX(-300%);
|
212 |
+
-ms-transform: translateX(-300%);
|
213 |
+
transform: translateX(-300%);
|
214 |
+
}
|
215 |
+
|
216 |
+
.wpr-anim-size-small.wpr-overlay-slide-left {
|
217 |
+
-webkit-transform: translateX(-50%);
|
218 |
+
-ms-transform: translateX(-50%);
|
219 |
+
transform: translateX(-50%);
|
220 |
+
}
|
221 |
+
|
222 |
+
.wpr-anim-size-medium.wpr-overlay-slide-left {
|
223 |
+
-webkit-transform: translateX(-70%);
|
224 |
+
-ms-transform: translateX(-70%);
|
225 |
+
transform: translateX(-70%);
|
226 |
+
}
|
227 |
+
|
228 |
+
.wpr-anim-size-large.wpr-overlay-slide-left {
|
229 |
+
-webkit-transform: translateX(-100%);
|
230 |
+
-ms-transform: translateX(-100%);
|
231 |
+
transform: translateX(-100%);
|
232 |
+
}
|
233 |
+
|
234 |
+
.wpr-animation-wrap-active .wpr-element-slide-right,
|
235 |
+
.wpr-animation-wrap-active .wpr-overlay-slide-right,
|
236 |
+
.wpr-animation-wrap:hover .wpr-element-slide-right,
|
237 |
+
.wpr-animation-wrap:hover .wpr-overlay-slide-right,
|
238 |
+
.wpr-animation-enter > .wpr-overlay-slide-right,
|
239 |
+
.wpr-animation-wrap-active .wpr-element-slide-left,
|
240 |
+
.wpr-animation-wrap-active .wpr-overlay-slide-left,
|
241 |
+
.wpr-animation-wrap-hover .wpr-element-slide-left,
|
242 |
+
.wpr-animation-wrap-hover .wpr-overlay-slide-left,
|
243 |
+
.wpr-animation-wrap:hover .wpr-element-slide-left,
|
244 |
+
.wpr-animation-wrap:hover .wpr-overlay-slide-left,
|
245 |
+
.wpr-animation-enter > .wpr-overlay-slide-left {
|
246 |
+
opacity: 1;
|
247 |
+
-webkit-transform: translateX(0);
|
248 |
+
-ms-transform: translateX(0);
|
249 |
+
transform: translateX(0);
|
250 |
+
}
|
251 |
+
|
252 |
+
.wpr-element-slide-x-right,
|
253 |
+
.wpr-element-slide-x-left {
|
254 |
+
position: relative;
|
255 |
+
overflow: hidden;
|
256 |
+
}
|
257 |
+
|
258 |
+
.wpr-element-slide-x-right .inner-block,
|
259 |
+
.wpr-element-slide-x-left .inner-block {
|
260 |
+
position: relative;
|
261 |
+
-webkit-transition-duration: inherit;
|
262 |
+
-o-transition-duration: inherit;
|
263 |
+
transition-duration: inherit;
|
264 |
+
}
|
265 |
+
|
266 |
+
.wpr-element-slide-x-right .inner-block {
|
267 |
+
right: -100%;
|
268 |
+
}
|
269 |
+
|
270 |
+
.wpr-animation-wrap-active .wpr-element-slide-x-right .inner-block,
|
271 |
+
.wpr-animation-wrap:hover .wpr-element-slide-x-right .inner-block {
|
272 |
+
right: 0;
|
273 |
+
}
|
274 |
+
|
275 |
+
.wpr-element-slide-x-left .inner-block {
|
276 |
+
left: -100%;
|
277 |
+
}
|
278 |
+
|
279 |
+
.wpr-animation-wrap-active .wpr-element-slide-x-left .inner-block,
|
280 |
+
.wpr-animation-wrap:hover .wpr-element-slide-x-left .inner-block {
|
281 |
+
left: 0;
|
282 |
+
}
|
283 |
+
|
284 |
+
.wpr-element-skew-top,
|
285 |
+
.wpr-overlay-skew-top {
|
286 |
+
-webkit-transform-origin: center top 0;
|
287 |
+
-ms-transform-origin: center top 0;
|
288 |
+
transform-origin: center top 0;
|
289 |
+
}
|
290 |
+
|
291 |
+
.wpr-overlay-skew-top {
|
292 |
+
top: 0 !important;
|
293 |
+
}
|
294 |
+
|
295 |
+
.wpr-anim-size-small.wpr-element-skew-top,
|
296 |
+
.wpr-anim-size-small.wpr-overlay-skew-top {
|
297 |
+
-webkit-transform: perspective(600px) rotateX(-30deg);
|
298 |
+
transform: perspective(600px) rotateX(-30deg);
|
299 |
+
}
|
300 |
+
|
301 |
+
.wpr-anim-size-medium.wpr-element-skew-top,
|
302 |
+
.wpr-anim-size-medium.wpr-overlay-skew-top {
|
303 |
+
-webkit-transform: perspective(600px) rotateX(-50deg);
|
304 |
+
transform: perspective(600px) rotateX(-50deg);
|
305 |
+
}
|
306 |
+
|
307 |
+
.wpr-anim-size-large.wpr-element-skew-top,
|
308 |
+
.wpr-anim-size-large.wpr-overlay-skew-top {
|
309 |
+
-webkit-transform: perspective(600px) rotateX(-90deg);
|
310 |
+
transform: perspective(600px) rotateX(-90deg);
|
311 |
+
}
|
312 |
+
|
313 |
+
.wpr-element-skew-bottom,
|
314 |
+
.wpr-overlay-skew-bottom {
|
315 |
+
-webkit-transform-origin: center bottom 0;
|
316 |
+
-ms-transform-origin: center bottom 0;
|
317 |
+
transform-origin: center bottom 0;
|
318 |
+
}
|
319 |
+
|
320 |
+
.wpr-overlay-skew-bottom {
|
321 |
+
top: auto !important;
|
322 |
+
bottom: 0 !important;
|
323 |
+
}
|
324 |
+
|
325 |
+
.wpr-anim-size-small.wpr-element-skew-bottom,
|
326 |
+
.wpr-anim-size-small.wpr-overlay-skew-bottom {
|
327 |
+
-webkit-transform: perspective(600px) rotateX(30deg);
|
328 |
+
transform: perspective(600px) rotateX(30deg);
|
329 |
+
}
|
330 |
+
|
331 |
+
.wpr-anim-size-medium.wpr-element-skew-bottom,
|
332 |
+
.wpr-anim-size-medium.wpr-overlay-skew-bottom {
|
333 |
+
-webkit-transform: perspective(600px) rotateX(50deg);
|
334 |
+
transform: perspective(600px) rotateX(50deg);
|
335 |
+
}
|
336 |
+
|
337 |
+
.wpr-anim-size-large.wpr-element-skew-bottom,
|
338 |
+
.wpr-anim-size-large.wpr-overlay-skew-bottom {
|
339 |
+
-webkit-transform: perspective(600px) rotateX(90deg);
|
340 |
+
transform: perspective(600px) rotateX(90deg);
|
341 |
+
}
|
342 |
+
|
343 |
+
.wpr-animation-wrap-active .wpr-element-skew-top,
|
344 |
+
.wpr-animation-wrap-active .wpr-overlay-skew-top,
|
345 |
+
.wpr-animation-wrap:hover .wpr-element-skew-top,
|
346 |
+
.wpr-animation-wrap:hover .wpr-overlay-skew-top,
|
347 |
+
.wpr-animation-enter > .wpr-overlay-skew-top,
|
348 |
+
.wpr-animation-wrap-active .wpr-element-skew-bottom,
|
349 |
+
.wpr-animation-wrap-active .wpr-overlay-skew-bottom,
|
350 |
+
.wpr-animation-wrap:hover .wpr-element-skew-bottom,
|
351 |
+
.wpr-animation-wrap:hover .wpr-overlay-skew-bottom,
|
352 |
+
.wpr-animation-enter > .wpr-overlay-skew-bottom {
|
353 |
+
opacity: 1;
|
354 |
+
-webkit-transform: perspective(600px) rotateX(0deg);
|
355 |
+
transform: perspective(600px) rotateX(0deg);
|
356 |
+
}
|
357 |
+
|
358 |
+
.wpr-element-skew-right,
|
359 |
+
.wpr-overlay-skew-right {
|
360 |
+
-webkit-transform-origin: center right 0;
|
361 |
+
-ms-transform-origin: center right 0;
|
362 |
+
transform-origin: center right 0;
|
363 |
+
}
|
364 |
+
|
365 |
+
.wpr-overlay-skew-right {
|
366 |
+
left: auto !important;
|
367 |
+
right: 0 !important;
|
368 |
+
}
|
369 |
+
|
370 |
+
.wpr-anim-size-small.wpr-element-skew-right,
|
371 |
+
.wpr-anim-size-small.wpr-overlay-skew-right {
|
372 |
+
-webkit-transform: perspective(600px) rotateY(-30deg);
|
373 |
+
transform: perspective(600px) rotateY(-30deg);
|
374 |
+
}
|
375 |
+
|
376 |
+
.wpr-anim-size-medium.wpr-element-skew-right,
|
377 |
+
.wpr-anim-size-medium.wpr-overlay-skew-right {
|
378 |
+
-webkit-transform: perspective(600px) rotateY(-50deg);
|
379 |
+
transform: perspective(600px) rotateY(-50deg);
|
380 |
+
}
|
381 |
+
|
382 |
+
.wpr-anim-size-large.wpr-element-skew-right,
|
383 |
+
.wpr-anim-size-large.wpr-overlay-skew-right {
|
384 |
+
-webkit-transform: perspective(600px) rotateY(-90deg);
|
385 |
+
transform: perspective(600px) rotateY(-90deg);
|
386 |
+
}
|
387 |
+
|
388 |
+
.wpr-element-skew-left,
|
389 |
+
.wpr-overlay-skew-left {
|
390 |
+
-webkit-transform-origin: center left 0;
|
391 |
+
-ms-transform-origin: center left 0;
|
392 |
+
transform-origin: center left 0;
|
393 |
+
}
|
394 |
+
|
395 |
+
.wpr-overlay-skew-left {
|
396 |
+
left: 0 !important;
|
397 |
+
}
|
398 |
+
|
399 |
+
.wpr-anim-size-small.wpr-element-skew-left,
|
400 |
+
.wpr-anim-size-small.wpr-overlay-skew-left {
|
401 |
+
-webkit-transform: perspective(600px) rotateY(30deg);
|
402 |
+
transform: perspective(600px) rotateY(30deg);
|
403 |
+
}
|
404 |
+
|
405 |
+
.wpr-anim-size-medium.wpr-element-skew-left,
|
406 |
+
.wpr-anim-size-medium.wpr-overlay-skew-left {
|
407 |
+
-webkit-transform: perspective(600px) rotateY(50deg);
|
408 |
+
transform: perspective(600px) rotateY(50deg);
|
409 |
+
}
|
410 |
+
|
411 |
+
.wpr-anim-size-large.wpr-element-skew-left,
|
412 |
+
.wpr-anim-size-large.wpr-overlay-skew-left {
|
413 |
+
-webkit-transform: perspective(600px) rotateY(90deg);
|
414 |
+
transform: perspective(600px) rotateY(90deg);
|
415 |
+
}
|
416 |
+
|
417 |
+
.wpr-animation-wrap-active .wpr-element-skew-right,
|
418 |
+
.wpr-animation-wrap-active .wpr-overlay-skew-right,
|
419 |
+
.wpr-animation-wrap:hover .wpr-element-skew-right,
|
420 |
+
.wpr-animation-wrap:hover .wpr-overlay-skew-right,
|
421 |
+
.wpr-animation-enter > .wpr-overlay-skew-right,
|
422 |
+
.wpr-animation-wrap-active .wpr-element-skew-left,
|
423 |
+
.wpr-animation-wrap-active .wpr-overlay-skew-left,
|
424 |
+
.wpr-animation-wrap:hover .wpr-element-skew-left,
|
425 |
+
.wpr-animation-wrap:hover .wpr-overlay-skew-left,
|
426 |
+
.wpr-animation-enter > .wpr-overlay-skew-left {
|
427 |
+
opacity: 1;
|
428 |
+
-webkit-transform: perspective(600px) rotateY(0deg);
|
429 |
+
transform: perspective(600px) rotateY(0deg);
|
430 |
+
}
|
431 |
+
|
432 |
+
.wpr-anim-size-small.wpr-element-scale-up,
|
433 |
+
.wpr-anim-size-small.wpr-overlay-scale-up {
|
434 |
+
-webkit-transform: scale(0.9);
|
435 |
+
-ms-transform: scale(0.9);
|
436 |
+
transform: scale(0.9);
|
437 |
+
}
|
438 |
+
|
439 |
+
.wpr-anim-size-medium.wpr-element-scale-up,
|
440 |
+
.wpr-anim-size-medium.wpr-overlay-scale-up {
|
441 |
+
-webkit-transform: scale(0.6);
|
442 |
+
-ms-transform: scale(0.6);
|
443 |
+
transform: scale(0.6);
|
444 |
+
}
|
445 |
+
|
446 |
+
.wpr-anim-size-large.wpr-element-scale-up,
|
447 |
+
.wpr-anim-size-large.wpr-overlay-scale-up {
|
448 |
+
-webkit-transform: scale(0.2);
|
449 |
+
-ms-transform: scale(0.2);
|
450 |
+
transform: scale(0.2);
|
451 |
+
}
|
452 |
+
|
453 |
+
.wpr-anim-size-small.wpr-element-scale-down,
|
454 |
+
.wpr-anim-size-small.wpr-overlay-scale-down {
|
455 |
+
-webkit-transform: scale(1.1);
|
456 |
+
-ms-transform: scale(1.1);
|
457 |
+
transform: scale(1.1);
|
458 |
+
}
|
459 |
+
|
460 |
+
.wpr-anim-size-medium.wpr-element-scale-down,
|
461 |
+
.wpr-anim-size-medium.wpr-overlay-scale-down {
|
462 |
+
-webkit-transform: scale(1.4);
|
463 |
+
-ms-transform: scale(1.4);
|
464 |
+
transform: scale(1.4);
|
465 |
+
}
|
466 |
+
|
467 |
+
.wpr-anim-size-large.wpr-element-scale-down,
|
468 |
+
.wpr-anim-size-large.wpr-overlay-scale-down {
|
469 |
+
-webkit-transform: scale(1.9);
|
470 |
+
-ms-transform: scale(1.9);
|
471 |
+
transform: scale(1.9);
|
472 |
+
}
|
473 |
+
|
474 |
+
.wpr-animation-wrap-active .wpr-element-scale-up,
|
475 |
+
.wpr-animation-wrap-active .wpr-overlay-scale-up,
|
476 |
+
.wpr-animation-wrap:hover .wpr-element-scale-up,
|
477 |
+
.wpr-animation-wrap:hover .wpr-overlay-scale-up,
|
478 |
+
.wpr-animation-enter > .wpr-overlay-scale-up,
|
479 |
+
.wpr-animation-wrap-active .wpr-element-scale-down,
|
480 |
+
.wpr-animation-wrap-active .wpr-overlay-scale-down,
|
481 |
+
.wpr-animation-wrap:hover .wpr-element-scale-down,
|
482 |
+
.wpr-animation-wrap:hover .wpr-overlay-scale-down,
|
483 |
+
.wpr-animation-enter > .wpr-overlay-scale-down {
|
484 |
+
opacity: 1;
|
485 |
+
-webkit-transform: scale(1);
|
486 |
+
-ms-transform: scale(1);
|
487 |
+
transform: scale(1);
|
488 |
+
}
|
489 |
+
|
490 |
+
.wpr-anim-size-small.wpr-element-roll-right,
|
491 |
+
.wpr-anim-size-small.wpr-overlay-roll-right {
|
492 |
+
-webkit-transform: translateX(100%) rotate(90deg);
|
493 |
+
-ms-transform: translateX(100%) rotate(90deg);
|
494 |
+
transform: translateX(100%) rotate(90deg);
|
495 |
+
}
|
496 |
+
|
497 |
+
.wpr-anim-size-medium.wpr-element-roll-right,
|
498 |
+
.wpr-anim-size-medium.wpr-overlay-roll-right {
|
499 |
+
-webkit-transform: translateX(100%) rotate(240deg);
|
500 |
+
-ms-transform: translateX(100%) rotate(240deg);
|
501 |
+
transform: translateX(100%) rotate(240deg);
|
502 |
+
}
|
503 |
+
|
504 |
+
.wpr-anim-size-large.wpr-element-roll-right,
|
505 |
+
.wpr-anim-size-large.wpr-overlay-roll-right {
|
506 |
+
-webkit-transform: translateX(100%) rotate(360deg);
|
507 |
+
-ms-transform: translateX(100%) rotate(360deg);
|
508 |
+
transform: translateX(100%) rotate(360deg);
|
509 |
+
}
|
510 |
+
|
511 |
+
.wpr-anim-size-small.wpr-element-roll-left,
|
512 |
+
.wpr-anim-size-small.wpr-overlay-roll-left {
|
513 |
+
-webkit-transform: translateX(-100%) rotate(-90deg);
|
514 |
+
-ms-transform: translateX(-100%) rotate(-90deg);
|
515 |
+
transform: translateX(-100%) rotate(-90deg);
|
516 |
+
}
|
517 |
+
|
518 |
+
.wpr-anim-size-medium.wpr-element-roll-left,
|
519 |
+
.wpr-anim-size-medium.wpr-overlay-roll-left {
|
520 |
+
-webkit-transform: translateX(-100%) rotate(-240deg);
|
521 |
+
-ms-transform: translateX(-100%) rotate(-240deg);
|
522 |
+
transform: translateX(-100%) rotate(-240deg);
|
523 |
+
}
|
524 |
+
|
525 |
+
.wpr-anim-size-large.wpr-element-roll-left,
|
526 |
+
.wpr-anim-size-large.wpr-overlay-roll-left {
|
527 |
+
-webkit-transform: translateX(-100%) rotate(-360deg);
|
528 |
+
-ms-transform: translateX(-100%) rotate(-360deg);
|
529 |
+
transform: translateX(-100%) rotate(-360deg);
|
530 |
+
}
|
531 |
+
|
532 |
+
.wpr-animation-wrap-active .wpr-element-roll-right,
|
533 |
+
.wpr-animation-wrap-active .wpr-overlay-roll-right,
|
534 |
+
.wpr-animation-wrap:hover .wpr-element-roll-right,
|
535 |
+
.wpr-animation-wrap:hover .wpr-overlay-roll-right,
|
536 |
+
.wpr-animation-enter > .wpr-overlay-roll-right,
|
537 |
+
.wpr-animation-wrap-active .wpr-element-roll-left,
|
538 |
+
.wpr-animation-wrap-active .wpr-overlay-roll-left,
|
539 |
+
.wpr-animation-wrap:hover .wpr-element-roll-left,
|
540 |
+
.wpr-animation-wrap:hover .wpr-overlay-roll-left,
|
541 |
+
.wpr-animation-enter > .wpr-overlay-roll-left {
|
542 |
+
opacity: 1;
|
543 |
+
-webkit-transform: translateX(0) rotate(0);
|
544 |
+
-ms-transform: translateX(0) rotate(0);
|
545 |
+
transform: translateX(0) rotate(0);
|
546 |
+
}
|
547 |
+
|
548 |
+
|
549 |
+
/* Timing Functions */
|
550 |
+
|
551 |
+
.wpr-anim-timing-linear {
|
552 |
+
-webkit-transition-timing-function: cubic-bezier(0.250, 0.250, 0.750, 0.750);
|
553 |
+
-o-transition-timing-function: cubic-bezier(0.250, 0.250, 0.750, 0.750);
|
554 |
+
transition-timing-function: cubic-bezier(0.250, 0.250, 0.750, 0.750);
|
555 |
+
}
|
556 |
+
|
557 |
+
.wpr-anim-timing-ease-default {
|
558 |
+
-webkit-transition-timing-function: cubic-bezier(0.250, 0.100, 0.250, 1.000);
|
559 |
+
-o-transition-timing-function: cubic-bezier(0.250, 0.100, 0.250, 1.000);
|
560 |
+
transition-timing-function: cubic-bezier(0.250, 0.100, 0.250, 1.000);
|
561 |
+
}
|
562 |
+
|
563 |
+
.wpr-anim-timing-ease-in {
|
564 |
+
-webkit-transition-timing-function: cubic-bezier(0.420, 0.000, 1.000, 1.000);
|
565 |
+
-o-transition-timing-function: cubic-bezier(0.420, 0.000, 1.000, 1.000);
|
566 |
+
transition-timing-function: cubic-bezier(0.420, 0.000, 1.000, 1.000);
|
567 |
+
}
|
568 |
+
|
569 |
+
.wpr-anim-timing-ease-out {
|
570 |
+
-webkit-transition-timing-function: cubic-bezier(0.000, 0.000, 0.580, 1.000);
|
571 |
+
-o-transition-timing-function: cubic-bezier(0.000, 0.000, 0.580, 1.000);
|
572 |
+
transition-timing-function: cubic-bezier(0.000, 0.000, 0.580, 1.000);
|
573 |
+
}
|
574 |
+
|
575 |
+
.wpr-anim-timing-ease-in-out {
|
576 |
+
-webkit-transition-timing-function: cubic-bezier(0.420, 0.000, 0.580, 1.000);
|
577 |
+
-o-transition-timing-function: cubic-bezier(0.420, 0.000, 0.580, 1.000);
|
578 |
+
transition-timing-function: cubic-bezier(0.420, 0.000, 0.580, 1.000);
|
579 |
+
}
|
580 |
+
|
581 |
+
.wpr-anim-timing-ease-in-quad {
|
582 |
+
-webkit-transition-timing-function: cubic-bezier(0.550, 0.085, 0.680, 0.530);
|
583 |
+
-o-transition-timing-function: cubic-bezier(0.550, 0.085, 0.680, 0.530);
|
584 |
+
transition-timing-function: cubic-bezier(0.550, 0.085, 0.680, 0.530);
|
585 |
+
}
|
586 |
+
|
587 |
+
.wpr-anim-timing-ease-in-cubic {
|
588 |
+
-webkit-transition-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
|
589 |
+
-o-transition-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
|
590 |
+
transition-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
|
591 |
+
}
|
592 |
+
|
593 |
+
.wpr-anim-timing-ease-in-quart {
|
594 |
+
-webkit-transition-timing-function: cubic-bezier(0.895, 0.030, 0.685, 0.220);
|
595 |
+
-o-transition-timing-function: cubic-bezier(0.895, 0.030, 0.685, 0.220);
|
596 |
+
transition-timing-function: cubic-bezier(0.895, 0.030, 0.685, 0.220);
|
597 |
+
}
|
598 |
+
|
599 |
+
.wpr-anim-timing-ease-in-quint {
|
600 |
+
-webkit-transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
|
601 |
+
-o-transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
|
602 |
+
transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
|
603 |
+
}
|
604 |
+
|
605 |
+
.wpr-anim-timing-ease-in-sine {
|
606 |
+
-webkit-transition-timing-function: cubic-bezier(0.470, 0.000, 0.745, 0.715);
|
607 |
+
-o-transition-timing-function: cubic-bezier(0.470, 0.000, 0.745, 0.715);
|
608 |
+
transition-timing-function: cubic-bezier(0.470, 0.000, 0.745, 0.715);
|
609 |
+
}
|
610 |
+
|
611 |
+
.wpr-anim-timing-ease-in-expo {
|
612 |
+
-webkit-transition-timing-function: cubic-bezier(0.950, 0.050, 0.795, 0.035);
|
613 |
+
-o-transition-timing-function: cubic-bezier(0.950, 0.050, 0.795, 0.035);
|
614 |
+
transition-timing-function: cubic-bezier(0.950, 0.050, 0.795, 0.035);
|
615 |
+
}
|
616 |
+
|
617 |
+
.wpr-anim-timing-ease-in-circ {
|
618 |
+
-webkit-transition-timing-function: cubic-bezier(0.600, 0.040, 0.980, 0.335);
|
619 |
+
-o-transition-timing-function: cubic-bezier(0.600, 0.040, 0.980, 0.335);
|
620 |
+
transition-timing-function: cubic-bezier(0.600, 0.040, 0.980, 0.335);
|
621 |
+
}
|
622 |
+
|
623 |
+
.wpr-anim-timing-ease-in-back {
|
624 |
+
-webkit-transition-timing-function: cubic-bezier(0.600, -0.280, 0.735, 0.045);
|
625 |
+
-o-transition-timing-function: cubic-bezier(0.600, -0.280, 0.735, 0.045);
|
626 |
+
transition-timing-function: cubic-bezier(0.600, -0.280, 0.735, 0.045);
|
627 |
+
}
|
628 |
+
|
629 |
+
.wpr-anim-timing-ease-out-quad {
|
630 |
+
-webkit-transition-timing-function: cubic-bezier(0.250, 0.460, 0.450, 0.940);
|
631 |
+
-o-transition-timing-function: cubic-bezier(0.250, 0.460, 0.450, 0.940);
|
632 |
+
transition-timing-function: cubic-bezier(0.250, 0.460, 0.450, 0.940);
|
633 |
+
}
|
634 |
+
|
635 |
+
.wpr-anim-timing-ease-out-cubic {
|
636 |
+
-webkit-transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
|
637 |
+
-o-transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
|
638 |
+
transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
|
639 |
+
}
|
640 |
+
|
641 |
+
.wpr-anim-timing-ease-out-quart {
|
642 |
+
-webkit-transition-timing-function: cubic-bezier(0.165, 0.840, 0.440, 1.000);
|
643 |
+
-o-transition-timing-function: cubic-bezier(0.165, 0.840, 0.440, 1.000);
|
644 |
+
transition-timing-function: cubic-bezier(0.165, 0.840, 0.440, 1.000);
|
645 |
+
}
|
646 |
+
|
647 |
+
.wpr-anim-timing-ease-out-quint {
|
648 |
+
-webkit-transition-timing-function: cubic-bezier(0.230, 1.000, 0.320, 1.000);
|
649 |
+
-o-transition-timing-function: cubic-bezier(0.230, 1.000, 0.320, 1.000);
|
650 |
+
transition-timing-function: cubic-bezier(0.230, 1.000, 0.320, 1.000);
|
651 |
+
}
|
652 |
+
|
653 |
+
.wpr-anim-timing-ease-out-sine {
|
654 |
+
-webkit-transition-timing-function: cubic-bezier(0.390, 0.575, 0.565, 1.000);
|
655 |
+
-o-transition-timing-function: cubic-bezier(0.390, 0.575, 0.565, 1.000);
|
656 |
+
transition-timing-function: cubic-bezier(0.390, 0.575, 0.565, 1.000);
|
657 |
+
}
|
658 |
+
|
659 |
+
.wpr-anim-timing-ease-out-expo {
|
660 |
+
-webkit-transition-timing-function: cubic-bezier(0.190, 1.000, 0.220, 1.000);
|
661 |
+
-o-transition-timing-function: cubic-bezier(0.190, 1.000, 0.220, 1.000);
|
662 |
+
transition-timing-function: cubic-bezier(0.190, 1.000, 0.220, 1.000);
|
663 |
+
}
|
664 |
+
|
665 |
+
.wpr-anim-timing-ease-out-circ {
|
666 |
+
-webkit-transition-timing-function: cubic-bezier(0.075, 0.820, 0.165, 1.000);
|
667 |
+
-o-transition-timing-function: cubic-bezier(0.075, 0.820, 0.165, 1.000);
|
668 |
+
transition-timing-function: cubic-bezier(0.075, 0.820, 0.165, 1.000);
|
669 |
+
}
|
670 |
+
|
671 |
+
.wpr-anim-timing-ease-out-back {
|
672 |
+
-webkit-transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1.275);
|
673 |
+
-o-transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1.275);
|
674 |
+
transition-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1.275);
|
675 |
+
}
|
676 |
+
|
677 |
+
.wpr-anim-timing-ease-in-out-quad {
|
678 |
+
-webkit-transition-timing-function: cubic-bezier(0.455, 0.030, 0.515, 0.955);
|
679 |
+
-o-transition-timing-function: cubic-bezier(0.455, 0.030, 0.515, 0.955);
|
680 |
+
transition-timing-function: cubic-bezier(0.455, 0.030, 0.515, 0.955)
|
681 |
+
}
|
682 |
+
|
683 |
+
.wpr-anim-timing-ease-in-out-cubic {
|
684 |
+
-webkit-transition-timing-function: cubic-bezier(0.645, 0.045, 0.355, 1.000);
|
685 |
+
-o-transition-timing-function: cubic-bezier(0.645, 0.045, 0.355, 1.000);
|
686 |
+
transition-timing-function: cubic-bezier(0.645, 0.045, 0.355, 1.000);
|
687 |
+
}
|
688 |
+
|
689 |
+
.wpr-anim-timing-ease-in-out-quart {
|
690 |
+
-webkit-transition-timing-function: cubic-bezier(0.770, 0.000, 0.175, 1.000);
|
691 |
+
-o-transition-timing-function: cubic-bezier(0.770, 0.000, 0.175, 1.000);
|
692 |
+
transition-timing-function: cubic-bezier(0.770, 0.000, 0.175, 1.000);
|
693 |
+
}
|
694 |
+
|
695 |
+
.wpr-anim-timing-ease-in-out-quint {
|
696 |
+
-webkit-transition-timing-function: cubic-bezier(0.860, 0.000, 0.070, 1.000);
|
697 |
+
-o-transition-timing-function: cubic-bezier(0.860, 0.000, 0.070, 1.000);
|
698 |
+
transition-timing-function: cubic-bezier(0.860, 0.000, 0.070, 1.000);
|
699 |
+
}
|
700 |
+
|
701 |
+
.wpr-anim-timing-ease-in-out-sine {
|
702 |
+
-webkit-transition-timing-function: cubic-bezier(0.445, 0.050, 0.550, 0.950);
|
703 |
+
-o-transition-timing-function: cubic-bezier(0.445, 0.050, 0.550, 0.950);
|
704 |
+
transition-timing-function: cubic-bezier(0.445, 0.050, 0.550, 0.950);
|
705 |
+
}
|
706 |
+
|
707 |
+
.wpr-anim-timing-ease-in-out-expo {
|
708 |
+
-webkit-transition-timing-function: cubic-bezier(1.000, 0.000, 0.000, 1.000);
|
709 |
+
-o-transition-timing-function: cubic-bezier(1.000, 0.000, 0.000, 1.000);
|
710 |
+
transition-timing-function: cubic-bezier(1.000, 0.000, 0.000, 1.000);
|
711 |
+
}
|
712 |
+
|
713 |
+
.wpr-anim-timing-ease-in-out-circ {
|
714 |
+
-webkit-transition-timing-function: cubic-bezier(0.785, 0.135, 0.150, 0.860);
|
715 |
+
-o-transition-timing-function: cubic-bezier(0.785, 0.135, 0.150, 0.860);
|
716 |
+
transition-timing-function: cubic-bezier(0.785, 0.135, 0.150, 0.860);
|
717 |
+
}
|
718 |
+
|
719 |
+
.wpr-anim-timing-ease-in-out-back {
|
720 |
+
-webkit-transition-timing-function: cubic-bezier(0.680, -0.550, 0.265, 1.550);
|
721 |
+
-o-transition-timing-function: cubic-bezier(0.680, -0.550, 0.265, 1.550);
|
722 |
+
transition-timing-function: cubic-bezier(0.680, -0.550, 0.265, 1.550);
|
723 |
+
}
|
724 |
+
|
725 |
+
|
726 |
+
/* Image Effects */
|
727 |
+
|
728 |
+
.wpr-slide.wpr-effect-dir-top:hover img {
|
729 |
+
-webkit-transform: translateY(-100%);
|
730 |
+
-ms-transform: translateY(-100%);
|
731 |
+
transform: translateY(-100%);
|
732 |
+
}
|
733 |
+
|
734 |
+
.wpr-slide.wpr-effect-dir-bottom:hover img {
|
735 |
+
-webkit-transform: translateY(100%);
|
736 |
+
-ms-transform: translateY(100%);
|
737 |
+
transform: translateY(100%);
|
738 |
+
}
|
739 |
+
|
740 |
+
.wpr-slide.wpr-effect-dir-right:hover img {
|
741 |
+
-webkit-transform: translateX(100%);
|
742 |
+
-ms-transform: translateX(100%);
|
743 |
+
transform: translateX(100%);
|
744 |
+
}
|
745 |
+
|
746 |
+
.wpr-slide.wpr-effect-dir-left:hover img {
|
747 |
+
-webkit-transform: translateX(-100%);
|
748 |
+
-ms-transform: translateX(-100%);
|
749 |
+
transform: translateX(-100%);
|
750 |
+
}
|
751 |
+
|
752 |
+
.wpr-zoom-in.wpr-effect-size-small:hover img {
|
753 |
+
-webkit-transform: scale(1.1);
|
754 |
+
-ms-transform: scale(1.1);
|
755 |
+
transform: scale(1.1);
|
756 |
+
}
|
757 |
+
|
758 |
+
.wpr-zoom-in.wpr-effect-size-medium:hover img {
|
759 |
+
-webkit-transform: scale(1.3);
|
760 |
+
-ms-transform: scale(1.3);
|
761 |
+
transform: scale(1.3);
|
762 |
+
}
|
763 |
+
|
764 |
+
.wpr-zoom-in.wpr-effect-size-large:hover img {
|
765 |
+
-webkit-transform: scale(1.5);
|
766 |
+
-ms-transform: scale(1.5);
|
767 |
+
transform: scale(1.5);
|
768 |
+
}
|
769 |
+
|
770 |
+
.wpr-zoom-out.wpr-effect-size-small img {
|
771 |
+
-webkit-transform: scale(1.1);
|
772 |
+
-ms-transform: scale(1.1);
|
773 |
+
transform: scale(1.1);
|
774 |
+
}
|
775 |
+
|
776 |
+
.wpr-zoom-out.wpr-effect-size-medium img {
|
777 |
+
-webkit-transform: scale(1.3);
|
778 |
+
-ms-transform: scale(1.3);
|
779 |
+
transform: scale(1.3);
|
780 |
+
}
|
781 |
+
|
782 |
+
.wpr-zoom-out.wpr-effect-size-large img {
|
783 |
+
-webkit-transform: scale(1.5);
|
784 |
+
-ms-transform: scale(1.5);
|
785 |
+
transform: scale(1.5);
|
786 |
+
}
|
787 |
+
|
788 |
+
.wpr-zoom-out.wpr-effect-size-small:hover img,
|
789 |
+
.wpr-zoom-out.wpr-effect-size-medium:hover img,
|
790 |
+
.wpr-zoom-out.wpr-effect-size-large:hover img {
|
791 |
+
-webkit-transform: scale(1);
|
792 |
+
-ms-transform: scale(1);
|
793 |
+
transform: scale(1);
|
794 |
+
}
|
795 |
+
|
796 |
+
.wpr-grayscale-in.wpr-effect-size-small:hover img {
|
797 |
+
-webkit-filter: grayscale(0.3);
|
798 |
+
filter: grayscale(0.3);
|
799 |
+
}
|
800 |
+
|
801 |
+
.wpr-grayscale-in.wpr-effect-size-medium:hover img {
|
802 |
+
-webkit-filter: grayscale(0.6);
|
803 |
+
filter: grayscale(0.6);
|
804 |
+
}
|
805 |
+
|
806 |
+
.wpr-grayscale-in.wpr-effect-size-large:hover img {
|
807 |
+
-webkit-filter: grayscale(1);
|
808 |
+
filter: grayscale(1);
|
809 |
+
}
|
810 |
+
|
811 |
+
.wpr-grayscale-out.wpr-effect-size-small img {
|
812 |
+
-webkit-filter: grayscale(0.3);
|
813 |
+
filter: grayscale(0.3);
|
814 |
+
}
|
815 |
+
|
816 |
+
.wpr-grayscale-out.wpr-effect-size-medium img {
|
817 |
+
-webkit-filter: grayscale(0.6);
|
818 |
+
filter: grayscale(0.6);
|
819 |
+
}
|
820 |
+
|
821 |
+
.wpr-grayscale-out.wpr-effect-size-large img {
|
822 |
+
-webkit-filter: grayscale(1);
|
823 |
+
filter: grayscale(1);
|
824 |
+
}
|
825 |
+
|
826 |
+
.wpr-grayscale-out.wpr-effect-size-small:hover img,
|
827 |
+
.wpr-grayscale-out.wpr-effect-size-medium:hover img,
|
828 |
+
.wpr-grayscale-out.wpr-effect-size-large:hover img {
|
829 |
+
-webkit-filter: grayscale(0);
|
830 |
+
filter: grayscale(0);
|
831 |
+
}
|
832 |
+
|
833 |
+
.wpr-blur-in.wpr-effect-size-small:hover img {
|
834 |
+
-webkit-filter: blur(1px);
|
835 |
+
filter: blur(1px);
|
836 |
+
}
|
837 |
+
|
838 |
+
.wpr-blur-in.wpr-effect-size-medium:hover img {
|
839 |
+
-webkit-filter: blur(3px);
|
840 |
+
filter: blur(3px);
|
841 |
+
}
|
842 |
+
|
843 |
+
.wpr-blur-in.wpr-effect-size-large:hover img {
|
844 |
+
-webkit-filter: blur(5px);
|
845 |
+
filter: blur(5px);
|
846 |
+
}
|
847 |
+
|
848 |
+
.wpr-blur-out.wpr-effect-size-small img {
|
849 |
+
-webkit-filter: blur(1px);
|
850 |
+
filter: blur(1px);
|
851 |
+
}
|
852 |
+
|
853 |
+
.wpr-blur-out.wpr-effect-size-medium img {
|
854 |
+
-webkit-filter: blur(3px);
|
855 |
+
filter: blur(3px);
|
856 |
+
}
|
857 |
+
|
858 |
+
.wpr-blur-out.wpr-effect-size-large img {
|
859 |
+
-webkit-filter: blur(5px);
|
860 |
+
filter: blur(5px);
|
861 |
+
}
|
862 |
+
|
863 |
+
.wpr-blur-out.wpr-effect-size-small:hover img,
|
864 |
+
.wpr-blur-out.wpr-effect-size-medium:hover img,
|
865 |
+
.wpr-blur-out.wpr-effect-size-large:hover img {
|
866 |
+
-webkit-filter: blur(0px);
|
867 |
+
filter: blur(0px);
|
868 |
+
}
|
869 |
+
|
870 |
+
.wpr-slide.wpr-effect-dir-top:hover .wpr-accordion-background {
|
871 |
+
-webkit-transform: translateY(-100%);
|
872 |
+
-ms-transform: translateY(-100%);
|
873 |
+
transform: translateY(-100%);
|
874 |
+
}
|
875 |
+
|
876 |
+
.wpr-slide.wpr-effect-dir-bottom:hover .wpr-accordion-background {
|
877 |
+
-webkit-transform: translateY(100%);
|
878 |
+
-ms-transform: translateY(100%);
|
879 |
+
transform: translateY(100%);
|
880 |
+
}
|
881 |
+
|
882 |
+
.wpr-slide.wpr-effect-dir-right:hover .wpr-accordion-background {
|
883 |
+
-webkit-transform: translateX(100%);
|
884 |
+
-ms-transform: translateX(100%);
|
885 |
+
transform: translateX(100%);
|
886 |
+
}
|
887 |
+
|
888 |
+
.wpr-slide.wpr-effect-dir-left:hover .wpr-accordion-background {
|
889 |
+
-webkit-transform: translateX(-100%);
|
890 |
+
-ms-transform: translateX(-100%);
|
891 |
+
transform: translateX(-100%);
|
892 |
+
}
|
893 |
+
|
894 |
+
.wpr-zoom-in.wpr-effect-size-small:hover .wpr-accordion-background {
|
895 |
+
-webkit-transform: scale(1.1);
|
896 |
+
-ms-transform: scale(1.1);
|
897 |
+
transform: scale(1.1);
|
898 |
+
}
|
899 |
+
|
900 |
+
.wpr-zoom-in.wpr-effect-size-medium:hover .wpr-accordion-background {
|
901 |
+
-webkit-transform: scale(1.3);
|
902 |
+
-ms-transform: scale(1.3);
|
903 |
+
transform: scale(1.3);
|
904 |
+
}
|
905 |
+
|
906 |
+
.wpr-zoom-in.wpr-effect-size-large:hover .wpr-accordion-background {
|
907 |
+
-webkit-transform: scale(1.5);
|
908 |
+
-ms-transform: scale(1.5);
|
909 |
+
transform: scale(1.5);
|
910 |
+
}
|
911 |
+
|
912 |
+
.wpr-zoom-out.wpr-effect-size-small .wpr-accordion-background {
|
913 |
+
-webkit-transform: scale(1.1);
|
914 |
+
-ms-transform: scale(1.1);
|
915 |
+
transform: scale(1.1);
|
916 |
+
}
|
917 |
+
|
918 |
+
.wpr-zoom-out.wpr-effect-size-medium .wpr-accordion-background {
|
919 |
+
-webkit-transform: scale(1.3);
|
920 |
+
-ms-transform: scale(1.3);
|
921 |
+
transform: scale(1.3);
|
922 |
+
}
|
923 |
+
|
924 |
+
.wpr-zoom-out.wpr-effect-size-large .wpr-accordion-background {
|
925 |
+
-webkit-transform: scale(1.5);
|
926 |
+
-ms-transform: scale(1.5);
|
927 |
+
transform: scale(1.5);
|
928 |
+
}
|
929 |
+
|
930 |
+
.wpr-zoom-out.wpr-effect-size-small:hover .wpr-accordion-background,
|
931 |
+
.wpr-zoom-out.wpr-effect-size-medium:hover .wpr-accordion-background,
|
932 |
+
.wpr-zoom-out.wpr-effect-size-large:hover .wpr-accordion-background {
|
933 |
+
-webkit-transform: scale(1);
|
934 |
+
-ms-transform: scale(1);
|
935 |
+
transform: scale(1);
|
936 |
+
}
|
937 |
+
|
938 |
+
.wpr-grayscale-in.wpr-effect-size-small:hover .wpr-accordion-background {
|
939 |
+
-webkit-filter: grayscale(0.3);
|
940 |
+
filter: grayscale(0.3);
|
941 |
+
}
|
942 |
+
|
943 |
+
.wpr-grayscale-in.wpr-effect-size-medium:hover .wpr-accordion-background {
|
944 |
+
-webkit-filter: grayscale(0.6);
|
945 |
+
filter: grayscale(0.6);
|
946 |
+
}
|
947 |
+
|
948 |
+
.wpr-grayscale-in.wpr-effect-size-large:hover .wpr-accordion-background {
|
949 |
+
-webkit-filter: grayscale(1);
|
950 |
+
filter: grayscale(1);
|
951 |
+
}
|
952 |
+
|
953 |
+
.wpr-grayscale-out.wpr-effect-size-small .wpr-accordion-background {
|
954 |
+
-webkit-filter: grayscale(0.3);
|
955 |
+
filter: grayscale(0.3);
|
956 |
+
}
|
957 |
+
|
958 |
+
.wpr-grayscale-out.wpr-effect-size-medium .wpr-accordion-background {
|
959 |
+
-webkit-filter: grayscale(0.6);
|
960 |
+
filter: grayscale(0.6);
|
961 |
+
}
|
962 |
+
|
963 |
+
.wpr-grayscale-out.wpr-effect-size-large .wpr-accordion-background {
|
964 |
+
-webkit-filter: grayscale(1);
|
965 |
+
filter: grayscale(1);
|
966 |
+
}
|
967 |
+
|
968 |
+
.wpr-grayscale-out.wpr-effect-size-small:hover .wpr-accordion-background,
|
969 |
+
.wpr-grayscale-out.wpr-effect-size-medium:hover .wpr-accordion-background,
|
970 |
+
.wpr-grayscale-out.wpr-effect-size-large:hover .wpr-accordion-background {
|
971 |
+
-webkit-filter: grayscale(0);
|
972 |
+
filter: grayscale(0);
|
973 |
+
}
|
974 |
+
|
975 |
+
.wpr-blur-in.wpr-effect-size-small:hover .wpr-accordion-background {
|
976 |
+
-webkit-filter: blur(1px);
|
977 |
+
filter: blur(1px);
|
978 |
+
}
|
979 |
+
|
980 |
+
.wpr-blur-in.wpr-effect-size-medium:hover .wpr-accordion-background {
|
981 |
+
-webkit-filter: blur(3px);
|
982 |
+
filter: blur(3px);
|
983 |
+
}
|
984 |
+
|
985 |
+
.wpr-blur-in.wpr-effect-size-large:hover .wpr-accordion-background {
|
986 |
+
-webkit-filter: blur(5px);
|
987 |
+
filter: blur(5px);
|
988 |
+
}
|
989 |
+
|
990 |
+
.wpr-blur-out.wpr-effect-size-small .wpr-accordion-background {
|
991 |
+
-webkit-filter: blur(1px);
|
992 |
+
filter: blur(1px);
|
993 |
+
}
|
994 |
+
|
995 |
+
.wpr-blur-out.wpr-effect-size-medium .wpr-accordion-background {
|
996 |
+
-webkit-filter: blur(3px);
|
997 |
+
filter: blur(3px);
|
998 |
+
}
|
999 |
+
|
1000 |
+
.wpr-blur-out.wpr-effect-size-large .wpr-accordion-background {
|
1001 |
+
-webkit-filter: blur(5px);
|
1002 |
+
filter: blur(5px);
|
1003 |
+
}
|
1004 |
+
|
1005 |
+
.wpr-blur-out.wpr-effect-size-small:hover .wpr-accordion-background,
|
1006 |
+
.wpr-blur-out.wpr-effect-size-medium:hover .wpr-accordion-background,
|
1007 |
+
.wpr-blur-out.wpr-effect-size-large:hover .wpr-accordion-background {
|
1008 |
+
-webkit-filter: blur(0px);
|
1009 |
+
filter: blur(0px);
|
1010 |
+
}
|
1011 |
+
|
1012 |
+
|
1013 |
+
/* Background Animation */
|
1014 |
+
|
1015 |
+
.wpr-animation-wrap-active .wpr-bg-anim-zoom-in,
|
1016 |
+
.wpr-animation-wrap:hover .wpr-bg-anim-zoom-in {
|
1017 |
+
-webkit-transform: scale(1.2);
|
1018 |
+
-ms-transform: scale(1.2);
|
1019 |
+
transform: scale(1.2);
|
1020 |
+
}
|
1021 |
+
|
1022 |
+
.wpr-bg-anim-zoom-out {
|
1023 |
+
-webkit-transform: scale(1.2);
|
1024 |
+
-ms-transform: scale(1.2);
|
1025 |
+
transform: scale(1.2);
|
1026 |
+
}
|
1027 |
+
|
1028 |
+
.wpr-animation-wrap-active .wpr-bg-anim-zoom-out,
|
1029 |
+
.wpr-animation-wrap:hover .wpr-bg-anim-zoom-out {
|
1030 |
+
-webkit-transform: scale(1);
|
1031 |
+
-ms-transform: scale(1);
|
1032 |
+
transform: scale(1);
|
1033 |
+
}
|
1034 |
+
|
1035 |
+
.wpr-bg-anim-move-left {
|
1036 |
+
-webkit-transform: scale(1.2) translateX(8%);
|
1037 |
+
-ms-transform: scale(1.2) translateX(8%);
|
1038 |
+
transform: scale(1.2) translateX(8%);
|
1039 |
+
}
|
1040 |
+
|
1041 |
+
.wpr-animation-wrap-active .wpr-bg-anim-move-left,
|
1042 |
+
.wpr-animation-wrap:hover .wpr-bg-anim-move-left {
|
1043 |
+
-webkit-transform: scale(1.2) translateX(-8%);
|
1044 |
+
-ms-transform: scale(1.2) translateX(-8%);
|
1045 |
+
transform: scale(1.2) translateX(-8%);
|
1046 |
+
}
|
1047 |
+
|
1048 |
+
.wpr-bg-anim-move-right {
|
1049 |
+
-webkit-transform: scale(1.2) translateX(-8%);
|
1050 |
+
-ms-transform: scale(1.2) translateX(-8%);
|
1051 |
+
transform: scale(1.2) translateX(-8%);
|
1052 |
+
}
|
1053 |
+
|
1054 |
+
.wpr-animation-wrap-active .wpr-bg-anim-move-right,
|
1055 |
+
.wpr-animation-wrap:hover .wpr-bg-anim-move-right {
|
1056 |
+
-webkit-transform: scale(1.2) translateX(8%);
|
1057 |
+
-ms-transform: scale(1.2) translateX(8%);
|
1058 |
+
transform: scale(1.2) translateX(8%);
|
1059 |
+
}
|
1060 |
+
|
1061 |
+
.wpr-bg-anim-move-up {
|
1062 |
+
-webkit-transform: scale(1.2) translateY(8%);
|
1063 |
+
-ms-transform: scale(1.2) translateY(8%);
|
1064 |
+
transform: scale(1.2) translateY(8%);
|
1065 |
+
}
|
1066 |
+
|
1067 |
+
.wpr-animation-wrap-active .wpr-bg-anim-move-up,
|
1068 |
+
.wpr-animation-wrap:hover .wpr-bg-anim-move-up {
|
1069 |
+
-webkit-transform: scale(1.2) translateY(-8%);
|
1070 |
+
-ms-transform: scale(1.2) translateY(-8%);
|
1071 |
+
transform: scale(1.2) translateY(-8%);
|
1072 |
+
}
|
1073 |
+
|
1074 |
+
.wpr-animation-wrap-active .wpr-bg-anim-move-down,
|
1075 |
+
.wpr-animation-wrap:hover .wpr-bg-anim-move-down {
|
1076 |
+
-webkit-transform: scale(1.2) translateY(-8%);
|
1077 |
+
-ms-transform: scale(1.2) translateY(-8%);
|
1078 |
+
transform: scale(1.2) translateY(-8%);
|
1079 |
+
}
|
1080 |
+
|
1081 |
+
.wpr-animation-wrap-active .wpr-bg-anim-move-down,
|
1082 |
+
.wpr-animation-wrap:hover .wpr-bg-anim-move-down {
|
1083 |
+
-webkit-transform: scale(1.2) translateY(8%);
|
1084 |
+
-ms-transform: scale(1.2) translateY(8%);
|
1085 |
+
transform: scale(1.2) translateY(8%);
|
1086 |
+
}
|
1087 |
+
|
1088 |
+
|
1089 |
+
/* Border Animations*/
|
1090 |
+
|
1091 |
+
/* Layla */
|
1092 |
+
.wpr-border-anim-layla::before,
|
1093 |
+
.wpr-border-anim-layla::after {
|
1094 |
+
position: absolute;
|
1095 |
+
content: '';
|
1096 |
+
opacity: 0;
|
1097 |
+
-webkit-transition: opacity 0.35s, -webkit-transform 0.35s;
|
1098 |
+
transition: opacity 0.35s, -webkit-transform 0.35s;
|
1099 |
+
-o-transition: opacity 0.35s, transform 0.35s;
|
1100 |
+
transition: opacity 0.35s, transform 0.35s;
|
1101 |
+
transition: opacity 0.35s, transform 0.35s, -webkit-transform 0.35s;
|
1102 |
+
}
|
1103 |
+
|
1104 |
+
.wpr-border-anim-layla::before {
|
1105 |
+
-webkit-transform: scale(0,1);
|
1106 |
+
-ms-transform: scale(0,1);
|
1107 |
+
transform: scale(0,1);
|
1108 |
+
-webkit-transform-origin: 0 0;
|
1109 |
+
-ms-transform-origin: 0 0;
|
1110 |
+
transform-origin: 0 0;
|
1111 |
+
}
|
1112 |
+
|
1113 |
+
.wpr-border-anim-layla::after {
|
1114 |
+
-webkit-transform: scale(1,0);
|
1115 |
+
-ms-transform: scale(1,0);
|
1116 |
+
transform: scale(1,0);
|
1117 |
+
-webkit-transform-origin: 100% 0;
|
1118 |
+
-ms-transform-origin: 100% 0;
|
1119 |
+
transform-origin: 100% 0;
|
1120 |
+
}
|
1121 |
+
|
1122 |
+
.wpr-animation-wrap-active .wpr-border-anim-layla::before,
|
1123 |
+
.wpr-animation-wrap-active .wpr-border-anim-layla::after,
|
1124 |
+
.wpr-animation-wrap:hover .wpr-border-anim-layla::before,
|
1125 |
+
.wpr-animation-wrap:hover .wpr-border-anim-layla::after {
|
1126 |
+
opacity: 1;
|
1127 |
+
-webkit-transform: scale(1);
|
1128 |
+
-ms-transform: scale(1);
|
1129 |
+
transform: scale(1);
|
1130 |
+
}
|
1131 |
+
|
1132 |
+
.wpr-animation-wrap-active .wpr-border-anim-layla::after,
|
1133 |
+
.wpr-animation-wrap:hover .wpr-border-anim-layla::after {
|
1134 |
+
-webkit-transition-delay: 0.15s;
|
1135 |
+
-o-transition-delay: 0.15s;
|
1136 |
+
transition-delay: 0.15s;
|
1137 |
+
}
|
1138 |
+
|
1139 |
+
/* Oscar */
|
1140 |
+
.wpr-border-anim-oscar::before {
|
1141 |
+
position: absolute;
|
1142 |
+
content: '';
|
1143 |
+
opacity: 0;
|
1144 |
+
-webkit-transition: opacity 0.35s, -webkit-transform 0.35s;
|
1145 |
+
transition: opacity 0.35s, -webkit-transform 0.35s;
|
1146 |
+
-o-transition: opacity 0.35s, transform 0.35s;
|
1147 |
+
transition: opacity 0.35s, transform 0.35s;
|
1148 |
+
transition: opacity 0.35s, transform 0.35s, -webkit-transform 0.35s;
|
1149 |
+
-webkit-transform: scale(0.9);
|
1150 |
+
-ms-transform: scale(0.9);
|
1151 |
+
transform: scale(0.9);
|
1152 |
+
}
|
1153 |
+
|
1154 |
+
.wpr-animation-wrap-active .wpr-border-anim-oscar::before,
|
1155 |
+
.wpr-animation-wrap:hover .wpr-border-anim-oscar::before {
|
1156 |
+
opacity: 1;
|
1157 |
+
-webkit-transform: scale(1);
|
1158 |
+
-ms-transform: scale(1);
|
1159 |
+
transform: scale(1);
|
1160 |
+
}
|
1161 |
+
|
1162 |
+
/* Bubba */
|
1163 |
+
.wpr-border-anim-bubba::before,
|
1164 |
+
.wpr-border-anim-bubba::after {
|
1165 |
+
position: absolute;
|
1166 |
+
content: '';
|
1167 |
+
opacity: 0;
|
1168 |
+
-webkit-transition: opacity 0.35s, -webkit-transform 0.35s;
|
1169 |
+
transition: opacity 0.35s, -webkit-transform 0.35s;
|
1170 |
+
-o-transition: opacity 0.35s, transform 0.35s;
|
1171 |
+
transition: opacity 0.35s, transform 0.35s;
|
1172 |
+
transition: opacity 0.35s, transform 0.35s, -webkit-transform 0.35s;
|
1173 |
+
}
|
1174 |
+
|
1175 |
+
.wpr-border-anim-bubba::before {
|
1176 |
+
-webkit-transform: scale(0,1);
|
1177 |
+
-ms-transform: scale(0,1);
|
1178 |
+
transform: scale(0,1);
|
1179 |
+
}
|
1180 |
+
|
1181 |
+
.wpr-border-anim-bubba::after {
|
1182 |
+
-webkit-transform: scale(1,0);
|
1183 |
+
-ms-transform: scale(1,0);
|
1184 |
+
transform: scale(1,0);
|
1185 |
+
}
|
1186 |
+
|
1187 |
+
.wpr-animation-wrap-active .wpr-border-anim-bubba::before,
|
1188 |
+
.wpr-animation-wrap-active .wpr-border-anim-bubba::after,
|
1189 |
+
.wpr-animation-wrap:hover .wpr-border-anim-bubba::before,
|
1190 |
+
.wpr-animation-wrap:hover .wpr-border-anim-bubba::after {
|
1191 |
+
opacity: 1;
|
1192 |
+
-webkit-transform: scale(1);
|
1193 |
+
-ms-transform: scale(1);
|
1194 |
+
transform: scale(1);
|
1195 |
+
}
|
1196 |
+
|
1197 |
+
/* Romeo */
|
1198 |
+
.wpr-border-anim-romeo::before,
|
1199 |
+
.wpr-border-anim-romeo::after {
|
1200 |
+
position: absolute;
|
1201 |
+
top: 50%;
|
1202 |
+
left: 50%;
|
1203 |
+
width: 80%;
|
1204 |
+
content: '';
|
1205 |
+
opacity: 0;
|
1206 |
+
-webkit-transition: opacity 0.35s, -webkit-transform 0.35s;
|
1207 |
+
transition: opacity 0.35s, -webkit-transform 0.35s;
|
1208 |
+
-o-transition: opacity 0.35s, transform 0.35s;
|
1209 |
+
transition: opacity 0.35s, transform 0.35s;
|
1210 |
+
transition: opacity 0.35s, transform 0.35s, -webkit-transform 0.35s;
|
1211 |
+
-webkit-transform: translate3d(-50%,-50%,0);
|
1212 |
+
transform: translate3d(-50%,-50%,0);
|
1213 |
+
}
|
1214 |
+
|
1215 |
+
.wpr-animation-wrap-active .wpr-border-anim-romeo::before,
|
1216 |
+
.wpr-animation-wrap:hover .wpr-border-anim-romeo::before {
|
1217 |
+
opacity: 1;
|
1218 |
+
-webkit-transform: translate3d(-50%,-50%,0) rotate(45deg);
|
1219 |
+
transform: translate3d(-50%,-50%,0) rotate(45deg);
|
1220 |
+
}
|
1221 |
+
|
1222 |
+
.wpr-animation-wrap-active .wpr-border-anim-romeo::after,
|
1223 |
+
.wpr-animation-wrap:hover .wpr-border-anim-romeo::after {
|
1224 |
+
opacity: 1;
|
1225 |
+
-webkit-transform: translate3d(-50%,-50%,0) rotate(-45deg);
|
1226 |
+
transform: translate3d(-50%,-50%,0) rotate(-45deg);
|
1227 |
+
}
|
1228 |
+
|
1229 |
+
/* Chicho */
|
1230 |
+
.wpr-border-anim-chicho::before {
|
1231 |
+
position: absolute;
|
1232 |
+
content: '';
|
1233 |
+
-webkit-transform: scale(1.1);
|
1234 |
+
-ms-transform: scale(1.1);
|
1235 |
+
transform: scale(1.1);
|
1236 |
+
opacity: 0;
|
1237 |
+
-webkit-transition: opacity 0.35s, -webkit-transform 0.35s;
|
1238 |
+
transition: opacity 0.35s, -webkit-transform 0.35s;
|
1239 |
+
-o-transition: opacity 0.35s, transform 0.35s;
|
1240 |
+
transition: opacity 0.35s, transform 0.35s;
|
1241 |
+
transition: opacity 0.35s, transform 0.35s, -webkit-transform 0.35s;
|
1242 |
+
}
|
1243 |
+
|
1244 |
+
.wpr-animation-wrap-active .wpr-border-anim-chicho::before,
|
1245 |
+
.wpr-animation-wrap:hover .wpr-border-anim-chicho::before {
|
1246 |
+
opacity: 1;
|
1247 |
+
-webkit-transform: scale(1);
|
1248 |
+
-ms-transform: scale(1);
|
1249 |
+
transform: scale(1);
|
1250 |
+
}
|
1251 |
+
|
1252 |
+
/* Apollo */
|
1253 |
+
.wpr-border-anim-apollo::before {
|
1254 |
+
position: absolute;
|
1255 |
+
top: 0;
|
1256 |
+
left: 0;
|
1257 |
+
width: 100%;
|
1258 |
+
height: 100%;
|
1259 |
+
content: '';
|
1260 |
+
-webkit-transition: -webkit-transform 0.6s;
|
1261 |
+
transition: -webkit-transform 0.6s;
|
1262 |
+
-o-transition: transform 0.6s;
|
1263 |
+
transition: transform 0.6s;
|
1264 |
+
transition: transform 0.6s, -webkit-transform 0.6s;
|
1265 |
+
-webkit-transform: scale3d(2.9,2.4,1) rotate3d(0,0,1,45deg) translate3d(0,-100%,0);
|
1266 |
+
transform: scale3d(2.9,2.4,1) rotate3d(0,0,1,45deg) translate3d(0,-100%,0);
|
1267 |
+
}
|
1268 |
+
|
1269 |
+
.wpr-animation-wrap-active .wpr-border-anim-apollo::before,
|
1270 |
+
.wpr-animation-wrap:hover .wpr-border-anim-apollo::before {
|
1271 |
+
-webkit-transform: scale3d(2.9,2.4,1) rotate3d(0,0,1,45deg) translate3d(0,100%,0);
|
1272 |
+
transform: scale3d(2.9,2.4,1) rotate3d(0,0,1,45deg) translate3d(0,100%,0);
|
1273 |
+
}
|
1274 |
+
|
1275 |
+
/* Jazz */
|
1276 |
+
.wpr-border-anim-jazz::after {
|
1277 |
+
-webkit-transition: opacity 0.35s, -webkit-transform 0.35s;
|
1278 |
+
transition: opacity 0.35s, -webkit-transform 0.35s;
|
1279 |
+
-o-transition: opacity 0.35s, transform 0.35s;
|
1280 |
+
transition: opacity 0.35s, transform 0.35s;
|
1281 |
+
transition: opacity 0.35s, transform 0.35s, -webkit-transform 0.35s;
|
1282 |
+
position: absolute;
|
1283 |
+
top: 0;
|
1284 |
+
left: 0;
|
1285 |
+
width: 100%;
|
1286 |
+
height: 100%;
|
1287 |
+
content: '';
|
1288 |
+
opacity: 0;
|
1289 |
+
-webkit-transform: rotate3d(0,0,1,45deg) scale3d(1,0,1);
|
1290 |
+
transform: rotate3d(0,0,1,45deg) scale3d(1,0,1);
|
1291 |
+
-webkit-transform-origin: 50% 50%;
|
1292 |
+
-ms-transform-origin: 50% 50%;
|
1293 |
+
transform-origin: 50% 50%;
|
1294 |
+
}
|
1295 |
+
|
1296 |
+
.wpr-animation-wrap-active .wpr-border-anim-jazz::after,
|
1297 |
+
.wpr-animation-wrap:hover .wpr-border-anim-jazz::after {
|
1298 |
+
opacity: 1;
|
1299 |
+
-webkit-transform: rotate3d(0,0,1,45deg) scale3d(1,1,1);
|
1300 |
+
transform: rotate3d(0,0,1,45deg) scale3d(1,1,1);
|
1301 |
}
|
assets/css/lib/animations/wpr-link-animations.css
CHANGED
@@ -1,192 +1,192 @@
|
|
1 |
-
/*!
|
2 |
-
* WPR Link Animations
|
3 |
-
* Version: 1.0
|
4 |
-
* Author: WP Royal
|
5 |
-
* Author URL: https://royal-elementor-addons.com/
|
6 |
-
|
7 |
-
* WPR Animations Copyright WP Royal 2020.
|
8 |
-
*/
|
9 |
-
|
10 |
-
.wpr-pointer-item {
|
11 |
-
position: relative;
|
12 |
-
}
|
13 |
-
|
14 |
-
.wpr-pointer-double-line .wpr-pointer-item:before,
|
15 |
-
.wpr-pointer-double-line .wpr-pointer-item:after,
|
16 |
-
.wpr-pointer-underline .wpr-pointer-item:after,
|
17 |
-
.wpr-pointer-overline .wpr-pointer-item:before {
|
18 |
-
content: '';
|
19 |
-
display: block;
|
20 |
-
height: 4px;
|
21 |
-
width: 100%;
|
22 |
-
left: 0;
|
23 |
-
background-color: #55595c;
|
24 |
-
z-index: 2;
|
25 |
-
}
|
26 |
-
|
27 |
-
|
28 |
-
.wpr-pointer-fx-none .wpr-pointer-item:before,
|
29 |
-
.wpr-pointer-fx-none .wpr-pointer-item:after {
|
30 |
-
opacity: 0;
|
31 |
-
-webkit-transition: none !important;
|
32 |
-
-o-transition: none !important;
|
33 |
-
transition: none !important;
|
34 |
-
}
|
35 |
-
|
36 |
-
.wpr-pointer-fx-none .wpr-pointer-item:hover:before,
|
37 |
-
.wpr-pointer-fx-none .wpr-pointer-item:hover:after {
|
38 |
-
opacity: 1;
|
39 |
-
}
|
40 |
-
|
41 |
-
.wpr-pointer-fx-fade .wpr-pointer-item:before,
|
42 |
-
.wpr-pointer-line-fx.wpr-pointer-fx-fade .wpr-pointer-item:after,
|
43 |
-
.wpr-pointer-line-fx.wpr-pointer-fx-grow .wpr-pointer-item:before,
|
44 |
-
.wpr-pointer-line-fx.wpr-pointer-fx-grow .wpr-pointer-item:after,
|
45 |
-
.wpr-pointer-line-fx.wpr-pointer-fx-drop .wpr-pointer-item:before,
|
46 |
-
.wpr-pointer-line-fx.wpr-pointer-fx-drop .wpr-pointer-item:after {
|
47 |
-
opacity: 0;
|
48 |
-
-webkit-transition: all 0.3s;
|
49 |
-
-o-transition: all 0.3s;
|
50 |
-
transition: all 0.3s;
|
51 |
-
}
|
52 |
-
|
53 |
-
.wpr-pointer-line-fx.wpr-pointer-fx-fade .wpr-pointer-item:hover:before,
|
54 |
-
.wpr-pointer-line-fx.wpr-pointer-fx-fade .wpr-pointer-item:hover:after {
|
55 |
-
opacity: 1;
|
56 |
-
}
|
57 |
-
|
58 |
-
.wpr-pointer-line-fx.wpr-pointer-fx-slide .wpr-pointer-item:before,
|
59 |
-
.wpr-pointer-line-fx.wpr-pointer-fx-slide .wpr-pointer-item:after {
|
60 |
-
width: 0;
|
61 |
-
-webkit-transition: all .3s cubic-bezier(.175,.885,.32,1.075);
|
62 |
-
-o-transition: all .3s cubic-bezier(.175,.885,.32,1.075);
|
63 |
-
transition: all .3s cubic-bezier(.175,.885,.32,1.075);
|
64 |
-
}
|
65 |
-
|
66 |
-
.wpr-pointer-line-fx.wpr-pointer-fx-slide .wpr-pointer-item:hover:before,
|
67 |
-
.wpr-pointer-line-fx.wpr-pointer-fx-slide .wpr-pointer-item:hover:after {
|
68 |
-
width: 100%;
|
69 |
-
}
|
70 |
-
|
71 |
-
.wpr-pointer-line-fx.wpr-pointer-fx-grow .wpr-pointer-item:before,
|
72 |
-
.wpr-pointer-line-fx.wpr-pointer-fx-grow .wpr-pointer-item:after {
|
73 |
-
position: absolute;
|
74 |
-
width: 0;
|
75 |
-
margin: 0 auto;
|
76 |
-
left: 0;
|
77 |
-
right: 0;
|
78 |
-
-webkit-transition: all .3s cubic-bezier(0, 0, 0.16, 0.95);
|
79 |
-
-o-transition: all .3s cubic-bezier(0, 0, 0.16, 0.95);
|
80 |
-
-webkit-transition: all .3s ease(0, 0, 0.16, 0.95);
|
81 |
-
-o-transition: all .3s ease(0, 0, 0.16, 0.95);
|
82 |
-
transition: all .3s ease(0, 0, 0.16, 0.95);
|
83 |
-
}
|
84 |
-
|
85 |
-
.wpr-pointer-line-fx.wpr-pointer-fx-grow .wpr-pointer-item:hover:before,
|
86 |
-
.wpr-pointer-line-fx.wpr-pointer-fx-grow .wpr-pointer-item:hover:after {
|
87 |
-
opacity: 1;
|
88 |
-
width: 100%;
|
89 |
-
}
|
90 |
-
|
91 |
-
.wpr-pointer-line-fx.wpr-pointer-fx-drop .wpr-pointer-item:before {
|
92 |
-
position: absolute;
|
93 |
-
top: -10px;
|
94 |
-
}
|
95 |
-
|
96 |
-
.wpr-pointer-line-fx.wpr-pointer-fx-drop .wpr-pointer-item:hover:before {
|
97 |
-
top: 0;
|
98 |
-
opacity: 1;
|
99 |
-
}
|
100 |
-
|
101 |
-
.wpr-pointer-line-fx.wpr-pointer-fx-drop .wpr-pointer-item:after {
|
102 |
-
position: absolute;
|
103 |
-
bottom: -10px;
|
104 |
-
}
|
105 |
-
|
106 |
-
.wpr-pointer-line-fx.wpr-pointer-fx-drop .wpr-pointer-item:hover:after {
|
107 |
-
bottom: 0;
|
108 |
-
opacity: 1;
|
109 |
-
}
|
110 |
-
|
111 |
-
.wpr-pointer-border-fx .wpr-pointer-item:before {
|
112 |
-
content: '';
|
113 |
-
display: block;
|
114 |
-
position: absolute;
|
115 |
-
top: 0;
|
116 |
-
right: 0;
|
117 |
-
bottom: 0;
|
118 |
-
left: 0;
|
119 |
-
z-index: 2;
|
120 |
-
opacity: 0;
|
121 |
-
border: 2px solid #000;
|
122 |
-
-webkit-transition: all 0.3s;
|
123 |
-
-o-transition: all 0.3s;
|
124 |
-
transition: all 0.3s;
|
125 |
-
}
|
126 |
-
|
127 |
-
.wpr-pointer-border-fx .wpr-pointer-item:hover:before {
|
128 |
-
opacity: 1;
|
129 |
-
}
|
130 |
-
|
131 |
-
.wpr-pointer-border-fx.wpr-pointer-fx-grow .wpr-pointer-item:before,
|
132 |
-
.wpr-pointer-background-fx.wpr-pointer-fx-grow .wpr-pointer-item:before {
|
133 |
-
-webkit-transform: scale(0.9);
|
134 |
-
-ms-transform: scale(0.9);
|
135 |
-
transform: scale(0.9);
|
136 |
-
}
|
137 |
-
|
138 |
-
.wpr-pointer-border-fx.wpr-pointer-fx-shrink .wpr-pointer-item:before,
|
139 |
-
.wpr-pointer-background-fx.wpr-pointer-fx-shrink .wpr-pointer-item:before {
|
140 |
-
-webkit-transform: scale(1.1);
|
141 |
-
-ms-transform: scale(1.1);
|
142 |
-
transform: scale(1.1);
|
143 |
-
}
|
144 |
-
|
145 |
-
.wpr-pointer-border-fx.wpr-pointer-fx-grow .wpr-pointer-item:hover:before,
|
146 |
-
.wpr-pointer-border-fx.wpr-pointer-fx-shrink .wpr-pointer-item:hover:before,
|
147 |
-
.wpr-pointer-background-fx.wpr-pointer-fx-grow .wpr-pointer-item:hover:before,
|
148 |
-
.wpr-pointer-background-fx.wpr-pointer-fx-shrink .wpr-pointer-item:hover:before,
|
149 |
-
.wpr-pointer-background-fx.wpr-pointer-fx-sweep .wpr-pointer-item:hover:before {
|
150 |
-
-webkit-transform: scale(1);
|
151 |
-
-ms-transform: scale(1);
|
152 |
-
transform: scale(1);
|
153 |
-
}
|
154 |
-
|
155 |
-
.wpr-pointer-background-fx .wpr-pointer-item:before {
|
156 |
-
content: '';
|
157 |
-
display: block;
|
158 |
-
position: absolute;
|
159 |
-
top: 0;
|
160 |
-
right: 0;
|
161 |
-
bottom: 0;
|
162 |
-
left: 0;
|
163 |
-
z-index: -1;
|
164 |
-
opacity: 0;
|
165 |
-
background: #000;
|
166 |
-
-webkit-transition: all 0.3s;
|
167 |
-
-o-transition: all 0.3s;
|
168 |
-
transition: all 0.3s;
|
169 |
-
}
|
170 |
-
|
171 |
-
.wpr-pointer-background-fx .wpr-pointer-item:hover:before {
|
172 |
-
opacity: 1;
|
173 |
-
}
|
174 |
-
|
175 |
-
.wpr-pointer-background-fx.wpr-pointer-fx-sweep .wpr-pointer-item:before {
|
176 |
-
-webkit-transform: translateY(-12%);
|
177 |
-
-ms-transform: translateY(-12%);
|
178 |
-
transform: translateY(-12%);
|
179 |
-
}
|
180 |
-
|
181 |
-
.wpr-pointer-background-fx.wpr-pointer-fx-skew .wpr-pointer-item:before {
|
182 |
-
-webkit-transform: perspective(600px) rotateX(90deg);
|
183 |
-
transform: perspective(600px) rotateX(90deg);
|
184 |
-
-webkit-transform-origin: center bottom 0;
|
185 |
-
-ms-transform-origin: center bottom 0;
|
186 |
-
transform-origin: center bottom 0;
|
187 |
-
}
|
188 |
-
|
189 |
-
.wpr-pointer-background-fx.wpr-pointer-fx-skew .wpr-pointer-item:hover:before {
|
190 |
-
-webkit-transform: perspective(600px) rotateX(0deg);
|
191 |
-
transform: perspective(600px) rotateX(0deg);
|
192 |
}
|
1 |
+
/*!
|
2 |
+
* WPR Link Animations
|
3 |
+
* Version: 1.0
|
4 |
+
* Author: WP Royal
|
5 |
+
* Author URL: https://royal-elementor-addons.com/
|
6 |
+
|
7 |
+
* WPR Animations Copyright WP Royal 2020.
|
8 |
+
*/
|
9 |
+
|
10 |
+
.wpr-pointer-item {
|
11 |
+
position: relative;
|
12 |
+
}
|
13 |
+
|
14 |
+
.wpr-pointer-double-line .wpr-pointer-item:before,
|
15 |
+
.wpr-pointer-double-line .wpr-pointer-item:after,
|
16 |
+
.wpr-pointer-underline .wpr-pointer-item:after,
|
17 |
+
.wpr-pointer-overline .wpr-pointer-item:before {
|
18 |
+
content: '';
|
19 |
+
display: block;
|
20 |
+
height: 4px;
|
21 |
+
width: 100%;
|
22 |
+
left: 0;
|
23 |
+
background-color: #55595c;
|
24 |
+
z-index: 2;
|
25 |
+
}
|
26 |
+
|
27 |
+
|
28 |
+
.wpr-pointer-fx-none .wpr-pointer-item:before,
|
29 |
+
.wpr-pointer-fx-none .wpr-pointer-item:after {
|
30 |
+
opacity: 0;
|
31 |
+
-webkit-transition: none !important;
|
32 |
+
-o-transition: none !important;
|
33 |
+
transition: none !important;
|
34 |
+
}
|
35 |
+
|
36 |
+
.wpr-pointer-fx-none .wpr-pointer-item:hover:before,
|
37 |
+
.wpr-pointer-fx-none .wpr-pointer-item:hover:after {
|
38 |
+
opacity: 1;
|
39 |
+
}
|
40 |
+
|
41 |
+
.wpr-pointer-fx-fade .wpr-pointer-item:before,
|
42 |
+
.wpr-pointer-line-fx.wpr-pointer-fx-fade .wpr-pointer-item:after,
|
43 |
+
.wpr-pointer-line-fx.wpr-pointer-fx-grow .wpr-pointer-item:before,
|
44 |
+
.wpr-pointer-line-fx.wpr-pointer-fx-grow .wpr-pointer-item:after,
|
45 |
+
.wpr-pointer-line-fx.wpr-pointer-fx-drop .wpr-pointer-item:before,
|
46 |
+
.wpr-pointer-line-fx.wpr-pointer-fx-drop .wpr-pointer-item:after {
|
47 |
+
opacity: 0;
|
48 |
+
-webkit-transition: all 0.3s;
|
49 |
+
-o-transition: all 0.3s;
|
50 |
+
transition: all 0.3s;
|
51 |
+
}
|
52 |
+
|
53 |
+
.wpr-pointer-line-fx.wpr-pointer-fx-fade .wpr-pointer-item:hover:before,
|
54 |
+
.wpr-pointer-line-fx.wpr-pointer-fx-fade .wpr-pointer-item:hover:after {
|
55 |
+
opacity: 1;
|
56 |
+
}
|
57 |
+
|
58 |
+
.wpr-pointer-line-fx.wpr-pointer-fx-slide .wpr-pointer-item:before,
|
59 |
+
.wpr-pointer-line-fx.wpr-pointer-fx-slide .wpr-pointer-item:after {
|
60 |
+
width: 0;
|
61 |
+
-webkit-transition: all .3s cubic-bezier(.175,.885,.32,1.075);
|
62 |
+
-o-transition: all .3s cubic-bezier(.175,.885,.32,1.075);
|
63 |
+
transition: all .3s cubic-bezier(.175,.885,.32,1.075);
|
64 |
+
}
|
65 |
+
|
66 |
+
.wpr-pointer-line-fx.wpr-pointer-fx-slide .wpr-pointer-item:hover:before,
|
67 |
+
.wpr-pointer-line-fx.wpr-pointer-fx-slide .wpr-pointer-item:hover:after {
|
68 |
+
width: 100%;
|
69 |
+
}
|
70 |
+
|
71 |
+
.wpr-pointer-line-fx.wpr-pointer-fx-grow .wpr-pointer-item:before,
|
72 |
+
.wpr-pointer-line-fx.wpr-pointer-fx-grow .wpr-pointer-item:after {
|
73 |
+
position: absolute;
|
74 |
+
width: 0;
|
75 |
+
margin: 0 auto;
|
76 |
+
left: 0;
|
77 |
+
right: 0;
|
78 |
+
-webkit-transition: all .3s cubic-bezier(0, 0, 0.16, 0.95);
|
79 |
+
-o-transition: all .3s cubic-bezier(0, 0, 0.16, 0.95);
|
80 |
+
-webkit-transition: all .3s ease(0, 0, 0.16, 0.95);
|
81 |
+
-o-transition: all .3s ease(0, 0, 0.16, 0.95);
|
82 |
+
transition: all .3s ease(0, 0, 0.16, 0.95);
|
83 |
+
}
|
84 |
+
|
85 |
+
.wpr-pointer-line-fx.wpr-pointer-fx-grow .wpr-pointer-item:hover:before,
|
86 |
+
.wpr-pointer-line-fx.wpr-pointer-fx-grow .wpr-pointer-item:hover:after {
|
87 |
+
opacity: 1;
|
88 |
+
width: 100%;
|
89 |
+
}
|
90 |
+
|
91 |
+
.wpr-pointer-line-fx.wpr-pointer-fx-drop .wpr-pointer-item:before {
|
92 |
+
position: absolute;
|
93 |
+
top: -10px;
|
94 |
+
}
|
95 |
+
|
96 |
+
.wpr-pointer-line-fx.wpr-pointer-fx-drop .wpr-pointer-item:hover:before {
|
97 |
+
top: 0;
|
98 |
+
opacity: 1;
|
99 |
+
}
|
100 |
+
|
101 |
+
.wpr-pointer-line-fx.wpr-pointer-fx-drop .wpr-pointer-item:after {
|
102 |
+
position: absolute;
|
103 |
+
bottom: -10px;
|
104 |
+
}
|
105 |
+
|
106 |
+
.wpr-pointer-line-fx.wpr-pointer-fx-drop .wpr-pointer-item:hover:after {
|
107 |
+
bottom: 0;
|
108 |
+
opacity: 1;
|
109 |
+
}
|
110 |
+
|
111 |
+
.wpr-pointer-border-fx .wpr-pointer-item:before {
|
112 |
+
content: '';
|
113 |
+
display: block;
|
114 |
+
position: absolute;
|
115 |
+
top: 0;
|
116 |
+
right: 0;
|
117 |
+
bottom: 0;
|
118 |
+
left: 0;
|
119 |
+
z-index: 2;
|
120 |
+
opacity: 0;
|
121 |
+
border: 2px solid #000;
|
122 |
+
-webkit-transition: all 0.3s;
|
123 |
+
-o-transition: all 0.3s;
|
124 |
+
transition: all 0.3s;
|
125 |
+
}
|
126 |
+
|
127 |
+
.wpr-pointer-border-fx .wpr-pointer-item:hover:before {
|
128 |
+
opacity: 1;
|
129 |
+
}
|
130 |
+
|
131 |
+
.wpr-pointer-border-fx.wpr-pointer-fx-grow .wpr-pointer-item:before,
|
132 |
+
.wpr-pointer-background-fx.wpr-pointer-fx-grow .wpr-pointer-item:before {
|
133 |
+
-webkit-transform: scale(0.9);
|
134 |
+
-ms-transform: scale(0.9);
|
135 |
+
transform: scale(0.9);
|
136 |
+
}
|
137 |
+
|
138 |
+
.wpr-pointer-border-fx.wpr-pointer-fx-shrink .wpr-pointer-item:before,
|
139 |
+
.wpr-pointer-background-fx.wpr-pointer-fx-shrink .wpr-pointer-item:before {
|
140 |
+
-webkit-transform: scale(1.1);
|
141 |
+
-ms-transform: scale(1.1);
|
142 |
+
transform: scale(1.1);
|
143 |
+
}
|
144 |
+
|
145 |
+
.wpr-pointer-border-fx.wpr-pointer-fx-grow .wpr-pointer-item:hover:before,
|
146 |
+
.wpr-pointer-border-fx.wpr-pointer-fx-shrink .wpr-pointer-item:hover:before,
|
147 |
+
.wpr-pointer-background-fx.wpr-pointer-fx-grow .wpr-pointer-item:hover:before,
|
148 |
+
.wpr-pointer-background-fx.wpr-pointer-fx-shrink .wpr-pointer-item:hover:before,
|
149 |
+
.wpr-pointer-background-fx.wpr-pointer-fx-sweep .wpr-pointer-item:hover:before {
|
150 |
+
-webkit-transform: scale(1);
|
151 |
+
-ms-transform: scale(1);
|
152 |
+
transform: scale(1);
|
153 |
+
}
|
154 |
+
|
155 |
+
.wpr-pointer-background-fx .wpr-pointer-item:before {
|
156 |
+
content: '';
|
157 |
+
display: block;
|
158 |
+
position: absolute;
|
159 |
+
top: 0;
|
160 |
+
right: 0;
|
161 |
+
bottom: 0;
|
162 |
+
left: 0;
|
163 |
+
z-index: -1;
|
164 |
+
opacity: 0;
|
165 |
+
background: #000;
|
166 |
+
-webkit-transition: all 0.3s;
|
167 |
+
-o-transition: all 0.3s;
|
168 |
+
transition: all 0.3s;
|
169 |
+
}
|
170 |
+
|
171 |
+
.wpr-pointer-background-fx .wpr-pointer-item:hover:before {
|
172 |
+
opacity: 1;
|
173 |
+
}
|
174 |
+
|
175 |
+
.wpr-pointer-background-fx.wpr-pointer-fx-sweep .wpr-pointer-item:before {
|
176 |
+
-webkit-transform: translateY(-12%);
|
177 |
+
-ms-transform: translateY(-12%);
|
178 |
+
transform: translateY(-12%);
|
179 |
+
}
|
180 |
+
|
181 |
+
.wpr-pointer-background-fx.wpr-pointer-fx-skew .wpr-pointer-item:before {
|
182 |
+
-webkit-transform: perspective(600px) rotateX(90deg);
|
183 |
+
transform: perspective(600px) rotateX(90deg);
|
184 |
+
-webkit-transform-origin: center bottom 0;
|
185 |
+
-ms-transform-origin: center bottom 0;
|
186 |
+
transform-origin: center bottom 0;
|
187 |
+
}
|
188 |
+
|
189 |
+
.wpr-pointer-background-fx.wpr-pointer-fx-skew .wpr-pointer-item:hover:before {
|
190 |
+
-webkit-transform: perspective(600px) rotateX(0deg);
|
191 |
+
transform: perspective(600px) rotateX(0deg);
|
192 |
}
|
assets/css/library-frontend.css
CHANGED
@@ -1,709 +1,709 @@
|
|
1 |
-
/*--------------------------------------------------------------
|
2 |
-
== Library - Predefined Styles
|
3 |
-
--------------------------------------------------------------*/
|
4 |
-
#wpr-library-btn {
|
5 |
-
display: -webkit-inline-box;
|
6 |
-
display: -ms-inline-flexbox;
|
7 |
-
display: inline-flex;
|
8 |
-
width: 40px;
|
9 |
-
height: 40px;
|
10 |
-
vertical-align: top;
|
11 |
-
margin-left: 10px;
|
12 |
-
color: #fff;
|
13 |
-
font-family: Arial,Helvetica,sans-serif;
|
14 |
-
font-weight: bold;
|
15 |
-
letter-spacing: 0.3px;
|
16 |
-
cursor: pointer;
|
17 |
-
}
|
18 |
-
|
19 |
-
.wpr-library-icon {
|
20 |
-
display: -webkit-inline-box;
|
21 |
-
display: -ms-inline-flexbox;
|
22 |
-
display: inline-flex;
|
23 |
-
padding: 10px;
|
24 |
-
margin-right: 10px;
|
25 |
-
border-radius: 50%;
|
26 |
-
color: transparent;
|
27 |
-
font-family: Arial,Helvetica,sans-serif;
|
28 |
-
font-size: 14px;
|
29 |
-
font-weight: bold;
|
30 |
-
letter-spacing: 0.3px;
|
31 |
-
}
|
32 |
-
|
33 |
-
.wpr-tplib-popup-overlay {
|
34 |
-
position: fixed;
|
35 |
-
top: 0;
|
36 |
-
left: 0;
|
37 |
-
z-index: 999999;
|
38 |
-
width: 100%;
|
39 |
-
height: 100%;
|
40 |
-
background: rgba(0,0,0,0.5);
|
41 |
-
}
|
42 |
-
|
43 |
-
.wpr-tplib-popup {
|
44 |
-
overflow: hidden;
|
45 |
-
position: absolute;
|
46 |
-
top: 30%;
|
47 |
-
left: 50%;
|
48 |
-
-webkit-transform: translate(-50%,-30%);
|
49 |
-
-ms-transform: translate(-50%,-30%);
|
50 |
-
transform: translate(-50%,-30%);
|
51 |
-
background: #f1f3f5;
|
52 |
-
min-width: 100%;
|
53 |
-
height: 100%;
|
54 |
-
}
|
55 |
-
|
56 |
-
.wpr-tplib-header {
|
57 |
-
display: -webkit-box;
|
58 |
-
display: -ms-flexbox;
|
59 |
-
display: flex;
|
60 |
-
-webkit-box-align: center;
|
61 |
-
-ms-flex-align: center;
|
62 |
-
align-items: center;
|
63 |
-
background-color: #fff;
|
64 |
-
-webkit-box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
|
65 |
-
box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
|
66 |
-
position: relative;
|
67 |
-
z-index: 10;
|
68 |
-
}
|
69 |
-
|
70 |
-
.wpr-tplib-logo {
|
71 |
-
display: -webkit-box;
|
72 |
-
display: -ms-flexbox;
|
73 |
-
display: flex;
|
74 |
-
-webkit-box-align: center;
|
75 |
-
-ms-flex-align: center;
|
76 |
-
align-items: center;
|
77 |
-
-webkit-box-pack: start;
|
78 |
-
-ms-flex-pack: start;
|
79 |
-
justify-content: flex-start;
|
80 |
-
width: 200px;
|
81 |
-
padding-left: 30px;
|
82 |
-
color: #495157;
|
83 |
-
font-size: 15px;
|
84 |
-
font-weight: 700;
|
85 |
-
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
|
86 |
-
}
|
87 |
-
|
88 |
-
.wpr-tplib-header ul {
|
89 |
-
display: -webkit-inline-box;
|
90 |
-
display: -ms-inline-flexbox;
|
91 |
-
display: inline-flex;
|
92 |
-
-webkit-box-pack: center;
|
93 |
-
-ms-flex-pack: center;
|
94 |
-
justify-content: center;
|
95 |
-
width: 100%;
|
96 |
-
margin-left: -130px;
|
97 |
-
list-style: none;
|
98 |
-
}
|
99 |
-
|
100 |
-
.wpr-tplib-header ul li {
|
101 |
-
width: 115px;
|
102 |
-
padding: 20px 0;
|
103 |
-
color: #6d7882;
|
104 |
-
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
|
105 |
-
font-size: 14px;
|
106 |
-
line-height: 1;
|
107 |
-
font-weight: 500;
|
108 |
-
text-align: center;
|
109 |
-
cursor: pointer;
|
110 |
-
|
111 |
-
}
|
112 |
-
|
113 |
-
.wpr-tplib-active-tab {
|
114 |
-
background-image: -o-linear-gradient(top,#f1f3f5,#fff);
|
115 |
-
background-image: -webkit-gradient(linear,left top, left bottom,from(#f1f3f5),to(#fff));
|
116 |
-
background-image: linear-gradient(180deg,#f1f3f5,#fff);
|
117 |
-
border-bottom: 3px solid #6A4BFF;
|
118 |
-
}
|
119 |
-
|
120 |
-
.wpr-tplib-close {
|
121 |
-
display: -webkit-box;
|
122 |
-
display: -ms-flexbox;
|
123 |
-
display: flex;
|
124 |
-
-webkit-box-align: center;
|
125 |
-
-ms-flex-align: center;
|
126 |
-
align-items: center;
|
127 |
-
-webkit-box-pack: end;
|
128 |
-
-ms-flex-pack: end;
|
129 |
-
justify-content: flex-end;
|
130 |
-
padding-right: 30px;
|
131 |
-
color: #a4afb7;
|
132 |
-
font-size: 18px;
|
133 |
-
cursor: pointer;
|
134 |
-
-webkit-transition: all .3s;
|
135 |
-
-o-transition: all .3s;
|
136 |
-
transition: all .3s;
|
137 |
-
}
|
138 |
-
|
139 |
-
.wpr-tplib-close:hover {
|
140 |
-
color: #3a3a3a;
|
141 |
-
}
|
142 |
-
|
143 |
-
.wpr-tplib-close i {
|
144 |
-
line-height: 20px;
|
145 |
-
padding-left: 20px;
|
146 |
-
}
|
147 |
-
|
148 |
-
.wpr-tplib-popup h3 {
|
149 |
-
margin: 0;
|
150 |
-
}
|
151 |
-
|
152 |
-
.wpr-tplib-header .wpr-tplib-insert-template {
|
153 |
-
display: none;
|
154 |
-
width: 120px;
|
155 |
-
height: 27px;
|
156 |
-
line-height: 27px;
|
157 |
-
padding: 0 15px;
|
158 |
-
margin-right: 15px;
|
159 |
-
color: #fff;
|
160 |
-
background-color: #6A4BFF;
|
161 |
-
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
|
162 |
-
font-size: 13px;
|
163 |
-
border-radius: 2px;
|
164 |
-
text-transform: uppercase;
|
165 |
-
cursor: pointer;
|
166 |
-
text-align: center;
|
167 |
-
}
|
168 |
-
|
169 |
-
.wpr-tplib-back {
|
170 |
-
display: none;
|
171 |
-
width: 230px;
|
172 |
-
padding: 17px 15px;
|
173 |
-
border-right: 1px solid #e6e9ec;
|
174 |
-
color: #6d7882;
|
175 |
-
font-size: 15px;
|
176 |
-
font-weight: 700;
|
177 |
-
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
|
178 |
-
cursor: pointer;
|
179 |
-
-webkit-transition: all .3s;
|
180 |
-
-o-transition: all .3s;
|
181 |
-
transition: all .3s;
|
182 |
-
}
|
183 |
-
|
184 |
-
.wpr-tplib-back:hover {
|
185 |
-
color: #495157;
|
186 |
-
}
|
187 |
-
|
188 |
-
.wpr-tplib-back i {
|
189 |
-
margin-right: 5px;
|
190 |
-
}
|
191 |
-
|
192 |
-
.wpr-tplib-back span {
|
193 |
-
|
194 |
-
}
|
195 |
-
|
196 |
-
.wpr-tplib-content-wrap {
|
197 |
-
}
|
198 |
-
|
199 |
-
.wpr-tplib-sidebar {
|
200 |
-
padding: 30px 30px 20px 30px;
|
201 |
-
}
|
202 |
-
|
203 |
-
.wpr-tplib-sidebar .wpr-tplib-search {
|
204 |
-
display: none;
|
205 |
-
position: relative;
|
206 |
-
margin: 30px 0;
|
207 |
-
}
|
208 |
-
|
209 |
-
.wpr-tplib-sidebar .wpr-tplib-search i {
|
210 |
-
position: absolute;
|
211 |
-
top: 50%;
|
212 |
-
right: 10px;
|
213 |
-
font-size: 12px;
|
214 |
-
-webkit-transform: translateY(-50%);
|
215 |
-
-ms-transform: translateY(-50%);
|
216 |
-
transform: translateY(-50%);
|
217 |
-
}
|
218 |
-
|
219 |
-
.wpr-tplib-sidebar .wpr-tplib-search input {
|
220 |
-
width: 100%;
|
221 |
-
padding: 8px 10px;
|
222 |
-
border: 0;
|
223 |
-
border-bottom: 1px solid #efefef;
|
224 |
-
}
|
225 |
-
|
226 |
-
.wpr-tplib-sidebar .wpr-tplib-search input::-webkit-input-placeholder {
|
227 |
-
color: #9a9a9a;
|
228 |
-
}
|
229 |
-
|
230 |
-
.wpr-tplib-sidebar .wpr-tplib-search input::-moz-placeholder {
|
231 |
-
color: #9a9a9a;
|
232 |
-
}
|
233 |
-
|
234 |
-
.wpr-tplib-sidebar .wpr-tplib-search input:-ms-input-placeholder {
|
235 |
-
color: #9a9a9a;
|
236 |
-
}
|
237 |
-
|
238 |
-
.wpr-tplib-sidebar .wpr-tplib-search input::-ms-input-placeholder {
|
239 |
-
color: #9a9a9a;
|
240 |
-
}
|
241 |
-
|
242 |
-
.wpr-tplib-sidebar .wpr-tplib-search input::placeholder {
|
243 |
-
color: #9a9a9a;
|
244 |
-
}
|
245 |
-
|
246 |
-
.wpr-tplib-filters-wrap {
|
247 |
-
display: -webkit-box;
|
248 |
-
display: -ms-flexbox;
|
249 |
-
display: flex;
|
250 |
-
}
|
251 |
-
|
252 |
-
.wpr-tplib-sub-filters {
|
253 |
-
display: none;
|
254 |
-
margin-left: 20px;
|
255 |
-
}
|
256 |
-
|
257 |
-
.wpr-tplib-sub-filters ul {
|
258 |
-
display: -webkit-box;
|
259 |
-
display: -ms-flexbox;
|
260 |
-
display: flex;
|
261 |
-
}
|
262 |
-
|
263 |
-
.wpr-tplib-sub-filters ul li {
|
264 |
-
padding: 10px 25px;
|
265 |
-
margin-right: 7px;
|
266 |
-
line-height: 15px;
|
267 |
-
font-size: 13px;
|
268 |
-
font-weight: normal;
|
269 |
-
background: #fff;
|
270 |
-
-webkit-box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
|
271 |
-
box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
|
272 |
-
cursor: pointer;
|
273 |
-
border-radius: 3px;
|
274 |
-
}
|
275 |
-
|
276 |
-
.wpr-tplib-sub-filters ul li:hover,
|
277 |
-
.wpr-tplib-sub-filters ul .wpr-tplib-activ-filter {
|
278 |
-
background: #6A4BFF;
|
279 |
-
color: #fff;
|
280 |
-
}
|
281 |
-
|
282 |
-
.wpr-tplib-filters {
|
283 |
-
-webkit-box-sizing: border-box;
|
284 |
-
box-sizing: border-box;
|
285 |
-
display: -webkit-box;
|
286 |
-
display: -ms-flexbox;
|
287 |
-
display: flex;
|
288 |
-
-webkit-box-orient: vertical;
|
289 |
-
-webkit-box-direction: normal;
|
290 |
-
-ms-flex-direction: column;
|
291 |
-
flex-direction: column;
|
292 |
-
-webkit-box-align: start;
|
293 |
-
-ms-flex-align: start;
|
294 |
-
align-items: flex-start;
|
295 |
-
position: relative;
|
296 |
-
width: 200px;
|
297 |
-
font-size: 14px;
|
298 |
-
font-weight: normal;
|
299 |
-
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
|
300 |
-
color: #6d7882;
|
301 |
-
}
|
302 |
-
|
303 |
-
.wpr-tplib-filters h3 {
|
304 |
-
display: -webkit-box;
|
305 |
-
display: -ms-flexbox;
|
306 |
-
display: flex;
|
307 |
-
width: 100%;
|
308 |
-
padding: 10px 15px;
|
309 |
-
font-size: 13px;
|
310 |
-
font-weight: normal;
|
311 |
-
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
|
312 |
-
background: #fff;
|
313 |
-
-webkit-box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
|
314 |
-
box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
|
315 |
-
cursor: pointer;
|
316 |
-
border-radius: 3px;
|
317 |
-
}
|
318 |
-
|
319 |
-
.wpr-tplib-filters h3 span {
|
320 |
-
width: 100%;
|
321 |
-
}
|
322 |
-
|
323 |
-
.wpr-tplib-filters-list {
|
324 |
-
visibility: hidden;
|
325 |
-
opacity: 0;
|
326 |
-
position: absolute;
|
327 |
-
top: 38px;
|
328 |
-
z-index: 999;
|
329 |
-
width: 700px;
|
330 |
-
padding: 20px 30px;
|
331 |
-
background: #fff;
|
332 |
-
-webkit-box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
|
333 |
-
box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
|
334 |
-
-webkit-transition: all 0.2s ease-in;
|
335 |
-
-o-transition: all 0.2s ease-in;
|
336 |
-
transition: all 0.2s ease-in;
|
337 |
-
border-radius: 3px;
|
338 |
-
}
|
339 |
-
|
340 |
-
.wpr-tplib-filters-list ul {
|
341 |
-
display: -webkit-box;
|
342 |
-
display: -ms-flexbox;
|
343 |
-
display: flex;
|
344 |
-
-ms-flex-wrap: wrap;
|
345 |
-
flex-wrap: wrap;
|
346 |
-
list-style: none;
|
347 |
-
padding-left: 0;
|
348 |
-
}
|
349 |
-
|
350 |
-
.wpr-tplib-filters-list ul li {
|
351 |
-
width: 25%;
|
352 |
-
padding: 12px;
|
353 |
-
color: #6d7882;
|
354 |
-
background: #fff;
|
355 |
-
font-size: 13px;
|
356 |
-
line-height: 1;
|
357 |
-
cursor: pointer;
|
358 |
-
}
|
359 |
-
|
360 |
-
.wpr-tplib-filters-list ul li:hover {
|
361 |
-
background: #f9f9f9;
|
362 |
-
color: #222;
|
363 |
-
}
|
364 |
-
|
365 |
-
.wpr-tplib-template-gird {
|
366 |
-
position: absolute;
|
367 |
-
width: 100%;
|
368 |
-
height: calc(100% - 132px);
|
369 |
-
overflow: auto;
|
370 |
-
padding: 0 30px 30px 30px;
|
371 |
-
margin-left: -10px;
|
372 |
-
}
|
373 |
-
|
374 |
-
.wpr-tplib-template-wrap {
|
375 |
-
float: left;
|
376 |
-
overflow: hidden;
|
377 |
-
width: 18.5%;
|
378 |
-
margin: 10px;
|
379 |
-
border-radius: 3px;
|
380 |
-
-webkit-box-shadow: 0 1px 20px 0 rgba(0,0,0,0.07);
|
381 |
-
box-shadow: 0 1px 20px 0 rgba(0,0,0,0.07);
|
382 |
-
}
|
383 |
-
|
384 |
-
.wpr-tplib-template-wrap:not(.wpr-tplib-pro-active):before {
|
385 |
-
content: 'Free';
|
386 |
-
display: block;
|
387 |
-
position: absolute;
|
388 |
-
top: 10px;
|
389 |
-
right: 10px;
|
390 |
-
z-index: 1;
|
391 |
-
width: 45px;
|
392 |
-
padding: 4px;
|
393 |
-
font-size: 11px;
|
394 |
-
line-height: 16px;
|
395 |
-
font-weight: bold;
|
396 |
-
letter-spacing: 0.3px;
|
397 |
-
text-transform: uppercase;
|
398 |
-
text-align: center;
|
399 |
-
background: #555;
|
400 |
-
color: #fff;
|
401 |
-
-webkit-box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.3);
|
402 |
-
box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.3);
|
403 |
-
border-radius: 3px;
|
404 |
-
}
|
405 |
-
|
406 |
-
.wpr-tplib-pro-wrap:not(.wpr-tplib-pro-active):before {
|
407 |
-
content: 'Pro';
|
408 |
-
background: #6A4BFF;
|
409 |
-
}
|
410 |
-
|
411 |
-
@media screen and ( max-width: 1364px ) {
|
412 |
-
.wpr-tplib-template-wrap {
|
413 |
-
width: 23%;
|
414 |
-
}
|
415 |
-
}
|
416 |
-
|
417 |
-
.wpr-tplib-template {
|
418 |
-
}
|
419 |
-
|
420 |
-
.wpr-tplib-template-wrap:hover .wpr-tplib-insert-template {
|
421 |
-
opacity: 1;
|
422 |
-
visibility: visible;
|
423 |
-
}
|
424 |
-
|
425 |
-
.wpr-tplib-template-media {
|
426 |
-
position: relative;
|
427 |
-
background-color: #e8e8e8;
|
428 |
-
}
|
429 |
-
|
430 |
-
.wpr-tplib-template-media img {
|
431 |
-
width: 100%;
|
432 |
-
max-width: 100%;
|
433 |
-
height: auto;
|
434 |
-
}
|
435 |
-
|
436 |
-
.wpr-tplib-template-media:hover .wpr-tplib-template-media-overlay {
|
437 |
-
opacity: 1;
|
438 |
-
}
|
439 |
-
|
440 |
-
.wpr-tplib-template-media-overlay {
|
441 |
-
opacity: 0;
|
442 |
-
position: absolute;
|
443 |
-
top: 0;
|
444 |
-
left: 0;
|
445 |
-
width: 100%;
|
446 |
-
height: 100%;
|
447 |
-
background-color: rgba(0, 0, 0, 0.5);
|
448 |
-
color: #fff;
|
449 |
-
cursor: pointer;
|
450 |
-
-webkit-transition: opacity 0.1s ease-in;
|
451 |
-
-o-transition: opacity 0.1s ease-in;
|
452 |
-
transition: opacity 0.1s ease-in;
|
453 |
-
}
|
454 |
-
|
455 |
-
.wpr-tplib-template-media-overlay i {
|
456 |
-
position: absolute;
|
457 |
-
top: 50%;
|
458 |
-
left: 50%;
|
459 |
-
-webkit-transform: translate(-50%, -50%);
|
460 |
-
-ms-transform: translate(-50%, -50%);
|
461 |
-
transform: translate(-50%, -50%);
|
462 |
-
font-size: 25px;
|
463 |
-
}
|
464 |
-
|
465 |
-
.wpr-tplib-preview-wrap {
|
466 |
-
display: none;
|
467 |
-
}
|
468 |
-
|
469 |
-
.wpr-tplib-image {
|
470 |
-
display: -webkit-box;
|
471 |
-
display: -ms-flexbox;
|
472 |
-
display: flex;
|
473 |
-
-webkit-box-pack: center;
|
474 |
-
-ms-flex-pack: center;
|
475 |
-
justify-content: center;
|
476 |
-
padding: 20px;
|
477 |
-
}
|
478 |
-
|
479 |
-
.wpr-tplib-iframe {
|
480 |
-
position: relative;
|
481 |
-
padding-top: 56.25%;
|
482 |
-
}
|
483 |
-
|
484 |
-
.wpr-tplib-iframe iframe {
|
485 |
-
position: absolute;
|
486 |
-
top: 0;
|
487 |
-
left: 0;
|
488 |
-
width: 100%;
|
489 |
-
height: 100%;
|
490 |
-
}
|
491 |
-
|
492 |
-
.wpr-tplib-template-footer {
|
493 |
-
display: -webkit-box;
|
494 |
-
display: -ms-flexbox;
|
495 |
-
display: flex;
|
496 |
-
-webkit-box-orient: vertical;
|
497 |
-
-webkit-box-direction: normal;
|
498 |
-
-ms-flex-flow: column wrap;
|
499 |
-
flex-flow: column wrap;
|
500 |
-
-ms-flex-line-pack: justify;
|
501 |
-
align-content: space-between;
|
502 |
-
-webkit-box-pack: center;
|
503 |
-
-ms-flex-pack: center;
|
504 |
-
justify-content: center;
|
505 |
-
height: 45px;
|
506 |
-
padding: 5px 15px;
|
507 |
-
background-color: #fff;
|
508 |
-
border-top: 1px solid #efefef;
|
509 |
-
}
|
510 |
-
|
511 |
-
.wpr-tplib-template-footer h3 {
|
512 |
-
overflow: hidden;
|
513 |
-
color: #6d7882;
|
514 |
-
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
|
515 |
-
font-size: 13px;
|
516 |
-
font-weight: normal;
|
517 |
-
white-space: nowrap;
|
518 |
-
-o-text-overflow: ellipsis;
|
519 |
-
text-overflow: ellipsis;
|
520 |
-
}
|
521 |
-
|
522 |
-
.wpr-tplib-template-footer .wpr-tplib-insert-template {
|
523 |
-
opacity: 0;
|
524 |
-
visibility: hidden;
|
525 |
-
padding: 6px 10px;
|
526 |
-
color: #fff;
|
527 |
-
background-color: #6A4BFF;
|
528 |
-
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
|
529 |
-
font-size: 13px;
|
530 |
-
line-height: 1;
|
531 |
-
letter-spacing: 0.3px;
|
532 |
-
border-radius: 3px;
|
533 |
-
cursor: pointer;
|
534 |
-
-webkit-transition: all 0.1s ease-in;
|
535 |
-
-o-transition: all 0.1s ease-in;
|
536 |
-
transition: all 0.1s ease-in;
|
537 |
-
}
|
538 |
-
|
539 |
-
|
540 |
-
#masonry-effect {
|
541 |
-
display: -webkit-box;
|
542 |
-
display: -ms-flexbox;
|
543 |
-
display: flex;
|
544 |
-
-webkit-box-orient: horizontal;
|
545 |
-
-webkit-box-direction: normal;
|
546 |
-
-ms-flex-direction: row;
|
547 |
-
flex-direction: row;
|
548 |
-
-ms-flex-wrap: wrap;
|
549 |
-
flex-wrap: wrap;
|
550 |
-
}
|
551 |
-
.item {
|
552 |
-
-webkit-box-sizing: border-box;
|
553 |
-
box-sizing: border-box;
|
554 |
-
-webkit-box-orient: vertical;
|
555 |
-
-webkit-box-direction: normal;
|
556 |
-
-ms-flex-direction: column;
|
557 |
-
flex-direction: column;
|
558 |
-
position: relative;
|
559 |
-
width: calc(33.3%);
|
560 |
-
}
|
561 |
-
|
562 |
-
|
563 |
-
/* Elementor Loader */
|
564 |
-
.wpr-tplib-loader {
|
565 |
-
overflow: auto;
|
566 |
-
position: absolute;
|
567 |
-
width: 100%;
|
568 |
-
height: 100%;
|
569 |
-
z-index: 9999999999;
|
570 |
-
background-color: #f1f3f5;
|
571 |
-
}
|
572 |
-
|
573 |
-
.elementor-loader-wrapper {
|
574 |
-
position: absolute;
|
575 |
-
width: 300px;
|
576 |
-
left: 50%;
|
577 |
-
top: 50%;
|
578 |
-
-webkit-transform: translateX(-50%) translateY(-50%);
|
579 |
-
-ms-transform: translateX(-50%) translateY(-50%);
|
580 |
-
transform: translateX(-50%) translateY(-50%);
|
581 |
-
display: -webkit-box;
|
582 |
-
display: -ms-flexbox;
|
583 |
-
display: flex;
|
584 |
-
-ms-flex-wrap: wrap;
|
585 |
-
flex-wrap: wrap;
|
586 |
-
-webkit-box-pack: center;
|
587 |
-
-ms-flex-pack: center;
|
588 |
-
justify-content: center;
|
589 |
-
}
|
590 |
-
|
591 |
-
.elementor-loader {
|
592 |
-
border-radius: 7px;
|
593 |
-
padding: 40px;
|
594 |
-
height: 150px;
|
595 |
-
width: 150px;
|
596 |
-
background-color: rgba(255, 255, 255, 0.9);
|
597 |
-
-webkit-box-sizing: border-box;
|
598 |
-
box-sizing: border-box;
|
599 |
-
-webkit-box-shadow: 2px 2px 20px 4px rgba(0, 0, 0, 0.02);
|
600 |
-
box-shadow: 2px 2px 20px 4px rgba(0, 0, 0, 0.02);
|
601 |
-
}
|
602 |
-
|
603 |
-
.elementor-loader-boxes {
|
604 |
-
height: 100%;
|
605 |
-
width: 100%;
|
606 |
-
position: relative;
|
607 |
-
}
|
608 |
-
|
609 |
-
.elementor-loader-box {
|
610 |
-
position: absolute;
|
611 |
-
background-color: #d5dadf;
|
612 |
-
-webkit-animation: load 1.8s linear infinite;
|
613 |
-
animation: load 1.8s linear infinite;
|
614 |
-
}
|
615 |
-
|
616 |
-
.elementor-loader-box:nth-of-type(1) {
|
617 |
-
width: 20%;
|
618 |
-
height: 100%;
|
619 |
-
left: 0;
|
620 |
-
top: 0;
|
621 |
-
}
|
622 |
-
|
623 |
-
.elementor-loader-box:not(:nth-of-type(1)) {
|
624 |
-
right: 0;
|
625 |
-
height: 20%;
|
626 |
-
width: 60%;
|
627 |
-
}
|
628 |
-
|
629 |
-
.elementor-loader-box:nth-of-type(2) {
|
630 |
-
top: 0;
|
631 |
-
-webkit-animation-delay: -0.45s;
|
632 |
-
animation-delay: -0.45s;
|
633 |
-
}
|
634 |
-
|
635 |
-
.elementor-loader-box:nth-of-type(3) {
|
636 |
-
top: 40%;
|
637 |
-
-webkit-animation-delay: -0.9s;
|
638 |
-
animation-delay: -0.9s;
|
639 |
-
}
|
640 |
-
|
641 |
-
.elementor-loader-box:nth-of-type(4) {
|
642 |
-
bottom: 0;
|
643 |
-
-webkit-animation-delay: -1.35s;
|
644 |
-
animation-delay: -1.35s;
|
645 |
-
}
|
646 |
-
|
647 |
-
@-webkit-keyframes load {
|
648 |
-
0% {
|
649 |
-
opacity: .3;
|
650 |
-
}
|
651 |
-
50% {
|
652 |
-
opacity: 1;
|
653 |
-
}
|
654 |
-
100% {
|
655 |
-
opacity: .3;
|
656 |
-
}
|
657 |
-
}
|
658 |
-
|
659 |
-
@keyframes load {
|
660 |
-
0% {
|
661 |
-
opacity: .3;
|
662 |
-
}
|
663 |
-
50% {
|
664 |
-
opacity: 1;
|
665 |
-
}
|
666 |
-
100% {
|
667 |
-
opacity: .3;
|
668 |
-
}
|
669 |
-
}
|
670 |
-
|
671 |
-
.elementor-loading-title {
|
672 |
-
font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
|
673 |
-
color: #a4afb7;
|
674 |
-
text-align: center;
|
675 |
-
text-transform: uppercase;
|
676 |
-
margin-top: 30px;
|
677 |
-
letter-spacing: 7px;
|
678 |
-
text-indent: 7px;
|
679 |
-
font-size: 10px;
|
680 |
-
width: 100%;
|
681 |
-
}
|
682 |
-
|
683 |
-
|
684 |
-
/* Scroll Bar */
|
685 |
-
.wpr-tplib-popup ::-webkit-scrollbar {
|
686 |
-
width: 6px;
|
687 |
-
height: 0;
|
688 |
-
border-radius: 3px;
|
689 |
-
}
|
690 |
-
|
691 |
-
.wpr-tplib-popup ::-webkit-scrollbar-button {
|
692 |
-
width: 0px;
|
693 |
-
height: 10px;
|
694 |
-
}
|
695 |
-
|
696 |
-
.wpr-tplib-popup ::-webkit-scrollbar-thumb {
|
697 |
-
background-color: #d5dadf;
|
698 |
-
border: 0px none #d5dadf;
|
699 |
-
border-radius: 3px;
|
700 |
-
}
|
701 |
-
|
702 |
-
.wpr-tplib-popup ::-webkit-scrollbar-track {
|
703 |
-
border: 0px none #fff;
|
704 |
-
border-radius: 0;
|
705 |
-
}
|
706 |
-
|
707 |
-
.wpr-tplib-popup ::-webkit-scrollbar-corner {
|
708 |
-
background: transparent;
|
709 |
}
|
1 |
+
/*--------------------------------------------------------------
|
2 |
+
== Library - Predefined Styles
|
3 |
+
--------------------------------------------------------------*/
|
4 |
+
#wpr-library-btn {
|
5 |
+
display: -webkit-inline-box;
|
6 |
+
display: -ms-inline-flexbox;
|
7 |
+
display: inline-flex;
|
8 |
+
width: 40px;
|
9 |
+
height: 40px;
|
10 |
+
vertical-align: top;
|
11 |
+
margin-left: 10px;
|
12 |
+
color: #fff;
|
13 |
+
font-family: Arial,Helvetica,sans-serif;
|
14 |
+
font-weight: bold;
|
15 |
+
letter-spacing: 0.3px;
|
16 |
+
cursor: pointer;
|
17 |
+
}
|
18 |
+
|
19 |
+
.wpr-library-icon {
|
20 |
+
display: -webkit-inline-box;
|
21 |
+
display: -ms-inline-flexbox;
|
22 |
+
display: inline-flex;
|
23 |
+
padding: 10px;
|
24 |
+
margin-right: 10px;
|
25 |
+
border-radius: 50%;
|
26 |
+
color: transparent;
|
27 |
+
font-family: Arial,Helvetica,sans-serif;
|
28 |
+
font-size: 14px;
|
29 |
+
font-weight: bold;
|
30 |
+
letter-spacing: 0.3px;
|
31 |
+
}
|
32 |
+
|
33 |
+
.wpr-tplib-popup-overlay {
|
34 |
+
position: fixed;
|
35 |
+
top: 0;
|
36 |
+
left: 0;
|
37 |
+
z-index: 999999;
|
38 |
+
width: 100%;
|
39 |
+
height: 100%;
|
40 |
+
background: rgba(0,0,0,0.5);
|
41 |
+
}
|
42 |
+
|
43 |
+
.wpr-tplib-popup {
|
44 |
+
overflow: hidden;
|
45 |
+
position: absolute;
|
46 |
+
top: 30%;
|
47 |
+
left: 50%;
|
48 |
+
-webkit-transform: translate(-50%,-30%);
|
49 |
+
-ms-transform: translate(-50%,-30%);
|
50 |
+
transform: translate(-50%,-30%);
|
51 |
+
background: #f1f3f5;
|
52 |
+
min-width: 100%;
|
53 |
+
height: 100%;
|
54 |
+
}
|
55 |
+
|
56 |
+
.wpr-tplib-header {
|
57 |
+
display: -webkit-box;
|
58 |
+
display: -ms-flexbox;
|
59 |
+
display: flex;
|
60 |
+
-webkit-box-align: center;
|
61 |
+
-ms-flex-align: center;
|
62 |
+
align-items: center;
|
63 |
+
background-color: #fff;
|
64 |
+
-webkit-box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
|
65 |
+
box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
|
66 |
+
position: relative;
|
67 |
+
z-index: 10;
|
68 |
+
}
|
69 |
+
|
70 |
+
.wpr-tplib-logo {
|
71 |
+
display: -webkit-box;
|
72 |
+
display: -ms-flexbox;
|
73 |
+
display: flex;
|
74 |
+
-webkit-box-align: center;
|
75 |
+
-ms-flex-align: center;
|
76 |
+
align-items: center;
|
77 |
+
-webkit-box-pack: start;
|
78 |
+
-ms-flex-pack: start;
|
79 |
+
justify-content: flex-start;
|
80 |
+
width: 200px;
|
81 |
+
padding-left: 30px;
|
82 |
+
color: #495157;
|
83 |
+
font-size: 15px;
|
84 |
+
font-weight: 700;
|
85 |
+
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
|
86 |
+
}
|
87 |
+
|
88 |
+
.wpr-tplib-header ul {
|
89 |
+
display: -webkit-inline-box;
|
90 |
+
display: -ms-inline-flexbox;
|
91 |
+
display: inline-flex;
|
92 |
+
-webkit-box-pack: center;
|
93 |
+
-ms-flex-pack: center;
|
94 |
+
justify-content: center;
|
95 |
+
width: 100%;
|
96 |
+
margin-left: -130px;
|
97 |
+
list-style: none;
|
98 |
+
}
|
99 |
+
|
100 |
+
.wpr-tplib-header ul li {
|
101 |
+
width: 115px;
|
102 |
+
padding: 20px 0;
|
103 |
+
color: #6d7882;
|
104 |
+
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
|
105 |
+
font-size: 14px;
|
106 |
+
line-height: 1;
|
107 |
+
font-weight: 500;
|
108 |
+
text-align: center;
|
109 |
+
cursor: pointer;
|
110 |
+
|
111 |
+
}
|
112 |
+
|
113 |
+
.wpr-tplib-active-tab {
|
114 |
+
background-image: -o-linear-gradient(top,#f1f3f5,#fff);
|
115 |
+
background-image: -webkit-gradient(linear,left top, left bottom,from(#f1f3f5),to(#fff));
|
116 |
+
background-image: linear-gradient(180deg,#f1f3f5,#fff);
|
117 |
+
border-bottom: 3px solid #6A4BFF;
|
118 |
+
}
|
119 |
+
|
120 |
+
.wpr-tplib-close {
|
121 |
+
display: -webkit-box;
|
122 |
+
display: -ms-flexbox;
|
123 |
+
display: flex;
|
124 |
+
-webkit-box-align: center;
|
125 |
+
-ms-flex-align: center;
|
126 |
+
align-items: center;
|
127 |
+
-webkit-box-pack: end;
|
128 |
+
-ms-flex-pack: end;
|
129 |
+
justify-content: flex-end;
|
130 |
+
padding-right: 30px;
|
131 |
+
color: #a4afb7;
|
132 |
+
font-size: 18px;
|
133 |
+
cursor: pointer;
|
134 |
+
-webkit-transition: all .3s;
|
135 |
+
-o-transition: all .3s;
|
136 |
+
transition: all .3s;
|
137 |
+
}
|
138 |
+
|
139 |
+
.wpr-tplib-close:hover {
|
140 |
+
color: #3a3a3a;
|
141 |
+
}
|
142 |
+
|
143 |
+
.wpr-tplib-close i {
|
144 |
+
line-height: 20px;
|
145 |
+
padding-left: 20px;
|
146 |
+
}
|
147 |
+
|
148 |
+
.wpr-tplib-popup h3 {
|
149 |
+
margin: 0;
|
150 |
+
}
|
151 |
+
|
152 |
+
.wpr-tplib-header .wpr-tplib-insert-template {
|
153 |
+
display: none;
|
154 |
+
width: 120px;
|
155 |
+
height: 27px;
|
156 |
+
line-height: 27px;
|
157 |
+
padding: 0 15px;
|
158 |
+
margin-right: 15px;
|
159 |
+
color: #fff;
|
160 |
+
background-color: #6A4BFF;
|
161 |
+
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
|
162 |
+
font-size: 13px;
|
163 |
+
border-radius: 2px;
|
164 |
+
text-transform: uppercase;
|
165 |
+
cursor: pointer;
|
166 |
+
text-align: center;
|
167 |
+
}
|
168 |
+
|
169 |
+
.wpr-tplib-back {
|
170 |
+
display: none;
|
171 |
+
width: 230px;
|
172 |
+
padding: 17px 15px;
|
173 |
+
border-right: 1px solid #e6e9ec;
|
174 |
+
color: #6d7882;
|
175 |
+
font-size: 15px;
|
176 |
+
font-weight: 700;
|
177 |
+
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
|
178 |
+
cursor: pointer;
|
179 |
+
-webkit-transition: all .3s;
|
180 |
+
-o-transition: all .3s;
|
181 |
+
transition: all .3s;
|
182 |
+
}
|
183 |
+
|
184 |
+
.wpr-tplib-back:hover {
|
185 |
+
color: #495157;
|
186 |
+
}
|
187 |
+
|
188 |
+
.wpr-tplib-back i {
|
189 |
+
margin-right: 5px;
|
190 |
+
}
|
191 |
+
|
192 |
+
.wpr-tplib-back span {
|
193 |
+
|
194 |
+
}
|
195 |
+
|
196 |
+
.wpr-tplib-content-wrap {
|
197 |
+
}
|
198 |
+
|
199 |
+
.wpr-tplib-sidebar {
|
200 |
+
padding: 30px 30px 20px 30px;
|
201 |
+
}
|
202 |
+
|
203 |
+
.wpr-tplib-sidebar .wpr-tplib-search {
|
204 |
+
display: none;
|
205 |
+
position: relative;
|
206 |
+
margin: 30px 0;
|
207 |
+
}
|
208 |
+
|
209 |
+
.wpr-tplib-sidebar .wpr-tplib-search i {
|
210 |
+
position: absolute;
|
211 |
+
top: 50%;
|
212 |
+
right: 10px;
|
213 |
+
font-size: 12px;
|
214 |
+
-webkit-transform: translateY(-50%);
|
215 |
+
-ms-transform: translateY(-50%);
|
216 |
+
transform: translateY(-50%);
|
217 |
+
}
|
218 |
+
|
219 |
+
.wpr-tplib-sidebar .wpr-tplib-search input {
|
220 |
+
width: 100%;
|
221 |
+
padding: 8px 10px;
|
222 |
+
border: 0;
|
223 |
+
border-bottom: 1px solid #efefef;
|
224 |
+
}
|
225 |
+
|
226 |
+
.wpr-tplib-sidebar .wpr-tplib-search input::-webkit-input-placeholder {
|
227 |
+
color: #9a9a9a;
|
228 |
+
}
|
229 |
+
|
230 |
+
.wpr-tplib-sidebar .wpr-tplib-search input::-moz-placeholder {
|
231 |
+
color: #9a9a9a;
|
232 |
+
}
|
233 |
+
|
234 |
+
.wpr-tplib-sidebar .wpr-tplib-search input:-ms-input-placeholder {
|
235 |
+
color: #9a9a9a;
|
236 |
+
}
|
237 |
+
|
238 |
+
.wpr-tplib-sidebar .wpr-tplib-search input::-ms-input-placeholder {
|
239 |
+
color: #9a9a9a;
|
240 |
+
}
|
241 |
+
|
242 |
+
.wpr-tplib-sidebar .wpr-tplib-search input::placeholder {
|
243 |
+
color: #9a9a9a;
|
244 |
+
}
|
245 |
+
|
246 |
+
.wpr-tplib-filters-wrap {
|
247 |
+
display: -webkit-box;
|
248 |
+
display: -ms-flexbox;
|
249 |
+
display: flex;
|
250 |
+
}
|
251 |
+
|
252 |
+
.wpr-tplib-sub-filters {
|
253 |
+
display: none;
|
254 |
+
margin-left: 20px;
|
255 |
+
}
|
256 |
+
|
257 |
+
.wpr-tplib-sub-filters ul {
|
258 |
+
display: -webkit-box;
|
259 |
+
display: -ms-flexbox;
|
260 |
+
display: flex;
|
261 |
+
}
|
262 |
+
|
263 |
+
.wpr-tplib-sub-filters ul li {
|
264 |
+
padding: 10px 25px;
|
265 |
+
margin-right: 7px;
|
266 |
+
line-height: 15px;
|
267 |
+
font-size: 13px;
|
268 |
+
font-weight: normal;
|
269 |
+
background: #fff;
|
270 |
+
-webkit-box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
|
271 |
+
box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
|
272 |
+
cursor: pointer;
|
273 |
+
border-radius: 3px;
|
274 |
+
}
|
275 |
+
|
276 |
+
.wpr-tplib-sub-filters ul li:hover,
|
277 |
+
.wpr-tplib-sub-filters ul .wpr-tplib-activ-filter {
|
278 |
+
background: #6A4BFF;
|
279 |
+
color: #fff;
|
280 |
+
}
|
281 |
+
|
282 |
+
.wpr-tplib-filters {
|
283 |
+
-webkit-box-sizing: border-box;
|
284 |
+
box-sizing: border-box;
|
285 |
+
display: -webkit-box;
|
286 |
+
display: -ms-flexbox;
|
287 |
+
display: flex;
|
288 |
+
-webkit-box-orient: vertical;
|
289 |
+
-webkit-box-direction: normal;
|
290 |
+
-ms-flex-direction: column;
|
291 |
+
flex-direction: column;
|
292 |
+
-webkit-box-align: start;
|
293 |
+
-ms-flex-align: start;
|
294 |
+
align-items: flex-start;
|
295 |
+
position: relative;
|
296 |
+
width: 200px;
|
297 |
+
font-size: 14px;
|
298 |
+
font-weight: normal;
|
299 |
+
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
|
300 |
+
color: #6d7882;
|
301 |
+
}
|
302 |
+
|
303 |
+
.wpr-tplib-filters h3 {
|
304 |
+
display: -webkit-box;
|
305 |
+
display: -ms-flexbox;
|
306 |
+
display: flex;
|
307 |
+
width: 100%;
|
308 |
+
padding: 10px 15px;
|
309 |
+
font-size: 13px;
|
310 |
+
font-weight: normal;
|
311 |
+
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
|
312 |
+
background: #fff;
|
313 |
+
-webkit-box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
|
314 |
+
box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
|
315 |
+
cursor: pointer;
|
316 |
+
border-radius: 3px;
|
317 |
+
}
|
318 |
+
|
319 |
+
.wpr-tplib-filters h3 span {
|
320 |
+
width: 100%;
|
321 |
+
}
|
322 |
+
|
323 |
+
.wpr-tplib-filters-list {
|
324 |
+
visibility: hidden;
|
325 |
+
opacity: 0;
|
326 |
+
position: absolute;
|
327 |
+
top: 38px;
|
328 |
+
z-index: 999;
|
329 |
+
width: 700px;
|
330 |
+
padding: 20px 30px;
|
331 |
+
background: #fff;
|
332 |
+
-webkit-box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
|
333 |
+
box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
|
334 |
+
-webkit-transition: all 0.2s ease-in;
|
335 |
+
-o-transition: all 0.2s ease-in;
|
336 |
+
transition: all 0.2s ease-in;
|
337 |
+
border-radius: 3px;
|
338 |
+
}
|
339 |
+
|
340 |
+
.wpr-tplib-filters-list ul {
|
341 |
+
display: -webkit-box;
|
342 |
+
display: -ms-flexbox;
|
343 |
+
display: flex;
|
344 |
+
-ms-flex-wrap: wrap;
|
345 |
+
flex-wrap: wrap;
|
346 |
+
list-style: none;
|
347 |
+
padding-left: 0;
|
348 |
+
}
|
349 |
+
|
350 |
+
.wpr-tplib-filters-list ul li {
|
351 |
+
width: 25%;
|
352 |
+
padding: 12px;
|
353 |
+
color: #6d7882;
|
354 |
+
background: #fff;
|
355 |
+
font-size: 13px;
|
356 |
+
line-height: 1;
|
357 |
+
cursor: pointer;
|
358 |
+
}
|
359 |
+
|
360 |
+
.wpr-tplib-filters-list ul li:hover {
|
361 |
+
background: #f9f9f9;
|
362 |
+
color: #222;
|
363 |
+
}
|
364 |
+
|
365 |
+
.wpr-tplib-template-gird {
|
366 |
+
position: absolute;
|
367 |
+
width: 100%;
|
368 |
+
height: calc(100% - 132px);
|
369 |
+
overflow: auto;
|
370 |
+
padding: 0 30px 30px 30px;
|
371 |
+
margin-left: -10px;
|
372 |
+
}
|
373 |
+
|
374 |
+
.wpr-tplib-template-wrap {
|
375 |
+
float: left;
|
376 |
+
overflow: hidden;
|
377 |
+
width: 18.5%;
|
378 |
+
margin: 10px;
|
379 |
+
border-radius: 3px;
|
380 |
+
-webkit-box-shadow: 0 1px 20px 0 rgba(0,0,0,0.07);
|
381 |
+
box-shadow: 0 1px 20px 0 rgba(0,0,0,0.07);
|
382 |
+
}
|
383 |
+
|
384 |
+
.wpr-tplib-template-wrap:not(.wpr-tplib-pro-active):before {
|
385 |
+
content: 'Free';
|
386 |
+
display: block;
|
387 |
+
position: absolute;
|
388 |
+
top: 10px;
|
389 |
+
right: 10px;
|
390 |
+
z-index: 1;
|
391 |
+
width: 45px;
|
392 |
+
padding: 4px;
|
393 |
+
font-size: 11px;
|
394 |
+
line-height: 16px;
|
395 |
+
font-weight: bold;
|
396 |
+
letter-spacing: 0.3px;
|
397 |
+
text-transform: uppercase;
|
398 |
+
text-align: center;
|
399 |
+
background: #555;
|
400 |
+
color: #fff;
|
401 |
+
-webkit-box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.3);
|
402 |
+
box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.3);
|
403 |
+
border-radius: 3px;
|
404 |
+
}
|
405 |
+
|
406 |
+
.wpr-tplib-pro-wrap:not(.wpr-tplib-pro-active):before {
|
407 |
+
content: 'Pro';
|
408 |
+
background: #6A4BFF;
|
409 |
+
}
|
410 |
+
|
411 |
+
@media screen and ( max-width: 1364px ) {
|
412 |
+
.wpr-tplib-template-wrap {
|
413 |
+
width: 23%;
|
414 |
+
}
|
415 |
+
}
|
416 |
+
|
417 |
+
.wpr-tplib-template {
|
418 |
+
}
|
419 |
+
|
420 |
+
.wpr-tplib-template-wrap:hover .wpr-tplib-insert-template {
|
421 |
+
opacity: 1;
|
422 |
+
visibility: visible;
|
423 |
+
}
|
424 |
+
|
425 |
+
.wpr-tplib-template-media {
|
426 |
+
position: relative;
|
427 |
+
background-color: #e8e8e8;
|
428 |
+
}
|
429 |
+
|
430 |
+
.wpr-tplib-template-media img {
|
431 |
+
width: 100%;
|
432 |
+
max-width: 100%;
|
433 |
+
height: auto;
|
434 |
+
}
|
435 |
+
|
436 |
+
.wpr-tplib-template-media:hover .wpr-tplib-template-media-overlay {
|
437 |
+
opacity: 1;
|
438 |
+
}
|
439 |
+
|
440 |
+
.wpr-tplib-template-media-overlay {
|
441 |
+
opacity: 0;
|
442 |
+
position: absolute;
|
443 |
+
top: 0;
|
444 |
+
left: 0;
|
445 |
+
width: 100%;
|
446 |
+
height: 100%;
|
447 |
+
background-color: rgba(0, 0, 0, 0.5);
|
448 |
+
color: #fff;
|
449 |
+
cursor: pointer;
|
450 |
+
-webkit-transition: opacity 0.1s ease-in;
|
451 |
+
-o-transition: opacity 0.1s ease-in;
|
452 |
+
transition: opacity 0.1s ease-in;
|
453 |
+
}
|
454 |
+
|
455 |
+
.wpr-tplib-template-media-overlay i {
|
456 |
+
position: absolute;
|
457 |
+
top: 50%;
|
458 |
+
left: 50%;
|
459 |
+
-webkit-transform: translate(-50%, -50%);
|
460 |
+
-ms-transform: translate(-50%, -50%);
|
461 |
+
transform: translate(-50%, -50%);
|
462 |
+
font-size: 25px;
|
463 |
+
}
|
464 |
+
|
465 |
+
.wpr-tplib-preview-wrap {
|
466 |
+
display: none;
|
467 |
+
}
|
468 |
+
|
469 |
+
.wpr-tplib-image {
|
470 |
+
display: -webkit-box;
|
471 |
+
display: -ms-flexbox;
|
472 |
+
display: flex;
|
473 |
+
-webkit-box-pack: center;
|
474 |
+
-ms-flex-pack: center;
|
475 |
+
justify-content: center;
|
476 |
+
padding: 20px;
|
477 |
+
}
|
478 |
+
|
479 |
+
.wpr-tplib-iframe {
|
480 |
+
position: relative;
|
481 |
+
padding-top: 56.25%;
|
482 |
+
}
|
483 |
+
|
484 |
+
.wpr-tplib-iframe iframe {
|
485 |
+
position: absolute;
|
486 |
+
top: 0;
|
487 |
+
left: 0;
|
488 |
+
width: 100%;
|
489 |
+
height: 100%;
|
490 |
+
}
|
491 |
+
|
492 |
+
.wpr-tplib-template-footer {
|
493 |
+
display: -webkit-box;
|
494 |
+
display: -ms-flexbox;
|
495 |
+
display: flex;
|
496 |
+
-webkit-box-orient: vertical;
|
497 |
+
-webkit-box-direction: normal;
|
498 |
+
-ms-flex-flow: column wrap;
|
499 |
+
flex-flow: column wrap;
|
500 |
+
-ms-flex-line-pack: justify;
|
501 |
+
align-content: space-between;
|
502 |
+
-webkit-box-pack: center;
|
503 |
+
-ms-flex-pack: center;
|
504 |
+
justify-content: center;
|
505 |
+
height: 45px;
|
506 |
+
padding: 5px 15px;
|
507 |
+
background-color: #fff;
|
508 |
+
border-top: 1px solid #efefef;
|
509 |
+
}
|
510 |
+
|
511 |
+
.wpr-tplib-template-footer h3 {
|
512 |
+
overflow: hidden;
|
513 |
+
color: #6d7882;
|
514 |
+
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
|
515 |
+
font-size: 13px;
|
516 |
+
font-weight: normal;
|
517 |
+
white-space: nowrap;
|
518 |
+
-o-text-overflow: ellipsis;
|
519 |
+
text-overflow: ellipsis;
|
520 |
+
}
|
521 |
+
|
522 |
+
.wpr-tplib-template-footer .wpr-tplib-insert-template {
|
523 |
+
opacity: 0;
|
524 |
+
visibility: hidden;
|
525 |
+
padding: 6px 10px;
|
526 |
+
color: #fff;
|
527 |
+
background-color: #6A4BFF;
|
528 |
+
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
|
529 |
+
font-size: 13px;
|
530 |
+
line-height: 1;
|
531 |
+
letter-spacing: 0.3px;
|
532 |
+
border-radius: 3px;
|
533 |
+
cursor: pointer;
|
534 |
+
-webkit-transition: all 0.1s ease-in;
|
535 |
+
-o-transition: all 0.1s ease-in;
|
536 |
+
transition: all 0.1s ease-in;
|
537 |
+
}
|
538 |
+
|
539 |
+
|
540 |
+
#masonry-effect {
|
541 |
+
display: -webkit-box;
|
542 |
+
display: -ms-flexbox;
|
543 |
+
display: flex;
|
544 |
+
-webkit-box-orient: horizontal;
|
545 |
+
-webkit-box-direction: normal;
|
546 |
+
-ms-flex-direction: row;
|
547 |
+
flex-direction: row;
|
548 |
+
-ms-flex-wrap: wrap;
|
549 |
+
flex-wrap: wrap;
|
550 |
+
}
|
551 |
+
.item {
|
552 |
+
-webkit-box-sizing: border-box;
|
553 |
+
box-sizing: border-box;
|
554 |
+
-webkit-box-orient: vertical;
|
555 |
+
-webkit-box-direction: normal;
|
556 |
+
-ms-flex-direction: column;
|
557 |
+
flex-direction: column;
|
558 |
+
position: relative;
|
559 |
+
width: calc(33.3%);
|
560 |
+
}
|
561 |
+
|
562 |
+
|
563 |
+
/* Elementor Loader */
|
564 |
+
.wpr-tplib-loader {
|
565 |
+
overflow: auto;
|
566 |
+
position: absolute;
|
567 |
+
width: 100%;
|
568 |
+
height: 100%;
|
569 |
+
z-index: 9999999999;
|
570 |
+
background-color: #f1f3f5;
|
571 |
+
}
|
572 |
+
|
573 |
+
.elementor-loader-wrapper {
|
574 |
+
position: absolute;
|
575 |
+
width: 300px;
|
576 |
+
left: 50%;
|
577 |
+
top: 50%;
|
578 |
+
-webkit-transform: translateX(-50%) translateY(-50%);
|
579 |
+
-ms-transform: translateX(-50%) translateY(-50%);
|
580 |
+
transform: translateX(-50%) translateY(-50%);
|
581 |
+
display: -webkit-box;
|
582 |
+
display: -ms-flexbox;
|
583 |
+
display: flex;
|
584 |
+
-ms-flex-wrap: wrap;
|
585 |
+
flex-wrap: wrap;
|
586 |
+
-webkit-box-pack: center;
|
587 |
+
-ms-flex-pack: center;
|
588 |
+
justify-content: center;
|
589 |
+
}
|
590 |
+
|
591 |
+
.elementor-loader {
|
592 |
+
border-radius: 7px;
|
593 |
+
padding: 40px;
|
594 |
+
height: 150px;
|
595 |
+
width: 150px;
|
596 |
+
background-color: rgba(255, 255, 255, 0.9);
|
597 |
+
-webkit-box-sizing: border-box;
|
598 |
+
box-sizing: border-box;
|
599 |
+
-webkit-box-shadow: 2px 2px 20px 4px rgba(0, 0, 0, 0.02);
|
600 |
+
box-shadow: 2px 2px 20px 4px rgba(0, 0, 0, 0.02);
|
601 |
+
}
|
602 |
+
|
603 |
+
.elementor-loader-boxes {
|
604 |
+
height: 100%;
|
605 |
+
width: 100%;
|
606 |
+
position: relative;
|
607 |
+
}
|
608 |
+
|
609 |
+
.elementor-loader-box {
|
610 |
+
position: absolute;
|
611 |
+
background-color: #d5dadf;
|
612 |
+
-webkit-animation: load 1.8s linear infinite;
|
613 |
+
animation: load 1.8s linear infinite;
|
614 |
+
}
|
615 |
+
|
616 |
+
.elementor-loader-box:nth-of-type(1) {
|
617 |
+
width: 20%;
|
618 |
+
height: 100%;
|
619 |
+
left: 0;
|
620 |
+
top: 0;
|
621 |
+
}
|
622 |
+
|
623 |
+
.elementor-loader-box:not(:nth-of-type(1)) {
|
624 |
+
right: 0;
|
625 |
+
height: 20%;
|
626 |
+
width: 60%;
|
627 |
+
}
|
628 |
+
|
629 |
+
.elementor-loader-box:nth-of-type(2) {
|
630 |
+
top: 0;
|
631 |
+
-webkit-animation-delay: -0.45s;
|
632 |
+
animation-delay: -0.45s;
|
633 |
+
}
|
634 |
+
|
635 |
+
.elementor-loader-box:nth-of-type(3) {
|
636 |
+
top: 40%;
|
637 |
+
-webkit-animation-delay: -0.9s;
|
638 |
+
animation-delay: -0.9s;
|
639 |
+
}
|
640 |
+
|
641 |
+
.elementor-loader-box:nth-of-type(4) {
|
642 |
+
bottom: 0;
|
643 |
+
-webkit-animation-delay: -1.35s;
|
644 |
+
animation-delay: -1.35s;
|
645 |
+
}
|
646 |
+
|
647 |
+
@-webkit-keyframes load {
|
648 |
+
0% {
|
649 |
+
opacity: .3;
|
650 |
+
}
|
651 |
+
50% {
|
652 |
+
opacity: 1;
|
653 |
+
}
|
654 |
+
100% {
|
655 |
+
opacity: .3;
|
656 |
+
}
|
657 |
+
}
|
658 |
+
|
659 |
+
@keyframes load {
|
660 |
+
0% {
|
661 |
+
opacity: .3;
|
662 |
+
}
|
663 |
+
50% {
|
664 |
+
opacity: 1;
|
665 |
+
}
|
666 |
+
100% {
|
667 |
+
opacity: .3;
|
668 |
+
}
|
669 |
+
}
|
670 |
+
|
671 |
+
.elementor-loading-title {
|
672 |
+
font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
|
673 |
+
color: #a4afb7;
|
674 |
+
text-align: center;
|
675 |
+
text-transform: uppercase;
|
676 |
+
margin-top: 30px;
|
677 |
+
letter-spacing: 7px;
|
678 |
+
text-indent: 7px;
|
679 |
+
font-size: 10px;
|
680 |
+
width: 100%;
|
681 |
+
}
|
682 |
+
|
683 |
+
|
684 |
+
/* Scroll Bar */
|
685 |
+
.wpr-tplib-popup ::-webkit-scrollbar {
|
686 |
+
width: 6px;
|
687 |
+
height: 0;
|
688 |
+
border-radius: 3px;
|
689 |
+
}
|
690 |
+
|
691 |
+
.wpr-tplib-popup ::-webkit-scrollbar-button {
|
692 |
+
width: 0px;
|
693 |
+
height: 10px;
|
694 |
+
}
|
695 |
+
|
696 |
+
.wpr-tplib-popup ::-webkit-scrollbar-thumb {
|
697 |
+
background-color: #d5dadf;
|
698 |
+
border: 0px none #d5dadf;
|
699 |
+
border-radius: 3px;
|
700 |
+
}
|
701 |
+
|
702 |
+
.wpr-tplib-popup ::-webkit-scrollbar-track {
|
703 |
+
border: 0px none #fff;
|
704 |
+
border-radius: 0;
|
705 |
+
}
|
706 |
+
|
707 |
+
.wpr-tplib-popup ::-webkit-scrollbar-corner {
|
708 |
+
background: transparent;
|
709 |
}
|
assets/css/library-frontend.min.css
CHANGED
@@ -1,712 +1,712 @@
|
|
1 |
-
/*--------------------------------------------------------------
|
2 |
-
== Library - Predefined Styles
|
3 |
-
--------------------------------------------------------------*/
|
4 |
-
#wpr-library-btn {
|
5 |
-
display: -webkit-inline-box;
|
6 |
-
display: -ms-inline-flexbox;
|
7 |
-
display: inline-flex;
|
8 |
-
width: 40px;
|
9 |
-
height: 40px;
|
10 |
-
vertical-align: top;
|
11 |
-
margin-left: 10px;
|
12 |
-
color: #fff;
|
13 |
-
font-family: Arial,Helvetica,sans-serif;
|
14 |
-
font-weight: bold;
|
15 |
-
letter-spacing: 0.3px;
|
16 |
-
cursor: pointer;
|
17 |
-
}
|
18 |
-
|
19 |
-
.wpr-library-icon {
|
20 |
-
display: -webkit-inline-box;
|
21 |
-
display: -ms-inline-flexbox;
|
22 |
-
display: inline-flex;
|
23 |
-
padding: 10px;
|
24 |
-
margin-right: 10px;
|
25 |
-
border-radius: 50%;
|
26 |
-
color: transparent;
|
27 |
-
font-family: Arial,Helvetica,sans-serif;
|
28 |
-
font-size: 14px;
|
29 |
-
font-weight: bold;
|
30 |
-
letter-spacing: 0.3px;
|
31 |
-
}
|
32 |
-
|
33 |
-
.wpr-tplib-popup-overlay {
|
34 |
-
position: fixed;
|
35 |
-
top: 0;
|
36 |
-
left: 0;
|
37 |
-
z-index: 999999;
|
38 |
-
width: 100%;
|
39 |
-
height: 100%;
|
40 |
-
background: rgba(0,0,0,0.5);
|
41 |
-
}
|
42 |
-
|
43 |
-
.wpr-tplib-popup {
|
44 |
-
overflow: hidden;
|
45 |
-
position: absolute;
|
46 |
-
top: 30%;
|
47 |
-
left: 50%;
|
48 |
-
-webkit-transform: translate(-50%,-30%);
|
49 |
-
-ms-transform: translate(-50%,-30%);
|
50 |
-
transform: translate(-50%,-30%);
|
51 |
-
background: #f1f3f5;
|
52 |
-
min-width: 100%;
|
53 |
-
height: 100%;
|
54 |
-
}
|
55 |
-
|
56 |
-
.wpr-tplib-header {
|
57 |
-
display: -webkit-box;
|
58 |
-
display: -ms-flexbox;
|
59 |
-
display: flex;
|
60 |
-
-webkit-box-align: center;
|
61 |
-
-ms-flex-align: center;
|
62 |
-
align-items: center;
|
63 |
-
background-color: #fff;
|
64 |
-
-webkit-box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
|
65 |
-
box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
|
66 |
-
position: relative;
|
67 |
-
z-index: 10;
|
68 |
-
}
|
69 |
-
|
70 |
-
.wpr-tplib-logo {
|
71 |
-
display: -webkit-box;
|
72 |
-
display: -ms-flexbox;
|
73 |
-
display: flex;
|
74 |
-
-webkit-box-align: center;
|
75 |
-
-ms-flex-align: center;
|
76 |
-
align-items: center;
|
77 |
-
-webkit-box-pack: start;
|
78 |
-
-ms-flex-pack: start;
|
79 |
-
justify-content: flex-start;
|
80 |
-
width: 200px;
|
81 |
-
padding-left: 30px;
|
82 |
-
color: #495157;
|
83 |
-
font-size: 15px;
|
84 |
-
font-weight: 700;
|
85 |
-
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
|
86 |
-
}
|
87 |
-
|
88 |
-
.wpr-tplib-header ul {
|
89 |
-
display: -webkit-inline-box;
|
90 |
-
display: -ms-inline-flexbox;
|
91 |
-
display: inline-flex;
|
92 |
-
-webkit-box-pack: center;
|
93 |
-
-ms-flex-pack: center;
|
94 |
-
justify-content: center;
|
95 |
-
width: 100%;
|
96 |
-
margin: 0;
|
97 |
-
padding: 0;
|
98 |
-
margin-left: -130px;
|
99 |
-
list-style: none;
|
100 |
-
}
|
101 |
-
|
102 |
-
.wpr-tplib-header ul li {
|
103 |
-
width: 115px;
|
104 |
-
padding: 20px 0;
|
105 |
-
color: #6d7882;
|
106 |
-
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
|
107 |
-
font-size: 14px;
|
108 |
-
line-height: 1;
|
109 |
-
font-weight: 500;
|
110 |
-
text-align: center;
|
111 |
-
cursor: pointer;
|
112 |
-
|
113 |
-
}
|
114 |
-
|
115 |
-
.wpr-tplib-active-tab {
|
116 |
-
background-image: -o-linear-gradient(top,#f1f3f5,#fff);
|
117 |
-
background-image: -webkit-gradient(linear,left top, left bottom,from(#f1f3f5),to(#fff));
|
118 |
-
background-image: linear-gradient(180deg,#f1f3f5,#fff);
|
119 |
-
border-bottom: 3px solid #6A4BFF;
|
120 |
-
}
|
121 |
-
|
122 |
-
.wpr-tplib-close {
|
123 |
-
display: -webkit-box;
|
124 |
-
display: -ms-flexbox;
|
125 |
-
display: flex;
|
126 |
-
-webkit-box-align: center;
|
127 |
-
-ms-flex-align: center;
|
128 |
-
align-items: center;
|
129 |
-
-webkit-box-pack: end;
|
130 |
-
-ms-flex-pack: end;
|
131 |
-
justify-content: flex-end;
|
132 |
-
padding-right: 30px;
|
133 |
-
color: #a4afb7;
|
134 |
-
font-size: 18px;
|
135 |
-
cursor: pointer;
|
136 |
-
-webkit-transition: all .3s;
|
137 |
-
-o-transition: all .3s;
|
138 |
-
transition: all .3s;
|
139 |
-
}
|
140 |
-
|
141 |
-
.wpr-tplib-close:hover {
|
142 |
-
color: #3a3a3a;
|
143 |
-
}
|
144 |
-
|
145 |
-
.wpr-tplib-close i {
|
146 |
-
line-height: 20px;
|
147 |
-
padding-left: 20px;
|
148 |
-
}
|
149 |
-
|
150 |
-
.wpr-tplib-popup h3 {
|
151 |
-
margin: 0;
|
152 |
-
}
|
153 |
-
|
154 |
-
.wpr-tplib-header .wpr-tplib-insert-template {
|
155 |
-
display: none;
|
156 |
-
width: 120px;
|
157 |
-
height: 27px;
|
158 |
-
line-height: 27px;
|
159 |
-
padding: 0 15px;
|
160 |
-
margin-right: 15px;
|
161 |
-
color: #fff;
|
162 |
-
background-color: #6A4BFF;
|
163 |
-
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
|
164 |
-
font-size: 13px;
|
165 |
-
border-radius: 2px;
|
166 |
-
text-transform: uppercase;
|
167 |
-
cursor: pointer;
|
168 |
-
text-align: center;
|
169 |
-
}
|
170 |
-
|
171 |
-
.wpr-tplib-back {
|
172 |
-
display: none;
|
173 |
-
width: 230px;
|
174 |
-
padding: 17px 15px;
|
175 |
-
border-right: 1px solid #e6e9ec;
|
176 |
-
color: #6d7882;
|
177 |
-
font-size: 15px;
|
178 |
-
font-weight: 700;
|
179 |
-
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
|
180 |
-
cursor: pointer;
|
181 |
-
-webkit-transition: all .3s;
|
182 |
-
-o-transition: all .3s;
|
183 |
-
transition: all .3s;
|
184 |
-
}
|
185 |
-
|
186 |
-
.wpr-tplib-back:hover {
|
187 |
-
color: #495157;
|
188 |
-
}
|
189 |
-
|
190 |
-
.wpr-tplib-back i {
|
191 |
-
margin-right: 5px;
|
192 |
-
}
|
193 |
-
|
194 |
-
.wpr-tplib-back span {
|
195 |
-
|
196 |
-
}
|
197 |
-
|
198 |
-
.wpr-tplib-content-wrap {
|
199 |
-
}
|
200 |
-
|
201 |
-
.wpr-tplib-sidebar {
|
202 |
-
padding: 30px 30px 20px 30px;
|
203 |
-
}
|
204 |
-
|
205 |
-
.wpr-tplib-sidebar .wpr-tplib-search {
|
206 |
-
display: none;
|
207 |
-
position: relative;
|
208 |
-
margin: 30px 0;
|
209 |
-
}
|
210 |
-
|
211 |
-
.wpr-tplib-sidebar .wpr-tplib-search i {
|
212 |
-
position: absolute;
|
213 |
-
top: 50%;
|
214 |
-
right: 10px;
|
215 |
-
font-size: 12px;
|
216 |
-
-webkit-transform: translateY(-50%);
|
217 |
-
-ms-transform: translateY(-50%);
|
218 |
-
transform: translateY(-50%);
|
219 |
-
}
|
220 |
-
|
221 |
-
.wpr-tplib-sidebar .wpr-tplib-search input {
|
222 |
-
width: 100%;
|
223 |
-
padding: 8px 10px;
|
224 |
-
border: 0;
|
225 |
-
border-bottom: 1px solid #efefef;
|
226 |
-
}
|
227 |
-
|
228 |
-
.wpr-tplib-sidebar .wpr-tplib-search input::-webkit-input-placeholder {
|
229 |
-
color: #9a9a9a;
|
230 |
-
}
|
231 |
-
|
232 |
-
.wpr-tplib-sidebar .wpr-tplib-search input::-moz-placeholder {
|
233 |
-
color: #9a9a9a;
|
234 |
-
}
|
235 |
-
|
236 |
-
.wpr-tplib-sidebar .wpr-tplib-search input:-ms-input-placeholder {
|
237 |
-
color: #9a9a9a;
|
238 |
-
}
|
239 |
-
|
240 |
-
.wpr-tplib-sidebar .wpr-tplib-search input::-ms-input-placeholder {
|
241 |
-
color: #9a9a9a;
|
242 |
-
}
|
243 |
-
|
244 |
-
.wpr-tplib-sidebar .wpr-tplib-search input::placeholder {
|
245 |
-
color: #9a9a9a;
|
246 |
-
}
|
247 |
-
|
248 |
-
.wpr-tplib-filters-wrap {
|
249 |
-
display: -webkit-box;
|
250 |
-
display: -ms-flexbox;
|
251 |
-
display: flex;
|
252 |
-
}
|
253 |
-
|
254 |
-
.wpr-tplib-sub-filters {
|
255 |
-
display: none;
|
256 |
-
margin-left: 20px;
|
257 |
-
}
|
258 |
-
|
259 |
-
.wpr-tplib-sub-filters ul {
|
260 |
-
display: -webkit-box;
|
261 |
-
display: -ms-flexbox;
|
262 |
-
display: flex;
|
263 |
-
}
|
264 |
-
|
265 |
-
.wpr-tplib-sub-filters ul li {
|
266 |
-
padding: 10px 25px;
|
267 |
-
margin-right: 7px;
|
268 |
-
line-height: 15px;
|
269 |
-
font-size: 13px;
|
270 |
-
font-weight: normal;
|
271 |
-
background: #fff;
|
272 |
-
-webkit-box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
|
273 |
-
box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
|
274 |
-
cursor: pointer;
|
275 |
-
border-radius: 3px;
|
276 |
-
}
|
277 |
-
|
278 |
-
.wpr-tplib-sub-filters ul li:hover,
|
279 |
-
.wpr-tplib-sub-filters ul .wpr-tplib-activ-filter {
|
280 |
-
background: #6A4BFF;
|
281 |
-
color: #fff;
|
282 |
-
}
|
283 |
-
|
284 |
-
.wpr-tplib-filters {
|
285 |
-
-webkit-box-sizing: border-box;
|
286 |
-
box-sizing: border-box;
|
287 |
-
display: -webkit-box;
|
288 |
-
display: -ms-flexbox;
|
289 |
-
display: flex;
|
290 |
-
-webkit-box-orient: vertical;
|
291 |
-
-webkit-box-direction: normal;
|
292 |
-
-ms-flex-direction: column;
|
293 |
-
flex-direction: column;
|
294 |
-
-webkit-box-align: start;
|
295 |
-
-ms-flex-align: start;
|
296 |
-
align-items: flex-start;
|
297 |
-
position: relative;
|
298 |
-
width: 200px;
|
299 |
-
font-size: 14px;
|
300 |
-
font-weight: normal;
|
301 |
-
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
|
302 |
-
color: #6d7882;
|
303 |
-
}
|
304 |
-
|
305 |
-
.wpr-tplib-filters h3 {
|
306 |
-
display: -webkit-box;
|
307 |
-
display: -ms-flexbox;
|
308 |
-
display: flex;
|
309 |
-
width: 100%;
|
310 |
-
padding: 10px 15px;
|
311 |
-
font-size: 13px;
|
312 |
-
font-weight: normal;
|
313 |
-
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
|
314 |
-
background: #fff;
|
315 |
-
-webkit-box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
|
316 |
-
box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
|
317 |
-
cursor: pointer;
|
318 |
-
border-radius: 3px;
|
319 |
-
}
|
320 |
-
|
321 |
-
.wpr-tplib-filters h3 span {
|
322 |
-
width: 100%;
|
323 |
-
}
|
324 |
-
|
325 |
-
.wpr-tplib-filters-list {
|
326 |
-
visibility: hidden;
|
327 |
-
opacity: 0;
|
328 |
-
position: absolute;
|
329 |
-
top: 38px;
|
330 |
-
z-index: 999;
|
331 |
-
width: 700px;
|
332 |
-
padding: 20px 30px;
|
333 |
-
background: #fff;
|
334 |
-
-webkit-box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
|
335 |
-
box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
|
336 |
-
-webkit-transition: all 0.2s ease-in;
|
337 |
-
-o-transition: all 0.2s ease-in;
|
338 |
-
transition: all 0.2s ease-in;
|
339 |
-
border-radius: 3px;
|
340 |
-
}
|
341 |
-
|
342 |
-
.wpr-tplib-filters-list ul {
|
343 |
-
display: -webkit-box;
|
344 |
-
display: -ms-flexbox;
|
345 |
-
display: flex;
|
346 |
-
-ms-flex-wrap: wrap;
|
347 |
-
flex-wrap: wrap;
|
348 |
-
list-style: none;
|
349 |
-
padding-left: 0;
|
350 |
-
}
|
351 |
-
|
352 |
-
.wpr-tplib-filters-list ul li {
|
353 |
-
width: 25%;
|
354 |
-
padding: 12px;
|
355 |
-
color: #6d7882;
|
356 |
-
background: #fff;
|
357 |
-
font-size: 13px;
|
358 |
-
line-height: 1;
|
359 |
-
cursor: pointer;
|
360 |
-
}
|
361 |
-
|
362 |
-
.wpr-tplib-filters-list ul li:hover {
|
363 |
-
background: #f9f9f9;
|
364 |
-
color: #222;
|
365 |
-
}
|
366 |
-
|
367 |
-
.wpr-tplib-template-gird {
|
368 |
-
position: absolute;
|
369 |
-
width: 100%;
|
370 |
-
height: calc(100% - 132px);
|
371 |
-
overflow: auto;
|
372 |
-
padding: 0 30px 30px 30px;
|
373 |
-
margin-left: -10px;
|
374 |
-
}
|
375 |
-
|
376 |
-
.wpr-tplib-template-wrap {
|
377 |
-
float: left;
|
378 |
-
overflow: hidden;
|
379 |
-
width: 18.5%;
|
380 |
-
margin: 10px;
|
381 |
-
border-radius: 3px;
|
382 |
-
-webkit-box-shadow: 0 1px 20px 0 rgba(0,0,0,0.07);
|
383 |
-
box-shadow: 0 1px 20px 0 rgba(0,0,0,0.07);
|
384 |
-
}
|
385 |
-
|
386 |
-
.wpr-tplib-template-wrap:not(.wpr-tplib-pro-active):before {
|
387 |
-
content: 'Free';
|
388 |
-
display: block;
|
389 |
-
position: absolute;
|
390 |
-
top: 10px;
|
391 |
-
right: 10px;
|
392 |
-
z-index: 1;
|
393 |
-
width: 45px;
|
394 |
-
padding: 4px;
|
395 |
-
font-size: 11px;
|
396 |
-
line-height: 16px;
|
397 |
-
font-weight: bold;
|
398 |
-
letter-spacing: 0.3px;
|
399 |
-
text-transform: uppercase;
|
400 |
-
text-align: center;
|
401 |
-
background: #555;
|
402 |
-
color: #fff;
|
403 |
-
-webkit-box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.3);
|
404 |
-
box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.3);
|
405 |
-
border-radius: 3px;
|
406 |
-
}
|
407 |
-
|
408 |
-
.wpr-tplib-pro-wrap:not(.wpr-tplib-pro-active):before {
|
409 |
-
content: 'Pro';
|
410 |
-
background: #6A4BFF;
|
411 |
-
}
|
412 |
-
|
413 |
-
@media screen and ( max-width: 1364px ) {
|
414 |
-
.wpr-tplib-template-wrap {
|
415 |
-
width: 23%;
|
416 |
-
}
|
417 |
-
}
|
418 |
-
|
419 |
-
.wpr-tplib-template {
|
420 |
-
}
|
421 |
-
|
422 |
-
.wpr-tplib-template-wrap:hover .wpr-tplib-insert-template {
|
423 |
-
opacity: 1;
|
424 |
-
visibility: visible;
|
425 |
-
}
|
426 |
-
|
427 |
-
.wpr-tplib-template-media {
|
428 |
-
position: relative;
|
429 |
-
background-color: #e8e8e8;
|
430 |
-
}
|
431 |
-
|
432 |
-
.wpr-tplib-template-media img {
|
433 |
-
width: 100%;
|
434 |
-
max-width: 100%;
|
435 |
-
height: auto;
|
436 |
-
}
|
437 |
-
|
438 |
-
.wpr-tplib-template-media:hover .wpr-tplib-template-media-overlay {
|
439 |
-
opacity: 1;
|
440 |
-
}
|
441 |
-
|
442 |
-
.wpr-tplib-template-media-overlay {
|
443 |
-
opacity: 0;
|
444 |
-
position: absolute;
|
445 |
-
top: 0;
|
446 |
-
left: 0;
|
447 |
-
width: 100%;
|
448 |
-
height: 100%;
|
449 |
-
background-color: rgba(0, 0, 0, 0.5);
|
450 |
-
color: #fff;
|
451 |
-
cursor: pointer;
|
452 |
-
-webkit-transition: opacity 0.1s ease-in;
|
453 |
-
-o-transition: opacity 0.1s ease-in;
|
454 |
-
transition: opacity 0.1s ease-in;
|
455 |
-
}
|
456 |
-
|
457 |
-
.wpr-tplib-template-media-overlay i {
|
458 |
-
position: absolute;
|
459 |
-
top: 50%;
|
460 |
-
left: 50%;
|
461 |
-
-webkit-transform: translate(-50%, -50%);
|
462 |
-
-ms-transform: translate(-50%, -50%);
|
463 |
-
transform: translate(-50%, -50%);
|
464 |
-
font-size: 25px;
|
465 |
-
}
|
466 |
-
|
467 |
-
.wpr-tplib-preview-wrap {
|
468 |
-
display: none;
|
469 |
-
}
|
470 |
-
|
471 |
-
.wpr-tplib-image {
|
472 |
-
display: -webkit-box;
|
473 |
-
display: -ms-flexbox;
|
474 |
-
display: flex;
|
475 |
-
-webkit-box-pack: center;
|
476 |
-
-ms-flex-pack: center;
|
477 |
-
justify-content: center;
|
478 |
-
padding: 20px;
|
479 |
-
}
|
480 |
-
|
481 |
-
.wpr-tplib-iframe {
|
482 |
-
position: relative;
|
483 |
-
padding-top: 56.25%;
|
484 |
-
}
|
485 |
-
|
486 |
-
.wpr-tplib-iframe iframe {
|
487 |
-
position: absolute;
|
488 |
-
top: 0;
|
489 |
-
left: 0;
|
490 |
-
width: 100%;
|
491 |
-
height: 100%;
|
492 |
-
border: none;
|
493 |
-
}
|
494 |
-
|
495 |
-
.wpr-tplib-template-footer {
|
496 |
-
display: -webkit-box;
|
497 |
-
display: -ms-flexbox;
|
498 |
-
display: flex;
|
499 |
-
-webkit-box-orient: vertical;
|
500 |
-
-webkit-box-direction: normal;
|
501 |
-
-ms-flex-flow: column wrap;
|
502 |
-
flex-flow: column wrap;
|
503 |
-
-ms-flex-line-pack: justify;
|
504 |
-
align-content: space-between;
|
505 |
-
-webkit-box-pack: center;
|
506 |
-
-ms-flex-pack: center;
|
507 |
-
justify-content: center;
|
508 |
-
height: 45px;
|
509 |
-
padding: 5px 15px;
|
510 |
-
background-color: #fff;
|
511 |
-
border-top: 1px solid #efefef;
|
512 |
-
}
|
513 |
-
|
514 |
-
.wpr-tplib-template-footer h3 {
|
515 |
-
overflow: hidden;
|
516 |
-
color: #6d7882;
|
517 |
-
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
|
518 |
-
font-size: 13px;
|
519 |
-
font-weight: normal;
|
520 |
-
white-space: nowrap;
|
521 |
-
-o-text-overflow: ellipsis;
|
522 |
-
text-overflow: ellipsis;
|
523 |
-
}
|
524 |
-
|
525 |
-
.wpr-tplib-template-footer .wpr-tplib-insert-template {
|
526 |
-
opacity: 0;
|
527 |
-
visibility: hidden;
|
528 |
-
padding: 6px 10px;
|
529 |
-
color: #fff;
|
530 |
-
background-color: #6A4BFF;
|
531 |
-
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
|
532 |
-
font-size: 13px;
|
533 |
-
line-height: 1;
|
534 |
-
letter-spacing: 0.3px;
|
535 |
-
border-radius: 3px;
|
536 |
-
cursor: pointer;
|
537 |
-
-webkit-transition: all 0.1s ease-in;
|
538 |
-
-o-transition: all 0.1s ease-in;
|
539 |
-
transition: all 0.1s ease-in;
|
540 |
-
}
|
541 |
-
|
542 |
-
|
543 |
-
#masonry-effect {
|
544 |
-
display: -webkit-box;
|
545 |
-
display: -ms-flexbox;
|
546 |
-
display: flex;
|
547 |
-
-webkit-box-orient: horizontal;
|
548 |
-
-webkit-box-direction: normal;
|
549 |
-
-ms-flex-direction: row;
|
550 |
-
flex-direction: row;
|
551 |
-
-ms-flex-wrap: wrap;
|
552 |
-
flex-wrap: wrap;
|
553 |
-
}
|
554 |
-
.item {
|
555 |
-
-webkit-box-sizing: border-box;
|
556 |
-
box-sizing: border-box;
|
557 |
-
-webkit-box-orient: vertical;
|
558 |
-
-webkit-box-direction: normal;
|
559 |
-
-ms-flex-direction: column;
|
560 |
-
flex-direction: column;
|
561 |
-
position: relative;
|
562 |
-
width: calc(33.3%);
|
563 |
-
}
|
564 |
-
|
565 |
-
|
566 |
-
/* Elementor Loader */
|
567 |
-
.wpr-tplib-loader {
|
568 |
-
overflow: auto;
|
569 |
-
position: absolute;
|
570 |
-
width: 100%;
|
571 |
-
height: 100%;
|
572 |
-
z-index: 9999999999;
|
573 |
-
background-color: #f1f3f5;
|
574 |
-
}
|
575 |
-
|
576 |
-
.elementor-loader-wrapper {
|
577 |
-
position: absolute;
|
578 |
-
width: 300px;
|
579 |
-
left: 50%;
|
580 |
-
top: 50%;
|
581 |
-
-webkit-transform: translateX(-50%) translateY(-50%);
|
582 |
-
-ms-transform: translateX(-50%) translateY(-50%);
|
583 |
-
transform: translateX(-50%) translateY(-50%);
|
584 |
-
display: -webkit-box;
|
585 |
-
display: -ms-flexbox;
|
586 |
-
display: flex;
|
587 |
-
-ms-flex-wrap: wrap;
|
588 |
-
flex-wrap: wrap;
|
589 |
-
-webkit-box-pack: center;
|
590 |
-
-ms-flex-pack: center;
|
591 |
-
justify-content: center;
|
592 |
-
}
|
593 |
-
|
594 |
-
.elementor-loader {
|
595 |
-
border-radius: 7px;
|
596 |
-
padding: 40px;
|
597 |
-
height: 150px;
|
598 |
-
width: 150px;
|
599 |
-
background-color: rgba(255, 255, 255, 0.9);
|
600 |
-
-webkit-box-sizing: border-box;
|
601 |
-
box-sizing: border-box;
|
602 |
-
-webkit-box-shadow: 2px 2px 20px 4px rgba(0, 0, 0, 0.02);
|
603 |
-
box-shadow: 2px 2px 20px 4px rgba(0, 0, 0, 0.02);
|
604 |
-
}
|
605 |
-
|
606 |
-
.elementor-loader-boxes {
|
607 |
-
height: 100%;
|
608 |
-
width: 100%;
|
609 |
-
position: relative;
|
610 |
-
}
|
611 |
-
|
612 |
-
.elementor-loader-box {
|
613 |
-
position: absolute;
|
614 |
-
background-color: #d5dadf;
|
615 |
-
-webkit-animation: load 1.8s linear infinite;
|
616 |
-
animation: load 1.8s linear infinite;
|
617 |
-
}
|
618 |
-
|
619 |
-
.elementor-loader-box:nth-of-type(1) {
|
620 |
-
width: 20%;
|
621 |
-
height: 100%;
|
622 |
-
left: 0;
|
623 |
-
top: 0;
|
624 |
-
}
|
625 |
-
|
626 |
-
.elementor-loader-box:not(:nth-of-type(1)) {
|
627 |
-
right: 0;
|
628 |
-
height: 20%;
|
629 |
-
width: 60%;
|
630 |
-
}
|
631 |
-
|
632 |
-
.elementor-loader-box:nth-of-type(2) {
|
633 |
-
top: 0;
|
634 |
-
-webkit-animation-delay: -0.45s;
|
635 |
-
animation-delay: -0.45s;
|
636 |
-
}
|
637 |
-
|
638 |
-
.elementor-loader-box:nth-of-type(3) {
|
639 |
-
top: 40%;
|
640 |
-
-webkit-animation-delay: -0.9s;
|
641 |
-
animation-delay: -0.9s;
|
642 |
-
}
|
643 |
-
|
644 |
-
.elementor-loader-box:nth-of-type(4) {
|
645 |
-
bottom: 0;
|
646 |
-
-webkit-animation-delay: -1.35s;
|
647 |
-
animation-delay: -1.35s;
|
648 |
-
}
|
649 |
-
|
650 |
-
@-webkit-keyframes load {
|
651 |
-
0% {
|
652 |
-
opacity: .3;
|
653 |
-
}
|
654 |
-
50% {
|
655 |
-
opacity: 1;
|
656 |
-
}
|
657 |
-
100% {
|
658 |
-
opacity: .3;
|
659 |
-
}
|
660 |
-
}
|
661 |
-
|
662 |
-
@keyframes load {
|
663 |
-
0% {
|
664 |
-
opacity: .3;
|
665 |
-
}
|
666 |
-
50% {
|
667 |
-
opacity: 1;
|
668 |
-
}
|
669 |
-
100% {
|
670 |
-
opacity: .3;
|
671 |
-
}
|
672 |
-
}
|
673 |
-
|
674 |
-
.elementor-loading-title {
|
675 |
-
font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
|
676 |
-
color: #a4afb7;
|
677 |
-
text-align: center;
|
678 |
-
text-transform: uppercase;
|
679 |
-
margin-top: 30px;
|
680 |
-
letter-spacing: 7px;
|
681 |
-
text-indent: 7px;
|
682 |
-
font-size: 10px;
|
683 |
-
width: 100%;
|
684 |
-
}
|
685 |
-
|
686 |
-
|
687 |
-
/* Scroll Bar */
|
688 |
-
.wpr-tplib-popup ::-webkit-scrollbar {
|
689 |
-
width: 6px;
|
690 |
-
height: 0;
|
691 |
-
border-radius: 3px;
|
692 |
-
}
|
693 |
-
|
694 |
-
.wpr-tplib-popup ::-webkit-scrollbar-button {
|
695 |
-
width: 0px;
|
696 |
-
height: 10px;
|
697 |
-
}
|
698 |
-
|
699 |
-
.wpr-tplib-popup ::-webkit-scrollbar-thumb {
|
700 |
-
background-color: #d5dadf;
|
701 |
-
border: 0px none #d5dadf;
|
702 |
-
border-radius: 3px;
|
703 |
-
}
|
704 |
-
|
705 |
-
.wpr-tplib-popup ::-webkit-scrollbar-track {
|
706 |
-
border: 0px none #fff;
|
707 |
-
border-radius: 0;
|
708 |
-
}
|
709 |
-
|
710 |
-
.wpr-tplib-popup ::-webkit-scrollbar-corner {
|
711 |
-
background: transparent;
|
712 |
}
|
1 |
+
/*--------------------------------------------------------------
|
2 |
+
== Library - Predefined Styles
|
3 |
+
--------------------------------------------------------------*/
|
4 |
+
#wpr-library-btn {
|
5 |
+
display: -webkit-inline-box;
|
6 |
+
display: -ms-inline-flexbox;
|
7 |
+
display: inline-flex;
|
8 |
+
width: 40px;
|
9 |
+
height: 40px;
|
10 |
+
vertical-align: top;
|
11 |
+
margin-left: 10px;
|
12 |
+
color: #fff;
|
13 |
+
font-family: Arial,Helvetica,sans-serif;
|
14 |
+
font-weight: bold;
|
15 |
+
letter-spacing: 0.3px;
|
16 |
+
cursor: pointer;
|
17 |
+
}
|
18 |
+
|
19 |
+
.wpr-library-icon {
|
20 |
+
display: -webkit-inline-box;
|
21 |
+
display: -ms-inline-flexbox;
|
22 |
+
display: inline-flex;
|
23 |
+
padding: 10px;
|
24 |
+
margin-right: 10px;
|
25 |
+
border-radius: 50%;
|
26 |
+
color: transparent;
|
27 |
+
font-family: Arial,Helvetica,sans-serif;
|
28 |
+
font-size: 14px;
|
29 |
+
font-weight: bold;
|
30 |
+
letter-spacing: 0.3px;
|
31 |
+
}
|
32 |
+
|
33 |
+
.wpr-tplib-popup-overlay {
|
34 |
+
position: fixed;
|
35 |
+
top: 0;
|
36 |
+
left: 0;
|
37 |
+
z-index: 999999;
|
38 |
+
width: 100%;
|
39 |
+
height: 100%;
|
40 |
+
background: rgba(0,0,0,0.5);
|
41 |
+
}
|
42 |
+
|
43 |
+
.wpr-tplib-popup {
|
44 |
+
overflow: hidden;
|
45 |
+
position: absolute;
|
46 |
+
top: 30%;
|
47 |
+
left: 50%;
|
48 |
+
-webkit-transform: translate(-50%,-30%);
|
49 |
+
-ms-transform: translate(-50%,-30%);
|
50 |
+
transform: translate(-50%,-30%);
|
51 |
+
background: #f1f3f5;
|
52 |
+
min-width: 100%;
|
53 |
+
height: 100%;
|
54 |
+
}
|
55 |
+
|
56 |
+
.wpr-tplib-header {
|
57 |
+
display: -webkit-box;
|
58 |
+
display: -ms-flexbox;
|
59 |
+
display: flex;
|
60 |
+
-webkit-box-align: center;
|
61 |
+
-ms-flex-align: center;
|
62 |
+
align-items: center;
|
63 |
+
background-color: #fff;
|
64 |
+
-webkit-box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
|
65 |
+
box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
|
66 |
+
position: relative;
|
67 |
+
z-index: 10;
|
68 |
+
}
|
69 |
+
|
70 |
+
.wpr-tplib-logo {
|
71 |
+
display: -webkit-box;
|
72 |
+
display: -ms-flexbox;
|
73 |
+
display: flex;
|
74 |
+
-webkit-box-align: center;
|
75 |
+
-ms-flex-align: center;
|
76 |
+
align-items: center;
|
77 |
+
-webkit-box-pack: start;
|
78 |
+
-ms-flex-pack: start;
|
79 |
+
justify-content: flex-start;
|
80 |
+
width: 200px;
|
81 |
+
padding-left: 30px;
|
82 |
+
color: #495157;
|
83 |
+
font-size: 15px;
|
84 |
+
font-weight: 700;
|
85 |
+
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
|
86 |
+
}
|
87 |
+
|
88 |
+
.wpr-tplib-header ul {
|
89 |
+
display: -webkit-inline-box;
|
90 |
+
display: -ms-inline-flexbox;
|
91 |
+
display: inline-flex;
|
92 |
+
-webkit-box-pack: center;
|
93 |
+
-ms-flex-pack: center;
|
94 |
+
justify-content: center;
|
95 |
+
width: 100%;
|
96 |
+
margin: 0;
|
97 |
+
padding: 0;
|
98 |
+
margin-left: -130px;
|
99 |
+
list-style: none;
|
100 |
+
}
|
101 |
+
|
102 |
+
.wpr-tplib-header ul li {
|
103 |
+
width: 115px;
|
104 |
+
padding: 20px 0;
|
105 |
+
color: #6d7882;
|
106 |
+
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
|
107 |
+
font-size: 14px;
|
108 |
+
line-height: 1;
|
109 |
+
font-weight: 500;
|
110 |
+
text-align: center;
|
111 |
+
cursor: pointer;
|
112 |
+
|
113 |
+
}
|
114 |
+
|
115 |
+
.wpr-tplib-active-tab {
|
116 |
+
background-image: -o-linear-gradient(top,#f1f3f5,#fff);
|
117 |
+
background-image: -webkit-gradient(linear,left top, left bottom,from(#f1f3f5),to(#fff));
|
118 |
+
background-image: linear-gradient(180deg,#f1f3f5,#fff);
|
119 |
+
border-bottom: 3px solid #6A4BFF;
|
120 |
+
}
|
121 |
+
|
122 |
+
.wpr-tplib-close {
|
123 |
+
display: -webkit-box;
|
124 |
+
display: -ms-flexbox;
|
125 |
+
display: flex;
|
126 |
+
-webkit-box-align: center;
|
127 |
+
-ms-flex-align: center;
|
128 |
+
align-items: center;
|
129 |
+
-webkit-box-pack: end;
|
130 |
+
-ms-flex-pack: end;
|
131 |
+
justify-content: flex-end;
|
132 |
+
padding-right: 30px;
|
133 |
+
color: #a4afb7;
|
134 |
+
font-size: 18px;
|
135 |
+
cursor: pointer;
|
136 |
+
-webkit-transition: all .3s;
|
137 |
+
-o-transition: all .3s;
|
138 |
+
transition: all .3s;
|
139 |
+
}
|
140 |
+
|
141 |
+
.wpr-tplib-close:hover {
|
142 |
+
color: #3a3a3a;
|
143 |
+
}
|
144 |
+
|
145 |
+
.wpr-tplib-close i {
|
146 |
+
line-height: 20px;
|
147 |
+
padding-left: 20px;
|
148 |
+
}
|
149 |
+
|
150 |
+
.wpr-tplib-popup h3 {
|
151 |
+
margin: 0;
|
152 |
+
}
|
153 |
+
|
154 |
+
.wpr-tplib-header .wpr-tplib-insert-template {
|
155 |
+
display: none;
|
156 |
+
width: 120px;
|
157 |
+
height: 27px;
|
158 |
+
line-height: 27px;
|
159 |
+
padding: 0 15px;
|
160 |
+
margin-right: 15px;
|
161 |
+
color: #fff;
|
162 |
+
background-color: #6A4BFF;
|
163 |
+
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
|
164 |
+
font-size: 13px;
|
165 |
+
border-radius: 2px;
|
166 |
+
text-transform: uppercase;
|
167 |
+
cursor: pointer;
|
168 |
+
text-align: center;
|
169 |
+
}
|
170 |
+
|
171 |
+
.wpr-tplib-back {
|
172 |
+
display: none;
|
173 |
+
width: 230px;
|
174 |
+
padding: 17px 15px;
|
175 |
+
border-right: 1px solid #e6e9ec;
|
176 |
+
color: #6d7882;
|
177 |
+
font-size: 15px;
|
178 |
+
font-weight: 700;
|
179 |
+
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
|
180 |
+
cursor: pointer;
|
181 |
+
-webkit-transition: all .3s;
|
182 |
+
-o-transition: all .3s;
|
183 |
+
transition: all .3s;
|
184 |
+
}
|
185 |
+
|
186 |
+
.wpr-tplib-back:hover {
|
187 |
+
color: #495157;
|
188 |
+
}
|
189 |
+
|
190 |
+
.wpr-tplib-back i {
|
191 |
+
margin-right: 5px;
|
192 |
+
}
|
193 |
+
|
194 |
+
.wpr-tplib-back span {
|
195 |
+
|
196 |
+
}
|
197 |
+
|
198 |
+
.wpr-tplib-content-wrap {
|
199 |
+
}
|
200 |
+
|
201 |
+
.wpr-tplib-sidebar {
|
202 |
+
padding: 30px 30px 20px 30px;
|
203 |
+
}
|
204 |
+
|
205 |
+
.wpr-tplib-sidebar .wpr-tplib-search {
|
206 |
+
display: none;
|
207 |
+
position: relative;
|
208 |
+
margin: 30px 0;
|
209 |
+
}
|
210 |
+
|
211 |
+
.wpr-tplib-sidebar .wpr-tplib-search i {
|
212 |
+
position: absolute;
|
213 |
+
top: 50%;
|
214 |
+
right: 10px;
|
215 |
+
font-size: 12px;
|
216 |
+
-webkit-transform: translateY(-50%);
|
217 |
+
-ms-transform: translateY(-50%);
|
218 |
+
transform: translateY(-50%);
|
219 |
+
}
|
220 |
+
|
221 |
+
.wpr-tplib-sidebar .wpr-tplib-search input {
|
222 |
+
width: 100%;
|
223 |
+
padding: 8px 10px;
|
224 |
+
border: 0;
|
225 |
+
border-bottom: 1px solid #efefef;
|
226 |
+
}
|
227 |
+
|
228 |
+
.wpr-tplib-sidebar .wpr-tplib-search input::-webkit-input-placeholder {
|
229 |
+
color: #9a9a9a;
|
230 |
+
}
|
231 |
+
|
232 |
+
.wpr-tplib-sidebar .wpr-tplib-search input::-moz-placeholder {
|
233 |
+
color: #9a9a9a;
|
234 |
+
}
|
235 |
+
|
236 |
+
.wpr-tplib-sidebar .wpr-tplib-search input:-ms-input-placeholder {
|
237 |
+
color: #9a9a9a;
|
238 |
+
}
|
239 |
+
|
240 |
+
.wpr-tplib-sidebar .wpr-tplib-search input::-ms-input-placeholder {
|
241 |
+
color: #9a9a9a;
|
242 |
+
}
|
243 |
+
|
244 |
+
.wpr-tplib-sidebar .wpr-tplib-search input::placeholder {
|
245 |
+
color: #9a9a9a;
|
246 |
+
}
|
247 |
+
|
248 |
+
.wpr-tplib-filters-wrap {
|
249 |
+
display: -webkit-box;
|
250 |
+
display: -ms-flexbox;
|
251 |
+
display: flex;
|
252 |
+
}
|
253 |
+
|
254 |
+
.wpr-tplib-sub-filters {
|
255 |
+
display: none;
|
256 |
+
margin-left: 20px;
|
257 |
+
}
|
258 |
+
|
259 |
+
.wpr-tplib-sub-filters ul {
|
260 |
+
display: -webkit-box;
|
261 |
+
display: -ms-flexbox;
|
262 |
+
display: flex;
|
263 |
+
}
|
264 |
+
|
265 |
+
.wpr-tplib-sub-filters ul li {
|
266 |
+
padding: 10px 25px;
|
267 |
+
margin-right: 7px;
|
268 |
+
line-height: 15px;
|
269 |
+
font-size: 13px;
|
270 |
+
font-weight: normal;
|
271 |
+
background: #fff;
|
272 |
+
-webkit-box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
|
273 |
+
box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
|
274 |
+
cursor: pointer;
|
275 |
+
border-radius: 3px;
|
276 |
+
}
|
277 |
+
|
278 |
+
.wpr-tplib-sub-filters ul li:hover,
|
279 |
+
.wpr-tplib-sub-filters ul .wpr-tplib-activ-filter {
|
280 |
+
background: #6A4BFF;
|
281 |
+
color: #fff;
|
282 |
+
}
|
283 |
+
|
284 |
+
.wpr-tplib-filters {
|
285 |
+
-webkit-box-sizing: border-box;
|
286 |
+
box-sizing: border-box;
|
287 |
+
display: -webkit-box;
|
288 |
+
display: -ms-flexbox;
|
289 |
+
display: flex;
|
290 |
+
-webkit-box-orient: vertical;
|
291 |
+
-webkit-box-direction: normal;
|
292 |
+
-ms-flex-direction: column;
|
293 |
+
flex-direction: column;
|
294 |
+
-webkit-box-align: start;
|
295 |
+
-ms-flex-align: start;
|
296 |
+
align-items: flex-start;
|
297 |
+
position: relative;
|
298 |
+
width: 200px;
|
299 |
+
font-size: 14px;
|
300 |
+
font-weight: normal;
|
301 |
+
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
|
302 |
+
color: #6d7882;
|
303 |
+
}
|
304 |
+
|
305 |
+
.wpr-tplib-filters h3 {
|
306 |
+
display: -webkit-box;
|
307 |
+
display: -ms-flexbox;
|
308 |
+
display: flex;
|
309 |
+
width: 100%;
|
310 |
+
padding: 10px 15px;
|
311 |
+
font-size: 13px;
|
312 |
+
font-weight: normal;
|
313 |
+
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
|
314 |
+
background: #fff;
|
315 |
+
-webkit-box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
|
316 |
+
box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
|
317 |
+
cursor: pointer;
|
318 |
+
border-radius: 3px;
|
319 |
+
}
|
320 |
+
|
321 |
+
.wpr-tplib-filters h3 span {
|
322 |
+
width: 100%;
|
323 |
+
}
|
324 |
+
|
325 |
+
.wpr-tplib-filters-list {
|
326 |
+
visibility: hidden;
|
327 |
+
opacity: 0;
|
328 |
+
position: absolute;
|
329 |
+
top: 38px;
|
330 |
+
z-index: 999;
|
331 |
+
width: 700px;
|
332 |
+
padding: 20px 30px;
|
333 |
+
background: #fff;
|
334 |
+
-webkit-box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
|
335 |
+
box-shadow: 0 2px 5px 0 rgba(0,0,0,0.05);
|
336 |
+
-webkit-transition: all 0.2s ease-in;
|
337 |
+
-o-transition: all 0.2s ease-in;
|
338 |
+
transition: all 0.2s ease-in;
|
339 |
+
border-radius: 3px;
|
340 |
+
}
|
341 |
+
|
342 |
+
.wpr-tplib-filters-list ul {
|
343 |
+
display: -webkit-box;
|
344 |
+
display: -ms-flexbox;
|
345 |
+
display: flex;
|
346 |
+
-ms-flex-wrap: wrap;
|
347 |
+
flex-wrap: wrap;
|
348 |
+
list-style: none;
|
349 |
+
padding-left: 0;
|
350 |
+
}
|
351 |
+
|
352 |
+
.wpr-tplib-filters-list ul li {
|
353 |
+
width: 25%;
|
354 |
+
padding: 12px;
|
355 |
+
color: #6d7882;
|
356 |
+
background: #fff;
|
357 |
+
font-size: 13px;
|
358 |
+
line-height: 1;
|
359 |
+
cursor: pointer;
|
360 |
+
}
|
361 |
+
|
362 |
+
.wpr-tplib-filters-list ul li:hover {
|
363 |
+
background: #f9f9f9;
|
364 |
+
color: #222;
|
365 |
+
}
|
366 |
+
|
367 |
+
.wpr-tplib-template-gird {
|
368 |
+
position: absolute;
|
369 |
+
width: 100%;
|
370 |
+
height: calc(100% - 132px);
|
371 |
+
overflow: auto;
|
372 |
+
padding: 0 30px 30px 30px;
|
373 |
+
margin-left: -10px;
|
374 |
+
}
|
375 |
+
|
376 |
+
.wpr-tplib-template-wrap {
|
377 |
+
float: left;
|
378 |
+
overflow: hidden;
|
379 |
+
width: 18.5%;
|
380 |
+
margin: 10px;
|
381 |
+
border-radius: 3px;
|
382 |
+
-webkit-box-shadow: 0 1px 20px 0 rgba(0,0,0,0.07);
|
383 |
+
box-shadow: 0 1px 20px 0 rgba(0,0,0,0.07);
|
384 |
+
}
|
385 |
+
|
386 |
+
.wpr-tplib-template-wrap:not(.wpr-tplib-pro-active):before {
|
387 |
+
content: 'Free';
|
388 |
+
display: block;
|
389 |
+
position: absolute;
|
390 |
+
top: 10px;
|
391 |
+
right: 10px;
|
392 |
+
z-index: 1;
|
393 |
+
width: 45px;
|
394 |
+
padding: 4px;
|
395 |
+
font-size: 11px;
|
396 |
+
line-height: 16px;
|
397 |
+
font-weight: bold;
|
398 |
+
letter-spacing: 0.3px;
|
399 |
+
text-transform: uppercase;
|
400 |
+
text-align: center;
|
401 |
+
background: #555;
|
402 |
+
color: #fff;
|
403 |
+
-webkit-box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.3);
|
404 |
+
box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.3);
|
405 |
+
border-radius: 3px;
|
406 |
+
}
|
407 |
+
|
408 |
+
.wpr-tplib-pro-wrap:not(.wpr-tplib-pro-active):before {
|
409 |
+
content: 'Pro';
|
410 |
+
background: #6A4BFF;
|
411 |
+
}
|
412 |
+
|
413 |
+
@media screen and ( max-width: 1364px ) {
|
414 |
+
.wpr-tplib-template-wrap {
|
415 |
+
width: 23%;
|
416 |
+
}
|
417 |
+
}
|
418 |
+
|
419 |
+
.wpr-tplib-template {
|
420 |
+
}
|
421 |
+
|
422 |
+
.wpr-tplib-template-wrap:hover .wpr-tplib-insert-template {
|
423 |
+
opacity: 1;
|
424 |
+
visibility: visible;
|
425 |
+
}
|
426 |
+
|
427 |
+
.wpr-tplib-template-media {
|
428 |
+
position: relative;
|
429 |
+
background-color: #e8e8e8;
|
430 |
+
}
|
431 |
+
|
432 |
+
.wpr-tplib-template-media img {
|
433 |
+
width: 100%;
|
434 |
+
max-width: 100%;
|
435 |
+
height: auto;
|
436 |
+
}
|
437 |
+
|
438 |
+
.wpr-tplib-template-media:hover .wpr-tplib-template-media-overlay {
|
439 |
+
opacity: 1;
|
440 |
+
}
|
441 |
+
|
442 |
+
.wpr-tplib-template-media-overlay {
|
443 |
+
opacity: 0;
|
444 |
+
position: absolute;
|
445 |
+
top: 0;
|
446 |
+
left: 0;
|
447 |
+
width: 100%;
|
448 |
+
height: 100%;
|
449 |
+
background-color: rgba(0, 0, 0, 0.5);
|
450 |
+
color: #fff;
|
451 |
+
cursor: pointer;
|
452 |
+
-webkit-transition: opacity 0.1s ease-in;
|
453 |
+
-o-transition: opacity 0.1s ease-in;
|
454 |
+
transition: opacity 0.1s ease-in;
|
455 |
+
}
|
456 |
+
|
457 |
+
.wpr-tplib-template-media-overlay i {
|
458 |
+
position: absolute;
|
459 |
+
top: 50%;
|
460 |
+
left: 50%;
|
461 |
+
-webkit-transform: translate(-50%, -50%);
|
462 |
+
-ms-transform: translate(-50%, -50%);
|
463 |
+
transform: translate(-50%, -50%);
|
464 |
+
font-size: 25px;
|
465 |
+
}
|
466 |
+
|
467 |
+
.wpr-tplib-preview-wrap {
|
468 |
+
display: none;
|
469 |
+
}
|
470 |
+
|
471 |
+
.wpr-tplib-image {
|
472 |
+
display: -webkit-box;
|
473 |
+
display: -ms-flexbox;
|
474 |
+
display: flex;
|
475 |
+
-webkit-box-pack: center;
|
476 |
+
-ms-flex-pack: center;
|
477 |
+
justify-content: center;
|
478 |
+
padding: 20px;
|
479 |
+
}
|
480 |
+
|
481 |
+
.wpr-tplib-iframe {
|
482 |
+
position: relative;
|
483 |
+
padding-top: 56.25%;
|
484 |
+
}
|
485 |
+
|
486 |
+
.wpr-tplib-iframe iframe {
|
487 |
+
position: absolute;
|
488 |
+
top: 0;
|
489 |
+
left: 0;
|
490 |
+
width: 100%;
|
491 |
+
height: 100%;
|
492 |
+
border: none;
|
493 |
+
}
|
494 |
+
|
495 |
+
.wpr-tplib-template-footer {
|
496 |
+
display: -webkit-box;
|
497 |
+
display: -ms-flexbox;
|
498 |
+
display: flex;
|
499 |
+
-webkit-box-orient: vertical;
|
500 |
+
-webkit-box-direction: normal;
|
501 |
+
-ms-flex-flow: column wrap;
|
502 |
+
flex-flow: column wrap;
|
503 |
+
-ms-flex-line-pack: justify;
|
504 |
+
align-content: space-between;
|
505 |
+
-webkit-box-pack: center;
|
506 |
+
-ms-flex-pack: center;
|
507 |
+
justify-content: center;
|
508 |
+
height: 45px;
|
509 |
+
padding: 5px 15px;
|
510 |
+
background-color: #fff;
|
511 |
+
border-top: 1px solid #efefef;
|
512 |
+
}
|
513 |
+
|
514 |
+
.wpr-tplib-template-footer h3 {
|
515 |
+
overflow: hidden;
|
516 |
+
color: #6d7882;
|
517 |
+
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
|
518 |
+
font-size: 13px;
|
519 |
+
font-weight: normal;
|
520 |
+
white-space: nowrap;
|
521 |
+
-o-text-overflow: ellipsis;
|
522 |
+
text-overflow: ellipsis;
|
523 |
+
}
|
524 |
+
|
525 |
+
.wpr-tplib-template-footer .wpr-tplib-insert-template {
|
526 |
+
opacity: 0;
|
527 |
+
visibility: hidden;
|
528 |
+
padding: 6px 10px;
|
529 |
+
color: #fff;
|
530 |
+
background-color: #6A4BFF;
|
531 |
+
font-family: "Roboto",Arial,Helvetica,Verdana,sans-serif;
|
532 |
+
font-size: 13px;
|
533 |
+
line-height: 1;
|
534 |
+
letter-spacing: 0.3px;
|
535 |
+
border-radius: 3px;
|
536 |
+
cursor: pointer;
|
537 |
+
-webkit-transition: all 0.1s ease-in;
|
538 |
+
-o-transition: all 0.1s ease-in;
|
539 |
+
transition: all 0.1s ease-in;
|
540 |
+
}
|
541 |
+
|
542 |
+
|
543 |
+
#masonry-effect {
|
544 |
+
display: -webkit-box;
|
545 |
+
display: -ms-flexbox;
|
546 |
+
display: flex;
|
547 |
+
-webkit-box-orient: horizontal;
|
548 |
+
-webkit-box-direction: normal;
|
549 |
+
-ms-flex-direction: row;
|
550 |
+
flex-direction: row;
|
551 |
+
-ms-flex-wrap: wrap;
|
552 |
+
flex-wrap: wrap;
|
553 |
+
}
|
554 |
+
.item {
|
555 |
+
-webkit-box-sizing: border-box;
|
556 |
+
box-sizing: border-box;
|
557 |
+
-webkit-box-orient: vertical;
|
558 |
+
-webkit-box-direction: normal;
|
559 |
+
-ms-flex-direction: column;
|
560 |
+
flex-direction: column;
|
561 |
+
position: relative;
|
562 |
+
width: calc(33.3%);
|
563 |
+
}
|
564 |
+
|
565 |
+
|
566 |
+
/* Elementor Loader */
|
567 |
+
.wpr-tplib-loader {
|
568 |
+
overflow: auto;
|
569 |
+
position: absolute;
|
570 |
+
width: 100%;
|
571 |
+
height: 100%;
|
572 |
+
z-index: 9999999999;
|
573 |
+
background-color: #f1f3f5;
|
574 |
+
}
|
575 |
+
|
576 |
+
.elementor-loader-wrapper {
|
577 |
+
position: absolute;
|
578 |
+
width: 300px;
|
579 |
+
left: 50%;
|
580 |
+
top: 50%;
|
581 |
+
-webkit-transform: translateX(-50%) translateY(-50%);
|
582 |
+
-ms-transform: translateX(-50%) translateY(-50%);
|
583 |
+
transform: translateX(-50%) translateY(-50%);
|
584 |
+
display: -webkit-box;
|
585 |
+
display: -ms-flexbox;
|
586 |
+
display: flex;
|
587 |
+
-ms-flex-wrap: wrap;
|
588 |
+
flex-wrap: wrap;
|
589 |
+
-webkit-box-pack: center;
|
590 |
+
-ms-flex-pack: center;
|
591 |
+
justify-content: center;
|
592 |
+
}
|
593 |
+
|
594 |
+
.elementor-loader {
|
595 |
+
border-radius: 7px;
|
596 |
+
padding: 40px;
|
597 |
+
height: 150px;
|
598 |
+
width: 150px;
|
599 |
+
background-color: rgba(255, 255, 255, 0.9);
|
600 |
+
-webkit-box-sizing: border-box;
|
601 |
+
box-sizing: border-box;
|
602 |
+
-webkit-box-shadow: 2px 2px 20px 4px rgba(0, 0, 0, 0.02);
|
603 |
+
box-shadow: 2px 2px 20px 4px rgba(0, 0, 0, 0.02);
|
604 |
+
}
|
605 |
+
|
606 |
+
.elementor-loader-boxes {
|
607 |
+
height: 100%;
|
608 |
+
width: 100%;
|
609 |
+
position: relative;
|
610 |
+
}
|
611 |
+
|
612 |
+
.elementor-loader-box {
|
613 |
+
position: absolute;
|
614 |
+
background-color: #d5dadf;
|
615 |
+
-webkit-animation: load 1.8s linear infinite;
|
616 |
+
animation: load 1.8s linear infinite;
|
617 |
+
}
|
618 |
+
|
619 |
+
.elementor-loader-box:nth-of-type(1) {
|
620 |
+
width: 20%;
|
621 |
+
height: 100%;
|
622 |
+
left: 0;
|
623 |
+
top: 0;
|
624 |
+
}
|
625 |
+
|
626 |
+
.elementor-loader-box:not(:nth-of-type(1)) {
|
627 |
+
right: 0;
|
628 |
+
height: 20%;
|
629 |
+
width: 60%;
|
630 |
+
}
|
631 |
+
|
632 |
+
.elementor-loader-box:nth-of-type(2) {
|
633 |
+
top: 0;
|
634 |
+
-webkit-animation-delay: -0.45s;
|
635 |
+
animation-delay: -0.45s;
|
636 |
+
}
|
637 |
+
|
638 |
+
.elementor-loader-box:nth-of-type(3) {
|
639 |
+
top: 40%;
|
640 |
+
-webkit-animation-delay: -0.9s;
|
641 |
+
animation-delay: -0.9s;
|
642 |
+
}
|
643 |
+
|
644 |
+
.elementor-loader-box:nth-of-type(4) {
|
645 |
+
bottom: 0;
|
646 |
+
-webkit-animation-delay: -1.35s;
|
647 |
+
animation-delay: -1.35s;
|
648 |
+
}
|
649 |
+
|
650 |
+
@-webkit-keyframes load {
|
651 |
+
0% {
|
652 |
+
opacity: .3;
|
653 |
+
}
|
654 |
+
50% {
|
655 |
+
opacity: 1;
|
656 |
+
}
|
657 |
+
100% {
|
658 |
+
opacity: .3;
|
659 |
+
}
|
660 |
+
}
|
661 |
+
|
662 |
+
@keyframes load {
|
663 |
+
0% {
|
664 |
+
opacity: .3;
|
665 |
+
}
|
666 |
+
50% {
|
667 |
+
opacity: 1;
|
668 |
+
}
|
669 |
+
100% {
|
670 |
+
opacity: .3;
|
671 |
+
}
|
672 |
+
}
|
673 |
+
|
674 |
+
.elementor-loading-title {
|
675 |
+
font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
|
676 |
+
color: #a4afb7;
|
677 |
+
text-align: center;
|
678 |
+
text-transform: uppercase;
|
679 |
+
margin-top: 30px;
|
680 |
+
letter-spacing: 7px;
|
681 |
+
text-indent: 7px;
|
682 |
+
font-size: 10px;
|
683 |
+
width: 100%;
|
684 |
+
}
|
685 |
+
|
686 |
+
|
687 |
+
/* Scroll Bar */
|
688 |
+
.wpr-tplib-popup ::-webkit-scrollbar {
|
689 |
+
width: 6px;
|
690 |
+
height: 0;
|
691 |
+
border-radius: 3px;
|
692 |
+
}
|
693 |
+
|
694 |
+
.wpr-tplib-popup ::-webkit-scrollbar-button {
|
695 |
+
width: 0px;
|
696 |
+
height: 10px;
|
697 |
+
}
|
698 |
+
|
699 |
+
.wpr-tplib-popup ::-webkit-scrollbar-thumb {
|
700 |
+
background-color: #d5dadf;
|
701 |
+
border: 0px none #d5dadf;
|
702 |
+
border-radius: 3px;
|
703 |
+
}
|
704 |
+
|
705 |
+
.wpr-tplib-popup ::-webkit-scrollbar-track {
|
706 |
+
border: 0px none #fff;
|
707 |
+
border-radius: 0;
|
708 |
+
}
|
709 |
+
|
710 |
+
.wpr-tplib-popup ::-webkit-scrollbar-corner {
|
711 |
+
background: transparent;
|
712 |
}
|
assets/js/admin/lib/iconpicker/fontawesome-iconpicker.min.css
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
-
/*!
|
2 |
-
* Font Awesome Icon Picker
|
3 |
-
* https://farbelous.github.io/fontawesome-iconpicker/
|
4 |
-
*
|
5 |
-
* @author Javi Aguilar, itsjavi.com
|
6 |
-
* @license MIT License
|
7 |
-
* @see https://github.com/farbelous/fontawesome-iconpicker/blob/master/LICENSE
|
8 |
*/.iconpicker-popover.popover{position:absolute;top:0;left:0;display:none;max-width:none;padding:1px;text-align:left;width:234px;background:#f7f7f7;z-index:9}.iconpicker-popover.popover.top,.iconpicker-popover.popover.topLeftCorner,.iconpicker-popover.popover.topLeft,.iconpicker-popover.popover.topRight,.iconpicker-popover.popover.topRightCorner{margin-top:-10px}.iconpicker-popover.popover.right,.iconpicker-popover.popover.rightTop,.iconpicker-popover.popover.rightBottom{margin-left:10px}.iconpicker-popover.popover.bottom,.iconpicker-popover.popover.bottomRightCorner,.iconpicker-popover.popover.bottomRight,.iconpicker-popover.popover.bottomLeft,.iconpicker-popover.popover.bottomLeftCorner{margin-top:10px}.iconpicker-popover.popover.left,.iconpicker-popover.popover.leftBottom,.iconpicker-popover.popover.leftTop{margin-left:-10px}.iconpicker-popover.popover.inline{margin:0 0 12px 0;position:relative;display:inline-block;opacity:1;top:auto;left:auto;bottom:auto;right:auto;max-width:100%;box-shadow:none;z-index:auto;vertical-align:top}.iconpicker-popover.popover.inline>.arrow{display:none}.dropdown-menu .iconpicker-popover.inline{margin:0;border:none}.dropdown-menu.iconpicker-container{padding:0}.iconpicker-popover.popover .popover-title{padding:12px;font-size:13px;line-height:15px;border-bottom:1px solid #ebebeb;background-color:#f7f7f7}.iconpicker-popover.popover .popover-title input[type=search].iconpicker-search{margin:0 0 2px 0}.iconpicker-popover.popover .popover-title-text~input[type=search].iconpicker-search{margin-top:12px}.iconpicker-popover.popover .popover-content{padding:0px;text-align:center}.iconpicker-popover .popover-footer{float:none;clear:both;padding:12px;text-align:right;margin:0;border-top:1px solid #ebebeb;background-color:#f7f7f7}.iconpicker-popover .popover-footer:before,.iconpicker-popover .popover-footer:after{content:" ";display:table}.iconpicker-popover .popover-footer:after{clear:both}.iconpicker-popover .popover-footer .iconpicker-btn{margin-left:10px}.iconpicker-popover .popover-footer input[type=search].iconpicker-search{margin-bottom:12px}.iconpicker-popover.popover>.arrow,.iconpicker-popover.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.iconpicker-popover.popover>.arrow{border-width:11px}.iconpicker-popover.popover>.arrow:after{border-width:10px;content:""}.iconpicker-popover.popover.top>.arrow,.iconpicker-popover.popover.topLeft>.arrow,.iconpicker-popover.popover.topRight>.arrow{left:50%;margin-left:-11px;border-bottom-width:0;border-top-color:#999;border-top-color:rgba(0,0,0,0.25);bottom:-11px}.iconpicker-popover.popover.top>.arrow:after,.iconpicker-popover.popover.topLeft>.arrow:after,.iconpicker-popover.popover.topRight>.arrow:after{content:" ";bottom:1px;margin-left:-10px;border-bottom-width:0;border-top-color:#fff}.iconpicker-popover.popover.topLeft>.arrow{left:8px;margin-left:0}.iconpicker-popover.popover.topRight>.arrow{left:auto;right:8px;margin-left:0}.iconpicker-popover.popover.right>.arrow,.iconpicker-popover.popover.rightTop>.arrow,.iconpicker-popover.popover.rightBottom>.arrow{top:50%;left:-11px;margin-top:-11px;border-left-width:0;border-right-color:#999;border-right-color:rgba(0,0,0,0.25)}.iconpicker-popover.popover.right>.arrow:after,.iconpicker-popover.popover.rightTop>.arrow:after,.iconpicker-popover.popover.rightBottom>.arrow:after{content:" ";left:1px;bottom:-10px;border-left-width:0;border-right-color:#fff}.iconpicker-popover.popover.rightTop>.arrow{top:auto;bottom:8px;margin-top:0}.iconpicker-popover.popover.rightBottom>.arrow{top:8px;margin-top:0}.iconpicker-popover.popover.bottom>.arrow,.iconpicker-popover.popover.bottomRight>.arrow,.iconpicker-popover.popover.bottomLeft>.arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,0.25);top:-11px}.iconpicker-popover.popover.bottom>.arrow:after,.iconpicker-popover.popover.bottomRight>.arrow:after,.iconpicker-popover.popover.bottomLeft>.arrow:after{content:" ";top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#fff}.iconpicker-popover.popover.bottomLeft>.arrow{left:8px;margin-left:0}.iconpicker-popover.popover.bottomRight>.arrow{left:auto;right:8px;margin-left:0}.iconpicker-popover.popover.left>.arrow,.iconpicker-popover.popover.leftBottom>.arrow,.iconpicker-popover.popover.leftTop>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,0.25)}.iconpicker-popover.popover.left>.arrow:after,.iconpicker-popover.popover.leftBottom>.arrow:after,.iconpicker-popover.popover.leftTop>.arrow:after{content:" ";right:1px;border-right-width:0;border-left-color:#fff;bottom:-10px}.iconpicker-popover.popover.leftBottom>.arrow{top:8px;margin-top:0}.iconpicker-popover.popover.leftTop>.arrow{top:auto;bottom:8px;margin-top:0}.iconpicker{position:relative;text-align:left;text-shadow:none;line-height:0;display:block;margin:0;overflow:hidden}.iconpicker *{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;position:relative}.iconpicker:before,.iconpicker:after{content:" ";display:table}.iconpicker:after{clear:both}.iconpicker .iconpicker-items{position:relative;clear:both;float:none;padding:12px 0 0 12px;background:#fff;margin:0;overflow:hidden;overflow-y:auto;min-height:49px;max-height:246px}.iconpicker .iconpicker-items:before,.iconpicker .iconpicker-items:after{content:" ";display:table}.iconpicker .iconpicker-items:after{clear:both}.iconpicker .iconpicker-item{float:left;width:14px;height:14px;padding:12px;margin:0 12px 12px 0;text-align:center;cursor:pointer;border-radius:3px;font-size:14px;box-shadow:0 0 0 1px #ddd;color:inherit}.iconpicker .iconpicker-item:hover:not(.iconpicker-selected){background-color:#eee}.iconpicker .iconpicker-item.iconpicker-selected{box-shadow:none;color:#fff;background:#000}.iconpicker-component{cursor:pointer}
|
1 |
+
/*!
|
2 |
+
* Font Awesome Icon Picker
|
3 |
+
* https://farbelous.github.io/fontawesome-iconpicker/
|
4 |
+
*
|
5 |
+
* @author Javi Aguilar, itsjavi.com
|
6 |
+
* @license MIT License
|
7 |
+
* @see https://github.com/farbelous/fontawesome-iconpicker/blob/master/LICENSE
|
8 |
*/.iconpicker-popover.popover{position:absolute;top:0;left:0;display:none;max-width:none;padding:1px;text-align:left;width:234px;background:#f7f7f7;z-index:9}.iconpicker-popover.popover.top,.iconpicker-popover.popover.topLeftCorner,.iconpicker-popover.popover.topLeft,.iconpicker-popover.popover.topRight,.iconpicker-popover.popover.topRightCorner{margin-top:-10px}.iconpicker-popover.popover.right,.iconpicker-popover.popover.rightTop,.iconpicker-popover.popover.rightBottom{margin-left:10px}.iconpicker-popover.popover.bottom,.iconpicker-popover.popover.bottomRightCorner,.iconpicker-popover.popover.bottomRight,.iconpicker-popover.popover.bottomLeft,.iconpicker-popover.popover.bottomLeftCorner{margin-top:10px}.iconpicker-popover.popover.left,.iconpicker-popover.popover.leftBottom,.iconpicker-popover.popover.leftTop{margin-left:-10px}.iconpicker-popover.popover.inline{margin:0 0 12px 0;position:relative;display:inline-block;opacity:1;top:auto;left:auto;bottom:auto;right:auto;max-width:100%;box-shadow:none;z-index:auto;vertical-align:top}.iconpicker-popover.popover.inline>.arrow{display:none}.dropdown-menu .iconpicker-popover.inline{margin:0;border:none}.dropdown-menu.iconpicker-container{padding:0}.iconpicker-popover.popover .popover-title{padding:12px;font-size:13px;line-height:15px;border-bottom:1px solid #ebebeb;background-color:#f7f7f7}.iconpicker-popover.popover .popover-title input[type=search].iconpicker-search{margin:0 0 2px 0}.iconpicker-popover.popover .popover-title-text~input[type=search].iconpicker-search{margin-top:12px}.iconpicker-popover.popover .popover-content{padding:0px;text-align:center}.iconpicker-popover .popover-footer{float:none;clear:both;padding:12px;text-align:right;margin:0;border-top:1px solid #ebebeb;background-color:#f7f7f7}.iconpicker-popover .popover-footer:before,.iconpicker-popover .popover-footer:after{content:" ";display:table}.iconpicker-popover .popover-footer:after{clear:both}.iconpicker-popover .popover-footer .iconpicker-btn{margin-left:10px}.iconpicker-popover .popover-footer input[type=search].iconpicker-search{margin-bottom:12px}.iconpicker-popover.popover>.arrow,.iconpicker-popover.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.iconpicker-popover.popover>.arrow{border-width:11px}.iconpicker-popover.popover>.arrow:after{border-width:10px;content:""}.iconpicker-popover.popover.top>.arrow,.iconpicker-popover.popover.topLeft>.arrow,.iconpicker-popover.popover.topRight>.arrow{left:50%;margin-left:-11px;border-bottom-width:0;border-top-color:#999;border-top-color:rgba(0,0,0,0.25);bottom:-11px}.iconpicker-popover.popover.top>.arrow:after,.iconpicker-popover.popover.topLeft>.arrow:after,.iconpicker-popover.popover.topRight>.arrow:after{content:" ";bottom:1px;margin-left:-10px;border-bottom-width:0;border-top-color:#fff}.iconpicker-popover.popover.topLeft>.arrow{left:8px;margin-left:0}.iconpicker-popover.popover.topRight>.arrow{left:auto;right:8px;margin-left:0}.iconpicker-popover.popover.right>.arrow,.iconpicker-popover.popover.rightTop>.arrow,.iconpicker-popover.popover.rightBottom>.arrow{top:50%;left:-11px;margin-top:-11px;border-left-width:0;border-right-color:#999;border-right-color:rgba(0,0,0,0.25)}.iconpicker-popover.popover.right>.arrow:after,.iconpicker-popover.popover.rightTop>.arrow:after,.iconpicker-popover.popover.rightBottom>.arrow:after{content:" ";left:1px;bottom:-10px;border-left-width:0;border-right-color:#fff}.iconpicker-popover.popover.rightTop>.arrow{top:auto;bottom:8px;margin-top:0}.iconpicker-popover.popover.rightBottom>.arrow{top:8px;margin-top:0}.iconpicker-popover.popover.bottom>.arrow,.iconpicker-popover.popover.bottomRight>.arrow,.iconpicker-popover.popover.bottomLeft>.arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,0.25);top:-11px}.iconpicker-popover.popover.bottom>.arrow:after,.iconpicker-popover.popover.bottomRight>.arrow:after,.iconpicker-popover.popover.bottomLeft>.arrow:after{content:" ";top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#fff}.iconpicker-popover.popover.bottomLeft>.arrow{left:8px;margin-left:0}.iconpicker-popover.popover.bottomRight>.arrow{left:auto;right:8px;margin-left:0}.iconpicker-popover.popover.left>.arrow,.iconpicker-popover.popover.leftBottom>.arrow,.iconpicker-popover.popover.leftTop>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,0.25)}.iconpicker-popover.popover.left>.arrow:after,.iconpicker-popover.popover.leftBottom>.arrow:after,.iconpicker-popover.popover.leftTop>.arrow:after{content:" ";right:1px;border-right-width:0;border-left-color:#fff;bottom:-10px}.iconpicker-popover.popover.leftBottom>.arrow{top:8px;margin-top:0}.iconpicker-popover.popover.leftTop>.arrow{top:auto;bottom:8px;margin-top:0}.iconpicker{position:relative;text-align:left;text-shadow:none;line-height:0;display:block;margin:0;overflow:hidden}.iconpicker *{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;position:relative}.iconpicker:before,.iconpicker:after{content:" ";display:table}.iconpicker:after{clear:both}.iconpicker .iconpicker-items{position:relative;clear:both;float:none;padding:12px 0 0 12px;background:#fff;margin:0;overflow:hidden;overflow-y:auto;min-height:49px;max-height:246px}.iconpicker .iconpicker-items:before,.iconpicker .iconpicker-items:after{content:" ";display:table}.iconpicker .iconpicker-items:after{clear:both}.iconpicker .iconpicker-item{float:left;width:14px;height:14px;padding:12px;margin:0 12px 12px 0;text-align:center;cursor:pointer;border-radius:3px;font-size:14px;box-shadow:0 0 0 1px #ddd;color:inherit}.iconpicker .iconpicker-item:hover:not(.iconpicker-selected){background-color:#eee}.iconpicker .iconpicker-item.iconpicker-selected{box-shadow:none;color:#fff;background:#000}.iconpicker-component{cursor:pointer}
|
assets/js/admin/lib/iconpicker/fontawesome-iconpicker.min.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)}(function(j){j.ui=j.ui||{};j.ui.version="1.12.1";!function(){var r,y=Math.max,x=Math.abs,s=/left|center|right/,i=/top|center|bottom/,c=/[\+\-]\d+(\.[\d]+)?%?/,f=/^\w+/,l=/%$/,o=j.fn.pos;function q(e,a,t){return[parseFloat(e[0])*(l.test(e[0])?a/100:1),parseFloat(e[1])*(l.test(e[1])?t/100:1)]}function C(e,a){return parseInt(j.css(e,a),10)||0}j.pos={scrollbarWidth:function(){if(void 0!==r)return r;var e,a,t=j("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),s=t.children()[0];return j("body").append(t),e=s.offsetWidth,t.css("overflow","scroll"),e===(a=s.offsetWidth)&&(a=t[0].clientWidth),t.remove(),r=e-a},getScrollInfo:function(e){var a=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),t=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),s="scroll"===a||"auto"===a&&e.width<e.element[0].scrollWidth;return{width:"scroll"===t||"auto"===t&&e.height<e.element[0].scrollHeight?j.pos.scrollbarWidth():0,height:s?j.pos.scrollbarWidth():0}},getWithinInfo:function(e){var a=j(e||window),t=j.isWindow(a[0]),s=!!a[0]&&9===a[0].nodeType;return{element:a,isWindow:t,isDocument:s,offset:!t&&!s?j(e).offset():{left:0,top:0},scrollLeft:a.scrollLeft(),scrollTop:a.scrollTop(),width:a.outerWidth(),height:a.outerHeight()}}},j.fn.pos=function(h){if(!h||!h.of)return o.apply(this,arguments);h=j.extend({},h);var m,p,d,T,u,e,a,t,g=j(h.of),b=j.pos.getWithinInfo(h.within),k=j.pos.getScrollInfo(b),w=(h.collision||"flip").split(" "),v={};return e=9===(t=(a=g)[0]).nodeType?{width:a.width(),height:a.height(),offset:{top:0,left:0}}:j.isWindow(t)?{width:a.width(),height:a.height(),offset:{top:a.scrollTop(),left:a.scrollLeft()}}:t.preventDefault?{width:0,height:0,offset:{top:t.pageY,left:t.pageX}}:{width:a.outerWidth(),height:a.outerHeight(),offset:a.offset()},g[0].preventDefault&&(h.at="left top"),p=e.width,d=e.height,T=e.offset,u=j.extend({},T),j.each(["my","at"],function(){var e,a,t=(h[this]||"").split(" ");1===t.length&&(t=s.test(t[0])?t.concat(["center"]):i.test(t[0])?["center"].concat(t):["center","center"]),t[0]=s.test(t[0])?t[0]:"center",t[1]=i.test(t[1])?t[1]:"center",e=c.exec(t[0]),a=c.exec(t[1]),v[this]=[e?e[0]:0,a?a[0]:0],h[this]=[f.exec(t[0])[0],f.exec(t[1])[0]]}),1===w.length&&(w[1]=w[0]),"right"===h.at[0]?u.left+=p:"center"===h.at[0]&&(u.left+=p/2),"bottom"===h.at[1]?u.top+=d:"center"===h.at[1]&&(u.top+=d/2),m=q(v.at,p,d),u.left+=m[0],u.top+=m[1],this.each(function(){var t,e,c=j(this),f=c.outerWidth(),l=c.outerHeight(),a=C(this,"marginLeft"),s=C(this,"marginTop"),r=f+a+C(this,"marginRight")+k.width,i=l+s+C(this,"marginBottom")+k.height,o=j.extend({},u),n=q(v.my,c.outerWidth(),c.outerHeight());"right"===h.my[0]?o.left-=f:"center"===h.my[0]&&(o.left-=f/2),"bottom"===h.my[1]?o.top-=l:"center"===h.my[1]&&(o.top-=l/2),o.left+=n[0],o.top+=n[1],t={marginLeft:a,marginTop:s},j.each(["left","top"],function(e,a){j.ui.pos[w[e]]&&j.ui.pos[w[e]][a](o,{targetWidth:p,targetHeight:d,elemWidth:f,elemHeight:l,collisionPosition:t,collisionWidth:r,collisionHeight:i,offset:[m[0]+n[0],m[1]+n[1]],my:h.my,at:h.at,within:b,elem:c})}),h.using&&(e=function(e){var a=T.left-o.left,t=a+p-f,s=T.top-o.top,r=s+d-l,i={target:{element:g,left:T.left,top:T.top,width:p,height:d},element:{element:c,left:o.left,top:o.top,width:f,height:l},horizontal:t<0?"left":0<a?"right":"center",vertical:r<0?"top":0<s?"bottom":"middle"};p<f&&x(a+t)<p&&(i.horizontal="center"),d<l&&x(s+r)<d&&(i.vertical="middle"),y(x(a),x(t))>y(x(s),x(r))?i.important="horizontal":i.important="vertical",h.using.call(this,e,i)}),c.offset(j.extend(o,{using:e}))})},j.ui.pos={_trigger:function(e,a,t,s){a.elem&&a.elem.trigger({type:t,position:e,positionData:a,triggered:s})},fit:{left:function(e,a){j.ui.pos._trigger(e,a,"posCollide","fitLeft");var t,s=a.within,r=s.isWindow?s.scrollLeft:s.offset.left,i=s.width,c=e.left-a.collisionPosition.marginLeft,f=r-c,l=c+a.collisionWidth-i-r;a.collisionWidth>i?0<f&&l<=0?(t=e.left+f+a.collisionWidth-i-r,e.left+=f-t):e.left=0<l&&f<=0?r:l<f?r+i-a.collisionWidth:r:0<f?e.left+=f:0<l?e.left-=l:e.left=y(e.left-c,e.left),j.ui.pos._trigger(e,a,"posCollided","fitLeft")},top:function(e,a){j.ui.pos._trigger(e,a,"posCollide","fitTop");var t,s=a.within,r=s.isWindow?s.scrollTop:s.offset.top,i=a.within.height,c=e.top-a.collisionPosition.marginTop,f=r-c,l=c+a.collisionHeight-i-r;a.collisionHeight>i?0<f&&l<=0?(t=e.top+f+a.collisionHeight-i-r,e.top+=f-t):e.top=0<l&&f<=0?r:l<f?r+i-a.collisionHeight:r:0<f?e.top+=f:0<l?e.top-=l:e.top=y(e.top-c,e.top),j.ui.pos._trigger(e,a,"posCollided","fitTop")}},flip:{left:function(e,a){j.ui.pos._trigger(e,a,"posCollide","flipLeft");var t,s,r=a.within,i=r.offset.left+r.scrollLeft,c=r.width,f=r.isWindow?r.scrollLeft:r.offset.left,l=e.left-a.collisionPosition.marginLeft,o=l-f,n=l+a.collisionWidth-c-f,h="left"===a.my[0]?-a.elemWidth:"right"===a.my[0]?a.elemWidth:0,m="left"===a.at[0]?a.targetWidth:"right"===a.at[0]?-a.targetWidth:0,p=-2*a.offset[0];o<0?((t=e.left+h+m+p+a.collisionWidth-c-i)<0||t<x(o))&&(e.left+=h+m+p):0<n&&(0<(s=e.left-a.collisionPosition.marginLeft+h+m+p-f)||x(s)<n)&&(e.left+=h+m+p),j.ui.pos._trigger(e,a,"posCollided","flipLeft")},top:function(e,a){j.ui.pos._trigger(e,a,"posCollide","flipTop");var t,s,r=a.within,i=r.offset.top+r.scrollTop,c=r.height,f=r.isWindow?r.scrollTop:r.offset.top,l=e.top-a.collisionPosition.marginTop,o=l-f,n=l+a.collisionHeight-c-f,h="top"===a.my[1]?-a.elemHeight:"bottom"===a.my[1]?a.elemHeight:0,m="top"===a.at[1]?a.targetHeight:"bottom"===a.at[1]?-a.targetHeight:0,p=-2*a.offset[1];o<0?((s=e.top+h+m+p+a.collisionHeight-c-i)<0||s<x(o))&&(e.top+=h+m+p):0<n&&(0<(t=e.top-a.collisionPosition.marginTop+h+m+p-f)||x(t)<n)&&(e.top+=h+m+p),j.ui.pos._trigger(e,a,"posCollided","flipTop")}},flipfit:{left:function(){j.ui.pos.flip.left.apply(this,arguments),j.ui.pos.fit.left.apply(this,arguments)},top:function(){j.ui.pos.flip.top.apply(this,arguments),j.ui.pos.fit.top.apply(this,arguments)}}},function(){var e,a,t,s,r,i=document.getElementsByTagName("body")[0],c=document.createElement("div");for(r in e=document.createElement(i?"div":"body"),t={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},i&&j.extend(t,{position:"absolute",left:"-1000px",top:"-1000px"}),t)e.style[r]=t[r];e.appendChild(c),(a=i||document.documentElement).insertBefore(e,a.firstChild),c.style.cssText="position: absolute; left: 10.7432222px;",s=j(c).offset().left,j.support.offsetFractions=10<s&&s<11,e.innerHTML="",a.removeChild(e)}()}();j.ui.position}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):window.jQuery&&!window.jQuery.fn.iconpicker&&e(window.jQuery)}(function(l){"use strict";var t=function(e){return!1===e||""===e||null==e},s=function(e){return 0<l(e).length},r=function(e){return"string"==typeof e||e instanceof String},i=function(e,a){return-1!==l.inArray(e,a)},c=function(e,a){this._id=c._idCounter++,this.element=l(e).addClass("iconpicker-element"),this._trigger("iconpickerCreate",{iconpickerValue:this.iconpickerValue}),this.options=l.extend({},c.defaultOptions,this.element.data(),a),this.options.templates=l.extend({},c.defaultOptions.templates,this.options.templates),this.options.originalPlacement=this.options.placement,this.container=!!s(this.options.container)&&l(this.options.container),!1===this.container&&(this.element.is(".dropdown-toggle")?this.container=l("~ .dropdown-menu:first",this.element):this.container=this.element.is("input,textarea,button,.btn")?this.element.parent():this.element),this.container.addClass("iconpicker-container"),this.isDropdownMenu()&&(this.options.placement="inline"),this.input=!!this.element.is("input,textarea")&&this.element.addClass("iconpicker-input"),!1===this.input&&(this.input=this.container.find(this.options.input),this.input.is("input,textarea")||(this.input=!1)),this.component=this.isDropdownMenu()?this.container.parent().find(this.options.component):this.container.find(this.options.component),0===this.component.length?this.component=!1:this.component.find("i").addClass("iconpicker-component"),this._createPopover(),this._createIconpicker(),0===this.getAcceptButton().length&&(this.options.mustAccept=!1),this.isInputGroup()?this.container.parent().append(this.popover):this.container.append(this.popover),this._bindElementEvents(),this._bindWindowEvents(),this.update(this.options.selected),this.isInline()&&this.show(),this._trigger("iconpickerCreated",{iconpickerValue:this.iconpickerValue})};c._idCounter=0,c.defaultOptions={title:!1,selected:!1,defaultValue:!1,placement:"bottom",collision:"none",animation:!0,hideOnSelect:!1,showFooter:!1,searchInFooter:!1,mustAccept:!1,selectedCustomClass:"bg-primary",icons:[],fullClassFormatter:function(e){return e},input:"input,.iconpicker-input",inputSearch:!1,container:!1,component:".input-group-addon,.iconpicker-component",templates:{popover:'<div class="iconpicker-popover popover"><div class="arrow"></div><div class="popover-title"></div><div class="popover-content"></div></div>',footer:'<div class="popover-footer"></div>',buttons:'<button class="iconpicker-btn iconpicker-btn-cancel btn btn-default btn-sm">Cancel</button> <button class="iconpicker-btn iconpicker-btn-accept btn btn-primary btn-sm">Accept</button>',search:'<input type="search" class="form-control iconpicker-search" placeholder="Type to filter" />',iconpicker:'<div class="iconpicker"><div class="iconpicker-items"></div></div>',iconpickerItem:'<a role="button" href="javascript:;" class="iconpicker-item"><i></i></a>'}},c.batch=function(e,a){var t=Array.prototype.slice.call(arguments,2);return l(e).each(function(){var e=l(this).data("iconpicker");e&&e[a].apply(e,t)})},c.prototype={constructor:c,options:{},_id:0,_trigger:function(e,a){a=a||{},this.element.trigger(l.extend({type:e,iconpickerInstance:this},a))},_createPopover:function(){this.popover=l(this.options.templates.popover);var e=this.popover.find(".popover-title");if(this.options.title&&e.append(l('<div class="popover-title-text">'+this.options.title+"</div>")),this.hasSeparatedSearchInput()&&!this.options.searchInFooter?e.append(this.options.templates.search):this.options.title||e.remove(),this.options.showFooter&&!t(this.options.templates.footer)){var a=l(this.options.templates.footer);this.hasSeparatedSearchInput()&&this.options.searchInFooter&&a.append(l(this.options.templates.search)),t(this.options.templates.buttons)||a.append(l(this.options.templates.buttons)),this.popover.append(a)}return!0===this.options.animation&&this.popover.addClass("fade"),this.popover},_createIconpicker:function(){var t=this;this.iconpicker=l(this.options.templates.iconpicker);var e=function(e){var a=l(this);a.is("i")&&(a=a.parent()),t._trigger("iconpickerSelect",{iconpickerItem:a,iconpickerValue:t.iconpickerValue}),!1===t.options.mustAccept?(t.update(a.data("iconpickerValue")),t._trigger("iconpickerSelected",{iconpickerItem:this,iconpickerValue:t.iconpickerValue})):t.update(a.data("iconpickerValue"),!0),t.options.hideOnSelect&&!1===t.options.mustAccept&&t.hide()},a=l(this.options.templates.iconpickerItem),s=[];for(var r in this.options.icons)if("string"==typeof this.options.icons[r].title){var i=a.clone();if(i.find("i").addClass(this.options.fullClassFormatter(this.options.icons[r].title)),i.data("iconpickerValue",this.options.icons[r].title).on("click.iconpicker",e),i.attr("title","."+this.options.icons[r].title),0<this.options.icons[r].searchTerms.length){for(var c="",f=0;f<this.options.icons[r].searchTerms.length;f++)c=c+this.options.icons[r].searchTerms[f]+" ";i.attr("data-search-terms",c)}s.push(i)}return this.iconpicker.find(".iconpicker-items").append(s),this.popover.find(".popover-content").append(this.iconpicker),this.iconpicker},_isEventInsideIconpicker:function(e){var a=l(e.target);return!((!a.hasClass("iconpicker-element")||a.hasClass("iconpicker-element")&&!a.is(this.element))&&0===a.parents(".iconpicker-popover").length)},_bindElementEvents:function(){var a=this;this.getSearchInput().on("keyup.iconpicker",function(){a.filter(l(this).val().toLowerCase())}),this.getAcceptButton().on("click.iconpicker",function(){var e=a.iconpicker.find(".iconpicker-selected").get(0);a.update(a.iconpickerValue),a._trigger("iconpickerSelected",{iconpickerItem:e,iconpickerValue:a.iconpickerValue}),a.isInline()||a.hide()}),this.getCancelButton().on("click.iconpicker",function(){a.isInline()||a.hide()}),this.element.on("focus.iconpicker",function(e){a.show(),e.stopPropagation()}),this.hasComponent()&&this.component.on("click.iconpicker",function(){a.toggle()}),this.hasInput()&&this.input.on("keyup.iconpicker",function(e){i(e.keyCode,[38,40,37,39,16,17,18,9,8,91,93,20,46,186,190,46,78,188,44,86])?a._updateFormGroupStatus(!1!==a.getValid(this.value)):a.update(),!0===a.options.inputSearch&&a.filter(l(this).val().toLowerCase())})},_bindWindowEvents:function(){var e=l(window.document),a=this,t=".iconpicker.inst"+this._id;l(window).on("resize.iconpicker"+t+" orientationchange.iconpicker"+t,function(e){a.popover.hasClass("in")&&a.updatePlacement()}),a.isInline()||e.on("mouseup"+t,function(e){a._isEventInsideIconpicker(e)||a.isInline()||a.hide()})},_unbindElementEvents:function(){this.popover.off(".iconpicker"),this.element.off(".iconpicker"),this.hasInput()&&this.input.off(".iconpicker"),this.hasComponent()&&this.component.off(".iconpicker"),this.hasContainer()&&this.container.off(".iconpicker")},_unbindWindowEvents:function(){l(window).off(".iconpicker.inst"+this._id),l(window.document).off(".iconpicker.inst"+this._id)},updatePlacement:function(e,a){e=e||this.options.placement,this.options.placement=e,a=!0===(a=a||this.options.collision)?"flip":a;var t={at:"right bottom",my:"right top",of:this.hasInput()&&!this.isInputGroup()?this.input:this.container,collision:!0===a?"flip":a,within:window};if(this.popover.removeClass("inline topLeftCorner topLeft top topRight topRightCorner rightTop right rightBottom bottomRight bottomRightCorner bottom bottomLeft bottomLeftCorner leftBottom left leftTop"),"object"==typeof e)return this.popover.pos(l.extend({},t,e));switch(e){case"inline":t=!1;break;case"topLeftCorner":t.my="right bottom",t.at="left top";break;case"topLeft":t.my="left bottom",t.at="left top";break;case"top":t.my="center bottom",t.at="center top";break;case"topRight":t.my="right bottom",t.at="right top";break;case"topRightCorner":t.my="left bottom",t.at="right top";break;case"rightTop":t.my="left bottom",t.at="right center";break;case"right":t.my="left center",t.at="right center";break;case"rightBottom":t.my="left top",t.at="right center";break;case"bottomRightCorner":t.my="left top",t.at="right bottom";break;case"bottomRight":t.my="right top",t.at="right bottom";break;case"bottom":t.my="center top",t.at="center bottom";break;case"bottomLeft":t.my="left top",t.at="left bottom";break;case"bottomLeftCorner":t.my="right top",t.at="left bottom";break;case"leftBottom":t.my="right top",t.at="left center";break;case"left":t.my="right center",t.at="left center";break;case"leftTop":t.my="right bottom",t.at="left center";break;default:return!1}return this.popover.css({display:"inline"===this.options.placement?"":"block"}),!1!==t?this.popover.pos(t).css("maxWidth",l(window).width()-this.container.offset().left-5):this.popover.css({top:"auto",right:"auto",bottom:"auto",left:"auto",maxWidth:"none"}),this.popover.addClass(this.options.placement),!0},_updateComponents:function(){if(this.iconpicker.find(".iconpicker-item.iconpicker-selected").removeClass("iconpicker-selected "+this.options.selectedCustomClass),this.iconpickerValue&&this.iconpicker.find("."+this.options.fullClassFormatter(this.iconpickerValue).replace(/ /g,".")).parent().addClass("iconpicker-selected "+this.options.selectedCustomClass),this.hasComponent()){var e=this.component.find("i");0<e.length?e.attr("class",this.options.fullClassFormatter(this.iconpickerValue)):this.component.html(this.getHtml())}},_updateFormGroupStatus:function(e){return!!this.hasInput()&&(!1!==e?this.input.parents(".form-group:first").removeClass("has-error"):this.input.parents(".form-group:first").addClass("has-error"),!0)},getValid:function(e){r(e)||(e="");var a=""===e;e=l.trim(e);for(var t=!1,s=0;s<this.options.icons.length;s++)if(this.options.icons[s].title===e){t=!0;break}return!(!t&&!a)&&e},setValue:function(e){var a=this.getValid(e);return!1!==a?(this.iconpickerValue=a,this._trigger("iconpickerSetValue",{iconpickerValue:a}),this.iconpickerValue):(this._trigger("iconpickerInvalid",{iconpickerValue:e}),!1)},getHtml:function(){return'<i class="'+this.options.fullClassFormatter(this.iconpickerValue)+'"></i>'},setSourceValue:function(e){return!1!==(e=this.setValue(e))&&""!==e&&(this.hasInput()?this.input.val(this.iconpickerValue):this.element.data("iconpickerValue",this.iconpickerValue),this._trigger("iconpickerSetSourceValue",{iconpickerValue:e})),e},getSourceValue:function(e){var a=e=e||this.options.defaultValue;return void 0!==(a=this.hasInput()?this.input.val():this.element.data("iconpickerValue"))&&""!==a&&null!==a&&!1!==a||(a=e),a},hasInput:function(){return!1!==this.input},isInputSearch:function(){return this.hasInput()&&!0===this.options.inputSearch},isInputGroup:function(){return this.container.is(".input-group")},isDropdownMenu:function(){return this.container.is(".dropdown-menu")},hasSeparatedSearchInput:function(){return!1!==this.options.templates.search&&!this.isInputSearch()},hasComponent:function(){return!1!==this.component},hasContainer:function(){return!1!==this.container},getAcceptButton:function(){return this.popover.find(".iconpicker-btn-accept")},getCancelButton:function(){return this.popover.find(".iconpicker-btn-cancel")},getSearchInput:function(){return this.popover.find(".iconpicker-search")},filter:function(s){if(t(s))return this.iconpicker.find(".iconpicker-item").show(),l(!1);var r=[];return this.iconpicker.find(".iconpicker-item").each(function(){var e=l(this),a=e.attr("title").toLowerCase();a=a+" "+(e.attr("data-search-terms")?e.attr("data-search-terms").toLowerCase():"");var t=!1;try{t=new RegExp("(^|\\W)"+s,"g")}catch(e){t=!1}!1!==t&&a.match(t)?(r.push(e),e.show()):e.hide()}),r},show:function(){if(this.popover.hasClass("in"))return!1;l.iconpicker.batch(l(".iconpicker-popover.in:not(.inline)").not(this.popover),"hide"),this._trigger("iconpickerShow",{iconpickerValue:this.iconpickerValue}),this.updatePlacement(),this.popover.addClass("in"),setTimeout(l.proxy(function(){this.popover.css("display",this.isInline()?"":"block"),this._trigger("iconpickerShown",{iconpickerValue:this.iconpickerValue})},this),this.options.animation?300:1)},hide:function(){if(!this.popover.hasClass("in"))return!1;this._trigger("iconpickerHide",{iconpickerValue:this.iconpickerValue}),this.popover.removeClass("in"),setTimeout(l.proxy(function(){this.popover.css("display","none"),this.getSearchInput().val(""),this.filter(""),this._trigger("iconpickerHidden",{iconpickerValue:this.iconpickerValue})},this),this.options.animation?300:1)},toggle:function(){this.popover.is(":visible")?this.hide():this.show(!0)},update:function(e,a){return e=e||this.getSourceValue(this.iconpickerValue),this._trigger("iconpickerUpdate",{iconpickerValue:this.iconpickerValue}),!0===a?e=this.setValue(e):(e=this.setSourceValue(e),this._updateFormGroupStatus(!1!==e)),!1!==e&&this._updateComponents(),this._trigger("iconpickerUpdated",{iconpickerValue:this.iconpickerValue}),e},destroy:function(){this._trigger("iconpickerDestroy",{iconpickerValue:this.iconpickerValue}),this.element.removeData("iconpicker").removeData("iconpickerValue").removeClass("iconpicker-element"),this._unbindElementEvents(),this._unbindWindowEvents(),l(this.popover).remove(),this._trigger("iconpickerDestroyed",{iconpickerValue:this.iconpickerValue})},disable:function(){return!!this.hasInput()&&(this.input.prop("disabled",!0),!0)},enable:function(){return!!this.hasInput()&&(this.input.prop("disabled",!1),!0)},isDisabled:function(){return!!this.hasInput()&&!0===this.input.prop("disabled")},isInline:function(){return"inline"===this.options.placement||this.popover.hasClass("inline")}},l.iconpicker=c,l.fn.iconpicker=function(a){return this.each(function(){var e=l(this);e.data("iconpicker")||e.data("iconpicker",new c(this,"object"==typeof a?a:{}))})},c.defaultOptions=l.extend(c.defaultOptions,{icons:[{title:"fab fa-500px",searchTerms:[]},{title:"fab fa-accessible-icon",searchTerms:["accessibility","handicap","person","wheelchair","wheelchair-alt"]},{title:"fab fa-accusoft",searchTerms:[]},{title:"fab fa-acquisitions-incorporated",searchTerms:["Dungeons & Dragons","d&d","dnd","fantasy","game","gaming","tabletop"]},{title:"fas fa-ad",searchTerms:[]},{title:"fas fa-address-book",searchTerms:[]},{title:"far fa-address-book",searchTerms:[]},{title:"fas fa-address-card",searchTerms:[]},{title:"far fa-address-card",searchTerms:[]},{title:"fas fa-adjust",searchTerms:["contrast"]},{title:"fab fa-adn",searchTerms:[]},{title:"fab fa-adversal",searchTerms:[]},{title:"fab fa-affiliatetheme",searchTerms:[]},{title:"fas fa-air-freshener",searchTerms:[]},{title:"fab fa-algolia",searchTerms:[]},{title:"fas fa-align-center",searchTerms:["middle","text"]},{title:"fas fa-align-justify",searchTerms:["text"]},{title:"fas fa-align-left",searchTerms:["text"]},{title:"fas fa-align-right",searchTerms:["text"]},{title:"fab fa-alipay",searchTerms:[]},{title:"fas fa-allergies",searchTerms:["freckles","hand","intolerances","pox","spots"]},{title:"fab fa-amazon",searchTerms:[]},{title:"fab fa-amazon-pay",searchTerms:[]},{title:"fas fa-ambulance",searchTerms:["help","machine","support","vehicle"]},{title:"fas fa-american-sign-language-interpreting",searchTerms:[]},{title:"fab fa-amilia",searchTerms:[]},{title:"fas fa-anchor",searchTerms:["link"]},{title:"fab fa-android",searchTerms:["robot"]},{title:"fab fa-angellist",searchTerms:[]},{title:"fas fa-angle-double-down",searchTerms:["arrows"]},{title:"fas fa-angle-double-left",searchTerms:["arrows","back","laquo","previous","quote"]},{title:"fas fa-angle-double-right",searchTerms:["arrows","forward","next","quote","raquo"]},{title:"fas fa-angle-double-up",searchTerms:["arrows"]},{title:"fas fa-angle-down",searchTerms:["arrow"]},{title:"fas fa-angle-left",searchTerms:["arrow","back","previous"]},{title:"fas fa-angle-right",searchTerms:["arrow","forward","next"]},{title:"fas fa-angle-up",searchTerms:["arrow"]},{title:"fas fa-angry",searchTerms:["disapprove","emoticon","face","mad","upset"]},{title:"far fa-angry",searchTerms:["disapprove","emoticon","face","mad","upset"]},{title:"fab fa-angrycreative",searchTerms:[]},{title:"fab fa-angular",searchTerms:[]},{title:"fas fa-ankh",searchTerms:["amulet","copper","coptic christianity","copts","crux ansata","egyptian","venus"]},{title:"fab fa-app-store",searchTerms:[]},{title:"fab fa-app-store-ios",searchTerms:[]},{title:"fab fa-apper",searchTerms:[]},{title:"fab fa-apple",searchTerms:["food","fruit","mac","osx"]},{title:"fas fa-apple-alt",searchTerms:["fall","food","fruit","fuji","macintosh","seasonal"]},{title:"fab fa-apple-pay",searchTerms:[]},{title:"fas fa-archive",searchTerms:["box","package","storage"]},{title:"fas fa-archway",searchTerms:["arc","monument","road","street"]},{title:"fas fa-arrow-alt-circle-down",searchTerms:["arrow-circle-o-down","download"]},{title:"far fa-arrow-alt-circle-down",searchTerms:["arrow-circle-o-down","download"]},{title:"fas fa-arrow-alt-circle-left",searchTerms:["arrow-circle-o-left","back","previous"]},{title:"far fa-arrow-alt-circle-left",searchTerms:["arrow-circle-o-left","back","previous"]},{title:"fas fa-arrow-alt-circle-right",searchTerms:["arrow-circle-o-right","forward","next"]},{title:"far fa-arrow-alt-circle-right",searchTerms:["arrow-circle-o-right","forward","next"]},{title:"fas fa-arrow-alt-circle-up",searchTerms:["arrow-circle-o-up"]},{title:"far fa-arrow-alt-circle-up",searchTerms:["arrow-circle-o-up"]},{title:"fas fa-arrow-circle-down",searchTerms:["download"]},{title:"fas fa-arrow-circle-left",searchTerms:["back","previous"]},{title:"fas fa-arrow-circle-right",searchTerms:["forward","next"]},{title:"fas fa-arrow-circle-up",searchTerms:[]},{title:"fas fa-arrow-down",searchTerms:["download"]},{title:"fas fa-arrow-left",searchTerms:["back","previous"]},{title:"fas fa-arrow-right",searchTerms:["forward","next"]},{title:"fas fa-arrow-up",searchTerms:[]},{title:"fas fa-arrows-alt",searchTerms:["arrow","arrows","bigger","enlarge","expand","fullscreen","move","position","reorder","resize"]},{title:"fas fa-arrows-alt-h",searchTerms:["arrows-h","resize"]},{title:"fas fa-arrows-alt-v",searchTerms:["arrows-v","resize"]},{title:"fas fa-assistive-listening-systems",searchTerms:[]},{title:"fas fa-asterisk",searchTerms:["details"]},{title:"fab fa-asymmetrik",searchTerms:[]},{title:"fas fa-at",searchTerms:["e-mail","email"]},{title:"fas fa-atlas",searchTerms:["book","directions","geography","map","wayfinding"]},{title:"fas fa-atom",searchTerms:["atheism","chemistry","science"]},{title:"fab fa-audible",searchTerms:[]},{title:"fas fa-audio-description",searchTerms:[]},{title:"fab fa-autoprefixer",searchTerms:[]},{title:"fab fa-avianex",searchTerms:[]},{title:"fab fa-aviato",searchTerms:[]},{title:"fas fa-award",searchTerms:["honor","praise","prize","recognition","ribbon"]},{title:"fab fa-aws",searchTerms:[]},{title:"fas fa-backspace",searchTerms:["command","delete","keyboard","undo"]},{title:"fas fa-backward",searchTerms:["previous","rewind"]},{title:"fas fa-balance-scale",searchTerms:["balanced","justice","legal","measure","weight"]},{title:"fas fa-ban",searchTerms:["abort","ban","block","cancel","delete","hide","prohibit","remove","stop","trash"]},{title:"fas fa-band-aid",searchTerms:["bandage","boo boo","ouch"]},{title:"fab fa-bandcamp",searchTerms:[]},{title:"fas fa-barcode",searchTerms:["scan"]},{title:"fas fa-bars",searchTerms:["checklist","drag","hamburger","list","menu","nav","navigation","ol","reorder","settings","todo","ul"]},{title:"fas fa-baseball-ball",searchTerms:[]},{title:"fas fa-basketball-ball",searchTerms:[]},{title:"fas fa-bath",searchTerms:[]},{title:"fas fa-battery-empty",searchTerms:["power","status"]},{title:"fas fa-battery-full",searchTerms:["power","status"]},{title:"fas fa-battery-half",searchTerms:["power","status"]},{title:"fas fa-battery-quarter",searchTerms:["power","status"]},{title:"fas fa-battery-three-quarters",searchTerms:["power","status"]},{title:"fas fa-bed",searchTerms:["lodging","sleep","travel"]},{title:"fas fa-beer",searchTerms:["alcohol","bar","beverage","drink","liquor","mug","stein"]},{title:"fab fa-behance",searchTerms:[]},{title:"fab fa-behance-square",searchTerms:[]},{title:"fas fa-bell",searchTerms:["alert","notification","reminder"]},{title:"far fa-bell",searchTerms:["alert","notification","reminder"]},{title:"fas fa-bell-slash",searchTerms:[]},{title:"far fa-bell-slash",searchTerms:[]},{title:"fas fa-bezier-curve",searchTerms:["curves","illustrator","lines","path","vector"]},{title:"fas fa-bible",searchTerms:["book","catholicism","christianity"]},{title:"fas fa-bicycle",searchTerms:["bike","gears","transportation","vehicle"]},{title:"fab fa-bimobject",searchTerms:[]},{title:"fas fa-binoculars",searchTerms:[]},{title:"fas fa-birthday-cake",searchTerms:[]},{title:"fab fa-bitbucket",searchTerms:["bitbucket-square","git"]},{title:"fab fa-bitcoin",searchTerms:[]},{title:"fab fa-bity",searchTerms:[]},{title:"fab fa-black-tie",searchTerms:[]},{title:"fab fa-blackberry",searchTerms:[]},{title:"fas fa-blender",searchTerms:[]},{title:"fas fa-blender-phone",searchTerms:["appliance","fantasy","silly"]},{title:"fas fa-blind",searchTerms:[]},{title:"fab fa-blogger",searchTerms:[]},{title:"fab fa-blogger-b",searchTerms:[]},{title:"fab fa-bluetooth",searchTerms:[]},{title:"fab fa-bluetooth-b",searchTerms:[]},{title:"fas fa-bold",searchTerms:[]},{title:"fas fa-bolt",searchTerms:["electricity","lightning","weather","zap"]},{title:"fas fa-bomb",searchTerms:[]},{title:"fas fa-bone",searchTerms:[]},{title:"fas fa-bong",searchTerms:["aparatus","cannabis","marijuana","pipe","smoke","smoking"]},{title:"fas fa-book",searchTerms:["documentation","read"]},{title:"fas fa-book-dead",searchTerms:["Dungeons & Dragons","crossbones","d&d","dark arts","death","dnd","documentation","evil","fantasy","halloween","holiday","read","skull","spell"]},{title:"fas fa-book-open",searchTerms:["flyer","notebook","open book","pamphlet","reading"]},{title:"fas fa-book-reader",searchTerms:["library"]},{title:"fas fa-bookmark",searchTerms:["save"]},{title:"far fa-bookmark",searchTerms:["save"]},{title:"fas fa-bowling-ball",searchTerms:[]},{title:"fas fa-box",searchTerms:["package"]},{title:"fas fa-box-open",searchTerms:[]},{title:"fas fa-boxes",searchTerms:[]},{title:"fas fa-braille",searchTerms:[]},{title:"fas fa-brain",searchTerms:["cerebellum","gray matter","intellect","medulla oblongata","mind","noodle","wit"]},{title:"fas fa-briefcase",searchTerms:["bag","business","luggage","office","work"]},{title:"fas fa-briefcase-medical",searchTerms:["health briefcase"]},{title:"fas fa-broadcast-tower",searchTerms:["airwaves","radio","waves"]},{title:"fas fa-broom",searchTerms:["clean","firebolt","fly","halloween","holiday","nimbus 2000","quidditch","sweep","witch"]},{title:"fas fa-brush",searchTerms:["bristles","color","handle","painting"]},{title:"fab fa-btc",searchTerms:[]},{title:"fas fa-bug",searchTerms:["insect","report"]},{title:"fas fa-building",searchTerms:["apartment","business","company","office","work"]},{title:"far fa-building",searchTerms:["apartment","business","company","office","work"]},{title:"fas fa-bullhorn",searchTerms:["announcement","broadcast","louder","megaphone","share"]},{title:"fas fa-bullseye",searchTerms:["target"]},{title:"fas fa-burn",searchTerms:["energy"]},{title:"fab fa-buromobelexperte",searchTerms:[]},{title:"fas fa-bus",searchTerms:["machine","public transportation","transportation","vehicle"]},{title:"fas fa-bus-alt",searchTerms:["machine","public transportation","transportation","vehicle"]},{title:"fas fa-business-time",searchTerms:["briefcase","business socks","clock","flight of the conchords","wednesday"]},{title:"fab fa-buysellads",searchTerms:[]},{title:"fas fa-calculator",searchTerms:[]},{title:"fas fa-calendar",searchTerms:["calendar-o","date","event","schedule","time","when"]},{title:"far fa-calendar",searchTerms:["calendar-o","date","event","schedule","time","when"]},{title:"fas fa-calendar-alt",searchTerms:["calendar","date","event","schedule","time","when"]},{title:"far fa-calendar-alt",searchTerms:["calendar","date","event","schedule","time","when"]},{title:"fas fa-calendar-check",searchTerms:["accept","agree","appointment","confirm","correct","done","ok","select","success","todo"]},{title:"far fa-calendar-check",searchTerms:["accept","agree","appointment","confirm","correct","done","ok","select","success","todo"]},{title:"fas fa-calendar-minus",searchTerms:["delete","negative","remove"]},{title:"far fa-calendar-minus",searchTerms:["delete","negative","remove"]},{title:"fas fa-calendar-plus",searchTerms:["add","create","new","positive"]},{title:"far fa-calendar-plus",searchTerms:["add","create","new","positive"]},{title:"fas fa-calendar-times",searchTerms:["archive","delete","remove","x"]},{title:"far fa-calendar-times",searchTerms:["archive","delete","remove","x"]},{title:"fas fa-camera",searchTerms:["photo","picture","record"]},{title:"fas fa-camera-retro",searchTerms:["photo","picture","record"]},{title:"fas fa-campground",searchTerms:["camping","fall","outdoors","seasonal","tent"]},{title:"fas fa-cannabis",searchTerms:["bud","chronic","drugs","endica","endo","ganja","marijuana","mary jane","pot","reefer","sativa","spliff","weed","whacky-tabacky"]},{title:"fas fa-capsules",searchTerms:["drugs","medicine"]},{title:"fas fa-car",searchTerms:["machine","transportation","vehicle"]},{title:"fas fa-car-alt",searchTerms:[]},{title:"fas fa-car-battery",searchTerms:[]},{title:"fas fa-car-crash",searchTerms:[]},{title:"fas fa-car-side",searchTerms:[]},{title:"fas fa-caret-down",searchTerms:["arrow","dropdown","menu","more","triangle down"]},{title:"fas fa-caret-left",searchTerms:["arrow","back","previous","triangle left"]},{title:"fas fa-caret-right",searchTerms:["arrow","forward","next","triangle right"]},{title:"fas fa-caret-square-down",searchTerms:["caret-square-o-down","dropdown","menu","more"]},{title:"far fa-caret-square-down",searchTerms:["caret-square-o-down","dropdown","menu","more"]},{title:"fas fa-caret-square-left",searchTerms:["back","caret-square-o-left","previous"]},{title:"far fa-caret-square-left",searchTerms:["back","caret-square-o-left","previous"]},{title:"fas fa-caret-square-right",searchTerms:["caret-square-o-right","forward","next"]},{title:"far fa-caret-square-right",searchTerms:["caret-square-o-right","forward","next"]},{title:"fas fa-caret-square-up",searchTerms:["caret-square-o-up"]},{title:"far fa-caret-square-up",searchTerms:["caret-square-o-up"]},{title:"fas fa-caret-up",searchTerms:["arrow","triangle up"]},{title:"fas fa-cart-arrow-down",searchTerms:["shopping"]},{title:"fas fa-cart-plus",searchTerms:["add","create","new","positive","shopping"]},{title:"fas fa-cat",searchTerms:["feline","halloween","holiday","kitten","kitty","meow","pet"]},{title:"fab fa-cc-amazon-pay",searchTerms:[]},{title:"fab fa-cc-amex",searchTerms:["amex"]},{title:"fab fa-cc-apple-pay",searchTerms:[]},{title:"fab fa-cc-diners-club",searchTerms:[]},{title:"fab fa-cc-discover",searchTerms:[]},{title:"fab fa-cc-jcb",searchTerms:[]},{title:"fab fa-cc-mastercard",searchTerms:[]},{title:"fab fa-cc-paypal",searchTerms:[]},{title:"fab fa-cc-stripe",searchTerms:[]},{title:"fab fa-cc-visa",searchTerms:[]},{title:"fab fa-centercode",searchTerms:[]},{title:"fas fa-certificate",searchTerms:["badge","star"]},{title:"fas fa-chair",searchTerms:["furniture","seat"]},{title:"fas fa-chalkboard",searchTerms:["blackboard","learning","school","teaching","whiteboard","writing"]},{title:"fas fa-chalkboard-teacher",searchTerms:["blackboard","instructor","learning","professor","school","whiteboard","writing"]},{title:"fas fa-charging-station",searchTerms:[]},{title:"fas fa-chart-area",searchTerms:["analytics","area-chart","graph"]},{title:"fas fa-chart-bar",searchTerms:["analytics","bar-chart","graph"]},{title:"far fa-chart-bar",searchTerms:["analytics","bar-chart","graph"]},{title:"fas fa-chart-line",searchTerms:["activity","analytics","dashboard","graph","line-chart"]},{title:"fas fa-chart-pie",searchTerms:["analytics","graph","pie-chart"]},{title:"fas fa-check",searchTerms:["accept","agree","checkmark","confirm","correct","done","notice","notification","notify","ok","select","success","tick","todo","yes"]},{title:"fas fa-check-circle",searchTerms:["accept","agree","confirm","correct","done","ok","select","success","todo","yes"]},{title:"far fa-check-circle",searchTerms:["accept","agree","confirm","correct","done","ok","select","success","todo","yes"]},{title:"fas fa-check-double",searchTerms:["accept","agree","checkmark","confirm","correct","done","notice","notification","notify","ok","select","success","tick","todo"]},{title:"fas fa-check-square",searchTerms:["accept","agree","checkmark","confirm","correct","done","ok","select","success","todo","yes"]},{title:"far fa-check-square",searchTerms:["accept","agree","checkmark","confirm","correct","done","ok","select","success","todo","yes"]},{title:"fas fa-chess",searchTerms:[]},{title:"fas fa-chess-bishop",searchTerms:[]},{title:"fas fa-chess-board",searchTerms:[]},{title:"fas fa-chess-king",searchTerms:[]},{title:"fas fa-chess-knight",searchTerms:[]},{title:"fas fa-chess-pawn",searchTerms:[]},{title:"fas fa-chess-queen",searchTerms:[]},{title:"fas fa-chess-rook",searchTerms:[]},{title:"fas fa-chevron-circle-down",searchTerms:["arrow","dropdown","menu","more"]},{title:"fas fa-chevron-circle-left",searchTerms:["arrow","back","previous"]},{title:"fas fa-chevron-circle-right",searchTerms:["arrow","forward","next"]},{title:"fas fa-chevron-circle-up",searchTerms:["arrow"]},{title:"fas fa-chevron-down",searchTerms:[]},{title:"fas fa-chevron-left",searchTerms:["back","bracket","previous"]},{title:"fas fa-chevron-right",searchTerms:["bracket","forward","next"]},{title:"fas fa-chevron-up",searchTerms:[]},{title:"fas fa-child",searchTerms:[]},{title:"fab fa-chrome",searchTerms:["browser"]},{title:"fas fa-church",searchTerms:["building","community","religion"]},{title:"fas fa-circle",searchTerms:["circle-thin","dot","notification"]},{title:"far fa-circle",searchTerms:["circle-thin","dot","notification"]},{title:"fas fa-circle-notch",searchTerms:["circle-o-notch"]},{title:"fas fa-city",searchTerms:["buildings","busy","skyscrapers","urban","windows"]},{title:"fas fa-clipboard",searchTerms:["paste"]},{title:"far fa-clipboard",searchTerms:["paste"]},{title:"fas fa-clipboard-check",searchTerms:["accept","agree","confirm","done","ok","select","success","todo","yes"]},{title:"fas fa-clipboard-list",searchTerms:["checklist","completed","done","finished","intinerary","ol","schedule","todo","ul"]},{title:"fas fa-clock",searchTerms:["date","late","schedule","timer","timestamp","watch"]},{title:"far fa-clock",searchTerms:["date","late","schedule","timer","timestamp","watch"]},{title:"fas fa-clone",searchTerms:["copy","duplicate"]},{title:"far fa-clone",searchTerms:["copy","duplicate"]},{title:"fas fa-closed-captioning",searchTerms:["cc"]},{title:"far fa-closed-captioning",searchTerms:["cc"]},{title:"fas fa-cloud",searchTerms:["save"]},{title:"fas fa-cloud-download-alt",searchTerms:["import"]},{title:"fas fa-cloud-meatball",searchTerms:[]},{title:"fas fa-cloud-moon",searchTerms:["crescent","evening","halloween","holiday","lunar","night","sky"]},{title:"fas fa-cloud-moon-rain",searchTerms:[]},{title:"fas fa-cloud-rain",searchTerms:["precipitation"]},{title:"fas fa-cloud-showers-heavy",searchTerms:["precipitation","rain","storm"]},{title:"fas fa-cloud-sun",searchTerms:["day","daytime","fall","outdoors","seasonal"]},{title:"fas fa-cloud-sun-rain",searchTerms:[]},{title:"fas fa-cloud-upload-alt",searchTerms:["cloud-upload"]},{title:"fab fa-cloudscale",searchTerms:[]},{title:"fab fa-cloudsmith",searchTerms:[]},{title:"fab fa-cloudversify",searchTerms:[]},{title:"fas fa-cocktail",searchTerms:["alcohol","beverage","drink"]},{title:"fas fa-code",searchTerms:["brackets","html"]},{title:"fas fa-code-branch",searchTerms:["branch","code-fork","fork","git","github","rebase","svn","vcs","version"]},{title:"fab fa-codepen",searchTerms:[]},{title:"fab fa-codiepie",searchTerms:[]},{title:"fas fa-coffee",searchTerms:["beverage","breakfast","cafe","drink","fall","morning","mug","seasonal","tea"]},{title:"fas fa-cog",searchTerms:["settings"]},{title:"fas fa-cogs",searchTerms:["gears","settings"]},{title:"fas fa-coins",searchTerms:[]},{title:"fas fa-columns",searchTerms:["dashboard","panes","split"]},{title:"fas fa-comment",searchTerms:["bubble","chat","conversation","feedback","message","note","notification","sms","speech","texting"]},{title:"far fa-comment",searchTerms:["bubble","chat","conversation","feedback","message","note","notification","sms","speech","texting"]},{title:"fas fa-comment-alt",searchTerms:["bubble","chat","commenting","conversation","feedback","message","note","notification","sms","speech","texting"]},{title:"far fa-comment-alt",searchTerms:["bubble","chat","commenting","conversation","feedback","message","note","notification","sms","speech","texting"]},{title:"fas fa-comment-dollar",searchTerms:[]},{title:"fas fa-comment-dots",searchTerms:[]},{title:"far fa-comment-dots",searchTerms:[]},{title:"fas fa-comment-slash",searchTerms:[]},{title:"fas fa-comments",searchTerms:["bubble","chat","conversation","feedback","message","note","notification","sms","speech","texting"]},{title:"far fa-comments",searchTerms:["bubble","chat","conversation","feedback","message","note","notification","sms","speech","texting"]},{title:"fas fa-comments-dollar",searchTerms:[]},{title:"fas fa-compact-disc",searchTerms:["bluray","cd","disc","media"]},{title:"fas fa-compass",searchTerms:["directory","location","menu","safari"]},{title:"far fa-compass",searchTerms:["directory","location","menu","safari"]},{title:"fas fa-compress",searchTerms:["collapse","combine","contract","merge","smaller"]},{title:"fas fa-concierge-bell",searchTerms:["attention","hotel","service","support"]},{title:"fab fa-connectdevelop",searchTerms:[]},{title:"fab fa-contao",searchTerms:[]},{title:"fas fa-cookie",searchTerms:["baked good","chips","food","snack","sweet","treat"]},{title:"fas fa-cookie-bite",searchTerms:["baked good","bitten","chips","eating","food","snack","sweet","treat"]},{title:"fas fa-copy",searchTerms:["clone","duplicate","file","files-o"]},{title:"far fa-copy",searchTerms:["clone","duplicate","file","files-o"]},{title:"fas fa-copyright",searchTerms:[]},{title:"far fa-copyright",searchTerms:[]},{title:"fas fa-couch",searchTerms:["furniture","sofa"]},{title:"fab fa-cpanel",searchTerms:[]},{title:"fab fa-creative-commons",searchTerms:[]},{title:"fab fa-creative-commons-by",searchTerms:[]},{title:"fab fa-creative-commons-nc",searchTerms:[]},{title:"fab fa-creative-commons-nc-eu",searchTerms:[]},{title:"fab fa-creative-commons-nc-jp",searchTerms:[]},{title:"fab fa-creative-commons-nd",searchTerms:[]},{title:"fab fa-creative-commons-pd",searchTerms:[]},{title:"fab fa-creative-commons-pd-alt",searchTerms:[]},{title:"fab fa-creative-commons-remix",searchTerms:[]},{title:"fab fa-creative-commons-sa",searchTerms:[]},{title:"fab fa-creative-commons-sampling",searchTerms:[]},{title:"fab fa-creative-commons-sampling-plus",searchTerms:[]},{title:"fab fa-creative-commons-share",searchTerms:[]},{title:"fab fa-creative-commons-zero",searchTerms:[]},{title:"fas fa-credit-card",searchTerms:["buy","checkout","credit-card-alt","debit","money","payment","purchase"]},{title:"far fa-credit-card",searchTerms:["buy","checkout","credit-card-alt","debit","money","payment","purchase"]},{title:"fab fa-critical-role",searchTerms:["Dungeons & Dragons","d&d","dnd","fantasy","game","gaming","tabletop"]},{title:"fas fa-crop",searchTerms:["design"]},{title:"fas fa-crop-alt",searchTerms:[]},{title:"fas fa-cross",searchTerms:["catholicism","christianity"]},{title:"fas fa-crosshairs",searchTerms:["gpd","picker","position"]},{title:"fas fa-crow",searchTerms:["bird","bullfrog","fauna","halloween","holiday","toad"]},{title:"fas fa-crown",searchTerms:[]},{title:"fab fa-css3",searchTerms:["code"]},{title:"fab fa-css3-alt",searchTerms:[]},{title:"fas fa-cube",searchTerms:["package"]},{title:"fas fa-cubes",searchTerms:["packages"]},{title:"fas fa-cut",searchTerms:["scissors"]},{title:"fab fa-cuttlefish",searchTerms:[]},{title:"fab fa-d-and-d",searchTerms:[]},{title:"fab fa-d-and-d-beyond",searchTerms:["Dungeons & Dragons","d&d","dnd","fantasy","gaming","tabletop"]},{title:"fab fa-dashcube",searchTerms:[]},{title:"fas fa-database",searchTerms:[]},{title:"fas fa-deaf",searchTerms:[]},{title:"fab fa-delicious",searchTerms:[]},{title:"fas fa-democrat",searchTerms:["american","democratic party","donkey","election","left","left-wing","liberal","politics","usa"]},{title:"fab fa-deploydog",searchTerms:[]},{title:"fab fa-deskpro",searchTerms:[]},{title:"fas fa-desktop",searchTerms:["computer","cpu","demo","desktop","device","machine","monitor","pc","screen"]},{title:"fab fa-dev",searchTerms:[]},{title:"fab fa-deviantart",searchTerms:[]},{title:"fas fa-dharmachakra",searchTerms:["buddhism","buddhist","wheel of dharma"]},{title:"fas fa-diagnoses",searchTerms:[]},{title:"fas fa-dice",searchTerms:["chance","gambling","game","roll"]},{title:"fas fa-dice-d20",searchTerms:["Dungeons & Dragons","chance","d&d","dnd","fantasy","gambling","game","roll"]},{title:"fas fa-dice-d6",searchTerms:["Dungeons & Dragons","chance","d&d","dnd","fantasy","gambling","game","roll"]},{title:"fas fa-dice-five",searchTerms:["chance","gambling","game","roll"]},{title:"fas fa-dice-four",searchTerms:["chance","gambling","game","roll"]},{title:"fas fa-dice-one",searchTerms:["chance","gambling","game","roll"]},{title:"fas fa-dice-six",searchTerms:["chance","gambling","game","roll"]},{title:"fas fa-dice-three",searchTerms:["chance","gambling","game","roll"]},{title:"fas fa-dice-two",searchTerms:["chance","gambling","game","roll"]},{title:"fab fa-digg",searchTerms:[]},{title:"fab fa-digital-ocean",searchTerms:[]},{title:"fas fa-digital-tachograph",searchTerms:[]},{title:"fas fa-directions",searchTerms:[]},{title:"fab fa-discord",searchTerms:[]},{title:"fab fa-discourse",searchTerms:[]},{title:"fas fa-divide",searchTerms:[]},{title:"fas fa-dizzy",searchTerms:["dazed","disapprove","emoticon","face"]},{title:"far fa-dizzy",searchTerms:["dazed","disapprove","emoticon","face"]},{title:"fas fa-dna",searchTerms:["double helix","helix"]},{title:"fab fa-dochub",searchTerms:[]},{title:"fab fa-docker",searchTerms:[]},{title:"fas fa-dog",searchTerms:["canine","fauna","mammmal","pet","pooch","puppy","woof"]},{title:"fas fa-dollar-sign",searchTerms:["$","dollar-sign","money","price","usd"]},{title:"fas fa-dolly",searchTerms:[]},{title:"fas fa-dolly-flatbed",searchTerms:[]},{title:"fas fa-donate",searchTerms:["generosity","give"]},{title:"fas fa-door-closed",searchTerms:[]},{title:"fas fa-door-open",searchTerms:[]},{title:"fas fa-dot-circle",searchTerms:["bullseye","notification","target"]},{title:"far fa-dot-circle",searchTerms:["bullseye","notification","target"]},{title:"fas fa-dove",searchTerms:["bird","fauna","flying","peace"]},{title:"fas fa-download",searchTerms:["import"]},{title:"fab fa-draft2digital",searchTerms:[]},{title:"fas fa-drafting-compass",searchTerms:["mechanical drawing","plot","plotting"]},{title:"fas fa-dragon",searchTerms:["Dungeons & Dragons","d&d","dnd","fantasy"]},{title:"fas fa-draw-polygon",searchTerms:[]},{title:"fab fa-dribbble",searchTerms:[]},{title:"fab fa-dribbble-square",searchTerms:[]},{title:"fab fa-dropbox",searchTerms:[]},{title:"fas fa-drum",searchTerms:["instrument","music","percussion","snare","sound"]},{title:"fas fa-drum-steelpan",searchTerms:["calypso","instrument","music","percussion","reggae","snare","sound","steel","tropical"]},{title:"fas fa-drumstick-bite",searchTerms:[]},{title:"fab fa-drupal",searchTerms:[]},{title:"fas fa-dumbbell",searchTerms:["exercise","gym","strength","weight","weight-lifting"]},{title:"fas fa-dungeon",searchTerms:["Dungeons & Dragons","d&d","dnd","door","entrance","fantasy","gate"]},{title:"fab fa-dyalog",searchTerms:[]},{title:"fab fa-earlybirds",searchTerms:[]},{title:"fab fa-ebay",searchTerms:[]},{title:"fab fa-edge",searchTerms:["browser","ie"]},{title:"fas fa-edit",searchTerms:["edit","pen","pencil","update","write"]},{title:"far fa-edit",searchTerms:["edit","pen","pencil","update","write"]},{title:"fas fa-eject",searchTerms:[]},{title:"fab fa-elementor",searchTerms:[]},{title:"fas fa-ellipsis-h",searchTerms:["dots","drag","kebab","list","menu","nav","navigation","ol","reorder","settings","ul"]},{title:"fas fa-ellipsis-v",searchTerms:["dots","drag","kebab","list","menu","nav","navigation","ol","reorder","settings","ul"]},{title:"fab fa-ello",searchTerms:[]},{title:"fab fa-ember",searchTerms:[]},{title:"fab fa-empire",searchTerms:[]},{title:"fas fa-envelope",searchTerms:["e-mail","email","letter","mail","message","notification","support"]},{title:"far fa-envelope",searchTerms:["e-mail","email","letter","mail","message","notification","support"]},{title:"fas fa-envelope-open",searchTerms:["e-mail","email","letter","mail","message","notification","support"]},{title:"far fa-envelope-open",searchTerms:["e-mail","email","letter","mail","message","notification","support"]},{title:"fas fa-envelope-open-text",searchTerms:[]},{title:"fas fa-envelope-square",searchTerms:["e-mail","email","letter","mail","message","notification","support"]},{title:"fab fa-envira",searchTerms:["leaf"]},{title:"fas fa-equals",searchTerms:[]},{title:"fas fa-eraser",searchTerms:["delete","remove"]},{title:"fab fa-erlang",searchTerms:[]},{title:"fab fa-ethereum",searchTerms:[]},{title:"fab fa-etsy",searchTerms:[]},{title:"fas fa-euro-sign",searchTerms:["eur"]},{title:"fas fa-exchange-alt",searchTerms:["arrow","arrows","exchange","reciprocate","return","swap","transfer"]},{title:"fas fa-exclamation",searchTerms:["alert","danger","error","important","notice","notification","notify","problem","warning"]},{title:"fas fa-exclamation-circle",searchTerms:["alert","danger","error","important","notice","notification","notify","problem","warning"]},{title:"fas fa-exclamation-triangle",searchTerms:["alert","danger","error","important","notice","notification","notify","problem","warning"]},{title:"fas fa-expand",searchTerms:["bigger","enlarge","resize"]},{title:"fas fa-expand-arrows-alt",searchTerms:["arrows-alt","bigger","enlarge","move","resize"]},{title:"fab fa-expeditedssl",searchTerms:[]},{title:"fas fa-external-link-alt",searchTerms:["external-link","new","open"]},{title:"fas fa-external-link-square-alt",searchTerms:["external-link-square","new","open"]},{title:"fas fa-eye",searchTerms:["optic","see","seen","show","sight","views","visible"]},{title:"far fa-eye",searchTerms:["optic","see","seen","show","sight","views","visible"]},{title:"fas fa-eye-dropper",searchTerms:["eyedropper"]},{title:"fas fa-eye-slash",searchTerms:["blind","hide","show","toggle","unseen","views","visible","visiblity"]},{title:"far fa-eye-slash",searchTerms:["blind","hide","show","toggle","unseen","views","visible","visiblity"]},{title:"fab fa-facebook",searchTerms:["facebook-official","social network"]},{title:"fab fa-facebook-f",searchTerms:["facebook"]},{title:"fab fa-facebook-messenger",searchTerms:[]},{title:"fab fa-facebook-square",searchTerms:["social network"]},{title:"fab fa-fantasy-flight-games",searchTerms:["Dungeons & Dragons","d&d","dnd","fantasy","game","gaming","tabletop"]},{title:"fas fa-fast-backward",searchTerms:["beginning","first","previous","rewind","start"]},{title:"fas fa-fast-forward",searchTerms:["end","last","next"]},{title:"fas fa-fax",searchTerms:[]},{title:"fas fa-feather",searchTerms:["bird","light","plucked","quill"]},{title:"fas fa-feather-alt",searchTerms:["bird","light","plucked","quill"]},{title:"fas fa-female",searchTerms:["human","person","profile","user","woman"]},{title:"fas fa-fighter-jet",searchTerms:["airplane","fast","fly","goose","maverick","plane","quick","top gun","transportation","travel"]},{title:"fas fa-file",searchTerms:["document","new","page","pdf","resume"]},{title:"far fa-file",searchTerms:["document","new","page","pdf","resume"]},{title:"fas fa-file-alt",searchTerms:["document","file-text","invoice","new","page","pdf"]},{title:"far fa-file-alt",searchTerms:["document","file-text","invoice","new","page","pdf"]},{title:"fas fa-file-archive",searchTerms:[".zip","bundle","compress","compression","download","zip"]},{title:"far fa-file-archive",searchTerms:[".zip","bundle","compress","compression","download","zip"]},{title:"fas fa-file-audio",searchTerms:[]},{title:"far fa-file-audio",searchTerms:[]},{title:"fas fa-file-code",searchTerms:[]},{title:"far fa-file-code",searchTerms:[]},{title:"fas fa-file-contract",searchTerms:["agreement","binding","document","legal","signature"]},{title:"fas fa-file-csv",searchTerms:["spreadsheets"]},{title:"fas fa-file-download",searchTerms:[]},{title:"fas fa-file-excel",searchTerms:[]},{title:"far fa-file-excel",searchTerms:[]},{title:"fas fa-file-export",searchTerms:[]},{title:"fas fa-file-image",searchTerms:[]},{title:"far fa-file-image",searchTerms:[]},{title:"fas fa-file-import",searchTerms:[]},{title:"fas fa-file-invoice",searchTerms:["bill","document","receipt"]},{title:"fas fa-file-invoice-dollar",searchTerms:["$","bill","document","dollar-sign","money","receipt","usd"]},{title:"fas fa-file-medical",searchTerms:[]},{title:"fas fa-file-medical-alt",searchTerms:[]},{title:"fas fa-file-pdf",searchTerms:[]},{title:"far fa-file-pdf",searchTerms:[]},{title:"fas fa-file-powerpoint",searchTerms:[]},{title:"far fa-file-powerpoint",searchTerms:[]},{title:"fas fa-file-prescription",searchTerms:["drugs","medical","medicine","rx"]},{title:"fas fa-file-signature",searchTerms:["John Hancock","contract","document","name"]},{title:"fas fa-file-upload",searchTerms:[]},{title:"fas fa-file-video",searchTerms:[]},{title:"far fa-file-video",searchTerms:[]},{title:"fas fa-file-word",searchTerms:[]},{title:"far fa-file-word",searchTerms:[]},{title:"fas fa-fill",searchTerms:["bucket","color","paint","paint bucket"]},{title:"fas fa-fill-drip",searchTerms:["bucket","color","drop","paint","paint bucket","spill"]},{title:"fas fa-film",searchTerms:["movie"]},{title:"fas fa-filter",searchTerms:["funnel","options"]},{title:"fas fa-fingerprint",searchTerms:["human","id","identification","lock","smudge","touch","unique","unlock"]},{title:"fas fa-fire",searchTerms:["caliente","flame","heat","hot","popular"]},{title:"fas fa-fire-extinguisher",searchTerms:[]},{title:"fab fa-firefox",searchTerms:["browser"]},{title:"fas fa-first-aid",searchTerms:[]},{title:"fab fa-first-order",searchTerms:[]},{title:"fab fa-first-order-alt",searchTerms:[]},{title:"fab fa-firstdraft",searchTerms:[]},{title:"fas fa-fish",searchTerms:["fauna","gold","swimming"]},{title:"fas fa-fist-raised",searchTerms:["Dungeons & Dragons","d&d","dnd","fantasy","hand","ki","monk","resist","strength","unarmed combat"]},{title:"fas fa-flag",searchTerms:["country","notice","notification","notify","pole","report","symbol"]},{title:"far fa-flag",searchTerms:["country","notice","notification","notify","pole","report","symbol"]},{title:"fas fa-flag-checkered",searchTerms:["notice","notification","notify","pole","racing","report","symbol"]},{title:"fas fa-flag-usa",searchTerms:["betsy ross","country","old glory","stars","stripes","symbol"]},{title:"fas fa-flask",searchTerms:["beaker","experimental","labs","science"]},{title:"fab fa-flickr",searchTerms:[]},{title:"fab fa-flipboard",searchTerms:[]},{title:"fas fa-flushed",searchTerms:["embarrassed","emoticon","face"]},{title:"far fa-flushed",searchTerms:["embarrassed","emoticon","face"]},{title:"fab fa-fly",searchTerms:[]},{title:"fas fa-folder",searchTerms:[]},{title:"far fa-folder",searchTerms:[]},{title:"fas fa-folder-minus",searchTerms:["archive","delete","negative","remove"]},{title:"fas fa-folder-open",searchTerms:[]},{title:"far fa-folder-open",searchTerms:[]},{title:"fas fa-folder-plus",searchTerms:["add","create","new","positive"]},{title:"fas fa-font",searchTerms:["text"]},{title:"fab fa-font-awesome",searchTerms:["meanpath"]},{title:"fab fa-font-awesome-alt",searchTerms:[]},{title:"fab fa-font-awesome-flag",searchTerms:[]},{title:"far fa-font-awesome-logo-full",searchTerms:[]},{title:"fas fa-font-awesome-logo-full",searchTerms:[]},{title:"fab fa-font-awesome-logo-full",searchTerms:[]},{title:"fab fa-fonticons",searchTerms:[]},{title:"fab fa-fonticons-fi",searchTerms:[]},{title:"fas fa-football-ball",searchTerms:["fall","pigskin","seasonal"]},{title:"fab fa-fort-awesome",searchTerms:["castle"]},{title:"fab fa-fort-awesome-alt",searchTerms:["castle"]},{title:"fab fa-forumbee",searchTerms:[]},{title:"fas fa-forward",searchTerms:["forward","next"]},{title:"fab fa-foursquare",searchTerms:[]},{title:"fab fa-free-code-camp",searchTerms:[]},{title:"fab fa-freebsd",searchTerms:[]},{title:"fas fa-frog",searchTerms:["amphibian","bullfrog","fauna","hop","kermit","kiss","prince","ribbit","toad","wart"]},{title:"fas fa-frown",searchTerms:["disapprove","emoticon","face","rating","sad"]},{title:"far fa-frown",searchTerms:["disapprove","emoticon","face","rating","sad"]},{title:"fas fa-frown-open",searchTerms:["disapprove","emoticon","face","rating","sad"]},{title:"far fa-frown-open",searchTerms:["disapprove","emoticon","face","rating","sad"]},{title:"fab fa-fulcrum",searchTerms:[]},{title:"fas fa-funnel-dollar",searchTerms:[]},{title:"fas fa-futbol",searchTerms:["ball","football","soccer"]},{title:"far fa-futbol",searchTerms:["ball","football","soccer"]},{title:"fab fa-galactic-republic",searchTerms:["politics","star wars"]},{title:"fab fa-galactic-senate",searchTerms:["star wars"]},{title:"fas fa-gamepad",searchTerms:["controller"]},{title:"fas fa-gas-pump",searchTerms:[]},{title:"fas fa-gavel",searchTerms:["hammer","judge","lawyer","opinion"]},{title:"fas fa-gem",searchTerms:["diamond"]},{title:"far fa-gem",searchTerms:["diamond"]},{title:"fas fa-genderless",searchTerms:[]},{title:"fab fa-get-pocket",searchTerms:[]},{title:"fab fa-gg",searchTerms:[]},{title:"fab fa-gg-circle",searchTerms:[]},{title:"fas fa-ghost",searchTerms:["apparition","blinky","clyde","floating","halloween","holiday","inky","pinky","spirit"]},{title:"fas fa-gift",searchTerms:["generosity","giving","party","present","wrapped"]},{title:"fab fa-git",searchTerms:[]},{title:"fab fa-git-square",searchTerms:[]},{title:"fab fa-github",searchTerms:["octocat"]},{title:"fab fa-github-alt",searchTerms:["octocat"]},{title:"fab fa-github-square",searchTerms:["octocat"]},{title:"fab fa-gitkraken",searchTerms:[]},{title:"fab fa-gitlab",searchTerms:["Axosoft"]},{title:"fab fa-gitter",searchTerms:[]},{title:"fas fa-glass-martini",searchTerms:["alcohol","bar","beverage","drink","glass","liquor","martini"]},{title:"fas fa-glass-martini-alt",searchTerms:[]},{title:"fas fa-glasses",searchTerms:["foureyes","hipster","nerd","reading","sight","spectacles"]},{title:"fab fa-glide",searchTerms:[]},{title:"fab fa-glide-g",searchTerms:[]},{title:"fas fa-globe",searchTerms:["all","coordinates","country","earth","global","gps","language","localize","location","map","online","place","planet","translate","travel","world"]},{title:"fas fa-globe-africa",searchTerms:["all","country","earth","global","gps","language","localize","location","map","online","place","planet","translate","travel","world"]},{title:"fas fa-globe-americas",searchTerms:["all","country","earth","global","gps","language","localize","location","map","online","place","planet","translate","travel","world"]},{title:"fas fa-globe-asia",searchTerms:["all","country","earth","global","gps","language","localize","location","map","online","place","planet","translate","travel","world"]},{title:"fab fa-gofore",searchTerms:[]},{title:"fas fa-golf-ball",searchTerms:[]},{title:"fab fa-goodreads",searchTerms:[]},{title:"fab fa-goodreads-g",searchTerms:[]},{title:"fab fa-google",searchTerms:[]},{title:"fab fa-google-drive",searchTerms:[]},{title:"fab fa-google-play",searchTerms:[]},{title:"fab fa-google-plus",searchTerms:["google-plus-circle","google-plus-official"]},{title:"fab fa-google-plus-g",searchTerms:["google-plus","social network"]},{title:"fab fa-google-plus-square",searchTerms:["social network"]},{title:"fab fa-google-wallet",searchTerms:[]},{title:"fas fa-gopuram",searchTerms:["building","entrance","hinduism","temple","tower"]},{title:"fas fa-graduation-cap",searchTerms:["learning","school","student"]},{title:"fab fa-gratipay",searchTerms:["favorite","heart","like","love"]},{title:"fab fa-grav",searchTerms:[]},{title:"fas fa-greater-than",searchTerms:[]},{title:"fas fa-greater-than-equal",searchTerms:[]},{title:"fas fa-grimace",searchTerms:["cringe","emoticon","face"]},{title:"far fa-grimace",searchTerms:["cringe","emoticon","face"]},{title:"fas fa-grin",searchTerms:["emoticon","face","laugh","smile"]},{title:"far fa-grin",searchTerms:["emoticon","face","laugh","smile"]},{title:"fas fa-grin-alt",searchTerms:["emoticon","face","laugh","smile"]},{title:"far fa-grin-alt",searchTerms:["emoticon","face","laugh","smile"]},{title:"fas fa-grin-beam",searchTerms:["emoticon","face","laugh","smile"]},{title:"far fa-grin-beam",searchTerms:["emoticon","face","laugh","smile"]},{title:"fas fa-grin-beam-sweat",searchTerms:["emoticon","face","smile"]},{title:"far fa-grin-beam-sweat",searchTerms:["emoticon","face","smile"]},{title:"fas fa-grin-hearts",searchTerms:["emoticon","face","love","smile"]},{title:"far fa-grin-hearts",searchTerms:["emoticon","face","love","smile"]},{title:"fas fa-grin-squint",searchTerms:["emoticon","face","laugh","smile"]},{title:"far fa-grin-squint",searchTerms:["emoticon","face","laugh","smile"]},{title:"fas fa-grin-squint-tears",searchTerms:["emoticon","face","happy","smile"]},{title:"far fa-grin-squint-tears",searchTerms:["emoticon","face","happy","smile"]},{title:"fas fa-grin-stars",searchTerms:["emoticon","face","star-struck"]},{title:"far fa-grin-stars",searchTerms:["emoticon","face","star-struck"]},{title:"fas fa-grin-tears",searchTerms:["LOL","emoticon","face"]},{title:"far fa-grin-tears",searchTerms:["LOL","emoticon","face"]},{title:"fas fa-grin-tongue",searchTerms:["LOL","emoticon","face"]},{title:"far fa-grin-tongue",searchTerms:["LOL","emoticon","face"]},{title:"fas fa-grin-tongue-squint",searchTerms:["LOL","emoticon","face"]},{title:"far fa-grin-tongue-squint",searchTerms:["LOL","emoticon","face"]},{title:"fas fa-grin-tongue-wink",searchTerms:["LOL","emoticon","face"]},{title:"far fa-grin-tongue-wink",searchTerms:["LOL","emoticon","face"]},{title:"fas fa-grin-wink",searchTerms:["emoticon","face","flirt","laugh","smile"]},{title:"far fa-grin-wink",searchTerms:["emoticon","face","flirt","laugh","smile"]},{title:"fas fa-grip-horizontal",searchTerms:["affordance","drag","drop","grab","handle"]},{title:"fas fa-grip-vertical",searchTerms:["affordance","drag","drop","grab","handle"]},{title:"fab fa-gripfire",searchTerms:[]},{title:"fab fa-grunt",searchTerms:[]},{title:"fab fa-gulp",searchTerms:[]},{title:"fas fa-h-square",searchTerms:["hospital","hotel"]},{title:"fab fa-hacker-news",searchTerms:[]},{title:"fab fa-hacker-news-square",searchTerms:[]},{title:"fab fa-hackerrank",searchTerms:[]},{title:"fas fa-hammer",searchTerms:["admin","fix","repair","settings","tool"]},{title:"fas fa-hamsa",searchTerms:["amulet","christianity","islam","jewish","judaism","muslim","protection"]},{title:"fas fa-hand-holding",searchTerms:[]},{title:"fas fa-hand-holding-heart",searchTerms:[]},{title:"fas fa-hand-holding-usd",searchTerms:["$","dollar sign","donation","giving","money","price"]},{title:"fas fa-hand-lizard",searchTerms:[]},{title:"far fa-hand-lizard",searchTerms:[]},{title:"fas fa-hand-paper",searchTerms:["stop"]},{title:"far fa-hand-paper",searchTerms:["stop"]},{title:"fas fa-hand-peace",searchTerms:[]},{title:"far fa-hand-peace",searchTerms:[]},{title:"fas fa-hand-point-down",searchTerms:["finger","hand-o-down","point"]},{title:"far fa-hand-point-down",searchTerms:["finger","hand-o-down","point"]},{title:"fas fa-hand-point-left",searchTerms:["back","finger","hand-o-left","left","point","previous"]},{title:"far fa-hand-point-left",searchTerms:["back","finger","hand-o-left","left","point","previous"]},{title:"fas fa-hand-point-right",searchTerms:["finger","forward","hand-o-right","next","point","right"]},{title:"far fa-hand-point-right",searchTerms:["finger","forward","hand-o-right","next","point","right"]},{title:"fas fa-hand-point-up",searchTerms:["finger","hand-o-up","point"]},{title:"far fa-hand-point-up",searchTerms:["finger","hand-o-up","point"]},{title:"fas fa-hand-pointer",searchTerms:["select"]},{title:"far fa-hand-pointer",searchTerms:["select"]},{title:"fas fa-hand-rock",searchTerms:[]},{title:"far fa-hand-rock",searchTerms:[]},{title:"fas fa-hand-scissors",searchTerms:[]},{title:"far fa-hand-scissors",searchTerms:[]},{title:"fas fa-hand-spock",searchTerms:[]},{title:"far fa-hand-spock",searchTerms:[]},{title:"fas fa-hands",searchTerms:[]},{title:"fas fa-hands-helping",searchTerms:["aid","assistance","partnership","volunteering"]},{title:"fas fa-handshake",searchTerms:["greeting","partnership"]},{title:"far fa-handshake",searchTerms:["greeting","partnership"]},{title:"fas fa-hanukiah",searchTerms:["candle","hanukkah","jewish","judaism","light"]},{title:"fas fa-hashtag",searchTerms:[]},{title:"fas fa-hat-wizard",searchTerms:["Dungeons & Dragons","buckle","cloth","clothing","d&d","dnd","fantasy","halloween","holiday","mage","magic","pointy","witch"]},{title:"fas fa-haykal",searchTerms:["bahai","bahá'í","star"]},{title:"fas fa-hdd",searchTerms:["cpu","hard drive","harddrive","machine","save","storage"]},{title:"far fa-hdd",searchTerms:["cpu","hard drive","harddrive","machine","save","storage"]},{title:"fas fa-heading",searchTerms:["header"]},{title:"fas fa-headphones",searchTerms:["audio","listen","music","sound","speaker"]},{title:"fas fa-headphones-alt",searchTerms:["audio","listen","music","sound","speaker"]},{title:"fas fa-headset",searchTerms:["audio","gamer","gaming","listen","live chat","microphone","shot caller","sound","support","telemarketer"]},{title:"fas fa-heart",searchTerms:["favorite","like","love"]},{title:"far fa-heart",searchTerms:["favorite","like","love"]},{title:"fas fa-heartbeat",searchTerms:["ekg","lifeline","vital signs"]},{title:"fas fa-helicopter",searchTerms:["airwolf","apache","chopper","flight","fly"]},{title:"fas fa-highlighter",searchTerms:["edit","marker","sharpie","update","write"]},{title:"fas fa-hiking",searchTerms:["activity","backpack","fall","fitness","outdoors","seasonal","walking"]},{title:"fas fa-hippo",searchTerms:["fauna","hungry","mammmal"]},{title:"fab fa-hips",searchTerms:[]},{title:"fab fa-hire-a-helper",searchTerms:[]},{title:"fas fa-history",searchTerms:[]},{title:"fas fa-hockey-puck",searchTerms:[]},{title:"fas fa-home",searchTerms:["house","main"]},{title:"fab fa-hooli",searchTerms:[]},{title:"fab fa-hornbill",searchTerms:[]},{title:"fas fa-horse",searchTerms:["equus","fauna","mammmal","neigh"]},{title:"fas fa-hospital",searchTerms:["building","emergency room","medical center"]},{title:"far fa-hospital",searchTerms:["building","emergency room","medical center"]},{title:"fas fa-hospital-alt",searchTerms:["building","emergency room","medical center"]},{title:"fas fa-hospital-symbol",searchTerms:[]},{title:"fas fa-hot-tub",searchTerms:[]},{title:"fas fa-hotel",searchTerms:["building","lodging"]},{title:"fab fa-hotjar",searchTerms:[]},{title:"fas fa-hourglass",searchTerms:[]},{title:"far fa-hourglass",searchTerms:[]},{title:"fas fa-hourglass-end",searchTerms:[]},{title:"fas fa-hourglass-half",searchTerms:[]},{title:"fas fa-hourglass-start",searchTerms:[]},{title:"fas fa-house-damage",searchTerms:["devastation","home"]},{title:"fab fa-houzz",searchTerms:[]},{title:"fas fa-hryvnia",searchTerms:["money"]},{title:"fab fa-html5",searchTerms:[]},{title:"fab fa-hubspot",searchTerms:[]},{title:"fas fa-i-cursor",searchTerms:[]},{title:"fas fa-id-badge",searchTerms:[]},{title:"far fa-id-badge",searchTerms:[]},{title:"fas fa-id-card",searchTerms:["document","identification","issued"]},{title:"far fa-id-card",searchTerms:["document","identification","issued"]},{title:"fas fa-id-card-alt",searchTerms:["demographics"]},{title:"fas fa-image",searchTerms:["album","photo","picture"]},{title:"far fa-image",searchTerms:["album","photo","picture"]},{title:"fas fa-images",searchTerms:["album","photo","picture"]},{title:"far fa-images",searchTerms:["album","photo","picture"]},{title:"fab fa-imdb",searchTerms:[]},{title:"fas fa-inbox",searchTerms:[]},{title:"fas fa-indent",searchTerms:[]},{title:"fas fa-industry",searchTerms:["factory","manufacturing"]},{title:"fas fa-infinity",searchTerms:[]},{title:"fas fa-info",searchTerms:["details","help","information","more"]},{title:"fas fa-info-circle",searchTerms:["details","help","information","more"]},{title:"fab fa-instagram",searchTerms:[]},{title:"fab fa-internet-explorer",searchTerms:["browser","ie"]},{title:"fab fa-ioxhost",searchTerms:[]},{title:"fas fa-italic",searchTerms:["italics"]},{title:"fab fa-itunes",searchTerms:[]},{title:"fab fa-itunes-note",searchTerms:[]},{title:"fab fa-java",searchTerms:[]},{title:"fas fa-jedi",searchTerms:["star wars"]},{title:"fab fa-jedi-order",searchTerms:["star wars"]},{title:"fab fa-jenkins",searchTerms:[]},{title:"fab fa-joget",searchTerms:[]},{title:"fas fa-joint",searchTerms:["blunt","cannabis","doobie","drugs","marijuana","roach","smoke","smoking","spliff"]},{title:"fab fa-joomla",searchTerms:[]},{title:"fas fa-journal-whills",searchTerms:["book","jedi","star wars","the force"]},{title:"fab fa-js",searchTerms:[]},{title:"fab fa-js-square",searchTerms:[]},{title:"fab fa-jsfiddle",searchTerms:[]},{title:"fas fa-kaaba",searchTerms:["building","cube","islam","muslim"]},{title:"fab fa-kaggle",searchTerms:[]},{title:"fas fa-key",searchTerms:["password","unlock"]},{title:"fab fa-keybase",searchTerms:[]},{title:"fas fa-keyboard",searchTerms:["input","type"]},{title:"far fa-keyboard",searchTerms:["input","type"]},{title:"fab fa-keycdn",searchTerms:[]},{title:"fas fa-khanda",searchTerms:["chakkar","sikh","sikhism","sword"]},{title:"fab fa-kickstarter",searchTerms:[]},{title:"fab fa-kickstarter-k",searchTerms:[]},{title:"fas fa-kiss",searchTerms:["beso","emoticon","face","love","smooch"]},{title:"far fa-kiss",searchTerms:["beso","emoticon","face","love","smooch"]},{title:"fas fa-kiss-beam",searchTerms:["beso","emoticon","face","love","smooch"]},{title:"far fa-kiss-beam",searchTerms:["beso","emoticon","face","love","smooch"]},{title:"fas fa-kiss-wink-heart",searchTerms:["beso","emoticon","face","love","smooch"]},{title:"far fa-kiss-wink-heart",searchTerms:["beso","emoticon","face","love","smooch"]},{title:"fas fa-kiwi-bird",searchTerms:["bird","fauna"]},{title:"fab fa-korvue",searchTerms:[]},{title:"fas fa-landmark",searchTerms:["building","historic","memoroable","politics"]},{title:"fas fa-language",searchTerms:["dialect","idiom","localize","speech","translate","vernacular"]},{title:"fas fa-laptop",searchTerms:["computer","cpu","dell","demo","device","dude you're getting","mac","macbook","machine","pc"]},{title:"fas fa-laptop-code",searchTerms:[]},{title:"fab fa-laravel",searchTerms:[]},{title:"fab fa-lastfm",searchTerms:[]},{title:"fab fa-lastfm-square",searchTerms:[]},{title:"fas fa-laugh",searchTerms:["LOL","emoticon","face","laugh"]},{title:"far fa-laugh",searchTerms:["LOL","emoticon","face","laugh"]},{title:"fas fa-laugh-beam",searchTerms:["LOL","emoticon","face"]},{title:"far fa-laugh-beam",searchTerms:["LOL","emoticon","face"]},{title:"fas fa-laugh-squint",searchTerms:["LOL","emoticon","face"]},{title:"far fa-laugh-squint",searchTerms:["LOL","emoticon","face"]},{title:"fas fa-laugh-wink",searchTerms:["LOL","emoticon","face"]},{title:"far fa-laugh-wink",searchTerms:["LOL","emoticon","face"]},{title:"fas fa-layer-group",searchTerms:["layers"]},{title:"fas fa-leaf",searchTerms:["eco","flora","nature","plant"]},{title:"fab fa-leanpub",searchTerms:[]},{title:"fas fa-lemon",searchTerms:["food"]},{title:"far fa-lemon",searchTerms:["food"]},{title:"fab fa-less",searchTerms:[]},{title:"fas fa-less-than",searchTerms:[]},{title:"fas fa-less-than-equal",searchTerms:[]},{title:"fas fa-level-down-alt",searchTerms:["level-down"]},{title:"fas fa-level-up-alt",searchTerms:["level-up"]},{title:"fas fa-life-ring",searchTerms:["support"]},{title:"far fa-life-ring",searchTerms:["support"]},{title:"fas fa-lightbulb",searchTerms:["idea","inspiration"]},{title:"far fa-lightbulb",searchTerms:["idea","inspiration"]},{title:"fab fa-line",searchTerms:[]},{title:"fas fa-link",searchTerms:["chain"]},{title:"fab fa-linkedin",searchTerms:["linkedin-square"]},{title:"fab fa-linkedin-in",searchTerms:["linkedin"]},{title:"fab fa-linode",searchTerms:[]},{title:"fab fa-linux",searchTerms:["tux"]},{title:"fas fa-lira-sign",searchTerms:["try","turkish"]},{title:"fas fa-list",searchTerms:["checklist","completed","done","finished","ol","todo","ul"]},{title:"fas fa-list-alt",searchTerms:["checklist","completed","done","finished","ol","todo","ul"]},{title:"far fa-list-alt",searchTerms:["checklist","completed","done","finished","ol","todo","ul"]},{title:"fas fa-list-ol",searchTerms:["checklist","list","numbers","ol","todo","ul"]},{title:"fas fa-list-ul",searchTerms:["checklist","list","ol","todo","ul"]},{title:"fas fa-location-arrow",searchTerms:["address","coordinates","gps","location","map","place","where"]},{title:"fas fa-lock",searchTerms:["admin","protect","security"]},{title:"fas fa-lock-open",searchTerms:["admin","lock","open","password","protect"]},{title:"fas fa-long-arrow-alt-down",searchTerms:["long-arrow-down"]},{title:"fas fa-long-arrow-alt-left",searchTerms:["back","long-arrow-left","previous"]},{title:"fas fa-long-arrow-alt-right",searchTerms:["long-arrow-right"]},{title:"fas fa-long-arrow-alt-up",searchTerms:["long-arrow-up"]},{title:"fas fa-low-vision",searchTerms:[]},{title:"fas fa-luggage-cart",searchTerms:[]},{title:"fab fa-lyft",searchTerms:[]},{title:"fab fa-magento",searchTerms:[]},{title:"fas fa-magic",searchTerms:["autocomplete","automatic","mage","magic","spell","witch","wizard"]},{title:"fas fa-magnet",searchTerms:[]},{title:"fas fa-mail-bulk",searchTerms:[]},{title:"fab fa-mailchimp",searchTerms:[]},{title:"fas fa-male",searchTerms:["human","man","person","profile","user"]},{title:"fab fa-mandalorian",searchTerms:[]},{title:"fas fa-map",searchTerms:["coordinates","location","paper","place","travel"]},{title:"far fa-map",searchTerms:["coordinates","location","paper","place","travel"]},{title:"fas fa-map-marked",searchTerms:["address","coordinates","destination","gps","localize","location","map","paper","pin","place","point of interest","position","route","travel","where"]},{title:"fas fa-map-marked-alt",searchTerms:["address","coordinates","destination","gps","localize","location","map","paper","pin","place","point of interest","position","route","travel","where"]},{title:"fas fa-map-marker",searchTerms:["address","coordinates","gps","localize","location","map","pin","place","position","travel","where"]},{title:"fas fa-map-marker-alt",searchTerms:["address","coordinates","gps","localize","location","map","pin","place","position","travel","where"]},{title:"fas fa-map-pin",searchTerms:["address","coordinates","gps","localize","location","map","marker","place","position","travel","where"]},{title:"fas fa-map-signs",searchTerms:[]},{title:"fab fa-markdown",searchTerms:[]},{title:"fas fa-marker",searchTerms:["edit","sharpie","update","write"]},{title:"fas fa-mars",searchTerms:["male"]},{title:"fas fa-mars-double",searchTerms:[]},{title:"fas fa-mars-stroke",searchTerms:[]},{title:"fas fa-mars-stroke-h",searchTerms:[]},{title:"fas fa-mars-stroke-v",searchTerms:[]},{title:"fas fa-mask",searchTerms:["costume","disguise","halloween","holiday","secret","super hero"]},{title:"fab fa-mastodon",searchTerms:[]},{title:"fab fa-maxcdn",searchTerms:[]},{title:"fas fa-medal",searchTerms:[]},{title:"fab fa-medapps",searchTerms:[]},{title:"fab fa-medium",searchTerms:[]},{title:"fab fa-medium-m",searchTerms:[]},{title:"fas fa-medkit",searchTerms:["first aid","firstaid","health","help","support"]},{title:"fab fa-medrt",searchTerms:[]},{title:"fab fa-meetup",searchTerms:[]},{title:"fab fa-megaport",searchTerms:[]},{title:"fas fa-meh",searchTerms:["emoticon","face","neutral","rating"]},{title:"far fa-meh",searchTerms:["emoticon","face","neutral","rating"]},{title:"fas fa-meh-blank",searchTerms:["emoticon","face","neutral","rating"]},{title:"far fa-meh-blank",searchTerms:["emoticon","face","neutral","rating"]},{title:"fas fa-meh-rolling-eyes",searchTerms:["emoticon","face","neutral","rating"]},{title:"far fa-meh-rolling-eyes",searchTerms:["emoticon","face","neutral","rating"]},{title:"fas fa-memory",searchTerms:["DIMM","RAM"]},{title:"fas fa-menorah",searchTerms:["candle","hanukkah","jewish","judaism","light"]},{title:"fas fa-mercury",searchTerms:["transgender"]},{title:"fas fa-meteor",searchTerms:[]},{title:"fas fa-microchip",searchTerms:["cpu","processor"]},{title:"fas fa-microphone",searchTerms:["record","sound","voice"]},{title:"fas fa-microphone-alt",searchTerms:["record","sound","voice"]},{title:"fas fa-microphone-alt-slash",searchTerms:["disable","mute","record","sound","voice"]},{title:"fas fa-microphone-slash",searchTerms:["disable","mute","record","sound","voice"]},{title:"fas fa-microscope",searchTerms:[]},{title:"fab fa-microsoft",searchTerms:[]},{title:"fas fa-minus",searchTerms:["collapse","delete","hide","minify","negative","remove","trash"]},{title:"fas fa-minus-circle",searchTerms:["delete","hide","negative","remove","trash"]},{title:"fas fa-minus-square",searchTerms:["collapse","delete","hide","minify","negative","remove","trash"]},{title:"far fa-minus-square",searchTerms:["collapse","delete","hide","minify","negative","remove","trash"]},{title:"fab fa-mix",searchTerms:[]},{title:"fab fa-mixcloud",searchTerms:[]},{title:"fab fa-mizuni",searchTerms:[]},{title:"fas fa-mobile",searchTerms:["apple","call","cell phone","cellphone","device","iphone","number","screen","telephone","text"]},{title:"fas fa-mobile-alt",searchTerms:["apple","call","cell phone","cellphone","device","iphone","number","screen","telephone","text"]},{title:"fab fa-modx",searchTerms:[]},{title:"fab fa-monero",searchTerms:[]},{title:"fas fa-money-bill",searchTerms:["buy","cash","checkout","money","payment","price","purchase"]},{title:"fas fa-money-bill-alt",searchTerms:["buy","cash","checkout","money","payment","price","purchase"]},{title:"far fa-money-bill-alt",searchTerms:["buy","cash","checkout","money","payment","price","purchase"]},{title:"fas fa-money-bill-wave",searchTerms:[]},{title:"fas fa-money-bill-wave-alt",searchTerms:[]},{title:"fas fa-money-check",searchTerms:["bank check","cheque"]},{title:"fas fa-money-check-alt",searchTerms:["bank check","cheque"]},{title:"fas fa-monument",searchTerms:["building","historic","memoroable"]},{title:"fas fa-moon",searchTerms:["contrast","crescent","darker","lunar","night"]},{title:"far fa-moon",searchTerms:["contrast","crescent","darker","lunar","night"]},{title:"fas fa-mortar-pestle",searchTerms:["crush","culinary","grind","medical","mix","spices"]},{title:"fas fa-mosque",searchTerms:["building","islam","muslim"]},{title:"fas fa-motorcycle",searchTerms:["bike","machine","transportation","vehicle"]},{title:"fas fa-mountain",searchTerms:[]},{title:"fas fa-mouse-pointer",searchTerms:["select"]},{title:"fas fa-music",searchTerms:["note","sound"]},{title:"fab fa-napster",searchTerms:[]},{title:"fab fa-neos",searchTerms:[]},{title:"fas fa-network-wired",searchTerms:[]},{title:"fas fa-neuter",searchTerms:[]},{title:"fas fa-newspaper",searchTerms:["article","press"]},{title:"far fa-newspaper",searchTerms:["article","press"]},{title:"fab fa-nimblr",searchTerms:[]},{title:"fab fa-nintendo-switch",searchTerms:[]},{title:"fab fa-node",searchTerms:[]},{title:"fab fa-node-js",searchTerms:[]},{title:"fas fa-not-equal",searchTerms:[]},{title:"fas fa-notes-medical",searchTerms:[]},{title:"fab fa-npm",searchTerms:[]},{title:"fab fa-ns8",searchTerms:[]},{title:"fab fa-nutritionix",searchTerms:[]},{title:"fas fa-object-group",searchTerms:["design"]},{title:"far fa-object-group",searchTerms:["design"]},{title:"fas fa-object-ungroup",searchTerms:["design"]},{title:"far fa-object-ungroup",searchTerms:["design"]},{title:"fab fa-odnoklassniki",searchTerms:[]},{title:"fab fa-odnoklassniki-square",searchTerms:[]},{title:"fas fa-oil-can",searchTerms:[]},{title:"fab fa-old-republic",searchTerms:["politics","star wars"]},{title:"fas fa-om",searchTerms:["buddhism","hinduism","jainism","mantra"]},{title:"fab fa-opencart",searchTerms:[]},{title:"fab fa-openid",searchTerms:[]},{title:"fab fa-opera",searchTerms:[]},{title:"fab fa-optin-monster",searchTerms:[]},{title:"fab fa-osi",searchTerms:[]},{title:"fas fa-otter",searchTerms:["fauna","mammmal"]},{title:"fas fa-outdent",searchTerms:[]},{title:"fab fa-page4",searchTerms:[]},{title:"fab fa-pagelines",searchTerms:["eco","flora","leaf","leaves","nature","plant","tree"]},{title:"fas fa-paint-brush",searchTerms:[]},{title:"fas fa-paint-roller",searchTerms:["brush","painting","tool"]},{title:"fas fa-palette",searchTerms:["colors","painting"]},{title:"fab fa-palfed",searchTerms:[]},{title:"fas fa-pallet",searchTerms:[]},{title:"fas fa-paper-plane",searchTerms:[]},{title:"far fa-paper-plane",searchTerms:[]},{title:"fas fa-paperclip",searchTerms:["attachment"]},{title:"fas fa-parachute-box",searchTerms:["aid","assistance","rescue","supplies"]},{title:"fas fa-paragraph",searchTerms:[]},{title:"fas fa-parking",searchTerms:[]},{title:"fas fa-passport",searchTerms:["document","identification","issued"]},{title:"fas fa-pastafarianism",searchTerms:["agnosticism","atheism","flying spaghetti monster","fsm"]},{title:"fas fa-paste",searchTerms:["clipboard","copy"]},{title:"fab fa-patreon",searchTerms:[]},{title:"fas fa-pause",searchTerms:["wait"]},{title:"fas fa-pause-circle",searchTerms:[]},{title:"far fa-pause-circle",searchTerms:[]},{title:"fas fa-paw",searchTerms:["animal","pet"]},{title:"fab fa-paypal",searchTerms:[]},{title:"fas fa-peace",searchTerms:[]},{title:"fas fa-pen",searchTerms:["design","edit","update","write"]},{title:"fas fa-pen-alt",searchTerms:["design","edit","update","write"]},{title:"fas fa-pen-fancy",searchTerms:["design","edit","fountain pen","update","write"]},{title:"fas fa-pen-nib",searchTerms:["design","edit","fountain pen","update","write"]},{title:"fas fa-pen-square",searchTerms:["edit","pencil-square","update","write"]},{title:"fas fa-pencil-alt",searchTerms:["design","edit","pencil","update","write"]},{title:"fas fa-pencil-ruler",searchTerms:[]},{title:"fab fa-penny-arcade",searchTerms:["Dungeons & Dragons","d&d","dnd","fantasy","game","gaming","pax","tabletop"]},{title:"fas fa-people-carry",searchTerms:["movers"]},{title:"fas fa-percent",searchTerms:[]},{title:"fas fa-percentage",searchTerms:[]},{title:"fab fa-periscope",searchTerms:[]},{title:"fas fa-person-booth",searchTerms:["changing","changing room","election","human","person","vote","voting"]},{title:"fab fa-phabricator",searchTerms:[]},{title:"fab fa-phoenix-framework",searchTerms:[]},{title:"fab fa-phoenix-squadron",searchTerms:[]},{title:"fas fa-phone",searchTerms:["call","earphone","number","support","telephone","voice"]},{title:"fas fa-phone-slash",searchTerms:[]},{title:"fas fa-phone-square",searchTerms:["call","number","support","telephone","voice"]},{title:"fas fa-phone-volume",searchTerms:["telephone","volume-control-phone"]},{title:"fab fa-php",searchTerms:[]},{title:"fab fa-pied-piper",searchTerms:[]},{title:"fab fa-pied-piper-alt",searchTerms:[]},{title:"fab fa-pied-piper-hat",searchTerms:["clothing"]},{title:"fab fa-pied-piper-pp",searchTerms:[]},{title:"fas fa-piggy-bank",searchTerms:["save","savings"]},{title:"fas fa-pills",searchTerms:["drugs","medicine"]},{title:"fab fa-pinterest",searchTerms:[]},{title:"fab fa-pinterest-p",searchTerms:[]},{title:"fab fa-pinterest-square",searchTerms:[]},{title:"fas fa-place-of-worship",searchTerms:[]},{title:"fas fa-plane",searchTerms:["airplane","destination","fly","location","mode","travel","trip"]},{title:"fas fa-plane-arrival",searchTerms:["airplane","arriving","destination","fly","land","landing","location","mode","travel","trip"]},{title:"fas fa-plane-departure",searchTerms:["airplane","departing","destination","fly","location","mode","take off","taking off","travel","trip"]},{title:"fas fa-play",searchTerms:["music","playing","sound","start"]},{title:"fas fa-play-circle",searchTerms:["playing","start"]},{title:"far fa-play-circle",searchTerms:["playing","start"]},{title:"fab fa-playstation",searchTerms:[]},{title:"fas fa-plug",searchTerms:["connect","online","power"]},{title:"fas fa-plus",searchTerms:["add","create","expand","new","positive"]},{title:"fas fa-plus-circle",searchTerms:["add","create","expand","new","positive"]},{title:"fas fa-plus-square",searchTerms:["add","create","expand","new","positive"]},{title:"far fa-plus-square",searchTerms:["add","create","expand","new","positive"]},{title:"fas fa-podcast",searchTerms:[]},{title:"fas fa-poll",searchTerms:["results","survey","vote","voting"]},{title:"fas fa-poll-h",searchTerms:["results","survey","vote","voting"]},{title:"fas fa-poo",searchTerms:[]},{title:"fas fa-poo-storm",searchTerms:["mess","poop","shit"]},{title:"fas fa-poop",searchTerms:[]},{title:"fas fa-portrait",searchTerms:[]},{title:"fas fa-pound-sign",searchTerms:["gbp"]},{title:"fas fa-power-off",searchTerms:["on","reboot","restart"]},{title:"fas fa-pray",searchTerms:[]},{title:"fas fa-praying-hands",searchTerms:[]},{title:"fas fa-prescription",searchTerms:["drugs","medical","medicine","rx"]},{title:"fas fa-prescription-bottle",searchTerms:["drugs","medical","medicine","rx"]},{title:"fas fa-prescription-bottle-alt",searchTerms:["drugs","medical","medicine","rx"]},{title:"fas fa-print",searchTerms:[]},{title:"fas fa-procedures",searchTerms:[]},{title:"fab fa-product-hunt",searchTerms:[]},{title:"fas fa-project-diagram",searchTerms:[]},{title:"fab fa-pushed",searchTerms:[]},{title:"fas fa-puzzle-piece",searchTerms:["add-on","addon","section"]},{title:"fab fa-python",searchTerms:[]},{title:"fab fa-qq",searchTerms:[]},{title:"fas fa-qrcode",searchTerms:["scan"]},{title:"fas fa-question",searchTerms:["help","information","support","unknown"]},{title:"fas fa-question-circle",searchTerms:["help","information","support","unknown"]},{title:"far fa-question-circle",searchTerms:["help","information","support","unknown"]},{title:"fas fa-quidditch",searchTerms:[]},{title:"fab fa-quinscape",searchTerms:[]},{title:"fab fa-quora",searchTerms:[]},{title:"fas fa-quote-left",searchTerms:[]},{title:"fas fa-quote-right",searchTerms:[]},{title:"fas fa-quran",searchTerms:["book","islam","muslim"]},{title:"fab fa-r-project",searchTerms:[]},{title:"fas fa-rainbow",searchTerms:[]},{title:"fas fa-random",searchTerms:["shuffle","sort"]},{title:"fab fa-ravelry",searchTerms:[]},{title:"fab fa-react",searchTerms:[]},{title:"fab fa-reacteurope",searchTerms:[]},{title:"fab fa-readme",searchTerms:[]},{title:"fab fa-rebel",searchTerms:[]},{title:"fas fa-receipt",searchTerms:["check","invoice","table"]},{title:"fas fa-recycle",searchTerms:[]},{title:"fab fa-red-river",searchTerms:[]},{title:"fab fa-reddit",searchTerms:[]},{title:"fab fa-reddit-alien",searchTerms:[]},{title:"fab fa-reddit-square",searchTerms:[]},{title:"fas fa-redo",searchTerms:["forward","refresh","reload","repeat"]},{title:"fas fa-redo-alt",searchTerms:["forward","refresh","reload","repeat"]},{title:"fas fa-registered",searchTerms:[]},{title:"far fa-registered",searchTerms:[]},{title:"fab fa-renren",searchTerms:[]},{title:"fas fa-reply",searchTerms:[]},{title:"fas fa-reply-all",searchTerms:[]},{title:"fab fa-replyd",searchTerms:[]},{title:"fas fa-republican",searchTerms:["american","conservative","election","elephant","politics","republican party","right","right-wing","usa"]},{title:"fab fa-researchgate",searchTerms:[]},{title:"fab fa-resolving",searchTerms:[]},{title:"fas fa-retweet",searchTerms:["refresh","reload","share","swap"]},{title:"fab fa-rev",searchTerms:[]},{title:"fas fa-ribbon",searchTerms:["badge","cause","lapel","pin"]},{title:"fas fa-ring",searchTerms:["Dungeons & Dragons","Gollum","band","binding","d&d","dnd","fantasy","jewelry","precious"]},{title:"fas fa-road",searchTerms:["street"]},{title:"fas fa-robot",searchTerms:[]},{title:"fas fa-rocket",searchTerms:["app"]},{title:"fab fa-rocketchat",searchTerms:[]},{title:"fab fa-rockrms",searchTerms:[]},{title:"fas fa-route",searchTerms:[]},{title:"fas fa-rss",searchTerms:["blog"]},{title:"fas fa-rss-square",searchTerms:["blog","feed"]},{title:"fas fa-ruble-sign",searchTerms:["rub"]},{title:"fas fa-ruler",searchTerms:[]},{title:"fas fa-ruler-combined",searchTerms:[]},{title:"fas fa-ruler-horizontal",searchTerms:[]},{title:"fas fa-ruler-vertical",searchTerms:[]},{title:"fas fa-running",searchTerms:["jog","sprint"]},{title:"fas fa-rupee-sign",searchTerms:["indian","inr"]},{title:"fas fa-sad-cry",searchTerms:["emoticon","face","tear","tears"]},{title:"far fa-sad-cry",searchTerms:["emoticon","face","tear","tears"]},{title:"fas fa-sad-tear",searchTerms:["emoticon","face","tear","tears"]},{title:"far fa-sad-tear",searchTerms:["emoticon","face","tear","tears"]},{title:"fab fa-safari",searchTerms:["browser"]},{title:"fab fa-sass",searchTerms:[]},{title:"fas fa-save",searchTerms:["floppy","floppy-o"]},{title:"far fa-save",searchTerms:["floppy","floppy-o"]},{title:"fab fa-schlix",searchTerms:[]},{title:"fas fa-school",searchTerms:[]},{title:"fas fa-screwdriver",searchTerms:["admin","fix","repair","settings","tool"]},{title:"fab fa-scribd",searchTerms:[]},{title:"fas fa-scroll",searchTerms:["Dungeons & Dragons","announcement","d&d","dnd","fantasy","paper"]},{title:"fas fa-search",searchTerms:["bigger","enlarge","magnify","preview","zoom"]},{title:"fas fa-search-dollar",searchTerms:[]},{title:"fas fa-search-location",searchTerms:[]},{title:"fas fa-search-minus",searchTerms:["minify","negative","smaller","zoom","zoom out"]},{title:"fas fa-search-plus",searchTerms:["bigger","enlarge","magnify","positive","zoom","zoom in"]},{title:"fab fa-searchengin",searchTerms:[]},{title:"fas fa-seedling",searchTerms:[]},{title:"fab fa-sellcast",searchTerms:["eercast"]},{title:"fab fa-sellsy",searchTerms:[]},{title:"fas fa-server",searchTerms:["cpu"]},{title:"fab fa-servicestack",searchTerms:[]},{title:"fas fa-shapes",searchTerms:["circle","square","triangle"]},{title:"fas fa-share",searchTerms:[]},{title:"fas fa-share-alt",searchTerms:[]},{title:"fas fa-share-alt-square",searchTerms:[]},{title:"fas fa-share-square",searchTerms:["send","social"]},{title:"far fa-share-square",searchTerms:["send","social"]},{title:"fas fa-shekel-sign",searchTerms:["ils"]},{title:"fas fa-shield-alt",searchTerms:["achievement","award","block","defend","security","winner"]},{title:"fas fa-ship",searchTerms:["boat","sea"]},{title:"fas fa-shipping-fast",searchTerms:[]},{title:"fab fa-shirtsinbulk",searchTerms:[]},{title:"fas fa-shoe-prints",searchTerms:["feet","footprints","steps"]},{title:"fas fa-shopping-bag",searchTerms:[]},{title:"fas fa-shopping-basket",searchTerms:[]},{title:"fas fa-shopping-cart",searchTerms:["buy","checkout","payment","purchase"]},{title:"fab fa-shopware",searchTerms:[]},{title:"fas fa-shower",searchTerms:[]},{title:"fas fa-shuttle-van",searchTerms:["machine","public-transportation","transportation","vehicle"]},{title:"fas fa-sign",searchTerms:[]},{title:"fas fa-sign-in-alt",searchTerms:["arrow","enter","join","log in","login","sign in","sign up","sign-in","signin","signup"]},{title:"fas fa-sign-language",searchTerms:[]},{title:"fas fa-sign-out-alt",searchTerms:["arrow","exit","leave","log out","logout","sign-out"]},{title:"fas fa-signal",searchTerms:["bars","graph","online","status"]},{title:"fas fa-signature",searchTerms:["John Hancock","cursive","name","writing"]},{title:"fab fa-simplybuilt",searchTerms:[]},{title:"fab fa-sistrix",searchTerms:[]},{title:"fas fa-sitemap",searchTerms:["directory","hierarchy","ia","information architecture","organization"]},{title:"fab fa-sith",searchTerms:[]},{title:"fas fa-skull",searchTerms:["bones","skeleton","yorick"]},{title:"fas fa-skull-crossbones",searchTerms:["Dungeons & Dragons","alert","bones","d&d","danger","dead","deadly","death","dnd","fantasy","halloween","holiday","jolly-roger","pirate","poison","skeleton","warning"]},{title:"fab fa-skyatlas",searchTerms:[]},{title:"fab fa-skype",searchTerms:[]},{title:"fab fa-slack",searchTerms:["anchor","hash","hashtag"]},{title:"fab fa-slack-hash",searchTerms:["anchor","hash","hashtag"]},{title:"fas fa-slash",searchTerms:[]},{title:"fas fa-sliders-h",searchTerms:["settings","sliders"]},{title:"fab fa-slideshare",searchTerms:[]},{title:"fas fa-smile",searchTerms:["approve","emoticon","face","happy","rating","satisfied"]},{title:"far fa-smile",searchTerms:["approve","emoticon","face","happy","rating","satisfied"]},{title:"fas fa-smile-beam",searchTerms:["emoticon","face","happy","positive"]},{title:"far fa-smile-beam",searchTerms:["emoticon","face","happy","positive"]},{title:"fas fa-smile-wink",searchTerms:["emoticon","face","happy"]},{title:"far fa-smile-wink",searchTerms:["emoticon","face","happy"]},{title:"fas fa-smog",searchTerms:["dragon"]},{title:"fas fa-smoking",searchTerms:["cigarette","nicotine","smoking status"]},{title:"fas fa-smoking-ban",searchTerms:["no smoking","non-smoking"]},{title:"fab fa-snapchat",searchTerms:[]},{title:"fab fa-snapchat-ghost",searchTerms:[]},{title:"fab fa-snapchat-square",searchTerms:[]},{title:"fas fa-snowflake",searchTerms:["precipitation","seasonal","winter"]},{title:"far fa-snowflake",searchTerms:["precipitation","seasonal","winter"]},{title:"fas fa-socks",searchTerms:["business socks","business time","flight of the conchords","wednesday"]},{title:"fas fa-solar-panel",searchTerms:["clean","eco-friendly","energy","green","sun"]},{title:"fas fa-sort",searchTerms:["order"]},{title:"fas fa-sort-alpha-down",searchTerms:["sort-alpha-asc"]},{title:"fas fa-sort-alpha-up",searchTerms:["sort-alpha-desc"]},{title:"fas fa-sort-amount-down",searchTerms:["sort-amount-asc"]},{title:"fas fa-sort-amount-up",searchTerms:["sort-amount-desc"]},{title:"fas fa-sort-down",searchTerms:["arrow","descending","sort-desc"]},{title:"fas fa-sort-numeric-down",searchTerms:["numbers","sort-numeric-asc"]},{title:"fas fa-sort-numeric-up",searchTerms:["numbers","sort-numeric-desc"]},{title:"fas fa-sort-up",searchTerms:["arrow","ascending","sort-asc"]},{title:"fab fa-soundcloud",searchTerms:[]},{title:"fas fa-spa",searchTerms:["flora","mindfullness","plant","wellness"]},{title:"fas fa-space-shuttle",searchTerms:["astronaut","machine","nasa","rocket","transportation"]},{title:"fab fa-speakap",searchTerms:[]},{title:"fas fa-spider",searchTerms:["arachnid","bug","charlotte","crawl","eight","halloween","holiday"]},{title:"fas fa-spinner",searchTerms:["loading","progress"]},{title:"fas fa-splotch",searchTerms:[]},{title:"fab fa-spotify",searchTerms:[]},{title:"fas fa-spray-can",searchTerms:[]},{title:"fas fa-square",searchTerms:["block","box"]},{title:"far fa-square",searchTerms:["block","box"]},{title:"fas fa-square-full",searchTerms:[]},{title:"fas fa-square-root-alt",searchTerms:[]},{title:"fab fa-squarespace",searchTerms:[]},{title:"fab fa-stack-exchange",searchTerms:[]},{title:"fab fa-stack-overflow",searchTerms:[]},{title:"fas fa-stamp",searchTerms:[]},{title:"fas fa-star",searchTerms:["achievement","award","favorite","important","night","rating","score"]},{title:"far fa-star",searchTerms:["achievement","award","favorite","important","night","rating","score"]},{title:"fas fa-star-and-crescent",searchTerms:["islam","muslim"]},{title:"fas fa-star-half",searchTerms:["achievement","award","rating","score","star-half-empty","star-half-full"]},{title:"far fa-star-half",searchTerms:["achievement","award","rating","score","star-half-empty","star-half-full"]},{title:"fas fa-star-half-alt",searchTerms:["achievement","award","rating","score","star-half-empty","star-half-full"]},{title:"fas fa-star-of-david",searchTerms:["jewish","judaism"]},{title:"fas fa-star-of-life",searchTerms:[]},{title:"fab fa-staylinked",searchTerms:[]},{title:"fab fa-steam",searchTerms:[]},{title:"fab fa-steam-square",searchTerms:[]},{title:"fab fa-steam-symbol",searchTerms:[]},{title:"fas fa-step-backward",searchTerms:["beginning","first","previous","rewind","start"]},{title:"fas fa-step-forward",searchTerms:["end","last","next"]},{title:"fas fa-stethoscope",searchTerms:[]},{title:"fab fa-sticker-mule",searchTerms:[]},{title:"fas fa-sticky-note",searchTerms:[]},{title:"far fa-sticky-note",searchTerms:[]},{title:"fas fa-stop",searchTerms:["block","box","square"]},{title:"fas fa-stop-circle",searchTerms:[]},{title:"far fa-stop-circle",searchTerms:[]},{title:"fas fa-stopwatch",searchTerms:["time"]},{title:"fas fa-store",searchTerms:[]},{title:"fas fa-store-alt",searchTerms:[]},{title:"fab fa-strava",searchTerms:[]},{title:"fas fa-stream",searchTerms:[]},{title:"fas fa-street-view",searchTerms:["map"]},{title:"fas fa-strikethrough",searchTerms:[]},{title:"fab fa-stripe",searchTerms:[]},{title:"fab fa-stripe-s",searchTerms:[]},{title:"fas fa-stroopwafel",searchTerms:["dessert","food","sweets","waffle"]},{title:"fab fa-studiovinari",searchTerms:[]},{title:"fab fa-stumbleupon",searchTerms:[]},{title:"fab fa-stumbleupon-circle",searchTerms:[]},{title:"fas fa-subscript",searchTerms:[]},{title:"fas fa-subway",searchTerms:["machine","railway","train","transportation","vehicle"]},{title:"fas fa-suitcase",searchTerms:["baggage","luggage","move","suitcase","travel","trip"]},{title:"fas fa-suitcase-rolling",searchTerms:[]},{title:"fas fa-sun",searchTerms:["brighten","contrast","day","lighter","sol","solar","star","weather"]},{title:"far fa-sun",searchTerms:["brighten","contrast","day","lighter","sol","solar","star","weather"]},{title:"fab fa-superpowers",searchTerms:[]},{title:"fas fa-superscript",searchTerms:["exponential"]},{title:"fab fa-supple",searchTerms:[]},{title:"fas fa-surprise",searchTerms:["emoticon","face","shocked"]},{title:"far fa-surprise",searchTerms:["emoticon","face","shocked"]},{title:"fas fa-swatchbook",searchTerms:[]},{title:"fas fa-swimmer",searchTerms:["athlete","head","man","person","water"]},{title:"fas fa-swimming-pool",searchTerms:["ladder","recreation","water"]},{title:"fas fa-synagogue",searchTerms:["building","jewish","judaism","star of david","temple"]},{title:"fas fa-sync",searchTerms:["exchange","refresh","reload","rotate","swap"]},{title:"fas fa-sync-alt",searchTerms:["refresh","reload","rotate"]},{title:"fas fa-syringe",searchTerms:["immunizations","needle"]},{title:"fas fa-table",searchTerms:["data","excel","spreadsheet"]},{title:"fas fa-table-tennis",searchTerms:[]},{title:"fas fa-tablet",searchTerms:["apple","device","ipad","kindle","screen"]},{title:"fas fa-tablet-alt",searchTerms:["apple","device","ipad","kindle","screen"]},{title:"fas fa-tablets",searchTerms:["drugs","medicine"]},{title:"fas fa-tachometer-alt",searchTerms:["dashboard","tachometer"]},{title:"fas fa-tag",searchTerms:["label"]},{title:"fas fa-tags",searchTerms:["labels"]},{title:"fas fa-tape",searchTerms:[]},{title:"fas fa-tasks",searchTerms:["downloading","downloads","loading","progress","settings"]},{title:"fas fa-taxi",searchTerms:["cab","cabbie","car","car service","lyft","machine","transportation","uber","vehicle"]},{title:"fab fa-teamspeak",searchTerms:[]},{title:"fas fa-teeth",searchTerms:[]},{title:"fas fa-teeth-open",searchTerms:[]},{title:"fab fa-telegram",searchTerms:[]},{title:"fab fa-telegram-plane",searchTerms:[]},{title:"fas fa-temperature-high",searchTerms:["mercury","thermometer","warm"]},{title:"fas fa-temperature-low",searchTerms:["cool","mercury","thermometer"]},{title:"fab fa-tencent-weibo",searchTerms:[]},{title:"fas fa-terminal",searchTerms:["code","command","console","prompt"]},{title:"fas fa-text-height",searchTerms:[]},{title:"fas fa-text-width",searchTerms:[]},{title:"fas fa-th",searchTerms:["blocks","boxes","grid","squares"]},{title:"fas fa-th-large",searchTerms:["blocks","boxes","grid","squares"]},{title:"fas fa-th-list",searchTerms:["checklist","completed","done","finished","ol","todo","ul"]},{title:"fab fa-the-red-yeti",searchTerms:[]},{title:"fas fa-theater-masks",searchTerms:[]},{title:"fab fa-themeco",searchTerms:[]},{title:"fab fa-themeisle",searchTerms:[]},{title:"fas fa-thermometer",searchTerms:["mercury","status","temperature"]},{title:"fas fa-thermometer-empty",searchTerms:["mercury","status","temperature"]},{title:"fas fa-thermometer-full",searchTerms:["fever","mercury","status","temperature"]},{title:"fas fa-thermometer-half",searchTerms:["mercury","status","temperature"]},{title:"fas fa-thermometer-quarter",searchTerms:["mercury","status","temperature"]},{title:"fas fa-thermometer-three-quarters",searchTerms:["mercury","status","temperature"]},{title:"fab fa-think-peaks",searchTerms:[]},{title:"fas fa-thumbs-down",searchTerms:["disagree","disapprove","dislike","hand","thumbs-o-down"]},{title:"far fa-thumbs-down",searchTerms:["disagree","disapprove","dislike","hand","thumbs-o-down"]},{title:"fas fa-thumbs-up",searchTerms:["agree","approve","favorite","hand","like","ok","okay","success","thumbs-o-up","yes","you got it dude"]},{title:"far fa-thumbs-up",searchTerms:["agree","approve","favorite","hand","like","ok","okay","success","thumbs-o-up","yes","you got it dude"]},{title:"fas fa-thumbtack",searchTerms:["coordinates","location","marker","pin","thumb-tack"]},{title:"fas fa-ticket-alt",searchTerms:["ticket"]},{title:"fas fa-times",searchTerms:["close","cross","error","exit","incorrect","notice","notification","notify","problem","wrong","x"]},{title:"fas fa-times-circle",searchTerms:["close","cross","exit","incorrect","notice","notification","notify","problem","wrong","x"]},{title:"far fa-times-circle",searchTerms:["close","cross","exit","incorrect","notice","notification","notify","problem","wrong","x"]},{title:"fas fa-tint",searchTerms:["drop","droplet","raindrop","waterdrop"]},{title:"fas fa-tint-slash",searchTerms:[]},{title:"fas fa-tired",searchTerms:["emoticon","face","grumpy"]},{title:"far fa-tired",searchTerms:["emoticon","face","grumpy"]},{title:"fas fa-toggle-off",searchTerms:["switch"]},{title:"fas fa-toggle-on",searchTerms:["switch"]},{title:"fas fa-toilet-paper",searchTerms:["bathroom","halloween","holiday","lavatory","prank","restroom","roll"]},{title:"fas fa-toolbox",searchTerms:["admin","container","fix","repair","settings","tools"]},{title:"fas fa-tooth",searchTerms:["bicuspid","dental","molar","mouth","teeth"]},{title:"fas fa-torah",searchTerms:["book","jewish","judaism"]},{title:"fas fa-torii-gate",searchTerms:["building","shintoism"]},{title:"fas fa-tractor",searchTerms:[]},{title:"fab fa-trade-federation",searchTerms:[]},{title:"fas fa-trademark",searchTerms:[]},{title:"fas fa-traffic-light",searchTerms:[]},{title:"fas fa-train",searchTerms:["bullet","locomotive","railway"]},{title:"fas fa-transgender",searchTerms:["intersex"]},{title:"fas fa-transgender-alt",searchTerms:[]},{title:"fas fa-trash",searchTerms:["delete","garbage","hide","remove"]},{title:"fas fa-trash-alt",searchTerms:["delete","garbage","hide","remove","trash","trash-o"]},{title:"far fa-trash-alt",searchTerms:["delete","garbage","hide","remove","trash","trash-o"]},{title:"fas fa-tree",searchTerms:["bark","fall","flora","forest","nature","plant","seasonal"]},{title:"fab fa-trello",searchTerms:[]},{title:"fab fa-tripadvisor",searchTerms:[]},{title:"fas fa-trophy",searchTerms:["achievement","award","cup","game","winner"]},{title:"fas fa-truck",searchTerms:["delivery","shipping"]},{title:"fas fa-truck-loading",searchTerms:[]},{title:"fas fa-truck-monster",searchTerms:[]},{title:"fas fa-truck-moving",searchTerms:[]},{title:"fas fa-truck-pickup",searchTerms:[]},{title:"fas fa-tshirt",searchTerms:["cloth","clothing"]},{title:"fas fa-tty",searchTerms:[]},{title:"fab fa-tumblr",searchTerms:[]},{title:"fab fa-tumblr-square",searchTerms:[]},{title:"fas fa-tv",searchTerms:["computer","display","monitor","television"]},{title:"fab fa-twitch",searchTerms:[]},{title:"fab fa-twitter",searchTerms:["social network","tweet"]},{title:"fab fa-twitter-square",searchTerms:["social network","tweet"]},{title:"fab fa-typo3",searchTerms:[]},{title:"fab fa-uber",searchTerms:[]},{title:"fab fa-uikit",searchTerms:[]},{title:"fas fa-umbrella",searchTerms:["protection","rain"]},{title:"fas fa-umbrella-beach",searchTerms:["protection","recreation","sun"]},{title:"fas fa-underline",searchTerms:[]},{title:"fas fa-undo",searchTerms:["back","control z","exchange","oops","return","rotate","swap"]},{title:"fas fa-undo-alt",searchTerms:["back","control z","exchange","oops","return","swap"]},{title:"fab fa-uniregistry",searchTerms:[]},{title:"fas fa-universal-access",searchTerms:[]},{title:"fas fa-university",searchTerms:["bank","institution"]},{title:"fas fa-unlink",searchTerms:["chain","chain-broken","remove"]},{title:"fas fa-unlock",searchTerms:["admin","lock","password","protect"]},{title:"fas fa-unlock-alt",searchTerms:["admin","lock","password","protect"]},{title:"fab fa-untappd",searchTerms:[]},{title:"fas fa-upload",searchTerms:["export","publish"]},{title:"fab fa-usb",searchTerms:[]},{title:"fas fa-user",searchTerms:["account","avatar","head","human","man","person","profile"]},{title:"far fa-user",searchTerms:["account","avatar","head","human","man","person","profile"]},{title:"fas fa-user-alt",searchTerms:["account","avatar","head","human","man","person","profile"]},{title:"fas fa-user-alt-slash",searchTerms:[]},{title:"fas fa-user-astronaut",searchTerms:["avatar","clothing","cosmonaut","space","suit"]},{title:"fas fa-user-check",searchTerms:[]},{title:"fas fa-user-circle",searchTerms:["account","avatar","head","human","man","person","profile"]},{title:"far fa-user-circle",searchTerms:["account","avatar","head","human","man","person","profile"]},{title:"fas fa-user-clock",searchTerms:[]},{title:"fas fa-user-cog",searchTerms:[]},{title:"fas fa-user-edit",searchTerms:[]},{title:"fas fa-user-friends",searchTerms:[]},{title:"fas fa-user-graduate",searchTerms:["cap","clothing","commencement","gown","graduation","student"]},{title:"fas fa-user-injured",searchTerms:["cast","ouch","sling"]},{title:"fas fa-user-lock",searchTerms:[]},{title:"fas fa-user-md",searchTerms:["doctor","job","medical","nurse","occupation","profile"]},{title:"fas fa-user-minus",searchTerms:["delete","negative","remove"]},{title:"fas fa-user-ninja",searchTerms:["assassin","avatar","dangerous","deadly","sneaky"]},{title:"fas fa-user-plus",searchTerms:["positive","sign up","signup"]},{title:"fas fa-user-secret",searchTerms:["clothing","coat","hat","incognito","privacy","spy","whisper"]},{title:"fas fa-user-shield",searchTerms:[]},{title:"fas fa-user-slash",searchTerms:["ban","remove"]},{title:"fas fa-user-tag",searchTerms:[]},{title:"fas fa-user-tie",searchTerms:["avatar","business","clothing","formal"]},{title:"fas fa-user-times",searchTerms:["archive","delete","remove","x"]},{title:"fas fa-users",searchTerms:["people","persons","profiles"]},{title:"fas fa-users-cog",searchTerms:[]},{title:"fab fa-ussunnah",searchTerms:[]},{title:"fas fa-utensil-spoon",searchTerms:["spoon"]},{title:"fas fa-utensils",searchTerms:["cutlery","dinner","eat","food","knife","restaurant","spoon"]},{title:"fab fa-vaadin",searchTerms:[]},{title:"fas fa-vector-square",searchTerms:["anchors","lines","object"]},{title:"fas fa-venus",searchTerms:["female"]},{title:"fas fa-venus-double",searchTerms:[]},{title:"fas fa-venus-mars",searchTerms:[]},{title:"fab fa-viacoin",searchTerms:[]},{title:"fab fa-viadeo",searchTerms:[]},{title:"fab fa-viadeo-square",searchTerms:[]},{title:"fas fa-vial",searchTerms:["test tube"]},{title:"fas fa-vials",searchTerms:["lab results","test tubes"]},{title:"fab fa-viber",searchTerms:[]},{title:"fas fa-video",searchTerms:["camera","film","movie","record","video-camera"]},{title:"fas fa-video-slash",searchTerms:[]},{title:"fas fa-vihara",searchTerms:["buddhism","buddhist","building","monastery"]},{title:"fab fa-vimeo",searchTerms:[]},{title:"fab fa-vimeo-square",searchTerms:[]},{title:"fab fa-vimeo-v",searchTerms:["vimeo"]},{title:"fab fa-vine",searchTerms:[]},{title:"fab fa-vk",searchTerms:[]},{title:"fab fa-vnv",searchTerms:[]},{title:"fas fa-volleyball-ball",searchTerms:[]},{title:"fas fa-volume-down",searchTerms:["audio","lower","music","quieter","sound","speaker"]},{title:"fas fa-volume-mute",searchTerms:[]},{title:"fas fa-volume-off",searchTerms:["audio","music","mute","sound"]},{title:"fas fa-volume-up",searchTerms:["audio","higher","louder","music","sound","speaker"]},{title:"fas fa-vote-yea",searchTerms:["accept","cast","election","politics","positive","yes"]},{title:"fas fa-vr-cardboard",searchTerms:["google","reality","virtual"]},{title:"fab fa-vuejs",searchTerms:[]},{title:"fas fa-walking",searchTerms:[]},{title:"fas fa-wallet",searchTerms:[]},{title:"fas fa-warehouse",searchTerms:[]},{title:"fas fa-water",searchTerms:[]},{title:"fab fa-weebly",searchTerms:[]},{title:"fab fa-weibo",searchTerms:[]},{title:"fas fa-weight",searchTerms:["measurement","scale","weight"]},{title:"fas fa-weight-hanging",searchTerms:["anvil","heavy","measurement"]},{title:"fab fa-weixin",searchTerms:[]},{title:"fab fa-whatsapp",searchTerms:[]},{title:"fab fa-whatsapp-square",searchTerms:[]},{title:"fas fa-wheelchair",searchTerms:["handicap","person"]},{title:"fab fa-whmcs",searchTerms:[]},{title:"fas fa-wifi",searchTerms:[]},{title:"fab fa-wikipedia-w",searchTerms:[]},{title:"fas fa-wind",searchTerms:["air","blow","breeze","fall","seasonal"]},{title:"fas fa-window-close",searchTerms:[]},{title:"far fa-window-close",searchTerms:[]},{title:"fas fa-window-maximize",searchTerms:[]},{title:"far fa-window-maximize",searchTerms:[]},{title:"fas fa-window-minimize",searchTerms:[]},{title:"far fa-window-minimize",searchTerms:[]},{title:"fas fa-window-restore",searchTerms:[]},{title:"far fa-window-restore",searchTerms:[]},{title:"fab fa-windows",searchTerms:["microsoft"]},{title:"fas fa-wine-bottle",searchTerms:["alcohol","beverage","drink","glass","grapes"]},{title:"fas fa-wine-glass",searchTerms:["alcohol","beverage","drink","grapes"]},{title:"fas fa-wine-glass-alt",searchTerms:["alcohol","beverage","drink","grapes"]},{title:"fab fa-wix",searchTerms:[]},{title:"fab fa-wizards-of-the-coast",searchTerms:["Dungeons & Dragons","d&d","dnd","fantasy","game","gaming","tabletop"]},{title:"fab fa-wolf-pack-battalion",searchTerms:[]},{title:"fas fa-won-sign",searchTerms:["krw"]},{title:"fab fa-wordpress",searchTerms:[]},{title:"fab fa-wordpress-simple",searchTerms:[]},{title:"fab fa-wpbeginner",searchTerms:[]},{title:"fab fa-wpexplorer",searchTerms:[]},{title:"fab fa-wpforms",searchTerms:[]},{title:"fab fa-wpressr",searchTerms:["rendact"]},{title:"fas fa-wrench",searchTerms:["fix","settings","spanner","tool","update"]},{title:"fas fa-x-ray",searchTerms:["radiological images","radiology"]},{title:"fab fa-xbox",searchTerms:[]},{title:"fab fa-xing",searchTerms:[]},{title:"fab fa-xing-square",searchTerms:[]},{title:"fab fa-y-combinator",searchTerms:[]},{title:"fab fa-yahoo",searchTerms:[]},{title:"fab fa-yandex",searchTerms:[]},{title:"fab fa-yandex-international",searchTerms:[]},{title:"fab fa-yelp",searchTerms:[]},{title:"fas fa-yen-sign",searchTerms:["jpy","money"]},{title:"fas fa-yin-yang",searchTerms:["daoism","opposites","taoism"]},{title:"fab fa-yoast",searchTerms:[]},{title:"fab fa-youtube",searchTerms:["film","video","youtube-play","youtube-square"]},{title:"fab fa-youtube-square",searchTerms:[]},{title:"fab fa-zhihu",searchTerms:[]}]})});
|
1 |
+
|
2 |
+
|
3 |
+
|
4 |
!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)}(function(j){j.ui=j.ui||{};j.ui.version="1.12.1";!function(){var r,y=Math.max,x=Math.abs,s=/left|center|right/,i=/top|center|bottom/,c=/[\+\-]\d+(\.[\d]+)?%?/,f=/^\w+/,l=/%$/,o=j.fn.pos;function q(e,a,t){return[parseFloat(e[0])*(l.test(e[0])?a/100:1),parseFloat(e[1])*(l.test(e[1])?t/100:1)]}function C(e,a){return parseInt(j.css(e,a),10)||0}j.pos={scrollbarWidth:function(){if(void 0!==r)return r;var e,a,t=j("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),s=t.children()[0];return j("body").append(t),e=s.offsetWidth,t.css("overflow","scroll"),e===(a=s.offsetWidth)&&(a=t[0].clientWidth),t.remove(),r=e-a},getScrollInfo:function(e){var a=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),t=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),s="scroll"===a||"auto"===a&&e.width<e.element[0].scrollWidth;return{width:"scroll"===t||"auto"===t&&e.height<e.element[0].scrollHeight?j.pos.scrollbarWidth():0,height:s?j.pos.scrollbarWidth():0}},getWithinInfo:function(e){var a=j(e||window),t=j.isWindow(a[0]),s=!!a[0]&&9===a[0].nodeType;return{element:a,isWindow:t,isDocument:s,offset:!t&&!s?j(e).offset():{left:0,top:0},scrollLeft:a.scrollLeft(),scrollTop:a.scrollTop(),width:a.outerWidth(),height:a.outerHeight()}}},j.fn.pos=function(h){if(!h||!h.of)return o.apply(this,arguments);h=j.extend({},h);var m,p,d,T,u,e,a,t,g=j(h.of),b=j.pos.getWithinInfo(h.within),k=j.pos.getScrollInfo(b),w=(h.collision||"flip").split(" "),v={};return e=9===(t=(a=g)[0]).nodeType?{width:a.width(),height:a.height(),offset:{top:0,left:0}}:j.isWindow(t)?{width:a.width(),height:a.height(),offset:{top:a.scrollTop(),left:a.scrollLeft()}}:t.preventDefault?{width:0,height:0,offset:{top:t.pageY,left:t.pageX}}:{width:a.outerWidth(),height:a.outerHeight(),offset:a.offset()},g[0].preventDefault&&(h.at="left top"),p=e.width,d=e.height,T=e.offset,u=j.extend({},T),j.each(["my","at"],function(){var e,a,t=(h[this]||"").split(" ");1===t.length&&(t=s.test(t[0])?t.concat(["center"]):i.test(t[0])?["center"].concat(t):["center","center"]),t[0]=s.test(t[0])?t[0]:"center",t[1]=i.test(t[1])?t[1]:"center",e=c.exec(t[0]),a=c.exec(t[1]),v[this]=[e?e[0]:0,a?a[0]:0],h[this]=[f.exec(t[0])[0],f.exec(t[1])[0]]}),1===w.length&&(w[1]=w[0]),"right"===h.at[0]?u.left+=p:"center"===h.at[0]&&(u.left+=p/2),"bottom"===h.at[1]?u.top+=d:"center"===h.at[1]&&(u.top+=d/2),m=q(v.at,p,d),u.left+=m[0],u.top+=m[1],this.each(function(){var t,e,c=j(this),f=c.outerWidth(),l=c.outerHeight(),a=C(this,"marginLeft"),s=C(this,"marginTop"),r=f+a+C(this,"marginRight")+k.width,i=l+s+C(this,"marginBottom")+k.height,o=j.extend({},u),n=q(v.my,c.outerWidth(),c.outerHeight());"right"===h.my[0]?o.left-=f:"center"===h.my[0]&&(o.left-=f/2),"bottom"===h.my[1]?o.top-=l:"center"===h.my[1]&&(o.top-=l/2),o.left+=n[0],o.top+=n[1],t={marginLeft:a,marginTop:s},j.each(["left","top"],function(e,a){j.ui.pos[w[e]]&&j.ui.pos[w[e]][a](o,{targetWidth:p,targetHeight:d,elemWidth:f,elemHeight:l,collisionPosition:t,collisionWidth:r,collisionHeight:i,offset:[m[0]+n[0],m[1]+n[1]],my:h.my,at:h.at,within:b,elem:c})}),h.using&&(e=function(e){var a=T.left-o.left,t=a+p-f,s=T.top-o.top,r=s+d-l,i={target:{element:g,left:T.left,top:T.top,width:p,height:d},element:{element:c,left:o.left,top:o.top,width:f,height:l},horizontal:t<0?"left":0<a?"right":"center",vertical:r<0?"top":0<s?"bottom":"middle"};p<f&&x(a+t)<p&&(i.horizontal="center"),d<l&&x(s+r)<d&&(i.vertical="middle"),y(x(a),x(t))>y(x(s),x(r))?i.important="horizontal":i.important="vertical",h.using.call(this,e,i)}),c.offset(j.extend(o,{using:e}))})},j.ui.pos={_trigger:function(e,a,t,s){a.elem&&a.elem.trigger({type:t,position:e,positionData:a,triggered:s})},fit:{left:function(e,a){j.ui.pos._trigger(e,a,"posCollide","fitLeft");var t,s=a.within,r=s.isWindow?s.scrollLeft:s.offset.left,i=s.width,c=e.left-a.collisionPosition.marginLeft,f=r-c,l=c+a.collisionWidth-i-r;a.collisionWidth>i?0<f&&l<=0?(t=e.left+f+a.collisionWidth-i-r,e.left+=f-t):e.left=0<l&&f<=0?r:l<f?r+i-a.collisionWidth:r:0<f?e.left+=f:0<l?e.left-=l:e.left=y(e.left-c,e.left),j.ui.pos._trigger(e,a,"posCollided","fitLeft")},top:function(e,a){j.ui.pos._trigger(e,a,"posCollide","fitTop");var t,s=a.within,r=s.isWindow?s.scrollTop:s.offset.top,i=a.within.height,c=e.top-a.collisionPosition.marginTop,f=r-c,l=c+a.collisionHeight-i-r;a.collisionHeight>i?0<f&&l<=0?(t=e.top+f+a.collisionHeight-i-r,e.top+=f-t):e.top=0<l&&f<=0?r:l<f?r+i-a.collisionHeight:r:0<f?e.top+=f:0<l?e.top-=l:e.top=y(e.top-c,e.top),j.ui.pos._trigger(e,a,"posCollided","fitTop")}},flip:{left:function(e,a){j.ui.pos._trigger(e,a,"posCollide","flipLeft");var t,s,r=a.within,i=r.offset.left+r.scrollLeft,c=r.width,f=r.isWindow?r.scrollLeft:r.offset.left,l=e.left-a.collisionPosition.marginLeft,o=l-f,n=l+a.collisionWidth-c-f,h="left"===a.my[0]?-a.elemWidth:"right"===a.my[0]?a.elemWidth:0,m="left"===a.at[0]?a.targetWidth:"right"===a.at[0]?-a.targetWidth:0,p=-2*a.offset[0];o<0?((t=e.left+h+m+p+a.collisionWidth-c-i)<0||t<x(o))&&(e.left+=h+m+p):0<n&&(0<(s=e.left-a.collisionPosition.marginLeft+h+m+p-f)||x(s)<n)&&(e.left+=h+m+p),j.ui.pos._trigger(e,a,"posCollided","flipLeft")},top:function(e,a){j.ui.pos._trigger(e,a,"posCollide","flipTop");var t,s,r=a.within,i=r.offset.top+r.scrollTop,c=r.height,f=r.isWindow?r.scrollTop:r.offset.top,l=e.top-a.collisionPosition.marginTop,o=l-f,n=l+a.collisionHeight-c-f,h="top"===a.my[1]?-a.elemHeight:"bottom"===a.my[1]?a.elemHeight:0,m="top"===a.at[1]?a.targetHeight:"bottom"===a.at[1]?-a.targetHeight:0,p=-2*a.offset[1];o<0?((s=e.top+h+m+p+a.collisionHeight-c-i)<0||s<x(o))&&(e.top+=h+m+p):0<n&&(0<(t=e.top-a.collisionPosition.marginTop+h+m+p-f)||x(t)<n)&&(e.top+=h+m+p),j.ui.pos._trigger(e,a,"posCollided","flipTop")}},flipfit:{left:function(){j.ui.pos.flip.left.apply(this,arguments),j.ui.pos.fit.left.apply(this,arguments)},top:function(){j.ui.pos.flip.top.apply(this,arguments),j.ui.pos.fit.top.apply(this,arguments)}}},function(){var e,a,t,s,r,i=document.getElementsByTagName("body")[0],c=document.createElement("div");for(r in e=document.createElement(i?"div":"body"),t={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},i&&j.extend(t,{position:"absolute",left:"-1000px",top:"-1000px"}),t)e.style[r]=t[r];e.appendChild(c),(a=i||document.documentElement).insertBefore(e,a.firstChild),c.style.cssText="position: absolute; left: 10.7432222px;",s=j(c).offset().left,j.support.offsetFractions=10<s&&s<11,e.innerHTML="",a.removeChild(e)}()}();j.ui.position}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):window.jQuery&&!window.jQuery.fn.iconpicker&&e(window.jQuery)}(function(l){"use strict";var t=function(e){return!1===e||""===e||null==e},s=function(e){return 0<l(e).length},r=function(e){return"string"==typeof e||e instanceof String},i=function(e,a){return-1!==l.inArray(e,a)},c=function(e,a){this._id=c._idCounter++,this.element=l(e).addClass("iconpicker-element"),this._trigger("iconpickerCreate",{iconpickerValue:this.iconpickerValue}),this.options=l.extend({},c.defaultOptions,this.element.data(),a),this.options.templates=l.extend({},c.defaultOptions.templates,this.options.templates),this.options.originalPlacement=this.options.placement,this.container=!!s(this.options.container)&&l(this.options.container),!1===this.container&&(this.element.is(".dropdown-toggle")?this.container=l("~ .dropdown-menu:first",this.element):this.container=this.element.is("input,textarea,button,.btn")?this.element.parent():this.element),this.container.addClass("iconpicker-container"),this.isDropdownMenu()&&(this.options.placement="inline"),this.input=!!this.element.is("input,textarea")&&this.element.addClass("iconpicker-input"),!1===this.input&&(this.input=this.container.find(this.options.input),this.input.is("input,textarea")||(this.input=!1)),this.component=this.isDropdownMenu()?this.container.parent().find(this.options.component):this.container.find(this.options.component),0===this.component.length?this.component=!1:this.component.find("i").addClass("iconpicker-component"),this._createPopover(),this._createIconpicker(),0===this.getAcceptButton().length&&(this.options.mustAccept=!1),this.isInputGroup()?this.container.parent().append(this.popover):this.container.append(this.popover),this._bindElementEvents(),this._bindWindowEvents(),this.update(this.options.selected),this.isInline()&&this.show(),this._trigger("iconpickerCreated",{iconpickerValue:this.iconpickerValue})};c._idCounter=0,c.defaultOptions={title:!1,selected:!1,defaultValue:!1,placement:"bottom",collision:"none",animation:!0,hideOnSelect:!1,showFooter:!1,searchInFooter:!1,mustAccept:!1,selectedCustomClass:"bg-primary",icons:[],fullClassFormatter:function(e){return e},input:"input,.iconpicker-input",inputSearch:!1,container:!1,component:".input-group-addon,.iconpicker-component",templates:{popover:'<div class="iconpicker-popover popover"><div class="arrow"></div><div class="popover-title"></div><div class="popover-content"></div></div>',footer:'<div class="popover-footer"></div>',buttons:'<button class="iconpicker-btn iconpicker-btn-cancel btn btn-default btn-sm">Cancel</button> <button class="iconpicker-btn iconpicker-btn-accept btn btn-primary btn-sm">Accept</button>',search:'<input type="search" class="form-control iconpicker-search" placeholder="Type to filter" />',iconpicker:'<div class="iconpicker"><div class="iconpicker-items"></div></div>',iconpickerItem:'<a role="button" href="javascript:;" class="iconpicker-item"><i></i></a>'}},c.batch=function(e,a){var t=Array.prototype.slice.call(arguments,2);return l(e).each(function(){var e=l(this).data("iconpicker");e&&e[a].apply(e,t)})},c.prototype={constructor:c,options:{},_id:0,_trigger:function(e,a){a=a||{},this.element.trigger(l.extend({type:e,iconpickerInstance:this},a))},_createPopover:function(){this.popover=l(this.options.templates.popover);var e=this.popover.find(".popover-title");if(this.options.title&&e.append(l('<div class="popover-title-text">'+this.options.title+"</div>")),this.hasSeparatedSearchInput()&&!this.options.searchInFooter?e.append(this.options.templates.search):this.options.title||e.remove(),this.options.showFooter&&!t(this.options.templates.footer)){var a=l(this.options.templates.footer);this.hasSeparatedSearchInput()&&this.options.searchInFooter&&a.append(l(this.options.templates.search)),t(this.options.templates.buttons)||a.append(l(this.options.templates.buttons)),this.popover.append(a)}return!0===this.options.animation&&this.popover.addClass("fade"),this.popover},_createIconpicker:function(){var t=this;this.iconpicker=l(this.options.templates.iconpicker);var e=function(e){var a=l(this);a.is("i")&&(a=a.parent()),t._trigger("iconpickerSelect",{iconpickerItem:a,iconpickerValue:t.iconpickerValue}),!1===t.options.mustAccept?(t.update(a.data("iconpickerValue")),t._trigger("iconpickerSelected",{iconpickerItem:this,iconpickerValue:t.iconpickerValue})):t.update(a.data("iconpickerValue"),!0),t.options.hideOnSelect&&!1===t.options.mustAccept&&t.hide()},a=l(this.options.templates.iconpickerItem),s=[];for(var r in this.options.icons)if("string"==typeof this.options.icons[r].title){var i=a.clone();if(i.find("i").addClass(this.options.fullClassFormatter(this.options.icons[r].title)),i.data("iconpickerValue",this.options.icons[r].title).on("click.iconpicker",e),i.attr("title","."+this.options.icons[r].title),0<this.options.icons[r].searchTerms.length){for(var c="",f=0;f<this.options.icons[r].searchTerms.length;f++)c=c+this.options.icons[r].searchTerms[f]+" ";i.attr("data-search-terms",c)}s.push(i)}return this.iconpicker.find(".iconpicker-items").append(s),this.popover.find(".popover-content").append(this.iconpicker),this.iconpicker},_isEventInsideIconpicker:function(e){var a=l(e.target);return!((!a.hasClass("iconpicker-element")||a.hasClass("iconpicker-element")&&!a.is(this.element))&&0===a.parents(".iconpicker-popover").length)},_bindElementEvents:function(){var a=this;this.getSearchInput().on("keyup.iconpicker",function(){a.filter(l(this).val().toLowerCase())}),this.getAcceptButton().on("click.iconpicker",function(){var e=a.iconpicker.find(".iconpicker-selected").get(0);a.update(a.iconpickerValue),a._trigger("iconpickerSelected",{iconpickerItem:e,iconpickerValue:a.iconpickerValue}),a.isInline()||a.hide()}),this.getCancelButton().on("click.iconpicker",function(){a.isInline()||a.hide()}),this.element.on("focus.iconpicker",function(e){a.show(),e.stopPropagation()}),this.hasComponent()&&this.component.on("click.iconpicker",function(){a.toggle()}),this.hasInput()&&this.input.on("keyup.iconpicker",function(e){i(e.keyCode,[38,40,37,39,16,17,18,9,8,91,93,20,46,186,190,46,78,188,44,86])?a._updateFormGroupStatus(!1!==a.getValid(this.value)):a.update(),!0===a.options.inputSearch&&a.filter(l(this).val().toLowerCase())})},_bindWindowEvents:function(){var e=l(window.document),a=this,t=".iconpicker.inst"+this._id;l(window).on("resize.iconpicker"+t+" orientationchange.iconpicker"+t,function(e){a.popover.hasClass("in")&&a.updatePlacement()}),a.isInline()||e.on("mouseup"+t,function(e){a._isEventInsideIconpicker(e)||a.isInline()||a.hide()})},_unbindElementEvents:function(){this.popover.off(".iconpicker"),this.element.off(".iconpicker"),this.hasInput()&&this.input.off(".iconpicker"),this.hasComponent()&&this.component.off(".iconpicker"),this.hasContainer()&&this.container.off(".iconpicker")},_unbindWindowEvents:function(){l(window).off(".iconpicker.inst"+this._id),l(window.document).off(".iconpicker.inst"+this._id)},updatePlacement:function(e,a){e=e||this.options.placement,this.options.placement=e,a=!0===(a=a||this.options.collision)?"flip":a;var t={at:"right bottom",my:"right top",of:this.hasInput()&&!this.isInputGroup()?this.input:this.container,collision:!0===a?"flip":a,within:window};if(this.popover.removeClass("inline topLeftCorner topLeft top topRight topRightCorner rightTop right rightBottom bottomRight bottomRightCorner bottom bottomLeft bottomLeftCorner leftBottom left leftTop"),"object"==typeof e)return this.popover.pos(l.extend({},t,e));switch(e){case"inline":t=!1;break;case"topLeftCorner":t.my="right bottom",t.at="left top";break;case"topLeft":t.my="left bottom",t.at="left top";break;case"top":t.my="center bottom",t.at="center top";break;case"topRight":t.my="right bottom",t.at="right top";break;case"topRightCorner":t.my="left bottom",t.at="right top";break;case"rightTop":t.my="left bottom",t.at="right center";break;case"right":t.my="left center",t.at="right center";break;case"rightBottom":t.my="left top",t.at="right center";break;case"bottomRightCorner":t.my="left top",t.at="right bottom";break;case"bottomRight":t.my="right top",t.at="right bottom";break;case"bottom":t.my="center top",t.at="center bottom";break;case"bottomLeft":t.my="left top",t.at="left bottom";break;case"bottomLeftCorner":t.my="right top",t.at="left bottom";break;case"leftBottom":t.my="right top",t.at="left center";break;case"left":t.my="right center",t.at="left center";break;case"leftTop":t.my="right bottom",t.at="left center";break;default:return!1}return this.popover.css({display:"inline"===this.options.placement?"":"block"}),!1!==t?this.popover.pos(t).css("maxWidth",l(window).width()-this.container.offset().left-5):this.popover.css({top:"auto",right:"auto",bottom:"auto",left:"auto",maxWidth:"none"}),this.popover.addClass(this.options.placement),!0},_updateComponents:function(){if(this.iconpicker.find(".iconpicker-item.iconpicker-selected").removeClass("iconpicker-selected "+this.options.selectedCustomClass),this.iconpickerValue&&this.iconpicker.find("."+this.options.fullClassFormatter(this.iconpickerValue).replace(/ /g,".")).parent().addClass("iconpicker-selected "+this.options.selectedCustomClass),this.hasComponent()){var e=this.component.find("i");0<e.length?e.attr("class",this.options.fullClassFormatter(this.iconpickerValue)):this.component.html(this.getHtml())}},_updateFormGroupStatus:function(e){return!!this.hasInput()&&(!1!==e?this.input.parents(".form-group:first").removeClass("has-error"):this.input.parents(".form-group:first").addClass("has-error"),!0)},getValid:function(e){r(e)||(e="");var a=""===e;e=l.trim(e);for(var t=!1,s=0;s<this.options.icons.length;s++)if(this.options.icons[s].title===e){t=!0;break}return!(!t&&!a)&&e},setValue:function(e){var a=this.getValid(e);return!1!==a?(this.iconpickerValue=a,this._trigger("iconpickerSetValue",{iconpickerValue:a}),this.iconpickerValue):(this._trigger("iconpickerInvalid",{iconpickerValue:e}),!1)},getHtml:function(){return'<i class="'+this.options.fullClassFormatter(this.iconpickerValue)+'"></i>'},setSourceValue:function(e){return!1!==(e=this.setValue(e))&&""!==e&&(this.hasInput()?this.input.val(this.iconpickerValue):this.element.data("iconpickerValue",this.iconpickerValue),this._trigger("iconpickerSetSourceValue",{iconpickerValue:e})),e},getSourceValue:function(e){var a=e=e||this.options.defaultValue;return void 0!==(a=this.hasInput()?this.input.val():this.element.data("iconpickerValue"))&&""!==a&&null!==a&&!1!==a||(a=e),a},hasInput:function(){return!1!==this.input},isInputSearch:function(){return this.hasInput()&&!0===this.options.inputSearch},isInputGroup:function(){return this.container.is(".input-group")},isDropdownMenu:function(){return this.container.is(".dropdown-menu")},hasSeparatedSearchInput:function(){return!1!==this.options.templates.search&&!this.isInputSearch()},hasComponent:function(){return!1!==this.component},hasContainer:function(){return!1!==this.container},getAcceptButton:function(){return this.popover.find(".iconpicker-btn-accept")},getCancelButton:function(){return this.popover.find(".iconpicker-btn-cancel")},getSearchInput:function(){return this.popover.find(".iconpicker-search")},filter:function(s){if(t(s))return this.iconpicker.find(".iconpicker-item").show(),l(!1);var r=[];return this.iconpicker.find(".iconpicker-item").each(function(){var e=l(this),a=e.attr("title").toLowerCase();a=a+" "+(e.attr("data-search-terms")?e.attr("data-search-terms").toLowerCase():"");var t=!1;try{t=new RegExp("(^|\\W)"+s,"g")}catch(e){t=!1}!1!==t&&a.match(t)?(r.push(e),e.show()):e.hide()}),r},show:function(){if(this.popover.hasClass("in"))return!1;l.iconpicker.batch(l(".iconpicker-popover.in:not(.inline)").not(this.popover),"hide"),this._trigger("iconpickerShow",{iconpickerValue:this.iconpickerValue}),this.updatePlacement(),this.popover.addClass("in"),setTimeout(l.proxy(function(){this.popover.css("display",this.isInline()?"":"block"),this._trigger("iconpickerShown",{iconpickerValue:this.iconpickerValue})},this),this.options.animation?300:1)},hide:function(){if(!this.popover.hasClass("in"))return!1;this._trigger("iconpickerHide",{iconpickerValue:this.iconpickerValue}),this.popover.removeClass("in"),setTimeout(l.proxy(function(){this.popover.css("display","none"),this.getSearchInput().val(""),this.filter(""),this._trigger("iconpickerHidden",{iconpickerValue:this.iconpickerValue})},this),this.options.animation?300:1)},toggle:function(){this.popover.is(":visible")?this.hide():this.show(!0)},update:function(e,a){return e=e||this.getSourceValue(this.iconpickerValue),this._trigger("iconpickerUpdate",{iconpickerValue:this.iconpickerValue}),!0===a?e=this.setValue(e):(e=this.setSourceValue(e),this._updateFormGroupStatus(!1!==e)),!1!==e&&this._updateComponents(),this._trigger("iconpickerUpdated",{iconpickerValue:this.iconpickerValue}),e},destroy:function(){this._trigger("iconpickerDestroy",{iconpickerValue:this.iconpickerValue}),this.element.removeData("iconpicker").removeData("iconpickerValue").removeClass("iconpicker-element"),this._unbindElementEvents(),this._unbindWindowEvents(),l(this.popover).remove(),this._trigger("iconpickerDestroyed",{iconpickerValue:this.iconpickerValue})},disable:function(){return!!this.hasInput()&&(this.input.prop("disabled",!0),!0)},enable:function(){return!!this.hasInput()&&(this.input.prop("disabled",!1),!0)},isDisabled:function(){return!!this.hasInput()&&!0===this.input.prop("disabled")},isInline:function(){return"inline"===this.options.placement||this.popover.hasClass("inline")}},l.iconpicker=c,l.fn.iconpicker=function(a){return this.each(function(){var e=l(this);e.data("iconpicker")||e.data("iconpicker",new c(this,"object"==typeof a?a:{}))})},c.defaultOptions=l.extend(c.defaultOptions,{icons:[{title:"fab fa-500px",searchTerms:[]},{title:"fab fa-accessible-icon",searchTerms:["accessibility","handicap","person","wheelchair","wheelchair-alt"]},{title:"fab fa-accusoft",searchTerms:[]},{title:"fab fa-acquisitions-incorporated",searchTerms:["Dungeons & Dragons","d&d","dnd","fantasy","game","gaming","tabletop"]},{title:"fas fa-ad",searchTerms:[]},{title:"fas fa-address-book",searchTerms:[]},{title:"far fa-address-book",searchTerms:[]},{title:"fas fa-address-card",searchTerms:[]},{title:"far fa-address-card",searchTerms:[]},{title:"fas fa-adjust",searchTerms:["contrast"]},{title:"fab fa-adn",searchTerms:[]},{title:"fab fa-adversal",searchTerms:[]},{title:"fab fa-affiliatetheme",searchTerms:[]},{title:"fas fa-air-freshener",searchTerms:[]},{title:"fab fa-algolia",searchTerms:[]},{title:"fas fa-align-center",searchTerms:["middle","text"]},{title:"fas fa-align-justify",searchTerms:["text"]},{title:"fas fa-align-left",searchTerms:["text"]},{title:"fas fa-align-right",searchTerms:["text"]},{title:"fab fa-alipay",searchTerms:[]},{title:"fas fa-allergies",searchTerms:["freckles","hand","intolerances","pox","spots"]},{title:"fab fa-amazon",searchTerms:[]},{title:"fab fa-amazon-pay",searchTerms:[]},{title:"fas fa-ambulance",searchTerms:["help","machine","support","vehicle"]},{title:"fas fa-american-sign-language-interpreting",searchTerms:[]},{title:"fab fa-amilia",searchTerms:[]},{title:"fas fa-anchor",searchTerms:["link"]},{title:"fab fa-android",searchTerms:["robot"]},{title:"fab fa-angellist",searchTerms:[]},{title:"fas fa-angle-double-down",searchTerms:["arrows"]},{title:"fas fa-angle-double-left",searchTerms:["arrows","back","laquo","previous","quote"]},{title:"fas fa-angle-double-right",searchTerms:["arrows","forward","next","quote","raquo"]},{title:"fas fa-angle-double-up",searchTerms:["arrows"]},{title:"fas fa-angle-down",searchTerms:["arrow"]},{title:"fas fa-angle-left",searchTerms:["arrow","back","previous"]},{title:"fas fa-angle-right",searchTerms:["arrow","forward","next"]},{title:"fas fa-angle-up",searchTerms:["arrow"]},{title:"fas fa-angry",searchTerms:["disapprove","emoticon","face","mad","upset"]},{title:"far fa-angry",searchTerms:["disapprove","emoticon","face","mad","upset"]},{title:"fab fa-angrycreative",searchTerms:[]},{title:"fab fa-angular",searchTerms:[]},{title:"fas fa-ankh",searchTerms:["amulet","copper","coptic christianity","copts","crux ansata","egyptian","venus"]},{title:"fab fa-app-store",searchTerms:[]},{title:"fab fa-app-store-ios",searchTerms:[]},{title:"fab fa-apper",searchTerms:[]},{title:"fab fa-apple",searchTerms:["food","fruit","mac","osx"]},{title:"fas fa-apple-alt",searchTerms:["fall","food","fruit","fuji","macintosh","seasonal"]},{title:"fab fa-apple-pay",searchTerms:[]},{title:"fas fa-archive",searchTerms:["box","package","storage"]},{title:"fas fa-archway",searchTerms:["arc","monument","road","street"]},{title:"fas fa-arrow-alt-circle-down",searchTerms:["arrow-circle-o-down","download"]},{title:"far fa-arrow-alt-circle-down",searchTerms:["arrow-circle-o-down","download"]},{title:"fas fa-arrow-alt-circle-left",searchTerms:["arrow-circle-o-left","back","previous"]},{title:"far fa-arrow-alt-circle-left",searchTerms:["arrow-circle-o-left","back","previous"]},{title:"fas fa-arrow-alt-circle-right",searchTerms:["arrow-circle-o-right","forward","next"]},{title:"far fa-arrow-alt-circle-right",searchTerms:["arrow-circle-o-right","forward","next"]},{title:"fas fa-arrow-alt-circle-up",searchTerms:["arrow-circle-o-up"]},{title:"far fa-arrow-alt-circle-up",searchTerms:["arrow-circle-o-up"]},{title:"fas fa-arrow-circle-down",searchTerms:["download"]},{title:"fas fa-arrow-circle-left",searchTerms:["back","previous"]},{title:"fas fa-arrow-circle-right",searchTerms:["forward","next"]},{title:"fas fa-arrow-circle-up",searchTerms:[]},{title:"fas fa-arrow-down",searchTerms:["download"]},{title:"fas fa-arrow-left",searchTerms:["back","previous"]},{title:"fas fa-arrow-right",searchTerms:["forward","next"]},{title:"fas fa-arrow-up",searchTerms:[]},{title:"fas fa-arrows-alt",searchTerms:["arrow","arrows","bigger","enlarge","expand","fullscreen","move","position","reorder","resize"]},{title:"fas fa-arrows-alt-h",searchTerms:["arrows-h","resize"]},{title:"fas fa-arrows-alt-v",searchTerms:["arrows-v","resize"]},{title:"fas fa-assistive-listening-systems",searchTerms:[]},{title:"fas fa-asterisk",searchTerms:["details"]},{title:"fab fa-asymmetrik",searchTerms:[]},{title:"fas fa-at",searchTerms:["e-mail","email"]},{title:"fas fa-atlas",searchTerms:["book","directions","geography","map","wayfinding"]},{title:"fas fa-atom",searchTerms:["atheism","chemistry","science"]},{title:"fab fa-audible",searchTerms:[]},{title:"fas fa-audio-description",searchTerms:[]},{title:"fab fa-autoprefixer",searchTerms:[]},{title:"fab fa-avianex",searchTerms:[]},{title:"fab fa-aviato",searchTerms:[]},{title:"fas fa-award",searchTerms:["honor","praise","prize","recognition","ribbon"]},{title:"fab fa-aws",searchTerms:[]},{title:"fas fa-backspace",searchTerms:["command","delete","keyboard","undo"]},{title:"fas fa-backward",searchTerms:["previous","rewind"]},{title:"fas fa-balance-scale",searchTerms:["balanced","justice","legal","measure","weight"]},{title:"fas fa-ban",searchTerms:["abort","ban","block","cancel","delete","hide","prohibit","remove","stop","trash"]},{title:"fas fa-band-aid",searchTerms:["bandage","boo boo","ouch"]},{title:"fab fa-bandcamp",searchTerms:[]},{title:"fas fa-barcode",searchTerms:["scan"]},{title:"fas fa-bars",searchTerms:["checklist","drag","hamburger","list","menu","nav","navigation","ol","reorder","settings","todo","ul"]},{title:"fas fa-baseball-ball",searchTerms:[]},{title:"fas fa-basketball-ball",searchTerms:[]},{title:"fas fa-bath",searchTerms:[]},{title:"fas fa-battery-empty",searchTerms:["power","status"]},{title:"fas fa-battery-full",searchTerms:["power","status"]},{title:"fas fa-battery-half",searchTerms:["power","status"]},{title:"fas fa-battery-quarter",searchTerms:["power","status"]},{title:"fas fa-battery-three-quarters",searchTerms:["power","status"]},{title:"fas fa-bed",searchTerms:["lodging","sleep","travel"]},{title:"fas fa-beer",searchTerms:["alcohol","bar","beverage","drink","liquor","mug","stein"]},{title:"fab fa-behance",searchTerms:[]},{title:"fab fa-behance-square",searchTerms:[]},{title:"fas fa-bell",searchTerms:["alert","notification","reminder"]},{title:"far fa-bell",searchTerms:["alert","notification","reminder"]},{title:"fas fa-bell-slash",searchTerms:[]},{title:"far fa-bell-slash",searchTerms:[]},{title:"fas fa-bezier-curve",searchTerms:["curves","illustrator","lines","path","vector"]},{title:"fas fa-bible",searchTerms:["book","catholicism","christianity"]},{title:"fas fa-bicycle",searchTerms:["bike","gears","transportation","vehicle"]},{title:"fab fa-bimobject",searchTerms:[]},{title:"fas fa-binoculars",searchTerms:[]},{title:"fas fa-birthday-cake",searchTerms:[]},{title:"fab fa-bitbucket",searchTerms:["bitbucket-square","git"]},{title:"fab fa-bitcoin",searchTerms:[]},{title:"fab fa-bity",searchTerms:[]},{title:"fab fa-black-tie",searchTerms:[]},{title:"fab fa-blackberry",searchTerms:[]},{title:"fas fa-blender",searchTerms:[]},{title:"fas fa-blender-phone",searchTerms:["appliance","fantasy","silly"]},{title:"fas fa-blind",searchTerms:[]},{title:"fab fa-blogger",searchTerms:[]},{title:"fab fa-blogger-b",searchTerms:[]},{title:"fab fa-bluetooth",searchTerms:[]},{title:"fab fa-bluetooth-b",searchTerms:[]},{title:"fas fa-bold",searchTerms:[]},{title:"fas fa-bolt",searchTerms:["electricity","lightning","weather","zap"]},{title:"fas fa-bomb",searchTerms:[]},{title:"fas fa-bone",searchTerms:[]},{title:"fas fa-bong",searchTerms:["aparatus","cannabis","marijuana","pipe","smoke","smoking"]},{title:"fas fa-book",searchTerms:["documentation","read"]},{title:"fas fa-book-dead",searchTerms:["Dungeons & Dragons","crossbones","d&d","dark arts","death","dnd","documentation","evil","fantasy","halloween","holiday","read","skull","spell"]},{title:"fas fa-book-open",searchTerms:["flyer","notebook","open book","pamphlet","reading"]},{title:"fas fa-book-reader",searchTerms:["library"]},{title:"fas fa-bookmark",searchTerms:["save"]},{title:"far fa-bookmark",searchTerms:["save"]},{title:"fas fa-bowling-ball",searchTerms:[]},{title:"fas fa-box",searchTerms:["package"]},{title:"fas fa-box-open",searchTerms:[]},{title:"fas fa-boxes",searchTerms:[]},{title:"fas fa-braille",searchTerms:[]},{title:"fas fa-brain",searchTerms:["cerebellum","gray matter","intellect","medulla oblongata","mind","noodle","wit"]},{title:"fas fa-briefcase",searchTerms:["bag","business","luggage","office","work"]},{title:"fas fa-briefcase-medical",searchTerms:["health briefcase"]},{title:"fas fa-broadcast-tower",searchTerms:["airwaves","radio","waves"]},{title:"fas fa-broom",searchTerms:["clean","firebolt","fly","halloween","holiday","nimbus 2000","quidditch","sweep","witch"]},{title:"fas fa-brush",searchTerms:["bristles","color","handle","painting"]},{title:"fab fa-btc",searchTerms:[]},{title:"fas fa-bug",searchTerms:["insect","report"]},{title:"fas fa-building",searchTerms:["apartment","business","company","office","work"]},{title:"far fa-building",searchTerms:["apartment","business","company","office","work"]},{title:"fas fa-bullhorn",searchTerms:["announcement","broadcast","louder","megaphone","share"]},{title:"fas fa-bullseye",searchTerms:["target"]},{title:"fas fa-burn",searchTerms:["energy"]},{title:"fab fa-buromobelexperte",searchTerms:[]},{title:"fas fa-bus",searchTerms:["machine","public transportation","transportation","vehicle"]},{title:"fas fa-bus-alt",searchTerms:["machine","public transportation","transportation","vehicle"]},{title:"fas fa-business-time",searchTerms:["briefcase","business socks","clock","flight of the conchords","wednesday"]},{title:"fab fa-buysellads",searchTerms:[]},{title:"fas fa-calculator",searchTerms:[]},{title:"fas fa-calendar",searchTerms:["calendar-o","date","event","schedule","time","when"]},{title:"far fa-calendar",searchTerms:["calendar-o","date","event","schedule","time","when"]},{title:"fas fa-calendar-alt",searchTerms:["calendar","date","event","schedule","time","when"]},{title:"far fa-calendar-alt",searchTerms:["calendar","date","event","schedule","time","when"]},{title:"fas fa-calendar-check",searchTerms:["accept","agree","appointment","confirm","correct","done","ok","select","success","todo"]},{title:"far fa-calendar-check",searchTerms:["accept","agree","appointment","confirm","correct","done","ok","select","success","todo"]},{title:"fas fa-calendar-minus",searchTerms:["delete","negative","remove"]},{title:"far fa-calendar-minus",searchTerms:["delete","negative","remove"]},{title:"fas fa-calendar-plus",searchTerms:["add","create","new","positive"]},{title:"far fa-calendar-plus",searchTerms:["add","create","new","positive"]},{title:"fas fa-calendar-times",searchTerms:["archive","delete","remove","x"]},{title:"far fa-calendar-times",searchTerms:["archive","delete","remove","x"]},{title:"fas fa-camera",searchTerms:["photo","picture","record"]},{title:"fas fa-camera-retro",searchTerms:["photo","picture","record"]},{title:"fas fa-campground",searchTerms:["camping","fall","outdoors","seasonal","tent"]},{title:"fas fa-cannabis",searchTerms:["bud","chronic","drugs","endica","endo","ganja","marijuana","mary jane","pot","reefer","sativa","spliff","weed","whacky-tabacky"]},{title:"fas fa-capsules",searchTerms:["drugs","medicine"]},{title:"fas fa-car",searchTerms:["machine","transportation","vehicle"]},{title:"fas fa-car-alt",searchTerms:[]},{title:"fas fa-car-battery",searchTerms:[]},{title:"fas fa-car-crash",searchTerms:[]},{title:"fas fa-car-side",searchTerms:[]},{title:"fas fa-caret-down",searchTerms:["arrow","dropdown","menu","more","triangle down"]},{title:"fas fa-caret-left",searchTerms:["arrow","back","previous","triangle left"]},{title:"fas fa-caret-right",searchTerms:["arrow","forward","next","triangle right"]},{title:"fas fa-caret-square-down",searchTerms:["caret-square-o-down","dropdown","menu","more"]},{title:"far fa-caret-square-down",searchTerms:["caret-square-o-down","dropdown","menu","more"]},{title:"fas fa-caret-square-left",searchTerms:["back","caret-square-o-left","previous"]},{title:"far fa-caret-square-left",searchTerms:["back","caret-square-o-left","previous"]},{title:"fas fa-caret-square-right",searchTerms:["caret-square-o-right","forward","next"]},{title:"far fa-caret-square-right",searchTerms:["caret-square-o-right","forward","next"]},{title:"fas fa-caret-square-up",searchTerms:["caret-square-o-up"]},{title:"far fa-caret-square-up",searchTerms:["caret-square-o-up"]},{title:"fas fa-caret-up",searchTerms:["arrow","triangle up"]},{title:"fas fa-cart-arrow-down",searchTerms:["shopping"]},{title:"fas fa-cart-plus",searchTerms:["add","create","new","positive","shopping"]},{title:"fas fa-cat",searchTerms:["feline","halloween","holiday","kitten","kitty","meow","pet"]},{title:"fab fa-cc-amazon-pay",searchTerms:[]},{title:"fab fa-cc-amex",searchTerms:["amex"]},{title:"fab fa-cc-apple-pay",searchTerms:[]},{title:"fab fa-cc-diners-club",searchTerms:[]},{title:"fab fa-cc-discover",searchTerms:[]},{title:"fab fa-cc-jcb",searchTerms:[]},{title:"fab fa-cc-mastercard",searchTerms:[]},{title:"fab fa-cc-paypal",searchTerms:[]},{title:"fab fa-cc-stripe",searchTerms:[]},{title:"fab fa-cc-visa",searchTerms:[]},{title:"fab fa-centercode",searchTerms:[]},{title:"fas fa-certificate",searchTerms:["badge","star"]},{title:"fas fa-chair",searchTerms:["furniture","seat"]},{title:"fas fa-chalkboard",searchTerms:["blackboard","learning","school","teaching","whiteboard","writing"]},{title:"fas fa-chalkboard-teacher",searchTerms:["blackboard","instructor","learning","professor","school","whiteboard","writing"]},{title:"fas fa-charging-station",searchTerms:[]},{title:"fas fa-chart-area",searchTerms:["analytics","area-chart","graph"]},{title:"fas fa-chart-bar",searchTerms:["analytics","bar-chart","graph"]},{title:"far fa-chart-bar",searchTerms:["analytics","bar-chart","graph"]},{title:"fas fa-chart-line",searchTerms:["activity","analytics","dashboard","graph","line-chart"]},{title:"fas fa-chart-pie",searchTerms:["analytics","graph","pie-chart"]},{title:"fas fa-check",searchTerms:["accept","agree","checkmark","confirm","correct","done","notice","notification","notify","ok","select","success","tick","todo","yes"]},{title:"fas fa-check-circle",searchTerms:["accept","agree","confirm","correct","done","ok","select","success","todo","yes"]},{title:"far fa-check-circle",searchTerms:["accept","agree","confirm","correct","done","ok","select","success","todo","yes"]},{title:"fas fa-check-double",searchTerms:["accept","agree","checkmark","confirm","correct","done","notice","notification","notify","ok","select","success","tick","todo"]},{title:"fas fa-check-square",searchTerms:["accept","agree","checkmark","confirm","correct","done","ok","select","success","todo","yes"]},{title:"far fa-check-square",searchTerms:["accept","agree","checkmark","confirm","correct","done","ok","select","success","todo","yes"]},{title:"fas fa-chess",searchTerms:[]},{title:"fas fa-chess-bishop",searchTerms:[]},{title:"fas fa-chess-board",searchTerms:[]},{title:"fas fa-chess-king",searchTerms:[]},{title:"fas fa-chess-knight",searchTerms:[]},{title:"fas fa-chess-pawn",searchTerms:[]},{title:"fas fa-chess-queen",searchTerms:[]},{title:"fas fa-chess-rook",searchTerms:[]},{title:"fas fa-chevron-circle-down",searchTerms:["arrow","dropdown","menu","more"]},{title:"fas fa-chevron-circle-left",searchTerms:["arrow","back","previous"]},{title:"fas fa-chevron-circle-right",searchTerms:["arrow","forward","next"]},{title:"fas fa-chevron-circle-up",searchTerms:["arrow"]},{title:"fas fa-chevron-down",searchTerms:[]},{title:"fas fa-chevron-left",searchTerms:["back","bracket","previous"]},{title:"fas fa-chevron-right",searchTerms:["bracket","forward","next"]},{title:"fas fa-chevron-up",searchTerms:[]},{title:"fas fa-child",searchTerms:[]},{title:"fab fa-chrome",searchTerms:["browser"]},{title:"fas fa-church",searchTerms:["building","community","religion"]},{title:"fas fa-circle",searchTerms:["circle-thin","dot","notification"]},{title:"far fa-circle",searchTerms:["circle-thin","dot","notification"]},{title:"fas fa-circle-notch",searchTerms:["circle-o-notch"]},{title:"fas fa-city",searchTerms:["buildings","busy","skyscrapers","urban","windows"]},{title:"fas fa-clipboard",searchTerms:["paste"]},{title:"far fa-clipboard",searchTerms:["paste"]},{title:"fas fa-clipboard-check",searchTerms:["accept","agree","confirm","done","ok","select","success","todo","yes"]},{title:"fas fa-clipboard-list",searchTerms:["checklist","completed","done","finished","intinerary","ol","schedule","todo","ul"]},{title:"fas fa-clock",searchTerms:["date","late","schedule","timer","timestamp","watch"]},{title:"far fa-clock",searchTerms:["date","late","schedule","timer","timestamp","watch"]},{title:"fas fa-clone",searchTerms:["copy","duplicate"]},{title:"far fa-clone",searchTerms:["copy","duplicate"]},{title:"fas fa-closed-captioning",searchTerms:["cc"]},{title:"far fa-closed-captioning",searchTerms:["cc"]},{title:"fas fa-cloud",searchTerms:["save"]},{title:"fas fa-cloud-download-alt",searchTerms:["import"]},{title:"fas fa-cloud-meatball",searchTerms:[]},{title:"fas fa-cloud-moon",searchTerms:["crescent","evening","halloween","holiday","lunar","night","sky"]},{title:"fas fa-cloud-moon-rain",searchTerms:[]},{title:"fas fa-cloud-rain",searchTerms:["precipitation"]},{title:"fas fa-cloud-showers-heavy",searchTerms:["precipitation","rain","storm"]},{title:"fas fa-cloud-sun",searchTerms:["day","daytime","fall","outdoors","seasonal"]},{title:"fas fa-cloud-sun-rain",searchTerms:[]},{title:"fas fa-cloud-upload-alt",searchTerms:["cloud-upload"]},{title:"fab fa-cloudscale",searchTerms:[]},{title:"fab fa-cloudsmith",searchTerms:[]},{title:"fab fa-cloudversify",searchTerms:[]},{title:"fas fa-cocktail",searchTerms:["alcohol","beverage","drink"]},{title:"fas fa-code",searchTerms:["brackets","html"]},{title:"fas fa-code-branch",searchTerms:["branch","code-fork","fork","git","github","rebase","svn","vcs","version"]},{title:"fab fa-codepen",searchTerms:[]},{title:"fab fa-codiepie",searchTerms:[]},{title:"fas fa-coffee",searchTerms:["beverage","breakfast","cafe","drink","fall","morning","mug","seasonal","tea"]},{title:"fas fa-cog",searchTerms:["settings"]},{title:"fas fa-cogs",searchTerms:["gears","settings"]},{title:"fas fa-coins",searchTerms:[]},{title:"fas fa-columns",searchTerms:["dashboard","panes","split"]},{title:"fas fa-comment",searchTerms:["bubble","chat","conversation","feedback","message","note","notification","sms","speech","texting"]},{title:"far fa-comment",searchTerms:["bubble","chat","conversation","feedback","message","note","notification","sms","speech","texting"]},{title:"fas fa-comment-alt",searchTerms:["bubble","chat","commenting","conversation","feedback","message","note","notification","sms","speech","texting"]},{title:"far fa-comment-alt",searchTerms:["bubble","chat","commenting","conversation","feedback","message","note","notification","sms","speech","texting"]},{title:"fas fa-comment-dollar",searchTerms:[]},{title:"fas fa-comment-dots",searchTerms:[]},{title:"far fa-comment-dots",searchTerms:[]},{title:"fas fa-comment-slash",searchTerms:[]},{title:"fas fa-comments",searchTerms:["bubble","chat","conversation","feedback","message","note","notification","sms","speech","texting"]},{title:"far fa-comments",searchTerms:["bubble","chat","conversation","feedback","message","note","notification","sms","speech","texting"]},{title:"fas fa-comments-dollar",searchTerms:[]},{title:"fas fa-compact-disc",searchTerms:["bluray","cd","disc","media"]},{title:"fas fa-compass",searchTerms:["directory","location","menu","safari"]},{title:"far fa-compass",searchTerms:["directory","location","menu","safari"]},{title:"fas fa-compress",searchTerms:["collapse","combine","contract","merge","smaller"]},{title:"fas fa-concierge-bell",searchTerms:["attention","hotel","service","support"]},{title:"fab fa-connectdevelop",searchTerms:[]},{title:"fab fa-contao",searchTerms:[]},{title:"fas fa-cookie",searchTerms:["baked good","chips","food","snack","sweet","treat"]},{title:"fas fa-cookie-bite",searchTerms:["baked good","bitten","chips","eating","food","snack","sweet","treat"]},{title:"fas fa-copy",searchTerms:["clone","duplicate","file","files-o"]},{title:"far fa-copy",searchTerms:["clone","duplicate","file","files-o"]},{title:"fas fa-copyright",searchTerms:[]},{title:"far fa-copyright",searchTerms:[]},{title:"fas fa-couch",searchTerms:["furniture","sofa"]},{title:"fab fa-cpanel",searchTerms:[]},{title:"fab fa-creative-commons",searchTerms:[]},{title:"fab fa-creative-commons-by",searchTerms:[]},{title:"fab fa-creative-commons-nc",searchTerms:[]},{title:"fab fa-creative-commons-nc-eu",searchTerms:[]},{title:"fab fa-creative-commons-nc-jp",searchTerms:[]},{title:"fab fa-creative-commons-nd",searchTerms:[]},{title:"fab fa-creative-commons-pd",searchTerms:[]},{title:"fab fa-creative-commons-pd-alt",searchTerms:[]},{title:"fab fa-creative-commons-remix",searchTerms:[]},{title:"fab fa-creative-commons-sa",searchTerms:[]},{title:"fab fa-creative-commons-sampling",searchTerms:[]},{title:"fab fa-creative-commons-sampling-plus",searchTerms:[]},{title:"fab fa-creative-commons-share",searchTerms:[]},{title:"fab fa-creative-commons-zero",searchTerms:[]},{title:"fas fa-credit-card",searchTerms:["buy","checkout","credit-card-alt","debit","money","payment","purchase"]},{title:"far fa-credit-card",searchTerms:["buy","checkout","credit-card-alt","debit","money","payment","purchase"]},{title:"fab fa-critical-role",searchTerms:["Dungeons & Dragons","d&d","dnd","fantasy","game","gaming","tabletop"]},{title:"fas fa-crop",searchTerms:["design"]},{title:"fas fa-crop-alt",searchTerms:[]},{title:"fas fa-cross",searchTerms:["catholicism","christianity"]},{title:"fas fa-crosshairs",searchTerms:["gpd","picker","position"]},{title:"fas fa-crow",searchTerms:["bird","bullfrog","fauna","halloween","holiday","toad"]},{title:"fas fa-crown",searchTerms:[]},{title:"fab fa-css3",searchTerms:["code"]},{title:"fab fa-css3-alt",searchTerms:[]},{title:"fas fa-cube",searchTerms:["package"]},{title:"fas fa-cubes",searchTerms:["packages"]},{title:"fas fa-cut",searchTerms:["scissors"]},{title:"fab fa-cuttlefish",searchTerms:[]},{title:"fab fa-d-and-d",searchTerms:[]},{title:"fab fa-d-and-d-beyond",searchTerms:["Dungeons & Dragons","d&d","dnd","fantasy","gaming","tabletop"]},{title:"fab fa-dashcube",searchTerms:[]},{title:"fas fa-database",searchTerms:[]},{title:"fas fa-deaf",searchTerms:[]},{title:"fab fa-delicious",searchTerms:[]},{title:"fas fa-democrat",searchTerms:["american","democratic party","donkey","election","left","left-wing","liberal","politics","usa"]},{title:"fab fa-deploydog",searchTerms:[]},{title:"fab fa-deskpro",searchTerms:[]},{title:"fas fa-desktop",searchTerms:["computer","cpu","demo","desktop","device","machine","monitor","pc","screen"]},{title:"fab fa-dev",searchTerms:[]},{title:"fab fa-deviantart",searchTerms:[]},{title:"fas fa-dharmachakra",searchTerms:["buddhism","buddhist","wheel of dharma"]},{title:"fas fa-diagnoses",searchTerms:[]},{title:"fas fa-dice",searchTerms:["chance","gambling","game","roll"]},{title:"fas fa-dice-d20",searchTerms:["Dungeons & Dragons","chance","d&d","dnd","fantasy","gambling","game","roll"]},{title:"fas fa-dice-d6",searchTerms:["Dungeons & Dragons","chance","d&d","dnd","fantasy","gambling","game","roll"]},{title:"fas fa-dice-five",searchTerms:["chance","gambling","game","roll"]},{title:"fas fa-dice-four",searchTerms:["chance","gambling","game","roll"]},{title:"fas fa-dice-one",searchTerms:["chance","gambling","game","roll"]},{title:"fas fa-dice-six",searchTerms:["chance","gambling","game","roll"]},{title:"fas fa-dice-three",searchTerms:["chance","gambling","game","roll"]},{title:"fas fa-dice-two",searchTerms:["chance","gambling","game","roll"]},{title:"fab fa-digg",searchTerms:[]},{title:"fab fa-digital-ocean",searchTerms:[]},{title:"fas fa-digital-tachograph",searchTerms:[]},{title:"fas fa-directions",searchTerms:[]},{title:"fab fa-discord",searchTerms:[]},{title:"fab fa-discourse",searchTerms:[]},{title:"fas fa-divide",searchTerms:[]},{title:"fas fa-dizzy",searchTerms:["dazed","disapprove","emoticon","face"]},{title:"far fa-dizzy",searchTerms:["dazed","disapprove","emoticon","face"]},{title:"fas fa-dna",searchTerms:["double helix","helix"]},{title:"fab fa-dochub",searchTerms:[]},{title:"fab fa-docker",searchTerms:[]},{title:"fas fa-dog",searchTerms:["canine","fauna","mammmal","pet","pooch","puppy","woof"]},{title:"fas fa-dollar-sign",searchTerms:["$","dollar-sign","money","price","usd"]},{title:"fas fa-dolly",searchTerms:[]},{title:"fas fa-dolly-flatbed",searchTerms:[]},{title:"fas fa-donate",searchTerms:["generosity","give"]},{title:"fas fa-door-closed",searchTerms:[]},{title:"fas fa-door-open",searchTerms:[]},{title:"fas fa-dot-circle",searchTerms:["bullseye","notification","target"]},{title:"far fa-dot-circle",searchTerms:["bullseye","notification","target"]},{title:"fas fa-dove",searchTerms:["bird","fauna","flying","peace"]},{title:"fas fa-download",searchTerms:["import"]},{title:"fab fa-draft2digital",searchTerms:[]},{title:"fas fa-drafting-compass",searchTerms:["mechanical drawing","plot","plotting"]},{title:"fas fa-dragon",searchTerms:["Dungeons & Dragons","d&d","dnd","fantasy"]},{title:"fas fa-draw-polygon",searchTerms:[]},{title:"fab fa-dribbble",searchTerms:[]},{title:"fab fa-dribbble-square",searchTerms:[]},{title:"fab fa-dropbox",searchTerms:[]},{title:"fas fa-drum",searchTerms:["instrument","music","percussion","snare","sound"]},{title:"fas fa-drum-steelpan",searchTerms:["calypso","instrument","music","percussion","reggae","snare","sound","steel","tropical"]},{title:"fas fa-drumstick-bite",searchTerms:[]},{title:"fab fa-drupal",searchTerms:[]},{title:"fas fa-dumbbell",searchTerms:["exercise","gym","strength","weight","weight-lifting"]},{title:"fas fa-dungeon",searchTerms:["Dungeons & Dragons","d&d","dnd","door","entrance","fantasy","gate"]},{title:"fab fa-dyalog",searchTerms:[]},{title:"fab fa-earlybirds",searchTerms:[]},{title:"fab fa-ebay",searchTerms:[]},{title:"fab fa-edge",searchTerms:["browser","ie"]},{title:"fas fa-edit",searchTerms:["edit","pen","pencil","update","write"]},{title:"far fa-edit",searchTerms:["edit","pen","pencil","update","write"]},{title:"fas fa-eject",searchTerms:[]},{title:"fab fa-elementor",searchTerms:[]},{title:"fas fa-ellipsis-h",searchTerms:["dots","drag","kebab","list","menu","nav","navigation","ol","reorder","settings","ul"]},{title:"fas fa-ellipsis-v",searchTerms:["dots","drag","kebab","list","menu","nav","navigation","ol","reorder","settings","ul"]},{title:"fab fa-ello",searchTerms:[]},{title:"fab fa-ember",searchTerms:[]},{title:"fab fa-empire",searchTerms:[]},{title:"fas fa-envelope",searchTerms:["e-mail","email","letter","mail","message","notification","support"]},{title:"far fa-envelope",searchTerms:["e-mail","email","letter","mail","message","notification","support"]},{title:"fas fa-envelope-open",searchTerms:["e-mail","email","letter","mail","message","notification","support"]},{title:"far fa-envelope-open",searchTerms:["e-mail","email","letter","mail","message","notification","support"]},{title:"fas fa-envelope-open-text",searchTerms:[]},{title:"fas fa-envelope-square",searchTerms:["e-mail","email","letter","mail","message","notification","support"]},{title:"fab fa-envira",searchTerms:["leaf"]},{title:"fas fa-equals",searchTerms:[]},{title:"fas fa-eraser",searchTerms:["delete","remove"]},{title:"fab fa-erlang",searchTerms:[]},{title:"fab fa-ethereum",searchTerms:[]},{title:"fab fa-etsy",searchTerms:[]},{title:"fas fa-euro-sign",searchTerms:["eur"]},{title:"fas fa-exchange-alt",searchTerms:["arrow","arrows","exchange","reciprocate","return","swap","transfer"]},{title:"fas fa-exclamation",searchTerms:["alert","danger","error","important","notice","notification","notify","problem","warning"]},{title:"fas fa-exclamation-circle",searchTerms:["alert","danger","error","important","notice","notification","notify","problem","warning"]},{title:"fas fa-exclamation-triangle",searchTerms:["alert","danger","error","important","notice","notification","notify","problem","warning"]},{title:"fas fa-expand",searchTerms:["bigger","enlarge","resize"]},{title:"fas fa-expand-arrows-alt",searchTerms:["arrows-alt","bigger","enlarge","move","resize"]},{title:"fab fa-expeditedssl",searchTerms:[]},{title:"fas fa-external-link-alt",searchTerms:["external-link","new","open"]},{title:"fas fa-external-link-square-alt",searchTerms:["external-link-square","new","open"]},{title:"fas fa-eye",searchTerms:["optic","see","seen","show","sight","views","visible"]},{title:"far fa-eye",searchTerms:["optic","see","seen","show","sight","views","visible"]},{title:"fas fa-eye-dropper",searchTerms:["eyedropper"]},{title:"fas fa-eye-slash",searchTerms:["blind","hide","show","toggle","unseen","views","visible","visiblity"]},{title:"far fa-eye-slash",searchTerms:["blind","hide","show","toggle","unseen","views","visible","visiblity"]},{title:"fab fa-facebook",searchTerms:["facebook-official","social network"]},{title:"fab fa-facebook-f",searchTerms:["facebook"]},{title:"fab fa-facebook-messenger",searchTerms:[]},{title:"fab fa-facebook-square",searchTerms:["social network"]},{title:"fab fa-fantasy-flight-games",searchTerms:["Dungeons & Dragons","d&d","dnd","fantasy","game","gaming","tabletop"]},{title:"fas fa-fast-backward",searchTerms:["beginning","first","previous","rewind","start"]},{title:"fas fa-fast-forward",searchTerms:["end","last","next"]},{title:"fas fa-fax",searchTerms:[]},{title:"fas fa-feather",searchTerms:["bird","light","plucked","quill"]},{title:"fas fa-feather-alt",searchTerms:["bird","light","plucked","quill"]},{title:"fas fa-female",searchTerms:["human","person","profile","user","woman"]},{title:"fas fa-fighter-jet",searchTerms:["airplane","fast","fly","goose","maverick","plane","quick","top gun","transportation","travel"]},{title:"fas fa-file",searchTerms:["document","new","page","pdf","resume"]},{title:"far fa-file",searchTerms:["document","new","page","pdf","resume"]},{title:"fas fa-file-alt",searchTerms:["document","file-text","invoice","new","page","pdf"]},{title:"far fa-file-alt",searchTerms:["document","file-text","invoice","new","page","pdf"]},{title:"fas fa-file-archive",searchTerms:[".zip","bundle","compress","compression","download","zip"]},{title:"far fa-file-archive",searchTerms:[".zip","bundle","compress","compression","download","zip"]},{title:"fas fa-file-audio",searchTerms:[]},{title:"far fa-file-audio",searchTerms:[]},{title:"fas fa-file-code",searchTerms:[]},{title:"far fa-file-code",searchTerms:[]},{title:"fas fa-file-contract",searchTerms:["agreement","binding","document","legal","signature"]},{title:"fas fa-file-csv",searchTerms:["spreadsheets"]},{title:"fas fa-file-download",searchTerms:[]},{title:"fas fa-file-excel",searchTerms:[]},{title:"far fa-file-excel",searchTerms:[]},{title:"fas fa-file-export",searchTerms:[]},{title:"fas fa-file-image",searchTerms:[]},{title:"far fa-file-image",searchTerms:[]},{title:"fas fa-file-import",searchTerms:[]},{title:"fas fa-file-invoice",searchTerms:["bill","document","receipt"]},{title:"fas fa-file-invoice-dollar",searchTerms:["$","bill","document","dollar-sign","money","receipt","usd"]},{title:"fas fa-file-medical",searchTerms:[]},{title:"fas fa-file-medical-alt",searchTerms:[]},{title:"fas fa-file-pdf",searchTerms:[]},{title:"far fa-file-pdf",searchTerms:[]},{title:"fas fa-file-powerpoint",searchTerms:[]},{title:"far fa-file-powerpoint",searchTerms:[]},{title:"fas fa-file-prescription",searchTerms:["drugs","medical","medicine","rx"]},{title:"fas fa-file-signature",searchTerms:["John Hancock","contract","document","name"]},{title:"fas fa-file-upload",searchTerms:[]},{title:"fas fa-file-video",searchTerms:[]},{title:"far fa-file-video",searchTerms:[]},{title:"fas fa-file-word",searchTerms:[]},{title:"far fa-file-word",searchTerms:[]},{title:"fas fa-fill",searchTerms:["bucket","color","paint","paint bucket"]},{title:"fas fa-fill-drip",searchTerms:["bucket","color","drop","paint","paint bucket","spill"]},{title:"fas fa-film",searchTerms:["movie"]},{title:"fas fa-filter",searchTerms:["funnel","options"]},{title:"fas fa-fingerprint",searchTerms:["human","id","identification","lock","smudge","touch","unique","unlock"]},{title:"fas fa-fire",searchTerms:["caliente","flame","heat","hot","popular"]},{title:"fas fa-fire-extinguisher",searchTerms:[]},{title:"fab fa-firefox",searchTerms:["browser"]},{title:"fas fa-first-aid",searchTerms:[]},{title:"fab fa-first-order",searchTerms:[]},{title:"fab fa-first-order-alt",searchTerms:[]},{title:"fab fa-firstdraft",searchTerms:[]},{title:"fas fa-fish",searchTerms:["fauna","gold","swimming"]},{title:"fas fa-fist-raised",searchTerms:["Dungeons & Dragons","d&d","dnd","fantasy","hand","ki","monk","resist","strength","unarmed combat"]},{title:"fas fa-flag",searchTerms:["country","notice","notification","notify","pole","report","symbol"]},{title:"far fa-flag",searchTerms:["country","notice","notification","notify","pole","report","symbol"]},{title:"fas fa-flag-checkered",searchTerms:["notice","notification","notify","pole","racing","report","symbol"]},{title:"fas fa-flag-usa",searchTerms:["betsy ross","country","old glory","stars","stripes","symbol"]},{title:"fas fa-flask",searchTerms:["beaker","experimental","labs","science"]},{title:"fab fa-flickr",searchTerms:[]},{title:"fab fa-flipboard",searchTerms:[]},{title:"fas fa-flushed",searchTerms:["embarrassed","emoticon","face"]},{title:"far fa-flushed",searchTerms:["embarrassed","emoticon","face"]},{title:"fab fa-fly",searchTerms:[]},{title:"fas fa-folder",searchTerms:[]},{title:"far fa-folder",searchTerms:[]},{title:"fas fa-folder-minus",searchTerms:["archive","delete","negative","remove"]},{title:"fas fa-folder-open",searchTerms:[]},{title:"far fa-folder-open",searchTerms:[]},{title:"fas fa-folder-plus",searchTerms:["add","create","new","positive"]},{title:"fas fa-font",searchTerms:["text"]},{title:"fab fa-font-awesome",searchTerms:["meanpath"]},{title:"fab fa-font-awesome-alt",searchTerms:[]},{title:"fab fa-font-awesome-flag",searchTerms:[]},{title:"far fa-font-awesome-logo-full",searchTerms:[]},{title:"fas fa-font-awesome-logo-full",searchTerms:[]},{title:"fab fa-font-awesome-logo-full",searchTerms:[]},{title:"fab fa-fonticons",searchTerms:[]},{title:"fab fa-fonticons-fi",searchTerms:[]},{title:"fas fa-football-ball",searchTerms:["fall","pigskin","seasonal"]},{title:"fab fa-fort-awesome",searchTerms:["castle"]},{title:"fab fa-fort-awesome-alt",searchTerms:["castle"]},{title:"fab fa-forumbee",searchTerms:[]},{title:"fas fa-forward",searchTerms:["forward","next"]},{title:"fab fa-foursquare",searchTerms:[]},{title:"fab fa-free-code-camp",searchTerms:[]},{title:"fab fa-freebsd",searchTerms:[]},{title:"fas fa-frog",searchTerms:["amphibian","bullfrog","fauna","hop","kermit","kiss","prince","ribbit","toad","wart"]},{title:"fas fa-frown",searchTerms:["disapprove","emoticon","face","rating","sad"]},{title:"far fa-frown",searchTerms:["disapprove","emoticon","face","rating","sad"]},{title:"fas fa-frown-open",searchTerms:["disapprove","emoticon","face","rating","sad"]},{title:"far fa-frown-open",searchTerms:["disapprove","emoticon","face","rating","sad"]},{title:"fab fa-fulcrum",searchTerms:[]},{title:"fas fa-funnel-dollar",searchTerms:[]},{title:"fas fa-futbol",searchTerms:["ball","football","soccer"]},{title:"far fa-futbol",searchTerms:["ball","football","soccer"]},{title:"fab fa-galactic-republic",searchTerms:["politics","star wars"]},{title:"fab fa-galactic-senate",searchTerms:["star wars"]},{title:"fas fa-gamepad",searchTerms:["controller"]},{title:"fas fa-gas-pump",searchTerms:[]},{title:"fas fa-gavel",searchTerms:["hammer","judge","lawyer","opinion"]},{title:"fas fa-gem",searchTerms:["diamond"]},{title:"far fa-gem",searchTerms:["diamond"]},{title:"fas fa-genderless",searchTerms:[]},{title:"fab fa-get-pocket",searchTerms:[]},{title:"fab fa-gg",searchTerms:[]},{title:"fab fa-gg-circle",searchTerms:[]},{title:"fas fa-ghost",searchTerms:["apparition","blinky","clyde","floating","halloween","holiday","inky","pinky","spirit"]},{title:"fas fa-gift",searchTerms:["generosity","giving","party","present","wrapped"]},{title:"fab fa-git",searchTerms:[]},{title:"fab fa-git-square",searchTerms:[]},{title:"fab fa-github",searchTerms:["octocat"]},{title:"fab fa-github-alt",searchTerms:["octocat"]},{title:"fab fa-github-square",searchTerms:["octocat"]},{title:"fab fa-gitkraken",searchTerms:[]},{title:"fab fa-gitlab",searchTerms:["Axosoft"]},{title:"fab fa-gitter",searchTerms:[]},{title:"fas fa-glass-martini",searchTerms:["alcohol","bar","beverage","drink","glass","liquor","martini"]},{title:"fas fa-glass-martini-alt",searchTerms:[]},{title:"fas fa-glasses",searchTerms:["foureyes","hipster","nerd","reading","sight","spectacles"]},{title:"fab fa-glide",searchTerms:[]},{title:"fab fa-glide-g",searchTerms:[]},{title:"fas fa-globe",searchTerms:["all","coordinates","country","earth","global","gps","language","localize","location","map","online","place","planet","translate","travel","world"]},{title:"fas fa-globe-africa",searchTerms:["all","country","earth","global","gps","language","localize","location","map","online","place","planet","translate","travel","world"]},{title:"fas fa-globe-americas",searchTerms:["all","country","earth","global","gps","language","localize","location","map","online","place","planet","translate","travel","world"]},{title:"fas fa-globe-asia",searchTerms:["all","country","earth","global","gps","language","localize","location","map","online","place","planet","translate","travel","world"]},{title:"fab fa-gofore",searchTerms:[]},{title:"fas fa-golf-ball",searchTerms:[]},{title:"fab fa-goodreads",searchTerms:[]},{title:"fab fa-goodreads-g",searchTerms:[]},{title:"fab fa-google",searchTerms:[]},{title:"fab fa-google-drive",searchTerms:[]},{title:"fab fa-google-play",searchTerms:[]},{title:"fab fa-google-plus",searchTerms:["google-plus-circle","google-plus-official"]},{title:"fab fa-google-plus-g",searchTerms:["google-plus","social network"]},{title:"fab fa-google-plus-square",searchTerms:["social network"]},{title:"fab fa-google-wallet",searchTerms:[]},{title:"fas fa-gopuram",searchTerms:["building","entrance","hinduism","temple","tower"]},{title:"fas fa-graduation-cap",searchTerms:["learning","school","student"]},{title:"fab fa-gratipay",searchTerms:["favorite","heart","like","love"]},{title:"fab fa-grav",searchTerms:[]},{title:"fas fa-greater-than",searchTerms:[]},{title:"fas fa-greater-than-equal",searchTerms:[]},{title:"fas fa-grimace",searchTerms:["cringe","emoticon","face"]},{title:"far fa-grimace",searchTerms:["cringe","emoticon","face"]},{title:"fas fa-grin",searchTerms:["emoticon","face","laugh","smile"]},{title:"far fa-grin",searchTerms:["emoticon","face","laugh","smile"]},{title:"fas fa-grin-alt",searchTerms:["emoticon","face","laugh","smile"]},{title:"far fa-grin-alt",searchTerms:["emoticon","face","laugh","smile"]},{title:"fas fa-grin-beam",searchTerms:["emoticon","face","laugh","smile"]},{title:"far fa-grin-beam",searchTerms:["emoticon","face","laugh","smile"]},{title:"fas fa-grin-beam-sweat",searchTerms:["emoticon","face","smile"]},{title:"far fa-grin-beam-sweat",searchTerms:["emoticon","face","smile"]},{title:"fas fa-grin-hearts",searchTerms:["emoticon","face","love","smile"]},{title:"far fa-grin-hearts",searchTerms:["emoticon","face","love","smile"]},{title:"fas fa-grin-squint",searchTerms:["emoticon","face","laugh","smile"]},{title:"far fa-grin-squint",searchTerms:["emoticon","face","laugh","smile"]},{title:"fas fa-grin-squint-tears",searchTerms:["emoticon","face","happy","smile"]},{title:"far fa-grin-squint-tears",searchTerms:["emoticon","face","happy","smile"]},{title:"fas fa-grin-stars",searchTerms:["emoticon","face","star-struck"]},{title:"far fa-grin-stars",searchTerms:["emoticon","face","star-struck"]},{title:"fas fa-grin-tears",searchTerms:["LOL","emoticon","face"]},{title:"far fa-grin-tears",searchTerms:["LOL","emoticon","face"]},{title:"fas fa-grin-tongue",searchTerms:["LOL","emoticon","face"]},{title:"far fa-grin-tongue",searchTerms:["LOL","emoticon","face"]},{title:"fas fa-grin-tongue-squint",searchTerms:["LOL","emoticon","face"]},{title:"far fa-grin-tongue-squint",searchTerms:["LOL","emoticon","face"]},{title:"fas fa-grin-tongue-wink",searchTerms:["LOL","emoticon","face"]},{title:"far fa-grin-tongue-wink",searchTerms:["LOL","emoticon","face"]},{title:"fas fa-grin-wink",searchTerms:["emoticon","face","flirt","laugh","smile"]},{title:"far fa-grin-wink",searchTerms:["emoticon","face","flirt","laugh","smile"]},{title:"fas fa-grip-horizontal",searchTerms:["affordance","drag","drop","grab","handle"]},{title:"fas fa-grip-vertical",searchTerms:["affordance","drag","drop","grab","handle"]},{title:"fab fa-gripfire",searchTerms:[]},{title:"fab fa-grunt",searchTerms:[]},{title:"fab fa-gulp",searchTerms:[]},{title:"fas fa-h-square",searchTerms:["hospital","hotel"]},{title:"fab fa-hacker-news",searchTerms:[]},{title:"fab fa-hacker-news-square",searchTerms:[]},{title:"fab fa-hackerrank",searchTerms:[]},{title:"fas fa-hammer",searchTerms:["admin","fix","repair","settings","tool"]},{title:"fas fa-hamsa",searchTerms:["amulet","christianity","islam","jewish","judaism","muslim","protection"]},{title:"fas fa-hand-holding",searchTerms:[]},{title:"fas fa-hand-holding-heart",searchTerms:[]},{title:"fas fa-hand-holding-usd",searchTerms:["$","dollar sign","donation","giving","money","price"]},{title:"fas fa-hand-lizard",searchTerms:[]},{title:"far fa-hand-lizard",searchTerms:[]},{title:"fas fa-hand-paper",searchTerms:["stop"]},{title:"far fa-hand-paper",searchTerms:["stop"]},{title:"fas fa-hand-peace",searchTerms:[]},{title:"far fa-hand-peace",searchTerms:[]},{title:"fas fa-hand-point-down",searchTerms:["finger","hand-o-down","point"]},{title:"far fa-hand-point-down",searchTerms:["finger","hand-o-down","point"]},{title:"fas fa-hand-point-left",searchTerms:["back","finger","hand-o-left","left","point","previous"]},{title:"far fa-hand-point-left",searchTerms:["back","finger","hand-o-left","left","point","previous"]},{title:"fas fa-hand-point-right",searchTerms:["finger","forward","hand-o-right","next","point","right"]},{title:"far fa-hand-point-right",searchTerms:["finger","forward","hand-o-right","next","point","right"]},{title:"fas fa-hand-point-up",searchTerms:["finger","hand-o-up","point"]},{title:"far fa-hand-point-up",searchTerms:["finger","hand-o-up","point"]},{title:"fas fa-hand-pointer",searchTerms:["select"]},{title:"far fa-hand-pointer",searchTerms:["select"]},{title:"fas fa-hand-rock",searchTerms:[]},{title:"far fa-hand-rock",searchTerms:[]},{title:"fas fa-hand-scissors",searchTerms:[]},{title:"far fa-hand-scissors",searchTerms:[]},{title:"fas fa-hand-spock",searchTerms:[]},{title:"far fa-hand-spock",searchTerms:[]},{title:"fas fa-hands",searchTerms:[]},{title:"fas fa-hands-helping",searchTerms:["aid","assistance","partnership","volunteering"]},{title:"fas fa-handshake",searchTerms:["greeting","partnership"]},{title:"far fa-handshake",searchTerms:["greeting","partnership"]},{title:"fas fa-hanukiah",searchTerms:["candle","hanukkah","jewish","judaism","light"]},{title:"fas fa-hashtag",searchTerms:[]},{title:"fas fa-hat-wizard",searchTerms:["Dungeons & Dragons","buckle","cloth","clothing","d&d","dnd","fantasy","halloween","holiday","mage","magic","pointy","witch"]},{title:"fas fa-haykal",searchTerms:["bahai","bahá'í","star"]},{title:"fas fa-hdd",searchTerms:["cpu","hard drive","harddrive","machine","save","storage"]},{title:"far fa-hdd",searchTerms:["cpu","hard drive","harddrive","machine","save","storage"]},{title:"fas fa-heading",searchTerms:["header"]},{title:"fas fa-headphones",searchTerms:["audio","listen","music","sound","speaker"]},{title:"fas fa-headphones-alt",searchTerms:["audio","listen","music","sound","speaker"]},{title:"fas fa-headset",searchTerms:["audio","gamer","gaming","listen","live chat","microphone","shot caller","sound","support","telemarketer"]},{title:"fas fa-heart",searchTerms:["favorite","like","love"]},{title:"far fa-heart",searchTerms:["favorite","like","love"]},{title:"fas fa-heartbeat",searchTerms:["ekg","lifeline","vital signs"]},{title:"fas fa-helicopter",searchTerms:["airwolf","apache","chopper","flight","fly"]},{title:"fas fa-highlighter",searchTerms:["edit","marker","sharpie","update","write"]},{title:"fas fa-hiking",searchTerms:["activity","backpack","fall","fitness","outdoors","seasonal","walking"]},{title:"fas fa-hippo",searchTerms:["fauna","hungry","mammmal"]},{title:"fab fa-hips",searchTerms:[]},{title:"fab fa-hire-a-helper",searchTerms:[]},{title:"fas fa-history",searchTerms:[]},{title:"fas fa-hockey-puck",searchTerms:[]},{title:"fas fa-home",searchTerms:["house","main"]},{title:"fab fa-hooli",searchTerms:[]},{title:"fab fa-hornbill",searchTerms:[]},{title:"fas fa-horse",searchTerms:["equus","fauna","mammmal","neigh"]},{title:"fas fa-hospital",searchTerms:["building","emergency room","medical center"]},{title:"far fa-hospital",searchTerms:["building","emergency room","medical center"]},{title:"fas fa-hospital-alt",searchTerms:["building","emergency room","medical center"]},{title:"fas fa-hospital-symbol",searchTerms:[]},{title:"fas fa-hot-tub",searchTerms:[]},{title:"fas fa-hotel",searchTerms:["building","lodging"]},{title:"fab fa-hotjar",searchTerms:[]},{title:"fas fa-hourglass",searchTerms:[]},{title:"far fa-hourglass",searchTerms:[]},{title:"fas fa-hourglass-end",searchTerms:[]},{title:"fas fa-hourglass-half",searchTerms:[]},{title:"fas fa-hourglass-start",searchTerms:[]},{title:"fas fa-house-damage",searchTerms:["devastation","home"]},{title:"fab fa-houzz",searchTerms:[]},{title:"fas fa-hryvnia",searchTerms:["money"]},{title:"fab fa-html5",searchTerms:[]},{title:"fab fa-hubspot",searchTerms:[]},{title:"fas fa-i-cursor",searchTerms:[]},{title:"fas fa-id-badge",searchTerms:[]},{title:"far fa-id-badge",searchTerms:[]},{title:"fas fa-id-card",searchTerms:["document","identification","issued"]},{title:"far fa-id-card",searchTerms:["document","identification","issued"]},{title:"fas fa-id-card-alt",searchTerms:["demographics"]},{title:"fas fa-image",searchTerms:["album","photo","picture"]},{title:"far fa-image",searchTerms:["album","photo","picture"]},{title:"fas fa-images",searchTerms:["album","photo","picture"]},{title:"far fa-images",searchTerms:["album","photo","picture"]},{title:"fab fa-imdb",searchTerms:[]},{title:"fas fa-inbox",searchTerms:[]},{title:"fas fa-indent",searchTerms:[]},{title:"fas fa-industry",searchTerms:["factory","manufacturing"]},{title:"fas fa-infinity",searchTerms:[]},{title:"fas fa-info",searchTerms:["details","help","information","more"]},{title:"fas fa-info-circle",searchTerms:["details","help","information","more"]},{title:"fab fa-instagram",searchTerms:[]},{title:"fab fa-internet-explorer",searchTerms:["browser","ie"]},{title:"fab fa-ioxhost",searchTerms:[]},{title:"fas fa-italic",searchTerms:["italics"]},{title:"fab fa-itunes",searchTerms:[]},{title:"fab fa-itunes-note",searchTerms:[]},{title:"fab fa-java",searchTerms:[]},{title:"fas fa-jedi",searchTerms:["star wars"]},{title:"fab fa-jedi-order",searchTerms:["star wars"]},{title:"fab fa-jenkins",searchTerms:[]},{title:"fab fa-joget",searchTerms:[]},{title:"fas fa-joint",searchTerms:["blunt","cannabis","doobie","drugs","marijuana","roach","smoke","smoking","spliff"]},{title:"fab fa-joomla",searchTerms:[]},{title:"fas fa-journal-whills",searchTerms:["book","jedi","star wars","the force"]},{title:"fab fa-js",searchTerms:[]},{title:"fab fa-js-square",searchTerms:[]},{title:"fab fa-jsfiddle",searchTerms:[]},{title:"fas fa-kaaba",searchTerms:["building","cube","islam","muslim"]},{title:"fab fa-kaggle",searchTerms:[]},{title:"fas fa-key",searchTerms:["password","unlock"]},{title:"fab fa-keybase",searchTerms:[]},{title:"fas fa-keyboard",searchTerms:["input","type"]},{title:"far fa-keyboard",searchTerms:["input","type"]},{title:"fab fa-keycdn",searchTerms:[]},{title:"fas fa-khanda",searchTerms:["chakkar","sikh","sikhism","sword"]},{title:"fab fa-kickstarter",searchTerms:[]},{title:"fab fa-kickstarter-k",searchTerms:[]},{title:"fas fa-kiss",searchTerms:["beso","emoticon","face","love","smooch"]},{title:"far fa-kiss",searchTerms:["beso","emoticon","face","love","smooch"]},{title:"fas fa-kiss-beam",searchTerms:["beso","emoticon","face","love","smooch"]},{title:"far fa-kiss-beam",searchTerms:["beso","emoticon","face","love","smooch"]},{title:"fas fa-kiss-wink-heart",searchTerms:["beso","emoticon","face","love","smooch"]},{title:"far fa-kiss-wink-heart",searchTerms:["beso","emoticon","face","love","smooch"]},{title:"fas fa-kiwi-bird",searchTerms:["bird","fauna"]},{title:"fab fa-korvue",searchTerms:[]},{title:"fas fa-landmark",searchTerms:["building","historic","memoroable","politics"]},{title:"fas fa-language",searchTerms:["dialect","idiom","localize","speech","translate","vernacular"]},{title:"fas fa-laptop",searchTerms:["computer","cpu","dell","demo","device","dude you're getting","mac","macbook","machine","pc"]},{title:"fas fa-laptop-code",searchTerms:[]},{title:"fab fa-laravel",searchTerms:[]},{title:"fab fa-lastfm",searchTerms:[]},{title:"fab fa-lastfm-square",searchTerms:[]},{title:"fas fa-laugh",searchTerms:["LOL","emoticon","face","laugh"]},{title:"far fa-laugh",searchTerms:["LOL","emoticon","face","laugh"]},{title:"fas fa-laugh-beam",searchTerms:["LOL","emoticon","face"]},{title:"far fa-laugh-beam",searchTerms:["LOL","emoticon","face"]},{title:"fas fa-laugh-squint",searchTerms:["LOL","emoticon","face"]},{title:"far fa-laugh-squint",searchTerms:["LOL","emoticon","face"]},{title:"fas fa-laugh-wink",searchTerms:["LOL","emoticon","face"]},{title:"far fa-laugh-wink",searchTerms:["LOL","emoticon","face"]},{title:"fas fa-layer-group",searchTerms:["layers"]},{title:"fas fa-leaf",searchTerms:["eco","flora","nature","plant"]},{title:"fab fa-leanpub",searchTerms:[]},{title:"fas fa-lemon",searchTerms:["food"]},{title:"far fa-lemon",searchTerms:["food"]},{title:"fab fa-less",searchTerms:[]},{title:"fas fa-less-than",searchTerms:[]},{title:"fas fa-less-than-equal",searchTerms:[]},{title:"fas fa-level-down-alt",searchTerms:["level-down"]},{title:"fas fa-level-up-alt",searchTerms:["level-up"]},{title:"fas fa-life-ring",searchTerms:["support"]},{title:"far fa-life-ring",searchTerms:["support"]},{title:"fas fa-lightbulb",searchTerms:["idea","inspiration"]},{title:"far fa-lightbulb",searchTerms:["idea","inspiration"]},{title:"fab fa-line",searchTerms:[]},{title:"fas fa-link",searchTerms:["chain"]},{title:"fab fa-linkedin",searchTerms:["linkedin-square"]},{title:"fab fa-linkedin-in",searchTerms:["linkedin"]},{title:"fab fa-linode",searchTerms:[]},{title:"fab fa-linux",searchTerms:["tux"]},{title:"fas fa-lira-sign",searchTerms:["try","turkish"]},{title:"fas fa-list",searchTerms:["checklist","completed","done","finished","ol","todo","ul"]},{title:"fas fa-list-alt",searchTerms:["checklist","completed","done","finished","ol","todo","ul"]},{title:"far fa-list-alt",searchTerms:["checklist","completed","done","finished","ol","todo","ul"]},{title:"fas fa-list-ol",searchTerms:["checklist","list","numbers","ol","todo","ul"]},{title:"fas fa-list-ul",searchTerms:["checklist","list","ol","todo","ul"]},{title:"fas fa-location-arrow",searchTerms:["address","coordinates","gps","location","map","place","where"]},{title:"fas fa-lock",searchTerms:["admin","protect","security"]},{title:"fas fa-lock-open",searchTerms:["admin","lock","open","password","protect"]},{title:"fas fa-long-arrow-alt-down",searchTerms:["long-arrow-down"]},{title:"fas fa-long-arrow-alt-left",searchTerms:["back","long-arrow-left","previous"]},{title:"fas fa-long-arrow-alt-right",searchTerms:["long-arrow-right"]},{title:"fas fa-long-arrow-alt-up",searchTerms:["long-arrow-up"]},{title:"fas fa-low-vision",searchTerms:[]},{title:"fas fa-luggage-cart",searchTerms:[]},{title:"fab fa-lyft",searchTerms:[]},{title:"fab fa-magento",searchTerms:[]},{title:"fas fa-magic",searchTerms:["autocomplete","automatic","mage","magic","spell","witch","wizard"]},{title:"fas fa-magnet",searchTerms:[]},{title:"fas fa-mail-bulk",searchTerms:[]},{title:"fab fa-mailchimp",searchTerms:[]},{title:"fas fa-male",searchTerms:["human","man","person","profile","user"]},{title:"fab fa-mandalorian",searchTerms:[]},{title:"fas fa-map",searchTerms:["coordinates","location","paper","place","travel"]},{title:"far fa-map",searchTerms:["coordinates","location","paper","place","travel"]},{title:"fas fa-map-marked",searchTerms:["address","coordinates","destination","gps","localize","location","map","paper","pin","place","point of interest","position","route","travel","where"]},{title:"fas fa-map-marked-alt",searchTerms:["address","coordinates","destination","gps","localize","location","map","paper","pin","place","point of interest","position","route","travel","where"]},{title:"fas fa-map-marker",searchTerms:["address","coordinates","gps","localize","location","map","pin","place","position","travel","where"]},{title:"fas fa-map-marker-alt",searchTerms:["address","coordinates","gps","localize","location","map","pin","place","position","travel","where"]},{title:"fas fa-map-pin",searchTerms:["address","coordinates","gps","localize","location","map","marker","place","position","travel","where"]},{title:"fas fa-map-signs",searchTerms:[]},{title:"fab fa-markdown",searchTerms:[]},{title:"fas fa-marker",searchTerms:["edit","sharpie","update","write"]},{title:"fas fa-mars",searchTerms:["male"]},{title:"fas fa-mars-double",searchTerms:[]},{title:"fas fa-mars-stroke",searchTerms:[]},{title:"fas fa-mars-stroke-h",searchTerms:[]},{title:"fas fa-mars-stroke-v",searchTerms:[]},{title:"fas fa-mask",searchTerms:["costume","disguise","halloween","holiday","secret","super hero"]},{title:"fab fa-mastodon",searchTerms:[]},{title:"fab fa-maxcdn",searchTerms:[]},{title:"fas fa-medal",searchTerms:[]},{title:"fab fa-medapps",searchTerms:[]},{title:"fab fa-medium",searchTerms:[]},{title:"fab fa-medium-m",searchTerms:[]},{title:"fas fa-medkit",searchTerms:["first aid","firstaid","health","help","support"]},{title:"fab fa-medrt",searchTerms:[]},{title:"fab fa-meetup",searchTerms:[]},{title:"fab fa-megaport",searchTerms:[]},{title:"fas fa-meh",searchTerms:["emoticon","face","neutral","rating"]},{title:"far fa-meh",searchTerms:["emoticon","face","neutral","rating"]},{title:"fas fa-meh-blank",searchTerms:["emoticon","face","neutral","rating"]},{title:"far fa-meh-blank",searchTerms:["emoticon","face","neutral","rating"]},{title:"fas fa-meh-rolling-eyes",searchTerms:["emoticon","face","neutral","rating"]},{title:"far fa-meh-rolling-eyes",searchTerms:["emoticon","face","neutral","rating"]},{title:"fas fa-memory",searchTerms:["DIMM","RAM"]},{title:"fas fa-menorah",searchTerms:["candle","hanukkah","jewish","judaism","light"]},{title:"fas fa-mercury",searchTerms:["transgender"]},{title:"fas fa-meteor",searchTerms:[]},{title:"fas fa-microchip",searchTerms:["cpu","processor"]},{title:"fas fa-microphone",searchTerms:["record","sound","voice"]},{title:"fas fa-microphone-alt",searchTerms:["record","sound","voice"]},{title:"fas fa-microphone-alt-slash",searchTerms:["disable","mute","record","sound","voice"]},{title:"fas fa-microphone-slash",searchTerms:["disable","mute","record","sound","voice"]},{title:"fas fa-microscope",searchTerms:[]},{title:"fab fa-microsoft",searchTerms:[]},{title:"fas fa-minus",searchTerms:["collapse","delete","hide","minify","negative","remove","trash"]},{title:"fas fa-minus-circle",searchTerms:["delete","hide","negative","remove","trash"]},{title:"fas fa-minus-square",searchTerms:["collapse","delete","hide","minify","negative","remove","trash"]},{title:"far fa-minus-square",searchTerms:["collapse","delete","hide","minify","negative","remove","trash"]},{title:"fab fa-mix",searchTerms:[]},{title:"fab fa-mixcloud",searchTerms:[]},{title:"fab fa-mizuni",searchTerms:[]},{title:"fas fa-mobile",searchTerms:["apple","call","cell phone","cellphone","device","iphone","number","screen","telephone","text"]},{title:"fas fa-mobile-alt",searchTerms:["apple","call","cell phone","cellphone","device","iphone","number","screen","telephone","text"]},{title:"fab fa-modx",searchTerms:[]},{title:"fab fa-monero",searchTerms:[]},{title:"fas fa-money-bill",searchTerms:["buy","cash","checkout","money","payment","price","purchase"]},{title:"fas fa-money-bill-alt",searchTerms:["buy","cash","checkout","money","payment","price","purchase"]},{title:"far fa-money-bill-alt",searchTerms:["buy","cash","checkout","money","payment","price","purchase"]},{title:"fas fa-money-bill-wave",searchTerms:[]},{title:"fas fa-money-bill-wave-alt",searchTerms:[]},{title:"fas fa-money-check",searchTerms:["bank check","cheque"]},{title:"fas fa-money-check-alt",searchTerms:["bank check","cheque"]},{title:"fas fa-monument",searchTerms:["building","historic","memoroable"]},{title:"fas fa-moon",searchTerms:["contrast","crescent","darker","lunar","night"]},{title:"far fa-moon",searchTerms:["contrast","crescent","darker","lunar","night"]},{title:"fas fa-mortar-pestle",searchTerms:["crush","culinary","grind","medical","mix","spices"]},{title:"fas fa-mosque",searchTerms:["building","islam","muslim"]},{title:"fas fa-motorcycle",searchTerms:["bike","machine","transportation","vehicle"]},{title:"fas fa-mountain",searchTerms:[]},{title:"fas fa-mouse-pointer",searchTerms:["select"]},{title:"fas fa-music",searchTerms:["note","sound"]},{title:"fab fa-napster",searchTerms:[]},{title:"fab fa-neos",searchTerms:[]},{title:"fas fa-network-wired",searchTerms:[]},{title:"fas fa-neuter",searchTerms:[]},{title:"fas fa-newspaper",searchTerms:["article","press"]},{title:"far fa-newspaper",searchTerms:["article","press"]},{title:"fab fa-nimblr",searchTerms:[]},{title:"fab fa-nintendo-switch",searchTerms:[]},{title:"fab fa-node",searchTerms:[]},{title:"fab fa-node-js",searchTerms:[]},{title:"fas fa-not-equal",searchTerms:[]},{title:"fas fa-notes-medical",searchTerms:[]},{title:"fab fa-npm",searchTerms:[]},{title:"fab fa-ns8",searchTerms:[]},{title:"fab fa-nutritionix",searchTerms:[]},{title:"fas fa-object-group",searchTerms:["design"]},{title:"far fa-object-group",searchTerms:["design"]},{title:"fas fa-object-ungroup",searchTerms:["design"]},{title:"far fa-object-ungroup",searchTerms:["design"]},{title:"fab fa-odnoklassniki",searchTerms:[]},{title:"fab fa-odnoklassniki-square",searchTerms:[]},{title:"fas fa-oil-can",searchTerms:[]},{title:"fab fa-old-republic",searchTerms:["politics","star wars"]},{title:"fas fa-om",searchTerms:["buddhism","hinduism","jainism","mantra"]},{title:"fab fa-opencart",searchTerms:[]},{title:"fab fa-openid",searchTerms:[]},{title:"fab fa-opera",searchTerms:[]},{title:"fab fa-optin-monster",searchTerms:[]},{title:"fab fa-osi",searchTerms:[]},{title:"fas fa-otter",searchTerms:["fauna","mammmal"]},{title:"fas fa-outdent",searchTerms:[]},{title:"fab fa-page4",searchTerms:[]},{title:"fab fa-pagelines",searchTerms:["eco","flora","leaf","leaves","nature","plant","tree"]},{title:"fas fa-paint-brush",searchTerms:[]},{title:"fas fa-paint-roller",searchTerms:["brush","painting","tool"]},{title:"fas fa-palette",searchTerms:["colors","painting"]},{title:"fab fa-palfed",searchTerms:[]},{title:"fas fa-pallet",searchTerms:[]},{title:"fas fa-paper-plane",searchTerms:[]},{title:"far fa-paper-plane",searchTerms:[]},{title:"fas fa-paperclip",searchTerms:["attachment"]},{title:"fas fa-parachute-box",searchTerms:["aid","assistance","rescue","supplies"]},{title:"fas fa-paragraph",searchTerms:[]},{title:"fas fa-parking",searchTerms:[]},{title:"fas fa-passport",searchTerms:["document","identification","issued"]},{title:"fas fa-pastafarianism",searchTerms:["agnosticism","atheism","flying spaghetti monster","fsm"]},{title:"fas fa-paste",searchTerms:["clipboard","copy"]},{title:"fab fa-patreon",searchTerms:[]},{title:"fas fa-pause",searchTerms:["wait"]},{title:"fas fa-pause-circle",searchTerms:[]},{title:"far fa-pause-circle",searchTerms:[]},{title:"fas fa-paw",searchTerms:["animal","pet"]},{title:"fab fa-paypal",searchTerms:[]},{title:"fas fa-peace",searchTerms:[]},{title:"fas fa-pen",searchTerms:["design","edit","update","write"]},{title:"fas fa-pen-alt",searchTerms:["design","edit","update","write"]},{title:"fas fa-pen-fancy",searchTerms:["design","edit","fountain pen","update","write"]},{title:"fas fa-pen-nib",searchTerms:["design","edit","fountain pen","update","write"]},{title:"fas fa-pen-square",searchTerms:["edit","pencil-square","update","write"]},{title:"fas fa-pencil-alt",searchTerms:["design","edit","pencil","update","write"]},{title:"fas fa-pencil-ruler",searchTerms:[]},{title:"fab fa-penny-arcade",searchTerms:["Dungeons & Dragons","d&d","dnd","fantasy","game","gaming","pax","tabletop"]},{title:"fas fa-people-carry",searchTerms:["movers"]},{title:"fas fa-percent",searchTerms:[]},{title:"fas fa-percentage",searchTerms:[]},{title:"fab fa-periscope",searchTerms:[]},{title:"fas fa-person-booth",searchTerms:["changing","changing room","election","human","person","vote","voting"]},{title:"fab fa-phabricator",searchTerms:[]},{title:"fab fa-phoenix-framework",searchTerms:[]},{title:"fab fa-phoenix-squadron",searchTerms:[]},{title:"fas fa-phone",searchTerms:["call","earphone","number","support","telephone","voice"]},{title:"fas fa-phone-slash",searchTerms:[]},{title:"fas fa-phone-square",searchTerms:["call","number","support","telephone","voice"]},{title:"fas fa-phone-volume",searchTerms:["telephone","volume-control-phone"]},{title:"fab fa-php",searchTerms:[]},{title:"fab fa-pied-piper",searchTerms:[]},{title:"fab fa-pied-piper-alt",searchTerms:[]},{title:"fab fa-pied-piper-hat",searchTerms:["clothing"]},{title:"fab fa-pied-piper-pp",searchTerms:[]},{title:"fas fa-piggy-bank",searchTerms:["save","savings"]},{title:"fas fa-pills",searchTerms:["drugs","medicine"]},{title:"fab fa-pinterest",searchTerms:[]},{title:"fab fa-pinterest-p",searchTerms:[]},{title:"fab fa-pinterest-square",searchTerms:[]},{title:"fas fa-place-of-worship",searchTerms:[]},{title:"fas fa-plane",searchTerms:["airplane","destination","fly","location","mode","travel","trip"]},{title:"fas fa-plane-arrival",searchTerms:["airplane","arriving","destination","fly","land","landing","location","mode","travel","trip"]},{title:"fas fa-plane-departure",searchTerms:["airplane","departing","destination","fly","location","mode","take off","taking off","travel","trip"]},{title:"fas fa-play",searchTerms:["music","playing","sound","start"]},{title:"fas fa-play-circle",searchTerms:["playing","start"]},{title:"far fa-play-circle",searchTerms:["playing","start"]},{title:"fab fa-playstation",searchTerms:[]},{title:"fas fa-plug",searchTerms:["connect","online","power"]},{title:"fas fa-plus",searchTerms:["add","create","expand","new","positive"]},{title:"fas fa-plus-circle",searchTerms:["add","create","expand","new","positive"]},{title:"fas fa-plus-square",searchTerms:["add","create","expand","new","positive"]},{title:"far fa-plus-square",searchTerms:["add","create","expand","new","positive"]},{title:"fas fa-podcast",searchTerms:[]},{title:"fas fa-poll",searchTerms:["results","survey","vote","voting"]},{title:"fas fa-poll-h",searchTerms:["results","survey","vote","voting"]},{title:"fas fa-poo",searchTerms:[]},{title:"fas fa-poo-storm",searchTerms:["mess","poop","shit"]},{title:"fas fa-poop",searchTerms:[]},{title:"fas fa-portrait",searchTerms:[]},{title:"fas fa-pound-sign",searchTerms:["gbp"]},{title:"fas fa-power-off",searchTerms:["on","reboot","restart"]},{title:"fas fa-pray",searchTerms:[]},{title:"fas fa-praying-hands",searchTerms:[]},{title:"fas fa-prescription",searchTerms:["drugs","medical","medicine","rx"]},{title:"fas fa-prescription-bottle",searchTerms:["drugs","medical","medicine","rx"]},{title:"fas fa-prescription-bottle-alt",searchTerms:["drugs","medical","medicine","rx"]},{title:"fas fa-print",searchTerms:[]},{title:"fas fa-procedures",searchTerms:[]},{title:"fab fa-product-hunt",searchTerms:[]},{title:"fas fa-project-diagram",searchTerms:[]},{title:"fab fa-pushed",searchTerms:[]},{title:"fas fa-puzzle-piece",searchTerms:["add-on","addon","section"]},{title:"fab fa-python",searchTerms:[]},{title:"fab fa-qq",searchTerms:[]},{title:"fas fa-qrcode",searchTerms:["scan"]},{title:"fas fa-question",searchTerms:["help","information","support","unknown"]},{title:"fas fa-question-circle",searchTerms:["help","information","support","unknown"]},{title:"far fa-question-circle",searchTerms:["help","information","support","unknown"]},{title:"fas fa-quidditch",searchTerms:[]},{title:"fab fa-quinscape",searchTerms:[]},{title:"fab fa-quora",searchTerms:[]},{title:"fas fa-quote-left",searchTerms:[]},{title:"fas fa-quote-right",searchTerms:[]},{title:"fas fa-quran",searchTerms:["book","islam","muslim"]},{title:"fab fa-r-project",searchTerms:[]},{title:"fas fa-rainbow",searchTerms:[]},{title:"fas fa-random",searchTerms:["shuffle","sort"]},{title:"fab fa-ravelry",searchTerms:[]},{title:"fab fa-react",searchTerms:[]},{title:"fab fa-reacteurope",searchTerms:[]},{title:"fab fa-readme",searchTerms:[]},{title:"fab fa-rebel",searchTerms:[]},{title:"fas fa-receipt",searchTerms:["check","invoice","table"]},{title:"fas fa-recycle",searchTerms:[]},{title:"fab fa-red-river",searchTerms:[]},{title:"fab fa-reddit",searchTerms:[]},{title:"fab fa-reddit-alien",searchTerms:[]},{title:"fab fa-reddit-square",searchTerms:[]},{title:"fas fa-redo",searchTerms:["forward","refresh","reload","repeat"]},{title:"fas fa-redo-alt",searchTerms:["forward","refresh","reload","repeat"]},{title:"fas fa-registered",searchTerms:[]},{title:"far fa-registered",searchTerms:[]},{title:"fab fa-renren",searchTerms:[]},{title:"fas fa-reply",searchTerms:[]},{title:"fas fa-reply-all",searchTerms:[]},{title:"fab fa-replyd",searchTerms:[]},{title:"fas fa-republican",searchTerms:["american","conservative","election","elephant","politics","republican party","right","right-wing","usa"]},{title:"fab fa-researchgate",searchTerms:[]},{title:"fab fa-resolving",searchTerms:[]},{title:"fas fa-retweet",searchTerms:["refresh","reload","share","swap"]},{title:"fab fa-rev",searchTerms:[]},{title:"fas fa-ribbon",searchTerms:["badge","cause","lapel","pin"]},{title:"fas fa-ring",searchTerms:["Dungeons & Dragons","Gollum","band","binding","d&d","dnd","fantasy","jewelry","precious"]},{title:"fas fa-road",searchTerms:["street"]},{title:"fas fa-robot",searchTerms:[]},{title:"fas fa-rocket",searchTerms:["app"]},{title:"fab fa-rocketchat",searchTerms:[]},{title:"fab fa-rockrms",searchTerms:[]},{title:"fas fa-route",searchTerms:[]},{title:"fas fa-rss",searchTerms:["blog"]},{title:"fas fa-rss-square",searchTerms:["blog","feed"]},{title:"fas fa-ruble-sign",searchTerms:["rub"]},{title:"fas fa-ruler",searchTerms:[]},{title:"fas fa-ruler-combined",searchTerms:[]},{title:"fas fa-ruler-horizontal",searchTerms:[]},{title:"fas fa-ruler-vertical",searchTerms:[]},{title:"fas fa-running",searchTerms:["jog","sprint"]},{title:"fas fa-rupee-sign",searchTerms:["indian","inr"]},{title:"fas fa-sad-cry",searchTerms:["emoticon","face","tear","tears"]},{title:"far fa-sad-cry",searchTerms:["emoticon","face","tear","tears"]},{title:"fas fa-sad-tear",searchTerms:["emoticon","face","tear","tears"]},{title:"far fa-sad-tear",searchTerms:["emoticon","face","tear","tears"]},{title:"fab fa-safari",searchTerms:["browser"]},{title:"fab fa-sass",searchTerms:[]},{title:"fas fa-save",searchTerms:["floppy","floppy-o"]},{title:"far fa-save",searchTerms:["floppy","floppy-o"]},{title:"fab fa-schlix",searchTerms:[]},{title:"fas fa-school",searchTerms:[]},{title:"fas fa-screwdriver",searchTerms:["admin","fix","repair","settings","tool"]},{title:"fab fa-scribd",searchTerms:[]},{title:"fas fa-scroll",searchTerms:["Dungeons & Dragons","announcement","d&d","dnd","fantasy","paper"]},{title:"fas fa-search",searchTerms:["bigger","enlarge","magnify","preview","zoom"]},{title:"fas fa-search-dollar",searchTerms:[]},{title:"fas fa-search-location",searchTerms:[]},{title:"fas fa-search-minus",searchTerms:["minify","negative","smaller","zoom","zoom out"]},{title:"fas fa-search-plus",searchTerms:["bigger","enlarge","magnify","positive","zoom","zoom in"]},{title:"fab fa-searchengin",searchTerms:[]},{title:"fas fa-seedling",searchTerms:[]},{title:"fab fa-sellcast",searchTerms:["eercast"]},{title:"fab fa-sellsy",searchTerms:[]},{title:"fas fa-server",searchTerms:["cpu"]},{title:"fab fa-servicestack",searchTerms:[]},{title:"fas fa-shapes",searchTerms:["circle","square","triangle"]},{title:"fas fa-share",searchTerms:[]},{title:"fas fa-share-alt",searchTerms:[]},{title:"fas fa-share-alt-square",searchTerms:[]},{title:"fas fa-share-square",searchTerms:["send","social"]},{title:"far fa-share-square",searchTerms:["send","social"]},{title:"fas fa-shekel-sign",searchTerms:["ils"]},{title:"fas fa-shield-alt",searchTerms:["achievement","award","block","defend","security","winner"]},{title:"fas fa-ship",searchTerms:["boat","sea"]},{title:"fas fa-shipping-fast",searchTerms:[]},{title:"fab fa-shirtsinbulk",searchTerms:[]},{title:"fas fa-shoe-prints",searchTerms:["feet","footprints","steps"]},{title:"fas fa-shopping-bag",searchTerms:[]},{title:"fas fa-shopping-basket",searchTerms:[]},{title:"fas fa-shopping-cart",searchTerms:["buy","checkout","payment","purchase"]},{title:"fab fa-shopware",searchTerms:[]},{title:"fas fa-shower",searchTerms:[]},{title:"fas fa-shuttle-van",searchTerms:["machine","public-transportation","transportation","vehicle"]},{title:"fas fa-sign",searchTerms:[]},{title:"fas fa-sign-in-alt",searchTerms:["arrow","enter","join","log in","login","sign in","sign up","sign-in","signin","signup"]},{title:"fas fa-sign-language",searchTerms:[]},{title:"fas fa-sign-out-alt",searchTerms:["arrow","exit","leave","log out","logout","sign-out"]},{title:"fas fa-signal",searchTerms:["bars","graph","online","status"]},{title:"fas fa-signature",searchTerms:["John Hancock","cursive","name","writing"]},{title:"fab fa-simplybuilt",searchTerms:[]},{title:"fab fa-sistrix",searchTerms:[]},{title:"fas fa-sitemap",searchTerms:["directory","hierarchy","ia","information architecture","organization"]},{title:"fab fa-sith",searchTerms:[]},{title:"fas fa-skull",searchTerms:["bones","skeleton","yorick"]},{title:"fas fa-skull-crossbones",searchTerms:["Dungeons & Dragons","alert","bones","d&d","danger","dead","deadly","death","dnd","fantasy","halloween","holiday","jolly-roger","pirate","poison","skeleton","warning"]},{title:"fab fa-skyatlas",searchTerms:[]},{title:"fab fa-skype",searchTerms:[]},{title:"fab fa-slack",searchTerms:["anchor","hash","hashtag"]},{title:"fab fa-slack-hash",searchTerms:["anchor","hash","hashtag"]},{title:"fas fa-slash",searchTerms:[]},{title:"fas fa-sliders-h",searchTerms:["settings","sliders"]},{title:"fab fa-slideshare",searchTerms:[]},{title:"fas fa-smile",searchTerms:["approve","emoticon","face","happy","rating","satisfied"]},{title:"far fa-smile",searchTerms:["approve","emoticon","face","happy","rating","satisfied"]},{title:"fas fa-smile-beam",searchTerms:["emoticon","face","happy","positive"]},{title:"far fa-smile-beam",searchTerms:["emoticon","face","happy","positive"]},{title:"fas fa-smile-wink",searchTerms:["emoticon","face","happy"]},{title:"far fa-smile-wink",searchTerms:["emoticon","face","happy"]},{title:"fas fa-smog",searchTerms:["dragon"]},{title:"fas fa-smoking",searchTerms:["cigarette","nicotine","smoking status"]},{title:"fas fa-smoking-ban",searchTerms:["no smoking","non-smoking"]},{title:"fab fa-snapchat",searchTerms:[]},{title:"fab fa-snapchat-ghost",searchTerms:[]},{title:"fab fa-snapchat-square",searchTerms:[]},{title:"fas fa-snowflake",searchTerms:["precipitation","seasonal","winter"]},{title:"far fa-snowflake",searchTerms:["precipitation","seasonal","winter"]},{title:"fas fa-socks",searchTerms:["business socks","business time","flight of the conchords","wednesday"]},{title:"fas fa-solar-panel",searchTerms:["clean","eco-friendly","energy","green","sun"]},{title:"fas fa-sort",searchTerms:["order"]},{title:"fas fa-sort-alpha-down",searchTerms:["sort-alpha-asc"]},{title:"fas fa-sort-alpha-up",searchTerms:["sort-alpha-desc"]},{title:"fas fa-sort-amount-down",searchTerms:["sort-amount-asc"]},{title:"fas fa-sort-amount-up",searchTerms:["sort-amount-desc"]},{title:"fas fa-sort-down",searchTerms:["arrow","descending","sort-desc"]},{title:"fas fa-sort-numeric-down",searchTerms:["numbers","sort-numeric-asc"]},{title:"fas fa-sort-numeric-up",searchTerms:["numbers","sort-numeric-desc"]},{title:"fas fa-sort-up",searchTerms:["arrow","ascending","sort-asc"]},{title:"fab fa-soundcloud",searchTerms:[]},{title:"fas fa-spa",searchTerms:["flora","mindfullness","plant","wellness"]},{title:"fas fa-space-shuttle",searchTerms:["astronaut","machine","nasa","rocket","transportation"]},{title:"fab fa-speakap",searchTerms:[]},{title:"fas fa-spider",searchTerms:["arachnid","bug","charlotte","crawl","eight","halloween","holiday"]},{title:"fas fa-spinner",searchTerms:["loading","progress"]},{title:"fas fa-splotch",searchTerms:[]},{title:"fab fa-spotify",searchTerms:[]},{title:"fas fa-spray-can",searchTerms:[]},{title:"fas fa-square",searchTerms:["block","box"]},{title:"far fa-square",searchTerms:["block","box"]},{title:"fas fa-square-full",searchTerms:[]},{title:"fas fa-square-root-alt",searchTerms:[]},{title:"fab fa-squarespace",searchTerms:[]},{title:"fab fa-stack-exchange",searchTerms:[]},{title:"fab fa-stack-overflow",searchTerms:[]},{title:"fas fa-stamp",searchTerms:[]},{title:"fas fa-star",searchTerms:["achievement","award","favorite","important","night","rating","score"]},{title:"far fa-star",searchTerms:["achievement","award","favorite","important","night","rating","score"]},{title:"fas fa-star-and-crescent",searchTerms:["islam","muslim"]},{title:"fas fa-star-half",searchTerms:["achievement","award","rating","score","star-half-empty","star-half-full"]},{title:"far fa-star-half",searchTerms:["achievement","award","rating","score","star-half-empty","star-half-full"]},{title:"fas fa-star-half-alt",searchTerms:["achievement","award","rating","score","star-half-empty","star-half-full"]},{title:"fas fa-star-of-david",searchTerms:["jewish","judaism"]},{title:"fas fa-star-of-life",searchTerms:[]},{title:"fab fa-staylinked",searchTerms:[]},{title:"fab fa-steam",searchTerms:[]},{title:"fab fa-steam-square",searchTerms:[]},{title:"fab fa-steam-symbol",searchTerms:[]},{title:"fas fa-step-backward",searchTerms:["beginning","first","previous","rewind","start"]},{title:"fas fa-step-forward",searchTerms:["end","last","next"]},{title:"fas fa-stethoscope",searchTerms:[]},{title:"fab fa-sticker-mule",searchTerms:[]},{title:"fas fa-sticky-note",searchTerms:[]},{title:"far fa-sticky-note",searchTerms:[]},{title:"fas fa-stop",searchTerms:["block","box","square"]},{title:"fas fa-stop-circle",searchTerms:[]},{title:"far fa-stop-circle",searchTerms:[]},{title:"fas fa-stopwatch",searchTerms:["time"]},{title:"fas fa-store",searchTerms:[]},{title:"fas fa-store-alt",searchTerms:[]},{title:"fab fa-strava",searchTerms:[]},{title:"fas fa-stream",searchTerms:[]},{title:"fas fa-street-view",searchTerms:["map"]},{title:"fas fa-strikethrough",searchTerms:[]},{title:"fab fa-stripe",searchTerms:[]},{title:"fab fa-stripe-s",searchTerms:[]},{title:"fas fa-stroopwafel",searchTerms:["dessert","food","sweets","waffle"]},{title:"fab fa-studiovinari",searchTerms:[]},{title:"fab fa-stumbleupon",searchTerms:[]},{title:"fab fa-stumbleupon-circle",searchTerms:[]},{title:"fas fa-subscript",searchTerms:[]},{title:"fas fa-subway",searchTerms:["machine","railway","train","transportation","vehicle"]},{title:"fas fa-suitcase",searchTerms:["baggage","luggage","move","suitcase","travel","trip"]},{title:"fas fa-suitcase-rolling",searchTerms:[]},{title:"fas fa-sun",searchTerms:["brighten","contrast","day","lighter","sol","solar","star","weather"]},{title:"far fa-sun",searchTerms:["brighten","contrast","day","lighter","sol","solar","star","weather"]},{title:"fab fa-superpowers",searchTerms:[]},{title:"fas fa-superscript",searchTerms:["exponential"]},{title:"fab fa-supple",searchTerms:[]},{title:"fas fa-surprise",searchTerms:["emoticon","face","shocked"]},{title:"far fa-surprise",searchTerms:["emoticon","face","shocked"]},{title:"fas fa-swatchbook",searchTerms:[]},{title:"fas fa-swimmer",searchTerms:["athlete","head","man","person","water"]},{title:"fas fa-swimming-pool",searchTerms:["ladder","recreation","water"]},{title:"fas fa-synagogue",searchTerms:["building","jewish","judaism","star of david","temple"]},{title:"fas fa-sync",searchTerms:["exchange","refresh","reload","rotate","swap"]},{title:"fas fa-sync-alt",searchTerms:["refresh","reload","rotate"]},{title:"fas fa-syringe",searchTerms:["immunizations","needle"]},{title:"fas fa-table",searchTerms:["data","excel","spreadsheet"]},{title:"fas fa-table-tennis",searchTerms:[]},{title:"fas fa-tablet",searchTerms:["apple","device","ipad","kindle","screen"]},{title:"fas fa-tablet-alt",searchTerms:["apple","device","ipad","kindle","screen"]},{title:"fas fa-tablets",searchTerms:["drugs","medicine"]},{title:"fas fa-tachometer-alt",searchTerms:["dashboard","tachometer"]},{title:"fas fa-tag",searchTerms:["label"]},{title:"fas fa-tags",searchTerms:["labels"]},{title:"fas fa-tape",searchTerms:[]},{title:"fas fa-tasks",searchTerms:["downloading","downloads","loading","progress","settings"]},{title:"fas fa-taxi",searchTerms:["cab","cabbie","car","car service","lyft","machine","transportation","uber","vehicle"]},{title:"fab fa-teamspeak",searchTerms:[]},{title:"fas fa-teeth",searchTerms:[]},{title:"fas fa-teeth-open",searchTerms:[]},{title:"fab fa-telegram",searchTerms:[]},{title:"fab fa-telegram-plane",searchTerms:[]},{title:"fas fa-temperature-high",searchTerms:["mercury","thermometer","warm"]},{title:"fas fa-temperature-low",searchTerms:["cool","mercury","thermometer"]},{title:"fab fa-tencent-weibo",searchTerms:[]},{title:"fas fa-terminal",searchTerms:["code","command","console","prompt"]},{title:"fas fa-text-height",searchTerms:[]},{title:"fas fa-text-width",searchTerms:[]},{title:"fas fa-th",searchTerms:["blocks","boxes","grid","squares"]},{title:"fas fa-th-large",searchTerms:["blocks","boxes","grid","squares"]},{title:"fas fa-th-list",searchTerms:["checklist","completed","done","finished","ol","todo","ul"]},{title:"fab fa-the-red-yeti",searchTerms:[]},{title:"fas fa-theater-masks",searchTerms:[]},{title:"fab fa-themeco",searchTerms:[]},{title:"fab fa-themeisle",searchTerms:[]},{title:"fas fa-thermometer",searchTerms:["mercury","status","temperature"]},{title:"fas fa-thermometer-empty",searchTerms:["mercury","status","temperature"]},{title:"fas fa-thermometer-full",searchTerms:["fever","mercury","status","temperature"]},{title:"fas fa-thermometer-half",searchTerms:["mercury","status","temperature"]},{title:"fas fa-thermometer-quarter",searchTerms:["mercury","status","temperature"]},{title:"fas fa-thermometer-three-quarters",searchTerms:["mercury","status","temperature"]},{title:"fab fa-think-peaks",searchTerms:[]},{title:"fas fa-thumbs-down",searchTerms:["disagree","disapprove","dislike","hand","thumbs-o-down"]},{title:"far fa-thumbs-down",searchTerms:["disagree","disapprove","dislike","hand","thumbs-o-down"]},{title:"fas fa-thumbs-up",searchTerms:["agree","approve","favorite","hand","like","ok","okay","success","thumbs-o-up","yes","you got it dude"]},{title:"far fa-thumbs-up",searchTerms:["agree","approve","favorite","hand","like","ok","okay","success","thumbs-o-up","yes","you got it dude"]},{title:"fas fa-thumbtack",searchTerms:["coordinates","location","marker","pin","thumb-tack"]},{title:"fas fa-ticket-alt",searchTerms:["ticket"]},{title:"fas fa-times",searchTerms:["close","cross","error","exit","incorrect","notice","notification","notify","problem","wrong","x"]},{title:"fas fa-times-circle",searchTerms:["close","cross","exit","incorrect","notice","notification","notify","problem","wrong","x"]},{title:"far fa-times-circle",searchTerms:["close","cross","exit","incorrect","notice","notification","notify","problem","wrong","x"]},{title:"fas fa-tint",searchTerms:["drop","droplet","raindrop","waterdrop"]},{title:"fas fa-tint-slash",searchTerms:[]},{title:"fas fa-tired",searchTerms:["emoticon","face","grumpy"]},{title:"far fa-tired",searchTerms:["emoticon","face","grumpy"]},{title:"fas fa-toggle-off",searchTerms:["switch"]},{title:"fas fa-toggle-on",searchTerms:["switch"]},{title:"fas fa-toilet-paper",searchTerms:["bathroom","halloween","holiday","lavatory","prank","restroom","roll"]},{title:"fas fa-toolbox",searchTerms:["admin","container","fix","repair","settings","tools"]},{title:"fas fa-tooth",searchTerms:["bicuspid","dental","molar","mouth","teeth"]},{title:"fas fa-torah",searchTerms:["book","jewish","judaism"]},{title:"fas fa-torii-gate",searchTerms:["building","shintoism"]},{title:"fas fa-tractor",searchTerms:[]},{title:"fab fa-trade-federation",searchTerms:[]},{title:"fas fa-trademark",searchTerms:[]},{title:"fas fa-traffic-light",searchTerms:[]},{title:"fas fa-train",searchTerms:["bullet","locomotive","railway"]},{title:"fas fa-transgender",searchTerms:["intersex"]},{title:"fas fa-transgender-alt",searchTerms:[]},{title:"fas fa-trash",searchTerms:["delete","garbage","hide","remove"]},{title:"fas fa-trash-alt",searchTerms:["delete","garbage","hide","remove","trash","trash-o"]},{title:"far fa-trash-alt",searchTerms:["delete","garbage","hide","remove","trash","trash-o"]},{title:"fas fa-tree",searchTerms:["bark","fall","flora","forest","nature","plant","seasonal"]},{title:"fab fa-trello",searchTerms:[]},{title:"fab fa-tripadvisor",searchTerms:[]},{title:"fas fa-trophy",searchTerms:["achievement","award","cup","game","winner"]},{title:"fas fa-truck",searchTerms:["delivery","shipping"]},{title:"fas fa-truck-loading",searchTerms:[]},{title:"fas fa-truck-monster",searchTerms:[]},{title:"fas fa-truck-moving",searchTerms:[]},{title:"fas fa-truck-pickup",searchTerms:[]},{title:"fas fa-tshirt",searchTerms:["cloth","clothing"]},{title:"fas fa-tty",searchTerms:[]},{title:"fab fa-tumblr",searchTerms:[]},{title:"fab fa-tumblr-square",searchTerms:[]},{title:"fas fa-tv",searchTerms:["computer","display","monitor","television"]},{title:"fab fa-twitch",searchTerms:[]},{title:"fab fa-twitter",searchTerms:["social network","tweet"]},{title:"fab fa-twitter-square",searchTerms:["social network","tweet"]},{title:"fab fa-typo3",searchTerms:[]},{title:"fab fa-uber",searchTerms:[]},{title:"fab fa-uikit",searchTerms:[]},{title:"fas fa-umbrella",searchTerms:["protection","rain"]},{title:"fas fa-umbrella-beach",searchTerms:["protection","recreation","sun"]},{title:"fas fa-underline",searchTerms:[]},{title:"fas fa-undo",searchTerms:["back","control z","exchange","oops","return","rotate","swap"]},{title:"fas fa-undo-alt",searchTerms:["back","control z","exchange","oops","return","swap"]},{title:"fab fa-uniregistry",searchTerms:[]},{title:"fas fa-universal-access",searchTerms:[]},{title:"fas fa-university",searchTerms:["bank","institution"]},{title:"fas fa-unlink",searchTerms:["chain","chain-broken","remove"]},{title:"fas fa-unlock",searchTerms:["admin","lock","password","protect"]},{title:"fas fa-unlock-alt",searchTerms:["admin","lock","password","protect"]},{title:"fab fa-untappd",searchTerms:[]},{title:"fas fa-upload",searchTerms:["export","publish"]},{title:"fab fa-usb",searchTerms:[]},{title:"fas fa-user",searchTerms:["account","avatar","head","human","man","person","profile"]},{title:"far fa-user",searchTerms:["account","avatar","head","human","man","person","profile"]},{title:"fas fa-user-alt",searchTerms:["account","avatar","head","human","man","person","profile"]},{title:"fas fa-user-alt-slash",searchTerms:[]},{title:"fas fa-user-astronaut",searchTerms:["avatar","clothing","cosmonaut","space","suit"]},{title:"fas fa-user-check",searchTerms:[]},{title:"fas fa-user-circle",searchTerms:["account","avatar","head","human","man","person","profile"]},{title:"far fa-user-circle",searchTerms:["account","avatar","head","human","man","person","profile"]},{title:"fas fa-user-clock",searchTerms:[]},{title:"fas fa-user-cog",searchTerms:[]},{title:"fas fa-user-edit",searchTerms:[]},{title:"fas fa-user-friends",searchTerms:[]},{title:"fas fa-user-graduate",searchTerms:["cap","clothing","commencement","gown","graduation","student"]},{title:"fas fa-user-injured",searchTerms:["cast","ouch","sling"]},{title:"fas fa-user-lock",searchTerms:[]},{title:"fas fa-user-md",searchTerms:["doctor","job","medical","nurse","occupation","profile"]},{title:"fas fa-user-minus",searchTerms:["delete","negative","remove"]},{title:"fas fa-user-ninja",searchTerms:["assassin","avatar","dangerous","deadly","sneaky"]},{title:"fas fa-user-plus",searchTerms:["positive","sign up","signup"]},{title:"fas fa-user-secret",searchTerms:["clothing","coat","hat","incognito","privacy","spy","whisper"]},{title:"fas fa-user-shield",searchTerms:[]},{title:"fas fa-user-slash",searchTerms:["ban","remove"]},{title:"fas fa-user-tag",searchTerms:[]},{title:"fas fa-user-tie",searchTerms:["avatar","business","clothing","formal"]},{title:"fas fa-user-times",searchTerms:["archive","delete","remove","x"]},{title:"fas fa-users",searchTerms:["people","persons","profiles"]},{title:"fas fa-users-cog",searchTerms:[]},{title:"fab fa-ussunnah",searchTerms:[]},{title:"fas fa-utensil-spoon",searchTerms:["spoon"]},{title:"fas fa-utensils",searchTerms:["cutlery","dinner","eat","food","knife","restaurant","spoon"]},{title:"fab fa-vaadin",searchTerms:[]},{title:"fas fa-vector-square",searchTerms:["anchors","lines","object"]},{title:"fas fa-venus",searchTerms:["female"]},{title:"fas fa-venus-double",searchTerms:[]},{title:"fas fa-venus-mars",searchTerms:[]},{title:"fab fa-viacoin",searchTerms:[]},{title:"fab fa-viadeo",searchTerms:[]},{title:"fab fa-viadeo-square",searchTerms:[]},{title:"fas fa-vial",searchTerms:["test tube"]},{title:"fas fa-vials",searchTerms:["lab results","test tubes"]},{title:"fab fa-viber",searchTerms:[]},{title:"fas fa-video",searchTerms:["camera","film","movie","record","video-camera"]},{title:"fas fa-video-slash",searchTerms:[]},{title:"fas fa-vihara",searchTerms:["buddhism","buddhist","building","monastery"]},{title:"fab fa-vimeo",searchTerms:[]},{title:"fab fa-vimeo-square",searchTerms:[]},{title:"fab fa-vimeo-v",searchTerms:["vimeo"]},{title:"fab fa-vine",searchTerms:[]},{title:"fab fa-vk",searchTerms:[]},{title:"fab fa-vnv",searchTerms:[]},{title:"fas fa-volleyball-ball",searchTerms:[]},{title:"fas fa-volume-down",searchTerms:["audio","lower","music","quieter","sound","speaker"]},{title:"fas fa-volume-mute",searchTerms:[]},{title:"fas fa-volume-off",searchTerms:["audio","music","mute","sound"]},{title:"fas fa-volume-up",searchTerms:["audio","higher","louder","music","sound","speaker"]},{title:"fas fa-vote-yea",searchTerms:["accept","cast","election","politics","positive","yes"]},{title:"fas fa-vr-cardboard",searchTerms:["google","reality","virtual"]},{title:"fab fa-vuejs",searchTerms:[]},{title:"fas fa-walking",searchTerms:[]},{title:"fas fa-wallet",searchTerms:[]},{title:"fas fa-warehouse",searchTerms:[]},{title:"fas fa-water",searchTerms:[]},{title:"fab fa-weebly",searchTerms:[]},{title:"fab fa-weibo",searchTerms:[]},{title:"fas fa-weight",searchTerms:["measurement","scale","weight"]},{title:"fas fa-weight-hanging",searchTerms:["anvil","heavy","measurement"]},{title:"fab fa-weixin",searchTerms:[]},{title:"fab fa-whatsapp",searchTerms:[]},{title:"fab fa-whatsapp-square",searchTerms:[]},{title:"fas fa-wheelchair",searchTerms:["handicap","person"]},{title:"fab fa-whmcs",searchTerms:[]},{title:"fas fa-wifi",searchTerms:[]},{title:"fab fa-wikipedia-w",searchTerms:[]},{title:"fas fa-wind",searchTerms:["air","blow","breeze","fall","seasonal"]},{title:"fas fa-window-close",searchTerms:[]},{title:"far fa-window-close",searchTerms:[]},{title:"fas fa-window-maximize",searchTerms:[]},{title:"far fa-window-maximize",searchTerms:[]},{title:"fas fa-window-minimize",searchTerms:[]},{title:"far fa-window-minimize",searchTerms:[]},{title:"fas fa-window-restore",searchTerms:[]},{title:"far fa-window-restore",searchTerms:[]},{title:"fab fa-windows",searchTerms:["microsoft"]},{title:"fas fa-wine-bottle",searchTerms:["alcohol","beverage","drink","glass","grapes"]},{title:"fas fa-wine-glass",searchTerms:["alcohol","beverage","drink","grapes"]},{title:"fas fa-wine-glass-alt",searchTerms:["alcohol","beverage","drink","grapes"]},{title:"fab fa-wix",searchTerms:[]},{title:"fab fa-wizards-of-the-coast",searchTerms:["Dungeons & Dragons","d&d","dnd","fantasy","game","gaming","tabletop"]},{title:"fab fa-wolf-pack-battalion",searchTerms:[]},{title:"fas fa-won-sign",searchTerms:["krw"]},{title:"fab fa-wordpress",searchTerms:[]},{title:"fab fa-wordpress-simple",searchTerms:[]},{title:"fab fa-wpbeginner",searchTerms:[]},{title:"fab fa-wpexplorer",searchTerms:[]},{title:"fab fa-wpforms",searchTerms:[]},{title:"fab fa-wpressr",searchTerms:["rendact"]},{title:"fas fa-wrench",searchTerms:["fix","settings","spanner","tool","update"]},{title:"fas fa-x-ray",searchTerms:["radiological images","radiology"]},{title:"fab fa-xbox",searchTerms:[]},{title:"fab fa-xing",searchTerms:[]},{title:"fab fa-xing-square",searchTerms:[]},{title:"fab fa-y-combinator",searchTerms:[]},{title:"fab fa-yahoo",searchTerms:[]},{title:"fab fa-yandex",searchTerms:[]},{title:"fab fa-yandex-international",searchTerms:[]},{title:"fab fa-yelp",searchTerms:[]},{title:"fas fa-yen-sign",searchTerms:["jpy","money"]},{title:"fas fa-yin-yang",searchTerms:["daoism","opposites","taoism"]},{title:"fab fa-yoast",searchTerms:[]},{title:"fab fa-youtube",searchTerms:["film","video","youtube-play","youtube-square"]},{title:"fab fa-youtube-square",searchTerms:[]},{title:"fab fa-zhihu",searchTerms:[]}]})});
|
assets/js/admin/lib/wp-color-picker-alpha.min.js
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
-
/**!
|
2 |
-
* wp-color-picker-alpha
|
3 |
-
*
|
4 |
-
* Overwrite Automattic Iris for enabled Alpha Channel in wpColorPicker
|
5 |
-
* Only run in input and is defined data alpha in true
|
6 |
-
*
|
7 |
-
* Version: 2.1.4
|
8 |
-
* https://github.com/kallookoo/wp-color-picker-alpha
|
9 |
-
* Licensed under the GPLv2 license or later.
|
10 |
-
*/
|
11 |
-
!function(t){if(!t.wp.wpColorPicker.prototype._hasAlpha){var o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAAHnlligAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAHJJREFUeNpi+P///4EDBxiAGMgCCCAGFB5AADGCRBgYDh48CCRZIJS9vT2QBAggFBkmBiSAogxFBiCAoHogAKIKAlBUYTELAiAmEtABEECk20G6BOmuIl0CIMBQ/IEMkO0myiSSraaaBhZcbkUOs0HuBwDplz5uFJ3Z4gAAAABJRU5ErkJggg==",r='<div class="wp-picker-holder" />',e='<div class="wp-picker-container" />',a='<input type="button" class="button button-small" />',i=void 0!==wpColorPickerL10n.current;if(i)var n='<a tabindex="0" class="wp-color-result" />';else{n='<button type="button" class="button wp-color-result" aria-expanded="false"><span class="wp-color-result-text"></span></button>';var l="<label></label>",s='<span class="screen-reader-text"></span>'}Color.fn.toString=function(){if(this._alpha<1)return this.toCSS("rgba",this._alpha).replace(/\s+/g,"");var t=parseInt(this._color,10).toString(16);return this.error?"":(t.length<6&&(t=("00000"+t).substr(-6)),"#"+t)},t.widget("wp.wpColorPicker",t.wp.wpColorPicker,{_hasAlpha:!0,_create:function(){if(t.support.iris){var p=this,c=p.element;if(t.extend(p.options,c.data()),"hue"===p.options.type)return p._createHueOnly();p.close=t.proxy(p.close,p),p.initialValue=c.val(),c.addClass("wp-color-picker"),i?(c.hide().wrap(e),p.wrap=c.parent(),p.toggler=t(n).insertBefore(c).css({backgroundColor:p.initialValue}).attr("title",wpColorPickerL10n.pick).attr("data-current",wpColorPickerL10n.current),p.pickerContainer=t(r).insertAfter(c),p.button=t(a).addClass("hidden")):(c.parent("label").length||(c.wrap(l),p.wrappingLabelText=t(s).insertBefore(c).text(wpColorPickerL10n.defaultLabel)),p.wrappingLabel=c.parent(),p.wrappingLabel.wrap(e),p.wrap=p.wrappingLabel.parent(),p.toggler=t(n).insertBefore(p.wrappingLabel).css({backgroundColor:p.initialValue}),p.toggler.find(".wp-color-result-text").text(wpColorPickerL10n.pick),p.pickerContainer=t(r).insertAfter(p.wrappingLabel),p.button=t(a)),p.options.defaultColor?(p.button.addClass("wp-picker-default").val(wpColorPickerL10n.defaultString),i||p.button.attr("aria-label",wpColorPickerL10n.defaultAriaLabel)):(p.button.addClass("wp-picker-clear").val(wpColorPickerL10n.clear),i||p.button.attr("aria-label",wpColorPickerL10n.clearAriaLabel)),i?c.wrap('<span class="wp-picker-input-wrap" />').after(p.button):(p.wrappingLabel.wrap('<span class="wp-picker-input-wrap hidden" />').after(p.button),p.inputWrapper=c.closest(".wp-picker-input-wrap")),c.iris({target:p.pickerContainer,hide:p.options.hide,width:p.options.width,mode:p.options.mode,palettes:p.options.palettes,change:function(r,e){p.options.alpha?(p.toggler.css({"background-image":"url("+o+")"}),i?p.toggler.html('<span class="color-alpha" />'):(p.toggler.css({position:"relative"}),0==p.toggler.find("span.color-alpha").length&&p.toggler.append('<span class="color-alpha" />')),p.toggler.find("span.color-alpha").css({width:"30px",height:"100%",position:"absolute",top:0,left:0,"border-top-left-radius":"2px","border-bottom-left-radius":"2px",background:e.color.toString()})):p.toggler.css({backgroundColor:e.color.toString()}),t.isFunction(p.options.change)&&p.options.change.call(this,r,e)}}),c.val(p.initialValue),p._addListeners(),p.options.hide||p.toggler.click()}},_addListeners:function(){var o=this;o.wrap.on("click.wpcolorpicker",function(t){t.stopPropagation()}),o.toggler.click(function(){o.toggler.hasClass("wp-picker-open")?o.close():o.open()}),o.element.on("change",function(r){(""===t(this).val()||o.element.hasClass("iris-error"))&&(o.options.alpha?(i&&o.toggler.removeAttr("style"),o.toggler.find("span.color-alpha").css("backgroundColor","")):o.toggler.css("backgroundColor",""),t.isFunction(o.options.clear)&&o.options.clear.call(this,r))}),o.button.on("click",function(r){t(this).hasClass("wp-picker-clear")?(o.element.val(""),o.options.alpha?(i&&o.toggler.removeAttr("style"),o.toggler.find("span.color-alpha").css("backgroundColor","")):o.toggler.css("backgroundColor",""),t.isFunction(o.options.clear)&&o.options.clear.call(this,r),o.element.trigger("change")):t(this).hasClass("wp-picker-default")&&o.element.val(o.options.defaultColor).change()})}}),t.widget("a8c.iris",t.a8c.iris,{_create:function(){if(this._super(),this.options.alpha=this.element.data("alpha")||!1,this.element.is(":input")||(this.options.alpha=!1),void 0!==this.options.alpha&&this.options.alpha){var o=this,r=o.element,e=t('<div class="iris-strip iris-slider iris-alpha-slider"><div class="iris-slider-offset iris-slider-offset-alpha"></div></div>').appendTo(o.picker.find(".iris-picker-inner")),a={aContainer:e,aSlider:e.find(".iris-slider-offset-alpha")};void 0!==r.data("custom-width")?o.options.customWidth=parseInt(r.data("custom-width"))||0:o.options.customWidth=100,o.options.defaultWidth=r.width(),(o._color._alpha<1||-1!=o._color.toString().indexOf("rgb"))&&r.width(parseInt(o.options.defaultWidth+o.options.customWidth)),t.each(a,function(t,r){o.controls[t]=r}),o.controls.square.css({"margin-right":"0"});var i=o.picker.width()-o.controls.square.width()-20,n=i/6,l=i/2-n;t.each(["aContainer","strip"],function(t,r){o.controls[r].width(l).css({"margin-left":n+"px"})}),o._initControls(),o._change()}},_initControls:function(){if(this._super(),this.options.alpha){var t=this;t.controls.aSlider.slider({orientation:"vertical",min:0,max:100,step:1,value:parseInt(100*t._color._alpha),slide:function(o,r){t._color._alpha=parseFloat(r.value/100),t._change.apply(t,arguments)}})}},_change:function(){this._super();var t=this,r=t.element;if(this.options.alpha){var e=t.controls,a=parseInt(100*t._color._alpha),i=t._color.toRgb(),n=["rgb("+i.r+","+i.g+","+i.b+") 0%","rgba("+i.r+","+i.g+","+i.b+", 0) 100%"],l=t.options.defaultWidth,s=t.options.customWidth,p=t.picker.closest(".wp-picker-container").find(".wp-color-result");e.aContainer.css({background:"linear-gradient(to bottom, "+n.join(", ")+"), url("+o+")"}),p.hasClass("wp-picker-open")&&(e.aSlider.slider("value",a),t._color._alpha<1?(e.strip.attr("style",e.strip.attr("style").replace(/rgba\(([0-9]+,)(\s+)?([0-9]+,)(\s+)?([0-9]+)(,(\s+)?[0-9\.]+)\)/g,"rgb($1$3$5)")),r.width(parseInt(l+s))):r.width(l))}(r.data("reset-alpha")||!1)&&t.picker.find(".iris-palette-container").on("click.palette",".iris-palette",function(){t._color._alpha=1,t.active="external",t._change()}),r.trigger("change")},_addInputListeners:function(t){var o=this,r=function(r){var e=new Color(t.val()),a=t.val();t.removeClass("iris-error"),e.error?""!==a&&t.addClass("iris-error"):e.toString()!==o._color.toString()&&("keyup"===r.type&&a.match(/^[0-9a-fA-F]{3}$/)||o._setOption("color",e.toString()))};t.on("change",r).on("keyup",o._debounce(r,100)),o.options.hide&&t.on("focus",function(){o.show()})}})}}(jQuery),jQuery(document).ready(function(t){t(".color-picker").wpColorPicker()});
|
1 |
+
/**!
|
2 |
+
* wp-color-picker-alpha
|
3 |
+
*
|
4 |
+
* Overwrite Automattic Iris for enabled Alpha Channel in wpColorPicker
|
5 |
+
* Only run in input and is defined data alpha in true
|
6 |
+
*
|
7 |
+
* Version: 2.1.4
|
8 |
+
* https://github.com/kallookoo/wp-color-picker-alpha
|
9 |
+
* Licensed under the GPLv2 license or later.
|
10 |
+
*/
|
11 |
+
!function(t){if(!t.wp.wpColorPicker.prototype._hasAlpha){var o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAAHnlligAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAHJJREFUeNpi+P///4EDBxiAGMgCCCAGFB5AADGCRBgYDh48CCRZIJS9vT2QBAggFBkmBiSAogxFBiCAoHogAKIKAlBUYTELAiAmEtABEECk20G6BOmuIl0CIMBQ/IEMkO0myiSSraaaBhZcbkUOs0HuBwDplz5uFJ3Z4gAAAABJRU5ErkJggg==",r='<div class="wp-picker-holder" />',e='<div class="wp-picker-container" />',a='<input type="button" class="button button-small" />',i=void 0!==wpColorPickerL10n.current;if(i)var n='<a tabindex="0" class="wp-color-result" />';else{n='<button type="button" class="button wp-color-result" aria-expanded="false"><span class="wp-color-result-text"></span></button>';var l="<label></label>",s='<span class="screen-reader-text"></span>'}Color.fn.toString=function(){if(this._alpha<1)return this.toCSS("rgba",this._alpha).replace(/\s+/g,"");var t=parseInt(this._color,10).toString(16);return this.error?"":(t.length<6&&(t=("00000"+t).substr(-6)),"#"+t)},t.widget("wp.wpColorPicker",t.wp.wpColorPicker,{_hasAlpha:!0,_create:function(){if(t.support.iris){var p=this,c=p.element;if(t.extend(p.options,c.data()),"hue"===p.options.type)return p._createHueOnly();p.close=t.proxy(p.close,p),p.initialValue=c.val(),c.addClass("wp-color-picker"),i?(c.hide().wrap(e),p.wrap=c.parent(),p.toggler=t(n).insertBefore(c).css({backgroundColor:p.initialValue}).attr("title",wpColorPickerL10n.pick).attr("data-current",wpColorPickerL10n.current),p.pickerContainer=t(r).insertAfter(c),p.button=t(a).addClass("hidden")):(c.parent("label").length||(c.wrap(l),p.wrappingLabelText=t(s).insertBefore(c).text(wpColorPickerL10n.defaultLabel)),p.wrappingLabel=c.parent(),p.wrappingLabel.wrap(e),p.wrap=p.wrappingLabel.parent(),p.toggler=t(n).insertBefore(p.wrappingLabel).css({backgroundColor:p.initialValue}),p.toggler.find(".wp-color-result-text").text(wpColorPickerL10n.pick),p.pickerContainer=t(r).insertAfter(p.wrappingLabel),p.button=t(a)),p.options.defaultColor?(p.button.addClass("wp-picker-default").val(wpColorPickerL10n.defaultString),i||p.button.attr("aria-label",wpColorPickerL10n.defaultAriaLabel)):(p.button.addClass("wp-picker-clear").val(wpColorPickerL10n.clear),i||p.button.attr("aria-label",wpColorPickerL10n.clearAriaLabel)),i?c.wrap('<span class="wp-picker-input-wrap" />').after(p.button):(p.wrappingLabel.wrap('<span class="wp-picker-input-wrap hidden" />').after(p.button),p.inputWrapper=c.closest(".wp-picker-input-wrap")),c.iris({target:p.pickerContainer,hide:p.options.hide,width:p.options.width,mode:p.options.mode,palettes:p.options.palettes,change:function(r,e){p.options.alpha?(p.toggler.css({"background-image":"url("+o+")"}),i?p.toggler.html('<span class="color-alpha" />'):(p.toggler.css({position:"relative"}),0==p.toggler.find("span.color-alpha").length&&p.toggler.append('<span class="color-alpha" />')),p.toggler.find("span.color-alpha").css({width:"30px",height:"100%",position:"absolute",top:0,left:0,"border-top-left-radius":"2px","border-bottom-left-radius":"2px",background:e.color.toString()})):p.toggler.css({backgroundColor:e.color.toString()}),t.isFunction(p.options.change)&&p.options.change.call(this,r,e)}}),c.val(p.initialValue),p._addListeners(),p.options.hide||p.toggler.click()}},_addListeners:function(){var o=this;o.wrap.on("click.wpcolorpicker",function(t){t.stopPropagation()}),o.toggler.click(function(){o.toggler.hasClass("wp-picker-open")?o.close():o.open()}),o.element.on("change",function(r){(""===t(this).val()||o.element.hasClass("iris-error"))&&(o.options.alpha?(i&&o.toggler.removeAttr("style"),o.toggler.find("span.color-alpha").css("backgroundColor","")):o.toggler.css("backgroundColor",""),t.isFunction(o.options.clear)&&o.options.clear.call(this,r))}),o.button.on("click",function(r){t(this).hasClass("wp-picker-clear")?(o.element.val(""),o.options.alpha?(i&&o.toggler.removeAttr("style"),o.toggler.find("span.color-alpha").css("backgroundColor","")):o.toggler.css("backgroundColor",""),t.isFunction(o.options.clear)&&o.options.clear.call(this,r),o.element.trigger("change")):t(this).hasClass("wp-picker-default")&&o.element.val(o.options.defaultColor).change()})}}),t.widget("a8c.iris",t.a8c.iris,{_create:function(){if(this._super(),this.options.alpha=this.element.data("alpha")||!1,this.element.is(":input")||(this.options.alpha=!1),void 0!==this.options.alpha&&this.options.alpha){var o=this,r=o.element,e=t('<div class="iris-strip iris-slider iris-alpha-slider"><div class="iris-slider-offset iris-slider-offset-alpha"></div></div>').appendTo(o.picker.find(".iris-picker-inner")),a={aContainer:e,aSlider:e.find(".iris-slider-offset-alpha")};void 0!==r.data("custom-width")?o.options.customWidth=parseInt(r.data("custom-width"))||0:o.options.customWidth=100,o.options.defaultWidth=r.width(),(o._color._alpha<1||-1!=o._color.toString().indexOf("rgb"))&&r.width(parseInt(o.options.defaultWidth+o.options.customWidth)),t.each(a,function(t,r){o.controls[t]=r}),o.controls.square.css({"margin-right":"0"});var i=o.picker.width()-o.controls.square.width()-20,n=i/6,l=i/2-n;t.each(["aContainer","strip"],function(t,r){o.controls[r].width(l).css({"margin-left":n+"px"})}),o._initControls(),o._change()}},_initControls:function(){if(this._super(),this.options.alpha){var t=this;t.controls.aSlider.slider({orientation:"vertical",min:0,max:100,step:1,value:parseInt(100*t._color._alpha),slide:function(o,r){t._color._alpha=parseFloat(r.value/100),t._change.apply(t,arguments)}})}},_change:function(){this._super();var t=this,r=t.element;if(this.options.alpha){var e=t.controls,a=parseInt(100*t._color._alpha),i=t._color.toRgb(),n=["rgb("+i.r+","+i.g+","+i.b+") 0%","rgba("+i.r+","+i.g+","+i.b+", 0) 100%"],l=t.options.defaultWidth,s=t.options.customWidth,p=t.picker.closest(".wp-picker-container").find(".wp-color-result");e.aContainer.css({background:"linear-gradient(to bottom, "+n.join(", ")+"), url("+o+")"}),p.hasClass("wp-picker-open")&&(e.aSlider.slider("value",a),t._color._alpha<1?(e.strip.attr("style",e.strip.attr("style").replace(/rgba\(([0-9]+,)(\s+)?([0-9]+,)(\s+)?([0-9]+)(,(\s+)?[0-9\.]+)\)/g,"rgb($1$3$5)")),r.width(parseInt(l+s))):r.width(l))}(r.data("reset-alpha")||!1)&&t.picker.find(".iris-palette-container").on("click.palette",".iris-palette",function(){t._color._alpha=1,t.active="external",t._change()}),r.trigger("change")},_addInputListeners:function(t){var o=this,r=function(r){var e=new Color(t.val()),a=t.val();t.removeClass("iris-error"),e.error?""!==a&&t.addClass("iris-error"):e.toString()!==o._color.toString()&&("keyup"===r.type&&a.match(/^[0-9a-fA-F]{3}$/)||o._setOption("color",e.toString()))};t.on("change",r).on("keyup",o._debounce(r,100)),o.options.hide&&t.on("focus",function(){o.show()})}})}}(jQuery),jQuery(document).ready(function(t){t(".color-picker").wpColorPicker()});
|
assets/js/editor.js
CHANGED
@@ -1,386 +1,386 @@
|
|
1 |
-
( function( $ ) {//TODO: manage comments
|
2 |
-
|
3 |
-
"use strict";
|
4 |
-
|
5 |
-
var mutationObserver = new MutationObserver(function(mutations) {
|
6 |
-
// Elementor Search Input
|
7 |
-
if ( $('#elementor-panel-elements-search-input').length ) {
|
8 |
-
|
9 |
-
var searchTimeout = null;
|
10 |
-
$('#elementor-panel-elements-search-input').on( 'keyup', function(e) {
|
11 |
-
if ( e.which === 13 ) {
|
12 |
-
return false;
|
13 |
-
}
|
14 |
-
|
15 |
-
var val = $(this).val();
|
16 |
-
|
17 |
-
if (searchTimeout != null) {
|
18 |
-
clearTimeout(searchTimeout);
|
19 |
-
}
|
20 |
-
|
21 |
-
searchTimeout = setTimeout(function() {
|
22 |
-
searchTimeout = null;
|
23 |
-
|
24 |
-
elementorCommon.ajax.addRequest( 'wpr_elementor_search_data', {
|
25 |
-
data: {
|
26 |
-
search_query: val,
|
27 |
-
},
|
28 |
-
success: function() {
|
29 |
-
console.log('Success!');
|
30 |
-
}
|
31 |
-
});
|
32 |
-
}, 1000);
|
33 |
-
});
|
34 |
-
|
35 |
-
}
|
36 |
-
});
|
37 |
-
|
38 |
-
// Listen to Elementor Panel Changes
|
39 |
-
mutationObserver.observe($('#elementor-panel')[0], {
|
40 |
-
childList: true,
|
41 |
-
subtree: true,
|
42 |
-
});
|
43 |
-
|
44 |
-
|
45 |
-
// Make our custom css visible in the panel's front-end
|
46 |
-
elementor.hooks.addFilter( 'editor/style/styleText', function( css, context ) {
|
47 |
-
if ( ! context ) {
|
48 |
-
return;
|
49 |
-
}
|
50 |
-
|
51 |
-
var model = context.model,
|
52 |
-
customCSS = model.get('settings').get('wpr_custom_css');
|
53 |
-
var selector = '.elementor-element.elementor-element-' + model.get('id');
|
54 |
-
|
55 |
-
if ( 'document' === model.get('elType') ) {
|
56 |
-
selector = elementor.config.document.settings.cssWrapperSelector;
|
57 |
-
}
|
58 |
-
|
59 |
-
if ( customCSS ) {
|
60 |
-
css += customCSS.replace(/selector/g, selector);
|
61 |
-
}
|
62 |
-
|
63 |
-
return css;
|
64 |
-
});
|
65 |
-
|
66 |
-
// Shortcode Widget: Select Template
|
67 |
-
function selectShortcodeTemplate( model, e, textarea ) {
|
68 |
-
var data = e.params.data;
|
69 |
-
|
70 |
-
// Update Settings
|
71 |
-
model.attributes.settings.attributes.shortcode = '[wpr-template id="'+ data.id +'"]';
|
72 |
-
|
73 |
-
// Update Textarea
|
74 |
-
textarea.val('[wpr-template id="'+ data.id +'"]');
|
75 |
-
|
76 |
-
// Refresh Preview
|
77 |
-
model.renderRemoteServer();
|
78 |
-
}
|
79 |
-
|
80 |
-
elementor.hooks.addAction( 'panel/open_editor/widget/shortcode', function( panel, model, view ) {
|
81 |
-
|
82 |
-
var $select = panel.$el.find('.elementor-control-type-select2').find('select'),
|
83 |
-
$textarea = panel.$el.find('.elementor-control-type-textarea').find('textarea');
|
84 |
-
|
85 |
-
// Change
|
86 |
-
$select.on( 'select2:select', function( e ) {
|
87 |
-
selectShortcodeTemplate( model, e, $textarea );
|
88 |
-
});
|
89 |
-
|
90 |
-
// Render
|
91 |
-
panel.$el.find('#elementor-controls').on( 'DOMNodeInserted ', '.elementor-control-type-select2', function(){
|
92 |
-
$(this).find( 'select' ).on( 'select2:select', function( e ) {
|
93 |
-
selectShortcodeTemplate( model, e, $textarea );
|
94 |
-
} );
|
95 |
-
});
|
96 |
-
} );
|
97 |
-
|
98 |
-
|
99 |
-
// WPR Grid Widget: Select Element (Filter Taxonomies)
|
100 |
-
function filterGridTaxonomies( data, value ) {
|
101 |
-
var options = [];
|
102 |
-
|
103 |
-
for ( var key in data ) {
|
104 |
-
if ( key !== value ) {
|
105 |
-
for ( var i = 0; i < data[key].length; i++ ) {
|
106 |
-
options.push( '.elementor-control-element_select select option[value="'+ data[key][i] +'"]' );
|
107 |
-
}
|
108 |
-
}
|
109 |
-
}
|
110 |
-
|
111 |
-
// Reset
|
112 |
-
$( 'head' ).find( '#element_select_filter_style' ).remove();
|
113 |
-
|
114 |
-
if ( 'related' === value || 'current' === value ) {
|
115 |
-
return;
|
116 |
-
}
|
117 |
-
|
118 |
-
// Append Styles
|
119 |
-
$( 'head' ).append('<style id="element_select_filter_style">'+ options.join(',') +' { display: none !important; }</style>');
|
120 |
-
}
|
121 |
-
|
122 |
-
// WPR Grid Widget: Post Meta Keys (Filter by Query)
|
123 |
-
function filterGridMetaKeys( data, value ) {
|
124 |
-
var options = [];
|
125 |
-
|
126 |
-
for ( var key in data ) {
|
127 |
-
if ( key !== value ) {
|
128 |
-
for ( var i = 0; i < data[key].length; i++ ) {
|
129 |
-
options.push( '.select2-results__options li[data-select2-id*="-'+ data[key][i] +'"]' );
|
130 |
-
}
|
131 |
-
}
|
132 |
-
}
|
133 |
-
|
134 |
-
// Reset
|
135 |
-
$( 'head' ).find( '#post_meta_keys_filter_style' ).remove();
|
136 |
-
|
137 |
-
// Append Styles
|
138 |
-
$( 'head' ).append('<style id="post_meta_keys_filter_style">'+ options.join(',') +' { display: none !important; }</style>');
|
139 |
-
}
|
140 |
-
|
141 |
-
// WPR Grid Widget / List style: Element Location
|
142 |
-
function disableListLocation( value ) {
|
143 |
-
// Reset
|
144 |
-
$( 'head' ).find( '#list_element_location_style' ).remove();
|
145 |
-
|
146 |
-
if ( 'list' !== value ) {
|
147 |
-
return;
|
148 |
-
}
|
149 |
-
|
150 |
-
// Append Styles
|
151 |
-
$( 'head' ).append('<style id="list_element_location_style">.elementor-control-element_location option[value="above"] { display: none !important; }</style>');
|
152 |
-
}
|
153 |
-
|
154 |
-
// Grid
|
155 |
-
elementor.hooks.addAction( 'panel/open_editor/widget/wpr-grid', function( panel, model, view ) {
|
156 |
-
var $querySource = panel.$el.find('.elementor-control-query_source').find( 'select' ),
|
157 |
-
taxonomies = JSON.parse( panel.$el.find('.elementor-control-element_select_filter').find('input').val() ),
|
158 |
-
metaKeys = JSON.parse( panel.$el.find('.elementor-control-post_meta_keys_filter').find('input').val() );
|
159 |
-
|
160 |
-
// Open
|
161 |
-
filterGridTaxonomies( taxonomies, $querySource.val() );
|
162 |
-
filterGridMetaKeys( metaKeys, $querySource.val() );
|
163 |
-
|
164 |
-
// Change
|
165 |
-
$querySource.on( 'change', function() {
|
166 |
-
filterGridTaxonomies( taxonomies, $(this).val() );
|
167 |
-
filterGridMetaKeys( metaKeys, $(this).val() );
|
168 |
-
});
|
169 |
-
|
170 |
-
// Render Query Source
|
171 |
-
panel.$el.find('#elementor-controls').on( 'DOMNodeInserted ', '.elementor-control-query_source', function(){
|
172 |
-
$(this).find( 'select' ).on( 'change', function() {
|
173 |
-
filterGridTaxonomies( taxonomies, $(this).val() );
|
174 |
-
filterGridMetaKeys( metaKeys, $(this).val() );
|
175 |
-
} );
|
176 |
-
});
|
177 |
-
|
178 |
-
// Render Layout Select
|
179 |
-
panel.$el.find('#elementor-controls').on( 'DOMNodeInserted ', '.elementor-control-layout_select', function(){
|
180 |
-
disableListLocation( $(this).find( 'select' ).val() );
|
181 |
-
|
182 |
-
$(this).find( 'select' ).on( 'change', function() {
|
183 |
-
disableListLocation( $(this).val() );
|
184 |
-
} );
|
185 |
-
});
|
186 |
-
|
187 |
-
// Render Grid Elements
|
188 |
-
panel.$el.find('#elementor-controls').on( 'DOMNodeInserted ', '.elementor-control-grid_elements', function() {
|
189 |
-
|
190 |
-
$(this).find( '.elementor-control-element_select select' ).on( 'change', function() {
|
191 |
-
var wrapper = $(this).closest( '.elementor-repeater-row-controls' );
|
192 |
-
|
193 |
-
if ( 'lightbox' === $(this).val() ) {
|
194 |
-
wrapper.find('.elementor-control-element_location').find( 'select' ).val( 'over' ).trigger( 'change' );
|
195 |
-
wrapper.find('.elementor-control-element_animation').find( 'select' ).val( 'fade-in' ).trigger( 'change' );
|
196 |
-
wrapper.find('.elementor-control-element_align_hr').find( 'input' ).eq(1).prop('checked',true).trigger( 'change' );
|
197 |
-
wrapper.find('.elementor-control-element_lightbox_overlay').find( 'input' ).prop('checked',true).trigger( 'change' );
|
198 |
-
wrapper.find('.elementor-control-element_extra_icon_pos').find( 'select' ).val( 'before' ).trigger( 'change' );
|
199 |
-
setTimeout(function() {
|
200 |
-
wrapper.find('.elementor-control-element_extra_icon_pos').addClass( 'elementor-hidden-control' );
|
201 |
-
}, 100 );
|
202 |
-
} else {
|
203 |
-
wrapper.find('.elementor-control-element_extra_text_pos').find( 'select' ).val( 'none' ).trigger( 'change' );
|
204 |
-
wrapper.find('.elementor-control-element_extra_icon_pos').find( 'select' ).val( 'none' ).trigger( 'change' );
|
205 |
-
wrapper.find('.elementor-control-element_extra_icon_pos').removeClass( 'elementor-hidden-control' );
|
206 |
-
}
|
207 |
-
} );
|
208 |
-
});
|
209 |
-
|
210 |
-
var sOffsets = {};
|
211 |
-
|
212 |
-
// Prevent Bubble on Click
|
213 |
-
panel.$el.find('#elementor-controls').on( 'DOMNodeInserted ', '.elementor-control-type-section', function() {
|
214 |
-
var current = $(this),
|
215 |
-
attrClass = current.attr( 'class' ),
|
216 |
-
firstIndex = attrClass.indexOf( 'elementor-control-section_' ),
|
217 |
-
lastIndex = attrClass.indexOf( 'elementor-control-type-section' ) - 1;
|
218 |
-
|
219 |
-
var oKey = attrClass.substring( firstIndex, lastIndex ),
|
220 |
-
oProperty = current.offset().top;
|
221 |
-
|
222 |
-
sOffsets[oKey] = oProperty;
|
223 |
-
|
224 |
-
setTimeout(function() {
|
225 |
-
current.on( 'click', function( event ) {
|
226 |
-
var current = $(this),
|
227 |
-
attrClass = current.attr( 'class' ),
|
228 |
-
firstIndex = attrClass.indexOf( 'elementor-control-section_' ),
|
229 |
-
lastIndex = attrClass.indexOf( 'elementor-control-type-section' ) - 1,
|
230 |
-
sectionClass = attrClass.substring( firstIndex, lastIndex );
|
231 |
-
|
232 |
-
setTimeout( function() {
|
233 |
-
$( '#elementor-panel-content-wrapper' ).scrollTop( sOffsets[sectionClass] - 100 );
|
234 |
-
}, 10 );
|
235 |
-
});
|
236 |
-
}, 100 );
|
237 |
-
});
|
238 |
-
} );
|
239 |
-
|
240 |
-
// Image Grid
|
241 |
-
elementor.hooks.addAction( 'panel/open_editor/widget/wpr-media-grid', function( panel, model, view ) {
|
242 |
-
// Render Grid Elements
|
243 |
-
panel.$el.find('#elementor-controls').on( 'DOMNodeInserted ', '.elementor-control-grid_elements', function() {
|
244 |
-
$(this).find( '.elementor-control-element_select select' ).on( 'change', function() {
|
245 |
-
var wrapper = $(this).closest( '.elementor-repeater-row-controls' );
|
246 |
-
|
247 |
-
if ( 'lightbox' === $(this).val() ) {
|
248 |
-
wrapper.find('.elementor-control-element_location').find( 'select' ).val( 'over' ).trigger( 'change' );
|
249 |
-
wrapper.find('.elementor-control-element_animation').find( 'select' ).val( 'fade-in' ).trigger( 'change' );
|
250 |
-
wrapper.find('.elementor-control-element_align_hr').find( 'input' ).eq(1).prop('checked',true).trigger( 'change' );
|
251 |
-
wrapper.find('.elementor-control-element_lightbox_overlay').find( 'input' ).prop('checked',true).trigger( 'change' );
|
252 |
-
wrapper.find('.elementor-control-element_extra_icon_pos').find( 'select' ).val( 'before' ).trigger( 'change' );
|
253 |
-
setTimeout(function() {
|
254 |
-
wrapper.find('.elementor-control-element_extra_icon_pos').addClass( 'elementor-hidden-control' );
|
255 |
-
}, 100 );
|
256 |
-
} else {
|
257 |
-
wrapper.find('.elementor-control-element_extra_text_pos').find( 'select' ).val( 'none' ).trigger( 'change' );
|
258 |
-
wrapper.find('.elementor-control-element_extra_icon_pos').find( 'select' ).val( 'none' ).trigger( 'change' );
|
259 |
-
wrapper.find('.elementor-control-element_extra_icon_pos').removeClass( 'elementor-hidden-control' );
|
260 |
-
}
|
261 |
-
} );
|
262 |
-
});
|
263 |
-
} );
|
264 |
-
|
265 |
-
// Woo Grid
|
266 |
-
elementor.hooks.addAction( 'panel/open_editor/widget/wpr-woo-grid', function( panel, model, view ) {
|
267 |
-
// Render Grid Elements
|
268 |
-
panel.$el.find('#elementor-controls').on( 'DOMNodeInserted ', '.elementor-control-grid_elements', function() {
|
269 |
-
$(this).find( '.elementor-control-element_select select' ).on( 'change', function() {
|
270 |
-
var wrapper = $(this).closest( '.elementor-repeater-row-controls' );
|
271 |
-
|
272 |
-
if ( 'lightbox' === $(this).val() ) {
|
273 |
-
wrapper.find('.elementor-control-element_location').find( 'select' ).val( 'over' ).trigger( 'change' );
|
274 |
-
wrapper.find('.elementor-control-element_animation').find( 'select' ).val( 'fade-in' ).trigger( 'change' );
|
275 |
-
wrapper.find('.elementor-control-element_align_hr').find( 'input' ).eq(1).prop('checked',true).trigger( 'change' );
|
276 |
-
wrapper.find('.elementor-control-element_lightbox_overlay').find( 'input' ).prop('checked',true).trigger( 'change' );
|
277 |
-
wrapper.find('.elementor-control-element_extra_icon_pos').find( 'select' ).val( 'before' ).trigger( 'change' );
|
278 |
-
setTimeout(function() {
|
279 |
-
wrapper.find('.elementor-control-element_extra_icon_pos').addClass( 'elementor-hidden-control' );
|
280 |
-
}, 100 );
|
281 |
-
} else {
|
282 |
-
wrapper.find('.elementor-control-element_extra_text_pos').find( 'select' ).val( 'none' ).trigger( 'change' );
|
283 |
-
wrapper.find('.elementor-control-element_extra_icon_pos').find( 'select' ).val( 'none' ).trigger( 'change' );
|
284 |
-
wrapper.find('.elementor-control-element_extra_icon_pos').removeClass( 'elementor-hidden-control' );
|
285 |
-
}
|
286 |
-
} );
|
287 |
-
});
|
288 |
-
|
289 |
-
var sOffsets = {};
|
290 |
-
|
291 |
-
// Prevent Bubble on Click - not working - //tmp
|
292 |
-
panel.$el.find('#elementor-controls').on( 'DOMNodeInserted ', '.elementor-control-type-section', function() {
|
293 |
-
var current = $(this),
|
294 |
-
attrClass = current.attr( 'class' ),
|
295 |
-
firstIndex = attrClass.indexOf( 'elementor-control-section_' ),
|
296 |
-
lastIndex = attrClass.indexOf( 'elementor-control-type-section' ) - 1;
|
297 |
-
|
298 |
-
var oKey = attrClass.substring( firstIndex, lastIndex ),
|
299 |
-
oPropery = current.offset().top;
|
300 |
-
|
301 |
-
sOffsets[oKey] = oPropery;
|
302 |
-
|
303 |
-
setTimeout(function() {
|
304 |
-
current.on( 'click', function( event ) {
|
305 |
-
var current = $(this),
|
306 |
-
attrClass = current.attr( 'class' ),
|
307 |
-
firstIndex = attrClass.indexOf( 'elementor-control-section_' ),
|
308 |
-
lastIndex = attrClass.indexOf( 'elementor-control-type-section' ) - 1,
|
309 |
-
sectionClass = attrClass.substring( firstIndex, lastIndex );
|
310 |
-
|
311 |
-
setTimeout( function() {
|
312 |
-
$( '#elementor-panel-content-wrapper' ).scrollTop( sOffsets[sectionClass] - 100 );
|
313 |
-
}, 10 );
|
314 |
-
});
|
315 |
-
}, 100 );
|
316 |
-
});
|
317 |
-
} );
|
318 |
-
|
319 |
-
// Get Referrer Link
|
320 |
-
var referrer = document.referrer;
|
321 |
-
|
322 |
-
// Return to Plugin Page
|
323 |
-
if ( '' !== referrer && referrer.indexOf( 'page=wpr-addons' ) > -1 ) {
|
324 |
-
$(window).on( 'load', function() {
|
325 |
-
|
326 |
-
$('#elementor-panel-header-menu-button').on( 'click', function() {
|
327 |
-
|
328 |
-
setTimeout(function() {
|
329 |
-
$('.elementor-panel-menu-item-exit-to-dashboard').on( 'click', function() {
|
330 |
-
window.location.href = referrer;
|
331 |
-
});
|
332 |
-
}, 300);
|
333 |
-
});
|
334 |
-
});
|
335 |
-
}
|
336 |
-
|
337 |
-
// Advanced Slider - TODO: Check if necessary or remove
|
338 |
-
// elementor.hooks.addAction( 'panel/open_editor/widget/wpr-advanced-slider', function( panel, model, view ) {
|
339 |
-
// var elControls = panel.$el,
|
340 |
-
// $select = elControls.find('.elementor-control-slider_content_type').find('select');
|
341 |
-
|
342 |
-
// if ( 'custom' !== $select.val() ) {
|
343 |
-
// elControls.find('.elementor-control-slider_items .elementor-repeater-row-controls .elementor-control').addClass('wpr-elementor-hidden-control');
|
344 |
-
// elControls.find('.elementor-control-slider_content_type').removeClass('wpr-elementor-hidden-control');
|
345 |
-
// elControls.find('.elementor-control-slider_select_template').removeClass('wpr-elementor-hidden-control');
|
346 |
-
// } else {
|
347 |
-
// elControls.find('.elementor-control-slider_items .elementor-repeater-row-controls .elementor-control').removeClass('wpr-elementor-hidden-control');
|
348 |
-
// elControls.find('.elementor-control-slider_select_template').addClass('wpr-elementor-hidden-control');
|
349 |
-
// }
|
350 |
-
|
351 |
-
// $select.on( 'change', function() {
|
352 |
-
|
353 |
-
// if ( 'custom' !== $(this).val() ) {
|
354 |
-
// elControls.find('.elementor-control-slider_items .elementor-repeater-row-controls .elementor-control').addClass('wpr-elementor-hidden-control');
|
355 |
-
// elControls.find('.elementor-control-slider_content_type').removeClass('wpr-elementor-hidden-control');
|
356 |
-
// elControls.find('.elementor-control-slider_select_template').removeClass('wpr-elementor-hidden-control');
|
357 |
-
// } else {
|
358 |
-
// elControls.find('.elementor-control-slider_items .elementor-repeater-row-controls .elementor-control').removeClass('wpr-elementor-hidden-control');
|
359 |
-
// elControls.find('.elementor-control-slider_select_template').addClass('wpr-elementor-hidden-control');
|
360 |
-
// }
|
361 |
-
// });
|
362 |
-
// } );
|
363 |
-
|
364 |
-
/*--------------------------------------------------------------
|
365 |
-
== Widget Preview and Library buttons
|
366 |
-
--------------------------------------------------------------*/
|
367 |
-
|
368 |
-
for (const [key, value] of Object.entries(registered_modules)) {
|
369 |
-
elementor.hooks.addAction( 'panel/open_editor/widget/wpr-'+ value[0], function( panel, model, view ) {
|
370 |
-
openPedefinedStyles( panel.$el, view.$el, value[0], value[1], value[2] );
|
371 |
-
} );
|
372 |
-
}
|
373 |
-
|
374 |
-
function openPedefinedStyles( panel, preview, widget, url, filter ) {
|
375 |
-
panel.on( 'click', '.elementor-control-wpr_library_buttons .elementor-control-raw-html div a:first-child', function() {
|
376 |
-
var theme = $(this).data('theme');
|
377 |
-
$(this).attr('href', url +'?ref=rea-plugin-panel-'+ widget +'-utmtr'+ theme.slice(0,3) +'nkbs'+ theme.slice(3,theme.length) +'-preview'+ filter);
|
378 |
-
});
|
379 |
-
|
380 |
-
panel.on( 'click', '.elementor-control-wpr_library_buttons .elementor-control-raw-html div a:last-child', function() {
|
381 |
-
preview.closest('body').find('#wpr-library-btn').attr('data-filter', widget);
|
382 |
-
preview.closest('body').find('#wpr-library-btn').trigger('click');
|
383 |
-
});
|
384 |
-
}
|
385 |
-
|
386 |
}( jQuery ) );
|
1 |
+
( function( $ ) {//TODO: manage comments
|
2 |
+
|
3 |
+
"use strict";
|
4 |
+
|
5 |
+
var mutationObserver = new MutationObserver(function(mutations) {
|
6 |
+
// Elementor Search Input
|
7 |
+
if ( $('#elementor-panel-elements-search-input').length ) {
|
8 |
+
|
9 |
+
var searchTimeout = null;
|
10 |
+
$('#elementor-panel-elements-search-input').on( 'keyup', function(e) {
|
11 |
+
if ( e.which === 13 ) {
|
12 |
+
return false;
|
13 |
+
}
|
14 |
+
|
15 |
+
var val = $(this).val();
|
16 |
+
|
17 |
+
if (searchTimeout != null) {
|
18 |
+
clearTimeout(searchTimeout);
|
19 |
+
}
|
20 |
+
|
21 |
+
searchTimeout = setTimeout(function() {
|
22 |
+
searchTimeout = null;
|
23 |
+
|
24 |
+
elementorCommon.ajax.addRequest( 'wpr_elementor_search_data', {
|
25 |
+
data: {
|
26 |
+
search_query: val,
|
27 |
+
},
|
28 |
+
success: function() {
|
29 |
+
console.log('Success!');
|
30 |
+
}
|
31 |
+
});
|
32 |
+
}, 1000);
|
33 |
+
});
|
34 |
+
|
35 |
+
}
|
36 |
+
});
|
37 |
+
|
38 |
+
// Listen to Elementor Panel Changes
|
39 |
+
mutationObserver.observe($('#elementor-panel')[0], {
|
40 |
+
childList: true,
|
41 |
+
subtree: true,
|
42 |
+
});
|
43 |
+
|
44 |
+
|
45 |
+
// Make our custom css visible in the panel's front-end
|
46 |
+
elementor.hooks.addFilter( 'editor/style/styleText', function( css, context ) {
|
47 |
+
if ( ! context ) {
|
48 |
+
return;
|
49 |
+
}
|
50 |
+
|
51 |
+
var model = context.model,
|
52 |
+
customCSS = model.get('settings').get('wpr_custom_css');
|
53 |
+
var selector = '.elementor-element.elementor-element-' + model.get('id');
|
54 |
+
|
55 |
+
if ( 'document' === model.get('elType') ) {
|
56 |
+
selector = elementor.config.document.settings.cssWrapperSelector;
|
57 |
+
}
|
58 |
+
|
59 |
+
if ( customCSS ) {
|
60 |
+
css += customCSS.replace(/selector/g, selector);
|
61 |
+
}
|
62 |
+
|
63 |
+
return css;
|
64 |
+
});
|
65 |
+
|
66 |
+
// Shortcode Widget: Select Template
|
67 |
+
function selectShortcodeTemplate( model, e, textarea ) {
|
68 |
+
var data = e.params.data;
|
69 |
+
|
70 |
+
// Update Settings
|
71 |
+
model.attributes.settings.attributes.shortcode = '[wpr-template id="'+ data.id +'"]';
|
72 |
+
|
73 |
+
// Update Textarea
|
74 |
+
textarea.val('[wpr-template id="'+ data.id +'"]');
|
75 |
+
|
76 |
+
// Refresh Preview
|
77 |
+
model.renderRemoteServer();
|
78 |
+
}
|
79 |
+
|
80 |
+
elementor.hooks.addAction( 'panel/open_editor/widget/shortcode', function( panel, model, view ) {
|
81 |
+
|
82 |
+
var $select = panel.$el.find('.elementor-control-type-select2').find('select'),
|
83 |
+
$textarea = panel.$el.find('.elementor-control-type-textarea').find('textarea');
|
84 |
+
|
85 |
+
// Change
|
86 |
+
$select.on( 'select2:select', function( e ) {
|
87 |
+
selectShortcodeTemplate( model, e, $textarea );
|
88 |
+
});
|
89 |
+
|
90 |
+
// Render
|
91 |
+
panel.$el.find('#elementor-controls').on( 'DOMNodeInserted ', '.elementor-control-type-select2', function(){
|
92 |
+
$(this).find( 'select' ).on( 'select2:select', function( e ) {
|
93 |
+
selectShortcodeTemplate( model, e, $textarea );
|
94 |
+
} );
|
95 |
+
});
|
96 |
+
} );
|
97 |
+
|
98 |
+
|
99 |
+
// WPR Grid Widget: Select Element (Filter Taxonomies)
|
100 |
+
function filterGridTaxonomies( data, value ) {
|
101 |
+
var options = [];
|
102 |
+
|
103 |
+
for ( var key in data ) {
|
104 |
+
if ( key !== value ) {
|
105 |
+
for ( var i = 0; i < data[key].length; i++ ) {
|
106 |
+
options.push( '.elementor-control-element_select select option[value="'+ data[key][i] +'"]' );
|
107 |
+
}
|
108 |
+
}
|
109 |
+
}
|
110 |
+
|
111 |
+
// Reset
|
112 |
+
$( 'head' ).find( '#element_select_filter_style' ).remove();
|
113 |
+
|
114 |
+
if ( 'related' === value || 'current' === value ) {
|
115 |
+
return;
|
116 |
+
}
|
117 |
+
|
118 |
+
// Append Styles
|
119 |
+
$( 'head' ).append('<style id="element_select_filter_style">'+ options.join(',') +' { display: none !important; }</style>');
|
120 |
+
}
|
121 |
+
|
122 |
+
// WPR Grid Widget: Post Meta Keys (Filter by Query)
|
123 |
+
function filterGridMetaKeys( data, value ) {
|
124 |
+
var options = [];
|
125 |
+
|
126 |
+
for ( var key in data ) {
|
127 |
+
if ( key !== value ) {
|
128 |
+
for ( var i = 0; i < data[key].length; i++ ) {
|
129 |
+
options.push( '.select2-results__options li[data-select2-id*="-'+ data[key][i] +'"]' );
|
130 |
+
}
|
131 |
+
}
|
132 |
+
}
|
133 |
+
|
134 |
+
// Reset
|
135 |
+
$( 'head' ).find( '#post_meta_keys_filter_style' ).remove();
|
136 |
+
|
137 |
+
// Append Styles
|
138 |
+
$( 'head' ).append('<style id="post_meta_keys_filter_style">'+ options.join(',') +' { display: none !important; }</style>');
|
139 |
+
}
|
140 |
+
|
141 |
+
// WPR Grid Widget / List style: Element Location
|
142 |
+
function disableListLocation( value ) {
|
143 |
+
// Reset
|
144 |
+
$( 'head' ).find( '#list_element_location_style' ).remove();
|
145 |
+
|
146 |
+
if ( 'list' !== value ) {
|
147 |
+
return;
|
148 |
+
}
|
149 |
+
|
150 |
+
// Append Styles
|
151 |
+
$( 'head' ).append('<style id="list_element_location_style">.elementor-control-element_location option[value="above"] { display: none !important; }</style>');
|
152 |
+
}
|
153 |
+
|
154 |
+
// Grid
|
155 |
+
elementor.hooks.addAction( 'panel/open_editor/widget/wpr-grid', function( panel, model, view ) {
|
156 |
+
var $querySource = panel.$el.find('.elementor-control-query_source').find( 'select' ),
|
157 |
+
taxonomies = JSON.parse( panel.$el.find('.elementor-control-element_select_filter').find('input').val() ),
|
158 |
+
metaKeys = JSON.parse( panel.$el.find('.elementor-control-post_meta_keys_filter').find('input').val() );
|
159 |
+
|
160 |
+
// Open
|
161 |
+
filterGridTaxonomies( taxonomies, $querySource.val() );
|
162 |
+
filterGridMetaKeys( metaKeys, $querySource.val() );
|
163 |
+
|
164 |
+
// Change
|
165 |
+
$querySource.on( 'change', function() {
|
166 |
+
filterGridTaxonomies( taxonomies, $(this).val() );
|
167 |
+
filterGridMetaKeys( metaKeys, $(this).val() );
|
168 |
+
});
|
169 |
+
|
170 |
+
// Render Query Source
|
171 |
+
panel.$el.find('#elementor-controls').on( 'DOMNodeInserted ', '.elementor-control-query_source', function(){
|
172 |
+
$(this).find( 'select' ).on( 'change', function() {
|
173 |
+
filterGridTaxonomies( taxonomies, $(this).val() );
|
174 |
+
filterGridMetaKeys( metaKeys, $(this).val() );
|
175 |
+
} );
|
176 |
+
});
|
177 |
+
|
178 |
+
// Render Layout Select
|
179 |
+
panel.$el.find('#elementor-controls').on( 'DOMNodeInserted ', '.elementor-control-layout_select', function(){
|
180 |
+
disableListLocation( $(this).find( 'select' ).val() );
|
181 |
+
|
182 |
+
$(this).find( 'select' ).on( 'change', function() {
|
183 |
+
disableListLocation( $(this).val() );
|
184 |
+
} );
|
185 |
+
});
|
186 |
+
|
187 |
+
// Render Grid Elements
|
188 |
+
panel.$el.find('#elementor-controls').on( 'DOMNodeInserted ', '.elementor-control-grid_elements', function() {
|
189 |
+
|
190 |
+
$(this).find( '.elementor-control-element_select select' ).on( 'change', function() {
|
191 |
+
var wrapper = $(this).closest( '.elementor-repeater-row-controls' );
|
192 |
+
|
193 |
+
if ( 'lightbox' === $(this).val() ) {
|
194 |
+
wrapper.find('.elementor-control-element_location').find( 'select' ).val( 'over' ).trigger( 'change' );
|
195 |
+
wrapper.find('.elementor-control-element_animation').find( 'select' ).val( 'fade-in' ).trigger( 'change' );
|
196 |
+
wrapper.find('.elementor-control-element_align_hr').find( 'input' ).eq(1).prop('checked',true).trigger( 'change' );
|
197 |
+
wrapper.find('.elementor-control-element_lightbox_overlay').find( 'input' ).prop('checked',true).trigger( 'change' );
|
198 |
+
wrapper.find('.elementor-control-element_extra_icon_pos').find( 'select' ).val( 'before' ).trigger( 'change' );
|
199 |
+
setTimeout(function() {
|
200 |
+
wrapper.find('.elementor-control-element_extra_icon_pos').addClass( 'elementor-hidden-control' );
|
201 |
+
}, 100 );
|
202 |
+
} else {
|
203 |
+
wrapper.find('.elementor-control-element_extra_text_pos').find( 'select' ).val( 'none' ).trigger( 'change' );
|
204 |
+
wrapper.find('.elementor-control-element_extra_icon_pos').find( 'select' ).val( 'none' ).trigger( 'change' );
|
205 |
+
wrapper.find('.elementor-control-element_extra_icon_pos').removeClass( 'elementor-hidden-control' );
|
206 |
+
}
|
207 |
+
} );
|
208 |
+
});
|
209 |
+
|
210 |
+
var sOffsets = {};
|
211 |
+
|
212 |
+
// Prevent Bubble on Click
|
213 |
+
panel.$el.find('#elementor-controls').on( 'DOMNodeInserted ', '.elementor-control-type-section', function() {
|
214 |
+
var current = $(this),
|
215 |
+
attrClass = current.attr( 'class' ),
|
216 |
+
firstIndex = attrClass.indexOf( 'elementor-control-section_' ),
|
217 |
+
lastIndex = attrClass.indexOf( 'elementor-control-type-section' ) - 1;
|
218 |
+
|
219 |
+
var oKey = attrClass.substring( firstIndex, lastIndex ),
|
220 |
+
oProperty = current.offset().top;
|
221 |
+
|
222 |
+
sOffsets[oKey] = oProperty;
|
223 |
+
|
224 |
+
setTimeout(function() {
|
225 |
+
current.on( 'click', function( event ) {
|
226 |
+
var current = $(this),
|
227 |
+
attrClass = current.attr( 'class' ),
|
228 |
+
firstIndex = attrClass.indexOf( 'elementor-control-section_' ),
|
229 |
+
lastIndex = attrClass.indexOf( 'elementor-control-type-section' ) - 1,
|
230 |
+
sectionClass = attrClass.substring( firstIndex, lastIndex );
|
231 |
+
|
232 |
+
setTimeout( function() {
|
233 |
+
$( '#elementor-panel-content-wrapper' ).scrollTop( sOffsets[sectionClass] - 100 );
|
234 |
+
}, 10 );
|
235 |
+
});
|
236 |
+
}, 100 );
|
237 |
+
});
|
238 |
+
} );
|
239 |
+
|
240 |
+
// Image Grid
|
241 |
+
elementor.hooks.addAction( 'panel/open_editor/widget/wpr-media-grid', function( panel, model, view ) {
|
242 |
+
// Render Grid Elements
|
243 |
+
panel.$el.find('#elementor-controls').on( 'DOMNodeInserted ', '.elementor-control-grid_elements', function() {
|
244 |
+
$(this).find( '.elementor-control-element_select select' ).on( 'change', function() {
|
245 |
+
var wrapper = $(this).closest( '.elementor-repeater-row-controls' );
|
246 |
+
|
247 |
+
if ( 'lightbox' === $(this).val() ) {
|
248 |
+
wrapper.find('.elementor-control-element_location').find( 'select' ).val( 'over' ).trigger( 'change' );
|
249 |
+
wrapper.find('.elementor-control-element_animation').find( 'select' ).val( 'fade-in' ).trigger( 'change' );
|
250 |
+
wrapper.find('.elementor-control-element_align_hr').find( 'input' ).eq(1).prop('checked',true).trigger( 'change' );
|
251 |
+
wrapper.find('.elementor-control-element_lightbox_overlay').find( 'input' ).prop('checked',true).trigger( 'change' );
|
252 |
+
wrapper.find('.elementor-control-element_extra_icon_pos').find( 'select' ).val( 'before' ).trigger( 'change' );
|
253 |
+
setTimeout(function() {
|
254 |
+
wrapper.find('.elementor-control-element_extra_icon_pos').addClass( 'elementor-hidden-control' );
|
255 |
+
}, 100 );
|
256 |
+
} else {
|
257 |
+
wrapper.find('.elementor-control-element_extra_text_pos').find( 'select' ).val( 'none' ).trigger( 'change' );
|
258 |
+
wrapper.find('.elementor-control-element_extra_icon_pos').find( 'select' ).val( 'none' ).trigger( 'change' );
|
259 |
+
wrapper.find('.elementor-control-element_extra_icon_pos').removeClass( 'elementor-hidden-control' );
|
260 |
+
}
|
261 |
+
} );
|
262 |
+
});
|
263 |
+
} );
|
264 |
+
|
265 |
+
// Woo Grid
|
266 |
+
elementor.hooks.addAction( 'panel/open_editor/widget/wpr-woo-grid', function( panel, model, view ) {
|
267 |
+
// Render Grid Elements
|
268 |
+
panel.$el.find('#elementor-controls').on( 'DOMNodeInserted ', '.elementor-control-grid_elements', function() {
|
269 |
+
$(this).find( '.elementor-control-element_select select' ).on( 'change', function() {
|
270 |
+
var wrapper = $(this).closest( '.elementor-repeater-row-controls' );
|
271 |
+
|
272 |
+
if ( 'lightbox' === $(this).val() ) {
|
273 |
+
wrapper.find('.elementor-control-element_location').find( 'select' ).val( 'over' ).trigger( 'change' );
|
274 |
+
wrapper.find('.elementor-control-element_animation').find( 'select' ).val( 'fade-in' ).trigger( 'change' );
|
275 |
+
wrapper.find('.elementor-control-element_align_hr').find( 'input' ).eq(1).prop('checked',true).trigger( 'change' );
|
276 |
+
wrapper.find('.elementor-control-element_lightbox_overlay').find( 'input' ).prop('checked',true).trigger( 'change' );
|
277 |
+
wrapper.find('.elementor-control-element_extra_icon_pos').find( 'select' ).val( 'before' ).trigger( 'change' );
|
278 |
+
setTimeout(function() {
|
279 |
+
wrapper.find('.elementor-control-element_extra_icon_pos').addClass( 'elementor-hidden-control' );
|
280 |
+
}, 100 );
|
281 |
+
} else {
|
282 |
+
wrapper.find('.elementor-control-element_extra_text_pos').find( 'select' ).val( 'none' ).trigger( 'change' );
|
283 |
+
wrapper.find('.elementor-control-element_extra_icon_pos').find( 'select' ).val( 'none' ).trigger( 'change' );
|
284 |
+
wrapper.find('.elementor-control-element_extra_icon_pos').removeClass( 'elementor-hidden-control' );
|
285 |
+
}
|
286 |
+
} );
|
287 |
+
});
|
288 |
+
|
289 |
+
var sOffsets = {};
|
290 |
+
|
291 |
+
// Prevent Bubble on Click - not working - //tmp
|
292 |
+
panel.$el.find('#elementor-controls').on( 'DOMNodeInserted ', '.elementor-control-type-section', function() {
|
293 |
+
var current = $(this),
|
294 |
+
attrClass = current.attr( 'class' ),
|
295 |
+
firstIndex = attrClass.indexOf( 'elementor-control-section_' ),
|
296 |
+
lastIndex = attrClass.indexOf( 'elementor-control-type-section' ) - 1;
|
297 |
+
|
298 |
+
var oKey = attrClass.substring( firstIndex, lastIndex ),
|
299 |
+
oPropery = current.offset().top;
|
300 |
+
|
301 |
+
sOffsets[oKey] = oPropery;
|
302 |
+
|
303 |
+
setTimeout(function() {
|
304 |
+
current.on( 'click', function( event ) {
|
305 |
+
var current = $(this),
|
306 |
+
attrClass = current.attr( 'class' ),
|
307 |
+
firstIndex = attrClass.indexOf( 'elementor-control-section_' ),
|
308 |
+
lastIndex = attrClass.indexOf( 'elementor-control-type-section' ) - 1,
|
309 |
+
sectionClass = attrClass.substring( firstIndex, lastIndex );
|
310 |
+
|
311 |
+
setTimeout( function() {
|
312 |
+
$( '#elementor-panel-content-wrapper' ).scrollTop( sOffsets[sectionClass] - 100 );
|
313 |
+
}, 10 );
|
314 |
+
});
|
315 |
+
}, 100 );
|
316 |
+
});
|
317 |
+
} );
|
318 |
+
|
319 |
+
// Get Referrer Link
|
320 |
+
var referrer = document.referrer;
|
321 |
+
|
322 |
+
// Return to Plugin Page
|
323 |
+
if ( '' !== referrer && referrer.indexOf( 'page=wpr-addons' ) > -1 ) {
|
324 |
+
$(window).on( 'load', function() {
|
325 |
+
|
326 |
+
$('#elementor-panel-header-menu-button').on( 'click', function() {
|
327 |
+
|
328 |
+
setTimeout(function() {
|
329 |
+
$('.elementor-panel-menu-item-exit-to-dashboard').on( 'click', function() {
|
330 |
+
window.location.href = referrer;
|
331 |
+
});
|
332 |
+
}, 300);
|
333 |
+
});
|
334 |
+
});
|
335 |
+
}
|
336 |
+
|
337 |
+
// Advanced Slider - TODO: Check if necessary or remove
|
338 |
+
// elementor.hooks.addAction( 'panel/open_editor/widget/wpr-advanced-slider', function( panel, model, view ) {
|
339 |
+
// var elControls = panel.$el,
|
340 |
+
// $select = elControls.find('.elementor-control-slider_content_type').find('select');
|
341 |
+
|
342 |
+
// if ( 'custom' !== $select.val() ) {
|
343 |
+
// elControls.find('.elementor-control-slider_items .elementor-repeater-row-controls .elementor-control').addClass('wpr-elementor-hidden-control');
|
344 |
+
// elControls.find('.elementor-control-slider_content_type').removeClass('wpr-elementor-hidden-control');
|
345 |
+
// elControls.find('.elementor-control-slider_select_template').removeClass('wpr-elementor-hidden-control');
|
346 |
+
// } else {
|
347 |
+
// elControls.find('.elementor-control-slider_items .elementor-repeater-row-controls .elementor-control').removeClass('wpr-elementor-hidden-control');
|
348 |
+
// elControls.find('.elementor-control-slider_select_template').addClass('wpr-elementor-hidden-control');
|
349 |
+
// }
|
350 |
+
|
351 |
+
// $select.on( 'change', function() {
|
352 |
+
|
353 |
+
// if ( 'custom' !== $(this).val() ) {
|
354 |
+
// elControls.find('.elementor-control-slider_items .elementor-repeater-row-controls .elementor-control').addClass('wpr-elementor-hidden-control');
|
355 |
+
// elControls.find('.elementor-control-slider_content_type').removeClass('wpr-elementor-hidden-control');
|
356 |
+
// elControls.find('.elementor-control-slider_select_template').removeClass('wpr-elementor-hidden-control');
|
357 |
+
// } else {
|
358 |
+
// elControls.find('.elementor-control-slider_items .elementor-repeater-row-controls .elementor-control').removeClass('wpr-elementor-hidden-control');
|
359 |
+
// elControls.find('.elementor-control-slider_select_template').addClass('wpr-elementor-hidden-control');
|
360 |
+
// }
|
361 |
+
// });
|
362 |
+
// } );
|
363 |
+
|
364 |
+
/*--------------------------------------------------------------
|
365 |
+
== Widget Preview and Library buttons
|
366 |
+
--------------------------------------------------------------*/
|
367 |
+
|
368 |
+
for (const [key, value] of Object.entries(registered_modules)) {
|
369 |
+
elementor.hooks.addAction( 'panel/open_editor/widget/wpr-'+ value[0], function( panel, model, view ) {
|
370 |
+
openPedefinedStyles( panel.$el, view.$el, value[0], value[1], value[2] );
|
371 |
+
} );
|
372 |
+
}
|
373 |
+
|
374 |
+
function openPedefinedStyles( panel, preview, widget, url, filter ) {
|
375 |
+
panel.on( 'click', '.elementor-control-wpr_library_buttons .elementor-control-raw-html div a:first-child', function() {
|
376 |
+
var theme = $(this).data('theme');
|
377 |
+
$(this).attr('href', url +'?ref=rea-plugin-panel-'+ widget +'-utmtr'+ theme.slice(0,3) +'nkbs'+ theme.slice(3,theme.length) +'-preview'+ filter);
|
378 |
+
});
|
379 |
+
|
380 |
+
panel.on( 'click', '.elementor-control-wpr_library_buttons .elementor-control-raw-html div a:last-child', function() {
|
381 |
+
preview.closest('body').find('#wpr-library-btn').attr('data-filter', widget);
|
382 |
+
preview.closest('body').find('#wpr-library-btn').trigger('click');
|
383 |
+
});
|
384 |
+
}
|
385 |
+
|
386 |
}( jQuery ) );
|
assets/js/editor.min.js
CHANGED
@@ -1,490 +1,490 @@
|
|
1 |
-
( function( $ ) {//TODO: manage comments
|
2 |
-
|
3 |
-
"use strict";
|
4 |
-
|
5 |
-
var panelMutationObserver = new MutationObserver(function(mutations) {
|
6 |
-
// Elementor Search Input
|
7 |
-
if ( $('#elementor-panel-elements-search-input').length ) {
|
8 |
-
var searchTimeout = null;
|
9 |
-
|
10 |
-
$('#elementor-panel-elements-search-input').on( 'keyup', function(e) {
|
11 |
-
if ( e.which === 13 ) {
|
12 |
-
return false;
|
13 |
-
}
|
14 |
-
|
15 |
-
if (searchTimeout != null) {
|
16 |
-
clearTimeout(searchTimeout);
|
17 |
-
}
|
18 |
-
|
19 |
-
searchTimeout = setTimeout(function() {
|
20 |
-
searchTimeout = null;
|
21 |
-
|
22 |
-
var searchVal = $('#elementor-panel-elements-search-input').val();
|
23 |
-
|
24 |
-
if ( searchVal.includes('par') && $('.wpr-elementor-search-notice').length < 1 ) {
|
25 |
-
$('#elementor-panel-elements-wrapper').prepend('\
|
26 |
-
<div class="wpr-elementor-search-notice">\
|
27 |
-
<strong>Parallax Background</strong> is only available for the Section elements. <strong>Edit any section</strong> > <strong>"Styles"</strong> tab > <strong>"Parallax - Royal Addons"</strong>.\
|
28 |
-
</div>\
|
29 |
-
');
|
30 |
-
}
|
31 |
-
|
32 |
-
elementorCommon.ajax.addRequest( 'wpr_elementor_search_data', {
|
33 |
-
data: {
|
34 |
-
search_query: searchVal,
|
35 |
-
},
|
36 |
-
success: function() {
|
37 |
-
// console.log(searchVal);
|
38 |
-
}
|
39 |
-
});
|
40 |
-
}, 1000);
|
41 |
-
});
|
42 |
-
}
|
43 |
-
|
44 |
-
// Promote Premium Widgets
|
45 |
-
if ( $('#elementor-panel-category-wpr-widgets').length ) {
|
46 |
-
$('.elementor-element--promotion').on('click', function() {
|
47 |
-
var dialogButton = $('.dialog-button');
|
48 |
-
dialogButton.hide();
|
49 |
-
|
50 |
-
if ( $(this).find('.wpr-icon').length ) {
|
51 |
-
var url = '',
|
52 |
-
title = $(this).find('.title').text();
|
53 |
-
|
54 |
-
if ( title === 'My Account') {
|
55 |
-
url += 'https://demosites.royal-elementor-addons.com/fashion-v1/my-account-fashion-v1/?ref=rea-plugin-panel-pro-widgets-myacc-seeitinaction';
|
56 |
-
} else if ( title === 'Woo Category Grid') {
|
57 |
-
url += 'https://demosites.royal-elementor-addons.com/fashion-v1/?ref=rea-plugin-panel-pro-widgets-catgrid-seeitinaction#catgridprev';
|
58 |
-
} else if ( title === 'Product Filters') {
|
59 |
-
url += 'https://demosites.royal-elementor-addons.com/fashion-v1/shop-fashion-v1/?ref=rea-plugin-panel-pro-widgets-prodfilters-seeitinaction';
|
60 |
-
} else if ( title === 'Product Breadcrumbs') {
|
61 |
-
url += 'https://demosites.royal-elementor-addons.com/fashion-v1/product/mans-bluish-hoodie/?ref=rea-plugin-panel-pro-widgets-breadcru-seeitinaction';
|
62 |
-
}
|
63 |
-
|
64 |
-
if ( !dialogButton.next('a').length ) {
|
65 |
-
dialogButton.after('<a href="'+ url +'" target="_blank" class="dialog-button elementor-button elementor-button-success">See it in action</a>');
|
66 |
-
dialogButton.next('a').css('display','block');
|
67 |
-
} else {
|
68 |
-
dialogButton.next('a').attr('href', url);
|
69 |
-
dialogButton.next('a').css('display','block');
|
70 |
-
}
|
71 |
-
} else {
|
72 |
-
dialogButton.show();
|
73 |
-
dialogButton.next('a').hide();
|
74 |
-
}
|
75 |
-
});
|
76 |
-
}
|
77 |
-
|
78 |
-
});
|
79 |
-
|
80 |
-
// Listen to Elementor Panel Changes
|
81 |
-
panelMutationObserver.observe($('#elementor-panel')[0], {
|
82 |
-
childList: true,
|
83 |
-
subtree: true,
|
84 |
-
});
|
85 |
-
|
86 |
-
// Make our custom css visible in the panel's front-end
|
87 |
-
elementor.hooks.addFilter( 'editor/style/styleText', function( css, context ) {
|
88 |
-
if ( ! context ) {
|
89 |
-
return;
|
90 |
-
}
|
91 |
-
|
92 |
-
var model = context.model,
|
93 |
-
customCSS = model.get('settings').get('wpr_custom_css');
|
94 |
-
var selector = '.elementor-element.elementor-element-' + model.get('id');
|
95 |
-
|
96 |
-
if ( 'document' === model.get('elType') ) {
|
97 |
-
selector = elementor.config.document.settings.cssWrapperSelector;
|
98 |
-
}
|
99 |
-
|
100 |
-
if ( customCSS ) {
|
101 |
-
css += customCSS.replace(/selector/g, selector);
|
102 |
-
}
|
103 |
-
|
104 |
-
return css;
|
105 |
-
});
|
106 |
-
|
107 |
-
// Shortcode Widget: Select Template
|
108 |
-
function selectShortcodeTemplate( model, e, select, textarea ) {
|
109 |
-
var shortcode = model.attributes.settings.attributes.shortcode,
|
110 |
-
shortcode = shortcode.replace ( /[^\d.]/g, '' );
|
111 |
-
|
112 |
-
if ( shortcode === select.val() ) {
|
113 |
-
return;
|
114 |
-
}
|
115 |
-
|
116 |
-
// Update Settings
|
117 |
-
model.attributes.settings.attributes.shortcode = '[wpr-template id="'+ select.val() +'"]';
|
118 |
-
|
119 |
-
// Update Textarea
|
120 |
-
textarea.val('[wpr-template id="'+ select.val() +'"]');
|
121 |
-
|
122 |
-
// Refresh Preview
|
123 |
-
model.renderRemoteServer();
|
124 |
-
}
|
125 |
-
|
126 |
-
elementor.hooks.addAction( 'panel/open_editor/widget/shortcode', function( panel, model, view ) {
|
127 |
-
|
128 |
-
var $select = panel.$el.find('.elementor-control-type-wpr-ajaxselect2'),
|
129 |
-
$textarea = panel.$el.find('.elementor-control-type-textarea').find('textarea');
|
130 |
-
|
131 |
-
// Change
|
132 |
-
$select.on( 'select2:select', function( e ) {
|
133 |
-
selectShortcodeTemplate( model, e, $select, $textarea );
|
134 |
-
});
|
135 |
-
|
136 |
-
// Render
|
137 |
-
panel.$el.find('#elementor-controls').on( 'DOMNodeInserted ', '.elementor-control-type-wpr-ajaxselect2', function(){
|
138 |
-
$(this).find( 'select' ).on( 'select2:select', function( e ) {
|
139 |
-
selectShortcodeTemplate( model, e, $select, $textarea );
|
140 |
-
} );
|
141 |
-
});
|
142 |
-
} );
|
143 |
-
|
144 |
-
// WPR Grid Widget: Select Element (Filter Taxonomies)
|
145 |
-
function filterGridTaxonomies( data, value ) {
|
146 |
-
var options = [];
|
147 |
-
|
148 |
-
for ( var key in data ) {
|
149 |
-
if ( key !== value ) {
|
150 |
-
for ( var i = 0; i < data[key].length; i++ ) {
|
151 |
-
options.push( '.elementor-control-element_select select option[value="'+ data[key][i] +'"]' );
|
152 |
-
}
|
153 |
-
}
|
154 |
-
}
|
155 |
-
|
156 |
-
// Reset
|
157 |
-
$( 'head' ).find( '#element_select_filter_style' ).remove();
|
158 |
-
|
159 |
-
if ( 'related' === value || 'current' === value ) {
|
160 |
-
return;
|
161 |
-
}
|
162 |
-
|
163 |
-
// Append Styles
|
164 |
-
$( 'head' ).append('<style id="element_select_filter_style">'+ options.join(',') +' { display: none !important; }</style>');
|
165 |
-
}
|
166 |
-
|
167 |
-
// WPR Grid Widget: Post Meta Keys (Filter by Query)
|
168 |
-
function filterGridMetaKeys( data, value ) {
|
169 |
-
var options = [];
|
170 |
-
|
171 |
-
for ( var key in data ) {
|
172 |
-
if ( key !== value ) {
|
173 |
-
for ( var i = 0; i < data[key].length; i++ ) {
|
174 |
-
options.push( '.select2-results__options li[data-select2-id*="-'+ data[key][i] +'"]' );
|
175 |
-
}
|
176 |
-
}
|
177 |
-
}
|
178 |
-
|
179 |
-
// Reset
|
180 |
-
$( 'head' ).find( '#post_meta_keys_filter_style' ).remove();
|
181 |
-
|
182 |
-
// Append Styles
|
183 |
-
$( 'head' ).append('<style id="post_meta_keys_filter_style">'+ options.join(',') +' { display: none !important; }</style>');
|
184 |
-
}
|
185 |
-
|
186 |
-
// WPR Grid Widget / List style: Element Location
|
187 |
-
function disableListLocation( value ) {
|
188 |
-
// Reset
|
189 |
-
$( 'head' ).find( '#list_element_location_style' ).remove();
|
190 |
-
|
191 |
-
if ( 'list' !== value ) {
|
192 |
-
return;
|
193 |
-
}
|
194 |
-
|
195 |
-
// Append Styles
|
196 |
-
$( 'head' ).append('<style id="list_element_location_style">.elementor-control-element_location option[value="above"] { display: none !important; }</style>');
|
197 |
-
}
|
198 |
-
|
199 |
-
// Grid
|
200 |
-
elementor.hooks.addAction( 'panel/open_editor/widget/wpr-grid', function( panel, model, view ) {
|
201 |
-
var $querySource = panel.$el.find('.elementor-control-query_source').find( 'select' ),
|
202 |
-
taxonomies = JSON.parse( panel.$el.find('.elementor-control-element_select_filter').find('input').val() ),
|
203 |
-
metaKeys = JSON.parse( panel.$el.find('.elementor-control-post_meta_keys_filter').find('input').val() );
|
204 |
-
|
205 |
-
// Open
|
206 |
-
filterGridTaxonomies( taxonomies, $querySource.val() );
|
207 |
-
filterGridMetaKeys( metaKeys, $querySource.val() );
|
208 |
-
|
209 |
-
// Change
|
210 |
-
$querySource.on( 'change', function() {
|
211 |
-
filterGridTaxonomies( taxonomies, $(this).val() );
|
212 |
-
filterGridMetaKeys( metaKeys, $(this).val() );
|
213 |
-
});
|
214 |
-
|
215 |
-
// Render Query Source
|
216 |
-
panel.$el.find('#elementor-controls').on( 'DOMNodeInserted ', '.elementor-control-query_source', function(){
|
217 |
-
$(this).find( 'select' ).on( 'change', function() {
|
218 |
-
filterGridTaxonomies( taxonomies, $(this).val() );
|
219 |
-
filterGridMetaKeys( metaKeys, $(this).val() );
|
220 |
-
} );
|
221 |
-
});
|
222 |
-
|
223 |
-
// Render Layout Select
|
224 |
-
panel.$el.find('#elementor-controls').on( 'DOMNodeInserted ', '.elementor-control-layout_select', function(){
|
225 |
-
disableListLocation( $(this).find( 'select' ).val() );
|
226 |
-
|
227 |
-
$(this).find( 'select' ).on( 'change', function() {
|
228 |
-
disableListLocation( $(this).val() );
|
229 |
-
} );
|
230 |
-
});
|
231 |
-
|
232 |
-
// Render Grid Elements
|
233 |
-
panel.$el.find('#elementor-controls').on( 'DOMNodeInserted ', '.elementor-control-grid_elements', function() {
|
234 |
-
|
235 |
-
$(this).find( '.elementor-control-element_select select' ).on( 'change', function() {
|
236 |
-
var wrapper = $(this).closest( '.elementor-repeater-row-controls' );
|
237 |
-
|
238 |
-
if ( 'lightbox' === $(this).val() ) {
|
239 |
-
wrapper.find('.elementor-control-element_location').find( 'select' ).val( 'over' ).trigger( 'change' );
|
240 |
-
wrapper.find('.elementor-control-element_animation').find( 'select' ).val( 'fade-in' ).trigger( 'change' );
|
241 |
-
wrapper.find('.elementor-control-element_align_hr').find( 'input' ).eq(1).prop('checked',true).trigger( 'change' );
|
242 |
-
wrapper.find('.elementor-control-element_lightbox_overlay').find( 'input' ).prop('checked',true).trigger( 'change' );
|
243 |
-
wrapper.find('.elementor-control-element_extra_icon_pos').find( 'select' ).val( 'before' ).trigger( 'change' );
|
244 |
-
setTimeout(function() {
|
245 |
-
wrapper.find('.elementor-control-element_extra_icon_pos').addClass( 'elementor-hidden-control' );
|
246 |
-
}, 100 );
|
247 |
-
} else {
|
248 |
-
wrapper.find('.elementor-control-element_extra_text_pos').find( 'select' ).val( 'none' ).trigger( 'change' );
|
249 |
-
wrapper.find('.elementor-control-element_extra_icon_pos').find( 'select' ).val( 'none' ).trigger( 'change' );
|
250 |
-
wrapper.find('.elementor-control-element_extra_icon_pos').removeClass( 'elementor-hidden-control' );
|
251 |
-
}
|
252 |
-
} );
|
253 |
-
});
|
254 |
-
|
255 |
-
var sOffsets = {};
|
256 |
-
|
257 |
-
// Prevent Bubble on Click
|
258 |
-
panel.$el.find('#elementor-controls').on( 'DOMNodeInserted ', '.elementor-control-type-section', function() {
|
259 |
-
var current = $(this),
|
260 |
-
attrClass = current.attr( 'class' ),
|
261 |
-
firstIndex = attrClass.indexOf( 'elementor-control-section_' ),
|
262 |
-
lastIndex = attrClass.indexOf( 'elementor-control-type-section' ) - 1;
|
263 |
-
|
264 |
-
var oKey = attrClass.substring( firstIndex, lastIndex ),
|
265 |
-
oProperty = current.offset().top;
|
266 |
-
|
267 |
-
sOffsets[oKey] = oProperty;
|
268 |
-
|
269 |
-
setTimeout(function() {
|
270 |
-
current.on( 'click', function( event ) {
|
271 |
-
var current = $(this),
|
272 |
-
attrClass = current.attr( 'class' ),
|
273 |
-
firstIndex = attrClass.indexOf( 'elementor-control-section_' ),
|
274 |
-
lastIndex = attrClass.indexOf( 'elementor-control-type-section' ) - 1,
|
275 |
-
sectionClass = attrClass.substring( firstIndex, lastIndex );
|
276 |
-
|
277 |
-
setTimeout( function() {
|
278 |
-
$( '#elementor-panel-content-wrapper' ).scrollTop( sOffsets[sectionClass] - 100 );
|
279 |
-
}, 10 );
|
280 |
-
});
|
281 |
-
}, 100 );
|
282 |
-
});
|
283 |
-
} );
|
284 |
-
|
285 |
-
// Image Grid
|
286 |
-
elementor.hooks.addAction( 'panel/open_editor/widget/wpr-media-grid', function( panel, model, view ) {
|
287 |
-
// Render Grid Elements
|
288 |
-
panel.$el.find('#elementor-controls').on( 'DOMNodeInserted ', '.elementor-control-grid_elements', function() {
|
289 |
-
$(this).find( '.elementor-control-element_select select' ).on( 'change', function() {
|
290 |
-
var wrapper = $(this).closest( '.elementor-repeater-row-controls' );
|
291 |
-
|
292 |
-
if ( 'lightbox' === $(this).val() ) {
|
293 |
-
wrapper.find('.elementor-control-element_location').find( 'select' ).val( 'over' ).trigger( 'change' );
|
294 |
-
wrapper.find('.elementor-control-element_animation').find( 'select' ).val( 'fade-in' ).trigger( 'change' );
|
295 |
-
wrapper.find('.elementor-control-element_align_hr').find( 'input' ).eq(1).prop('checked',true).trigger( 'change' );
|
296 |
-
wrapper.find('.elementor-control-element_lightbox_overlay').find( 'input' ).prop('checked',true).trigger( 'change' );
|
297 |
-
wrapper.find('.elementor-control-element_extra_icon_pos').find( 'select' ).val( 'before' ).trigger( 'change' );
|
298 |
-
setTimeout(function() {
|
299 |
-
wrapper.find('.elementor-control-element_extra_icon_pos').addClass( 'elementor-hidden-control' );
|
300 |
-
}, 100 );
|
301 |
-
} else {
|
302 |
-
wrapper.find('.elementor-control-element_extra_text_pos').find( 'select' ).val( 'none' ).trigger( 'change' );
|
303 |
-
wrapper.find('.elementor-control-element_extra_icon_pos').find( 'select' ).val( 'none' ).trigger( 'change' );
|
304 |
-
wrapper.find('.elementor-control-element_extra_icon_pos').removeClass( 'elementor-hidden-control' );
|
305 |
-
}
|
306 |
-
} );
|
307 |
-
});
|
308 |
-
} );
|
309 |
-
|
310 |
-
// Woo Grid
|
311 |
-
elementor.hooks.addAction( 'panel/open_editor/widget/wpr-woo-grid', function( panel, model, view ) {
|
312 |
-
// Render Grid Elements
|
313 |
-
panel.$el.find('#elementor-controls').on( 'DOMNodeInserted ', '.elementor-control-grid_elements', function() {
|
314 |
-
$(this).find( '.elementor-control-element_select select' ).on( 'change', function() {
|
315 |
-
var wrapper = $(this).closest( '.elementor-repeater-row-controls' );
|
316 |
-
|
317 |
-
if ( 'lightbox' === $(this).val() ) {
|
318 |
-
wrapper.find('.elementor-control-element_location').find( 'select' ).val( 'over' ).trigger( 'change' );
|
319 |
-
wrapper.find('.elementor-control-element_animation').find( 'select' ).val( 'fade-in' ).trigger( 'change' );
|
320 |
-
wrapper.find('.elementor-control-element_align_hr').find( 'input' ).eq(1).prop('checked',true).trigger( 'change' );
|
321 |
-
wrapper.find('.elementor-control-element_lightbox_overlay').find( 'input' ).prop('checked',true).trigger( 'change' );
|
322 |
-
wrapper.find('.elementor-control-element_extra_icon_pos').find( 'select' ).val( 'before' ).trigger( 'change' );
|
323 |
-
setTimeout(function() {
|
324 |
-
wrapper.find('.elementor-control-element_extra_icon_pos').addClass( 'elementor-hidden-control' );
|
325 |
-
}, 100 );
|
326 |
-
} else {
|
327 |
-
wrapper.find('.elementor-control-element_extra_text_pos').find( 'select' ).val( 'none' ).trigger( 'change' );
|
328 |
-
wrapper.find('.elementor-control-element_extra_icon_pos').find( 'select' ).val( 'none' ).trigger( 'change' );
|
329 |
-
wrapper.find('.elementor-control-element_extra_icon_pos').removeClass( 'elementor-hidden-control' );
|
330 |
-
}
|
331 |
-
} );
|
332 |
-
});
|
333 |
-
|
334 |
-
var sOffsets = {};
|
335 |
-
|
336 |
-
// Prevent Bubble on Click - not working - //tmp
|
337 |
-
panel.$el.find('#elementor-controls').on( 'DOMNodeInserted ', '.elementor-control-type-section', function() {
|
338 |
-
var current = $(this),
|
339 |
-
attrClass = current.attr( 'class' ),
|
340 |
-
firstIndex = attrClass.indexOf( 'elementor-control-section_' ),
|
341 |
-
lastIndex = attrClass.indexOf( 'elementor-control-type-section' ) - 1;
|
342 |
-
|
343 |
-
var oKey = attrClass.substring( firstIndex, lastIndex ),
|
344 |
-
oPropery = current.offset().top;
|
345 |
-
|
346 |
-
sOffsets[oKey] = oPropery;
|
347 |
-
|
348 |
-
setTimeout(function() {
|
349 |
-
current.on( 'click', function( event ) {
|
350 |
-
var current = $(this),
|
351 |
-
attrClass = current.attr( 'class' ),
|
352 |
-
firstIndex = attrClass.indexOf( 'elementor-control-section_' ),
|
353 |
-
lastIndex = attrClass.indexOf( 'elementor-control-type-section' ) - 1,
|
354 |
-
sectionClass = attrClass.substring( firstIndex, lastIndex );
|
355 |
-
|
356 |
-
setTimeout( function() {
|
357 |
-
$( '#elementor-panel-content-wrapper' ).scrollTop( sOffsets[sectionClass] - 100 );
|
358 |
-
}, 10 );
|
359 |
-
});
|
360 |
-
}, 100 );
|
361 |
-
});
|
362 |
-
} );
|
363 |
-
|
364 |
-
// Refresh Mega Menu
|
365 |
-
elementor.hooks.addAction( 'panel/open_editor/widget/wpr-mega-menu', function( panel, model, view ) {
|
366 |
-
model.renderRemoteServer();
|
367 |
-
});
|
368 |
-
|
369 |
-
// Get Referrer Link
|
370 |
-
var referrer = document.referrer;
|
371 |
-
|
372 |
-
// Return to Plugin Page
|
373 |
-
if ( '' !== referrer && referrer.indexOf( 'page=wpr-addons' ) > -1 ) {
|
374 |
-
$(window).on( 'load', function() {
|
375 |
-
|
376 |
-
$('#elementor-panel-header-menu-button').on( 'click', function() {
|
377 |
-
|
378 |
-
setTimeout(function() {
|
379 |
-
$('.elementor-panel-menu-item-exit-to-dashboard').on( 'click', function() {
|
380 |
-
window.location.href = referrer;
|
381 |
-
});
|
382 |
-
}, 300);
|
383 |
-
});
|
384 |
-
});
|
385 |
-
}
|
386 |
-
|
387 |
-
// Advanced Slider - TODO: Check if necessary or remove
|
388 |
-
// elementor.hooks.addAction( 'panel/open_editor/widget/wpr-advanced-slider', function( panel, model, view ) {
|
389 |
-
// var elControls = panel.$el,
|
390 |
-
// $select = elControls.find('.elementor-control-slider_content_type').find('select');
|
391 |
-
|
392 |
-
// if ( 'custom' !== $select.val() ) {
|
393 |
-
// elControls.find('.elementor-control-slider_items .elementor-repeater-row-controls .elementor-control').addClass('wpr-elementor-hidden-control');
|
394 |
-
// elControls.find('.elementor-control-slider_content_type').removeClass('wpr-elementor-hidden-control');
|
395 |
-
// elControls.find('.elementor-control-slider_select_template').removeClass('wpr-elementor-hidden-control');
|
396 |
-
// } else {
|
397 |
-
// elControls.find('.elementor-control-slider_items .elementor-repeater-row-controls .elementor-control').removeClass('wpr-elementor-hidden-control');
|
398 |
-
// elControls.find('.elementor-control-slider_select_template').addClass('wpr-elementor-hidden-control');
|
399 |
-
// }
|
400 |
-
|
401 |
-
// $select.on( 'change', function() {
|
402 |
-
|
403 |
-
// if ( 'custom' !== $(this).val() ) {
|
404 |
-
// elControls.find('.elementor-control-slider_items .elementor-repeater-row-controls .elementor-control').addClass('wpr-elementor-hidden-control');
|
405 |
-
// elControls.find('.elementor-control-slider_content_type').removeClass('wpr-elementor-hidden-control');
|
406 |
-
// elControls.find('.elementor-control-slider_select_template').removeClass('wpr-elementor-hidden-control');
|
407 |
-
// } else {
|
408 |
-
// elControls.find('.elementor-control-slider_items .elementor-repeater-row-controls .elementor-control').removeClass('wpr-elementor-hidden-control');
|
409 |
-
// elControls.find('.elementor-control-slider_select_template').addClass('wpr-elementor-hidden-control');
|
410 |
-
// }
|
411 |
-
// });
|
412 |
-
// } );
|
413 |
-
|
414 |
-
/*--------------------------------------------------------------
|
415 |
-
== Widget Preview and Library buttons
|
416 |
-
--------------------------------------------------------------*/
|
417 |
-
|
418 |
-
for (const [key, value] of Object.entries(registered_modules)) {
|
419 |
-
elementor.hooks.addAction( 'panel/open_editor/widget/wpr-'+ value[0], function( panel, model, view ) {
|
420 |
-
openPedefinedStyles( panel.$el, view.$el, value[0], value[1], value[2] );
|
421 |
-
} );
|
422 |
-
}
|
423 |
-
|
424 |
-
function openPedefinedStyles( panel, preview, widget, url, filter ) {
|
425 |
-
panel.on( 'click', '.elementor-control-wpr_library_buttons .elementor-control-raw-html div a:first-child', function() {
|
426 |
-
var theme = $(this).data('theme');
|
427 |
-
$(this).attr('href', url +'?ref=rea-plugin-panel-'+ widget +'-utmtr'+ theme.slice(0,3) +'nkbs'+ theme.slice(3,theme.length) +'-preview'+ filter);
|
428 |
-
});
|
429 |
-
|
430 |
-
panel.on( 'click', '.elementor-control-wpr_library_buttons .elementor-control-raw-html div a:last-child', function() {
|
431 |
-
preview.closest('body').find('#wpr-library-btn').attr('data-filter', widget);
|
432 |
-
preview.closest('body').find('#wpr-library-btn').trigger('click');
|
433 |
-
});
|
434 |
-
}
|
435 |
-
|
436 |
-
/*--------------------------------------------------------------
|
437 |
-
== Reload Theme Builder
|
438 |
-
--------------------------------------------------------------*/
|
439 |
-
elementor.once('document:loaded', function(){
|
440 |
-
setTimeout(function(){
|
441 |
-
if ( $('body').hasClass('elementor-editor-wpr-theme-builder') ) {
|
442 |
-
elementor.reloadPreview();
|
443 |
-
}
|
444 |
-
}, 10);
|
445 |
-
});
|
446 |
-
|
447 |
-
}( jQuery ) );
|
448 |
-
|
449 |
-
( function( $ ) {
|
450 |
-
|
451 |
-
'use strict';
|
452 |
-
|
453 |
-
var WprMegaMenuEditor = {
|
454 |
-
|
455 |
-
activeSection: false,
|
456 |
-
|
457 |
-
currentElement: false,
|
458 |
-
|
459 |
-
currentSection: false,
|
460 |
-
|
461 |
-
prevSection: false,
|
462 |
-
|
463 |
-
|
464 |
-
init: function() {
|
465 |
-
elementor.channels.editor.on( 'section:activated', WprMegaMenuEditor.sectionActivated );
|
466 |
-
},
|
467 |
-
|
468 |
-
sectionActivated: function( sectionName, editor ) {
|
469 |
-
|
470 |
-
let currentElement = WprMegaMenuEditor.currentElement = editor.getOption( 'editedElementView' ) || false;
|
471 |
-
|
472 |
-
if ( ! currentElement ) {
|
473 |
-
return;
|
474 |
-
}
|
475 |
-
|
476 |
-
if ( 'wpr-mega-menu' == currentElement.model.get( 'widgetType' ) ) {
|
477 |
-
|
478 |
-
// if ( 'section_general' === sectionName ) {}
|
479 |
-
// currentElement.model.renderRemoteServer();
|
480 |
-
}
|
481 |
-
|
482 |
-
}
|
483 |
-
|
484 |
-
};
|
485 |
-
|
486 |
-
$( window ).on( 'elementor:init', WprMegaMenuEditor.init );
|
487 |
-
|
488 |
-
window.WprMegaMenuEditor = WprMegaMenuEditor;
|
489 |
-
|
490 |
-
}( jQuery ) );
|
1 |
+
( function( $ ) {//TODO: manage comments
|
2 |
+
|
3 |
+
"use strict";
|
4 |
+
|
5 |
+
var panelMutationObserver = new MutationObserver(function(mutations) {
|
6 |
+
// Elementor Search Input
|
7 |
+
if ( $('#elementor-panel-elements-search-input').length ) {
|
8 |
+
var searchTimeout = null;
|
9 |
+
|
10 |
+
$('#elementor-panel-elements-search-input').on( 'keyup', function(e) {
|
11 |
+
if ( e.which === 13 ) {
|
12 |
+
return false;
|
13 |
+
}
|
14 |
+
|
15 |
+
if (searchTimeout != null) {
|
16 |
+
clearTimeout(searchTimeout);
|
17 |
+
}
|
18 |
+
|
19 |
+
searchTimeout = setTimeout(function() {
|
20 |
+
searchTimeout = null;
|
21 |
+
|
22 |
+
var searchVal = $('#elementor-panel-elements-search-input').val();
|
23 |
+
|
24 |
+
if ( searchVal.includes('par') && $('.wpr-elementor-search-notice').length < 1 ) {
|
25 |
+
$('#elementor-panel-elements-wrapper').prepend('\
|
26 |
+
<div class="wpr-elementor-search-notice">\
|
27 |
+
<strong>Parallax Background</strong> is only available for the Section elements. <strong>Edit any section</strong> > <strong>"Styles"</strong> tab > <strong>"Parallax - Royal Addons"</strong>.\
|
28 |
+
</div>\
|
29 |
+
');
|
30 |
+
}
|
31 |
+
|
32 |
+
elementorCommon.ajax.addRequest( 'wpr_elementor_search_data', {
|
33 |
+
data: {
|
34 |
+
search_query: searchVal,
|
35 |
+
},
|
36 |
+
success: function() {
|
37 |
+
// console.log(searchVal);
|
38 |
+
}
|
39 |
+
});
|
40 |
+
}, 1000);
|
41 |
+
});
|
42 |
+
}
|
43 |
+
|
44 |
+
// Promote Premium Widgets
|
45 |
+
if ( $('#elementor-panel-category-wpr-widgets').length ) {
|
46 |
+
$('.elementor-element--promotion').on('click', function() {
|
47 |
+
var dialogButton = $('.dialog-button');
|
48 |
+
dialogButton.hide();
|
49 |
+
|
50 |
+
if ( $(this).find('.wpr-icon').length ) {
|
51 |
+
var url = '',
|
52 |
+
title = $(this).find('.title').text();
|
53 |
+
|
54 |
+
if ( title === 'My Account') {
|
55 |
+
url += 'https://demosites.royal-elementor-addons.com/fashion-v1/my-account-fashion-v1/?ref=rea-plugin-panel-pro-widgets-myacc-seeitinaction';
|
56 |
+
} else if ( title === 'Woo Category Grid') {
|
57 |
+
url += 'https://demosites.royal-elementor-addons.com/fashion-v1/?ref=rea-plugin-panel-pro-widgets-catgrid-seeitinaction#catgridprev';
|
58 |
+
} else if ( title === 'Product Filters') {
|
59 |
+
url += 'https://demosites.royal-elementor-addons.com/fashion-v1/shop-fashion-v1/?ref=rea-plugin-panel-pro-widgets-prodfilters-seeitinaction';
|
60 |
+
} else if ( title === 'Product Breadcrumbs') {
|
61 |
+
url += 'https://demosites.royal-elementor-addons.com/fashion-v1/product/mans-bluish-hoodie/?ref=rea-plugin-panel-pro-widgets-breadcru-seeitinaction';
|
62 |
+
}
|
63 |
+
|
64 |
+
if ( !dialogButton.next('a').length ) {
|
65 |
+
dialogButton.after('<a href="'+ url +'" target="_blank" class="dialog-button elementor-button elementor-button-success">See it in action</a>');
|
66 |
+
dialogButton.next('a').css('display','block');
|
67 |
+
} else {
|
68 |
+
dialogButton.next('a').attr('href', url);
|
69 |
+
dialogButton.next('a').css('display','block');
|
70 |
+
}
|
71 |
+
} else {
|
72 |
+
dialogButton.show();
|
73 |
+
dialogButton.next('a').hide();
|
74 |
+
}
|
75 |
+
});
|
76 |
+
}
|
77 |
+
|
78 |
+
});
|
79 |
+
|
80 |
+
// Listen to Elementor Panel Changes
|
81 |
+
panelMutationObserver.observe($('#elementor-panel')[0], {
|
82 |
+
childList: true,
|
83 |
+
subtree: true,
|
84 |
+
});
|
85 |
+
|
86 |
+
// Make our custom css visible in the panel's front-end
|
87 |
+
elementor.hooks.addFilter( 'editor/style/styleText', function( css, context ) {
|
88 |
+
if ( ! context ) {
|
89 |
+
return;
|
90 |
+
}
|
91 |
+
|
92 |
+
var model = context.model,
|
93 |
+
customCSS = model.get('settings').get('wpr_custom_css');
|
94 |
+
var selector = '.elementor-element.elementor-element-' + model.get('id');
|
95 |
+
|
96 |
+
if ( 'document' === model.get('elType') ) {
|
97 |
+
selector = elementor.config.document.settings.cssWrapperSelector;
|
98 |
+
}
|
99 |
+
|
100 |
+
if ( customCSS ) {
|
101 |
+
css += customCSS.replace(/selector/g, selector);
|
102 |
+
}
|
103 |
+
|
104 |
+
return css;
|
105 |
+
});
|
106 |
+
|
107 |
+
// Shortcode Widget: Select Template
|
108 |
+
function selectShortcodeTemplate( model, e, select, textarea ) {
|
109 |
+
var shortcode = model.attributes.settings.attributes.shortcode,
|
110 |
+
shortcode = shortcode.replace ( /[^\d.]/g, '' );
|
111 |
+
|
112 |
+
if ( shortcode === select.val() ) {
|
113 |
+
return;
|
114 |
+
}
|
115 |
+
|
116 |
+
// Update Settings
|
117 |
+
model.attributes.settings.attributes.shortcode = '[wpr-template id="'+ select.val() +'"]';
|
118 |
+
|
119 |
+
// Update Textarea
|
120 |
+
textarea.val('[wpr-template id="'+ select.val() +'"]');
|
121 |
+
|
122 |
+
// Refresh Preview
|
123 |
+
model.renderRemoteServer();
|
124 |
+
}
|
125 |
+
|
126 |
+
elementor.hooks.addAction( 'panel/open_editor/widget/shortcode', function( panel, model, view ) {
|
127 |
+
|
128 |
+
var $select = panel.$el.find('.elementor-control-type-wpr-ajaxselect2'),
|
129 |
+
$textarea = panel.$el.find('.elementor-control-type-textarea').find('textarea');
|
130 |
+
|
131 |
+
// Change
|
132 |
+
$select.on( 'select2:select', function( e ) {
|
133 |
+
selectShortcodeTemplate( model, e, $select, $textarea );
|
134 |
+
});
|
135 |
+
|
136 |
+
// Render
|
137 |
+
panel.$el.find('#elementor-controls').on( 'DOMNodeInserted ', '.elementor-control-type-wpr-ajaxselect2', function(){
|
138 |
+
$(this).find( 'select' ).on( 'select2:select', function( e ) {
|
139 |
+
selectShortcodeTemplate( model, e, $select, $textarea );
|
140 |
+
} );
|
141 |
+
});
|
142 |
+
} );
|
143 |
+
|
144 |
+
// WPR Grid Widget: Select Element (Filter Taxonomies)
|
145 |
+
function filterGridTaxonomies( data, value ) {
|
146 |
+
var options = [];
|
147 |
+
|
148 |
+
for ( var key in data ) {
|
149 |
+
if ( key !== value ) {
|
150 |
+
for ( var i = 0; i < data[key].length; i++ ) {
|
151 |
+
options.push( '.elementor-control-element_select select option[value="'+ data[key][i] +'"]' );
|
152 |
+
}
|
153 |
+
}
|
154 |
+
}
|
155 |
+
|
156 |
+
// Reset
|
157 |
+
$( 'head' ).find( '#element_select_filter_style' ).remove();
|
158 |
+
|
159 |
+
if ( 'related' === value || 'current' === value ) {
|
160 |
+
return;
|
161 |
+
}
|
162 |
+
|
163 |
+
// Append Styles
|
164 |
+
$( 'head' ).append('<style id="element_select_filter_style">'+ options.join(',') +' { display: none !important; }</style>');
|
165 |
+
}
|
166 |
+
|
167 |
+
// WPR Grid Widget: Post Meta Keys (Filter by Query)
|
168 |
+
function filterGridMetaKeys( data, value ) {
|
169 |
+
var options = [];
|
170 |
+
|
171 |
+
for ( var key in data ) {
|
172 |
+
if ( key !== value ) {
|
173 |
+
for ( var i = 0; i < data[key].length; i++ ) {
|
174 |
+
options.push( '.select2-results__options li[data-select2-id*="-'+ data[key][i] +'"]' );
|
175 |
+
}
|
176 |
+
}
|
177 |
+
}
|
178 |
+
|
179 |
+
// Reset
|
180 |
+
$( 'head' ).find( '#post_meta_keys_filter_style' ).remove();
|
181 |
+
|
182 |
+
// Append Styles
|
183 |
+
$( 'head' ).append('<style id="post_meta_keys_filter_style">'+ options.join(',') +' { display: none !important; }</style>');
|
184 |
+
}
|
185 |
+
|
186 |
+
// WPR Grid Widget / List style: Element Location
|
187 |
+
function disableListLocation( value ) {
|
188 |
+
// Reset
|
189 |
+
$( 'head' ).find( '#list_element_location_style' ).remove();
|
190 |
+
|
191 |
+
if ( 'list' !== value ) {
|
192 |
+
return;
|
193 |
+
}
|
194 |
+
|
195 |
+
// Append Styles
|
196 |
+
$( 'head' ).append('<style id="list_element_location_style">.elementor-control-element_location option[value="above"] { display: none !important; }</style>');
|
197 |
+
}
|
198 |
+
|
199 |
+
// Grid
|
200 |
+
elementor.hooks.addAction( 'panel/open_editor/widget/wpr-grid', function( panel, model, view ) {
|
201 |
+
var $querySource = panel.$el.find('.elementor-control-query_source').find( 'select' ),
|
202 |
+
taxonomies = JSON.parse( panel.$el.find('.elementor-control-element_select_filter').find('input').val() ),
|
203 |
+
metaKeys = JSON.parse( panel.$el.find('.elementor-control-post_meta_keys_filter').find('input').val() );
|
204 |
+
|
205 |
+
// Open
|
206 |
+
filterGridTaxonomies( taxonomies, $querySource.val() );
|
207 |
+
filterGridMetaKeys( metaKeys, $querySource.val() );
|
208 |
+
|
209 |
+
// Change
|
210 |
+
$querySource.on( 'change', function() {
|
211 |
+
filterGridTaxonomies( taxonomies, $(this).val() );
|
212 |
+
filterGridMetaKeys( metaKeys, $(this).val() );
|
213 |
+
});
|
214 |
+
|
215 |
+
// Render Query Source
|
216 |
+
panel.$el.find('#elementor-controls').on( 'DOMNodeInserted ', '.elementor-control-query_source', function(){
|
217 |
+
$(this).find( 'select' ).on( 'change', function() {
|
218 |
+
filterGridTaxonomies( taxonomies, $(this).val() );
|
219 |
+
filterGridMetaKeys( metaKeys, $(this).val() );
|
220 |
+
} );
|
221 |
+
});
|
222 |
+
|
223 |
+
// Render Layout Select
|
224 |
+
panel.$el.find('#elementor-controls').on( 'DOMNodeInserted ', '.elementor-control-layout_select', function(){
|
225 |
+
disableListLocation( $(this).find( 'select' ).val() );
|
226 |
+
|
227 |
+
$(this).find( 'select' ).on( 'change', function() {
|
228 |
+
disableListLocation( $(this).val() );
|
229 |
+
} );
|
230 |
+
});
|
231 |
+
|
232 |
+
// Render Grid Elements
|
233 |
+
panel.$el.find('#elementor-controls').on( 'DOMNodeInserted ', '.elementor-control-grid_elements', function() {
|
234 |
+
|
235 |
+
$(this).find( '.elementor-control-element_select select' ).on( 'change', function() {
|
236 |
+
var wrapper = $(this).closest( '.elementor-repeater-row-controls' );
|
237 |
+
|
238 |
+
if ( 'lightbox' === $(this).val() ) {
|
239 |
+
wrapper.find('.elementor-control-element_location').find( 'select' ).val( 'over' ).trigger( 'change' );
|
240 |
+
wrapper.find('.elementor-control-element_animation').find( 'select' ).val( 'fade-in' ).trigger( 'change' );
|
241 |
+
wrapper.find('.elementor-control-element_align_hr').find( 'input' ).eq(1).prop('checked',true).trigger( 'change' );
|
242 |
+
wrapper.find('.elementor-control-element_lightbox_overlay').find( 'input' ).prop('checked',true).trigger( 'change' );
|
243 |
+
wrapper.find('.elementor-control-element_extra_icon_pos').find( 'select' ).val( 'before' ).trigger( 'change' );
|
244 |
+
setTimeout(function() {
|
245 |
+
wrapper.find('.elementor-control-element_extra_icon_pos').addClass( 'elementor-hidden-control' );
|
246 |
+
}, 100 );
|
247 |
+
} else {
|
248 |
+
wrapper.find('.elementor-control-element_extra_text_pos').find( 'select' ).val( 'none' ).trigger( 'change' );
|
249 |
+
wrapper.find('.elementor-control-element_extra_icon_pos').find( 'select' ).val( 'none' ).trigger( 'change' );
|
250 |
+
wrapper.find('.elementor-control-element_extra_icon_pos').removeClass( 'elementor-hidden-control' );
|
251 |
+
}
|
252 |
+
} );
|
253 |
+
});
|
254 |
+
|
255 |
+
var sOffsets = {};
|
256 |
+
|
257 |
+
// Prevent Bubble on Click
|
258 |
+
panel.$el.find('#elementor-controls').on( 'DOMNodeInserted ', '.elementor-control-type-section', function() {
|
259 |
+
var current = $(this),
|
260 |
+
attrClass = current.attr( 'class' ),
|
261 |
+
firstIndex = attrClass.indexOf( 'elementor-control-section_' ),
|
262 |
+
lastIndex = attrClass.indexOf( 'elementor-control-type-section' ) - 1;
|
263 |
+
|
264 |
+
var oKey = attrClass.substring( firstIndex, lastIndex ),
|
265 |
+
oProperty = current.offset().top;
|
266 |
+
|
267 |
+
sOffsets[oKey] = oProperty;
|
268 |
+
|
269 |
+
setTimeout(function() {
|
270 |
+
current.on( 'click', function( event ) {
|
271 |
+
var current = $(this),
|
272 |
+
attrClass = current.attr( 'class' ),
|
273 |
+
firstIndex = attrClass.indexOf( 'elementor-control-section_' ),
|
274 |
+
lastIndex = attrClass.indexOf( 'elementor-control-type-section' ) - 1,
|
275 |
+
sectionClass = attrClass.substring( firstIndex, lastIndex );
|
276 |
+
|
277 |
+
setTimeout( function() {
|
278 |
+
$( '#elementor-panel-content-wrapper' ).scrollTop( sOffsets[sectionClass] - 100 );
|
279 |
+
}, 10 );
|
280 |
+
});
|
281 |
+
}, 100 );
|
282 |
+
});
|
283 |
+
} );
|
284 |
+
|
285 |
+
// Image Grid
|
286 |
+
elementor.hooks.addAction( 'panel/open_editor/widget/wpr-media-grid', function( panel, model, view ) {
|
287 |
+
// Render Grid Elements
|
288 |
+
panel.$el.find('#elementor-controls').on( 'DOMNodeInserted ', '.elementor-control-grid_elements', function() {
|
289 |
+
$(this).find( '.elementor-control-element_select select' ).on( 'change', function() {
|
290 |
+
var wrapper = $(this).closest( '.elementor-repeater-row-controls' );
|
291 |
+
|
292 |
+
if ( 'lightbox' === $(this).val() ) {
|
293 |
+
wrapper.find('.elementor-control-element_location').find( 'select' ).val( 'over' ).trigger( 'change' );
|
294 |
+
wrapper.find('.elementor-control-element_animation').find( 'select' ).val( 'fade-in' ).trigger( 'change' );
|
295 |
+
wrapper.find('.elementor-control-element_align_hr').find( 'input' ).eq(1).prop('checked',true).trigger( 'change' );
|
296 |
+
wrapper.find('.elementor-control-element_lightbox_overlay').find( 'input' ).prop('checked',true).trigger( 'change' );
|
297 |
+
wrapper.find('.elementor-control-element_extra_icon_pos').find( 'select' ).val( 'before' ).trigger( 'change' );
|
298 |
+
setTimeout(function() {
|
299 |
+
wrapper.find('.elementor-control-element_extra_icon_pos').addClass( 'elementor-hidden-control' );
|
300 |
+
}, 100 );
|
301 |
+
} else {
|
302 |
+
wrapper.find('.elementor-control-element_extra_text_pos').find( 'select' ).val( 'none' ).trigger( 'change' );
|
303 |
+
wrapper.find('.elementor-control-element_extra_icon_pos').find( 'select' ).val( 'none' ).trigger( 'change' );
|
304 |
+
wrapper.find('.elementor-control-element_extra_icon_pos').removeClass( 'elementor-hidden-control' );
|
305 |
+
}
|
306 |
+
} );
|
307 |
+
});
|
308 |
+
} );
|
309 |
+
|
310 |
+
// Woo Grid
|
311 |
+
elementor.hooks.addAction( 'panel/open_editor/widget/wpr-woo-grid', function( panel, model, view ) {
|
312 |
+
// Render Grid Elements
|
313 |
+
panel.$el.find('#elementor-controls').on( 'DOMNodeInserted ', '.elementor-control-grid_elements', function() {
|
314 |
+
$(this).find( '.elementor-control-element_select select' ).on( 'change', function() {
|
315 |
+
var wrapper = $(this).closest( '.elementor-repeater-row-controls' );
|
316 |
+
|
317 |
+
if ( 'lightbox' === $(this).val() ) {
|
318 |
+
wrapper.find('.elementor-control-element_location').find( 'select' ).val( 'over' ).trigger( 'change' );
|
319 |
+
wrapper.find('.elementor-control-element_animation').find( 'select' ).val( 'fade-in' ).trigger( 'change' );
|
320 |
+
wrapper.find('.elementor-control-element_align_hr').find( 'input' ).eq(1).prop('checked',true).trigger( 'change' );
|
321 |
+
wrapper.find('.elementor-control-element_lightbox_overlay').find( 'input' ).prop('checked',true).trigger( 'change' );
|
322 |
+
wrapper.find('.elementor-control-element_extra_icon_pos').find( 'select' ).val( 'before' ).trigger( 'change' );
|
323 |
+
setTimeout(function() {
|
324 |
+
wrapper.find('.elementor-control-element_extra_icon_pos').addClass( 'elementor-hidden-control' );
|
325 |
+
}, 100 );
|
326 |
+
} else {
|
327 |
+
wrapper.find('.elementor-control-element_extra_text_pos').find( 'select' ).val( 'none' ).trigger( 'change' );
|
328 |
+
wrapper.find('.elementor-control-element_extra_icon_pos').find( 'select' ).val( 'none' ).trigger( 'change' );
|
329 |
+
wrapper.find('.elementor-control-element_extra_icon_pos').removeClass( 'elementor-hidden-control' );
|
330 |
+
}
|
331 |
+
} );
|
332 |
+
});
|
333 |
+
|
334 |
+
var sOffsets = {};
|
335 |
+
|
336 |
+
// Prevent Bubble on Click - not working - //tmp
|
337 |
+
panel.$el.find('#elementor-controls').on( 'DOMNodeInserted ', '.elementor-control-type-section', function() {
|
338 |
+
var current = $(this),
|
339 |
+
attrClass = current.attr( 'class' ),
|
340 |
+
firstIndex = attrClass.indexOf( 'elementor-control-section_' ),
|
341 |
+
lastIndex = attrClass.indexOf( 'elementor-control-type-section' ) - 1;
|
342 |
+
|
343 |
+
var oKey = attrClass.substring( firstIndex, lastIndex ),
|
344 |
+
oPropery = current.offset().top;
|
345 |
+
|
346 |
+
sOffsets[oKey] = oPropery;
|
347 |
+
|
348 |
+
setTimeout(function() {
|
349 |
+
current.on( 'click', function( event ) {
|
350 |
+
var current = $(this),
|
351 |
+
attrClass = current.attr( 'class' ),
|
352 |
+
firstIndex = attrClass.indexOf( 'elementor-control-section_' ),
|
353 |
+
lastIndex = attrClass.indexOf( 'elementor-control-type-section' ) - 1,
|
354 |
+
sectionClass = attrClass.substring( firstIndex, lastIndex );
|
355 |
+
|
356 |
+
setTimeout( function() {
|
357 |
+
$( '#elementor-panel-content-wrapper' ).scrollTop( sOffsets[sectionClass] - 100 );
|
358 |
+
}, 10 );
|
359 |
+
});
|
360 |
+
}, 100 );
|
361 |
+
});
|
362 |
+
} );
|
363 |
+
|
364 |
+
// Refresh Mega Menu
|
365 |
+
elementor.hooks.addAction( 'panel/open_editor/widget/wpr-mega-menu', function( panel, model, view ) {
|
366 |
+
model.renderRemoteServer();
|
367 |
+
});
|
368 |
+
|
369 |
+
// Get Referrer Link
|
370 |
+
var referrer = document.referrer;
|
371 |
+
|
372 |
+
// Return to Plugin Page
|
373 |
+
if ( '' !== referrer && referrer.indexOf( 'page=wpr-addons' ) > -1 ) {
|
374 |
+
$(window).on( 'load', function() {
|
375 |
+
|
376 |
+
$('#elementor-panel-header-menu-button').on( 'click', function() {
|
377 |
+
|
378 |
+
setTimeout(function() {
|
379 |
+
$('.elementor-panel-menu-item-exit-to-dashboard').on( 'click', function() {
|
380 |
+
window.location.href = referrer;
|
381 |
+
});
|
382 |
+
}, 300);
|
383 |
+
});
|
384 |
+
});
|
385 |
+
}
|
386 |
+
|
387 |
+
// Advanced Slider - TODO: Check if necessary or remove
|
388 |
+
// elementor.hooks.addAction( 'panel/open_editor/widget/wpr-advanced-slider', function( panel, model, view ) {
|
389 |
+
// var elControls = panel.$el,
|
390 |
+
// $select = elControls.find('.elementor-control-slider_content_type').find('select');
|
391 |
+
|
392 |
+
// if ( 'custom' !== $select.val() ) {
|
393 |
+
// elControls.find('.elementor-control-slider_items .elementor-repeater-row-controls .elementor-control').addClass('wpr-elementor-hidden-control');
|
394 |
+
// elControls.find('.elementor-control-slider_content_type').removeClass('wpr-elementor-hidden-control');
|
395 |
+
// elControls.find('.elementor-control-slider_select_template').removeClass('wpr-elementor-hidden-control');
|
396 |
+
// } else {
|
397 |
+
// elControls.find('.elementor-control-slider_items .elementor-repeater-row-controls .elementor-control').removeClass('wpr-elementor-hidden-control');
|
398 |
+
// elControls.find('.elementor-control-slider_select_template').addClass('wpr-elementor-hidden-control');
|
399 |
+
// }
|
400 |
+
|
401 |
+
// $select.on( 'change', function() {
|
402 |
+
|
403 |
+
// if ( 'custom' !== $(this).val() ) {
|
404 |
+
// elControls.find('.elementor-control-slider_items .elementor-repeater-row-controls .elementor-control').addClass('wpr-elementor-hidden-control');
|
405 |
+
// elControls.find('.elementor-control-slider_content_type').removeClass('wpr-elementor-hidden-control');
|
406 |
+
// elControls.find('.elementor-control-slider_select_template').removeClass('wpr-elementor-hidden-control');
|
407 |
+
// } else {
|
408 |
+
// elControls.find('.elementor-control-slider_items .elementor-repeater-row-controls .elementor-control').removeClass('wpr-elementor-hidden-control');
|
409 |
+
// elControls.find('.elementor-control-slider_select_template').addClass('wpr-elementor-hidden-control');
|
410 |
+
// }
|
411 |
+
// });
|
412 |
+
// } );
|
413 |
+
|
414 |
+
/*--------------------------------------------------------------
|
415 |
+
== Widget Preview and Library buttons
|
416 |
+
--------------------------------------------------------------*/
|
417 |
+
|
418 |
+
for (const [key, value] of Object.entries(registered_modules)) {
|
419 |
+
elementor.hooks.addAction( 'panel/open_editor/widget/wpr-'+ value[0], function( panel, model, view ) {
|
420 |
+
openPedefinedStyles( panel.$el, view.$el, value[0], value[1], value[2] );
|
421 |
+
} );
|
422 |
+
}
|
423 |
+
|
424 |
+
function openPedefinedStyles( panel, preview, widget, url, filter ) {
|
425 |
+
panel.on( 'click', '.elementor-control-wpr_library_buttons .elementor-control-raw-html div a:first-child', function() {
|
426 |
+
var theme = $(this).data('theme');
|
427 |
+
$(this).attr('href', url +'?ref=rea-plugin-panel-'+ widget +'-utmtr'+ theme.slice(0,3) +'nkbs'+ theme.slice(3,theme.length) +'-preview'+ filter);
|
428 |
+
});
|
429 |
+
|
430 |
+
panel.on( 'click', '.elementor-control-wpr_library_buttons .elementor-control-raw-html div a:last-child', function() {
|
431 |
+
preview.closest('body').find('#wpr-library-btn').attr('data-filter', widget);
|
432 |
+
preview.closest('body').find('#wpr-library-btn').trigger('click');
|
433 |
+
});
|
434 |
+
}
|
435 |
+
|
436 |
+
/*--------------------------------------------------------------
|
437 |
+
== Reload Theme Builder
|
438 |
+
--------------------------------------------------------------*/
|
439 |
+
elementor.once('document:loaded', function(){
|
440 |
+
setTimeout(function(){
|
441 |
+
if ( $('body').hasClass('elementor-editor-wpr-theme-builder') ) {
|
442 |
+
elementor.reloadPreview();
|
443 |
+
}
|
444 |
+
}, 10);
|
445 |
+
});
|
446 |
+
|
447 |
+
}( jQuery ) );
|
448 |
+
|
449 |
+
( function( $ ) {
|
450 |
+
|
451 |
+
'use strict';
|
452 |
+
|
453 |
+
var WprMegaMenuEditor = {
|
454 |
+
|
455 |
+
activeSection: false,
|
456 |
+
|
457 |
+
currentElement: false,
|
458 |
+
|
459 |
+
currentSection: false,
|
460 |
+
|
461 |
+
prevSection: false,
|
462 |
+
|
463 |
+
|
464 |
+
init: function() {
|
465 |
+
elementor.channels.editor.on( 'section:activated', WprMegaMenuEditor.sectionActivated );
|
466 |
+
},
|
467 |
+
|
468 |
+
sectionActivated: function( sectionName, editor ) {
|
469 |
+
|
470 |
+
let currentElement = WprMegaMenuEditor.currentElement = editor.getOption( 'editedElementView' ) || false;
|
471 |
+
|
472 |
+
if ( ! currentElement ) {
|
473 |
+
return;
|
474 |
+
}
|
475 |
+
|
476 |
+
if ( 'wpr-mega-menu' == currentElement.model.get( 'widgetType' ) ) {
|
477 |
+
|
478 |
+
// if ( 'section_general' === sectionName ) {}
|
479 |
+
// currentElement.model.renderRemoteServer();
|
480 |
+
}
|
481 |
+
|
482 |
+
}
|
483 |
+
|
484 |
+
};
|
485 |
+
|
486 |
+
$( window ).on( 'elementor:init', WprMegaMenuEditor.init );
|
487 |
+
|
488 |
+
window.WprMegaMenuEditor = WprMegaMenuEditor;
|
489 |
+
|
490 |
+
}( jQuery ) );
|
assets/js/lib/flipster/jquery.flipster.min.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/*! jQuery.Flipster, v1.1.5 (built 2020-10-17) */
|
2 |
-
|
3 |
!function(P,t,D){"use strict";function L(n,i){var a=null;return function(){var t=this,e=arguments;null===a&&(a=setTimeout(function(){n.apply(t,e),a=null},i))}}var r,e=(r={},function(t){if(r[t]!==D)return r[t];var e=document.createElement("div").style,n=t.charAt(0).toUpperCase()+t.slice(1),i=(t+" "+["webkit","moz","ms","o"].join(n+" ")+n).split(" ");for(var a in i)if(i[a]in e)return r[t]=i[a];return r[t]=!1}),a="http://www.w3.org/2000/svg",E=P(t),M=e("transform"),i={itemContainer:"ul",itemSelector:"li",start:"center",fadeIn:400,loop:!1,autoplay:!1,pauseOnHover:!0,style:"coverflow",spacing:-.6,click:!0,keyboard:!0,scrollwheel:!0,touch:!0,nav:!1,buttons:!1,buttonPrev:"Previous",buttonNext:"Next",onItemSwitch:!1},T={main:"flipster",active:"flipster--active",container:"flipster__container",nav:"flipster__nav",navChild:"flipster__nav__child",navItem:"flipster__nav__item",navLink:"flipster__nav__link",navCurrent:"flipster__nav__item--current",navCategory:"flipster__nav__item--category",navCategoryLink:"flipster__nav__link--category",button:"flipster__button",buttonPrev:"flipster__button--prev",buttonNext:"flipster__button--next",item:"flipster__item",itemCurrent:"flipster__item--current",itemPast:"flipster__item--past",itemFuture:"flipster__item--future",itemContent:"flipster__item__content"},X=new RegExp("\\b("+T.itemCurrent+"|"+T.itemPast+"|"+T.itemFuture+")(.*?)(\\s|$)","g"),j=new RegExp("\\s\\s+","g");P.fn.flipster=function(e){if("string"==typeof e){var n=Array.prototype.slice.call(arguments,1);return this.each(function(){var t=P(this).data("methods");return t[e]?t[e].apply(this,n):this})}var I=P.extend({},i,e);return this.each(function(){var t,f,r,n,p,s,l,c,u,v=P(this),o=[],h=0,d=!1,e=!1;function i(e){return e=e||"next",P('<button class="'+T.button+" "+("next"===e?T.buttonNext:T.buttonPrev)+'" role="button" />').html((n="next"===(t=e)?I.buttonNext:I.buttonPrev,"custom"===I.buttons?n:'<svg viewBox="0 0 13 20" xmlns="'+a+'" aria-labelledby="title"><title>'+n+'</title><polyline points="10,3 3,10 10,17"'+("next"===t?' transform="rotate(180 6.5,10)"':"")+"/></svg>")).on("click",function(t){y(e),t.preventDefault()});var t,n}function m(){v.css("transition",""),f.css("transition",""),p.css("transition","")}function g(a){var t,e;a&&(v.css("transition","none"),f.css("transition","none"),p.css("transition","none")),r=f.width(),f.height((e=0,p.each(function(){t=P(this).height(),e<t&&(e=t)}),e)),r?(n&&(clearInterval(n),n=!1),p.each(function(t){var e,n,i=P(this);i.attr("class",function(t,e){return e&&e.replace(X,"").replace(j," ")}),e=i.outerWidth(),0!==I.spacing&&i.css("margin-right",e*I.spacing+"px"),n=i.position().left,o[t]=-1*(n+e/2-r/2),t===p.length-1&&(_(),a&&setTimeout(m,1))})):n=n||setInterval(function(){g(a)},500)}function _(){var e,n,i,a=p.length;p.each(function(t){e=P(this),n=" ",i=t===h?(n+=T.itemCurrent,a+1):t<h?(n+=T.itemPast+" "+T.itemPast+"-"+(h-t),a-(h-t)):(n+=T.itemFuture+" "+T.itemFuture+"-"+(t-h),a-(t-h)),e.css("z-index",i).attr("class",function(t,e){return e&&e.replace(X,"").replace(j," ")+n})}),0<=h&&(r&&o[h]!==D||g(!0),M?f.css("transform","translateX("+o[h]+"px)"):f.css({left:o[h]+"px"})),function(){if(I.nav){var t=s.data("flip-category");c.removeClass(T.navCurrent),u.filter(function(){return P(this).data("index")===h||t&&P(this).data("category")===t}).parent().addClass(T.navCurrent)}}()}function y(t){var e=h;if(!(p.length<=1))return"prev"===t?0<h?h--:I.loop&&(h=p.length-1):"next"===t?h<p.length-1?h++:I.loop&&(h=0):"number"==typeof t?h=t:t!==D&&(h=p.index(t),I.loop&&e!=h&&(e==p.length-1&&h!=p.length-2&&(h=0),0==e&&1!=h&&(h=p.length-1))),s=p.eq(h),h!==e&&I.onItemSwitch&&I.onItemSwitch.call(v,p[h],p[e]),_(),v}function b(t){return I.autoplay=t||I.autoplay,clearInterval(d),d=setInterval(function(){var t=h;y("next"),t!==h||I.loop||clearInterval(d)},I.autoplay),v}function x(){return clearInterval(d),d=0,v}function w(t){return x(),I.autoplay&&t&&(d=-1),v}function C(){g(!0),v.hide().css("visibility","").addClass(T.active).fadeIn(I.fadeIn)}function k(){var o;if(f=v.find(I.itemContainer).addClass(T.container),!((p=f.find(I.itemSelector)).length<=1))return p.addClass(T.item).each(function(){var t=P(this);t.children("."+T.itemContent).length||t.wrapInner('<div class="'+T.itemContent+'" />')}),I.click&&p.on("click.flipster touchend.flipster",function(t){e||(P(this).hasClass(T.itemCurrent)||t.preventDefault(),y(this))}),I.buttons&&1<p.length&&(v.find("."+T.button).remove(),v.append(i("prev"),i("next"))),o={},!I.nav||p.length<=1||(l&&l.remove(),l=P('<ul class="'+T.nav+'" role="navigation" />'),u=P(""),p.each(function(t){var e=P(this),n=e.data("flip-category"),i=e.data("flip-title")||e.attr("title")||t,a=P('<a href="#" class="'+T.navLink+'">'+i+"</a>").data("index",t);if(u=u.add(a),n){if(!o[n]){var r=P('<li class="'+T.navItem+" "+T.navCategory+'">'),s=P('<a href="#" class="'+T.navLink+" "+T.navCategoryLink+'" data-flip-category="'+n+'">'+n+"</a>").data("category",n).data("index",t);o[n]=P('<ul class="'+T.navChild+'" />'),u=u.add(s),r.append(s,o[n]).appendTo(l)}o[n].append(a)}else l.append(a);a.wrap('<li class="'+T.navItem+'">')}),l.on("click","a",function(t){var e=P(this).data("index");0<=e&&(y(e),t.preventDefault())}),"after"===I.nav?v.append(l):v.prepend(l),c=l.find("."+T.navItem)),0<=h&&y(h),v}t={jump:y,next:function(){return y("next")},prev:function(){return y("prev")},play:b,stop:x,pause:w,index:k},v.data("methods",t),v.hasClass(T.active)||function(){var t;if(v.css("visibility","hidden"),k(),p.length<=1)v.css("visibility","");else{t=!!I.style&&"flipster--"+I.style.split(" ").join(" flipster--"),v.addClass([T.main,M?"flipster--transform":" flipster--no-transform",t,I.click?"flipster--click":""].join(" ")),I.start&&(h="center"===I.start?Math.floor(p.length/2):I.start),y(h);var e,n,i,a,r,s,o,l,c=v.find("img");if(c.length){var u=0;c.on("load",function(){++u>=c.length&&C()}),setTimeout(C,750)}else C();E.on("resize.flipster",L(g,400)),I.autoplay&&b(),I.pauseOnHover&&f.on("mouseenter.flipster",function(){d?w(!0):x()}).on("mouseleave.flipster",function(){-1===d&&b()}),e=v,I.keyboard&&(e[0].tabIndex=0,e.on("keydown.flipster",L(function(t){var e=t.which;37!==e&&39!==e||(y(37===e?"prev":"next"),t.preventDefault())},250))),function(t){if(I.scrollwheel){var e,n,i=!1,a=0,r=0,s=0,o=/mozilla/.test(navigator.userAgent.toLowerCase())&&!/webkit/.test(navigator.userAgent.toLowerCase());t.on("mousewheel.flipster wheel.flipster",function(){i=!0}).on("mousewheel.flipster wheel.flipster",L(function(t){clearTimeout(r),r=setTimeout(function(){s=a=0},300),t=t.originalEvent,s+=t.wheelDelta||-1*(t.deltaY+t.deltaX),Math.abs(s)<25&&!o||(a++,n!==(e=0<s?"prev":"next")&&(a=0),n=e,(a<6||a%3==0)&&y(e),s=0)},50)),t.on("mousewheel.flipster wheel.flipster",function(t){i&&(t.preventDefault(),i=!1)})}}(f),n=f,I.touch&&n.on({"touchstart.flipster":function(t){t=t.originalEvent,i=t.touches?t.touches[0].clientX:t.clientX,a=t.touches?t.touches[0].clientY:t.clientY},"touchmove.flipster":function(t){t=t.originalEvent,r=t.touches?t.touches[0].clientX:t.clientX,s=t.touches?t.touches[0].clientY:t.clientY,l=r-i,o=s-a,30<Math.abs(l)&&Math.abs(o)<100&&t.preventDefault()},"touchend.flipster touchcancel.flipster ":function(){l=r-i,o=s-a,30<Math.abs(l)&&Math.abs(o)<100&&y(0<l?"prev":"next")}})}}()})}}(jQuery,window);
|
1 |
+
/*! jQuery.Flipster, v1.1.5 (built 2020-10-17) */
|
2 |
+
|
3 |
!function(P,t,D){"use strict";function L(n,i){var a=null;return function(){var t=this,e=arguments;null===a&&(a=setTimeout(function(){n.apply(t,e),a=null},i))}}var r,e=(r={},function(t){if(r[t]!==D)return r[t];var e=document.createElement("div").style,n=t.charAt(0).toUpperCase()+t.slice(1),i=(t+" "+["webkit","moz","ms","o"].join(n+" ")+n).split(" ");for(var a in i)if(i[a]in e)return r[t]=i[a];return r[t]=!1}),a="http://www.w3.org/2000/svg",E=P(t),M=e("transform"),i={itemContainer:"ul",itemSelector:"li",start:"center",fadeIn:400,loop:!1,autoplay:!1,pauseOnHover:!0,style:"coverflow",spacing:-.6,click:!0,keyboard:!0,scrollwheel:!0,touch:!0,nav:!1,buttons:!1,buttonPrev:"Previous",buttonNext:"Next",onItemSwitch:!1},T={main:"flipster",active:"flipster--active",container:"flipster__container",nav:"flipster__nav",navChild:"flipster__nav__child",navItem:"flipster__nav__item",navLink:"flipster__nav__link",navCurrent:"flipster__nav__item--current",navCategory:"flipster__nav__item--category",navCategoryLink:"flipster__nav__link--category",button:"flipster__button",buttonPrev:"flipster__button--prev",buttonNext:"flipster__button--next",item:"flipster__item",itemCurrent:"flipster__item--current",itemPast:"flipster__item--past",itemFuture:"flipster__item--future",itemContent:"flipster__item__content"},X=new RegExp("\\b("+T.itemCurrent+"|"+T.itemPast+"|"+T.itemFuture+")(.*?)(\\s|$)","g"),j=new RegExp("\\s\\s+","g");P.fn.flipster=function(e){if("string"==typeof e){var n=Array.prototype.slice.call(arguments,1);return this.each(function(){var t=P(this).data("methods");return t[e]?t[e].apply(this,n):this})}var I=P.extend({},i,e);return this.each(function(){var t,f,r,n,p,s,l,c,u,v=P(this),o=[],h=0,d=!1,e=!1;function i(e){return e=e||"next",P('<button class="'+T.button+" "+("next"===e?T.buttonNext:T.buttonPrev)+'" role="button" />').html((n="next"===(t=e)?I.buttonNext:I.buttonPrev,"custom"===I.buttons?n:'<svg viewBox="0 0 13 20" xmlns="'+a+'" aria-labelledby="title"><title>'+n+'</title><polyline points="10,3 3,10 10,17"'+("next"===t?' transform="rotate(180 6.5,10)"':"")+"/></svg>")).on("click",function(t){y(e),t.preventDefault()});var t,n}function m(){v.css("transition",""),f.css("transition",""),p.css("transition","")}function g(a){var t,e;a&&(v.css("transition","none"),f.css("transition","none"),p.css("transition","none")),r=f.width(),f.height((e=0,p.each(function(){t=P(this).height(),e<t&&(e=t)}),e)),r?(n&&(clearInterval(n),n=!1),p.each(function(t){var e,n,i=P(this);i.attr("class",function(t,e){return e&&e.replace(X,"").replace(j," ")}),e=i.outerWidth(),0!==I.spacing&&i.css("margin-right",e*I.spacing+"px"),n=i.position().left,o[t]=-1*(n+e/2-r/2),t===p.length-1&&(_(),a&&setTimeout(m,1))})):n=n||setInterval(function(){g(a)},500)}function _(){var e,n,i,a=p.length;p.each(function(t){e=P(this),n=" ",i=t===h?(n+=T.itemCurrent,a+1):t<h?(n+=T.itemPast+" "+T.itemPast+"-"+(h-t),a-(h-t)):(n+=T.itemFuture+" "+T.itemFuture+"-"+(t-h),a-(t-h)),e.css("z-index",i).attr("class",function(t,e){return e&&e.replace(X,"").replace(j," ")+n})}),0<=h&&(r&&o[h]!==D||g(!0),M?f.css("transform","translateX("+o[h]+"px)"):f.css({left:o[h]+"px"})),function(){if(I.nav){var t=s.data("flip-category");c.removeClass(T.navCurrent),u.filter(function(){return P(this).data("index")===h||t&&P(this).data("category")===t}).parent().addClass(T.navCurrent)}}()}function y(t){var e=h;if(!(p.length<=1))return"prev"===t?0<h?h--:I.loop&&(h=p.length-1):"next"===t?h<p.length-1?h++:I.loop&&(h=0):"number"==typeof t?h=t:t!==D&&(h=p.index(t),I.loop&&e!=h&&(e==p.length-1&&h!=p.length-2&&(h=0),0==e&&1!=h&&(h=p.length-1))),s=p.eq(h),h!==e&&I.onItemSwitch&&I.onItemSwitch.call(v,p[h],p[e]),_(),v}function b(t){return I.autoplay=t||I.autoplay,clearInterval(d),d=setInterval(function(){var t=h;y("next"),t!==h||I.loop||clearInterval(d)},I.autoplay),v}function x(){return clearInterval(d),d=0,v}function w(t){return x(),I.autoplay&&t&&(d=-1),v}function C(){g(!0),v.hide().css("visibility","").addClass(T.active).fadeIn(I.fadeIn)}function k(){var o;if(f=v.find(I.itemContainer).addClass(T.container),!((p=f.find(I.itemSelector)).length<=1))return p.addClass(T.item).each(function(){var t=P(this);t.children("."+T.itemContent).length||t.wrapInner('<div class="'+T.itemContent+'" />')}),I.click&&p.on("click.flipster touchend.flipster",function(t){e||(P(this).hasClass(T.itemCurrent)||t.preventDefault(),y(this))}),I.buttons&&1<p.length&&(v.find("."+T.button).remove(),v.append(i("prev"),i("next"))),o={},!I.nav||p.length<=1||(l&&l.remove(),l=P('<ul class="'+T.nav+'" role="navigation" />'),u=P(""),p.each(function(t){var e=P(this),n=e.data("flip-category"),i=e.data("flip-title")||e.attr("title")||t,a=P('<a href="#" class="'+T.navLink+'">'+i+"</a>").data("index",t);if(u=u.add(a),n){if(!o[n]){var r=P('<li class="'+T.navItem+" "+T.navCategory+'">'),s=P('<a href="#" class="'+T.navLink+" "+T.navCategoryLink+'" data-flip-category="'+n+'">'+n+"</a>").data("category",n).data("index",t);o[n]=P('<ul class="'+T.navChild+'" />'),u=u.add(s),r.append(s,o[n]).appendTo(l)}o[n].append(a)}else l.append(a);a.wrap('<li class="'+T.navItem+'">')}),l.on("click","a",function(t){var e=P(this).data("index");0<=e&&(y(e),t.preventDefault())}),"after"===I.nav?v.append(l):v.prepend(l),c=l.find("."+T.navItem)),0<=h&&y(h),v}t={jump:y,next:function(){return y("next")},prev:function(){return y("prev")},play:b,stop:x,pause:w,index:k},v.data("methods",t),v.hasClass(T.active)||function(){var t;if(v.css("visibility","hidden"),k(),p.length<=1)v.css("visibility","");else{t=!!I.style&&"flipster--"+I.style.split(" ").join(" flipster--"),v.addClass([T.main,M?"flipster--transform":" flipster--no-transform",t,I.click?"flipster--click":""].join(" ")),I.start&&(h="center"===I.start?Math.floor(p.length/2):I.start),y(h);var e,n,i,a,r,s,o,l,c=v.find("img");if(c.length){var u=0;c.on("load",function(){++u>=c.length&&C()}),setTimeout(C,750)}else C();E.on("resize.flipster",L(g,400)),I.autoplay&&b(),I.pauseOnHover&&f.on("mouseenter.flipster",function(){d?w(!0):x()}).on("mouseleave.flipster",function(){-1===d&&b()}),e=v,I.keyboard&&(e[0].tabIndex=0,e.on("keydown.flipster",L(function(t){var e=t.which;37!==e&&39!==e||(y(37===e?"prev":"next"),t.preventDefault())},250))),function(t){if(I.scrollwheel){var e,n,i=!1,a=0,r=0,s=0,o=/mozilla/.test(navigator.userAgent.toLowerCase())&&!/webkit/.test(navigator.userAgent.toLowerCase());t.on("mousewheel.flipster wheel.flipster",function(){i=!0}).on("mousewheel.flipster wheel.flipster",L(function(t){clearTimeout(r),r=setTimeout(function(){s=a=0},300),t=t.originalEvent,s+=t.wheelDelta||-1*(t.deltaY+t.deltaX),Math.abs(s)<25&&!o||(a++,n!==(e=0<s?"prev":"next")&&(a=0),n=e,(a<6||a%3==0)&&y(e),s=0)},50)),t.on("mousewheel.flipster wheel.flipster",function(t){i&&(t.preventDefault(),i=!1)})}}(f),n=f,I.touch&&n.on({"touchstart.flipster":function(t){t=t.originalEvent,i=t.touches?t.touches[0].clientX:t.clientX,a=t.touches?t.touches[0].clientY:t.clientY},"touchmove.flipster":function(t){t=t.originalEvent,r=t.touches?t.touches[0].clientX:t.clientX,s=t.touches?t.touches[0].clientY:t.clientY,l=r-i,o=s-a,30<Math.abs(l)&&Math.abs(o)<100&&t.preventDefault()},"touchend.flipster touchcancel.flipster ":function(){l=r-i,o=s-a,30<Math.abs(l)&&Math.abs(o)<100&&y(0<l?"prev":"next")}})}}()})}}(jQuery,window);
|
assets/js/lib/gmap/markerclusterer.js
CHANGED
@@ -1,1321 +1,1321 @@
|
|
1 |
-
// ==ClosureCompiler==
|
2 |
-
// @compilation_level ADVANCED_OPTIMIZATIONS
|
3 |
-
// @externs_url http://closure-compiler.googlecode.com/svn/trunk/contrib/externs/maps/google_maps_api_v3_3.js
|
4 |
-
// ==/ClosureCompiler==
|
5 |
-
|
6 |
-
/**
|
7 |
-
* @name MarkerClusterer for Google Maps v3
|
8 |
-
* @version version 1.0.3
|
9 |
-
* @author Luke Mahe
|
10 |
-
* @fileoverview
|
11 |
-
* The library creates and manages per-zoom-level clusters for large amounts of
|
12 |
-
* markers.
|
13 |
-
*/
|
14 |
-
|
15 |
-
/**
|
16 |
-
* @license
|
17 |
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
18 |
-
* you may not use this file except in compliance with the License.
|
19 |
-
* You may obtain a copy of the License at
|
20 |
-
*
|
21 |
-
* http://www.apache.org/licenses/LICENSE-2.0
|
22 |
-
*
|
23 |
-
* Unless required by applicable law or agreed to in writing, software
|
24 |
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
25 |
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
26 |
-
* See the License for the specific language governing permissions and
|
27 |
-
* limitations under the License.
|
28 |
-
*/
|
29 |
-
|
30 |
-
|
31 |
-
/**
|
32 |
-
* A Marker Clusterer that clusters markers.
|
33 |
-
*
|
34 |
-
* @param {google.maps.Map} map The Google map to attach to.
|
35 |
-
* @param {Array.<google.maps.Marker>=} opt_markers Optional markers to add to
|
36 |
-
* the cluster.
|
37 |
-
* @param {Object=} opt_options support the following options:
|
38 |
-
* 'gridSize': (number) The grid size of a cluster in pixels.
|
39 |
-
* 'maxZoom': (number) The maximum zoom level that a marker can be part of a
|
40 |
-
* cluster.
|
41 |
-
* 'zoomOnClick': (boolean) Whether the default behaviour of clicking on a
|
42 |
-
* cluster is to zoom into it.
|
43 |
-
* 'imagePath': (string) The base URL where the images representing
|
44 |
-
* clusters will be found. The full URL will be:
|
45 |
-
* {imagePath}[1-5].{imageExtension}
|
46 |
-
* Default: '../images/m'.
|
47 |
-
* 'imageExtension': (string) The suffix for images URL representing
|
48 |
-
* clusters will be found. See _imagePath_ for details.
|
49 |
-
* Default: 'png'.
|
50 |
-
* 'averageCenter': (boolean) Whether the center of each cluster should be
|
51 |
-
* the average of all markers in the cluster.
|
52 |
-
* 'minimumClusterSize': (number) The minimum number of markers to be in a
|
53 |
-
* cluster before the markers are hidden and a count
|
54 |
-
* is shown.
|
55 |
-
* 'styles': (object) An object that has style properties:
|
56 |
-
* 'url': (string) The image url.
|
57 |
-
* 'height': (number) The image height.
|
58 |
-
* 'width': (number) The image width.
|
59 |
-
* 'anchor': (Array) The anchor position of the label text.
|
60 |
-
* 'textColor': (string) The text color.
|
61 |
-
* 'textSize': (number) The text size.
|
62 |
-
* 'backgroundPosition': (string) The position of the backgound x, y.
|
63 |
-
* @constructor
|
64 |
-
* @extends google.maps.OverlayView
|
65 |
-
*/
|
66 |
-
function MarkerClusterer(map, opt_markers, opt_options) {
|
67 |
-
// MarkerClusterer implements google.maps.OverlayView interface. We use the
|
68 |
-
// extend function to extend MarkerClusterer with google.maps.OverlayView
|
69 |
-
// because it might not always be available when the code is defined so we
|
70 |
-
// look for it at the last possible moment. If it doesn't exist now then
|
71 |
-
// there is no point going ahead :)
|
72 |
-
this.extend(MarkerClusterer, google.maps.OverlayView);
|
73 |
-
this.map_ = map;
|
74 |
-
|
75 |
-
/**
|
76 |
-
* @type {Array.<google.maps.Marker>}
|
77 |
-
* @private
|
78 |
-
*/
|
79 |
-
this.markers_ = [];
|
80 |
-
|
81 |
-
/**
|
82 |
-
* @type {Array.<Cluster>}
|
83 |
-
*/
|
84 |
-
this.clusters_ = [];
|
85 |
-
|
86 |
-
this.sizes = [53, 56, 66, 78, 90];
|
87 |
-
|
88 |
-
/**
|
89 |
-
* @private
|
90 |
-
*/
|
91 |
-
this.styles_ = [];
|
92 |
-
|
93 |
-
/**
|
94 |
-
* @type {boolean}
|
95 |
-
* @private
|
96 |
-
*/
|
97 |
-
this.ready_ = false;
|
98 |
-
|
99 |
-
var options = opt_options || {};
|
100 |
-
|
101 |
-
/**
|
102 |
-
* @type {number}
|
103 |
-
* @private
|
104 |
-
*/
|
105 |
-
this.gridSize_ = options['gridSize'] || 60;
|
106 |
-
|
107 |
-
/**
|
108 |
-
* @private
|
109 |
-
*/
|
110 |
-
this.minClusterSize_ = options['minimumClusterSize'] || 2;
|
111 |
-
|
112 |
-
|
113 |
-
/**
|
114 |
-
* @type {?number}
|
115 |
-
* @private
|
116 |
-
*/
|
117 |
-
this.maxZoom_ = options['maxZoom'] || null;
|
118 |
-
|
119 |
-
this.styles_ = options['styles'] || [];
|
120 |
-
|
121 |
-
/**
|
122 |
-
* @type {string}
|
123 |
-
* @private
|
124 |
-
*/
|
125 |
-
this.imagePath_ = options['imagePath'] ||
|
126 |
-
this.MARKER_CLUSTER_IMAGE_PATH_;
|
127 |
-
|
128 |
-
/**
|
129 |
-
* @type {string}
|
130 |
-
* @private
|
131 |
-
*/
|
132 |
-
this.imageExtension_ = options['imageExtension'] ||
|
133 |
-
this.MARKER_CLUSTER_IMAGE_EXTENSION_;
|
134 |
-
|
135 |
-
/**
|
136 |
-
* @type {boolean}
|
137 |
-
* @private
|
138 |
-
*/
|
139 |
-
this.zoomOnClick_ = true;
|
140 |
-
|
141 |
-
if (options['zoomOnClick'] != undefined) {
|
142 |
-
this.zoomOnClick_ = options['zoomOnClick'];
|
143 |
-
}
|
144 |
-
|
145 |
-
/**
|
146 |
-
* @type {boolean}
|
147 |
-
* @private
|
148 |
-
*/
|
149 |
-
this.averageCenter_ = false;
|
150 |
-
|
151 |
-
if (options['averageCenter'] != undefined) {
|
152 |
-
this.averageCenter_ = options['averageCenter'];
|
153 |
-
}
|
154 |
-
|
155 |
-
this.setupStyles_();
|
156 |
-
|
157 |
-
this.setMap(map);
|
158 |
-
|
159 |
-
/**
|
160 |
-
* @type {number}
|
161 |
-
* @private
|
162 |
-
*/
|
163 |
-
this.prevZoom_ = this.map_.getZoom();
|
164 |
-
|
165 |
-
// Add the map event listeners
|
166 |
-
var that = this;
|
167 |
-
google.maps.event.addListener(this.map_, 'zoom_changed', function() {
|
168 |
-
// Determines map type and prevent illegal zoom levels
|
169 |
-
var zoom = that.map_.getZoom();
|
170 |
-
var minZoom = that.map_.minZoom || 0;
|
171 |
-
var maxZoom = Math.min(that.map_.maxZoom || 100,
|
172 |
-
that.map_.mapTypes[that.map_.getMapTypeId()].maxZoom);
|
173 |
-
zoom = Math.min(Math.max(zoom,minZoom),maxZoom);
|
174 |
-
|
175 |
-
if (that.prevZoom_ != zoom) {
|
176 |
-
that.prevZoom_ = zoom;
|
177 |
-
that.resetViewport();
|
178 |
-
}
|
179 |
-
});
|
180 |
-
|
181 |
-
google.maps.event.addListener(this.map_, 'idle', function() {
|
182 |
-
that.redraw();
|
183 |
-
});
|
184 |
-
|
185 |
-
// Finally, add the markers
|
186 |
-
if (opt_markers && (opt_markers.length || Object.keys(opt_markers).length)) {
|
187 |
-
this.addMarkers(opt_markers, false);
|
188 |
-
}
|
189 |
-
}
|
190 |
-
|
191 |
-
|
192 |
-
/**
|
193 |
-
* The marker cluster image path.
|
194 |
-
*
|
195 |
-
* @type {string}
|
196 |
-
* @private
|
197 |
-
*/
|
198 |
-
MarkerClusterer.prototype.MARKER_CLUSTER_IMAGE_PATH_ = '../images/m';
|
199 |
-
|
200 |
-
|
201 |
-
/**
|
202 |
-
* The marker cluster image path.
|
203 |
-
*
|
204 |
-
* @type {string}
|
205 |
-
* @private
|
206 |
-
*/
|
207 |
-
MarkerClusterer.prototype.MARKER_CLUSTER_IMAGE_EXTENSION_ = 'png';
|
208 |
-
|
209 |
-
|
210 |
-
/**
|
211 |
-
* Extends a objects prototype by anothers.
|
212 |
-
*
|
213 |
-
* @param {Object} obj1 The object to be extended.
|
214 |
-
* @param {Object} obj2 The object to extend with.
|
215 |
-
* @return {Object} The new extended object.
|
216 |
-
* @ignore
|
217 |
-
*/
|
218 |
-
MarkerClusterer.prototype.extend = function(obj1, obj2) {
|
219 |
-
return (function(object) {
|
220 |
-
for (var property in object.prototype) {
|
221 |
-
this.prototype[property] = object.prototype[property];
|
222 |
-
}
|
223 |
-
return this;
|
224 |
-
}).apply(obj1, [obj2]);
|
225 |
-
};
|
226 |
-
|
227 |
-
|
228 |
-
/**
|
229 |
-
* Implementaion of the interface method.
|
230 |
-
* @ignore
|
231 |
-
*/
|
232 |
-
MarkerClusterer.prototype.onAdd = function() {
|
233 |
-
this.setReady_(true);
|
234 |
-
};
|
235 |
-
|
236 |
-
/**
|
237 |
-
* Implementaion of the interface method.
|
238 |
-
* @ignore
|
239 |
-
*/
|
240 |
-
MarkerClusterer.prototype.draw = function() {};
|
241 |
-
|
242 |
-
/**
|
243 |
-
* Sets up the styles object.
|
244 |
-
*
|
245 |
-
* @private
|
246 |
-
*/
|
247 |
-
MarkerClusterer.prototype.setupStyles_ = function() {
|
248 |
-
if (this.styles_.length) {
|
249 |
-
return;
|
250 |
-
}
|
251 |
-
|
252 |
-
for (var i = 0, size; size = this.sizes[i]; i++) {
|
253 |
-
this.styles_.push({
|
254 |
-
url: this.imagePath_ + (i + 1) + '.' + this.imageExtension_,
|
255 |
-
height: size,
|
256 |
-
width: size
|
257 |
-
});
|
258 |
-
}
|
259 |
-
};
|
260 |
-
|
261 |
-
/**
|
262 |
-
* Fit the map to the bounds of the markers in the clusterer.
|
263 |
-
*/
|
264 |
-
MarkerClusterer.prototype.fitMapToMarkers = function() {
|
265 |
-
var markers = this.getMarkers();
|
266 |
-
var bounds = new google.maps.LatLngBounds();
|
267 |
-
for (var i = 0, marker; marker = markers[i]; i++) {
|
268 |
-
bounds.extend(marker.getPosition());
|
269 |
-
}
|
270 |
-
|
271 |
-
this.map_.fitBounds(bounds);
|
272 |
-
};
|
273 |
-
|
274 |
-
|
275 |
-
/**
|
276 |
-
* Sets the styles.
|
277 |
-
*
|
278 |
-
* @param {Object} styles The style to set.
|
279 |
-
*/
|
280 |
-
MarkerClusterer.prototype.setStyles = function(styles) {
|
281 |
-
this.styles_ = styles;
|
282 |
-
};
|
283 |
-
|
284 |
-
|
285 |
-
/**
|
286 |
-
* Gets the styles.
|
287 |
-
*
|
288 |
-
* @return {Object} The styles object.
|
289 |
-
*/
|
290 |
-
MarkerClusterer.prototype.getStyles = function() {
|
291 |
-
return this.styles_;
|
292 |
-
};
|
293 |
-
|
294 |
-
|
295 |
-
/**
|
296 |
-
* Whether zoom on click is set.
|
297 |
-
*
|
298 |
-
* @return {boolean} True if zoomOnClick_ is set.
|
299 |
-
*/
|
300 |
-
MarkerClusterer.prototype.isZoomOnClick = function() {
|
301 |
-
return this.zoomOnClick_;
|
302 |
-
};
|
303 |
-
|
304 |
-
/**
|
305 |
-
* Whether average center is set.
|
306 |
-
*
|
307 |
-
* @return {boolean} True if averageCenter_ is set.
|
308 |
-
*/
|
309 |
-
MarkerClusterer.prototype.isAverageCenter = function() {
|
310 |
-
return this.averageCenter_;
|
311 |
-
};
|
312 |
-
|
313 |
-
|
314 |
-
/**
|
315 |
-
* Returns the array of markers in the clusterer.
|
316 |
-
*
|
317 |
-
* @return {Array.<google.maps.Marker>} The markers.
|
318 |
-
*/
|
319 |
-
MarkerClusterer.prototype.getMarkers = function() {
|
320 |
-
return this.markers_;
|
321 |
-
};
|
322 |
-
|
323 |
-
|
324 |
-
/**
|
325 |
-
* Returns the number of markers in the clusterer
|
326 |
-
*
|
327 |
-
* @return {Number} The number of markers.
|
328 |
-
*/
|
329 |
-
MarkerClusterer.prototype.getTotalMarkers = function() {
|
330 |
-
return this.markers_.length;
|
331 |
-
};
|
332 |
-
|
333 |
-
|
334 |
-
/**
|
335 |
-
* Sets the max zoom for the clusterer.
|
336 |
-
*
|
337 |
-
* @param {number} maxZoom The max zoom level.
|
338 |
-
*/
|
339 |
-
MarkerClusterer.prototype.setMaxZoom = function(maxZoom) {
|
340 |
-
this.maxZoom_ = maxZoom;
|
341 |
-
};
|
342 |
-
|
343 |
-
|
344 |
-
/**
|
345 |
-
* Gets the max zoom for the clusterer.
|
346 |
-
*
|
347 |
-
* @return {number} The max zoom level.
|
348 |
-
*/
|
349 |
-
MarkerClusterer.prototype.getMaxZoom = function() {
|
350 |
-
return this.maxZoom_;
|
351 |
-
};
|
352 |
-
|
353 |
-
|
354 |
-
/**
|
355 |
-
* The function for calculating the cluster icon image.
|
356 |
-
*
|
357 |
-
* @param {Array.<google.maps.Marker>} markers The markers in the clusterer.
|
358 |
-
* @param {number} numStyles The number of styles available.
|
359 |
-
* @return {Object} A object properties: 'text' (string) and 'index' (number).
|
360 |
-
* @private
|
361 |
-
*/
|
362 |
-
MarkerClusterer.prototype.calculator_ = function(markers, numStyles) {
|
363 |
-
var index = 0;
|
364 |
-
var count = markers.length;
|
365 |
-
var dv = count;
|
366 |
-
while (dv !== 0) {
|
367 |
-
dv = parseInt(dv / 10, 10);
|
368 |
-
index++;
|
369 |
-
}
|
370 |
-
|
371 |
-
index = Math.min(index, numStyles);
|
372 |
-
return {
|
373 |
-
text: count,
|
374 |
-
index: index
|
375 |
-
};
|
376 |
-
};
|
377 |
-
|
378 |
-
|
379 |
-
/**
|
380 |
-
* Set the calculator function.
|
381 |
-
*
|
382 |
-
* @param {function(Array, number)} calculator The function to set as the
|
383 |
-
* calculator. The function should return a object properties:
|
384 |
-
* 'text' (string) and 'index' (number).
|
385 |
-
*
|
386 |
-
*/
|
387 |
-
MarkerClusterer.prototype.setCalculator = function(calculator) {
|
388 |
-
this.calculator_ = calculator;
|
389 |
-
};
|
390 |
-
|
391 |
-
|
392 |
-
/**
|
393 |
-
* Get the calculator function.
|
394 |
-
*
|
395 |
-
* @return {function(Array, number)} the calculator function.
|
396 |
-
*/
|
397 |
-
MarkerClusterer.prototype.getCalculator = function() {
|
398 |
-
return this.calculator_;
|
399 |
-
};
|
400 |
-
|
401 |
-
|
402 |
-
/**
|
403 |
-
* Add an array of markers to the clusterer.
|
404 |
-
*
|
405 |
-
* @param {Array.<google.maps.Marker>} markers The markers to add.
|
406 |
-
* @param {boolean=} opt_nodraw Whether to redraw the clusters.
|
407 |
-
*/
|
408 |
-
MarkerClusterer.prototype.addMarkers = function(markers, opt_nodraw) {
|
409 |
-
if (markers.length) {
|
410 |
-
for (var i = 0, marker; marker = markers[i]; i++) {
|
411 |
-
this.pushMarkerTo_(marker);
|
412 |
-
}
|
413 |
-
} else if (Object.keys(markers).length) {
|
414 |
-
for (var marker in markers) {
|
415 |
-
this.pushMarkerTo_(markers[marker]);
|
416 |
-
}
|
417 |
-
}
|
418 |
-
if (!opt_nodraw) {
|
419 |
-
this.redraw();
|
420 |
-
}
|
421 |
-
};
|
422 |
-
|
423 |
-
|
424 |
-
/**
|
425 |
-
* Pushes a marker to the clusterer.
|
426 |
-
*
|
427 |
-
* @param {google.maps.Marker} marker The marker to add.
|
428 |
-
* @private
|
429 |
-
*/
|
430 |
-
MarkerClusterer.prototype.pushMarkerTo_ = function(marker) {
|
431 |
-
marker.isAdded = false;
|
432 |
-
if (marker['draggable']) {
|
433 |
-
// If the marker is draggable add a listener so we update the clusters on
|
434 |
-
// the drag end.
|
435 |
-
var that = this;
|
436 |
-
google.maps.event.addListener(marker, 'dragend', function() {
|
437 |
-
marker.isAdded = false;
|
438 |
-
that.repaint();
|
439 |
-
});
|
440 |
-
}
|
441 |
-
this.markers_.push(marker);
|
442 |
-
};
|
443 |
-
|
444 |
-
|
445 |
-
/**
|
446 |
-
* Adds a marker to the clusterer and redraws if needed.
|
447 |
-
*
|
448 |
-
* @param {google.maps.Marker} marker The marker to add.
|
449 |
-
* @param {boolean=} opt_nodraw Whether to redraw the clusters.
|
450 |
-
*/
|
451 |
-
MarkerClusterer.prototype.addMarker = function(marker, opt_nodraw) {
|
452 |
-
this.pushMarkerTo_(marker);
|
453 |
-
if (!opt_nodraw) {
|
454 |
-
this.redraw();
|
455 |
-
}
|
456 |
-
};
|
457 |
-
|
458 |
-
|
459 |
-
/**
|
460 |
-
* Removes a marker and returns true if removed, false if not
|
461 |
-
*
|
462 |
-
* @param {google.maps.Marker} marker The marker to remove
|
463 |
-
* @return {boolean} Whether the marker was removed or not
|
464 |
-
* @private
|
465 |
-
*/
|
466 |
-
MarkerClusterer.prototype.removeMarker_ = function(marker) {
|
467 |
-
var index = -1;
|
468 |
-
if (this.markers_.indexOf) {
|
469 |
-
index = this.markers_.indexOf(marker);
|
470 |
-
} else {
|
471 |
-
for (var i = 0, m; m = this.markers_[i]; i++) {
|
472 |
-
if (m == marker) {
|
473 |
-
index = i;
|
474 |
-
break;
|
475 |
-
}
|
476 |
-
}
|
477 |
-
}
|
478 |
-
|
479 |
-
if (index == -1) {
|
480 |
-
// Marker is not in our list of markers.
|
481 |
-
return false;
|
482 |
-
}
|
483 |
-
|
484 |
-
marker.setMap(null);
|
485 |
-
|
486 |
-
this.markers_.splice(index, 1);
|
487 |
-
|
488 |
-
return true;
|
489 |
-
};
|
490 |
-
|
491 |
-
|
492 |
-
/**
|
493 |
-
* Remove a marker from the cluster.
|
494 |
-
*
|
495 |
-
* @param {google.maps.Marker} marker The marker to remove.
|
496 |
-
* @param {boolean=} opt_nodraw Optional boolean to force no redraw.
|
497 |
-
* @return {boolean} True if the marker was removed.
|
498 |
-
*/
|
499 |
-
MarkerClusterer.prototype.removeMarker = function(marker, opt_nodraw) {
|
500 |
-
var removed = this.removeMarker_(marker);
|
501 |
-
|
502 |
-
if (!opt_nodraw && removed) {
|
503 |
-
this.resetViewport();
|
504 |
-
this.redraw();
|
505 |
-
return true;
|
506 |
-
} else {
|
507 |
-
return false;
|
508 |
-
}
|
509 |
-
};
|
510 |
-
|
511 |
-
|
512 |
-
/**
|
513 |
-
* Removes an array of markers from the cluster.
|
514 |
-
*
|
515 |
-
* @param {Array.<google.maps.Marker>} markers The markers to remove.
|
516 |
-
* @param {boolean=} opt_nodraw Optional boolean to force no redraw.
|
517 |
-
*/
|
518 |
-
MarkerClusterer.prototype.removeMarkers = function(markers, opt_nodraw) {
|
519 |
-
// create a local copy of markers if required
|
520 |
-
// (removeMarker_ modifies the getMarkers() array in place)
|
521 |
-
var markersCopy = markers === this.getMarkers() ? markers.slice() : markers;
|
522 |
-
var removed = false;
|
523 |
-
|
524 |
-
for (var i = 0, marker; marker = markersCopy[i]; i++) {
|
525 |
-
var r = this.removeMarker_(marker);
|
526 |
-
removed = removed || r;
|
527 |
-
}
|
528 |
-
|
529 |
-
if (!opt_nodraw && removed) {
|
530 |
-
this.resetViewport();
|
531 |
-
this.redraw();
|
532 |
-
return true;
|
533 |
-
}
|
534 |
-
};
|
535 |
-
|
536 |
-
|
537 |
-
/**
|
538 |
-
* Sets the clusterer's ready state.
|
539 |
-
*
|
540 |
-
* @param {boolean} ready The state.
|
541 |
-
* @private
|
542 |
-
*/
|
543 |
-
MarkerClusterer.prototype.setReady_ = function(ready) {
|
544 |
-
if (!this.ready_) {
|
545 |
-
this.ready_ = ready;
|
546 |
-
this.createClusters_();
|
547 |
-
}
|
548 |
-
};
|
549 |
-
|
550 |
-
|
551 |
-
/**
|
552 |
-
* Returns the number of clusters in the clusterer.
|
553 |
-
*
|
554 |
-
* @return {number} The number of clusters.
|
555 |
-
*/
|
556 |
-
MarkerClusterer.prototype.getTotalClusters = function() {
|
557 |
-
return this.clusters_.length;
|
558 |
-
};
|
559 |
-
|
560 |
-
|
561 |
-
/**
|
562 |
-
* Returns the google map that the clusterer is associated with.
|
563 |
-
*
|
564 |
-
* @return {google.maps.Map} The map.
|
565 |
-
*/
|
566 |
-
MarkerClusterer.prototype.getMap = function() {
|
567 |
-
return this.map_;
|
568 |
-
};
|
569 |
-
|
570 |
-
|
571 |
-
/**
|
572 |
-
* Sets the google map that the clusterer is associated with.
|
573 |
-
*
|
574 |
-
* @param {google.maps.Map} map The map.
|
575 |
-
*/
|
576 |
-
MarkerClusterer.prototype.setMap = function(map) {
|
577 |
-
this.map_ = map;
|
578 |
-
};
|
579 |
-
|
580 |
-
|
581 |
-
/**
|
582 |
-
* Returns the size of the grid.
|
583 |
-
*
|
584 |
-
* @return {number} The grid size.
|
585 |
-
*/
|
586 |
-
MarkerClusterer.prototype.getGridSize = function() {
|
587 |
-
return this.gridSize_;
|
588 |
-
};
|
589 |
-
|
590 |
-
|
591 |
-
/**
|
592 |
-
* Sets the size of the grid.
|
593 |
-
*
|
594 |
-
* @param {number} size The grid size.
|
595 |
-
*/
|
596 |
-
MarkerClusterer.prototype.setGridSize = function(size) {
|
597 |
-
this.gridSize_ = size;
|
598 |
-
};
|
599 |
-
|
600 |
-
|
601 |
-
/**
|
602 |
-
* Returns the min cluster size.
|
603 |
-
*
|
604 |
-
* @return {number} The grid size.
|
605 |
-
*/
|
606 |
-
MarkerClusterer.prototype.getMinClusterSize = function() {
|
607 |
-
return this.minClusterSize_;
|
608 |
-
};
|
609 |
-
|
610 |
-
/**
|
611 |
-
* Sets the min cluster size.
|
612 |
-
*
|
613 |
-
* @param {number} size The grid size.
|
614 |
-
*/
|
615 |
-
MarkerClusterer.prototype.setMinClusterSize = function(size) {
|
616 |
-
this.minClusterSize_ = size;
|
617 |
-
};
|
618 |
-
|
619 |
-
|
620 |
-
/**
|
621 |
-
* Extends a bounds object by the grid size.
|
622 |
-
*
|
623 |
-
* @param {google.maps.LatLngBounds} bounds The bounds to extend.
|
624 |
-
* @return {google.maps.LatLngBounds} The extended bounds.
|
625 |
-
*/
|
626 |
-
MarkerClusterer.prototype.getExtendedBounds = function(bounds) {
|
627 |
-
var projection = this.getProjection();
|
628 |
-
|
629 |
-
// Turn the bounds into latlng.
|
630 |
-
var tr = new google.maps.LatLng(bounds.getNorthEast().lat(),
|
631 |
-
bounds.getNorthEast().lng());
|
632 |
-
var bl = new google.maps.LatLng(bounds.getSouthWest().lat(),
|
633 |
-
bounds.getSouthWest().lng());
|
634 |
-
|
635 |
-
// Convert the points to pixels and the extend out by the grid size.
|
636 |
-
var trPix = projection.fromLatLngToDivPixel(tr);
|
637 |
-
trPix.x += this.gridSize_;
|
638 |
-
trPix.y -= this.gridSize_;
|
639 |
-
|
640 |
-
var blPix = projection.fromLatLngToDivPixel(bl);
|
641 |
-
blPix.x -= this.gridSize_;
|
642 |
-
blPix.y += this.gridSize_;
|
643 |
-
|
644 |
-
// Convert the pixel points back to LatLng
|
645 |
-
var ne = projection.fromDivPixelToLatLng(trPix);
|
646 |
-
var sw = projection.fromDivPixelToLatLng(blPix);
|
647 |
-
|
648 |
-
// Extend the bounds to contain the new bounds.
|
649 |
-
bounds.extend(ne);
|
650 |
-
bounds.extend(sw);
|
651 |
-
|
652 |
-
return bounds;
|
653 |
-
};
|
654 |
-
|
655 |
-
|
656 |
-
/**
|
657 |
-
* Determins if a marker is contained in a bounds.
|
658 |
-
*
|
659 |
-
* @param {google.maps.Marker} marker The marker to check.
|
660 |
-
* @param {google.maps.LatLngBounds} bounds The bounds to check against.
|
661 |
-
* @return {boolean} True if the marker is in the bounds.
|
662 |
-
* @private
|
663 |
-
*/
|
664 |
-
MarkerClusterer.prototype.isMarkerInBounds_ = function(marker, bounds) {
|
665 |
-
return bounds.contains(marker.getPosition());
|
666 |
-
};
|
667 |
-
|
668 |
-
|
669 |
-
/**
|
670 |
-
* Clears all clusters and markers from the clusterer.
|
671 |
-
*/
|
672 |
-
MarkerClusterer.prototype.clearMarkers = function() {
|
673 |
-
this.resetViewport(true);
|
674 |
-
|
675 |
-
// Set the markers a empty array.
|
676 |
-
this.markers_ = [];
|
677 |
-
};
|
678 |
-
|
679 |
-
|
680 |
-
/**
|
681 |
-
* Clears all existing clusters and recreates them.
|
682 |
-
* @param {boolean} opt_hide To also hide the marker.
|
683 |
-
*/
|
684 |
-
MarkerClusterer.prototype.resetViewport = function(opt_hide) {
|
685 |
-
// Remove all the clusters
|
686 |
-
for (var i = 0, cluster; cluster = this.clusters_[i]; i++) {
|
687 |
-
cluster.remove();
|
688 |
-
}
|
689 |
-
|
690 |
-
// Reset the markers to not be added and to be invisible.
|
691 |
-
for (var i = 0, marker; marker = this.markers_[i]; i++) {
|
692 |
-
marker.isAdded = false;
|
693 |
-
if (opt_hide) {
|
694 |
-
marker.setMap(null);
|
695 |
-
}
|
696 |
-
}
|
697 |
-
|
698 |
-
this.clusters_ = [];
|
699 |
-
};
|
700 |
-
|
701 |
-
/**
|
702 |
-
*
|
703 |
-
*/
|
704 |
-
MarkerClusterer.prototype.repaint = function() {
|
705 |
-
var oldClusters = this.clusters_.slice();
|
706 |
-
this.clusters_.length = 0;
|
707 |
-
this.resetViewport();
|
708 |
-
this.redraw();
|
709 |
-
|
710 |
-
// Remove the old clusters.
|
711 |
-
// Do it in a timeout so the other clusters have been drawn first.
|
712 |
-
window.setTimeout(function() {
|
713 |
-
for (var i = 0, cluster; cluster = oldClusters[i]; i++) {
|
714 |
-
cluster.remove();
|
715 |
-
}
|
716 |
-
}, 0);
|
717 |
-
};
|
718 |
-
|
719 |
-
|
720 |
-
/**
|
721 |
-
* Redraws the clusters.
|
722 |
-
*/
|
723 |
-
MarkerClusterer.prototype.redraw = function() {
|
724 |
-
this.createClusters_();
|
725 |
-
};
|
726 |
-
|
727 |
-
|
728 |
-
/**
|
729 |
-
* Calculates the distance between two latlng locations in km.
|
730 |
-
* @see http://www.movable-type.co.uk/scripts/latlong.html
|
731 |
-
*
|
732 |
-
* @param {google.maps.LatLng} p1 The first lat lng point.
|
733 |
-
* @param {google.maps.LatLng} p2 The second lat lng point.
|
734 |
-
* @return {number} The distance between the two points in km.
|
735 |
-
* @private
|
736 |
-
*/
|
737 |
-
MarkerClusterer.prototype.distanceBetweenPoints_ = function(p1, p2) {
|
738 |
-
if (!p1 || !p2) {
|
739 |
-
return 0;
|
740 |
-
}
|
741 |
-
|
742 |
-
var R = 6371; // Radius of the Earth in km
|
743 |
-
var dLat = (p2.lat() - p1.lat()) * Math.PI / 180;
|
744 |
-
var dLon = (p2.lng() - p1.lng()) * Math.PI / 180;
|
745 |
-
var a = Math.sin(dLat / 2) * Math.sin(dLat / 2) +
|
746 |
-
Math.cos(p1.lat() * Math.PI / 180) * Math.cos(p2.lat() * Math.PI / 180) *
|
747 |
-
Math.sin(dLon / 2) * Math.sin(dLon / 2);
|
748 |
-
var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
|
749 |
-
var d = R * c;
|
750 |
-
return d;
|
751 |
-
};
|
752 |
-
|
753 |
-
|
754 |
-
/**
|
755 |
-
* Add a marker to a cluster, or creates a new cluster.
|
756 |
-
*
|
757 |
-
* @param {google.maps.Marker} marker The marker to add.
|
758 |
-
* @private
|
759 |
-
*/
|
760 |
-
MarkerClusterer.prototype.addToClosestCluster_ = function(marker) {
|
761 |
-
var distance = 40000; // Some large number
|
762 |
-
var clusterToAddTo = null;
|
763 |
-
var pos = marker.getPosition();
|
764 |
-
for (var i = 0, cluster; cluster = this.clusters_[i]; i++) {
|
765 |
-
var center = cluster.getCenter();
|
766 |
-
if (center) {
|
767 |
-
var d = this.distanceBetweenPoints_(center, marker.getPosition());
|
768 |
-
if (d < distance) {
|
769 |
-
distance = d;
|
770 |
-
clusterToAddTo = cluster;
|
771 |
-
}
|
772 |
-
}
|
773 |
-
}
|
774 |
-
|
775 |
-
if (clusterToAddTo && clusterToAddTo.isMarkerInClusterBounds(marker)) {
|
776 |
-
clusterToAddTo.addMarker(marker);
|
777 |
-
} else {
|
778 |
-
var cluster = new Cluster(this);
|
779 |
-
cluster.addMarker(marker);
|
780 |
-
this.clusters_.push(cluster);
|
781 |
-
}
|
782 |
-
};
|
783 |
-
|
784 |
-
|
785 |
-
/**
|
786 |
-
* Creates the clusters.
|
787 |
-
*
|
788 |
-
* @private
|
789 |
-
*/
|
790 |
-
MarkerClusterer.prototype.createClusters_ = function() {
|
791 |
-
if (!this.ready_) {
|
792 |
-
return;
|
793 |
-
}
|
794 |
-
|
795 |
-
// Get our current map view bounds.
|
796 |
-
// Create a new bounds object so we don't affect the map.
|
797 |
-
var mapBounds = new google.maps.LatLngBounds(this.map_.getBounds().getSouthWest(),
|
798 |
-
this.map_.getBounds().getNorthEast());
|
799 |
-
var bounds = this.getExtendedBounds(mapBounds);
|
800 |
-
|
801 |
-
for (var i = 0, marker; marker = this.markers_[i]; i++) {
|
802 |
-
if (!marker.isAdded && this.isMarkerInBounds_(marker, bounds)) {
|
803 |
-
this.addToClosestCluster_(marker);
|
804 |
-
}
|
805 |
-
}
|
806 |
-
};
|
807 |
-
|
808 |
-
|
809 |
-
/**
|
810 |
-
* A cluster that contains markers.
|
811 |
-
*
|
812 |
-
* @param {MarkerClusterer} markerClusterer The markerclusterer that this
|
813 |
-
* cluster is associated with.
|
814 |
-
* @constructor
|
815 |
-
* @ignore
|
816 |
-
*/
|
817 |
-
function Cluster(markerClusterer) {
|
818 |
-
this.markerClusterer_ = markerClusterer;
|
819 |
-
this.map_ = markerClusterer.getMap();
|
820 |
-
this.gridSize_ = markerClusterer.getGridSize();
|
821 |
-
this.minClusterSize_ = markerClusterer.getMinClusterSize();
|
822 |
-
this.averageCenter_ = markerClusterer.isAverageCenter();
|
823 |
-
this.center_ = null;
|
824 |
-
this.markers_ = [];
|
825 |
-
this.bounds_ = null;
|
826 |
-
this.clusterIcon_ = new ClusterIcon(this, markerClusterer.getStyles(),
|
827 |
-
markerClusterer.getGridSize());
|
828 |
-
}
|
829 |
-
|
830 |
-
/**
|
831 |
-
* Determins if a marker is already added to the cluster.
|
832 |
-
*
|
833 |
-
* @param {google.maps.Marker} marker The marker to check.
|
834 |
-
* @return {boolean} True if the marker is already added.
|
835 |
-
*/
|
836 |
-
Cluster.prototype.isMarkerAlreadyAdded = function(marker) {
|
837 |
-
if (this.markers_.indexOf) {
|
838 |
-
return this.markers_.indexOf(marker) != -1;
|
839 |
-
} else {
|
840 |
-
for (var i = 0, m; m = this.markers_[i]; i++) {
|
841 |
-
if (m == marker) {
|
842 |
-
return true;
|
843 |
-
}
|
844 |
-
}
|
845 |
-
}
|
846 |
-
return false;
|
847 |
-
};
|
848 |
-
|
849 |
-
|
850 |
-
/**
|
851 |
-
* Add a marker the cluster.
|
852 |
-
*
|
853 |
-
* @param {google.maps.Marker} marker The marker to add.
|
854 |
-
* @return {boolean} True if the marker was added.
|
855 |
-
*/
|
856 |
-
Cluster.prototype.addMarker = function(marker) {
|
857 |
-
if (this.isMarkerAlreadyAdded(marker)) {
|
858 |
-
return false;
|
859 |
-
}
|
860 |
-
|
861 |
-
if (!this.center_) {
|
862 |
-
this.center_ = marker.getPosition();
|
863 |
-
this.calculateBounds_();
|
864 |
-
} else {
|
865 |
-
if (this.averageCenter_) {
|
866 |
-
var l = this.markers_.length + 1;
|
867 |
-
var lat = (this.center_.lat() * (l-1) + marker.getPosition().lat()) / l;
|
868 |
-
var lng = (this.center_.lng() * (l-1) + marker.getPosition().lng()) / l;
|
869 |
-
this.center_ = new google.maps.LatLng(lat, lng);
|
870 |
-
this.calculateBounds_();
|
871 |
-
}
|
872 |
-
}
|
873 |
-
|
874 |
-
marker.isAdded = true;
|
875 |
-
this.markers_.push(marker);
|
876 |
-
|
877 |
-
var len = this.markers_.length;
|
878 |
-
if (len < this.minClusterSize_ && marker.getMap() != this.map_) {
|
879 |
-
// Min cluster size not reached so show the marker.
|
880 |
-
marker.setMap(this.map_);
|
881 |
-
}
|
882 |
-
|
883 |
-
if (len == this.minClusterSize_) {
|
884 |
-
// Hide the markers that were showing.
|
885 |
-
for (var i = 0; i < len; i++) {
|
886 |
-
this.markers_[i].setMap(null);
|
887 |
-
}
|
888 |
-
}
|
889 |
-
|
890 |
-
if (len >= this.minClusterSize_) {
|
891 |
-
marker.setMap(null);
|
892 |
-
}
|
893 |
-
|
894 |
-
this.updateIcon();
|
895 |
-
return true;
|
896 |
-
};
|
897 |
-
|
898 |
-
|
899 |
-
/**
|
900 |
-
* Returns the marker clusterer that the cluster is associated with.
|
901 |
-
*
|
902 |
-
* @return {MarkerClusterer} The associated marker clusterer.
|
903 |
-
*/
|
904 |
-
Cluster.prototype.getMarkerClusterer = function() {
|
905 |
-
return this.markerClusterer_;
|
906 |
-
};
|
907 |
-
|
908 |
-
|
909 |
-
/**
|
910 |
-
* Returns the bounds of the cluster.
|
911 |
-
*
|
912 |
-
* @return {google.maps.LatLngBounds} the cluster bounds.
|
913 |
-
*/
|
914 |
-
Cluster.prototype.getBounds = function() {
|
915 |
-
var bounds = new google.maps.LatLngBounds(this.center_, this.center_);
|
916 |
-
var markers = this.getMarkers();
|
917 |
-
for (var i = 0, marker; marker = markers[i]; i++) {
|
918 |
-
bounds.extend(marker.getPosition());
|
919 |
-
}
|
920 |
-
return bounds;
|
921 |
-
};
|
922 |
-
|
923 |
-
|
924 |
-
/**
|
925 |
-
* Removes the cluster
|
926 |
-
*/
|
927 |
-
Cluster.prototype.remove = function() {
|
928 |
-
this.clusterIcon_.remove();
|
929 |
-
this.markers_.length = 0;
|
930 |
-
delete this.markers_;
|
931 |
-
};
|
932 |
-
|
933 |
-
|
934 |
-
/**
|
935 |
-
* Returns the number of markers in the cluster.
|
936 |
-
*
|
937 |
-
* @return {number} The number of markers in the cluster.
|
938 |
-
*/
|
939 |
-
Cluster.prototype.getSize = function() {
|
940 |
-
return this.markers_.length;
|
941 |
-
};
|
942 |
-
|
943 |
-
|
944 |
-
/**
|
945 |
-
* Returns a list of the markers in the cluster.
|
946 |
-
*
|
947 |
-
* @return {Array.<google.maps.Marker>} The markers in the cluster.
|
948 |
-
*/
|
949 |
-
Cluster.prototype.getMarkers = function() {
|
950 |
-
return this.markers_;
|
951 |
-
};
|
952 |
-
|
953 |
-
|
954 |
-
/**
|
955 |
-
* Returns the center of the cluster.
|
956 |
-
*
|
957 |
-
* @return {google.maps.LatLng} The cluster center.
|
958 |
-
*/
|
959 |
-
Cluster.prototype.getCenter = function() {
|
960 |
-
return this.center_;
|
961 |
-
};
|
962 |
-
|
963 |
-
|
964 |
-
/**
|
965 |
-
* Calculated the extended bounds of the cluster with the grid.
|
966 |
-
*
|
967 |
-
* @private
|
968 |
-
*/
|
969 |
-
Cluster.prototype.calculateBounds_ = function() {
|
970 |
-
var bounds = new google.maps.LatLngBounds(this.center_, this.center_);
|
971 |
-
this.bounds_ = this.markerClusterer_.getExtendedBounds(bounds);
|
972 |
-
};
|
973 |
-
|
974 |
-
|
975 |
-
/**
|
976 |
-
* Determines if a marker lies in the clusters bounds.
|
977 |
-
*
|
978 |
-
* @param {google.maps.Marker} marker The marker to check.
|
979 |
-
* @return {boolean} True if the marker lies in the bounds.
|
980 |
-
*/
|
981 |
-
Cluster.prototype.isMarkerInClusterBounds = function(marker) {
|
982 |
-
return this.bounds_.contains(marker.getPosition());
|
983 |
-
};
|
984 |
-
|
985 |
-
|
986 |
-
/**
|
987 |
-
* Returns the map that the cluster is associated with.
|
988 |
-
*
|
989 |
-
* @return {google.maps.Map} The map.
|
990 |
-
*/
|
991 |
-
Cluster.prototype.getMap = function() {
|
992 |
-
return this.map_;
|
993 |
-
};
|
994 |
-
|
995 |
-
|
996 |
-
/**
|
997 |
-
* Updates the cluster icon
|
998 |
-
*/
|
999 |
-
Cluster.prototype.updateIcon = function() {
|
1000 |
-
var zoom = this.map_.getZoom();
|
1001 |
-
var mz = this.markerClusterer_.getMaxZoom();
|
1002 |
-
|
1003 |
-
if (mz && zoom > mz) {
|
1004 |
-
// The zoom is greater than our max zoom so show all the markers in cluster.
|
1005 |
-
for (var i = 0, marker; marker = this.markers_[i]; i++) {
|
1006 |
-
marker.setMap(this.map_);
|
1007 |
-
}
|
1008 |
-
return;
|
1009 |
-
}
|
1010 |
-
|
1011 |
-
if (this.markers_.length < this.minClusterSize_) {
|
1012 |
-
// Min cluster size not yet reached.
|
1013 |
-
this.clusterIcon_.hide();
|
1014 |
-
return;
|
1015 |
-
}
|
1016 |
-
|
1017 |
-
var numStyles = this.markerClusterer_.getStyles().length;
|
1018 |
-
var sums = this.markerClusterer_.getCalculator()(this.markers_, numStyles);
|
1019 |
-
this.clusterIcon_.setCenter(this.center_);
|
1020 |
-
this.clusterIcon_.setSums(sums);
|
1021 |
-
this.clusterIcon_.show();
|
1022 |
-
};
|
1023 |
-
|
1024 |
-
|
1025 |
-
/**
|
1026 |
-
* A cluster icon
|
1027 |
-
*
|
1028 |
-
* @param {Cluster} cluster The cluster to be associated with.
|
1029 |
-
* @param {Object} styles An object that has style properties:
|
1030 |
-
* 'url': (string) The image url.
|
1031 |
-
* 'height': (number) The image height.
|
1032 |
-
* 'width': (number) The image width.
|
1033 |
-
* 'anchor': (Array) The anchor position of the label text.
|
1034 |
-
* 'textColor': (string) The text color.
|
1035 |
-
* 'textSize': (number) The text size.
|
1036 |
-
* 'backgroundPosition: (string) The background postition x, y.
|
1037 |
-
* @param {number=} opt_padding Optional padding to apply to the cluster icon.
|
1038 |
-
* @constructor
|
1039 |
-
* @extends google.maps.OverlayView
|
1040 |
-
* @ignore
|
1041 |
-
*/
|
1042 |
-
function ClusterIcon(cluster, styles, opt_padding) {
|
1043 |
-
cluster.getMarkerClusterer().extend(ClusterIcon, google.maps.OverlayView);
|
1044 |
-
|
1045 |
-
this.styles_ = styles;
|
1046 |
-
this.padding_ = opt_padding || 0;
|
1047 |
-
this.cluster_ = cluster;
|
1048 |
-
this.center_ = null;
|
1049 |
-
this.map_ = cluster.getMap();
|
1050 |
-
this.div_ = null;
|
1051 |
-
this.sums_ = null;
|
1052 |
-
this.visible_ = false;
|
1053 |
-
|
1054 |
-
this.setMap(this.map_);
|
1055 |
-
}
|
1056 |
-
|
1057 |
-
|
1058 |
-
/**
|
1059 |
-
* Triggers the clusterclick event and zoom's if the option is set.
|
1060 |
-
*/
|
1061 |
-
ClusterIcon.prototype.triggerClusterClick = function() {
|
1062 |
-
var markerClusterer = this.cluster_.getMarkerClusterer();
|
1063 |
-
|
1064 |
-
// Trigger the clusterclick event.
|
1065 |
-
google.maps.event.trigger(markerClusterer.map_, 'clusterclick', this.cluster_);
|
1066 |
-
|
1067 |
-
if (markerClusterer.isZoomOnClick()) {
|
1068 |
-
// Zoom into the cluster.
|
1069 |
-
this.map_.fitBounds(this.cluster_.getBounds());
|
1070 |
-
}
|
1071 |
-
};
|
1072 |
-
|
1073 |
-
|
1074 |
-
/**
|
1075 |
-
* Adding the cluster icon to the dom.
|
1076 |
-
* @ignore
|
1077 |
-
*/
|
1078 |
-
ClusterIcon.prototype.onAdd = function() {
|
1079 |
-
this.div_ = document.createElement('DIV');
|
1080 |
-
if (this.visible_) {
|
1081 |
-
var pos = this.getPosFromLatLng_(this.center_);
|
1082 |
-
this.div_.style.cssText = this.createCss(pos);
|
1083 |
-
this.div_.innerHTML = this.sums_.text;
|
1084 |
-
}
|
1085 |
-
|
1086 |
-
var panes = this.getPanes();
|
1087 |
-
panes.overlayMouseTarget.appendChild(this.div_);
|
1088 |
-
|
1089 |
-
var that = this;
|
1090 |
-
google.maps.event.addDomListener(this.div_, 'click', function() {
|
1091 |
-
that.triggerClusterClick();
|
1092 |
-
});
|
1093 |
-
};
|
1094 |
-
|
1095 |
-
|
1096 |
-
/**
|
1097 |
-
* Returns the position to place the div dending on the latlng.
|
1098 |
-
*
|
1099 |
-
* @param {google.maps.LatLng} latlng The position in latlng.
|
1100 |
-
* @return {google.maps.Point} The position in pixels.
|
1101 |
-
* @private
|
1102 |
-
*/
|
1103 |
-
ClusterIcon.prototype.getPosFromLatLng_ = function(latlng) {
|
1104 |
-
var pos = this.getProjection().fromLatLngToDivPixel(latlng);
|
1105 |
-
pos.x -= parseInt(this.width_ / 2, 10);
|
1106 |
-
pos.y -= parseInt(this.height_ / 2, 10);
|
1107 |
-
return pos;
|
1108 |
-
};
|
1109 |
-
|
1110 |
-
|
1111 |
-
/**
|
1112 |
-
* Draw the icon.
|
1113 |
-
* @ignore
|
1114 |
-
*/
|
1115 |
-
ClusterIcon.prototype.draw = function() {
|
1116 |
-
if (this.visible_) {
|
1117 |
-
var pos = this.getPosFromLatLng_(this.center_);
|
1118 |
-
this.div_.style.top = pos.y + 'px';
|
1119 |
-
this.div_.style.left = pos.x + 'px';
|
1120 |
-
this.div_.style.zIndex = google.maps.Marker.MAX_ZINDEX + 1;
|
1121 |
-
}
|
1122 |
-
};
|
1123 |
-
|
1124 |
-
|
1125 |
-
/**
|
1126 |
-
* Hide the icon.
|
1127 |
-
*/
|
1128 |
-
ClusterIcon.prototype.hide = function() {
|
1129 |
-
if (this.div_) {
|
1130 |
-
this.div_.style.display = 'none';
|
1131 |
-
}
|
1132 |
-
this.visible_ = false;
|
1133 |
-
};
|
1134 |
-
|
1135 |
-
|
1136 |
-
/**
|
1137 |
-
* Position and show the icon.
|
1138 |
-
*/
|
1139 |
-
ClusterIcon.prototype.show = function() {
|
1140 |
-
if (this.div_) {
|
1141 |
-
var pos = this.getPosFromLatLng_(this.center_);
|
1142 |
-
this.div_.style.cssText = this.createCss(pos);
|
1143 |
-
this.div_.style.display = '';
|
1144 |
-
}
|
1145 |
-
this.visible_ = true;
|
1146 |
-
};
|
1147 |
-
|
1148 |
-
|
1149 |
-
/**
|
1150 |
-
* Remove the icon from the map
|
1151 |
-
*/
|
1152 |
-
ClusterIcon.prototype.remove = function() {
|
1153 |
-
this.setMap(null);
|
1154 |
-
};
|
1155 |
-
|
1156 |
-
|
1157 |
-
/**
|
1158 |
-
* Implementation of the onRemove interface.
|
1159 |
-
* @ignore
|
1160 |
-
*/
|
1161 |
-
ClusterIcon.prototype.onRemove = function() {
|
1162 |
-
if (this.div_ && this.div_.parentNode) {
|
1163 |
-
this.hide();
|
1164 |
-
this.div_.parentNode.removeChild(this.div_);
|
1165 |
-
this.div_ = null;
|
1166 |
-
}
|
1167 |
-
};
|
1168 |
-
|
1169 |
-
|
1170 |
-
/**
|
1171 |
-
* Set the sums of the icon.
|
1172 |
-
*
|
1173 |
-
* @param {Object} sums The sums containing:
|
1174 |
-
* 'text': (string) The text to display in the icon.
|
1175 |
-
* 'index': (number) The style index of the icon.
|
1176 |
-
*/
|
1177 |
-
ClusterIcon.prototype.setSums = function(sums) {
|
1178 |
-
this.sums_ = sums;
|
1179 |
-
this.text_ = sums.text;
|
1180 |
-
this.index_ = sums.index;
|
1181 |
-
if (this.div_) {
|
1182 |
-
this.div_.innerHTML = sums.text;
|
1183 |
-
}
|
1184 |
-
|
1185 |
-
this.useStyle();
|
1186 |
-
};
|
1187 |
-
|
1188 |
-
|
1189 |
-
/**
|
1190 |
-
* Sets the icon to the the styles.
|
1191 |
-
*/
|
1192 |
-
ClusterIcon.prototype.useStyle = function() {
|
1193 |
-
var index = Math.max(0, this.sums_.index - 1);
|
1194 |
-
index = Math.min(this.styles_.length - 1, index);
|
1195 |
-
var style = this.styles_[index];
|
1196 |
-
this.url_ = style['url'];
|
1197 |
-
this.height_ = style['height'];
|
1198 |
-
this.width_ = style['width'];
|
1199 |
-
this.textColor_ = style['textColor'];
|
1200 |
-
this.anchor_ = style['anchor'];
|
1201 |
-
this.textSize_ = style['textSize'];
|
1202 |
-
this.backgroundPosition_ = style['backgroundPosition'];
|
1203 |
-
};
|
1204 |
-
|
1205 |
-
|
1206 |
-
/**
|
1207 |
-
* Sets the center of the icon.
|
1208 |
-
*
|
1209 |
-
* @param {google.maps.LatLng} center The latlng to set as the center.
|
1210 |
-
*/
|
1211 |
-
ClusterIcon.prototype.setCenter = function(center) {
|
1212 |
-
this.center_ = center;
|
1213 |
-
};
|
1214 |
-
|
1215 |
-
|
1216 |
-
/**
|
1217 |
-
* Create the css text based on the position of the icon.
|
1218 |
-
*
|
1219 |
-
* @param {google.maps.Point} pos The position.
|
1220 |
-
* @return {string} The css style text.
|
1221 |
-
*/
|
1222 |
-
ClusterIcon.prototype.createCss = function(pos) {
|
1223 |
-
var style = [];
|
1224 |
-
style.push('background-image:url(' + this.url_ + ');');
|
1225 |
-
var backgroundPosition = this.backgroundPosition_ ? this.backgroundPosition_ : '0 0';
|
1226 |
-
style.push('background-position:' + backgroundPosition + ';');
|
1227 |
-
|
1228 |
-
if (typeof this.anchor_ === 'object') {
|
1229 |
-
if (typeof this.anchor_[0] === 'number' && this.anchor_[0] > 0 &&
|
1230 |
-
this.anchor_[0] < this.height_) {
|
1231 |
-
style.push('height:' + (this.height_ - this.anchor_[0]) +
|
1232 |
-
'px; padding-top:' + this.anchor_[0] + 'px;');
|
1233 |
-
} else {
|
1234 |
-
style.push('height:' + this.height_ + 'px; line-height:' + this.height_ +
|
1235 |
-
'px;');
|
1236 |
-
}
|
1237 |
-
if (typeof this.anchor_[1] === 'number' && this.anchor_[1] > 0 &&
|
1238 |
-
this.anchor_[1] < this.width_) {
|
1239 |
-
style.push('width:' + (this.width_ - this.anchor_[1]) +
|
1240 |
-
'px; padding-left:' + this.anchor_[1] + 'px;');
|
1241 |
-
} else {
|
1242 |
-
style.push('width:' + this.width_ + 'px; text-align:center;');
|
1243 |
-
}
|
1244 |
-
} else {
|
1245 |
-
style.push('height:' + this.height_ + 'px; line-height:' +
|
1246 |
-
this.height_ + 'px; width:' + this.width_ + 'px; text-align:center;');
|
1247 |
-
}
|
1248 |
-
|
1249 |
-
var txtColor = this.textColor_ ? this.textColor_ : 'black';
|
1250 |
-
var txtSize = this.textSize_ ? this.textSize_ : 11;
|
1251 |
-
|
1252 |
-
style.push('cursor:pointer; top:' + pos.y + 'px; left:' +
|
1253 |
-
pos.x + 'px; color:' + txtColor + '; position:absolute; font-size:' +
|
1254 |
-
txtSize + 'px; font-family:Arial,sans-serif; font-weight:bold');
|
1255 |
-
return style.join('');
|
1256 |
-
};
|
1257 |
-
|
1258 |
-
|
1259 |
-
// Export Symbols for Closure
|
1260 |
-
// If you are not going to compile with closure then you can remove the
|
1261 |
-
// code below.
|
1262 |
-
var window = window || {};
|
1263 |
-
window['MarkerClusterer'] = MarkerClusterer;
|
1264 |
-
MarkerClusterer.prototype['addMarker'] = MarkerClusterer.prototype.addMarker;
|
1265 |
-
MarkerClusterer.prototype['addMarkers'] = MarkerClusterer.prototype.addMarkers;
|
1266 |
-
MarkerClusterer.prototype['clearMarkers'] =
|
1267 |
-
MarkerClusterer.prototype.clearMarkers;
|
1268 |
-
MarkerClusterer.prototype['fitMapToMarkers'] =
|
1269 |
-
MarkerClusterer.prototype.fitMapToMarkers;
|
1270 |
-
MarkerClusterer.prototype['getCalculator'] =
|
1271 |
-
MarkerClusterer.prototype.getCalculator;
|
1272 |
-
MarkerClusterer.prototype['getGridSize'] =
|
1273 |
-
MarkerClusterer.prototype.getGridSize;
|
1274 |
-
MarkerClusterer.prototype['getExtendedBounds'] =
|
1275 |
-
MarkerClusterer.prototype.getExtendedBounds;
|
1276 |
-
MarkerClusterer.prototype['getMap'] = MarkerClusterer.prototype.getMap;
|
1277 |
-
MarkerClusterer.prototype['getMarkers'] = MarkerClusterer.prototype.getMarkers;
|
1278 |
-
MarkerClusterer.prototype['getMaxZoom'] = MarkerClusterer.prototype.getMaxZoom;
|
1279 |
-
MarkerClusterer.prototype['getStyles'] = MarkerClusterer.prototype.getStyles;
|
1280 |
-
MarkerClusterer.prototype['getTotalClusters'] =
|
1281 |
-
MarkerClusterer.prototype.getTotalClusters;
|
1282 |
-
MarkerClusterer.prototype['getTotalMarkers'] =
|
1283 |
-
MarkerClusterer.prototype.getTotalMarkers;
|
1284 |
-
MarkerClusterer.prototype['redraw'] = MarkerClusterer.prototype.redraw;
|
1285 |
-
MarkerClusterer.prototype['removeMarker'] =
|
1286 |
-
MarkerClusterer.prototype.removeMarker;
|
1287 |
-
MarkerClusterer.prototype['removeMarkers'] =
|
1288 |
-
MarkerClusterer.prototype.removeMarkers;
|
1289 |
-
MarkerClusterer.prototype['resetViewport'] =
|
1290 |
-
MarkerClusterer.prototype.resetViewport;
|
1291 |
-
MarkerClusterer.prototype['repaint'] =
|
1292 |
-
MarkerClusterer.prototype.repaint;
|
1293 |
-
MarkerClusterer.prototype['setCalculator'] =
|
1294 |
-
MarkerClusterer.prototype.setCalculator;
|
1295 |
-
MarkerClusterer.prototype['setGridSize'] =
|
1296 |
-
MarkerClusterer.prototype.setGridSize;
|
1297 |
-
MarkerClusterer.prototype['setMaxZoom'] =
|
1298 |
-
MarkerClusterer.prototype.setMaxZoom;
|
1299 |
-
MarkerClusterer.prototype['onAdd'] = MarkerClusterer.prototype.onAdd;
|
1300 |
-
MarkerClusterer.prototype['draw'] = MarkerClusterer.prototype.draw;
|
1301 |
-
|
1302 |
-
Cluster.prototype['getCenter'] = Cluster.prototype.getCenter;
|
1303 |
-
Cluster.prototype['getSize'] = Cluster.prototype.getSize;
|
1304 |
-
Cluster.prototype['getMarkers'] = Cluster.prototype.getMarkers;
|
1305 |
-
|
1306 |
-
ClusterIcon.prototype['onAdd'] = ClusterIcon.prototype.onAdd;
|
1307 |
-
ClusterIcon.prototype['draw'] = ClusterIcon.prototype.draw;
|
1308 |
-
ClusterIcon.prototype['onRemove'] = ClusterIcon.prototype.onRemove;
|
1309 |
-
|
1310 |
-
Object.keys = Object.keys || function(o) {
|
1311 |
-
var result = [];
|
1312 |
-
for(var name in o) {
|
1313 |
-
if (o.hasOwnProperty(name))
|
1314 |
-
result.push(name);
|
1315 |
-
}
|
1316 |
-
return result;
|
1317 |
-
};
|
1318 |
-
|
1319 |
-
if (typeof module == 'object') {
|
1320 |
-
module.exports = MarkerClusterer;
|
1321 |
}
|
1 |
+
// ==ClosureCompiler==
|
2 |
+
// @compilation_level ADVANCED_OPTIMIZATIONS
|
3 |
+
// @externs_url http://closure-compiler.googlecode.com/svn/trunk/contrib/externs/maps/google_maps_api_v3_3.js
|
4 |
+
// ==/ClosureCompiler==
|
5 |
+
|
6 |
+
/**
|
7 |
+
* @name MarkerClusterer for Google Maps v3
|
8 |
+
* @version version 1.0.3
|
9 |
+
* @author Luke Mahe
|
10 |
+
* @fileoverview
|
11 |
+
* The library creates and manages per-zoom-level clusters for large amounts of
|
12 |
+
* markers.
|
13 |
+
*/
|
14 |
+
|
15 |
+
/**
|
16 |
+
* @license
|
17 |
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
18 |
+
* you may not use this file except in compliance with the License.
|
19 |
+
* You may obtain a copy of the License at
|
20 |
+
*
|
21 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
22 |
+
*
|
23 |
+
* Unless required by applicable law or agreed to in writing, software
|
24 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
25 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
26 |
+
* See the License for the specific language governing permissions and
|
27 |
+
* limitations under the License.
|
28 |
+
*/
|
29 |
+
|
30 |
+
|
31 |
+
/**
|
32 |
+
* A Marker Clusterer that clusters markers.
|
33 |
+
*
|
34 |
+
* @param {google.maps.Map} map The Google map to attach to.
|
35 |
+
* @param {Array.<google.maps.Marker>=} opt_markers Optional markers to add to
|
36 |
+
* the cluster.
|
37 |
+
* @param {Object=} opt_options support the following options:
|
38 |
+
* 'gridSize': (number) The grid size of a cluster in pixels.
|
39 |
+
* 'maxZoom': (number) The maximum zoom level that a marker can be part of a
|
40 |
+
* cluster.
|
41 |
+
* 'zoomOnClick': (boolean) Whether the default behaviour of clicking on a
|
42 |
+
* cluster is to zoom into it.
|
43 |
+
* 'imagePath': (string) The base URL where the images representing
|
44 |
+
* clusters will be found. The full URL will be:
|
45 |
+
* {imagePath}[1-5].{imageExtension}
|
46 |
+
* Default: '../images/m'.
|
47 |
+
* 'imageExtension': (string) The suffix for images URL representing
|
48 |
+
* clusters will be found. See _imagePath_ for details.
|
49 |
+
* Default: 'png'.
|
50 |
+
* 'averageCenter': (boolean) Whether the center of each cluster should be
|
51 |
+
* the average of all markers in the cluster.
|
52 |
+
* 'minimumClusterSize': (number) The minimum number of markers to be in a
|
53 |
+
* cluster before the markers are hidden and a count
|
54 |
+
* is shown.
|
55 |
+
* 'styles': (object) An object that has style properties:
|
56 |
+
* 'url': (string) The image url.
|
57 |
+
* 'height': (number) The image height.
|
58 |
+
* 'width': (number) The image width.
|
59 |
+
* 'anchor': (Array) The anchor position of the label text.
|
60 |
+
* 'textColor': (string) The text color.
|
61 |
+
* 'textSize': (number) The text size.
|
62 |
+
* 'backgroundPosition': (string) The position of the backgound x, y.
|
63 |
+
* @constructor
|
64 |
+
* @extends google.maps.OverlayView
|
65 |
+
*/
|
66 |
+
function MarkerClusterer(map, opt_markers, opt_options) {
|
67 |
+
// MarkerClusterer implements google.maps.OverlayView interface. We use the
|
68 |
+
// extend function to extend MarkerClusterer with google.maps.OverlayView
|
69 |
+
// because it might not always be available when the code is defined so we
|
70 |
+
// look for it at the last possible moment. If it doesn't exist now then
|
71 |
+
// there is no point going ahead :)
|
72 |
+
this.extend(MarkerClusterer, google.maps.OverlayView);
|
73 |
+
this.map_ = map;
|
74 |
+
|
75 |
+
/**
|
76 |
+
* @type {Array.<google.maps.Marker>}
|
77 |
+
* @private
|
78 |
+
*/
|
79 |
+
this.markers_ = [];
|
80 |
+
|
81 |
+
/**
|
82 |
+
* @type {Array.<Cluster>}
|
83 |
+
*/
|
84 |
+
this.clusters_ = [];
|
85 |
+
|
86 |
+
this.sizes = [53, 56, 66, 78, 90];
|
87 |
+
|
88 |
+
/**
|
89 |
+
* @private
|
90 |
+
*/
|
91 |
+
this.styles_ = [];
|
92 |
+
|
93 |
+
/**
|
94 |
+
* @type {boolean}
|
95 |
+
* @private
|
96 |
+
*/
|
97 |
+
this.ready_ = false;
|
98 |
+
|
99 |
+
var options = opt_options || {};
|
100 |
+
|
101 |
+
/**
|
102 |
+
* @type {number}
|
103 |
+
* @private
|
104 |
+
*/
|
105 |
+
this.gridSize_ = options['gridSize'] || 60;
|
106 |
+
|
107 |
+
/**
|
108 |
+
* @private
|
109 |
+
*/
|
110 |
+
this.minClusterSize_ = options['minimumClusterSize'] || 2;
|
111 |
+
|
112 |
+
|
113 |
+
/**
|
114 |
+
* @type {?number}
|
115 |
+
* @private
|
116 |
+
*/
|
117 |
+
this.maxZoom_ = options['maxZoom'] || null;
|
118 |
+
|
119 |
+
this.styles_ = options['styles'] || [];
|
120 |
+
|
121 |
+
/**
|
122 |
+
* @type {string}
|
123 |
+
* @private
|
124 |
+
*/
|
125 |
+
this.imagePath_ = options['imagePath'] ||
|
126 |
+
this.MARKER_CLUSTER_IMAGE_PATH_;
|
127 |
+
|
128 |
+
/**
|
129 |
+
* @type {string}
|
130 |
+
* @private
|
131 |
+
*/
|
132 |
+
this.imageExtension_ = options['imageExtension'] ||
|
133 |
+
this.MARKER_CLUSTER_IMAGE_EXTENSION_;
|
134 |
+
|
135 |
+
/**
|
136 |
+
* @type {boolean}
|
137 |
+
* @private
|
138 |
+
*/
|
139 |
+
this.zoomOnClick_ = true;
|
140 |
+
|
141 |
+
if (options['zoomOnClick'] != undefined) {
|
142 |
+
this.zoomOnClick_ = options['zoomOnClick'];
|
143 |
+
}
|
144 |
+
|
145 |
+
/**
|
146 |
+
* @type {boolean}
|
147 |
+
* @private
|
148 |
+
*/
|
149 |
+
this.averageCenter_ = false;
|
150 |
+
|
151 |
+
if (options['averageCenter'] != undefined) {
|
152 |
+
this.averageCenter_ = options['averageCenter'];
|
153 |
+
}
|
154 |
+
|
155 |
+
this.setupStyles_();
|
156 |
+
|
157 |
+
this.setMap(map);
|
158 |
+
|
159 |
+
/**
|
160 |
+
* @type {number}
|
161 |
+
* @private
|
162 |
+
*/
|
163 |
+
this.prevZoom_ = this.map_.getZoom();
|
164 |
+
|
165 |
+
// Add the map event listeners
|
166 |
+
var that = this;
|
167 |
+
google.maps.event.addListener(this.map_, 'zoom_changed', function() {
|
168 |
+
// Determines map type and prevent illegal zoom levels
|
169 |
+
var zoom = that.map_.getZoom();
|
170 |
+
var minZoom = that.map_.minZoom || 0;
|
171 |
+
var maxZoom = Math.min(that.map_.maxZoom || 100,
|
172 |
+
that.map_.mapTypes[that.map_.getMapTypeId()].maxZoom);
|
173 |
+
zoom = Math.min(Math.max(zoom,minZoom),maxZoom);
|
174 |
+
|
175 |
+
if (that.prevZoom_ != zoom) {
|
176 |
+
that.prevZoom_ = zoom;
|
177 |
+
that.resetViewport();
|
178 |
+
}
|
179 |
+
});
|
180 |
+
|
181 |
+
google.maps.event.addListener(this.map_, 'idle', function() {
|
182 |
+
that.redraw();
|
183 |
+
});
|
184 |
+
|
185 |
+
// Finally, add the markers
|
186 |
+
if (opt_markers && (opt_markers.length || Object.keys(opt_markers).length)) {
|
187 |
+
this.addMarkers(opt_markers, false);
|
188 |
+
}
|
189 |
+
}
|
190 |
+
|
191 |
+
|
192 |
+
/**
|
193 |
+
* The marker cluster image path.
|
194 |
+
*
|
195 |
+
* @type {string}
|
196 |
+
* @private
|
197 |
+
*/
|
198 |
+
MarkerClusterer.prototype.MARKER_CLUSTER_IMAGE_PATH_ = '../images/m';
|
199 |
+
|
200 |
+
|
201 |
+
/**
|
202 |
+
* The marker cluster image path.
|
203 |
+
*
|
204 |
+
* @type {string}
|
205 |
+
* @private
|
206 |
+
*/
|
207 |
+
MarkerClusterer.prototype.MARKER_CLUSTER_IMAGE_EXTENSION_ = 'png';
|
208 |
+
|
209 |
+
|
210 |
+
/**
|
211 |
+
* Extends a objects prototype by anothers.
|
212 |
+
*
|
213 |
+
* @param {Object} obj1 The object to be extended.
|
214 |
+
* @param {Object} obj2 The object to extend with.
|
215 |
+
* @return {Object} The new extended object.
|
216 |
+
* @ignore
|
217 |
+
*/
|
218 |
+
MarkerClusterer.prototype.extend = function(obj1, obj2) {
|
219 |
+
return (function(object) {
|
220 |
+
for (var property in object.prototype) {
|
221 |
+
this.prototype[property] = object.prototype[property];
|
222 |
+
}
|
223 |
+
return this;
|
224 |
+
}).apply(obj1, [obj2]);
|
225 |
+
};
|
226 |
+
|
227 |
+
|
228 |
+
/**
|
229 |
+
* Implementaion of the interface method.
|
230 |
+
* @ignore
|
231 |
+
*/
|
232 |
+
MarkerClusterer.prototype.onAdd = function() {
|
233 |
+
this.setReady_(true);
|
234 |
+
};
|
235 |
+
|
236 |
+
/**
|
237 |
+
* Implementaion of the interface method.
|
238 |
+
* @ignore
|
239 |
+
*/
|
240 |
+
MarkerClusterer.prototype.draw = function() {};
|
241 |
+
|
242 |
+
/**
|
243 |
+
* Sets up the styles object.
|
244 |
+
*
|
245 |
+
* @private
|
246 |
+
*/
|
247 |
+
MarkerClusterer.prototype.setupStyles_ = function() {
|
248 |
+
if (this.styles_.length) {
|
249 |
+
return;
|
250 |
+
}
|
251 |
+
|
252 |
+
for (var i = 0, size; size = this.sizes[i]; i++) {
|
253 |
+
this.styles_.push({
|
254 |
+
url: this.imagePath_ + (i + 1) + '.' + this.imageExtension_,
|
255 |
+
height: size,
|
256 |
+
width: size
|
257 |
+
});
|
258 |
+
}
|
259 |
+
};
|
260 |
+
|
261 |
+
/**
|
262 |
+
* Fit the map to the bounds of the markers in the clusterer.
|
263 |
+
*/
|
264 |
+
MarkerClusterer.prototype.fitMapToMarkers = function() {
|
265 |
+
var markers = this.getMarkers();
|
266 |
+
var bounds = new google.maps.LatLngBounds();
|
267 |
+
for (var i = 0, marker; marker = markers[i]; i++) {
|
268 |
+
bounds.extend(marker.getPosition());
|
269 |
+
}
|
270 |
+
|
271 |
+
this.map_.fitBounds(bounds);
|
272 |
+
};
|
273 |
+
|
274 |
+
|
275 |
+
/**
|
276 |
+
* Sets the styles.
|
277 |
+
*
|
278 |
+
* @param {Object} styles The style to set.
|
279 |
+
*/
|
280 |
+
MarkerClusterer.prototype.setStyles = function(styles) {
|
281 |
+
this.styles_ = styles;
|
282 |
+
};
|
283 |
+
|
284 |
+
|
285 |
+
/**
|
286 |
+
* Gets the styles.
|
287 |
+
*
|
288 |
+
* @return {Object} The styles object.
|
289 |
+
*/
|
290 |
+
MarkerClusterer.prototype.getStyles = function() {
|
291 |
+
return this.styles_;
|
292 |
+
};
|
293 |
+
|
294 |
+
|
295 |
+
/**
|
296 |
+
* Whether zoom on click is set.
|
297 |
+
*
|
298 |
+
* @return {boolean} True if zoomOnClick_ is set.
|
299 |
+
*/
|
300 |
+
MarkerClusterer.prototype.isZoomOnClick = function() {
|
301 |
+
return this.zoomOnClick_;
|
302 |
+
};
|
303 |
+
|
304 |
+
/**
|
305 |
+
* Whether average center is set.
|
306 |
+
*
|
307 |
+
* @return {boolean} True if averageCenter_ is set.
|
308 |
+
*/
|
309 |
+
MarkerClusterer.prototype.isAverageCenter = function() {
|
310 |
+
return this.averageCenter_;
|
311 |
+
};
|
312 |
+
|
313 |
+
|
314 |
+
/**
|
315 |
+
* Returns the array of markers in the clusterer.
|
316 |
+
*
|
317 |
+
* @return {Array.<google.maps.Marker>} The markers.
|
318 |
+
*/
|
319 |
+
MarkerClusterer.prototype.getMarkers = function() {
|
320 |
+
return this.markers_;
|
321 |
+
};
|
322 |
+
|
323 |
+
|
324 |
+
/**
|
325 |
+
* Returns the number of markers in the clusterer
|
326 |
+
*
|
327 |
+
* @return {Number} The number of markers.
|
328 |
+
*/
|
329 |
+
MarkerClusterer.prototype.getTotalMarkers = function() {
|
330 |
+
return this.markers_.length;
|
331 |
+
};
|
332 |
+
|
333 |
+
|
334 |
+
/**
|
335 |
+
* Sets the max zoom for the clusterer.
|
336 |
+
*
|
337 |
+
* @param {number} maxZoom The max zoom level.
|
338 |
+
*/
|
339 |
+
MarkerClusterer.prototype.setMaxZoom = function(maxZoom) {
|
340 |
+
this.maxZoom_ = maxZoom;
|
341 |
+
};
|
342 |
+
|
343 |
+
|
344 |
+
/**
|
345 |
+
* Gets the max zoom for the clusterer.
|
346 |
+
*
|
347 |
+
* @return {number} The max zoom level.
|
348 |
+
*/
|
349 |
+
MarkerClusterer.prototype.getMaxZoom = function() {
|
350 |
+
return this.maxZoom_;
|
351 |
+
};
|
352 |
+
|
353 |
+
|
354 |
+
/**
|
355 |
+
* The function for calculating the cluster icon image.
|
356 |
+
*
|
357 |
+
* @param {Array.<google.maps.Marker>} markers The markers in the clusterer.
|
358 |
+
* @param {number} numStyles The number of styles available.
|
359 |
+
* @return {Object} A object properties: 'text' (string) and 'index' (number).
|
360 |
+
* @private
|
361 |
+
*/
|
362 |
+
MarkerClusterer.prototype.calculator_ = function(markers, numStyles) {
|
363 |
+
var index = 0;
|
364 |
+
var count = markers.length;
|
365 |
+
var dv = count;
|
366 |
+
while (dv !== 0) {
|
367 |
+
dv = parseInt(dv / 10, 10);
|
368 |
+
index++;
|
369 |
+
}
|
370 |
+
|
371 |
+
index = Math.min(index, numStyles);
|
372 |
+
return {
|
373 |
+
text: count,
|
374 |
+
index: index
|
375 |
+
};
|
376 |
+
};
|
377 |
+
|
378 |
+
|
379 |
+
/**
|
380 |
+
* Set the calculator function.
|
381 |
+
*
|
382 |
+
* @param {function(Array, number)} calculator The function to set as the
|
383 |
+
* calculator. The function should return a object properties:
|
384 |
+
* 'text' (string) and 'index' (number).
|
385 |
+
*
|
386 |
+
*/
|
387 |
+
MarkerClusterer.prototype.setCalculator = function(calculator) {
|
388 |
+
this.calculator_ = calculator;
|
389 |
+
};
|
390 |
+
|
391 |
+
|
392 |
+
/**
|
393 |
+
* Get the calculator function.
|
394 |
+
*
|
395 |
+
* @return {function(Array, number)} the calculator function.
|
396 |
+
*/
|
397 |
+
MarkerClusterer.prototype.getCalculator = function() {
|
398 |
+
return this.calculator_;
|
399 |
+
};
|
400 |
+
|
401 |
+
|
402 |
+
/**
|
403 |
+
* Add an array of markers to the clusterer.
|
404 |
+
*
|
405 |
+
* @param {Array.<google.maps.Marker>} markers The markers to add.
|
406 |
+
* @param {boolean=} opt_nodraw Whether to redraw the clusters.
|
407 |
+
*/
|
408 |
+
MarkerClusterer.prototype.addMarkers = function(markers, opt_nodraw) {
|
409 |
+
if (markers.length) {
|
410 |
+
for (var i = 0, marker; marker = markers[i]; i++) {
|
411 |
+
this.pushMarkerTo_(marker);
|
412 |
+
}
|
413 |
+
} else if (Object.keys(markers).length) {
|
414 |
+
for (var marker in markers) {
|
415 |
+
this.pushMarkerTo_(markers[marker]);
|
416 |
+
}
|
417 |
+
}
|
418 |
+
if (!opt_nodraw) {
|
419 |
+
this.redraw();
|
420 |
+
}
|
421 |
+
};
|
422 |
+
|
423 |
+
|
424 |
+
/**
|
425 |
+
* Pushes a marker to the clusterer.
|
426 |
+
*
|
427 |
+
* @param {google.maps.Marker} marker The marker to add.
|
428 |
+
* @private
|
429 |
+
*/
|
430 |
+
MarkerClusterer.prototype.pushMarkerTo_ = function(marker) {
|
431 |
+
marker.isAdded = false;
|
432 |
+
if (marker['draggable']) {
|
433 |
+
// If the marker is draggable add a listener so we update the clusters on
|
434 |
+
// the drag end.
|
435 |
+
var that = this;
|
436 |
+
google.maps.event.addListener(marker, 'dragend', function() {
|
437 |
+
marker.isAdded = false;
|
438 |
+
that.repaint();
|
439 |
+
});
|
440 |
+
}
|
441 |
+
this.markers_.push(marker);
|
442 |
+
};
|
443 |
+
|
444 |
+
|
445 |
+
/**
|
446 |
+
* Adds a marker to the clusterer and redraws if needed.
|
447 |
+
*
|
448 |
+
* @param {google.maps.Marker} marker The marker to add.
|
449 |
+
* @param {boolean=} opt_nodraw Whether to redraw the clusters.
|
450 |
+
*/
|
451 |
+
MarkerClusterer.prototype.addMarker = function(marker, opt_nodraw) {
|
452 |
+
this.pushMarkerTo_(marker);
|
453 |
+
if (!opt_nodraw) {
|
454 |
+
this.redraw();
|
455 |
+
}
|
456 |
+
};
|
457 |
+
|
458 |
+
|
459 |
+
/**
|
460 |
+
* Removes a marker and returns true if removed, false if not
|
461 |
+
*
|
462 |
+
* @param {google.maps.Marker} marker The marker to remove
|
463 |
+
* @return {boolean} Whether the marker was removed or not
|
464 |
+
* @private
|
465 |
+
*/
|
466 |
+
MarkerClusterer.prototype.removeMarker_ = function(marker) {
|
467 |
+
var index = -1;
|
468 |
+
if (this.markers_.indexOf) {
|
469 |
+
index = this.markers_.indexOf(marker);
|
470 |
+
} else {
|
471 |
+
for (var i = 0, m; m = this.markers_[i]; i++) {
|
472 |
+
if (m == marker) {
|
473 |
+
index = i;
|
474 |
+
break;
|
475 |
+
}
|
476 |
+
}
|
477 |
+
}
|
478 |
+
|
479 |
+
if (index == -1) {
|
480 |
+
// Marker is not in our list of markers.
|
481 |
+
return false;
|
482 |
+
}
|
483 |
+
|
484 |
+
marker.setMap(null);
|
485 |
+
|
486 |
+
this.markers_.splice(index, 1);
|
487 |
+
|
488 |
+
return true;
|
489 |
+
};
|
490 |
+
|
491 |
+
|
492 |
+
/**
|
493 |
+
* Remove a marker from the cluster.
|
494 |
+
*
|
495 |
+
* @param {google.maps.Marker} marker The marker to remove.
|
496 |
+
* @param {boolean=} opt_nodraw Optional boolean to force no redraw.
|
497 |
+
* @return {boolean} True if the marker was removed.
|
498 |
+
*/
|
499 |
+
MarkerClusterer.prototype.removeMarker = function(marker, opt_nodraw) {
|
500 |
+
var removed = this.removeMarker_(marker);
|
501 |
+
|
502 |
+
if (!opt_nodraw && removed) {
|
503 |
+
this.resetViewport();
|
504 |
+
this.redraw();
|
505 |
+
return true;
|
506 |
+
} else {
|
507 |
+
return false;
|
508 |
+
}
|
509 |
+
};
|
510 |
+
|
511 |
+
|
512 |
+
/**
|
513 |
+
* Removes an array of markers from the cluster.
|
514 |
+
*
|
515 |
+
* @param {Array.<google.maps.Marker>} markers The markers to remove.
|
516 |
+
* @param {boolean=} opt_nodraw Optional boolean to force no redraw.
|
517 |
+
*/
|
518 |
+
MarkerClusterer.prototype.removeMarkers = function(markers, opt_nodraw) {
|
519 |
+
// create a local copy of markers if required
|
520 |
+
// (removeMarker_ modifies the getMarkers() array in place)
|
521 |
+
var markersCopy = markers === this.getMarkers() ? markers.slice() : markers;
|
522 |
+
var removed = false;
|
523 |
+
|
524 |
+
for (var i = 0, marker; marker = markersCopy[i]; i++) {
|
525 |
+
var r = this.removeMarker_(marker);
|
526 |
+
removed = removed || r;
|
527 |
+
}
|
528 |
+
|
529 |
+
if (!opt_nodraw && removed) {
|
530 |
+
this.resetViewport();
|
531 |
+
this.redraw();
|
532 |
+
return true;
|
533 |
+
}
|
534 |
+
};
|
535 |
+
|
536 |
+
|
537 |
+
/**
|
538 |
+
* Sets the clusterer's ready state.
|
539 |
+
*
|
540 |
+
* @param {boolean} ready The state.
|
541 |
+
* @private
|
542 |
+
*/
|
543 |
+
MarkerClusterer.prototype.setReady_ = function(ready) {
|
544 |
+
if (!this.ready_) {
|
545 |
+
this.ready_ = ready;
|
546 |
+
this.createClusters_();
|
547 |
+
}
|
548 |
+
};
|
549 |
+
|
550 |
+
|
551 |
+
/**
|
552 |
+
* Returns the number of clusters in the clusterer.
|
553 |
+
*
|
554 |
+
* @return {number} The number of clusters.
|
555 |
+
*/
|
556 |
+
MarkerClusterer.prototype.getTotalClusters = function() {
|
557 |
+
return this.clusters_.length;
|
558 |
+
};
|
559 |
+
|
560 |
+
|
561 |
+
/**
|
562 |
+
* Returns the google map that the clusterer is associated with.
|
563 |
+
*
|
564 |
+
* @return {google.maps.Map} The map.
|
565 |
+
*/
|
566 |
+
MarkerClusterer.prototype.getMap = function() {
|
567 |
+
return this.map_;
|
568 |
+
};
|
569 |
+
|
570 |
+
|
571 |
+
/**
|
572 |
+
* Sets the google map that the clusterer is associated with.
|
573 |
+
*
|
574 |
+
* @param {google.maps.Map} map The map.
|
575 |
+
*/
|
576 |
+
MarkerClusterer.prototype.setMap = function(map) {
|
577 |
+
this.map_ = map;
|
578 |
+
};
|
579 |
+
|
580 |
+
|
581 |
+
/**
|
582 |
+
* Returns the size of the grid.
|
583 |
+
*
|
584 |
+
* @return {number} The grid size.
|
585 |
+
*/
|
586 |
+
MarkerClusterer.prototype.getGridSize = function() {
|
587 |
+
return this.gridSize_;
|
588 |
+
};
|
589 |
+
|
590 |
+
|
591 |
+
/**
|
592 |
+
* Sets the size of the grid.
|
593 |
+
*
|
594 |
+
* @param {number} size The grid size.
|
595 |
+
*/
|
596 |
+
MarkerClusterer.prototype.setGridSize = function(size) {
|
597 |
+
this.gridSize_ = size;
|
598 |
+
};
|
599 |
+
|
600 |
+
|
601 |
+
/**
|
602 |
+
* Returns the min cluster size.
|
603 |
+
*
|
604 |
+
* @return {number} The grid size.
|
605 |
+
*/
|
606 |
+
MarkerClusterer.prototype.getMinClusterSize = function() {
|
607 |
+
return this.minClusterSize_;
|
608 |
+
};
|
609 |
+
|
610 |
+
/**
|
611 |
+
* Sets the min cluster size.
|
612 |
+
*
|
613 |
+
* @param {number} size The grid size.
|
614 |
+
*/
|
615 |
+
MarkerClusterer.prototype.setMinClusterSize = function(size) {
|
616 |
+
this.minClusterSize_ = size;
|
617 |
+
};
|
618 |
+
|
619 |
+
|
620 |
+
/**
|
621 |
+
* Extends a bounds object by the grid size.
|
622 |
+
*
|
623 |
+
* @param {google.maps.LatLngBounds} bounds The bounds to extend.
|
624 |
+
* @return {google.maps.LatLngBounds} The extended bounds.
|
625 |
+
*/
|
626 |
+
MarkerClusterer.prototype.getExtendedBounds = function(bounds) {
|
627 |
+
var projection = this.getProjection();
|
628 |
+
|
629 |
+
// Turn the bounds into latlng.
|
630 |
+
var tr = new google.maps.LatLng(bounds.getNorthEast().lat(),
|
631 |
+
bounds.getNorthEast().lng());
|
632 |
+
var bl = new google.maps.LatLng(bounds.getSouthWest().lat(),
|
633 |
+
bounds.getSouthWest().lng());
|
634 |
+
|
635 |
+
// Convert the points to pixels and the extend out by the grid size.
|
636 |
+
var trPix = projection.fromLatLngToDivPixel(tr);
|
637 |
+
trPix.x += this.gridSize_;
|
638 |
+
trPix.y -= this.gridSize_;
|
639 |
+
|
640 |
+
var blPix = projection.fromLatLngToDivPixel(bl);
|
641 |
+
blPix.x -= this.gridSize_;
|
642 |
+
blPix.y += this.gridSize_;
|
643 |
+
|
644 |
+
// Convert the pixel points back to LatLng
|
645 |
+
var ne = projection.fromDivPixelToLatLng(trPix);
|
646 |
+
var sw = projection.fromDivPixelToLatLng(blPix);
|
647 |
+
|
648 |
+
// Extend the bounds to contain the new bounds.
|
649 |
+
bounds.extend(ne);
|
650 |
+
bounds.extend(sw);
|
651 |
+
|
652 |
+
return bounds;
|
653 |
+
};
|
654 |
+
|
655 |
+
|
656 |
+
/**
|
657 |
+
* Determins if a marker is contained in a bounds.
|
658 |
+
*
|
659 |
+
* @param {google.maps.Marker} marker The marker to check.
|
660 |
+
* @param {google.maps.LatLngBounds} bounds The bounds to check against.
|
661 |
+
* @return {boolean} True if the marker is in the bounds.
|
662 |
+
* @private
|
663 |
+
*/
|
664 |
+
MarkerClusterer.prototype.isMarkerInBounds_ = function(marker, bounds) {
|
665 |
+
return bounds.contains(marker.getPosition());
|
666 |
+
};
|
667 |
+
|
668 |
+
|
669 |
+
/**
|
670 |
+
* Clears all clusters and markers from the clusterer.
|
671 |
+
*/
|
672 |
+
MarkerClusterer.prototype.clearMarkers = function() {
|
673 |
+
this.resetViewport(true);
|
674 |
+
|
675 |
+
// Set the markers a empty array.
|
676 |
+
this.markers_ = [];
|
677 |
+
};
|
678 |
+
|
679 |
+
|
680 |
+
/**
|
681 |
+
* Clears all existing clusters and recreates them.
|
682 |
+
* @param {boolean} opt_hide To also hide the marker.
|
683 |
+
*/
|
684 |
+
MarkerClusterer.prototype.resetViewport = function(opt_hide) {
|
685 |
+
// Remove all the clusters
|
686 |
+
for (var i = 0, cluster; cluster = this.clusters_[i]; i++) {
|
687 |
+
cluster.remove();
|
688 |
+
}
|
689 |
+
|
690 |
+
// Reset the markers to not be added and to be invisible.
|
691 |
+
for (var i = 0, marker; marker = this.markers_[i]; i++) {
|
692 |
+
marker.isAdded = false;
|
693 |
+
if (opt_hide) {
|
694 |
+
marker.setMap(null);
|
695 |
+
}
|
696 |
+
}
|
697 |
+
|
698 |
+
this.clusters_ = [];
|
699 |
+
};
|
700 |
+
|
701 |
+
/**
|
702 |
+
*
|
703 |
+
*/
|
704 |
+
MarkerClusterer.prototype.repaint = function() {
|
705 |
+
var oldClusters = this.clusters_.slice();
|
706 |
+
this.clusters_.length = 0;
|
707 |
+
this.resetViewport();
|
708 |
+
this.redraw();
|
709 |
+
|
710 |
+
// Remove the old clusters.
|
711 |
+
// Do it in a timeout so the other clusters have been drawn first.
|
712 |
+
window.setTimeout(function() {
|
713 |
+
for (var i = 0, cluster; cluster = oldClusters[i]; i++) {
|
714 |
+
cluster.remove();
|
715 |
+
}
|
716 |
+
}, 0);
|
717 |
+
};
|
718 |
+
|
719 |
+
|
720 |
+
/**
|
721 |
+
* Redraws the clusters.
|
722 |
+
*/
|
723 |
+
MarkerClusterer.prototype.redraw = function() {
|
724 |
+
this.createClusters_();
|
725 |
+
};
|
726 |
+
|
727 |
+
|
728 |
+
/**
|
729 |
+
* Calculates the distance between two latlng locations in km.
|
730 |
+
* @see http://www.movable-type.co.uk/scripts/latlong.html
|
731 |
+
*
|
732 |
+
* @param {google.maps.LatLng} p1 The first lat lng point.
|
733 |
+
* @param {google.maps.LatLng} p2 The second lat lng point.
|
734 |
+
* @return {number} The distance between the two points in km.
|
735 |
+
* @private
|
736 |
+
*/
|
737 |
+
MarkerClusterer.prototype.distanceBetweenPoints_ = function(p1, p2) {
|
738 |
+
if (!p1 || !p2) {
|
739 |
+
return 0;
|
740 |
+
}
|
741 |
+
|
742 |
+
var R = 6371; // Radius of the Earth in km
|
743 |
+
var dLat = (p2.lat() - p1.lat()) * Math.PI / 180;
|
744 |
+
var dLon = (p2.lng() - p1.lng()) * Math.PI / 180;
|
745 |
+
var a = Math.sin(dLat / 2) * Math.sin(dLat / 2) +
|
746 |
+
Math.cos(p1.lat() * Math.PI / 180) * Math.cos(p2.lat() * Math.PI / 180) *
|
747 |
+
Math.sin(dLon / 2) * Math.sin(dLon / 2);
|
748 |
+
var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
|
749 |
+
var d = R * c;
|
750 |
+
return d;
|
751 |
+
};
|
752 |
+
|
753 |
+
|
754 |
+
/**
|
755 |
+
* Add a marker to a cluster, or creates a new cluster.
|
756 |
+
*
|
757 |
+
* @param {google.maps.Marker} marker The marker to add.
|
758 |
+
* @private
|
759 |
+
*/
|
760 |
+
MarkerClusterer.prototype.addToClosestCluster_ = function(marker) {
|
761 |
+
var distance = 40000; // Some large number
|
762 |
+
var clusterToAddTo = null;
|
763 |
+
var pos = marker.getPosition();
|
764 |
+
for (var i = 0, cluster; cluster = this.clusters_[i]; i++) {
|
765 |
+
var center = cluster.getCenter();
|
766 |
+
if (center) {
|
767 |
+
var d = this.distanceBetweenPoints_(center, marker.getPosition());
|
768 |
+
if (d < distance) {
|
769 |
+
distance = d;
|
770 |
+
clusterToAddTo = cluster;
|
771 |
+
}
|
772 |
+
}
|
773 |
+
}
|
774 |
+
|
775 |
+
if (clusterToAddTo && clusterToAddTo.isMarkerInClusterBounds(marker)) {
|
776 |
+
clusterToAddTo.addMarker(marker);
|
777 |
+
} else {
|
778 |
+
var cluster = new Cluster(this);
|
779 |
+
cluster.addMarker(marker);
|
780 |
+
this.clusters_.push(cluster);
|
781 |
+
}
|
782 |
+
};
|
783 |
+
|
784 |
+
|
785 |
+
/**
|
786 |
+
* Creates the clusters.
|
787 |
+
*
|
788 |
+
* @private
|
789 |
+
*/
|
790 |
+
MarkerClusterer.prototype.createClusters_ = function() {
|
791 |
+
if (!this.ready_) {
|
792 |
+
return;
|
793 |
+
}
|
794 |
+
|
795 |
+
// Get our current map view bounds.
|
796 |
+
// Create a new bounds object so we don't affect the map.
|
797 |
+
var mapBounds = new google.maps.LatLngBounds(this.map_.getBounds().getSouthWest(),
|
798 |
+
this.map_.getBounds().getNorthEast());
|
799 |
+
var bounds = this.getExtendedBounds(mapBounds);
|
800 |
+
|
801 |
+
for (var i = 0, marker; marker = this.markers_[i]; i++) {
|
802 |
+
if (!marker.isAdded && this.isMarkerInBounds_(marker, bounds)) {
|
803 |
+
this.addToClosestCluster_(marker);
|
804 |
+
}
|
805 |
+
}
|
806 |
+
};
|
807 |
+
|
808 |
+
|
809 |
+
/**
|
810 |
+
* A cluster that contains markers.
|
811 |
+
*
|
812 |
+
* @param {MarkerClusterer} markerClusterer The markerclusterer that this
|
813 |
+
* cluster is associated with.
|
814 |
+
* @constructor
|
815 |
+
* @ignore
|
816 |
+
*/
|
817 |
+
function Cluster(markerClusterer) {
|
818 |
+
this.markerClusterer_ = markerClusterer;
|
819 |
+
this.map_ = markerClusterer.getMap();
|
820 |
+
this.gridSize_ = markerClusterer.getGridSize();
|
821 |
+
this.minClusterSize_ = markerClusterer.getMinClusterSize();
|
822 |
+
this.averageCenter_ = markerClusterer.isAverageCenter();
|
823 |
+
this.center_ = null;
|
824 |
+
this.markers_ = [];
|
825 |
+
this.bounds_ = null;
|
826 |
+
this.clusterIcon_ = new ClusterIcon(this, markerClusterer.getStyles(),
|
827 |
+
markerClusterer.getGridSize());
|
828 |
+
}
|
829 |
+
|
830 |
+
/**
|
831 |
+
* Determins if a marker is already added to the cluster.
|
832 |
+
*
|
833 |
+
* @param {google.maps.Marker} marker The marker to check.
|
834 |
+
* @return {boolean} True if the marker is already added.
|
835 |
+
*/
|
836 |
+
Cluster.prototype.isMarkerAlreadyAdded = function(marker) {
|
837 |
+
if (this.markers_.indexOf) {
|
838 |
+
return this.markers_.indexOf(marker) != -1;
|
839 |
+
} else {
|
840 |
+
for (var i = 0, m; m = this.markers_[i]; i++) {
|
841 |
+
if (m == marker) {
|
842 |
+
return true;
|
843 |
+
}
|
844 |
+
}
|
845 |
+
}
|
846 |
+
return false;
|
847 |
+
};
|
848 |
+
|
849 |
+
|
850 |
+
/**
|
851 |
+
* Add a marker the cluster.
|
852 |
+
*
|
853 |
+
* @param {google.maps.Marker} marker The marker to add.
|
854 |
+
* @return {boolean} True if the marker was added.
|
855 |
+
*/
|
856 |
+
Cluster.prototype.addMarker = function(marker) {
|
857 |
+
if (this.isMarkerAlreadyAdded(marker)) {
|
858 |
+
return false;
|
859 |
+
}
|
860 |
+
|
861 |
+
if (!this.center_) {
|
862 |
+
this.center_ = marker.getPosition();
|
863 |
+
this.calculateBounds_();
|
864 |
+
} else {
|
865 |
+
if (this.averageCenter_) {
|
866 |
+
var l = this.markers_.length + 1;
|
867 |
+
var lat = (this.center_.lat() * (l-1) + marker.getPosition().lat()) / l;
|
868 |
+
var lng = (this.center_.lng() * (l-1) + marker.getPosition().lng()) / l;
|
869 |
+
this.center_ = new google.maps.LatLng(lat, lng);
|
870 |
+
this.calculateBounds_();
|
871 |
+
}
|
872 |
+
}
|
873 |
+
|
874 |
+
marker.isAdded = true;
|
875 |
+
this.markers_.push(marker);
|
876 |
+
|
877 |
+
var len = this.markers_.length;
|
878 |
+
if (len < this.minClusterSize_ && marker.getMap() != this.map_) {
|
879 |
+
// Min cluster size not reached so show the marker.
|
880 |
+
marker.setMap(this.map_);
|
881 |
+
}
|
882 |
+
|
883 |
+
if (len == this.minClusterSize_) {
|
884 |
+
// Hide the markers that were showing.
|
885 |
+
for (var i = 0; i < len; i++) {
|
886 |
+
this.markers_[i].setMap(null);
|
887 |
+
}
|
888 |
+
}
|
889 |
+
|
890 |
+
if (len >= this.minClusterSize_) {
|
891 |
+
marker.setMap(null);
|
892 |
+
}
|
893 |
+
|
894 |
+
this.updateIcon();
|
895 |
+
return true;
|
896 |
+
};
|
897 |
+
|
898 |
+
|
899 |
+
/**
|
900 |
+
* Returns the marker clusterer that the cluster is associated with.
|
901 |
+
*
|
902 |
+
* @return {MarkerClusterer} The associated marker clusterer.
|
903 |
+
*/
|
904 |
+
Cluster.prototype.getMarkerClusterer = function() {
|
905 |
+
return this.markerClusterer_;
|
906 |
+
};
|
907 |
+
|
908 |
+
|
909 |
+
/**
|
910 |
+
* Returns the bounds of the cluster.
|
911 |
+
*
|
912 |
+
* @return {google.maps.LatLngBounds} the cluster bounds.
|
913 |
+
*/
|
914 |
+
Cluster.prototype.getBounds = function() {
|
915 |
+
var bounds = new google.maps.LatLngBounds(this.center_, this.center_);
|
916 |
+
var markers = this.getMarkers();
|
917 |
+
for (var i = 0, marker; marker = markers[i]; i++) {
|
918 |
+
bounds.extend(marker.getPosition());
|
919 |
+
}
|
920 |
+
return bounds;
|
921 |
+
};
|
922 |
+
|
923 |
+
|
924 |
+
/**
|
925 |
+
* Removes the cluster
|
926 |
+
*/
|
927 |
+
Cluster.prototype.remove = function() {
|
928 |
+
this.clusterIcon_.remove();
|
929 |
+
this.markers_.length = 0;
|
930 |
+
delete this.markers_;
|
931 |
+
};
|
932 |
+
|
933 |
+
|
934 |
+
/**
|
935 |
+
* Returns the number of markers in the cluster.
|
936 |
+
*
|
937 |
+
* @return {number} The number of markers in the cluster.
|
938 |
+
*/
|
939 |
+
Cluster.prototype.getSize = function() {
|
940 |
+
return this.markers_.length;
|
941 |
+
};
|
942 |
+
|
943 |
+
|
944 |
+
/**
|
945 |
+
* Returns a list of the markers in the cluster.
|
946 |
+
*
|
947 |
+
* @return {Array.<google.maps.Marker>} The markers in the cluster.
|
948 |
+
*/
|
949 |
+
Cluster.prototype.getMarkers = function() {
|
950 |
+
return this.markers_;
|
951 |
+
};
|
952 |
+
|
953 |
+
|
954 |
+
/**
|
955 |
+
* Returns the center of the cluster.
|
956 |
+
*
|
957 |
+
* @return {google.maps.LatLng} The cluster center.
|
958 |
+
*/
|
959 |
+
Cluster.prototype.getCenter = function() {
|
960 |
+
return this.center_;
|
961 |
+
};
|
962 |
+
|
963 |
+
|
964 |
+
/**
|
965 |
+
* Calculated the extended bounds of the cluster with the grid.
|
966 |
+
*
|
967 |
+
* @private
|
968 |
+
*/
|
969 |
+
Cluster.prototype.calculateBounds_ = function() {
|
970 |
+
var bounds = new google.maps.LatLngBounds(this.center_, this.center_);
|
971 |
+
this.bounds_ = this.markerClusterer_.getExtendedBounds(bounds);
|
972 |
+
};
|
973 |
+
|
974 |
+
|
975 |
+
/**
|
976 |
+
* Determines if a marker lies in the clusters bounds.
|
977 |
+
*
|
978 |
+
* @param {google.maps.Marker} marker The marker to check.
|
979 |
+
* @return {boolean} True if the marker lies in the bounds.
|
980 |
+
*/
|
981 |
+
Cluster.prototype.isMarkerInClusterBounds = function(marker) {
|
982 |
+
return this.bounds_.contains(marker.getPosition());
|
983 |
+
};
|
984 |
+
|
985 |
+
|
986 |
+
/**
|
987 |
+
* Returns the map that the cluster is associated with.
|
988 |
+
*
|
989 |
+
* @return {google.maps.Map} The map.
|
990 |
+
*/
|
991 |
+
Cluster.prototype.getMap = function() {
|
992 |
+
return this.map_;
|
993 |
+
};
|
994 |
+
|
995 |
+
|
996 |
+
/**
|
997 |
+
* Updates the cluster icon
|
998 |
+
*/
|
999 |
+
Cluster.prototype.updateIcon = function() {
|
1000 |
+
var zoom = this.map_.getZoom();
|
1001 |
+
var mz = this.markerClusterer_.getMaxZoom();
|
1002 |
+
|
1003 |
+
if (mz && zoom > mz) {
|
1004 |
+
// The zoom is greater than our max zoom so show all the markers in cluster.
|
1005 |
+
for (var i = 0, marker; marker = this.markers_[i]; i++) {
|
1006 |
+
marker.setMap(this.map_);
|
1007 |
+
}
|
1008 |
+
return;
|
1009 |
+
}
|
1010 |
+
|
1011 |
+
if (this.markers_.length < this.minClusterSize_) {
|
1012 |
+
// Min cluster size not yet reached.
|
1013 |
+
this.clusterIcon_.hide();
|
1014 |
+
return;
|
1015 |
+
}
|
1016 |
+
|
1017 |
+
var numStyles = this.markerClusterer_.getStyles().length;
|
1018 |
+
var sums = this.markerClusterer_.getCalculator()(this.markers_, numStyles);
|
1019 |
+
this.clusterIcon_.setCenter(this.center_);
|
1020 |
+
this.clusterIcon_.setSums(sums);
|
1021 |
+
this.clusterIcon_.show();
|
1022 |
+
};
|
1023 |
+
|
1024 |
+
|
1025 |
+
/**
|
1026 |
+
* A cluster icon
|
1027 |
+
*
|
1028 |
+
* @param {Cluster} cluster The cluster to be associated with.
|
1029 |
+
* @param {Object} styles An object that has style properties:
|
1030 |
+
* 'url': (string) The image url.
|
1031 |
+
* 'height': (number) The image height.
|
1032 |
+
* 'width': (number) The image width.
|
1033 |
+
* 'anchor': (Array) The anchor position of the label text.
|
1034 |
+
* 'textColor': (string) The text color.
|
1035 |
+
* 'textSize': (number) The text size.
|
1036 |
+
* 'backgroundPosition: (string) The background postition x, y.
|
1037 |
+
* @param {number=} opt_padding Optional padding to apply to the cluster icon.
|
1038 |
+
* @constructor
|
1039 |
+
* @extends google.maps.OverlayView
|
1040 |
+
* @ignore
|
1041 |
+
*/
|
1042 |
+
function ClusterIcon(cluster, styles, opt_padding) {
|
1043 |
+
cluster.getMarkerClusterer().extend(ClusterIcon, google.maps.OverlayView);
|
1044 |
+
|
1045 |
+
this.styles_ = styles;
|
1046 |
+
this.padding_ = opt_padding || 0;
|
1047 |
+
this.cluster_ = cluster;
|
1048 |
+
this.center_ = null;
|
1049 |
+
this.map_ = cluster.getMap();
|
1050 |
+
this.div_ = null;
|
1051 |
+
this.sums_ = null;
|
1052 |
+
this.visible_ = false;
|
1053 |
+
|
1054 |
+
this.setMap(this.map_);
|
1055 |
+
}
|
1056 |
+
|
1057 |
+
|
1058 |
+
/**
|
1059 |
+
* Triggers the clusterclick event and zoom's if the option is set.
|
1060 |
+
*/
|
1061 |
+
ClusterIcon.prototype.triggerClusterClick = function() {
|
1062 |
+
var markerClusterer = this.cluster_.getMarkerClusterer();
|
1063 |
+
|
1064 |
+
// Trigger the clusterclick event.
|
1065 |
+
google.maps.event.trigger(markerClusterer.map_, 'clusterclick', this.cluster_);
|
1066 |
+
|
1067 |
+
if (markerClusterer.isZoomOnClick()) {
|
1068 |
+
// Zoom into the cluster.
|
1069 |
+
this.map_.fitBounds(this.cluster_.getBounds());
|
1070 |
+
}
|
1071 |
+
};
|
1072 |
+
|
1073 |
+
|
1074 |
+
/**
|
1075 |
+
* Adding the cluster icon to the dom.
|
1076 |
+
* @ignore
|
1077 |
+
*/
|
1078 |
+
ClusterIcon.prototype.onAdd = function() {
|
1079 |
+
this.div_ = document.createElement('DIV');
|
1080 |
+
if (this.visible_) {
|
1081 |
+
var pos = this.getPosFromLatLng_(this.center_);
|
1082 |
+
this.div_.style.cssText = this.createCss(pos);
|
1083 |
+
this.div_.innerHTML = this.sums_.text;
|
1084 |
+
}
|
1085 |
+
|
1086 |
+
var panes = this.getPanes();
|
1087 |
+
panes.overlayMouseTarget.appendChild(this.div_);
|
1088 |
+
|
1089 |
+
var that = this;
|
1090 |
+
google.maps.event.addDomListener(this.div_, 'click', function() {
|
1091 |
+
that.triggerClusterClick();
|
1092 |
+
});
|
1093 |
+
};
|
1094 |
+
|
1095 |
+
|
1096 |
+
/**
|
1097 |
+
* Returns the position to place the div dending on the latlng.
|
1098 |
+
*
|
1099 |
+
* @param {google.maps.LatLng} latlng The position in latlng.
|
1100 |
+
* @return {google.maps.Point} The position in pixels.
|
1101 |
+
* @private
|
1102 |
+
*/
|
1103 |
+
ClusterIcon.prototype.getPosFromLatLng_ = function(latlng) {
|
1104 |
+
var pos = this.getProjection().fromLatLngToDivPixel(latlng);
|
1105 |
+
pos.x -= parseInt(this.width_ / 2, 10);
|
1106 |
+
pos.y -= parseInt(this.height_ / 2, 10);
|
1107 |
+
return pos;
|
1108 |
+
};
|
1109 |
+
|
1110 |
+
|
1111 |
+
/**
|
1112 |
+
* Draw the icon.
|
1113 |
+
* @ignore
|
1114 |
+
*/
|
1115 |
+
ClusterIcon.prototype.draw = function() {
|
1116 |
+
if (this.visible_) {
|
1117 |
+
var pos = this.getPosFromLatLng_(this.center_);
|
1118 |
+
this.div_.style.top = pos.y + 'px';
|
1119 |
+
this.div_.style.left = pos.x + 'px';
|
1120 |
+
this.div_.style.zIndex = google.maps.Marker.MAX_ZINDEX + 1;
|
1121 |
+
}
|
1122 |
+
};
|
1123 |
+
|
1124 |
+
|
1125 |
+
/**
|
1126 |
+
* Hide the icon.
|
1127 |
+
*/
|
1128 |
+
ClusterIcon.prototype.hide = function() {
|
1129 |
+
if (this.div_) {
|
1130 |
+
this.div_.style.display = 'none';
|
1131 |
+
}
|
1132 |
+
this.visible_ = false;
|
1133 |
+
};
|
1134 |
+
|
1135 |
+
|
1136 |
+
/**
|
1137 |
+
* Position and show the icon.
|
1138 |
+
*/
|
1139 |
+
ClusterIcon.prototype.show = function() {
|
1140 |
+
if (this.div_) {
|
1141 |
+
var pos = this.getPosFromLatLng_(this.center_);
|
1142 |
+
this.div_.style.cssText = this.createCss(pos);
|
1143 |
+
this.div_.style.display = '';
|
1144 |
+
}
|
1145 |
+
this.visible_ = true;
|
1146 |
+
};
|
1147 |
+
|
1148 |
+
|
1149 |
+
/**
|
1150 |
+
* Remove the icon from the map
|
1151 |
+
*/
|
1152 |
+
ClusterIcon.prototype.remove = function() {
|
1153 |
+
this.setMap(null);
|
1154 |
+
};
|
1155 |
+
|
1156 |
+
|
1157 |
+
/**
|
1158 |
+
* Implementation of the onRemove interface.
|
1159 |
+
* @ignore
|
1160 |
+
*/
|
1161 |
+
ClusterIcon.prototype.onRemove = function() {
|
1162 |
+
if (this.div_ && this.div_.parentNode) {
|
1163 |
+
this.hide();
|
1164 |
+
this.div_.parentNode.removeChild(this.div_);
|
1165 |
+
this.div_ = null;
|
1166 |
+
}
|
1167 |
+
};
|
1168 |
+
|
1169 |
+
|
1170 |
+
/**
|
1171 |
+
* Set the sums of the icon.
|
1172 |
+
*
|
1173 |
+
* @param {Object} sums The sums containing:
|
1174 |
+
* 'text': (string) The text to display in the icon.
|
1175 |
+
* 'index': (number) The style index of the icon.
|
1176 |
+
*/
|
1177 |
+
ClusterIcon.prototype.setSums = function(sums) {
|
1178 |
+
this.sums_ = sums;
|
1179 |
+
this.text_ = sums.text;
|
1180 |
+
this.index_ = sums.index;
|
1181 |
+
if (this.div_) {
|
1182 |
+
this.div_.innerHTML = sums.text;
|
1183 |
+
}
|
1184 |
+
|
1185 |
+
this.useStyle();
|
1186 |
+
};
|
1187 |
+
|
1188 |
+
|
1189 |
+
/**
|
1190 |
+
* Sets the icon to the the styles.
|
1191 |
+
*/
|
1192 |
+
ClusterIcon.prototype.useStyle = function() {
|
1193 |
+
var index = Math.max(0, this.sums_.index - 1);
|
1194 |
+
index = Math.min(this.styles_.length - 1, index);
|
1195 |
+
var style = this.styles_[index];
|
1196 |
+
this.url_ = style['url'];
|
1197 |
+
this.height_ = style['height'];
|
1198 |
+
this.width_ = style['width'];
|
1199 |
+
this.textColor_ = style['textColor'];
|
1200 |
+
this.anchor_ = style['anchor'];
|
1201 |
+
this.textSize_ = style['textSize'];
|
1202 |
+
this.backgroundPosition_ = style['backgroundPosition'];
|
1203 |
+
};
|
1204 |
+
|
1205 |
+
|
1206 |
+
/**
|
1207 |
+
* Sets the center of the icon.
|
1208 |
+
*
|
1209 |
+
* @param {google.maps.LatLng} center The latlng to set as the center.
|
1210 |
+
*/
|
1211 |
+
ClusterIcon.prototype.setCenter = function(center) {
|
1212 |
+
this.center_ = center;
|
1213 |
+
};
|
1214 |
+
|
1215 |
+
|
1216 |
+
/**
|
1217 |
+
* Create the css text based on the position of the icon.
|
1218 |
+
*
|
1219 |
+
* @param {google.maps.Point} pos The position.
|
1220 |
+
* @return {string} The css style text.
|
1221 |
+
*/
|
1222 |
+
ClusterIcon.prototype.createCss = function(pos) {
|
1223 |
+
var style = [];
|
1224 |
+
style.push('background-image:url(' + this.url_ + ');');
|
1225 |
+
var backgroundPosition = this.backgroundPosition_ ? this.backgroundPosition_ : '0 0';
|
1226 |
+
style.push('background-position:' + backgroundPosition + ';');
|
1227 |
+
|
1228 |
+
if (typeof this.anchor_ === 'object') {
|
1229 |
+
if (typeof this.anchor_[0] === 'number' && this.anchor_[0] > 0 &&
|
1230 |
+
this.anchor_[0] < this.height_) {
|
1231 |
+
style.push('height:' + (this.height_ - this.anchor_[0]) +
|
1232 |
+
'px; padding-top:' + this.anchor_[0] + 'px;');
|
1233 |
+
} else {
|
1234 |
+
style.push('height:' + this.height_ + 'px; line-height:' + this.height_ +
|
1235 |
+
'px;');
|
1236 |
+
}
|
1237 |
+
if (typeof this.anchor_[1] === 'number' && this.anchor_[1] > 0 &&
|
1238 |
+
this.anchor_[1] < this.width_) {
|
1239 |
+
style.push('width:' + (this.width_ - this.anchor_[1]) +
|
1240 |
+
'px; padding-left:' + this.anchor_[1] + 'px;');
|
1241 |
+
} else {
|
1242 |
+
style.push('width:' + this.width_ + 'px; text-align:center;');
|
1243 |
+
}
|
1244 |
+
} else {
|
1245 |
+
style.push('height:' + this.height_ + 'px; line-height:' +
|
1246 |
+
this.height_ + 'px; width:' + this.width_ + 'px; text-align:center;');
|
1247 |
+
}
|
1248 |
+
|
1249 |
+
var txtColor = this.textColor_ ? this.textColor_ : 'black';
|
1250 |
+
var txtSize = this.textSize_ ? this.textSize_ : 11;
|
1251 |
+
|
1252 |
+
style.push('cursor:pointer; top:' + pos.y + 'px; left:' +
|
1253 |
+
pos.x + 'px; color:' + txtColor + '; position:absolute; font-size:' +
|
1254 |
+
txtSize + 'px; font-family:Arial,sans-serif; font-weight:bold');
|
1255 |
+
return style.join('');
|
1256 |
+
};
|
1257 |
+
|
1258 |
+
|
1259 |
+
// Export Symbols for Closure
|
1260 |
+
// If you are not going to compile with closure then you can remove the
|
1261 |
+
// code below.
|
1262 |
+
var window = window || {};
|
1263 |
+
window['MarkerClusterer'] = MarkerClusterer;
|
1264 |
+
MarkerClusterer.prototype['addMarker'] = MarkerClusterer.prototype.addMarker;
|
1265 |
+
MarkerClusterer.prototype['addMarkers'] = MarkerClusterer.prototype.addMarkers;
|
1266 |
+
MarkerClusterer.prototype['clearMarkers'] =
|
1267 |
+
MarkerClusterer.prototype.clearMarkers;
|
1268 |
+
MarkerClusterer.prototype['fitMapToMarkers'] =
|
1269 |
+
MarkerClusterer.prototype.fitMapToMarkers;
|
1270 |
+
MarkerClusterer.prototype['getCalculator'] =
|
1271 |
+
MarkerClusterer.prototype.getCalculator;
|
1272 |
+
MarkerClusterer.prototype['getGridSize'] =
|
1273 |
+
MarkerClusterer.prototype.getGridSize;
|
1274 |
+
MarkerClusterer.prototype['getExtendedBounds'] =
|
1275 |
+
MarkerClusterer.prototype.getExtendedBounds;
|
1276 |
+
MarkerClusterer.prototype['getMap'] = MarkerClusterer.prototype.getMap;
|
1277 |
+
MarkerClusterer.prototype['getMarkers'] = MarkerClusterer.prototype.getMarkers;
|
1278 |
+
MarkerClusterer.prototype['getMaxZoom'] = MarkerClusterer.prototype.getMaxZoom;
|
1279 |
+
MarkerClusterer.prototype['getStyles'] = MarkerClusterer.prototype.getStyles;
|
1280 |
+
MarkerClusterer.prototype['getTotalClusters'] =
|
1281 |
+
MarkerClusterer.prototype.getTotalClusters;
|
1282 |
+
MarkerClusterer.prototype['getTotalMarkers'] =
|
1283 |
+
MarkerClusterer.prototype.getTotalMarkers;
|
1284 |
+
MarkerClusterer.prototype['redraw'] = MarkerClusterer.prototype.redraw;
|
1285 |
+
MarkerClusterer.prototype['removeMarker'] =
|
1286 |
+
MarkerClusterer.prototype.removeMarker;
|
1287 |
+
MarkerClusterer.prototype['removeMarkers'] =
|
1288 |
+
MarkerClusterer.prototype.removeMarkers;
|
1289 |
+
MarkerClusterer.prototype['resetViewport'] =
|
1290 |
+
MarkerClusterer.prototype.resetViewport;
|
1291 |
+
MarkerClusterer.prototype['repaint'] =
|
1292 |
+
MarkerClusterer.prototype.repaint;
|
1293 |
+
MarkerClusterer.prototype['setCalculator'] =
|
1294 |
+
MarkerClusterer.prototype.setCalculator;
|
1295 |
+
MarkerClusterer.prototype['setGridSize'] =
|
1296 |
+
MarkerClusterer.prototype.setGridSize;
|
1297 |
+
MarkerClusterer.prototype['setMaxZoom'] =
|
1298 |
+
MarkerClusterer.prototype.setMaxZoom;
|
1299 |
+
MarkerClusterer.prototype['onAdd'] = MarkerClusterer.prototype.onAdd;
|
1300 |
+
MarkerClusterer.prototype['draw'] = MarkerClusterer.prototype.draw;
|
1301 |
+
|
1302 |
+
Cluster.prototype['getCenter'] = Cluster.prototype.getCenter;
|
1303 |
+
Cluster.prototype['getSize'] = Cluster.prototype.getSize;
|
1304 |
+
Cluster.prototype['getMarkers'] = Cluster.prototype.getMarkers;
|
1305 |
+
|
1306 |
+
ClusterIcon.prototype['onAdd'] = ClusterIcon.prototype.onAdd;
|
1307 |
+
ClusterIcon.prototype['draw'] = ClusterIcon.prototype.draw;
|
1308 |
+
ClusterIcon.prototype['onRemove'] = ClusterIcon.prototype.onRemove;
|
1309 |
+
|
1310 |
+
Object.keys = Object.keys || function(o) {
|
1311 |
+
var result = [];
|
1312 |
+
for(var name in o) {
|
1313 |
+
if (o.hasOwnProperty(name))
|
1314 |
+
result.push(name);
|
1315 |
+
}
|
1316 |
+
return result;
|
1317 |
+
};
|
1318 |
+
|
1319 |
+
if (typeof module == 'object') {
|
1320 |
+
module.exports = MarkerClusterer;
|
1321 |
}
|
assets/js/lib/jarallax/jarallax.js
CHANGED
@@ -1,1033 +1,1033 @@
|
|
1 |
-
/*!
|
2 |
-
* Name : Just Another Parallax [Jarallax]
|
3 |
-
* Version : 1.12.7
|
4 |
-
* Author : nK <https://nkdev.info>
|
5 |
-
* GitHub : https://github.com/nk-o/jarallax
|
6 |
-
*/
|
7 |
-
/******/ (function(modules) { // webpackBootstrap
|
8 |
-
/******/ // The module cache
|
9 |
-
/******/ var installedModules = {};
|
10 |
-
/******/
|
11 |
-
/******/ // The require function
|
12 |
-
/******/ function __webpack_require__(moduleId) {
|
13 |
-
/******/
|
14 |
-
/******/ // Check if module is in cache
|
15 |
-
/******/ if(installedModules[moduleId]) {
|
16 |
-
/******/ return installedModules[moduleId].exports;
|
17 |
-
/******/ }
|
18 |
-
/******/ // Create a new module (and put it into the cache)
|
19 |
-
/******/ var module = installedModules[moduleId] = {
|
20 |
-
/******/ i: moduleId,
|
21 |
-
/******/ l: false,
|
22 |
-
/******/ exports: {}
|
23 |
-
/******/ };
|
24 |
-
/******/
|
25 |
-
/******/ // Execute the module function
|
26 |
-
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
27 |
-
/******/
|
28 |
-
/******/ // Flag the module as loaded
|
29 |
-
/******/ module.l = true;
|
30 |
-
/******/
|
31 |
-
/******/ // Return the exports of the module
|
32 |
-
/******/ return module.exports;
|
33 |
-
/******/ }
|
34 |
-
/******/
|
35 |
-
/******/
|
36 |
-
/******/ // expose the modules object (__webpack_modules__)
|
37 |
-
/******/ __webpack_require__.m = modules;
|
38 |
-
/******/
|
39 |
-
/******/ // expose the module cache
|
40 |
-
/******/ __webpack_require__.c = installedModules;
|
41 |
-
/******/
|
42 |
-
/******/ // define getter function for harmony exports
|
43 |
-
/******/ __webpack_require__.d = function(exports, name, getter) {
|
44 |
-
/******/ if(!__webpack_require__.o(exports, name)) {
|
45 |
-
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
46 |
-
/******/ }
|
47 |
-
/******/ };
|
48 |
-
/******/
|
49 |
-
/******/ // define __esModule on exports
|
50 |
-
/******/ __webpack_require__.r = function(exports) {
|
51 |
-
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
52 |
-
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
53 |
-
/******/ }
|
54 |
-
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
55 |
-
/******/ };
|
56 |
-
/******/
|
57 |
-
/******/ // create a fake namespace object
|
58 |
-
/******/ // mode & 1: value is a module id, require it
|
59 |
-
/******/ // mode & 2: merge all properties of value into the ns
|
60 |
-
/******/ // mode & 4: return value when already ns object
|
61 |
-
/******/ // mode & 8|1: behave like require
|
62 |
-
/******/ __webpack_require__.t = function(value, mode) {
|
63 |
-
/******/ if(mode & 1) value = __webpack_require__(value);
|
64 |
-
/******/ if(mode & 8) return value;
|
65 |
-
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
66 |
-
/******/ var ns = Object.create(null);
|
67 |
-
/******/ __webpack_require__.r(ns);
|
68 |
-
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
69 |
-
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
70 |
-
/******/ return ns;
|
71 |
-
/******/ };
|
72 |
-
/******/
|
73 |
-
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
74 |
-
/******/ __webpack_require__.n = function(module) {
|
75 |
-
/******/ var getter = module && module.__esModule ?
|
76 |
-
/******/ function getDefault() { return module['default']; } :
|
77 |
-
/******/ function getModuleExports() { return module; };
|
78 |
-
/******/ __webpack_require__.d(getter, 'a', getter);
|
79 |
-
/******/ return getter;
|
80 |
-
/******/ };
|
81 |
-
/******/
|
82 |
-
/******/ // Object.prototype.hasOwnProperty.call
|
83 |
-
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
84 |
-
/******/
|
85 |
-
/******/ // __webpack_public_path__
|
86 |
-
/******/ __webpack_require__.p = "";
|
87 |
-
/******/
|
88 |
-
/******/
|
89 |
-
/******/ // Load entry module and return exports
|
90 |
-
/******/ return __webpack_require__(__webpack_require__.s = 10);
|
91 |
-
/******/ })
|
92 |
-
/************************************************************************/
|
93 |
-
/******/ ([
|
94 |
-
/* 0 */,
|
95 |
-
/* 1 */,
|
96 |
-
/* 2 */
|
97 |
-
/***/ (function(module, exports) {
|
98 |
-
|
99 |
-
module.exports = function (callback) {
|
100 |
-
if (document.readyState === 'complete' || document.readyState === 'interactive') {
|
101 |
-
// Already ready or interactive, execute callback
|
102 |
-
callback.call();
|
103 |
-
} else if (document.attachEvent) {
|
104 |
-
// Old browsers
|
105 |
-
document.attachEvent('onreadystatechange', function () {
|
106 |
-
if (document.readyState === 'interactive') callback.call();
|
107 |
-
});
|
108 |
-
} else if (document.addEventListener) {
|
109 |
-
// Modern browsers
|
110 |
-
document.addEventListener('DOMContentLoaded', callback);
|
111 |
-
}
|
112 |
-
};
|
113 |
-
|
114 |
-
/***/ }),
|
115 |
-
/* 3 */
|
116 |
-
/***/ (function(module, exports, __webpack_require__) {
|
117 |
-
|
118 |
-
/* WEBPACK VAR INJECTION */(function(global) {var win;
|
119 |
-
|
120 |
-
if (typeof window !== "undefined") {
|
121 |
-
win = window;
|
122 |
-
} else if (typeof global !== "undefined") {
|
123 |
-
win = global;
|
124 |
-
} else if (typeof self !== "undefined") {
|
125 |
-
win = self;
|
126 |
-
} else {
|
127 |
-
win = {};
|
128 |
-
}
|
129 |
-
|
130 |
-
module.exports = win;
|
131 |
-
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(4)))
|
132 |
-
|
133 |
-
/***/ }),
|
134 |
-
/* 4 */
|
135 |
-
/***/ (function(module, exports) {
|
136 |
-
|
137 |
-
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
138 |
-
|
139 |
-
var g; // This works in non-strict mode
|
140 |
-
|
141 |
-
g = function () {
|
142 |
-
return this;
|
143 |
-
}();
|
144 |
-
|
145 |
-
try {
|
146 |
-
// This works if eval is allowed (see CSP)
|
147 |
-
g = g || new Function("return this")();
|
148 |
-
} catch (e) {
|
149 |
-
// This works if the window reference is available
|
150 |
-
if ((typeof window === "undefined" ? "undefined" : _typeof(window)) === "object") g = window;
|
151 |
-
} // g can still be undefined, but nothing to do about it...
|
152 |
-
// We return undefined, instead of nothing here, so it's
|
153 |
-
// easier to handle this case. if(!global) { ...}
|
154 |
-
|
155 |
-
|
156 |
-
module.exports = g;
|
157 |
-
|
158 |
-
/***/ }),
|
159 |
-
/* 5 */,
|
160 |
-
/* 6 */,
|
161 |
-
/* 7 */,
|
162 |
-
/* 8 */,
|
163 |
-
/* 9 */,
|
164 |
-
/* 10 */
|
165 |
-
/***/ (function(module, exports, __webpack_require__) {
|
166 |
-
|
167 |
-
module.exports = __webpack_require__(11);
|
168 |
-
|
169 |
-
|
170 |
-
/***/ }),
|
171 |
-
/* 11 */
|
172 |
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
173 |
-
|
174 |
-
"use strict";
|
175 |
-
__webpack_require__.r(__webpack_exports__);
|
176 |
-
/* harmony import */ var lite_ready__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
|
177 |
-
/* harmony import */ var lite_ready__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lite_ready__WEBPACK_IMPORTED_MODULE_0__);
|
178 |
-
/* harmony import */ var global__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3);
|
179 |
-
/* harmony import */ var global__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(global__WEBPACK_IMPORTED_MODULE_1__);
|
180 |
-
/* harmony import */ var _jarallax_esm__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(12);
|
181 |
-
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
// no conflict
|
186 |
-
|
187 |
-
var oldPlugin = global__WEBPACK_IMPORTED_MODULE_1__["window"].jarallax;
|
188 |
-
global__WEBPACK_IMPORTED_MODULE_1__["window"].jarallax = _jarallax_esm__WEBPACK_IMPORTED_MODULE_2__["default"];
|
189 |
-
|
190 |
-
global__WEBPACK_IMPORTED_MODULE_1__["window"].jarallax.noConflict = function () {
|
191 |
-
global__WEBPACK_IMPORTED_MODULE_1__["window"].jarallax = oldPlugin;
|
192 |
-
return this;
|
193 |
-
}; // jQuery support
|
194 |
-
|
195 |
-
|
196 |
-
if ('undefined' !== typeof global__WEBPACK_IMPORTED_MODULE_1__["jQuery"]) {
|
197 |
-
var jQueryPlugin = function jQueryPlugin() {
|
198 |
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
199 |
-
args[_key] = arguments[_key];
|
200 |
-
}
|
201 |
-
|
202 |
-
Array.prototype.unshift.call(args, this);
|
203 |
-
var res = _jarallax_esm__WEBPACK_IMPORTED_MODULE_2__["default"].apply(global__WEBPACK_IMPORTED_MODULE_1__["window"], args);
|
204 |
-
return 'object' !== _typeof(res) ? res : this;
|
205 |
-
};
|
206 |
-
|
207 |
-
jQueryPlugin.constructor = _jarallax_esm__WEBPACK_IMPORTED_MODULE_2__["default"].constructor; // no conflict
|
208 |
-
|
209 |
-
var oldJqPlugin = global__WEBPACK_IMPORTED_MODULE_1__["jQuery"].fn.jarallax;
|
210 |
-
global__WEBPACK_IMPORTED_MODULE_1__["jQuery"].fn.jarallax = jQueryPlugin;
|
211 |
-
|
212 |
-
global__WEBPACK_IMPORTED_MODULE_1__["jQuery"].fn.jarallax.noConflict = function () {
|
213 |
-
global__WEBPACK_IMPORTED_MODULE_1__["jQuery"].fn.jarallax = oldJqPlugin;
|
214 |
-
return this;
|
215 |
-
};
|
216 |
-
} // data-jarallax initialization
|
217 |
-
|
218 |
-
|
219 |
-
lite_ready__WEBPACK_IMPORTED_MODULE_0___default()(function () {
|
220 |
-
Object(_jarallax_esm__WEBPACK_IMPORTED_MODULE_2__["default"])(document.querySelectorAll('[data-jarallax]'));
|
221 |
-
});
|
222 |
-
|
223 |
-
/***/ }),
|
224 |
-
/* 12 */
|
225 |
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
226 |
-
|
227 |
-
"use strict";
|
228 |
-
__webpack_require__.r(__webpack_exports__);
|
229 |
-
/* harmony import */ var lite_ready__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
|
230 |
-
/* harmony import */ var lite_ready__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lite_ready__WEBPACK_IMPORTED_MODULE_0__);
|
231 |
-
/* harmony import */ var global__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3);
|
232 |
-
/* harmony import */ var global__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(global__WEBPACK_IMPORTED_MODULE_1__);
|
233 |
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
234 |
-
|
235 |
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
236 |
-
|
237 |
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
238 |
-
|
239 |
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
240 |
-
|
241 |
-
function _iterableToArrayLimit(arr, i) { var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]); if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
242 |
-
|
243 |
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
244 |
-
|
245 |
-
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
246 |
-
|
247 |
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
248 |
-
|
249 |
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
250 |
-
|
251 |
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
var navigator = global__WEBPACK_IMPORTED_MODULE_1__["window"].navigator;
|
256 |
-
var isIE = -1 < navigator.userAgent.indexOf('MSIE ') || -1 < navigator.userAgent.indexOf('Trident/') || -1 < navigator.userAgent.indexOf('Edge/');
|
257 |
-
var isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
258 |
-
|
259 |
-
var supportTransform = function () {
|
260 |
-
var prefixes = 'transform WebkitTransform MozTransform'.split(' ');
|
261 |
-
var div = document.createElement('div');
|
262 |
-
|
263 |
-
for (var i = 0; i < prefixes.length; i += 1) {
|
264 |
-
if (div && div.style[prefixes[i]] !== undefined) {
|
265 |
-
return prefixes[i];
|
266 |
-
}
|
267 |
-
}
|
268 |
-
|
269 |
-
return false;
|
270 |
-
}();
|
271 |
-
|
272 |
-
var $deviceHelper;
|
273 |
-
/**
|
274 |
-
* The most popular mobile browsers changes height after page scroll and this generates image jumping.
|
275 |
-
* We can fix it using this workaround with vh units.
|
276 |
-
*/
|
277 |
-
|
278 |
-
function getDeviceHeight() {
|
279 |
-
if (!$deviceHelper && document.body) {
|
280 |
-
$deviceHelper = document.createElement('div');
|
281 |
-
$deviceHelper.style.cssText = 'position: fixed; top: -9999px; left: 0; height: 100vh; width: 0;';
|
282 |
-
document.body.appendChild($deviceHelper);
|
283 |
-
}
|
284 |
-
|
285 |
-
return ($deviceHelper ? $deviceHelper.clientHeight : 0) || global__WEBPACK_IMPORTED_MODULE_1__["window"].innerHeight || document.documentElement.clientHeight;
|
286 |
-
} // Window height data
|
287 |
-
|
288 |
-
|
289 |
-
var wndH;
|
290 |
-
|
291 |
-
function updateWndVars() {
|
292 |
-
if (isMobile) {
|
293 |
-
wndH = getDeviceHeight();
|
294 |
-
} else {
|
295 |
-
wndH = global__WEBPACK_IMPORTED_MODULE_1__["window"].innerHeight || document.documentElement.clientHeight;
|
296 |
-
}
|
297 |
-
}
|
298 |
-
|
299 |
-
updateWndVars();
|
300 |
-
global__WEBPACK_IMPORTED_MODULE_1__["window"].addEventListener('resize', updateWndVars);
|
301 |
-
global__WEBPACK_IMPORTED_MODULE_1__["window"].addEventListener('orientationchange', updateWndVars);
|
302 |
-
global__WEBPACK_IMPORTED_MODULE_1__["window"].addEventListener('load', updateWndVars);
|
303 |
-
lite_ready__WEBPACK_IMPORTED_MODULE_0___default()(function () {
|
304 |
-
updateWndVars({
|
305 |
-
type: 'dom-loaded'
|
306 |
-
});
|
307 |
-
}); // list with all jarallax instances
|
308 |
-
// need to render all in one scroll/resize event
|
309 |
-
|
310 |
-
var jarallaxList = []; // get all parents of the element.
|
311 |
-
|
312 |
-
function getParents(elem) {
|
313 |
-
var parents = [];
|
314 |
-
|
315 |
-
while (null !== elem.parentElement) {
|
316 |
-
elem = elem.parentElement;
|
317 |
-
|
318 |
-
if (1 === elem.nodeType) {
|
319 |
-
parents.push(elem);
|
320 |
-
}
|
321 |
-
}
|
322 |
-
|
323 |
-
return parents;
|
324 |
-
}
|
325 |
-
|
326 |
-
function updateParallax() {
|
327 |
-
if (!jarallaxList.length) {
|
328 |
-
return;
|
329 |
-
}
|
330 |
-
|
331 |
-
jarallaxList.forEach(function (data, k) {
|
332 |
-
var instance = data.instance,
|
333 |
-
oldData = data.oldData;
|
334 |
-
var clientRect = instance.$item.getBoundingClientRect();
|
335 |
-
var newData = {
|
336 |
-
width: clientRect.width,
|
337 |
-
height: clientRect.height,
|
338 |
-
top: clientRect.top,
|
339 |
-
bottom: clientRect.bottom,
|
340 |
-
wndW: global__WEBPACK_IMPORTED_MODULE_1__["window"].innerWidth,
|
341 |
-
wndH: wndH
|
342 |
-
};
|
343 |
-
var isResized = !oldData || oldData.wndW !== newData.wndW || oldData.wndH !== newData.wndH || oldData.width !== newData.width || oldData.height !== newData.height;
|
344 |
-
var isScrolled = isResized || !oldData || oldData.top !== newData.top || oldData.bottom !== newData.bottom;
|
345 |
-
jarallaxList[k].oldData = newData;
|
346 |
-
|
347 |
-
if (isResized) {
|
348 |
-
instance.onResize();
|
349 |
-
}
|
350 |
-
|
351 |
-
if (isScrolled) {
|
352 |
-
instance.onScroll();
|
353 |
-
}
|
354 |
-
});
|
355 |
-
global__WEBPACK_IMPORTED_MODULE_1__["window"].requestAnimationFrame(updateParallax);
|
356 |
-
}
|
357 |
-
|
358 |
-
var instanceID = 0; // Jarallax class
|
359 |
-
|
360 |
-
var Jarallax = /*#__PURE__*/function () {
|
361 |
-
function Jarallax(item, userOptions) {
|
362 |
-
_classCallCheck(this, Jarallax);
|
363 |
-
|
364 |
-
var self = this;
|
365 |
-
self.instanceID = instanceID;
|
366 |
-
instanceID += 1;
|
367 |
-
self.$item = item;
|
368 |
-
self.defaults = {
|
369 |
-
type: 'scroll',
|
370 |
-
// type of parallax: scroll, scale, opacity, scale-opacity, scroll-opacity
|
371 |
-
speed: 0.5,
|
372 |
-
// supported value from -1 to 2
|
373 |
-
imgSrc: null,
|
374 |
-
imgElement: '.jarallax-img',
|
375 |
-
imgSize: 'cover',
|
376 |
-
imgPosition: '50% 50%',
|
377 |
-
imgRepeat: 'no-repeat',
|
378 |
-
// supported only for background, not for <img> tag
|
379 |
-
keepImg: false,
|
380 |
-
// keep <img> tag in it's default place
|
381 |
-
elementInViewport: null,
|
382 |
-
zIndex: -100,
|
383 |
-
disableParallax: false,
|
384 |
-
disableVideo: false,
|
385 |
-
// video
|
386 |
-
videoSrc: null,
|
387 |
-
videoStartTime: 0,
|
388 |
-
videoEndTime: 0,
|
389 |
-
videoVolume: 0,
|
390 |
-
videoLoop: true,
|
391 |
-
videoPlayOnlyVisible: true,
|
392 |
-
videoLazyLoading: true,
|
393 |
-
// events
|
394 |
-
onScroll: null,
|
395 |
-
// function(calculations) {}
|
396 |
-
onInit: null,
|
397 |
-
// function() {}
|
398 |
-
onDestroy: null,
|
399 |
-
// function() {}
|
400 |
-
onCoverImage: null // function() {}
|
401 |
-
|
402 |
-
}; // prepare data-options
|
403 |
-
|
404 |
-
var dataOptions = self.$item.dataset || {};
|
405 |
-
var pureDataOptions = {};
|
406 |
-
Object.keys(dataOptions).forEach(function (key) {
|
407 |
-
var loweCaseOption = key.substr(0, 1).toLowerCase() + key.substr(1);
|
408 |
-
|
409 |
-
if (loweCaseOption && 'undefined' !== typeof self.defaults[loweCaseOption]) {
|
410 |
-
pureDataOptions[loweCaseOption] = dataOptions[key];
|
411 |
-
}
|
412 |
-
});
|
413 |
-
self.options = self.extend({}, self.defaults, pureDataOptions, userOptions);
|
414 |
-
self.pureOptions = self.extend({}, self.options); // prepare 'true' and 'false' strings to boolean
|
415 |
-
|
416 |
-
Object.keys(self.options).forEach(function (key) {
|
417 |
-
if ('true' === self.options[key]) {
|
418 |
-
self.options[key] = true;
|
419 |
-
} else if ('false' === self.options[key]) {
|
420 |
-
self.options[key] = false;
|
421 |
-
}
|
422 |
-
}); // fix speed option [-1.0, 2.0]
|
423 |
-
|
424 |
-
self.options.speed = Math.min(2, Math.max(-1, parseFloat(self.options.speed))); // prepare disableParallax callback
|
425 |
-
|
426 |
-
if ('string' === typeof self.options.disableParallax) {
|
427 |
-
self.options.disableParallax = new RegExp(self.options.disableParallax);
|
428 |
-
}
|
429 |
-
|
430 |
-
if (self.options.disableParallax instanceof RegExp) {
|
431 |
-
var disableParallaxRegexp = self.options.disableParallax;
|
432 |
-
|
433 |
-
self.options.disableParallax = function () {
|
434 |
-
return disableParallaxRegexp.test(navigator.userAgent);
|
435 |
-
};
|
436 |
-
}
|
437 |
-
|
438 |
-
if ('function' !== typeof self.options.disableParallax) {
|
439 |
-
self.options.disableParallax = function () {
|
440 |
-
return false;
|
441 |
-
};
|
442 |
-
} // prepare disableVideo callback
|
443 |
-
|
444 |
-
|
445 |
-
if ('string' === typeof self.options.disableVideo) {
|
446 |
-
self.options.disableVideo = new RegExp(self.options.disableVideo);
|
447 |
-
}
|
448 |
-
|
449 |
-
if (self.options.disableVideo instanceof RegExp) {
|
450 |
-
var disableVideoRegexp = self.options.disableVideo;
|
451 |
-
|
452 |
-
self.options.disableVideo = function () {
|
453 |
-
return disableVideoRegexp.test(navigator.userAgent);
|
454 |
-
};
|
455 |
-
}
|
456 |
-
|
457 |
-
if ('function' !== typeof self.options.disableVideo) {
|
458 |
-
self.options.disableVideo = function () {
|
459 |
-
return false;
|
460 |
-
};
|
461 |
-
} // custom element to check if parallax in viewport
|
462 |
-
|
463 |
-
|
464 |
-
var elementInVP = self.options.elementInViewport; // get first item from array
|
465 |
-
|
466 |
-
if (elementInVP && 'object' === _typeof(elementInVP) && 'undefined' !== typeof elementInVP.length) {
|
467 |
-
var _elementInVP = elementInVP;
|
468 |
-
|
469 |
-
var _elementInVP2 = _slicedToArray(_elementInVP, 1);
|
470 |
-
|
471 |
-
elementInVP = _elementInVP2[0];
|
472 |
-
} // check if dom element
|
473 |
-
|
474 |
-
|
475 |
-
if (!(elementInVP instanceof Element)) {
|
476 |
-
elementInVP = null;
|
477 |
-
}
|
478 |
-
|
479 |
-
self.options.elementInViewport = elementInVP;
|
480 |
-
self.image = {
|
481 |
-
src: self.options.imgSrc || null,
|
482 |
-
$container: null,
|
483 |
-
useImgTag: false,
|
484 |
-
// position fixed is needed for the most of browsers because absolute position have glitches
|
485 |
-
// on MacOS with smooth scroll there is a huge lags with absolute position - https://github.com/nk-o/jarallax/issues/75
|
486 |
-
// on mobile devices better scrolled with absolute position
|
487 |
-
position: /iPad|iPhone|iPod|Android/.test(navigator.userAgent) ? 'absolute' : 'fixed'
|
488 |
-
};
|
489 |
-
|
490 |
-
if (self.initImg() && self.canInitParallax()) {
|
491 |
-
self.init();
|
492 |
-
}
|
493 |
-
} // add styles to element
|
494 |
-
// eslint-disable-next-line class-methods-use-this
|
495 |
-
|
496 |
-
|
497 |
-
_createClass(Jarallax, [{
|
498 |
-
key: "css",
|
499 |
-
value: function css(el, styles) {
|
500 |
-
if ('string' === typeof styles) {
|
501 |
-
return global__WEBPACK_IMPORTED_MODULE_1__["window"].getComputedStyle(el).getPropertyValue(styles);
|
502 |
-
} // add transform property with vendor prefix
|
503 |
-
|
504 |
-
|
505 |
-
if (styles.transform && supportTransform) {
|
506 |
-
styles[supportTransform] = styles.transform;
|
507 |
-
}
|
508 |
-
|
509 |
-
Object.keys(styles).forEach(function (key) {
|
510 |
-
el.style[key] = styles[key];
|
511 |
-
});
|
512 |
-
return el;
|
513 |
-
} // Extend like jQuery.extend
|
514 |
-
// eslint-disable-next-line class-methods-use-this
|
515 |
-
|
516 |
-
}, {
|
517 |
-
key: "extend",
|
518 |
-
value: function extend(out) {
|
519 |
-
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
520 |
-
args[_key - 1] = arguments[_key];
|
521 |
-
}
|
522 |
-
|
523 |
-
out = out || {};
|
524 |
-
Object.keys(args).forEach(function (i) {
|
525 |
-
if (!args[i]) {
|
526 |
-
return;
|
527 |
-
}
|
528 |
-
|
529 |
-
Object.keys(args[i]).forEach(function (key) {
|
530 |
-
out[key] = args[i][key];
|
531 |
-
});
|
532 |
-
});
|
533 |
-
return out;
|
534 |
-
} // get window size and scroll position. Useful for extensions
|
535 |
-
// eslint-disable-next-line class-methods-use-this
|
536 |
-
|
537 |
-
}, {
|
538 |
-
key: "getWindowData",
|
539 |
-
value: function getWindowData() {
|
540 |
-
return {
|
541 |
-
width: global__WEBPACK_IMPORTED_MODULE_1__["window"].innerWidth || document.documentElement.clientWidth,
|
542 |
-
height: wndH,
|
543 |
-
y: document.documentElement.scrollTop
|
544 |
-
};
|
545 |
-
} // Jarallax functions
|
546 |
-
|
547 |
-
}, {
|
548 |
-
key: "initImg",
|
549 |
-
value: function initImg() {
|
550 |
-
var self = this; // find image element
|
551 |
-
|
552 |
-
var $imgElement = self.options.imgElement;
|
553 |
-
|
554 |
-
if ($imgElement && 'string' === typeof $imgElement) {
|
555 |
-
$imgElement = self.$item.querySelector($imgElement);
|
556 |
-
} // check if dom element
|
557 |
-
|
558 |
-
|
559 |
-
if (!($imgElement instanceof Element)) {
|
560 |
-
if (self.options.imgSrc) {
|
561 |
-
$imgElement = new Image();
|
562 |
-
$imgElement.src = self.options.imgSrc;
|
563 |
-
} else {
|
564 |
-
$imgElement = null;
|
565 |
-
}
|
566 |
-
}
|
567 |
-
|
568 |
-
if ($imgElement) {
|
569 |
-
if (self.options.keepImg) {
|
570 |
-
self.image.$item = $imgElement.cloneNode(true);
|
571 |
-
} else {
|
572 |
-
self.image.$item = $imgElement;
|
573 |
-
self.image.$itemParent = $imgElement.parentNode;
|
574 |
-
}
|
575 |
-
|
576 |
-
self.image.useImgTag = true;
|
577 |
-
} // true if there is img tag
|
578 |
-
|
579 |
-
|
580 |
-
if (self.image.$item) {
|
581 |
-
return true;
|
582 |
-
} // get image src
|
583 |
-
|
584 |
-
|
585 |
-
if (null === self.image.src) {
|
586 |
-
self.image.src = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7';
|
587 |
-
self.image.bgImage = self.css(self.$item, 'background-image');
|
588 |
-
}
|
589 |
-
|
590 |
-
return !(!self.image.bgImage || 'none' === self.image.bgImage);
|
591 |
-
}
|
592 |
-
}, {
|
593 |
-
key: "canInitParallax",
|
594 |
-
value: function canInitParallax() {
|
595 |
-
return supportTransform && !this.options.disableParallax();
|
596 |
-
}
|
597 |
-
}, {
|
598 |
-
key: "init",
|
599 |
-
value: function init() {
|
600 |
-
var self = this;
|
601 |
-
var containerStyles = {
|
602 |
-
position: 'absolute',
|
603 |
-
top: 0,
|
604 |
-
left: 0,
|
605 |
-
width: '100%',
|
606 |
-
height: '100%',
|
607 |
-
overflow: 'hidden'
|
608 |
-
};
|
609 |
-
var imageStyles = {
|
610 |
-
pointerEvents: 'none',
|
611 |
-
transformStyle: 'preserve-3d',
|
612 |
-
backfaceVisibility: 'hidden',
|
613 |
-
willChange: 'transform,opacity'
|
614 |
-
};
|
615 |
-
|
616 |
-
if (!self.options.keepImg) {
|
617 |
-
// save default user styles
|
618 |
-
var curStyle = self.$item.getAttribute('style');
|
619 |
-
|
620 |
-
if (curStyle) {
|
621 |
-
self.$item.setAttribute('data-jarallax-original-styles', curStyle);
|
622 |
-
}
|
623 |
-
|
624 |
-
if (self.image.useImgTag) {
|
625 |
-
var curImgStyle = self.image.$item.getAttribute('style');
|
626 |
-
|
627 |
-
if (curImgStyle) {
|
628 |
-
self.image.$item.setAttribute('data-jarallax-original-styles', curImgStyle);
|
629 |
-
}
|
630 |
-
}
|
631 |
-
} // set relative position and z-index to the parent
|
632 |
-
|
633 |
-
|
634 |
-
if ('static' === self.css(self.$item, 'position')) {
|
635 |
-
self.css(self.$item, {
|
636 |
-
position: 'relative'
|
637 |
-
});
|
638 |
-
}
|
639 |
-
|
640 |
-
if ('auto' === self.css(self.$item, 'z-index')) {
|
641 |
-
self.css(self.$item, {
|
642 |
-
zIndex: 0
|
643 |
-
});
|
644 |
-
} // container for parallax image
|
645 |
-
|
646 |
-
|
647 |
-
self.image.$container = document.createElement('div');
|
648 |
-
self.css(self.image.$container, containerStyles);
|
649 |
-
self.css(self.image.$container, {
|
650 |
-
'z-index': self.options.zIndex
|
651 |
-
}); // fix for IE https://github.com/nk-o/jarallax/issues/110
|
652 |
-
|
653 |
-
if (isIE) {
|
654 |
-
self.css(self.image.$container, {
|
655 |
-
opacity: 0.9999
|
656 |
-
});
|
657 |
-
}
|
658 |
-
|
659 |
-
self.image.$container.setAttribute('id', "jarallax-container-".concat(self.instanceID));
|
660 |
-
self.$item.appendChild(self.image.$container); // use img tag
|
661 |
-
|
662 |
-
if (self.image.useImgTag) {
|
663 |
-
imageStyles = self.extend({
|
664 |
-
'object-fit': self.options.imgSize,
|
665 |
-
'object-position': self.options.imgPosition,
|
666 |
-
// support for plugin https://github.com/bfred-it/object-fit-images
|
667 |
-
'font-family': "object-fit: ".concat(self.options.imgSize, "; object-position: ").concat(self.options.imgPosition, ";"),
|
668 |
-
'max-width': 'none'
|
669 |
-
}, containerStyles, imageStyles); // use div with background image
|
670 |
-
} else {
|
671 |
-
self.image.$item = document.createElement('div');
|
672 |
-
|
673 |
-
if (self.image.src) {
|
674 |
-
imageStyles = self.extend({
|
675 |
-
'background-position': self.options.imgPosition,
|
676 |
-
'background-size': self.options.imgSize,
|
677 |
-
'background-repeat': self.options.imgRepeat,
|
678 |
-
'background-image': self.image.bgImage || "url(\"".concat(self.image.src, "\")")
|
679 |
-
}, containerStyles, imageStyles);
|
680 |
-
}
|
681 |
-
}
|
682 |
-
|
683 |
-
if ('opacity' === self.options.type || 'scale' === self.options.type || 'scale-opacity' === self.options.type || 1 === self.options.speed) {
|
684 |
-
self.image.position = 'absolute';
|
685 |
-
} // 1. Check if one of parents have transform style (without this check, scroll transform will be inverted if used parallax with position fixed)
|
686 |
-
// discussion - https://github.com/nk-o/jarallax/issues/9
|
687 |
-
// 2. Check if parents have overflow scroll
|
688 |
-
|
689 |
-
|
690 |
-
if ('fixed' === self.image.position) {
|
691 |
-
var $parents = getParents(self.$item).filter(function (el) {
|
692 |
-
var styles = global__WEBPACK_IMPORTED_MODULE_1__["window"].getComputedStyle(el);
|
693 |
-
var parentTransform = styles['-webkit-transform'] || styles['-moz-transform'] || styles.transform;
|
694 |
-
var overflowRegex = /(auto|scroll)/;
|
695 |
-
return parentTransform && 'none' !== parentTransform || overflowRegex.test(styles.overflow + styles['overflow-y'] + styles['overflow-x']);
|
696 |
-
});
|
697 |
-
self.image.position = $parents.length ? 'absolute' : 'fixed';
|
698 |
-
} // add position to parallax block
|
699 |
-
|
700 |
-
|
701 |
-
imageStyles.position = self.image.position; // insert parallax image
|
702 |
-
|
703 |
-
self.css(self.image.$item, imageStyles);
|
704 |
-
self.image.$container.appendChild(self.image.$item); // set initial position and size
|
705 |
-
|
706 |
-
self.onResize();
|
707 |
-
self.onScroll(true); // call onInit event
|
708 |
-
|
709 |
-
if (self.options.onInit) {
|
710 |
-
self.options.onInit.call(self);
|
711 |
-
} // remove default user background
|
712 |
-
|
713 |
-
|
714 |
-
if ('none' !== self.css(self.$item, 'background-image')) {
|
715 |
-
self.css(self.$item, {
|
716 |
-
'background-image': 'none'
|
717 |
-
});
|
718 |
-
}
|
719 |
-
|
720 |
-
self.addToParallaxList();
|
721 |
-
} // add to parallax instances list
|
722 |
-
|
723 |
-
}, {
|
724 |
-
key: "addToParallaxList",
|
725 |
-
value: function addToParallaxList() {
|
726 |
-
jarallaxList.push({
|
727 |
-
instance: this
|
728 |
-
});
|
729 |
-
|
730 |
-
if (1 === jarallaxList.length) {
|
731 |
-
global__WEBPACK_IMPORTED_MODULE_1__["window"].requestAnimationFrame(updateParallax);
|
732 |
-
}
|
733 |
-
} // remove from parallax instances list
|
734 |
-
|
735 |
-
}, {
|
736 |
-
key: "removeFromParallaxList",
|
737 |
-
value: function removeFromParallaxList() {
|
738 |
-
var self = this;
|
739 |
-
jarallaxList.forEach(function (data, key) {
|
740 |
-
if (data.instance.instanceID === self.instanceID) {
|
741 |
-
jarallaxList.splice(key, 1);
|
742 |
-
}
|
743 |
-
});
|
744 |
-
}
|
745 |
-
}, {
|
746 |
-
key: "destroy",
|
747 |
-
value: function destroy() {
|
748 |
-
var self = this;
|
749 |
-
self.removeFromParallaxList(); // return styles on container as before jarallax init
|
750 |
-
|
751 |
-
var originalStylesTag = self.$item.getAttribute('data-jarallax-original-styles');
|
752 |
-
self.$item.removeAttribute('data-jarallax-original-styles'); // null occurs if there is no style tag before jarallax init
|
753 |
-
|
754 |
-
if (!originalStylesTag) {
|
755 |
-
self.$item.removeAttribute('style');
|
756 |
-
} else {
|
757 |
-
self.$item.setAttribute('style', originalStylesTag);
|
758 |
-
}
|
759 |
-
|
760 |
-
if (self.image.useImgTag) {
|
761 |
-
// return styles on img tag as before jarallax init
|
762 |
-
var originalStylesImgTag = self.image.$item.getAttribute('data-jarallax-original-styles');
|
763 |
-
self.image.$item.removeAttribute('data-jarallax-original-styles'); // null occurs if there is no style tag before jarallax init
|
764 |
-
|
765 |
-
if (!originalStylesImgTag) {
|
766 |
-
self.image.$item.removeAttribute('style');
|
767 |
-
} else {
|
768 |
-
self.image.$item.setAttribute('style', originalStylesTag);
|
769 |
-
} // move img tag to its default position
|
770 |
-
|
771 |
-
|
772 |
-
if (self.image.$itemParent) {
|
773 |
-
self.image.$itemParent.appendChild(self.image.$item);
|
774 |
-
}
|
775 |
-
} // remove additional dom elements
|
776 |
-
|
777 |
-
|
778 |
-
if (self.$clipStyles) {
|
779 |
-
self.$clipStyles.parentNode.removeChild(self.$clipStyles);
|
780 |
-
}
|
781 |
-
|
782 |
-
if (self.image.$container) {
|
783 |
-
self.image.$container.parentNode.removeChild(self.image.$container);
|
784 |
-
} // call onDestroy event
|
785 |
-
|
786 |
-
|
787 |
-
if (self.options.onDestroy) {
|
788 |
-
self.options.onDestroy.call(self);
|
789 |
-
} // delete jarallax from item
|
790 |
-
|
791 |
-
|
792 |
-
delete self.$item.jarallax;
|
793 |
-
} // it will remove some image overlapping
|
794 |
-
// overlapping occur due to an image position fixed inside absolute position element
|
795 |
-
|
796 |
-
}, {
|
797 |
-
key: "clipContainer",
|
798 |
-
value: function clipContainer() {
|
799 |
-
// needed only when background in fixed position
|
800 |
-
if ('fixed' !== this.image.position) {
|
801 |
-
return;
|
802 |
-
}
|
803 |
-
|
804 |
-
var self = this;
|
805 |
-
var rect = self.image.$container.getBoundingClientRect();
|
806 |
-
var width = rect.width,
|
807 |
-
height = rect.height;
|
808 |
-
|
809 |
-
if (!self.$clipStyles) {
|
810 |
-
self.$clipStyles = document.createElement('style');
|
811 |
-
self.$clipStyles.setAttribute('type', 'text/css');
|
812 |
-
self.$clipStyles.setAttribute('id', "jarallax-clip-".concat(self.instanceID));
|
813 |
-
var head = document.head || document.getElementsByTagName('head')[0];
|
814 |
-
head.appendChild(self.$clipStyles);
|
815 |
-
} // clip is used for old browsers.
|
816 |
-
// clip-path for modern browsers (also fixes Safari v14 bug https://github.com/nk-o/jarallax/issues/181 ).
|
817 |
-
|
818 |
-
|
819 |
-
var styles = "#jarallax-container-".concat(self.instanceID, " {\n clip: rect(0 ").concat(width, "px ").concat(height, "px 0);\n clip: rect(0, ").concat(width, "px, ").concat(height, "px, 0);\n -webkit-clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);\n clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);\n }"); // add clip styles inline (this method need for support IE8 and less browsers)
|
820 |
-
|
821 |
-
if (self.$clipStyles.styleSheet) {
|
822 |
-
self.$clipStyles.styleSheet.cssText = styles;
|
823 |
-
} else {
|
824 |
-
self.$clipStyles.innerHTML = styles;
|
825 |
-
}
|
826 |
-
}
|
827 |
-
}, {
|
828 |
-
key: "coverImage",
|
829 |
-
value: function coverImage() {
|
830 |
-
var self = this;
|
831 |
-
var rect = self.image.$container.getBoundingClientRect();
|
832 |
-
var contH = rect.height;
|
833 |
-
var speed = self.options.speed;
|
834 |
-
var isScroll = 'scroll' === self.options.type || 'scroll-opacity' === self.options.type;
|
835 |
-
var scrollDist = 0;
|
836 |
-
var resultH = contH;
|
837 |
-
var resultMT = 0; // scroll parallax
|
838 |
-
|
839 |
-
if (isScroll) {
|
840 |
-
// scroll distance and height for image
|
841 |
-
if (0 > speed) {
|
842 |
-
scrollDist = speed * Math.max(contH, wndH);
|
843 |
-
|
844 |
-
if (wndH < contH) {
|
845 |
-
scrollDist -= speed * (contH - wndH);
|
846 |
-
}
|
847 |
-
} else {
|
848 |
-
scrollDist = speed * (contH + wndH);
|
849 |
-
} // size for scroll parallax
|
850 |
-
|
851 |
-
|
852 |
-
if (1 < speed) {
|
853 |
-
resultH = Math.abs(scrollDist - wndH);
|
854 |
-
} else if (0 > speed) {
|
855 |
-
resultH = scrollDist / speed + Math.abs(scrollDist);
|
856 |
-
} else {
|
857 |
-
resultH += (wndH - contH) * (1 - speed);
|
858 |
-
}
|
859 |
-
|
860 |
-
scrollDist /= 2;
|
861 |
-
} // store scroll distance
|
862 |
-
|
863 |
-
|
864 |
-
self.parallaxScrollDistance = scrollDist; // vertical center
|
865 |
-
|
866 |
-
if (isScroll) {
|
867 |
-
resultMT = (wndH - resultH) / 2;
|
868 |
-
} else {
|
869 |
-
resultMT = (contH - resultH) / 2;
|
870 |
-
} // apply result to item
|
871 |
-
|
872 |
-
|
873 |
-
self.css(self.image.$item, {
|
874 |
-
height: "".concat(resultH, "px"),
|
875 |
-
marginTop: "".concat(resultMT, "px"),
|
876 |
-
left: 'fixed' === self.image.position ? "".concat(rect.left, "px") : '0',
|
877 |
-
width: "".concat(rect.width, "px")
|
878 |
-
}); // call onCoverImage event
|
879 |
-
|
880 |
-
if (self.options.onCoverImage) {
|
881 |
-
self.options.onCoverImage.call(self);
|
882 |
-
} // return some useful data. Used in the video cover function
|
883 |
-
|
884 |
-
|
885 |
-
return {
|
886 |
-
image: {
|
887 |
-
height: resultH,
|
888 |
-
marginTop: resultMT
|
889 |
-
},
|
890 |
-
container: rect
|
891 |
-
};
|
892 |
-
}
|
893 |
-
}, {
|
894 |
-
key: "isVisible",
|
895 |
-
value: function isVisible() {
|
896 |
-
return this.isElementInViewport || false;
|
897 |
-
}
|
898 |
-
}, {
|
899 |
-
key: "onScroll",
|
900 |
-
value: function onScroll(force) {
|
901 |
-
var self = this;
|
902 |
-
var rect = self.$item.getBoundingClientRect();
|
903 |
-
var contT = rect.top;
|
904 |
-
var contH = rect.height;
|
905 |
-
var styles = {}; // check if in viewport
|
906 |
-
|
907 |
-
var viewportRect = rect;
|
908 |
-
|
909 |
-
if (self.options.elementInViewport) {
|
910 |
-
viewportRect = self.options.elementInViewport.getBoundingClientRect();
|
911 |
-
}
|
912 |
-
|
913 |
-
self.isElementInViewport = 0 <= viewportRect.bottom && 0 <= viewportRect.right && viewportRect.top <= wndH && viewportRect.left <= global__WEBPACK_IMPORTED_MODULE_1__["window"].innerWidth; // stop calculations if item is not in viewport
|
914 |
-
|
915 |
-
if (force ? false : !self.isElementInViewport) {
|
916 |
-
return;
|
917 |
-
} // calculate parallax helping variables
|
918 |
-
|
919 |
-
|
920 |
-
var beforeTop = Math.max(0, contT);
|
921 |
-
var beforeTopEnd = Math.max(0, contH + contT);
|
922 |
-
var afterTop = Math.max(0, -contT);
|
923 |
-
var beforeBottom = Math.max(0, contT + contH - wndH);
|
924 |
-
var beforeBottomEnd = Math.max(0, contH - (contT + contH - wndH));
|
925 |
-
var afterBottom = Math.max(0, -contT + wndH - contH);
|
926 |
-
var fromViewportCenter = 1 - 2 * ((wndH - contT) / (wndH + contH)); // calculate on how percent of section is visible
|
927 |
-
|
928 |
-
var visiblePercent = 1;
|
929 |
-
|
930 |
-
if (contH < wndH) {
|
931 |
-
visiblePercent = 1 - (afterTop || beforeBottom) / contH;
|
932 |
-
} else if (beforeTopEnd <= wndH) {
|
933 |
-
visiblePercent = beforeTopEnd / wndH;
|
934 |
-
} else if (beforeBottomEnd <= wndH) {
|
935 |
-
visiblePercent = beforeBottomEnd / wndH;
|
936 |
-
} // opacity
|
937 |
-
|
938 |
-
|
939 |
-
if ('opacity' === self.options.type || 'scale-opacity' === self.options.type || 'scroll-opacity' === self.options.type) {
|
940 |
-
styles.transform = 'translate3d(0,0,0)';
|
941 |
-
styles.opacity = visiblePercent;
|
942 |
-
} // scale
|
943 |
-
|
944 |
-
|
945 |
-
if ('scale' === self.options.type || 'scale-opacity' === self.options.type) {
|
946 |
-
var scale = 1;
|
947 |
-
|
948 |
-
if (0 > self.options.speed) {
|
949 |
-
scale -= self.options.speed * visiblePercent;
|
950 |
-
} else {
|
951 |
-
scale += self.options.speed * (1 - visiblePercent);
|
952 |
-
}
|
953 |
-
|
954 |
-
styles.transform = "scale(".concat(scale, ") translate3d(0,0,0)");
|
955 |
-
} // scroll
|
956 |
-
|
957 |
-
|
958 |
-
if ('scroll' === self.options.type || 'scroll-opacity' === self.options.type) {
|
959 |
-
var positionY = self.parallaxScrollDistance * fromViewportCenter; // fix if parallax block in absolute position
|
960 |
-
|
961 |
-
if ('absolute' === self.image.position) {
|
962 |
-
positionY -= contT;
|
963 |
-
}
|
964 |
-
|
965 |
-
styles.transform = "translate3d(0,".concat(positionY, "px,0)");
|
966 |
-
}
|
967 |
-
|
968 |
-
self.css(self.image.$item, styles); // call onScroll event
|
969 |
-
|
970 |
-
if (self.options.onScroll) {
|
971 |
-
self.options.onScroll.call(self, {
|
972 |
-
section: rect,
|
973 |
-
beforeTop: beforeTop,
|
974 |
-
beforeTopEnd: beforeTopEnd,
|
975 |
-
afterTop: afterTop,
|
976 |
-
beforeBottom: beforeBottom,
|
977 |
-
beforeBottomEnd: beforeBottomEnd,
|
978 |
-
afterBottom: afterBottom,
|
979 |
-
visiblePercent: visiblePercent,
|
980 |
-
fromViewportCenter: fromViewportCenter
|
981 |
-
});
|
982 |
-
}
|
983 |
-
}
|
984 |
-
}, {
|
985 |
-
key: "onResize",
|
986 |
-
value: function onResize() {
|
987 |
-
this.coverImage();
|
988 |
-
this.clipContainer();
|
989 |
-
}
|
990 |
-
}]);
|
991 |
-
|
992 |
-
return Jarallax;
|
993 |
-
}(); // global definition
|
994 |
-
|
995 |
-
|
996 |
-
var plugin = function plugin(items, options) {
|
997 |
-
// check for dom element
|
998 |
-
// thanks: http://stackoverflow.com/questions/384286/javascript-isdom-how-do-you-check-if-a-javascript-object-is-a-dom-object
|
999 |
-
if ('object' === (typeof HTMLElement === "undefined" ? "undefined" : _typeof(HTMLElement)) ? items instanceof HTMLElement : items && 'object' === _typeof(items) && null !== items && 1 === items.nodeType && 'string' === typeof items.nodeName) {
|
1000 |
-
items = [items];
|
1001 |
-
}
|
1002 |
-
|
1003 |
-
var len = items.length;
|
1004 |
-
var k = 0;
|
1005 |
-
var ret;
|
1006 |
-
|
1007 |
-
for (var _len2 = arguments.length, args = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
|
1008 |
-
args[_key2 - 2] = arguments[_key2];
|
1009 |
-
}
|
1010 |
-
|
1011 |
-
for (k; k < len; k += 1) {
|
1012 |
-
if ('object' === _typeof(options) || 'undefined' === typeof options) {
|
1013 |
-
if (!items[k].jarallax) {
|
1014 |
-
items[k].jarallax = new Jarallax(items[k], options);
|
1015 |
-
}
|
1016 |
-
} else if (items[k].jarallax) {
|
1017 |
-
// eslint-disable-next-line prefer-spread
|
1018 |
-
ret = items[k].jarallax[options].apply(items[k].jarallax, args);
|
1019 |
-
}
|
1020 |
-
|
1021 |
-
if ('undefined' !== typeof ret) {
|
1022 |
-
return ret;
|
1023 |
-
}
|
1024 |
-
}
|
1025 |
-
|
1026 |
-
return items;
|
1027 |
-
};
|
1028 |
-
|
1029 |
-
plugin.constructor = Jarallax;
|
1030 |
-
/* harmony default export */ __webpack_exports__["default"] = (plugin);
|
1031 |
-
|
1032 |
-
/***/ })
|
1033 |
/******/ ]);
|
1 |
+
/*!
|
2 |
+
* Name : Just Another Parallax [Jarallax]
|
3 |
+
* Version : 1.12.7
|
4 |
+
* Author : nK <https://nkdev.info>
|
5 |
+
* GitHub : https://github.com/nk-o/jarallax
|
6 |
+
*/
|
7 |
+
/******/ (function(modules) { // webpackBootstrap
|
8 |
+
/******/ // The module cache
|
9 |
+
/******/ var installedModules = {};
|
10 |
+
/******/
|
11 |
+
/******/ // The require function
|
12 |
+
/******/ function __webpack_require__(moduleId) {
|
13 |
+
/******/
|
14 |
+
/******/ // Check if module is in cache
|
15 |
+
/******/ if(installedModules[moduleId]) {
|
16 |
+
/******/ return installedModules[moduleId].exports;
|
17 |
+
/******/ }
|
18 |
+
/******/ // Create a new module (and put it into the cache)
|
19 |
+
/******/ var module = installedModules[moduleId] = {
|
20 |
+
/******/ i: moduleId,
|
21 |
+
/******/ l: false,
|
22 |
+
/******/ exports: {}
|
23 |
+
/******/ };
|
24 |
+
/******/
|
25 |
+
/******/ // Execute the module function
|
26 |
+
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
27 |
+
/******/
|
28 |
+
/******/ // Flag the module as loaded
|
29 |
+
/******/ module.l = true;
|
30 |
+
/******/
|
31 |
+
/******/ // Return the exports of the module
|
32 |
+
/******/ return module.exports;
|
33 |
+
/******/ }
|
34 |
+
/******/
|
35 |
+
/******/
|
36 |
+
/******/ // expose the modules object (__webpack_modules__)
|
37 |
+
/******/ __webpack_require__.m = modules;
|
38 |
+
/******/
|
39 |
+
/******/ // expose the module cache
|
40 |
+
/******/ __webpack_require__.c = installedModules;
|
41 |
+
/******/
|
42 |
+
/******/ // define getter function for harmony exports
|
43 |
+
/******/ __webpack_require__.d = function(exports, name, getter) {
|
44 |
+
/******/ if(!__webpack_require__.o(exports, name)) {
|
45 |
+
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
46 |
+
/******/ }
|
47 |
+
/******/ };
|
48 |
+
/******/
|
49 |
+
/******/ // define __esModule on exports
|
50 |
+
/******/ __webpack_require__.r = function(exports) {
|
51 |
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
52 |
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
53 |
+
/******/ }
|
54 |
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
55 |
+
/******/ };
|
56 |
+
/******/
|
57 |
+
/******/ // create a fake namespace object
|
58 |
+
/******/ // mode & 1: value is a module id, require it
|
59 |
+
/******/ // mode & 2: merge all properties of value into the ns
|
60 |
+
/******/ // mode & 4: return value when already ns object
|
61 |
+
/******/ // mode & 8|1: behave like require
|
62 |
+
/******/ __webpack_require__.t = function(value, mode) {
|
63 |
+
/******/ if(mode & 1) value = __webpack_require__(value);
|
64 |
+
/******/ if(mode & 8) return value;
|
65 |
+
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
66 |
+
/******/ var ns = Object.create(null);
|
67 |
+
/******/ __webpack_require__.r(ns);
|
68 |
+
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
69 |
+
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
70 |
+
/******/ return ns;
|
71 |
+
/******/ };
|
72 |
+
/******/
|
73 |
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
74 |
+
/******/ __webpack_require__.n = function(module) {
|
75 |
+
/******/ var getter = module && module.__esModule ?
|
76 |
+
/******/ function getDefault() { return module['default']; } :
|
77 |
+
/******/ function getModuleExports() { return module; };
|
78 |
+
/******/ __webpack_require__.d(getter, 'a', getter);
|
79 |
+
/******/ return getter;
|
80 |
+
/******/ };
|
81 |
+
/******/
|
82 |
+
/******/ // Object.prototype.hasOwnProperty.call
|
83 |
+
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
84 |
+
/******/
|
85 |
+
/******/ // __webpack_public_path__
|
86 |
+
/******/ __webpack_require__.p = "";
|
87 |
+
/******/
|
88 |
+
/******/
|
89 |
+
/******/ // Load entry module and return exports
|
90 |
+
/******/ return __webpack_require__(__webpack_require__.s = 10);
|
91 |
+
/******/ })
|
92 |
+
/************************************************************************/
|
93 |
+
/******/ ([
|
94 |
+
/* 0 */,
|
95 |
+
/* 1 */,
|
96 |
+
/* 2 */
|
97 |
+
/***/ (function(module, exports) {
|
98 |
+
|
99 |
+
module.exports = function (callback) {
|
100 |
+
if (document.readyState === 'complete' || document.readyState === 'interactive') {
|
101 |
+
// Already ready or interactive, execute callback
|
102 |
+
callback.call();
|
103 |
+
} else if (document.attachEvent) {
|
104 |
+
// Old browsers
|
105 |
+
document.attachEvent('onreadystatechange', function () {
|
106 |
+
if (document.readyState === 'interactive') callback.call();
|
107 |
+
});
|
108 |
+
} else if (document.addEventListener) {
|
109 |
+
// Modern browsers
|
110 |
+
document.addEventListener('DOMContentLoaded', callback);
|
111 |
+
}
|
112 |
+
};
|
113 |
+
|
114 |
+
/***/ }),
|
115 |
+
/* 3 */
|
116 |
+
/***/ (function(module, exports, __webpack_require__) {
|
117 |
+
|
118 |
+
/* WEBPACK VAR INJECTION */(function(global) {var win;
|
119 |
+
|
120 |
+
if (typeof window !== "undefined") {
|
121 |
+
win = window;
|
122 |
+
} else if (typeof global !== "undefined") {
|
123 |
+
win = global;
|
124 |
+
} else if (typeof self !== "undefined") {
|
125 |
+
win = self;
|
126 |
+
} else {
|
127 |
+
win = {};
|
128 |
+
}
|
129 |
+
|
130 |
+
module.exports = win;
|
131 |
+
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(4)))
|
132 |
+
|
133 |
+
/***/ }),
|
134 |
+
/* 4 */
|
135 |
+
/***/ (function(module, exports) {
|
136 |
+
|
137 |
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
138 |
+
|
139 |
+
var g; // This works in non-strict mode
|
140 |
+
|
141 |
+
g = function () {
|
142 |
+
return this;
|
143 |
+
}();
|
144 |
+
|
145 |
+
try {
|
146 |
+
// This works if eval is allowed (see CSP)
|
147 |
+
g = g || new Function("return this")();
|
148 |
+
} catch (e) {
|
149 |
+
// This works if the window reference is available
|
150 |
+
if ((typeof window === "undefined" ? "undefined" : _typeof(window)) === "object") g = window;
|
151 |
+
} // g can still be undefined, but nothing to do about it...
|
152 |
+
// We return undefined, instead of nothing here, so it's
|
153 |
+
// easier to handle this case. if(!global) { ...}
|
154 |
+
|
155 |
+
|
156 |
+
module.exports = g;
|
157 |
+
|
158 |
+
/***/ }),
|
159 |
+
/* 5 */,
|
160 |
+
/* 6 */,
|
161 |
+
/* 7 */,
|
162 |
+
/* 8 */,
|
163 |
+
/* 9 */,
|
164 |
+
/* 10 */
|
165 |
+
/***/ (function(module, exports, __webpack_require__) {
|
166 |
+
|
167 |
+
module.exports = __webpack_require__(11);
|
168 |
+
|
169 |
+
|
170 |
+
/***/ }),
|
171 |
+
/* 11 */
|
172 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
173 |
+
|
174 |
+
"use strict";
|
175 |
+
__webpack_require__.r(__webpack_exports__);
|
176 |
+
/* harmony import */ var lite_ready__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
|
177 |
+
/* harmony import */ var lite_ready__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lite_ready__WEBPACK_IMPORTED_MODULE_0__);
|
178 |
+
/* harmony import */ var global__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3);
|
179 |
+
/* harmony import */ var global__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(global__WEBPACK_IMPORTED_MODULE_1__);
|
180 |
+
/* harmony import */ var _jarallax_esm__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(12);
|
181 |
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
182 |
+
|
183 |
+
|
184 |
+
|
185 |
+
// no conflict
|
186 |
+
|
187 |
+
var oldPlugin = global__WEBPACK_IMPORTED_MODULE_1__["window"].jarallax;
|
188 |
+
global__WEBPACK_IMPORTED_MODULE_1__["window"].jarallax = _jarallax_esm__WEBPACK_IMPORTED_MODULE_2__["default"];
|
189 |
+
|
190 |
+
global__WEBPACK_IMPORTED_MODULE_1__["window"].jarallax.noConflict = function () {
|
191 |
+
global__WEBPACK_IMPORTED_MODULE_1__["window"].jarallax = oldPlugin;
|
192 |
+
return this;
|
193 |
+
}; // jQuery support
|
194 |
+
|
195 |
+
|
196 |
+
if ('undefined' !== typeof global__WEBPACK_IMPORTED_MODULE_1__["jQuery"]) {
|
197 |
+
var jQueryPlugin = function jQueryPlugin() {
|
198 |
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
199 |
+
args[_key] = arguments[_key];
|
200 |
+
}
|
201 |
+
|
202 |
+
Array.prototype.unshift.call(args, this);
|
203 |
+
var res = _jarallax_esm__WEBPACK_IMPORTED_MODULE_2__["default"].apply(global__WEBPACK_IMPORTED_MODULE_1__["window"], args);
|
204 |
+
return 'object' !== _typeof(res) ? res : this;
|
205 |
+
};
|
206 |
+
|
207 |
+
jQueryPlugin.constructor = _jarallax_esm__WEBPACK_IMPORTED_MODULE_2__["default"].constructor; // no conflict
|
208 |
+
|
209 |
+
var oldJqPlugin = global__WEBPACK_IMPORTED_MODULE_1__["jQuery"].fn.jarallax;
|
210 |
+
global__WEBPACK_IMPORTED_MODULE_1__["jQuery"].fn.jarallax = jQueryPlugin;
|
211 |
+
|
212 |
+
global__WEBPACK_IMPORTED_MODULE_1__["jQuery"].fn.jarallax.noConflict = function () {
|
213 |
+
global__WEBPACK_IMPORTED_MODULE_1__["jQuery"].fn.jarallax = oldJqPlugin;
|
214 |
+
return this;
|
215 |
+
};
|
216 |
+
} // data-jarallax initialization
|
217 |
+
|
218 |
+
|
219 |
+
lite_ready__WEBPACK_IMPORTED_MODULE_0___default()(function () {
|
220 |
+
Object(_jarallax_esm__WEBPACK_IMPORTED_MODULE_2__["default"])(document.querySelectorAll('[data-jarallax]'));
|
221 |
+
});
|
222 |
+
|
223 |
+
/***/ }),
|
224 |
+
/* 12 */
|
225 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
226 |
+
|
227 |
+
"use strict";
|
228 |
+
__webpack_require__.r(__webpack_exports__);
|
229 |
+
/* harmony import */ var lite_ready__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
|
230 |
+
/* harmony import */ var lite_ready__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lite_ready__WEBPACK_IMPORTED_MODULE_0__);
|
231 |
+
/* harmony import */ var global__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3);
|
232 |
+
/* harmony import */ var global__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(global__WEBPACK_IMPORTED_MODULE_1__);
|
233 |
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
234 |
+
|
235 |
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
236 |
+
|
237 |
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
238 |
+
|
239 |
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
240 |
+
|
241 |
+
function _iterableToArrayLimit(arr, i) { var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]); if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
242 |
+
|
243 |
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
244 |
+
|
245 |
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
246 |
+
|
247 |
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
248 |
+
|
249 |
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
250 |
+
|
251 |
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
252 |
+
|
253 |
+
|
254 |
+
|
255 |
+
var navigator = global__WEBPACK_IMPORTED_MODULE_1__["window"].navigator;
|
256 |
+
var isIE = -1 < navigator.userAgent.indexOf('MSIE ') || -1 < navigator.userAgent.indexOf('Trident/') || -1 < navigator.userAgent.indexOf('Edge/');
|
257 |
+
var isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
258 |
+
|
259 |
+
var supportTransform = function () {
|
260 |
+
var prefixes = 'transform WebkitTransform MozTransform'.split(' ');
|
261 |
+
var div = document.createElement('div');
|
262 |
+
|
263 |
+
for (var i = 0; i < prefixes.length; i += 1) {
|
264 |
+
if (div && div.style[prefixes[i]] !== undefined) {
|
265 |
+
return prefixes[i];
|
266 |
+
}
|
267 |
+
}
|
268 |
+
|
269 |
+
return false;
|
270 |
+
}();
|
271 |
+
|
272 |
+
var $deviceHelper;
|
273 |
+
/**
|
274 |
+
* The most popular mobile browsers changes height after page scroll and this generates image jumping.
|
275 |
+
* We can fix it using this workaround with vh units.
|
276 |
+
*/
|
277 |
+
|
278 |
+
function getDeviceHeight() {
|
279 |
+
if (!$deviceHelper && document.body) {
|
280 |
+
$deviceHelper = document.createElement('div');
|
281 |
+
$deviceHelper.style.cssText = 'position: fixed; top: -9999px; left: 0; height: 100vh; width: 0;';
|
282 |
+
document.body.appendChild($deviceHelper);
|
283 |
+
}
|
284 |
+
|
285 |
+
return ($deviceHelper ? $deviceHelper.clientHeight : 0) || global__WEBPACK_IMPORTED_MODULE_1__["window"].innerHeight || document.documentElement.clientHeight;
|
286 |
+
} // Window height data
|
287 |
+
|
288 |
+
|
289 |
+
var wndH;
|
290 |
+
|
291 |
+
function updateWndVars() {
|
292 |
+
if (isMobile) {
|
293 |
+
wndH = getDeviceHeight();
|
294 |
+
} else {
|
295 |
+
wndH = global__WEBPACK_IMPORTED_MODULE_1__["window"].innerHeight || document.documentElement.clientHeight;
|
296 |
+
}
|
297 |
+
}
|
298 |
+
|
299 |
+
updateWndVars();
|
300 |
+
global__WEBPACK_IMPORTED_MODULE_1__["window"].addEventListener('resize', updateWndVars);
|
301 |
+
global__WEBPACK_IMPORTED_MODULE_1__["window"].addEventListener('orientationchange', updateWndVars);
|
302 |
+
global__WEBPACK_IMPORTED_MODULE_1__["window"].addEventListener('load', updateWndVars);
|
303 |
+
lite_ready__WEBPACK_IMPORTED_MODULE_0___default()(function () {
|
304 |
+
updateWndVars({
|
305 |
+
type: 'dom-loaded'
|
306 |
+
});
|
307 |
+
}); // list with all jarallax instances
|
308 |
+
// need to render all in one scroll/resize event
|
309 |
+
|
310 |
+
var jarallaxList = []; // get all parents of the element.
|
311 |
+
|
312 |
+
function getParents(elem) {
|
313 |
+
var parents = [];
|
314 |
+
|
315 |
+
while (null !== elem.parentElement) {
|
316 |
+
elem = elem.parentElement;
|
317 |
+
|
318 |
+
if (1 === elem.nodeType) {
|
319 |
+
parents.push(elem);
|
320 |
+
}
|
321 |
+
}
|
322 |
+
|
323 |
+
return parents;
|
324 |
+
}
|
325 |
+
|
326 |
+
function updateParallax() {
|
327 |
+
if (!jarallaxList.length) {
|
328 |
+
return;
|
329 |
+
}
|
330 |
+
|
331 |
+
jarallaxList.forEach(function (data, k) {
|
332 |
+
var instance = data.instance,
|
333 |
+
oldData = data.oldData;
|
334 |
+
var clientRect = instance.$item.getBoundingClientRect();
|
335 |
+
var newData = {
|
336 |
+
width: clientRect.width,
|
337 |
+
height: clientRect.height,
|
338 |
+
top: clientRect.top,
|
339 |
+
bottom: clientRect.bottom,
|
340 |
+
wndW: global__WEBPACK_IMPORTED_MODULE_1__["window"].innerWidth,
|
341 |
+
wndH: wndH
|
342 |
+
};
|
343 |
+
var isResized = !oldData || oldData.wndW !== newData.wndW || oldData.wndH !== newData.wndH || oldData.width !== newData.width || oldData.height !== newData.height;
|
344 |
+
var isScrolled = isResized || !oldData || oldData.top !== newData.top || oldData.bottom !== newData.bottom;
|
345 |
+
jarallaxList[k].oldData = newData;
|
346 |
+
|
347 |
+
if (isResized) {
|
348 |
+
instance.onResize();
|
349 |
+
}
|
350 |
+
|
351 |
+
if (isScrolled) {
|
352 |
+
instance.onScroll();
|
353 |
+
}
|
354 |
+
});
|
355 |
+
global__WEBPACK_IMPORTED_MODULE_1__["window"].requestAnimationFrame(updateParallax);
|
356 |
+
}
|
357 |
+
|
358 |
+
var instanceID = 0; // Jarallax class
|
359 |
+
|
360 |
+
var Jarallax = /*#__PURE__*/function () {
|
361 |
+
function Jarallax(item, userOptions) {
|
362 |
+
_classCallCheck(this, Jarallax);
|
363 |
+
|
364 |
+
var self = this;
|
365 |
+
self.instanceID = instanceID;
|
366 |
+
instanceID += 1;
|
367 |
+
self.$item = item;
|
368 |
+
self.defaults = {
|
369 |
+
type: 'scroll',
|
370 |
+
// type of parallax: scroll, scale, opacity, scale-opacity, scroll-opacity
|
371 |
+
speed: 0.5,
|
372 |
+
// supported value from -1 to 2
|
373 |
+
imgSrc: null,
|
374 |
+
imgElement: '.jarallax-img',
|
375 |
+
imgSize: 'cover',
|
376 |
+
imgPosition: '50% 50%',
|
377 |
+
imgRepeat: 'no-repeat',
|
378 |
+
// supported only for background, not for <img> tag
|
379 |
+
keepImg: false,
|
380 |
+
// keep <img> tag in it's default place
|
381 |
+
elementInViewport: null,
|
382 |
+
zIndex: -100,
|
383 |
+
disableParallax: false,
|
384 |
+
disableVideo: false,
|
385 |
+
// video
|
386 |
+
videoSrc: null,
|
387 |
+
videoStartTime: 0,
|
388 |
+
videoEndTime: 0,
|
389 |
+
videoVolume: 0,
|
390 |
+
videoLoop: true,
|
391 |
+
videoPlayOnlyVisible: true,
|
392 |
+
videoLazyLoading: true,
|
393 |
+
// events
|
394 |
+
onScroll: null,
|
395 |
+
// function(calculations) {}
|
396 |
+
onInit: null,
|
397 |
+
// function() {}
|
398 |
+
onDestroy: null,
|
399 |
+
// function() {}
|
400 |
+
onCoverImage: null // function() {}
|
401 |
+
|
402 |
+
}; // prepare data-options
|
403 |
+
|
404 |
+
var dataOptions = self.$item.dataset || {};
|
405 |
+
var pureDataOptions = {};
|
406 |
+
Object.keys(dataOptions).forEach(function (key) {
|
407 |
+
var loweCaseOption = key.substr(0, 1).toLowerCase() + key.substr(1);
|
408 |
+
|
409 |
+
if (loweCaseOption && 'undefined' !== typeof self.defaults[loweCaseOption]) {
|
410 |
+
pureDataOptions[loweCaseOption] = dataOptions[key];
|
411 |
+
}
|
412 |
+
});
|
413 |
+
self.options = self.extend({}, self.defaults, pureDataOptions, userOptions);
|
414 |
+
self.pureOptions = self.extend({}, self.options); // prepare 'true' and 'false' strings to boolean
|
415 |
+
|
416 |
+
Object.keys(self.options).forEach(function (key) {
|
417 |
+
if ('true' === self.options[key]) {
|
418 |
+
self.options[key] = true;
|
419 |
+
} else if ('false' === self.options[key]) {
|
420 |
+
self.options[key] = false;
|
421 |
+
}
|
422 |
+
}); // fix speed option [-1.0, 2.0]
|
423 |
+
|
424 |
+
self.options.speed = Math.min(2, Math.max(-1, parseFloat(self.options.speed))); // prepare disableParallax callback
|
425 |
+
|
426 |
+
if ('string' === typeof self.options.disableParallax) {
|
427 |
+
self.options.disableParallax = new RegExp(self.options.disableParallax);
|
428 |
+
}
|
429 |
+
|
430 |
+
if (self.options.disableParallax instanceof RegExp) {
|
431 |
+
var disableParallaxRegexp = self.options.disableParallax;
|
432 |
+
|
433 |
+
self.options.disableParallax = function () {
|
434 |
+
return disableParallaxRegexp.test(navigator.userAgent);
|
435 |
+
};
|
436 |
+
}
|
437 |
+
|
438 |
+
if ('function' !== typeof self.options.disableParallax) {
|
439 |
+
self.options.disableParallax = function () {
|
440 |
+
return false;
|
441 |
+
};
|
442 |
+
} // prepare disableVideo callback
|
443 |
+
|
444 |
+
|
445 |
+
if ('string' === typeof self.options.disableVideo) {
|
446 |
+
self.options.disableVideo = new RegExp(self.options.disableVideo);
|
447 |
+
}
|
448 |
+
|
449 |
+
if (self.options.disableVideo instanceof RegExp) {
|
450 |
+
var disableVideoRegexp = self.options.disableVideo;
|
451 |
+
|
452 |
+
self.options.disableVideo = function () {
|
453 |
+
return disableVideoRegexp.test(navigator.userAgent);
|
454 |
+
};
|
455 |
+
}
|
456 |
+
|
457 |
+
if ('function' !== typeof self.options.disableVideo) {
|
458 |
+
self.options.disableVideo = function () {
|
459 |
+
return false;
|
460 |
+
};
|
461 |
+
} // custom element to check if parallax in viewport
|
462 |
+
|
463 |
+
|
464 |
+
var elementInVP = self.options.elementInViewport; // get first item from array
|
465 |
+
|
466 |
+
if (elementInVP && 'object' === _typeof(elementInVP) && 'undefined' !== typeof elementInVP.length) {
|
467 |
+
var _elementInVP = elementInVP;
|
468 |
+
|
469 |
+
var _elementInVP2 = _slicedToArray(_elementInVP, 1);
|
470 |
+
|
471 |
+
elementInVP = _elementInVP2[0];
|
472 |
+
} // check if dom element
|
473 |
+
|
474 |
+
|
475 |
+
if (!(elementInVP instanceof Element)) {
|
476 |
+
elementInVP = null;
|
477 |
+
}
|
478 |
+
|
479 |
+
self.options.elementInViewport = elementInVP;
|
480 |
+
self.image = {
|
481 |
+
src: self.options.imgSrc || null,
|
482 |
+
$container: null,
|
483 |
+
useImgTag: false,
|
484 |
+
// position fixed is needed for the most of browsers because absolute position have glitches
|
485 |
+
// on MacOS with smooth scroll there is a huge lags with absolute position - https://github.com/nk-o/jarallax/issues/75
|
486 |
+
// on mobile devices better scrolled with absolute position
|
487 |
+
position: /iPad|iPhone|iPod|Android/.test(navigator.userAgent) ? 'absolute' : 'fixed'
|
488 |
+
};
|
489 |
+
|
490 |
+
if (self.initImg() && self.canInitParallax()) {
|
491 |
+
self.init();
|
492 |
+
}
|
493 |
+
} // add styles to element
|
494 |
+
// eslint-disable-next-line class-methods-use-this
|
495 |
+
|
496 |
+
|
497 |
+
_createClass(Jarallax, [{
|
498 |
+
key: "css",
|
499 |
+
value: function css(el, styles) {
|
500 |
+
if ('string' === typeof styles) {
|
501 |
+
return global__WEBPACK_IMPORTED_MODULE_1__["window"].getComputedStyle(el).getPropertyValue(styles);
|
502 |
+
} // add transform property with vendor prefix
|
503 |
+
|
504 |
+
|
505 |
+
if (styles.transform && supportTransform) {
|
506 |
+
styles[supportTransform] = styles.transform;
|
507 |
+
}
|
508 |
+
|
509 |
+
Object.keys(styles).forEach(function (key) {
|
510 |
+
el.style[key] = styles[key];
|
511 |
+
});
|
512 |
+
return el;
|
513 |
+
} // Extend like jQuery.extend
|
514 |
+
// eslint-disable-next-line class-methods-use-this
|
515 |
+
|
516 |
+
}, {
|
517 |
+
key: "extend",
|
518 |
+
value: function extend(out) {
|
519 |
+
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
520 |
+
args[_key - 1] = arguments[_key];
|
521 |
+
}
|
522 |
+
|
523 |
+
out = out || {};
|
524 |
+
Object.keys(args).forEach(function (i) {
|
525 |
+
if (!args[i]) {
|
526 |
+
return;
|
527 |
+
}
|
528 |
+
|
529 |
+
Object.keys(args[i]).forEach(function (key) {
|
530 |
+
out[key] = args[i][key];
|
531 |
+
});
|
532 |
+
});
|
533 |
+
return out;
|
534 |
+
} // get window size and scroll position. Useful for extensions
|
535 |
+
// eslint-disable-next-line class-methods-use-this
|
536 |
+
|
537 |
+
}, {
|
538 |
+
key: "getWindowData",
|
539 |
+
value: function getWindowData() {
|
540 |
+
return {
|
541 |
+
width: global__WEBPACK_IMPORTED_MODULE_1__["window"].innerWidth || document.documentElement.clientWidth,
|
542 |
+
height: wndH,
|
543 |
+
y: document.documentElement.scrollTop
|
544 |
+
};
|
545 |
+
} // Jarallax functions
|
546 |
+
|
547 |
+
}, {
|
548 |
+
key: "initImg",
|
549 |
+
value: function initImg() {
|
550 |
+
var self = this; // find image element
|
551 |
+
|
552 |
+
var $imgElement = self.options.imgElement;
|
553 |
+
|
554 |
+
if ($imgElement && 'string' === typeof $imgElement) {
|
555 |
+
$imgElement = self.$item.querySelector($imgElement);
|
556 |
+
} // check if dom element
|
557 |
+
|
558 |
+
|
559 |
+
if (!($imgElement instanceof Element)) {
|
560 |
+
if (self.options.imgSrc) {
|
561 |
+
$imgElement = new Image();
|
562 |
+
$imgElement.src = self.options.imgSrc;
|
563 |
+
} else {
|
564 |
+
$imgElement = null;
|
565 |
+
}
|
566 |
+
}
|
567 |
+
|
568 |
+
if ($imgElement) {
|
569 |
+
if (self.options.keepImg) {
|
570 |
+
self.image.$item = $imgElement.cloneNode(true);
|
571 |
+
} else {
|
572 |
+
self.image.$item = $imgElement;
|
573 |
+
self.image.$itemParent = $imgElement.parentNode;
|
574 |
+
}
|
575 |
+
|
576 |
+
self.image.useImgTag = true;
|
577 |
+
} // true if there is img tag
|
578 |
+
|
579 |
+
|
580 |
+
if (self.image.$item) {
|
581 |
+
return true;
|
582 |
+
} // get image src
|
583 |
+
|
584 |
+
|
585 |
+
if (null === self.image.src) {
|
586 |
+
self.image.src = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7';
|
587 |
+
self.image.bgImage = self.css(self.$item, 'background-image');
|
588 |
+
}
|
589 |
+
|
590 |
+
return !(!self.image.bgImage || 'none' === self.image.bgImage);
|
591 |
+
}
|
592 |
+
}, {
|
593 |
+
key: "canInitParallax",
|
594 |
+
value: function canInitParallax() {
|
595 |
+
return supportTransform && !this.options.disableParallax();
|
596 |
+
}
|
597 |
+
}, {
|
598 |
+
key: "init",
|
599 |
+
value: function init() {
|
600 |
+
var self = this;
|
601 |
+
var containerStyles = {
|
602 |
+
position: 'absolute',
|
603 |
+
top: 0,
|
604 |
+
left: 0,
|
605 |
+
width: '100%',
|
606 |
+
height: '100%',
|
607 |
+
overflow: 'hidden'
|
608 |
+
};
|
609 |
+
var imageStyles = {
|
610 |
+
pointerEvents: 'none',
|
611 |
+
transformStyle: 'preserve-3d',
|
612 |
+
backfaceVisibility: 'hidden',
|
613 |
+
willChange: 'transform,opacity'
|
614 |
+
};
|
615 |
+
|
616 |
+
if (!self.options.keepImg) {
|
617 |
+
// save default user styles
|
618 |
+
var curStyle = self.$item.getAttribute('style');
|
619 |
+
|
620 |
+
if (curStyle) {
|
621 |
+
self.$item.setAttribute('data-jarallax-original-styles', curStyle);
|
622 |
+
}
|
623 |
+
|
624 |
+
if (self.image.useImgTag) {
|
625 |
+
var curImgStyle = self.image.$item.getAttribute('style');
|
626 |
+
|
627 |
+
if (curImgStyle) {
|
628 |
+
self.image.$item.setAttribute('data-jarallax-original-styles', curImgStyle);
|
629 |
+
}
|
630 |
+
}
|
631 |
+
} // set relative position and z-index to the parent
|
632 |
+
|
633 |
+
|
634 |
+
if ('static' === self.css(self.$item, 'position')) {
|
635 |
+
self.css(self.$item, {
|
636 |
+
position: 'relative'
|
637 |
+
});
|
638 |
+
}
|
639 |
+
|
640 |
+
if ('auto' === self.css(self.$item, 'z-index')) {
|
641 |
+
self.css(self.$item, {
|
642 |
+
zIndex: 0
|
643 |
+
});
|
644 |
+
} // container for parallax image
|
645 |
+
|
646 |
+
|
647 |
+
self.image.$container = document.createElement('div');
|
648 |
+
self.css(self.image.$container, containerStyles);
|
649 |
+
self.css(self.image.$container, {
|
650 |
+
'z-index': self.options.zIndex
|
651 |
+
}); // fix for IE https://github.com/nk-o/jarallax/issues/110
|
652 |
+
|
653 |
+
if (isIE) {
|
654 |
+
self.css(self.image.$container, {
|
655 |
+
opacity: 0.9999
|
656 |
+
});
|
657 |
+
}
|
658 |
+
|
659 |
+
self.image.$container.setAttribute('id', "jarallax-container-".concat(self.instanceID));
|
660 |
+
self.$item.appendChild(self.image.$container); // use img tag
|
661 |
+
|
662 |
+
if (self.image.useImgTag) {
|
663 |
+
imageStyles = self.extend({
|
664 |
+
'object-fit': self.options.imgSize,
|
665 |
+
'object-position': self.options.imgPosition,
|
666 |
+
// support for plugin https://github.com/bfred-it/object-fit-images
|
667 |
+
'font-family': "object-fit: ".concat(self.options.imgSize, "; object-position: ").concat(self.options.imgPosition, ";"),
|
668 |
+
'max-width': 'none'
|
669 |
+
}, containerStyles, imageStyles); // use div with background image
|
670 |
+
} else {
|
671 |
+
self.image.$item = document.createElement('div');
|
672 |
+
|
673 |
+
if (self.image.src) {
|
674 |
+
imageStyles = self.extend({
|
675 |
+
'background-position': self.options.imgPosition,
|
676 |
+
'background-size': self.options.imgSize,
|
677 |
+
'background-repeat': self.options.imgRepeat,
|
678 |
+
'background-image': self.image.bgImage || "url(\"".concat(self.image.src, "\")")
|
679 |
+
}, containerStyles, imageStyles);
|
680 |
+
}
|
681 |
+
}
|
682 |
+
|
683 |
+
if ('opacity' === self.options.type || 'scale' === self.options.type || 'scale-opacity' === self.options.type || 1 === self.options.speed) {
|
684 |
+
self.image.position = 'absolute';
|
685 |
+
} // 1. Check if one of parents have transform style (without this check, scroll transform will be inverted if used parallax with position fixed)
|
686 |
+
// discussion - https://github.com/nk-o/jarallax/issues/9
|
687 |
+
// 2. Check if parents have overflow scroll
|
688 |
+
|
689 |
+
|
690 |
+
if ('fixed' === self.image.position) {
|
691 |
+
var $parents = getParents(self.$item).filter(function (el) {
|
692 |
+
var styles = global__WEBPACK_IMPORTED_MODULE_1__["window"].getComputedStyle(el);
|
693 |
+
var parentTransform = styles['-webkit-transform'] || styles['-moz-transform'] || styles.transform;
|
694 |
+
var overflowRegex = /(auto|scroll)/;
|
695 |
+
return parentTransform && 'none' !== parentTransform || overflowRegex.test(styles.overflow + styles['overflow-y'] + styles['overflow-x']);
|
696 |
+
});
|
697 |
+
self.image.position = $parents.length ? 'absolute' : 'fixed';
|
698 |
+
} // add position to parallax block
|
699 |
+
|
700 |
+
|
701 |
+
imageStyles.position = self.image.position; // insert parallax image
|
702 |
+
|
703 |
+
self.css(self.image.$item, imageStyles);
|
704 |
+
self.image.$container.appendChild(self.image.$item); // set initial position and size
|
705 |
+
|
706 |
+
self.onResize();
|
707 |
+
self.onScroll(true); // call onInit event
|
708 |
+
|
709 |
+
if (self.options.onInit) {
|
710 |
+
self.options.onInit.call(self);
|
711 |
+
} // remove default user background
|
712 |
+
|
713 |
+
|
714 |
+
if ('none' !== self.css(self.$item, 'background-image')) {
|
715 |
+
self.css(self.$item, {
|
716 |
+
'background-image': 'none'
|
717 |
+
});
|
718 |
+
}
|
719 |
+
|
720 |
+
self.addToParallaxList();
|
721 |
+
} // add to parallax instances list
|
722 |
+
|
723 |
+
}, {
|
724 |
+
key: "addToParallaxList",
|
725 |
+
value: function addToParallaxList() {
|
726 |
+
jarallaxList.push({
|
727 |
+
instance: this
|
728 |
+
});
|
729 |
+
|
730 |
+
if (1 === jarallaxList.length) {
|
731 |
+
global__WEBPACK_IMPORTED_MODULE_1__["window"].requestAnimationFrame(updateParallax);
|
732 |
+
}
|
733 |
+
} // remove from parallax instances list
|
734 |
+
|
735 |
+
}, {
|
736 |
+
key: "removeFromParallaxList",
|
737 |
+
value: function removeFromParallaxList() {
|
738 |
+
var self = this;
|
739 |
+
jarallaxList.forEach(function (data, key) {
|
740 |
+
if (data.instance.instanceID === self.instanceID) {
|
741 |
+
jarallaxList.splice(key, 1);
|
742 |
+
}
|
743 |
+
});
|
744 |
+
}
|
745 |
+
}, {
|
746 |
+
key: "destroy",
|
747 |
+
value: function destroy() {
|
748 |
+
var self = this;
|
749 |
+
self.removeFromParallaxList(); // return styles on container as before jarallax init
|
750 |
+
|
751 |
+
var originalStylesTag = self.$item.getAttribute('data-jarallax-original-styles');
|
752 |
+
self.$item.removeAttribute('data-jarallax-original-styles'); // null occurs if there is no style tag before jarallax init
|
753 |
+
|
754 |
+
if (!originalStylesTag) {
|
755 |
+
self.$item.removeAttribute('style');
|
756 |
+
} else {
|
757 |
+
self.$item.setAttribute('style', originalStylesTag);
|
758 |
+
}
|
759 |
+
|
760 |
+
if (self.image.useImgTag) {
|
761 |
+
// return styles on img tag as before jarallax init
|
762 |
+
var originalStylesImgTag = self.image.$item.getAttribute('data-jarallax-original-styles');
|
763 |
+
self.image.$item.removeAttribute('data-jarallax-original-styles'); // null occurs if there is no style tag before jarallax init
|
764 |
+
|
765 |
+
if (!originalStylesImgTag) {
|
766 |
+
self.image.$item.removeAttribute('style');
|
767 |
+
} else {
|
768 |
+
self.image.$item.setAttribute('style', originalStylesTag);
|
769 |
+
} // move img tag to its default position
|
770 |
+
|
771 |
+
|
772 |
+
if (self.image.$itemParent) {
|
773 |
+
self.image.$itemParent.appendChild(self.image.$item);
|
774 |
+
}
|
775 |
+
} // remove additional dom elements
|
776 |
+
|
777 |
+
|
778 |
+
if (self.$clipStyles) {
|
779 |
+
self.$clipStyles.parentNode.removeChild(self.$clipStyles);
|
780 |
+
}
|
781 |
+
|
782 |
+
if (self.image.$container) {
|
783 |
+
self.image.$container.parentNode.removeChild(self.image.$container);
|
784 |
+
} // call onDestroy event
|
785 |
+
|
786 |
+
|
787 |
+
if (self.options.onDestroy) {
|
788 |
+
self.options.onDestroy.call(self);
|
789 |
+
} // delete jarallax from item
|
790 |
+
|
791 |
+
|
792 |
+
delete self.$item.jarallax;
|
793 |
+
} // it will remove some image overlapping
|
794 |
+
// overlapping occur due to an image position fixed inside absolute position element
|
795 |
+
|
796 |
+
}, {
|
797 |
+
key: "clipContainer",
|
798 |
+
value: function clipContainer() {
|
799 |
+
// needed only when background in fixed position
|
800 |
+
if ('fixed' !== this.image.position) {
|
801 |
+
return;
|
802 |
+
}
|
803 |
+
|
804 |
+
var self = this;
|
805 |
+
var rect = self.image.$container.getBoundingClientRect();
|
806 |
+
var width = rect.width,
|
807 |
+
height = rect.height;
|
808 |
+
|
809 |
+
if (!self.$clipStyles) {
|
810 |
+
self.$clipStyles = document.createElement('style');
|
811 |
+
self.$clipStyles.setAttribute('type', 'text/css');
|
812 |
+
self.$clipStyles.setAttribute('id', "jarallax-clip-".concat(self.instanceID));
|
813 |
+
var head = document.head || document.getElementsByTagName('head')[0];
|
814 |
+
head.appendChild(self.$clipStyles);
|
815 |
+
} // clip is used for old browsers.
|
816 |
+
// clip-path for modern browsers (also fixes Safari v14 bug https://github.com/nk-o/jarallax/issues/181 ).
|
817 |
+
|
818 |
+
|
819 |
+
var styles = "#jarallax-container-".concat(self.instanceID, " {\n clip: rect(0 ").concat(width, "px ").concat(height, "px 0);\n clip: rect(0, ").concat(width, "px, ").concat(height, "px, 0);\n -webkit-clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);\n clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);\n }"); // add clip styles inline (this method need for support IE8 and less browsers)
|
820 |
+
|
821 |
+
if (self.$clipStyles.styleSheet) {
|
822 |
+
self.$clipStyles.styleSheet.cssText = styles;
|
823 |
+
} else {
|
824 |
+
self.$clipStyles.innerHTML = styles;
|
825 |
+
}
|
826 |
+
}
|
827 |
+
}, {
|
828 |
+
key: "coverImage",
|
829 |
+
value: function coverImage() {
|
830 |
+
var self = this;
|
831 |
+
var rect = self.image.$container.getBoundingClientRect();
|
832 |
+
var contH = rect.height;
|
833 |
+
var speed = self.options.speed;
|
834 |
+
var isScroll = 'scroll' === self.options.type || 'scroll-opacity' === self.options.type;
|
835 |
+
var scrollDist = 0;
|
836 |
+
var resultH = contH;
|
837 |
+
var resultMT = 0; // scroll parallax
|
838 |
+
|
839 |
+
if (isScroll) {
|
840 |
+
// scroll distance and height for image
|
841 |
+
if (0 > speed) {
|
842 |
+
scrollDist = speed * Math.max(contH, wndH);
|
843 |
+
|
844 |
+
if (wndH < contH) {
|
845 |
+
scrollDist -= speed * (contH - wndH);
|
846 |
+
}
|
847 |
+
} else {
|
848 |
+
scrollDist = speed * (contH + wndH);
|
849 |
+
} // size for scroll parallax
|
850 |
+
|
851 |
+
|
852 |
+
if (1 < speed) {
|
853 |
+
resultH = Math.abs(scrollDist - wndH);
|
854 |
+
} else if (0 > speed) {
|
855 |
+
resultH = scrollDist / speed + Math.abs(scrollDist);
|
856 |
+
} else {
|
857 |
+
resultH += (wndH - contH) * (1 - speed);
|
858 |
+
}
|
859 |
+
|
860 |
+
scrollDist /= 2;
|
861 |
+
} // store scroll distance
|
862 |
+
|
863 |
+
|
864 |
+
self.parallaxScrollDistance = scrollDist; // vertical center
|
865 |
+
|
866 |
+
if (isScroll) {
|
867 |
+
resultMT = (wndH - resultH) / 2;
|
868 |
+
} else {
|
869 |
+
resultMT = (contH - resultH) / 2;
|
870 |
+
} // apply result to item
|
871 |
+
|
872 |
+
|
873 |
+
self.css(self.image.$item, {
|
874 |
+
height: "".concat(resultH, "px"),
|
875 |
+
marginTop: "".concat(resultMT, "px"),
|
876 |
+
left: 'fixed' === self.image.position ? "".concat(rect.left, "px") : '0',
|
877 |
+
width: "".concat(rect.width, "px")
|
878 |
+
}); // call onCoverImage event
|
879 |
+
|
880 |
+
if (self.options.onCoverImage) {
|
881 |
+
self.options.onCoverImage.call(self);
|
882 |
+
} // return some useful data. Used in the video cover function
|
883 |
+
|
884 |
+
|
885 |
+
return {
|
886 |
+
image: {
|
887 |
+
height: resultH,
|
888 |
+
marginTop: resultMT
|
889 |
+
},
|
890 |
+
container: rect
|
891 |
+
};
|
892 |
+
}
|
893 |
+
}, {
|
894 |
+
key: "isVisible",
|
895 |
+
value: function isVisible() {
|
896 |
+
return this.isElementInViewport || false;
|
897 |
+
}
|
898 |
+
}, {
|
899 |
+
key: "onScroll",
|
900 |
+
value: function onScroll(force) {
|
901 |
+
var self = this;
|
902 |
+
var rect = self.$item.getBoundingClientRect();
|
903 |
+
var contT = rect.top;
|
904 |
+
var contH = rect.height;
|
905 |
+
var styles = {}; // check if in viewport
|
906 |
+
|
907 |
+
var viewportRect = rect;
|
908 |
+
|
909 |
+
if (self.options.elementInViewport) {
|
910 |
+
viewportRect = self.options.elementInViewport.getBoundingClientRect();
|
911 |
+
}
|
912 |
+
|
913 |
+
self.isElementInViewport = 0 <= viewportRect.bottom && 0 <= viewportRect.right && viewportRect.top <= wndH && viewportRect.left <= global__WEBPACK_IMPORTED_MODULE_1__["window"].innerWidth; // stop calculations if item is not in viewport
|
914 |
+
|
915 |
+
if (force ? false : !self.isElementInViewport) {
|
916 |
+
return;
|
917 |
+
} // calculate parallax helping variables
|
918 |
+
|
919 |
+
|
920 |
+
var beforeTop = Math.max(0, contT);
|
921 |
+
var beforeTopEnd = Math.max(0, contH + contT);
|
922 |
+
var afterTop = Math.max(0, -contT);
|
923 |
+
var beforeBottom = Math.max(0, contT + contH - wndH);
|
924 |
+
var beforeBottomEnd = Math.max(0, contH - (contT + contH - wndH));
|
925 |
+
var afterBottom = Math.max(0, -contT + wndH - contH);
|
926 |
+
var fromViewportCenter = 1 - 2 * ((wndH - contT) / (wndH + contH)); // calculate on how percent of section is visible
|
927 |
+
|
928 |
+
var visiblePercent = 1;
|
929 |
+
|
930 |
+
if (contH < wndH) {
|
931 |
+
visiblePercent = 1 - (afterTop || beforeBottom) / contH;
|
932 |
+
} else if (beforeTopEnd <= wndH) {
|
933 |
+
visiblePercent = beforeTopEnd / wndH;
|
934 |
+
} else if (beforeBottomEnd <= wndH) {
|
935 |
+
visiblePercent = beforeBottomEnd / wndH;
|
936 |
+
} // opacity
|
937 |
+
|
938 |
+
|
939 |
+
if ('opacity' === self.options.type || 'scale-opacity' === self.options.type || 'scroll-opacity' === self.options.type) {
|
940 |
+
styles.transform = 'translate3d(0,0,0)';
|
941 |
+
styles.opacity = visiblePercent;
|
942 |
+
} // scale
|
943 |
+
|
944 |
+
|
945 |
+
if ('scale' === self.options.type || 'scale-opacity' === self.options.type) {
|
946 |
+
var scale = 1;
|
947 |
+
|
948 |
+
if (0 > self.options.speed) {
|
949 |
+
scale -= self.options.speed * visiblePercent;
|
950 |
+
} else {
|
951 |
+
scale += self.options.speed * (1 - visiblePercent);
|
952 |
+
}
|
953 |
+
|
954 |
+
styles.transform = "scale(".concat(scale, ") translate3d(0,0,0)");
|
955 |
+
} // scroll
|
956 |
+
|
957 |
+
|
958 |
+
if ('scroll' === self.options.type || 'scroll-opacity' === self.options.type) {
|
959 |
+
var positionY = self.parallaxScrollDistance * fromViewportCenter; // fix if parallax block in absolute position
|
960 |
+
|
961 |
+
if ('absolute' === self.image.position) {
|
962 |
+
positionY -= contT;
|
963 |
+
}
|
964 |
+
|
965 |
+
styles.transform = "translate3d(0,".concat(positionY, "px,0)");
|
966 |
+
}
|
967 |
+
|
968 |
+
self.css(self.image.$item, styles); // call onScroll event
|
969 |
+
|
970 |
+
if (self.options.onScroll) {
|
971 |
+
self.options.onScroll.call(self, {
|
972 |
+
section: rect,
|
973 |
+
beforeTop: beforeTop,
|
974 |
+
beforeTopEnd: beforeTopEnd,
|
975 |
+
afterTop: afterTop,
|
976 |
+
beforeBottom: beforeBottom,
|
977 |
+
beforeBottomEnd: beforeBottomEnd,
|
978 |
+
afterBottom: afterBottom,
|
979 |
+
visiblePercent: visiblePercent,
|
980 |
+
fromViewportCenter: fromViewportCenter
|
981 |
+
});
|
982 |
+
}
|
983 |
+
}
|
984 |
+
}, {
|
985 |
+
key: "onResize",
|
986 |
+
value: function onResize() {
|
987 |
+
this.coverImage();
|
988 |
+
this.clipContainer();
|
989 |
+
}
|
990 |
+
}]);
|
991 |
+
|
992 |
+
return Jarallax;
|
993 |
+
}(); // global definition
|
994 |
+
|
995 |
+
|
996 |
+
var plugin = function plugin(items, options) {
|
997 |
+
// check for dom element
|
998 |
+
// thanks: http://stackoverflow.com/questions/384286/javascript-isdom-how-do-you-check-if-a-javascript-object-is-a-dom-object
|
999 |
+
if ('object' === (typeof HTMLElement === "undefined" ? "undefined" : _typeof(HTMLElement)) ? items instanceof HTMLElement : items && 'object' === _typeof(items) && null !== items && 1 === items.nodeType && 'string' === typeof items.nodeName) {
|
1000 |
+
items = [items];
|
1001 |
+
}
|
1002 |
+
|
1003 |
+
var len = items.length;
|
1004 |
+
var k = 0;
|
1005 |
+
var ret;
|
1006 |
+
|
1007 |
+
for (var _len2 = arguments.length, args = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
|
1008 |
+
args[_key2 - 2] = arguments[_key2];
|
1009 |
+
}
|
1010 |
+
|
1011 |
+
for (k; k < len; k += 1) {
|
1012 |
+
if ('object' === _typeof(options) || 'undefined' === typeof options) {
|
1013 |
+
if (!items[k].jarallax) {
|
1014 |
+
items[k].jarallax = new Jarallax(items[k], options);
|
1015 |
+
}
|
1016 |
+
} else if (items[k].jarallax) {
|
1017 |
+
// eslint-disable-next-line prefer-spread
|
1018 |
+
ret = items[k].jarallax[options].apply(items[k].jarallax, args);
|
1019 |
+
}
|
1020 |
+
|
1021 |
+
if ('undefined' !== typeof ret) {
|
1022 |
+
return ret;
|
1023 |
+
}
|
1024 |
+
}
|
1025 |
+
|
1026 |
+
return items;
|
1027 |
+
};
|
1028 |
+
|
1029 |
+
plugin.constructor = Jarallax;
|
1030 |
+
/* harmony default export */ __webpack_exports__["default"] = (plugin);
|
1031 |
+
|
1032 |
+
/***/ })
|
1033 |
/******/ ]);
|
assets/js/lib/jquery-event-move/jquery.event.move.js
CHANGED
@@ -1,584 +1,584 @@
|
|
1 |
-
// DOM.event.move
|
2 |
-
//
|
3 |
-
// 2.0.0
|
4 |
-
//
|
5 |
-
// Stephen Band
|
6 |
-
//
|
7 |
-
// Triggers 'movestart', 'move' and 'moveend' events after
|
8 |
-
// mousemoves following a mousedown cross a distance threshold,
|
9 |
-
// similar to the native 'dragstart', 'drag' and 'dragend' events.
|
10 |
-
// Move events are throttled to animation frames. Move event objects
|
11 |
-
// have the properties:
|
12 |
-
//
|
13 |
-
// pageX:
|
14 |
-
// pageY: Page coordinates of pointer.
|
15 |
-
// startX:
|
16 |
-
// startY: Page coordinates of pointer at movestart.
|
17 |
-
// distX:
|
18 |
-
// distY: Distance the pointer has moved since movestart.
|
19 |
-
// deltaX:
|
20 |
-
// deltaY: Distance the finger has moved since last event.
|
21 |
-
// velocityX:
|
22 |
-
// velocityY: Average velocity over last few events.
|
23 |
-
|
24 |
-
|
25 |
-
(function(fn) {
|
26 |
-
if (typeof define === 'function' && define.amd) {
|
27 |
-
define([], fn);
|
28 |
-
} else if ((typeof module !== "undefined" && module !== null) && module.exports) {
|
29 |
-
module.exports = fn;
|
30 |
-
} else {
|
31 |
-
fn();
|
32 |
-
}
|
33 |
-
})(function(){
|
34 |
-
var assign = Object.assign || window.jQuery && jQuery.extend;
|
35 |
-
|
36 |
-
// Number of pixels a pressed pointer travels before movestart
|
37 |
-
// event is fired.
|
38 |
-
var threshold = 8;
|
39 |
-
|
40 |
-
// Shim for requestAnimationFrame, falling back to timer. See:
|
41 |
-
// see http://paulirish.com/2011/requestanimationframe-for-smart-animating/
|
42 |
-
var requestFrame = (function(){
|
43 |
-
return (
|
44 |
-
window.requestAnimationFrame ||
|
45 |
-
window.webkitRequestAnimationFrame ||
|
46 |
-
window.mozRequestAnimationFrame ||
|
47 |
-
window.oRequestAnimationFrame ||
|
48 |
-
window.msRequestAnimationFrame ||
|
49 |
-
function(fn, element){
|
50 |
-
return window.setTimeout(function(){
|
51 |
-
fn();
|
52 |
-
}, 25);
|
53 |
-
}
|
54 |
-
);
|
55 |
-
})();
|
56 |
-
|
57 |
-
var ignoreTags = {
|
58 |
-
textarea: true,
|
59 |
-
input: true,
|
60 |
-
select: true,
|
61 |
-
button: true
|
62 |
-
};
|
63 |
-
|
64 |
-
var mouseevents = {
|
65 |
-
move: 'mousemove',
|
66 |
-
cancel: 'mouseup dragstart',
|
67 |
-
end: 'mouseup'
|
68 |
-
};
|
69 |
-
|
70 |
-
var touchevents = {
|
71 |
-
move: 'touchmove',
|
72 |
-
cancel: 'touchend',
|
73 |
-
end: 'touchend'
|
74 |
-
};
|
75 |
-
|
76 |
-
var rspaces = /\s+/;
|
77 |
-
|
78 |
-
|
79 |
-
// DOM Events
|
80 |
-
|
81 |
-
var eventOptions = { bubbles: true, cancelable: true };
|
82 |
-
|
83 |
-
var eventsSymbol = Symbol('events');
|
84 |
-
|
85 |
-
function createEvent(type) {
|
86 |
-
return new CustomEvent(type, eventOptions);
|
87 |
-
}
|
88 |
-
|
89 |
-
function getEvents(node) {
|
90 |
-
return node[eventsSymbol] || (node[eventsSymbol] = {});
|
91 |
-
}
|
92 |
-
|
93 |
-
function on(node, types, fn, data, selector) {
|
94 |
-
types = types.split(rspaces);
|
95 |
-
|
96 |
-
var events = getEvents(node);
|
97 |
-
var i = types.length;
|
98 |
-
var handlers, type;
|
99 |
-
|
100 |
-
function handler(e) { fn(e, data); }
|
101 |
-
|
102 |
-
while (i--) {
|
103 |
-
type = types[i];
|
104 |
-
handlers = events[type] || (events[type] = []);
|
105 |
-
handlers.push([fn, handler]);
|
106 |
-
node.addEventListener(type, handler);
|
107 |
-
}
|
108 |
-
}
|
109 |
-
|
110 |
-
function off(node, types, fn, selector) {
|
111 |
-
types = types.split(rspaces);
|
112 |
-
|
113 |
-
var events = getEvents(node);
|
114 |
-
var i = types.length;
|
115 |
-
var type, handlers, k;
|
116 |
-
|
117 |
-
if (!events) { return; }
|
118 |
-
|
119 |
-
while (i--) {
|
120 |
-
type = types[i];
|
121 |
-
handlers = events[type];
|
122 |
-
if (!handlers) { continue; }
|
123 |
-
k = handlers.length;
|
124 |
-
while (k--) {
|
125 |
-
if (handlers[k][0] === fn) {
|
126 |
-
node.removeEventListener(type, handlers[k][1]);
|
127 |
-
handlers.splice(k, 1);
|
128 |
-
}
|
129 |
-
}
|
130 |
-
}
|
131 |
-
}
|
132 |
-
|
133 |
-
function trigger(node, type, properties) {
|
134 |
-
// Don't cache events. It prevents you from triggering an event of a
|
135 |
-
// given type from inside the handler of another event of that type.
|
136 |
-
var event = createEvent(type);
|
137 |
-
if (properties) { assign(event, properties); }
|
138 |
-
node.dispatchEvent(event);
|
139 |
-
}
|
140 |
-
|
141 |
-
|
142 |
-
// Constructors
|
143 |
-
|
144 |
-
function Timer(fn){
|
145 |
-
var callback = fn,
|
146 |
-
active = false,
|
147 |
-
running = false;
|
148 |
-
|
149 |
-
function trigger(time) {
|
150 |
-
if (active){
|
151 |
-
callback();
|
152 |
-
requestFrame(trigger);
|
153 |
-
running = true;
|
154 |
-
active = false;
|
155 |
-
}
|
156 |
-
else {
|
157 |
-
running = false;
|
158 |
-
}
|
159 |
-
}
|
160 |
-
|
161 |
-
this.kick = function(fn) {
|
162 |
-
active = true;
|
163 |
-
if (!running) { trigger(); }
|
164 |
-
};
|
165 |
-
|
166 |
-
this.end = function(fn) {
|
167 |
-
var cb = callback;
|
168 |
-
|
169 |
-
if (!fn) { return; }
|
170 |
-
|
171 |
-
// If the timer is not running, simply call the end callback.
|
172 |
-
if (!running) {
|
173 |
-
fn();
|
174 |
-
}
|
175 |
-
// If the timer is running, and has been kicked lately, then
|
176 |
-
// queue up the current callback and the end callback, otherwise
|
177 |
-
// just the end callback.
|
178 |
-
else {
|
179 |
-
callback = active ?
|
180 |
-
function(){ cb(); fn(); } :
|
181 |
-
fn ;
|
182 |
-
|
183 |
-
active = true;
|
184 |
-
}
|
185 |
-
};
|
186 |
-
}
|
187 |
-
|
188 |
-
|
189 |
-
// Functions
|
190 |
-
|
191 |
-
function noop() {}
|
192 |
-
|
193 |
-
function preventDefault(e) {
|
194 |
-
e.preventDefault();
|
195 |
-
}
|
196 |
-
|
197 |
-
function isIgnoreTag(e) {
|
198 |
-
return !!ignoreTags[e.target.tagName.toLowerCase()];
|
199 |
-
}
|
200 |
-
|
201 |
-
function isPrimaryButton(e) {
|
202 |
-
// Ignore mousedowns on any button other than the left (or primary)
|
203 |
-
// mouse button, or when a modifier key is pressed.
|
204 |
-
return (e.which === 1 && !e.ctrlKey && !e.altKey);
|
205 |
-
}
|
206 |
-
|
207 |
-
function identifiedTouch(touchList, id) {
|
208 |
-
var i, l;
|
209 |
-
|
210 |
-
if (touchList.identifiedTouch) {
|
211 |
-
return touchList.identifiedTouch(id);
|
212 |
-
}
|
213 |
-
|
214 |
-
// touchList.identifiedTouch() does not exist in
|
215 |
-
// webkit yet… we must do the search ourselves...
|
216 |
-
|
217 |
-
i = -1;
|
218 |
-
l = touchList.length;
|
219 |
-
|
220 |
-
while (++i < l) {
|
221 |
-
if (touchList[i].identifier === id) {
|
222 |
-
return touchList[i];
|
223 |
-
}
|
224 |
-
}
|
225 |
-
}
|
226 |
-
|
227 |
-
function changedTouch(e, data) {
|
228 |
-
var touch = identifiedTouch(e.changedTouches, data.identifier);
|
229 |
-
|
230 |
-
// This isn't the touch you're looking for.
|
231 |
-
if (!touch) { return; }
|
232 |
-
|
233 |
-
// Chrome Android (at least) includes touches that have not
|
234 |
-
// changed in e.changedTouches. That's a bit annoying. Check
|
235 |
-
// that this touch has changed.
|
236 |
-
if (touch.pageX === data.pageX && touch.pageY === data.pageY) { return; }
|
237 |
-
|
238 |
-
return touch;
|
239 |
-
}
|
240 |
-
|
241 |
-
|
242 |
-
// Handlers that decide when the first movestart is triggered
|
243 |
-
|
244 |
-
function mousedown(e){
|
245 |
-
// Ignore non-primary buttons
|
246 |
-
if (!isPrimaryButton(e)) { return; }
|
247 |
-
|
248 |
-
// Ignore form and interactive elements
|
249 |
-
if (isIgnoreTag(e)) { return; }
|
250 |
-
|
251 |
-
on(document, mouseevents.move, mousemove, e);
|
252 |
-
on(document, mouseevents.cancel, mouseend, e);
|
253 |
-
}
|
254 |
-
|
255 |
-
function mousemove(e, data){
|
256 |
-
checkThreshold(e, data, e, removeMouse);
|
257 |
-
}
|
258 |
-
|
259 |
-
function mouseend(e, data) {
|
260 |
-
removeMouse();
|
261 |
-
}
|
262 |
-
|
263 |
-
function removeMouse() {
|
264 |
-
off(document, mouseevents.move, mousemove);
|
265 |
-
off(document, mouseevents.cancel, mouseend);
|
266 |
-
}
|
267 |
-
|
268 |
-
function touchstart(e) {
|
269 |
-
// Don't get in the way of interaction with form elements
|
270 |
-
if (ignoreTags[e.target.tagName.toLowerCase()]) { return; }
|
271 |
-
|
272 |
-
var touch = e.changedTouches[0];
|
273 |
-
|
274 |
-
// iOS live updates the touch objects whereas Android gives us copies.
|
275 |
-
// That means we can't trust the touchstart object to stay the same,
|
276 |
-
// so we must copy the data. This object acts as a template for
|
277 |
-
// movestart, move and moveend event objects.
|
278 |
-
var data = {
|
279 |
-
target: touch.target,
|
280 |
-
pageX: touch.pageX,
|
281 |
-
pageY: touch.pageY,
|
282 |
-
identifier: touch.identifier,
|
283 |
-
|
284 |
-
// The only way to make handlers individually unbindable is by
|
285 |
-
// making them unique.
|
286 |
-
touchmove: function(e, data) { touchmove(e, data); },
|
287 |
-
touchend: function(e, data) { touchend(e, data); }
|
288 |
-
};
|
289 |
-
|
290 |
-
on(document, touchevents.move, data.touchmove, data);
|
291 |
-
on(document, touchevents.cancel, data.touchend, data);
|
292 |
-
}
|
293 |
-
|
294 |
-
function touchmove(e, data) {
|
295 |
-
var touch = changedTouch(e, data);
|
296 |
-
if (!touch) { return; }
|
297 |
-
checkThreshold(e, data, touch, removeTouch);
|
298 |
-
}
|
299 |
-
|
300 |
-
function touchend(e, data) {
|
301 |
-
var touch = identifiedTouch(e.changedTouches, data.identifier);
|
302 |
-
if (!touch) { return; }
|
303 |
-
removeTouch(data);
|
304 |
-
}
|
305 |
-
|
306 |
-
function removeTouch(data) {
|
307 |
-
off(document, touchevents.move, data.touchmove);
|
308 |
-
off(document, touchevents.cancel, data.touchend);
|
309 |
-
}
|
310 |
-
|
311 |
-
function checkThreshold(e, data, touch, fn) {
|
312 |
-
var distX = touch.pageX - data.pageX;
|
313 |
-
var distY = touch.pageY - data.pageY;
|
314 |
-
|
315 |
-
// Do nothing if the threshold has not been crossed.
|
316 |
-
if ((distX * distX) + (distY * distY) < (threshold * threshold)) { return; }
|
317 |
-
|
318 |
-
triggerStart(e, data, touch, distX, distY, fn);
|
319 |
-
}
|
320 |
-
|
321 |
-
function triggerStart(e, data, touch, distX, distY, fn) {
|
322 |
-
var touches = e.targetTouches;
|
323 |
-
var time = e.timeStamp - data.timeStamp;
|
324 |
-
|
325 |
-
// Create a movestart object with some special properties that
|
326 |
-
// are passed only to the movestart handlers.
|
327 |
-
var template = {
|
328 |
-
altKey: e.altKey,
|
329 |
-
ctrlKey: e.ctrlKey,
|
330 |
-
shiftKey: e.shiftKey,
|
331 |
-
startX: data.pageX,
|
332 |
-
startY: data.pageY,
|
333 |
-
distX: distX,
|
334 |
-
distY: distY,
|
335 |
-
deltaX: distX,
|
336 |
-
deltaY: distY,
|
337 |
-
pageX: touch.pageX,
|
338 |
-
pageY: touch.pageY,
|
339 |
-
velocityX: distX / time,
|
340 |
-
velocityY: distY / time,
|
341 |
-
identifier: data.identifier,
|
342 |
-
targetTouches: touches,
|
343 |
-
finger: touches ? touches.length : 1,
|
344 |
-
enableMove: function() {
|
345 |
-
this.moveEnabled = true;
|
346 |
-
this.enableMove = noop;
|
347 |
-
e.preventDefault();
|
348 |
-
}
|
349 |
-
};
|
350 |
-
|
351 |
-
// Trigger the movestart event.
|
352 |
-
trigger(data.target, 'movestart', template);
|
353 |
-
|
354 |
-
// Unbind handlers that tracked the touch or mouse up till now.
|
355 |
-
fn(data);
|
356 |
-
}
|
357 |
-
|
358 |
-
|
359 |
-
// Handlers that control what happens following a movestart
|
360 |
-
|
361 |
-
function activeMousemove(e, data) {
|
362 |
-
var timer = data.timer;
|
363 |
-
|
364 |
-
data.touch = e;
|
365 |
-
data.timeStamp = e.timeStamp;
|
366 |
-
timer.kick();
|
367 |
-
}
|
368 |
-
|
369 |
-
function activeMouseend(e, data) {
|
370 |
-
var target = data.target;
|
371 |
-
var event = data.event;
|
372 |
-
var timer = data.timer;
|
373 |
-
|
374 |
-
removeActiveMouse();
|
375 |
-
|
376 |
-
endEvent(target, event, timer, function() {
|
377 |
-
// Unbind the click suppressor, waiting until after mouseup
|
378 |
-
// has been handled.
|
379 |
-
setTimeout(function(){
|
380 |
-
off(target, 'click', preventDefault);
|
381 |
-
}, 0);
|
382 |
-
});
|
383 |
-
}
|
384 |
-
|
385 |
-
function removeActiveMouse() {
|
386 |
-
off(document, mouseevents.move, activeMousemove);
|
387 |
-
off(document, mouseevents.end, activeMouseend);
|
388 |
-
}
|
389 |
-
|
390 |
-
function activeTouchmove(e, data) {
|
391 |
-
var event = data.event;
|
392 |
-
var timer = data.timer;
|
393 |
-
var touch = changedTouch(e, event);
|
394 |
-
|
395 |
-
if (!touch) { return; }
|
396 |
-
|
397 |
-
// Stop the interface from gesturing
|
398 |
-
e.preventDefault();
|
399 |
-
|
400 |
-
event.targetTouches = e.targetTouches;
|
401 |
-
data.touch = touch;
|
402 |
-
data.timeStamp = e.timeStamp;
|
403 |
-
|
404 |
-
timer.kick();
|
405 |
-
}
|
406 |
-
|
407 |
-
function activeTouchend(e, data) {
|
408 |
-
var target = data.target;
|
409 |
-
var event = data.event;
|
410 |
-
var timer = data.timer;
|
411 |
-
var touch = identifiedTouch(e.changedTouches, event.identifier);
|
412 |
-
|
413 |
-
// This isn't the touch you're looking for.
|
414 |
-
if (!touch) { return; }
|
415 |
-
|
416 |
-
removeActiveTouch(data);
|
417 |
-
endEvent(target, event, timer);
|
418 |
-
}
|
419 |
-
|
420 |
-
function removeActiveTouch(data) {
|
421 |
-
off(document, touchevents.move, data.activeTouchmove);
|
422 |
-
off(document, touchevents.end, data.activeTouchend);
|
423 |
-
}
|
424 |
-
|
425 |
-
|
426 |
-
// Logic for triggering move and moveend events
|
427 |
-
|
428 |
-
function updateEvent(event, touch, timeStamp) {
|
429 |
-
var time = timeStamp - event.timeStamp;
|
430 |
-
|
431 |
-
event.distX = touch.pageX - event.startX;
|
432 |
-
event.distY = touch.pageY - event.startY;
|
433 |
-
event.deltaX = touch.pageX - event.pageX;
|
434 |
-
event.deltaY = touch.pageY - event.pageY;
|
435 |
-
|
436 |
-
// Average the velocity of the last few events using a decay
|
437 |
-
// curve to even out spurious jumps in values.
|
438 |
-
event.velocityX = 0.3 * event.velocityX + 0.7 * event.deltaX / time;
|
439 |
-
event.velocityY = 0.3 * event.velocityY + 0.7 * event.deltaY / time;
|
440 |
-
event.pageX = touch.pageX;
|
441 |
-
event.pageY = touch.pageY;
|
442 |
-
}
|
443 |
-
|
444 |
-
function endEvent(target, event, timer, fn) {
|
445 |
-
timer.end(function(){
|
446 |
-
trigger(target, 'moveend', event);
|
447 |
-
return fn && fn();
|
448 |
-
});
|
449 |
-
}
|
450 |
-
|
451 |
-
|
452 |
-
// Set up the DOM
|
453 |
-
|
454 |
-
function movestart(e) {
|
455 |
-
if (e.defaultPrevented) { return; }
|
456 |
-
if (!e.moveEnabled) { return; }
|
457 |
-
|
458 |
-
var event = {
|
459 |
-
startX: e.startX,
|
460 |
-
startY: e.startY,
|
461 |
-
pageX: e.pageX,
|
462 |
-
pageY: e.pageY,
|
463 |
-
distX: e.distX,
|
464 |
-
distY: e.distY,
|
465 |
-
deltaX: e.deltaX,
|
466 |
-
deltaY: e.deltaY,
|
467 |
-
velocityX: e.velocityX,
|
468 |
-
velocityY: e.velocityY,
|
469 |
-
identifier: e.identifier,
|
470 |
-
targetTouches: e.targetTouches,
|
471 |
-
finger: e.finger
|
472 |
-
};
|
473 |
-
|
474 |
-
var data = {
|
475 |
-
target: e.target,
|
476 |
-
event: event,
|
477 |
-
timer: new Timer(update),
|
478 |
-
touch: undefined,
|
479 |
-
timeStamp: e.timeStamp
|
480 |
-
};
|
481 |
-
|
482 |
-
function update(time) {
|
483 |
-
updateEvent(event, data.touch, data.timeStamp);
|
484 |
-
trigger(data.target, 'move', event);
|
485 |
-
}
|
486 |
-
|
487 |
-
if (e.identifier === undefined) {
|
488 |
-
// We're dealing with a mouse event.
|
489 |
-
// Stop clicks from propagating during a move
|
490 |
-
on(e.target, 'click', preventDefault);
|
491 |
-
on(document, mouseevents.move, activeMousemove, data);
|
492 |
-
on(document, mouseevents.end, activeMouseend, data);
|
493 |
-
}
|
494 |
-
else {
|
495 |
-
// In order to unbind correct handlers they have to be unique
|
496 |
-
data.activeTouchmove = function(e, data) { activeTouchmove(e, data); };
|
497 |
-
data.activeTouchend = function(e, data) { activeTouchend(e, data); };
|
498 |
-
|
499 |
-
// We're dealing with a touch.
|
500 |
-
on(document, touchevents.move, data.activeTouchmove, data);
|
501 |
-
on(document, touchevents.end, data.activeTouchend, data);
|
502 |
-
}
|
503 |
-
}
|
504 |
-
|
505 |
-
on(document, 'mousedown', mousedown);
|
506 |
-
on(document, 'touchstart', touchstart);
|
507 |
-
on(document, 'movestart', movestart);
|
508 |
-
|
509 |
-
|
510 |
-
// jQuery special events
|
511 |
-
//
|
512 |
-
// jQuery event objects are copies of DOM event objects. They need
|
513 |
-
// a little help copying the move properties across.
|
514 |
-
|
515 |
-
if (!window.jQuery) { return; }
|
516 |
-
|
517 |
-
var properties = ("startX startY pageX pageY distX distY deltaX deltaY velocityX velocityY").split(' ');
|
518 |
-
|
519 |
-
function enableMove1(e) { e.enableMove(); }
|
520 |
-
function enableMove2(e) { e.enableMove(); }
|
521 |
-
function enableMove3(e) { e.enableMove(); }
|
522 |
-
|
523 |
-
function add(handleObj) {
|
524 |
-
var handler = handleObj.handler;
|
525 |
-
|
526 |
-
handleObj.handler = function(e) {
|
527 |
-
// Copy move properties across from originalEvent
|
528 |
-
var i = properties.length;
|
529 |
-
var property;
|
530 |
-
|
531 |
-
while(i--) {
|
532 |
-
property = properties[i];
|
533 |
-
e[property] = e.originalEvent[property];
|
534 |
-
}
|
535 |
-
|
536 |
-
handler.apply(this, arguments);
|
537 |
-
};
|
538 |
-
}
|
539 |
-
|
540 |
-
jQuery.event.special.movestart = {
|
541 |
-
setup: function() {
|
542 |
-
// Movestart must be enabled to allow other move events
|
543 |
-
on(this, 'movestart', enableMove1);
|
544 |
-
|
545 |
-
// Do listen to DOM events
|
546 |
-
return false;
|
547 |
-
},
|
548 |
-
|
549 |
-
teardown: function() {
|
550 |
-
off(this, 'movestart', enableMove1);
|
551 |
-
return false;
|
552 |
-
},
|
553 |
-
|
554 |
-
add: add
|
555 |
-
};
|
556 |
-
|
557 |
-
jQuery.event.special.move = {
|
558 |
-
setup: function() {
|
559 |
-
on(this, 'movestart', enableMove2);
|
560 |
-
return false;
|
561 |
-
},
|
562 |
-
|
563 |
-
teardown: function() {
|
564 |
-
off(this, 'movestart', enableMove2);
|
565 |
-
return false;
|
566 |
-
},
|
567 |
-
|
568 |
-
add: add
|
569 |
-
};
|
570 |
-
|
571 |
-
jQuery.event.special.moveend = {
|
572 |
-
setup: function() {
|
573 |
-
on(this, 'movestart', enableMove3);
|
574 |
-
return false;
|
575 |
-
},
|
576 |
-
|
577 |
-
teardown: function() {
|
578 |
-
off(this, 'movestart', enableMove3);
|
579 |
-
return false;
|
580 |
-
},
|
581 |
-
|
582 |
-
add: add
|
583 |
-
};
|
584 |
-
});
|
1 |
+
// DOM.event.move
|
2 |
+
//
|
3 |
+
// 2.0.0
|
4 |
+
//
|
5 |
+
// Stephen Band
|
6 |
+
//
|
7 |
+
// Triggers 'movestart', 'move' and 'moveend' events after
|
8 |
+
// mousemoves following a mousedown cross a distance threshold,
|
9 |
+
// similar to the native 'dragstart', 'drag' and 'dragend' events.
|
10 |
+
// Move events are throttled to animation frames. Move event objects
|
11 |
+
// have the properties:
|
12 |
+
//
|
13 |
+
// pageX:
|
14 |
+
// pageY: Page coordinates of pointer.
|
15 |
+
// startX:
|
16 |
+
// startY: Page coordinates of pointer at movestart.
|
17 |
+
// distX:
|
18 |
+
// distY: Distance the pointer has moved since movestart.
|
19 |
+
// deltaX:
|
20 |
+
// deltaY: Distance the finger has moved since last event.
|
21 |
+
// velocityX:
|
22 |
+
// velocityY: Average velocity over last few events.
|
23 |
+
|
24 |
+
|
25 |
+
(function(fn) {
|
26 |
+
if (typeof define === 'function' && define.amd) {
|
27 |
+
define([], fn);
|
28 |
+
} else if ((typeof module !== "undefined" && module !== null) && module.exports) {
|
29 |
+
module.exports = fn;
|
30 |
+
} else {
|
31 |
+
fn();
|
32 |
+
}
|
33 |
+
})(function(){
|
34 |
+
var assign = Object.assign || window.jQuery && jQuery.extend;
|
35 |
+
|
36 |
+
// Number of pixels a pressed pointer travels before movestart
|
37 |
+
// event is fired.
|
38 |
+
var threshold = 8;
|
39 |
+
|
40 |
+
// Shim for requestAnimationFrame, falling back to timer. See:
|
41 |
+
// see http://paulirish.com/2011/requestanimationframe-for-smart-animating/
|
42 |
+
var requestFrame = (function(){
|
43 |
+
return (
|
44 |
+
window.requestAnimationFrame ||
|
45 |
+
window.webkitRequestAnimationFrame ||
|
46 |
+
window.mozRequestAnimationFrame ||
|
47 |
+
window.oRequestAnimationFrame ||
|
48 |
+
window.msRequestAnimationFrame ||
|
49 |
+
function(fn, element){
|
50 |
+
return window.setTimeout(function(){
|
51 |
+
fn();
|
52 |
+
}, 25);
|
53 |
+
}
|
54 |
+
);
|
55 |
+
})();
|
56 |
+
|
57 |
+
var ignoreTags = {
|
58 |
+
textarea: true,
|
59 |
+
input: true,
|
60 |
+
select: true,
|
61 |
+
button: true
|
62 |
+
};
|
63 |
+
|
64 |
+
var mouseevents = {
|
65 |
+
move: 'mousemove',
|
66 |
+
cancel: 'mouseup dragstart',
|
67 |
+
end: 'mouseup'
|
68 |
+
};
|
69 |
+
|
70 |
+
var touchevents = {
|
71 |
+
move: 'touchmove',
|
72 |
+
cancel: 'touchend',
|
73 |
+
end: 'touchend'
|
74 |
+
};
|
75 |
+
|
76 |
+
var rspaces = /\s+/;
|
77 |
+
|
78 |
+
|
79 |
+
// DOM Events
|
80 |
+
|
81 |
+
var eventOptions = { bubbles: true, cancelable: true };
|
82 |
+
|
83 |
+
var eventsSymbol = Symbol('events');
|
84 |
+
|
85 |
+
function createEvent(type) {
|
86 |
+
return new CustomEvent(type, eventOptions);
|
87 |
+
}
|
88 |
+
|
89 |
+
function getEvents(node) {
|
90 |
+
return node[eventsSymbol] || (node[eventsSymbol] = {});
|
91 |
+
}
|
92 |
+
|
93 |
+
function on(node, types, fn, data, selector) {
|
94 |
+
types = types.split(rspaces);
|
95 |
+
|
96 |
+
var events = getEvents(node);
|
97 |
+
var i = types.length;
|
98 |
+
var handlers, type;
|
99 |
+
|
100 |
+
function handler(e) { fn(e, data); }
|
101 |
+
|
102 |
+
while (i--) {
|
103 |
+
type = types[i];
|
104 |
+
handlers = events[type] || (events[type] = []);
|
105 |
+
handlers.push([fn, handler]);
|
106 |
+
node.addEventListener(type, handler);
|
107 |
+
}
|
108 |
+
}
|
109 |
+
|
110 |
+
function off(node, types, fn, selector) {
|
111 |
+
types = types.split(rspaces);
|
112 |
+
|
113 |
+
var events = getEvents(node);
|
114 |
+
var i = types.length;
|
115 |
+
var type, handlers, k;
|
116 |
+
|
117 |
+
if (!events) { return; }
|
118 |
+
|
119 |
+
while (i--) {
|
120 |
+
type = types[i];
|
121 |
+
handlers = events[type];
|
122 |
+
if (!handlers) { continue; }
|
123 |
+
k = handlers.length;
|
124 |
+
while (k--) {
|
125 |
+
if (handlers[k][0] === fn) {
|
126 |
+
node.removeEventListener(type, handlers[k][1]);
|
127 |
+
handlers.splice(k, 1);
|
128 |
+
}
|
129 |
+
}
|
130 |
+
}
|
131 |
+
}
|
132 |
+
|
133 |
+
function trigger(node, type, properties) {
|
134 |
+
// Don't cache events. It prevents you from triggering an event of a
|
135 |
+
// given type from inside the handler of another event of that type.
|
136 |
+
var event = createEvent(type);
|
137 |
+
if (properties) { assign(event, properties); }
|
138 |
+
node.dispatchEvent(event);
|
139 |
+
}
|
140 |
+
|
141 |
+
|
142 |
+
// Constructors
|
143 |
+
|
144 |
+
function Timer(fn){
|
145 |
+
var callback = fn,
|
146 |
+
active = false,
|
147 |
+
running = false;
|
148 |
+
|
149 |
+
function trigger(time) {
|
150 |
+
if (active){
|
151 |
+
callback();
|
152 |
+
requestFrame(trigger);
|
153 |
+
running = true;
|
154 |
+
active = false;
|
155 |
+
}
|
156 |
+
else {
|
157 |
+
running = false;
|
158 |
+
}
|
159 |
+
}
|
160 |
+
|
161 |
+
this.kick = function(fn) {
|
162 |
+
active = true;
|
163 |
+
if (!running) { trigger(); }
|
164 |
+
};
|
165 |
+
|
166 |
+
this.end = function(fn) {
|
167 |
+
var cb = callback;
|
168 |
+
|
169 |
+
if (!fn) { return; }
|
170 |
+
|
171 |
+
// If the timer is not running, simply call the end callback.
|
172 |
+
if (!running) {
|
173 |
+
fn();
|
174 |
+
}
|
175 |
+
// If the timer is running, and has been kicked lately, then
|
176 |
+
// queue up the current callback and the end callback, otherwise
|
177 |
+
// just the end callback.
|
178 |
+
else {
|
179 |
+
callback = active ?
|
180 |
+
function(){ cb(); fn(); } :
|
181 |
+
fn ;
|
182 |
+
|
183 |
+
active = true;
|
184 |
+
}
|
185 |
+
};
|
186 |
+
}
|
187 |
+
|
188 |
+
|
189 |
+
// Functions
|
190 |
+
|
191 |
+
function noop() {}
|
192 |
+
|
193 |
+
function preventDefault(e) {
|
194 |
+
e.preventDefault();
|
195 |
+
}
|
196 |
+
|
197 |
+
function isIgnoreTag(e) {
|
198 |
+
return !!ignoreTags[e.target.tagName.toLowerCase()];
|
199 |
+
}
|
200 |
+
|
201 |
+
function isPrimaryButton(e) {
|
202 |
+
// Ignore mousedowns on any button other than the left (or primary)
|
203 |
+
// mouse button, or when a modifier key is pressed.
|
204 |
+
return (e.which === 1 && !e.ctrlKey && !e.altKey);
|
205 |
+
}
|
206 |
+
|
207 |
+
function identifiedTouch(touchList, id) {
|
208 |
+
var i, l;
|
209 |
+
|
210 |
+
if (touchList.identifiedTouch) {
|
211 |
+
return touchList.identifiedTouch(id);
|
212 |
+
}
|
213 |
+
|
214 |
+
// touchList.identifiedTouch() does not exist in
|
215 |
+
// webkit yet… we must do the search ourselves...
|
216 |
+
|
217 |
+
i = -1;
|
218 |
+
l = touchList.length;
|
219 |
+
|
220 |
+
while (++i < l) {
|
221 |
+
if (touchList[i].identifier === id) {
|
222 |
+
return touchList[i];
|
223 |
+
}
|
224 |
+
}
|
225 |
+
}
|
226 |
+
|
227 |
+
function changedTouch(e, data) {
|
228 |
+
var touch = identifiedTouch(e.changedTouches, data.identifier);
|
229 |
+
|
230 |
+
// This isn't the touch you're looking for.
|
231 |
+
if (!touch) { return; }
|
232 |
+
|
233 |
+
// Chrome Android (at least) includes touches that have not
|
234 |
+
// changed in e.changedTouches. That's a bit annoying. Check
|
235 |
+
// that this touch has changed.
|
236 |
+
if (touch.pageX === data.pageX && touch.pageY === data.pageY) { return; }
|
237 |
+
|
238 |
+
return touch;
|
239 |
+
}
|
240 |
+
|
241 |
+
|
242 |
+
// Handlers that decide when the first movestart is triggered
|
243 |
+
|
244 |
+
function mousedown(e){
|
245 |
+
// Ignore non-primary buttons
|
246 |
+
if (!isPrimaryButton(e)) { return; }
|
247 |
+
|
248 |
+
// Ignore form and interactive elements
|
249 |
+
if (isIgnoreTag(e)) { return; }
|
250 |
+
|
251 |
+
on(document, mouseevents.move, mousemove, e);
|
252 |
+
on(document, mouseevents.cancel, mouseend, e);
|
253 |
+
}
|
254 |
+
|
255 |
+
function mousemove(e, data){
|
256 |
+
checkThreshold(e, data, e, removeMouse);
|
257 |
+
}
|
258 |
+
|
259 |
+
function mouseend(e, data) {
|
260 |
+
removeMouse();
|
261 |
+
}
|
262 |
+
|
263 |
+
function removeMouse() {
|
264 |
+
off(document, mouseevents.move, mousemove);
|
265 |
+
off(document, mouseevents.cancel, mouseend);
|
266 |
+
}
|
267 |
+
|
268 |
+
function touchstart(e) {
|
269 |
+
// Don't get in the way of interaction with form elements
|
270 |
+
if (ignoreTags[e.target.tagName.toLowerCase()]) { return; }
|
271 |
+
|
272 |
+
var touch = e.changedTouches[0];
|
273 |
+
|
274 |
+
// iOS live updates the touch objects whereas Android gives us copies.
|
275 |
+
// That means we can't trust the touchstart object to stay the same,
|
276 |
+
// so we must copy the data. This object acts as a template for
|
277 |
+
// movestart, move and moveend event objects.
|
278 |
+
var data = {
|
279 |
+
target: touch.target,
|
280 |
+
pageX: touch.pageX,
|
281 |
+
pageY: touch.pageY,
|
282 |
+
identifier: touch.identifier,
|
283 |
+
|
284 |
+
// The only way to make handlers individually unbindable is by
|
285 |
+
// making them unique.
|
286 |
+
touchmove: function(e, data) { touchmove(e, data); },
|
287 |
+
touchend: function(e, data) { touchend(e, data); }
|
288 |
+
};
|
289 |
+
|
290 |
+
on(document, touchevents.move, data.touchmove, data);
|
291 |
+
on(document, touchevents.cancel, data.touchend, data);
|
292 |
+
}
|
293 |
+
|
294 |
+
function touchmove(e, data) {
|
295 |
+
var touch = changedTouch(e, data);
|
296 |
+
if (!touch) { return; }
|
297 |
+
checkThreshold(e, data, touch, removeTouch);
|
298 |
+
}
|
299 |
+
|
300 |
+
function touchend(e, data) {
|
301 |
+
var touch = identifiedTouch(e.changedTouches, data.identifier);
|
302 |
+
if (!touch) { return; }
|
303 |
+
removeTouch(data);
|
304 |
+
}
|
305 |
+
|
306 |
+
function removeTouch(data) {
|
307 |
+
off(document, touchevents.move, data.touchmove);
|
308 |
+
off(document, touchevents.cancel, data.touchend);
|
309 |
+
}
|
310 |
+
|
311 |
+
function checkThreshold(e, data, touch, fn) {
|
312 |
+
var distX = touch.pageX - data.pageX;
|
313 |
+
var distY = touch.pageY - data.pageY;
|
314 |
+
|
315 |
+
// Do nothing if the threshold has not been crossed.
|
316 |
+
if ((distX * distX) + (distY * distY) < (threshold * threshold)) { return; }
|
317 |
+
|
318 |
+
triggerStart(e, data, touch, distX, distY, fn);
|
319 |
+
}
|
320 |
+
|
321 |
+
function triggerStart(e, data, touch, distX, distY, fn) {
|
322 |
+
var touches = e.targetTouches;
|
323 |
+
var time = e.timeStamp - data.timeStamp;
|
324 |
+
|
325 |
+
// Create a movestart object with some special properties that
|
326 |
+
// are passed only to the movestart handlers.
|
327 |
+
var template = {
|
328 |
+
altKey: e.altKey,
|
329 |
+
ctrlKey: e.ctrlKey,
|
330 |
+
shiftKey: e.shiftKey,
|
331 |
+
startX: data.pageX,
|
332 |
+
startY: data.pageY,
|
333 |
+
distX: distX,
|
334 |
+
distY: distY,
|
335 |
+
deltaX: distX,
|
336 |
+
deltaY: distY,
|
337 |
+
pageX: touch.pageX,
|
338 |
+
pageY: touch.pageY,
|
339 |
+
velocityX: distX / time,
|
340 |
+
velocityY: distY / time,
|
341 |
+
identifier: data.identifier,
|
342 |
+
targetTouches: touches,
|
343 |
+
finger: touches ? touches.length : 1,
|
344 |
+
enableMove: function() {
|
345 |
+
this.moveEnabled = true;
|
346 |
+
this.enableMove = noop;
|
347 |
+
e.preventDefault();
|
348 |
+
}
|
349 |
+
};
|
350 |
+
|
351 |
+
// Trigger the movestart event.
|
352 |
+
trigger(data.target, 'movestart', template);
|
353 |
+
|
354 |
+
// Unbind handlers that tracked the touch or mouse up till now.
|
355 |
+
fn(data);
|
356 |
+
}
|
357 |
+
|
358 |
+
|
359 |
+
// Handlers that control what happens following a movestart
|
360 |
+
|
361 |
+
function activeMousemove(e, data) {
|
362 |
+
var timer = data.timer;
|
363 |
+
|
364 |
+
data.touch = e;
|
365 |
+
data.timeStamp = e.timeStamp;
|
366 |
+
timer.kick();
|
367 |
+
}
|
368 |
+
|
369 |
+
function activeMouseend(e, data) {
|
370 |
+
var target = data.target;
|
371 |
+
var event = data.event;
|
372 |
+
var timer = data.timer;
|
373 |
+
|
374 |
+
removeActiveMouse();
|
375 |
+
|
376 |
+
endEvent(target, event, timer, function() {
|
377 |
+
// Unbind the click suppressor, waiting until after mouseup
|
378 |
+
// has been handled.
|
379 |
+
setTimeout(function(){
|
380 |
+
off(target, 'click', preventDefault);
|
381 |
+
}, 0);
|
382 |
+
});
|
383 |
+
}
|
384 |
+
|
385 |
+
function removeActiveMouse() {
|
386 |
+
off(document, mouseevents.move, activeMousemove);
|
387 |
+
off(document, mouseevents.end, activeMouseend);
|
388 |
+
}
|
389 |
+
|
390 |
+
function activeTouchmove(e, data) {
|
391 |
+
var event = data.event;
|
392 |
+
var timer = data.timer;
|
393 |
+
var touch = changedTouch(e, event);
|
394 |
+
|
395 |
+
if (!touch) { return; }
|
396 |
+
|
397 |
+
// Stop the interface from gesturing
|
398 |
+
e.preventDefault();
|
399 |
+
|
400 |
+
event.targetTouches = e.targetTouches;
|
401 |
+
data.touch = touch;
|
402 |
+
data.timeStamp = e.timeStamp;
|
403 |
+
|
404 |
+
timer.kick();
|
405 |
+
}
|
406 |
+
|
407 |
+
function activeTouchend(e, data) {
|
408 |
+
var target = data.target;
|
409 |
+
var event = data.event;
|
410 |
+
var timer = data.timer;
|
411 |
+
var touch = identifiedTouch(e.changedTouches, event.identifier);
|
412 |
+
|
413 |
+
// This isn't the touch you're looking for.
|
414 |
+
if (!touch) { return; }
|
415 |
+
|
416 |
+
removeActiveTouch(data);
|
417 |
+
endEvent(target, event, timer);
|
418 |
+
}
|
419 |
+
|
420 |
+
function removeActiveTouch(data) {
|
421 |
+
off(document, touchevents.move, data.activeTouchmove);
|
422 |
+
off(document, touchevents.end, data.activeTouchend);
|
423 |
+
}
|
424 |
+
|
425 |
+
|
426 |
+
// Logic for triggering move and moveend events
|
427 |
+
|
428 |
+
function updateEvent(event, touch, timeStamp) {
|
429 |
+
var time = timeStamp - event.timeStamp;
|
430 |
+
|
431 |
+
event.distX = touch.pageX - event.startX;
|
432 |
+
event.distY = touch.pageY - event.startY;
|
433 |
+
event.deltaX = touch.pageX - event.pageX;
|
434 |
+
event.deltaY = touch.pageY - event.pageY;
|
435 |
+
|
436 |
+
// Average the velocity of the last few events using a decay
|
437 |
+
// curve to even out spurious jumps in values.
|
438 |
+
event.velocityX = 0.3 * event.velocityX + 0.7 * event.deltaX / time;
|
439 |
+
event.velocityY = 0.3 * event.velocityY + 0.7 * event.deltaY / time;
|
440 |
+
event.pageX = touch.pageX;
|
441 |
+
event.pageY = touch.pageY;
|
442 |
+
}
|
443 |
+
|
444 |
+
function endEvent(target, event, timer, fn) {
|
445 |
+
timer.end(function(){
|
446 |
+
trigger(target, 'moveend', event);
|
447 |
+
return fn && fn();
|
448 |
+
});
|
449 |
+
}
|
450 |
+
|
451 |
+
|
452 |
+
// Set up the DOM
|
453 |
+
|
454 |
+
function movestart(e) {
|
455 |
+
if (e.defaultPrevented) { return; }
|
456 |
+
if (!e.moveEnabled) { return; }
|
457 |
+
|
458 |
+
var event = {
|
459 |
+
startX: e.startX,
|
460 |
+
startY: e.startY,
|
461 |
+
pageX: e.pageX,
|
462 |
+
pageY: e.pageY,
|
463 |
+
distX: e.distX,
|
464 |
+
distY: e.distY,
|
465 |
+
deltaX: e.deltaX,
|
466 |
+
deltaY: e.deltaY,
|
467 |
+
velocityX: e.velocityX,
|
468 |
+
velocityY: e.velocityY,
|
469 |
+
identifier: e.identifier,
|
470 |
+
targetTouches: e.targetTouches,
|
471 |
+
finger: e.finger
|
472 |
+
};
|
473 |
+
|
474 |
+
var data = {
|
475 |
+
target: e.target,
|
476 |
+
event: event,
|
477 |
+
timer: new Timer(update),
|
478 |
+
touch: undefined,
|
479 |
+
timeStamp: e.timeStamp
|
480 |
+
};
|
481 |
+
|
482 |
+
function update(time) {
|
483 |
+
updateEvent(event, data.touch, data.timeStamp);
|
484 |
+
trigger(data.target, 'move', event);
|
485 |
+
}
|
486 |
+
|
487 |
+
if (e.identifier === undefined) {
|
488 |
+
// We're dealing with a mouse event.
|
489 |
+
// Stop clicks from propagating during a move
|
490 |
+
on(e.target, 'click', preventDefault);
|
491 |
+
on(document, mouseevents.move, activeMousemove, data);
|
492 |
+
on(document, mouseevents.end, activeMouseend, data);
|
493 |
+
}
|
494 |
+
else {
|
495 |
+
// In order to unbind correct handlers they have to be unique
|
496 |
+
data.activeTouchmove = function(e, data) { activeTouchmove(e, data); };
|
497 |
+
data.activeTouchend = function(e, data) { activeTouchend(e, data); };
|
498 |
+
|
499 |
+
// We're dealing with a touch.
|
500 |
+
on(document, touchevents.move, data.activeTouchmove, data);
|
501 |
+
on(document, touchevents.end, data.activeTouchend, data);
|
502 |
+
}
|
503 |
+
}
|
504 |
+
|
505 |
+
on(document, 'mousedown', mousedown);
|
506 |
+
on(document, 'touchstart', touchstart);
|
507 |
+
on(document, 'movestart', movestart);
|
508 |
+
|
509 |
+
|
510 |
+
// jQuery special events
|
511 |
+
//
|
512 |
+
// jQuery event objects are copies of DOM event objects. They need
|
513 |
+
// a little help copying the move properties across.
|
514 |
+
|
515 |
+
if (!window.jQuery) { return; }
|
516 |
+
|
517 |
+
var properties = ("startX startY pageX pageY distX distY deltaX deltaY velocityX velocityY").split(' ');
|
518 |
+
|
519 |
+
function enableMove1(e) { e.enableMove(); }
|
520 |
+
function enableMove2(e) { e.enableMove(); }
|
521 |
+
function enableMove3(e) { e.enableMove(); }
|
522 |
+
|
523 |
+
function add(handleObj) {
|
524 |
+
var handler = handleObj.handler;
|
525 |
+
|
526 |
+
handleObj.handler = function(e) {
|
527 |
+
// Copy move properties across from originalEvent
|
528 |
+
var i = properties.length;
|
529 |
+
var property;
|
530 |
+
|
531 |
+
while(i--) {
|
532 |
+
property = properties[i];
|
533 |
+
e[property] = e.originalEvent[property];
|
534 |
+
}
|
535 |
+
|
536 |
+
handler.apply(this, arguments);
|
537 |
+
};
|
538 |
+
}
|
539 |
+
|
540 |
+
jQuery.event.special.movestart = {
|
541 |
+
setup: function() {
|
542 |
+
// Movestart must be enabled to allow other move events
|
543 |
+
on(this, 'movestart', enableMove1);
|
544 |
+
|
545 |
+
// Do listen to DOM events
|
546 |
+
return false;
|
547 |
+
},
|
548 |
+
|
549 |
+
teardown: function() {
|
550 |
+
off(this, 'movestart', enableMove1);
|
551 |
+
return false;
|
552 |
+
},
|
553 |
+
|
554 |
+
add: add
|
555 |
+
};
|
556 |
+
|
557 |
+
jQuery.event.special.move = {
|
558 |
+
setup: function() {
|
559 |
+
on(this, 'movestart', enableMove2);
|
560 |
+
return false;
|
561 |
+
},
|
562 |
+
|
563 |
+
teardown: function() {
|
564 |
+
off(this, 'movestart', enableMove2);
|
565 |
+
return false;
|
566 |
+
},
|
567 |
+
|
568 |
+
add: add
|
569 |
+
};
|
570 |
+
|
571 |
+
jQuery.event.special.moveend = {
|
572 |
+
setup: function() {
|
573 |
+
on(this, 'movestart', enableMove3);
|
574 |
+
return false;
|
575 |
+
},
|
576 |
+
|
577 |
+
teardown: function() {
|
578 |
+
off(this, 'movestart', enableMove3);
|
579 |
+
return false;
|
580 |
+
},
|
581 |
+
|
582 |
+
add: add
|
583 |
+
};
|
584 |
+
});
|
assets/js/lib/lightgallery/lightgallery.js
CHANGED
@@ -1,2912 +1,2912 @@
|
|
1 |
-
/*! lightgallery - v1.6.12 - 2019-02-19
|
2 |
-
* http://sachinchoolur.github.io/lightGallery/
|
3 |
-
* Copyright (c) 2019 Sachin N; Licensed GPLv3 */
|
4 |
-
(function (root, factory) {
|
5 |
-
if (typeof define === 'function' && define.amd) {
|
6 |
-
// AMD. Register as an anonymous module unless amdModuleId is set
|
7 |
-
define(['jquery'], function (a0) {
|
8 |
-
return (factory(a0));
|
9 |
-
});
|
10 |
-
} else if (typeof module === 'object' && module.exports) {
|
11 |
-
// Node. Does not work with strict CommonJS, but
|
12 |
-
// only CommonJS-like environments that support module.exports,
|
13 |
-
// like Node.
|
14 |
-
module.exports = factory(require('jquery'));
|
15 |
-
} else {
|
16 |
-
factory(root["jQuery"]);
|
17 |
-
}
|
18 |
-
}(this, function ($) {
|
19 |
-
|
20 |
-
(function() {
|
21 |
-
'use strict';
|
22 |
-
|
23 |
-
var defaults = {
|
24 |
-
|
25 |
-
mode: 'lg-slide',
|
26 |
-
|
27 |
-
// Ex : 'ease'
|
28 |
-
cssEasing: 'ease',
|
29 |
-
|
30 |
-
//'for jquery animation'
|
31 |
-
easing: 'linear',
|
32 |
-
speed: 600,
|
33 |
-
height: '100%',
|
34 |
-
width: '100%',
|
35 |
-
addClass: '',
|
36 |
-
startClass: 'lg-start-zoom',
|
37 |
-
backdropDuration: 150,
|
38 |
-
hideBarsDelay: 6000,
|
39 |
-
|
40 |
-
useLeft: false,
|
41 |
-
|
42 |
-
closable: true,
|
43 |
-
loop: true,
|
44 |
-
escKey: true,
|
45 |
-
keyPress: true,
|
46 |
-
controls: true,
|
47 |
-
slideEndAnimatoin: true,
|
48 |
-
hideControlOnEnd: false,
|
49 |
-
mousewheel: true,
|
50 |
-
|
51 |
-
getCaptionFromTitleOrAlt: true,
|
52 |
-
|
53 |
-
// .lg-item || '.lg-sub-html'
|
54 |
-
appendSubHtmlTo: '.lg-sub-html',
|
55 |
-
|
56 |
-
subHtmlSelectorRelative: false,
|
57 |
-
|
58 |
-
/**
|
59 |
-
* @desc number of preload slides
|
60 |
-
* will exicute only after the current slide is fully loaded.
|
61 |
-
*
|
62 |
-
* @ex you clicked on 4th image and if preload = 1 then 3rd slide and 5th
|
63 |
-
* slide will be loaded in the background after the 4th slide is fully loaded..
|
64 |
-
* if preload is 2 then 2nd 3rd 5th 6th slides will be preloaded.. ... ...
|
65 |
-
*
|
66 |
-
*/
|
67 |
-
preload: 1,
|
68 |
-
showAfterLoad: true,
|
69 |
-
selector: '',
|
70 |
-
selectWithin: '',
|
71 |
-
nextHtml: '',
|
72 |
-
prevHtml: '',
|
73 |
-
|
74 |
-
// 0, 1
|
75 |
-
index: false,
|
76 |
-
|
77 |
-
iframeMaxWidth: '100%',
|
78 |
-
|
79 |
-
download: true,
|
80 |
-
counter: true,
|
81 |
-
appendCounterTo: '.lg-toolbar',
|
82 |
-
|
83 |
-
swipeThreshold: 50,
|
84 |
-
enableSwipe: true,
|
85 |
-
enableDrag: true,
|
86 |
-
|
87 |
-
dynamic: false,
|
88 |
-
dynamicEl: [],
|
89 |
-
galleryId: 1
|
90 |
-
};
|
91 |
-
|
92 |
-
function Plugin(element, options) {
|
93 |
-
|
94 |
-
// Current lightGallery element
|
95 |
-
this.el = element;
|
96 |
-
|
97 |
-
// Current jquery element
|
98 |
-
this.$el = $(element);
|
99 |
-
|
100 |
-
// lightGallery settings
|
101 |
-
this.s = $.extend({}, defaults, options);
|
102 |
-
|
103 |
-
// When using dynamic mode, ensure dynamicEl is an array
|
104 |
-
if (this.s.dynamic && this.s.dynamicEl !== 'undefined' && this.s.dynamicEl.constructor === Array && !this.s.dynamicEl.length) {
|
105 |
-
throw ('When using dynamic mode, you must also define dynamicEl as an Array.');
|
106 |
-
}
|
107 |
-
|
108 |
-
// lightGallery modules
|
109 |
-
this.modules = {};
|
110 |
-
|
111 |
-
// false when lightgallery complete first slide;
|
112 |
-
this.lGalleryOn = false;
|
113 |
-
|
114 |
-
this.lgBusy = false;
|
115 |
-
|
116 |
-
// Timeout function for hiding controls;
|
117 |
-
this.hideBartimeout = false;
|
118 |
-
|
119 |
-
// To determine browser supports for touch events;
|
120 |
-
this.isTouch = ('ontouchstart' in document.documentElement);
|
121 |
-
|
122 |
-
// Disable hideControlOnEnd if sildeEndAnimation is true
|
123 |
-
if (this.s.slideEndAnimatoin) {
|
124 |
-
this.s.hideControlOnEnd = false;
|
125 |
-
}
|
126 |
-
|
127 |
-
// Gallery items
|
128 |
-
if (this.s.dynamic) {
|
129 |
-
this.$items = this.s.dynamicEl;
|
130 |
-
} else {
|
131 |
-
if (this.s.selector === 'this') {
|
132 |
-
this.$items = this.$el;
|
133 |
-
} else if (this.s.selector !== '') {
|
134 |
-
if (this.s.selectWithin) {
|
135 |
-
this.$items = $(this.s.selectWithin).find(this.s.selector);
|
136 |
-
} else {
|
137 |
-
this.$items = this.$el.find($(this.s.selector));
|
138 |
-
}
|
139 |
-
} else {
|
140 |
-
this.$items = this.$el.children();
|
141 |
-
}
|
142 |
-
}
|
143 |
-
|
144 |
-
// .lg-item
|
145 |
-
this.$slide = '';
|
146 |
-
|
147 |
-
// .lg-outer
|
148 |
-
this.$outer = '';
|
149 |
-
|
150 |
-
this.init();
|
151 |
-
|
152 |
-
return this;
|
153 |
-
}
|
154 |
-
|
155 |
-
Plugin.prototype.init = function() {
|
156 |
-
|
157 |
-
var _this = this;
|
158 |
-
|
159 |
-
// s.preload should not be more than $item.length
|
160 |
-
if (_this.s.preload > _this.$items.length) {
|
161 |
-
_this.s.preload = _this.$items.length;
|
162 |
-
}
|
163 |
-
|
164 |
-
// if dynamic option is enabled execute immediately
|
165 |
-
var _hash = window.location.hash;
|
166 |
-
if (_hash.indexOf('lg=' + this.s.galleryId) > 0) {
|
167 |
-
|
168 |
-
_this.index = parseInt(_hash.split('&slide=')[1], 10);
|
169 |
-
|
170 |
-
$('body').addClass('lg-from-hash');
|
171 |
-
if (!$('body').hasClass('lg-on')) {
|
172 |
-
setTimeout(function() {
|
173 |
-
_this.build(_this.index);
|
174 |
-
});
|
175 |
-
|
176 |
-
$('body').addClass('lg-on');
|
177 |
-
}
|
178 |
-
}
|
179 |
-
|
180 |
-
if (_this.s.dynamic) {
|
181 |
-
|
182 |
-
_this.$el.trigger('onBeforeOpen.lg');
|
183 |
-
|
184 |
-
_this.index = _this.s.index || 0;
|
185 |
-
|
186 |
-
// prevent accidental double execution
|
187 |
-
if (!$('body').hasClass('lg-on')) {
|
188 |
-
setTimeout(function() {
|
189 |
-
_this.build(_this.index);
|
190 |
-
$('body').addClass('lg-on');
|
191 |
-
});
|
192 |
-
}
|
193 |
-
} else {
|
194 |
-
|
195 |
-
// Using different namespace for click because click event should not unbind if selector is same object('this')
|
196 |
-
_this.$items.on('click.lgcustom', function(event) {
|
197 |
-
|
198 |
-
// For IE8
|
199 |
-
try {
|
200 |
-
event.preventDefault();
|
201 |
-
event.preventDefault();
|
202 |
-
} catch (er) {
|
203 |
-
event.returnValue = false;
|
204 |
-
}
|
205 |
-
|
206 |
-
_this.$el.trigger('onBeforeOpen.lg');
|
207 |
-
|
208 |
-
_this.index = _this.s.index || _this.$items.index(this);
|
209 |
-
|
210 |
-
// prevent accidental double execution
|
211 |
-
if (!$('body').hasClass('lg-on')) {
|
212 |
-
_this.build(_this.index);
|
213 |
-
$('body').addClass('lg-on');
|
214 |
-
}
|
215 |
-
});
|
216 |
-
}
|
217 |
-
|
218 |
-
};
|
219 |
-
|
220 |
-
Plugin.prototype.build = function(index) {
|
221 |
-
|
222 |
-
var _this = this;
|
223 |
-
|
224 |
-
_this.structure();
|
225 |
-
|
226 |
-
// module constructor
|
227 |
-
$.each($.fn.lightGallery.modules, function(key) {
|
228 |
-
_this.modules[key] = new $.fn.lightGallery.modules[key](_this.el);
|
229 |
-
});
|
230 |
-
|
231 |
-
// initiate slide function
|
232 |
-
_this.slide(index, false, false, false);
|
233 |
-
|
234 |
-
if (_this.s.keyPress) {
|
235 |
-
_this.keyPress();
|
236 |
-
}
|
237 |
-
|
238 |
-
if (_this.$items.length > 1) {
|
239 |
-
|
240 |
-
_this.arrow();
|
241 |
-
|
242 |
-
setTimeout(function() {
|
243 |
-
_this.enableDrag();
|
244 |
-
_this.enableSwipe();
|
245 |
-
}, 50);
|
246 |
-
|
247 |
-
if (_this.s.mousewheel) {
|
248 |
-
_this.mousewheel();
|
249 |
-
}
|
250 |
-
} else {
|
251 |
-
_this.$slide.on('click.lg', function() {
|
252 |
-
_this.$el.trigger('onSlideClick.lg');
|
253 |
-
});
|
254 |
-
}
|
255 |
-
|
256 |
-
_this.counter();
|
257 |
-
|
258 |
-
_this.closeGallery();
|
259 |
-
|
260 |
-
_this.$el.trigger('onAfterOpen.lg');
|
261 |
-
|
262 |
-
// Hide controllers if mouse doesn't move for some period
|
263 |
-
_this.$outer.on('mousemove.lg click.lg touchstart.lg', function() {
|
264 |
-
|
265 |
-
_this.$outer.removeClass('lg-hide-items');
|
266 |
-
|
267 |
-
clearTimeout(_this.hideBartimeout);
|
268 |
-
|
269 |
-
// Timeout will be cleared on each slide movement also
|
270 |
-
_this.hideBartimeout = setTimeout(function() {
|
271 |
-
_this.$outer.addClass('lg-hide-items');
|
272 |
-
}, _this.s.hideBarsDelay);
|
273 |
-
|
274 |
-
});
|
275 |
-
|
276 |
-
_this.$outer.trigger('mousemove.lg');
|
277 |
-
|
278 |
-
};
|
279 |
-
|
280 |
-
Plugin.prototype.structure = function() {
|
281 |
-
var list = '';
|
282 |
-
var controls = '';
|
283 |
-
var i = 0;
|
284 |
-
var subHtmlCont = '';
|
285 |
-
var template;
|
286 |
-
var _this = this;
|
287 |
-
|
288 |
-
$('body').append('<div class="lg-backdrop"></div>');
|
289 |
-
$('.lg-backdrop').css('transition-duration', this.s.backdropDuration + 'ms');
|
290 |
-
|
291 |
-
// Create gallery items
|
292 |
-
for (i = 0; i < this.$items.length; i++) {
|
293 |
-
list += '<div class="lg-item"></div>';
|
294 |
-
}
|
295 |
-
|
296 |
-
// Create controlls
|
297 |
-
if (this.s.controls && this.$items.length > 1) {
|
298 |
-
controls = '<div class="lg-actions">' +
|
299 |
-
'<button class="lg-prev lg-icon">' + this.s.prevHtml + '</button>' +
|
300 |
-
'<button class="lg-next lg-icon">' + this.s.nextHtml + '</button>' +
|
301 |
-
'</div>';
|
302 |
-
}
|
303 |
-
|
304 |
-
if (this.s.appendSubHtmlTo === '.lg-sub-html') {
|
305 |
-
subHtmlCont = '<div class="lg-sub-html"></div>';
|
306 |
-
}
|
307 |
-
|
308 |
-
template = '<div class="lg-outer ' + this.s.addClass + ' ' + this.s.startClass + '">' +
|
309 |
-
'<div class="lg" style="width:' + this.s.width + '; height:' + this.s.height + '">' +
|
310 |
-
'<div class="lg-inner">' + list + '</div>' +
|
311 |
-
'<div class="lg-toolbar lg-group">' +
|
312 |
-
'<span class="lg-close lg-icon"></span>' +
|
313 |
-
'</div>' +
|
314 |
-
controls +
|
315 |
-
subHtmlCont +
|
316 |
-
'</div>' +
|
317 |
-
'</div>';
|
318 |
-
|
319 |
-
$('body').append(template);
|
320 |
-
this.$outer = $('.lg-outer');
|
321 |
-
this.$slide = this.$outer.find('.lg-item');
|
322 |
-
|
323 |
-
if (this.s.useLeft) {
|
324 |
-
this.$outer.addClass('lg-use-left');
|
325 |
-
|
326 |
-
// Set mode lg-slide if use left is true;
|
327 |
-
this.s.mode = 'lg-slide';
|
328 |
-
} else {
|
329 |
-
this.$outer.addClass('lg-use-css3');
|
330 |
-
}
|
331 |
-
|
332 |
-
// For fixed height gallery
|
333 |
-
_this.setTop();
|
334 |
-
$(window).on('resize.lg orientationchange.lg', function() {
|
335 |
-
setTimeout(function() {
|
336 |
-
_this.setTop();
|
337 |
-
}, 100);
|
338 |
-
});
|
339 |
-
|
340 |
-
// add class lg-current to remove initial transition
|
341 |
-
this.$slide.eq(this.index).addClass('lg-current');
|
342 |
-
|
343 |
-
// add Class for css support and transition mode
|
344 |
-
if (this.doCss()) {
|
345 |
-
this.$outer.addClass('lg-css3');
|
346 |
-
} else {
|
347 |
-
this.$outer.addClass('lg-css');
|
348 |
-
|
349 |
-
// Set speed 0 because no animation will happen if browser doesn't support css3
|
350 |
-
this.s.speed = 0;
|
351 |
-
}
|
352 |
-
|
353 |
-
this.$outer.addClass(this.s.mode);
|
354 |
-
|
355 |
-
if (this.s.enableDrag && this.$items.length > 1) {
|
356 |
-
this.$outer.addClass('lg-grab');
|
357 |
-
}
|
358 |
-
|
359 |
-
if (this.s.showAfterLoad) {
|
360 |
-
this.$outer.addClass('lg-show-after-load');
|
361 |
-
}
|
362 |
-
|
363 |
-
if (this.doCss()) {
|
364 |
-
var $inner = this.$outer.find('.lg-inner');
|
365 |
-
$inner.css('transition-timing-function', this.s.cssEasing);
|
366 |
-
$inner.css('transition-duration', this.s.speed + 'ms');
|
367 |
-
}
|
368 |
-
|
369 |
-
setTimeout(function() {
|
370 |
-
$('.lg-backdrop').addClass('in');
|
371 |
-
});
|
372 |
-
|
373 |
-
setTimeout(function() {
|
374 |
-
_this.$outer.addClass('lg-visible');
|
375 |
-
}, this.s.backdropDuration);
|
376 |
-
|
377 |
-
if (this.s.download) {
|
378 |
-
this.$outer.find('.lg-toolbar').append('<a id="lg-download" target="_blank" download class="lg-download lg-icon"></a>');
|
379 |
-
}
|
380 |
-
|
381 |
-
// Store the current scroll top value to scroll back after closing the gallery..
|
382 |
-
this.prevScrollTop = $(window).scrollTop();
|
383 |
-
|
384 |
-
};
|
385 |
-
|
386 |
-
// For fixed height gallery
|
387 |
-
Plugin.prototype.setTop = function() {
|
388 |
-
if (this.s.height !== '100%') {
|
389 |
-
var wH = $(window).height();
|
390 |
-
var top = (wH - parseInt(this.s.height, 10)) / 2;
|
391 |
-
var $lGallery = this.$outer.find('.lg');
|
392 |
-
if (wH >= parseInt(this.s.height, 10)) {
|
393 |
-
$lGallery.css('top', top + 'px');
|
394 |
-
} else {
|
395 |
-
$lGallery.css('top', '0px');
|
396 |
-
}
|
397 |
-
}
|
398 |
-
};
|
399 |
-
|
400 |
-
// Find css3 support
|
401 |
-
Plugin.prototype.doCss = function() {
|
402 |
-
// check for css animation support
|
403 |
-
var support = function() {
|
404 |
-
var transition = ['transition', 'MozTransition', 'WebkitTransition', 'OTransition', 'msTransition', 'KhtmlTransition'];
|
405 |
-
var root = document.documentElement;
|
406 |
-
var i = 0;
|
407 |
-
for (i = 0; i < transition.length; i++) {
|
408 |
-
if (transition[i] in root.style) {
|
409 |
-
return true;
|
410 |
-
}
|
411 |
-
}
|
412 |
-
};
|
413 |
-
|
414 |
-
if (support()) {
|
415 |
-
return true;
|
416 |
-
}
|
417 |
-
|
418 |
-
return false;
|
419 |
-
};
|
420 |
-
|
421 |
-
/**
|
422 |
-
* @desc Check the given src is video
|
423 |
-
* @param {String} src
|
424 |
-
* @return {Object} video type
|
425 |
-
* Ex:{ youtube : ["//www.youtube.com/watch?v=c0asJgSyxcY", "c0asJgSyxcY"] }
|
426 |
-
*/
|
427 |
-
Plugin.prototype.isVideo = function(src, index) {
|
428 |
-
|
429 |
-
var html;
|
430 |
-
if (this.s.dynamic) {
|
431 |
-
html = this.s.dynamicEl[index].html;
|
432 |
-
} else {
|
433 |
-
html = this.$items.eq(index).attr('data-html');
|
434 |
-
}
|
435 |
-
|
436 |
-
if (!src) {
|
437 |
-
if(html) {
|
438 |
-
return {
|
439 |
-
html5: true
|
440 |
-
};
|
441 |
-
} else {
|
442 |
-
console.error('lightGallery :- data-src is not pvovided on slide item ' + (index + 1) + '. Please make sure the selector property is properly configured. More info - http://sachinchoolur.github.io/lightGallery/demos/html-markup.html');
|
443 |
-
return false;
|
444 |
-
}
|
445 |
-
}
|
446 |
-
|
447 |
-
var youtube = src.match(/\/\/(?:www\.)?youtu(?:\.be|be\.com|be-nocookie\.com)\/(?:watch\?v=|embed\/)?([a-z0-9\-\_\%]+)/i);
|
448 |
-
var vimeo = src.match(/\/\/(?:www\.)?vimeo.com\/([0-9a-z\-_]+)/i);
|
449 |
-
var dailymotion = src.match(/\/\/(?:www\.)?dai.ly\/([0-9a-z\-_]+)/i);
|
450 |
-
var vk = src.match(/\/\/(?:www\.)?(?:vk\.com|vkontakte\.ru)\/(?:video_ext\.php\?)(.*)/i);
|
451 |
-
|
452 |
-
if (youtube) {
|
453 |
-
return {
|
454 |
-
youtube: youtube
|
455 |
-
};
|
456 |
-
} else if (vimeo) {
|
457 |
-
return {
|
458 |
-
vimeo: vimeo
|
459 |
-
};
|
460 |
-
} else if (dailymotion) {
|
461 |
-
return {
|
462 |
-
dailymotion: dailymotion
|
463 |
-
};
|
464 |
-
} else if (vk) {
|
465 |
-
return {
|
466 |
-
vk: vk
|
467 |
-
};
|
468 |
-
}
|
469 |
-
};
|
470 |
-
|
471 |
-
/**
|
472 |
-
* @desc Create image counter
|
473 |
-
* Ex: 1/10
|
474 |
-
*/
|
475 |
-
Plugin.prototype.counter = function() {
|
476 |
-
if (this.s.counter) {
|
477 |
-
$(this.s.appendCounterTo).append('<div id="lg-counter"><span id="lg-counter-current">' + (parseInt(this.index, 10) + 1) + '</span> / <span id="lg-counter-all">' + this.$items.length + '</span></div>');
|
478 |
-
}
|
479 |
-
};
|
480 |
-
|
481 |
-
/**
|
482 |
-
* @desc add sub-html into the slide
|
483 |
-
* @param {Number} index - index of the slide
|
484 |
-
*/
|
485 |
-
Plugin.prototype.addHtml = function(index) {
|
486 |
-
var subHtml = null;
|
487 |
-
var subHtmlUrl;
|
488 |
-
var $currentEle;
|
489 |
-
if (this.s.dynamic) {
|
490 |
-
if (this.s.dynamicEl[index].subHtmlUrl) {
|
491 |
-
subHtmlUrl = this.s.dynamicEl[index].subHtmlUrl;
|
492 |
-
} else {
|
493 |
-
subHtml = this.s.dynamicEl[index].subHtml;
|
494 |
-
}
|
495 |
-
} else {
|
496 |
-
$currentEle = this.$items.eq(index);
|
497 |
-
if ($currentEle.attr('data-sub-html-url')) {
|
498 |
-
subHtmlUrl = $currentEle.attr('data-sub-html-url');
|
499 |
-
} else {
|
500 |
-
subHtml = $currentEle.attr('data-sub-html');
|
501 |
-
if (this.s.getCaptionFromTitleOrAlt && !subHtml) {
|
502 |
-
subHtml = $currentEle.attr('title') || $currentEle.find('img').first().attr('alt');
|
503 |
-
}
|
504 |
-
}
|
505 |
-
}
|
506 |
-
|
507 |
-
if (!subHtmlUrl) {
|
508 |
-
if (typeof subHtml !== 'undefined' && subHtml !== null) {
|
509 |
-
|
510 |
-
// get first letter of subhtml
|
511 |
-
// if first letter starts with . or # get the html form the jQuery object
|
512 |
-
var fL = subHtml.substring(0, 1);
|
513 |
-
if (fL === '.' || fL === '#') {
|
514 |
-
if (this.s.subHtmlSelectorRelative && !this.s.dynamic) {
|
515 |
-
subHtml = $currentEle.find(subHtml).html();
|
516 |
-
} else {
|
517 |
-
subHtml = $(subHtml).html();
|
518 |
-
}
|
519 |
-
}
|
520 |
-
} else {
|
521 |
-
subHtml = '';
|
522 |
-
}
|
523 |
-
}
|
524 |
-
|
525 |
-
if (this.s.appendSubHtmlTo === '.lg-sub-html') {
|
526 |
-
|
527 |
-
if (subHtmlUrl) {
|
528 |
-
this.$outer.find(this.s.appendSubHtmlTo).load(subHtmlUrl);
|
529 |
-
} else {
|
530 |
-
this.$outer.find(this.s.appendSubHtmlTo).html(subHtml);
|
531 |
-
}
|
532 |
-
|
533 |
-
} else {
|
534 |
-
|
535 |
-
if (subHtmlUrl) {
|
536 |
-
this.$slide.eq(index).load(subHtmlUrl);
|
537 |
-
} else {
|
538 |
-
this.$slide.eq(index).append(subHtml);
|
539 |
-
}
|
540 |
-
}
|
541 |
-
|
542 |
-
// Add lg-empty-html class if title doesn't exist
|
543 |
-
if (typeof subHtml !== 'undefined' && subHtml !== null) {
|
544 |
-
if (subHtml === '') {
|
545 |
-
this.$outer.find(this.s.appendSubHtmlTo).addClass('lg-empty-html');
|
546 |
-
} else {
|
547 |
-
this.$outer.find(this.s.appendSubHtmlTo).removeClass('lg-empty-html');
|
548 |
-
}
|
549 |
-
}
|
550 |
-
|
551 |
-
this.$el.trigger('onAfterAppendSubHtml.lg', [index]);
|
552 |
-
};
|
553 |
-
|
554 |
-
/**
|
555 |
-
* @desc Preload slides
|
556 |
-
* @param {Number} index - index of the slide
|
557 |
-
*/
|
558 |
-
Plugin.prototype.preload = function(index) {
|
559 |
-
var i = 1;
|
560 |
-
var j = 1;
|
561 |
-
for (i = 1; i <= this.s.preload; i++) {
|
562 |
-
if (i >= this.$items.length - index) {
|
563 |
-
break;
|
564 |
-
}
|
565 |
-
|
566 |
-
this.loadContent(index + i, false, 0);
|
567 |
-
}
|
568 |
-
|
569 |
-
for (j = 1; j <= this.s.preload; j++) {
|
570 |
-
if (index - j < 0) {
|
571 |
-
break;
|
572 |
-
}
|
573 |
-
|
574 |
-
this.loadContent(index - j, false, 0);
|
575 |
-
}
|
576 |
-
};
|
577 |
-
|
578 |
-
/**
|
579 |
-
* @desc Load slide content into slide.
|
580 |
-
* @param {Number} index - index of the slide.
|
581 |
-
* @param {Boolean} rec - if true call loadcontent() function again.
|
582 |
-
* @param {Boolean} delay - delay for adding complete class. it is 0 except first time.
|
583 |
-
*/
|
584 |
-
Plugin.prototype.loadContent = function(index, rec, delay) {
|
585 |
-
|
586 |
-
var _this = this;
|
587 |
-
var _hasPoster = false;
|
588 |
-
var _$img;
|
589 |
-
var _src;
|
590 |
-
var _poster;
|
591 |
-
var _srcset;
|
592 |
-
var _sizes;
|
593 |
-
var _html;
|
594 |
-
var getResponsiveSrc = function(srcItms) {
|
595 |
-
var rsWidth = [];
|
596 |
-
var rsSrc = [];
|
597 |
-
for (var i = 0; i < srcItms.length; i++) {
|
598 |
-
var __src = srcItms[i].split(' ');
|
599 |
-
|
600 |
-
// Manage empty space
|
601 |
-
if (__src[0] === '') {
|
602 |
-
__src.splice(0, 1);
|
603 |
-
}
|
604 |
-
|
605 |
-
rsSrc.push(__src[0]);
|
606 |
-
rsWidth.push(__src[1]);
|
607 |
-
}
|
608 |
-
|
609 |
-
var wWidth = $(window).width();
|
610 |
-
for (var j = 0; j < rsWidth.length; j++) {
|
611 |
-
if (parseInt(rsWidth[j], 10) > wWidth) {
|
612 |
-
_src = rsSrc[j];
|
613 |
-
break;
|
614 |
-
}
|
615 |
-
}
|
616 |
-
};
|
617 |
-
|
618 |
-
if (_this.s.dynamic) {
|
619 |
-
|
620 |
-
if (_this.s.dynamicEl[index].poster) {
|
621 |
-
_hasPoster = true;
|
622 |
-
_poster = _this.s.dynamicEl[index].poster;
|
623 |
-
}
|
624 |
-
|
625 |
-
_html = _this.s.dynamicEl[index].html;
|
626 |
-
_src = _this.s.dynamicEl[index].src;
|
627 |
-
|
628 |
-
if (_this.s.dynamicEl[index].responsive) {
|
629 |
-
var srcDyItms = _this.s.dynamicEl[index].responsive.split(',');
|
630 |
-
getResponsiveSrc(srcDyItms);
|
631 |
-
}
|
632 |
-
|
633 |
-
_srcset = _this.s.dynamicEl[index].srcset;
|
634 |
-
_sizes = _this.s.dynamicEl[index].sizes;
|
635 |
-
|
636 |
-
} else {
|
637 |
-
|
638 |
-
if (_this.$items.eq(index).attr('data-poster')) {
|
639 |
-
_hasPoster = true;
|
640 |
-
_poster = _this.$items.eq(index).attr('data-poster');
|
641 |
-
}
|
642 |
-
|
643 |
-
_html = _this.$items.eq(index).attr('data-html');
|
644 |
-
_src = _this.$items.eq(index).attr('href') || _this.$items.eq(index).attr('data-src');
|
645 |
-
|
646 |
-
if (_this.$items.eq(index).attr('data-responsive')) {
|
647 |
-
var srcItms = _this.$items.eq(index).attr('data-responsive').split(',');
|
648 |
-
getResponsiveSrc(srcItms);
|
649 |
-
}
|
650 |
-
|
651 |
-
_srcset = _this.$items.eq(index).attr('data-srcset');
|
652 |
-
_sizes = _this.$items.eq(index).attr('data-sizes');
|
653 |
-
|
654 |
-
}
|
655 |
-
|
656 |
-
//if (_src || _srcset || _sizes || _poster) {
|
657 |
-
|
658 |
-
var iframe = false;
|
659 |
-
if (_this.s.dynamic) {
|
660 |
-
if (_this.s.dynamicEl[index].iframe) {
|
661 |
-
iframe = true;
|
662 |
-
}
|
663 |
-
} else {
|
664 |
-
if (_this.$items.eq(index).attr('data-iframe') === 'true') {
|
665 |
-
iframe = true;
|
666 |
-
}
|
667 |
-
}
|
668 |
-
|
669 |
-
var _isVideo = _this.isVideo(_src, index);
|
670 |
-
if (!_this.$slide.eq(index).hasClass('lg-loaded')) {
|
671 |
-
if (iframe) {
|
672 |
-
_this.$slide.eq(index).prepend('<div class="lg-video-cont lg-has-iframe" style="max-width:' + _this.s.iframeMaxWidth + '"><div class="lg-video"><iframe class="lg-object" frameborder="0" src="' + _src + '" allowfullscreen="true"></iframe></div></div>');
|
673 |
-
} else if (_hasPoster) {
|
674 |
-
var videoClass = '';
|
675 |
-
if (_isVideo && _isVideo.youtube) {
|
676 |
-
videoClass = 'lg-has-youtube';
|
677 |
-
} else if (_isVideo && _isVideo.vimeo) {
|
678 |
-
videoClass = 'lg-has-vimeo';
|
679 |
-
} else {
|
680 |
-
videoClass = 'lg-has-html5';
|
681 |
-
}
|
682 |
-
|
683 |
-
_this.$slide.eq(index).prepend('<div class="lg-video-cont ' + videoClass + ' "><div class="lg-video"><span class="lg-video-play"></span><img class="lg-object lg-has-poster" src="' + _poster + '" /></div></div>');
|
684 |
-
|
685 |
-
} else if (_isVideo) {
|
686 |
-
_this.$slide.eq(index).prepend('<div class="lg-video-cont "><div class="lg-video"></div></div>');
|
687 |
-
_this.$el.trigger('hasVideo.lg', [index, _src, _html]);
|
688 |
-
} else {
|
689 |
-
_this.$slide.eq(index).prepend('<div class="lg-img-wrap"><img class="lg-object lg-image" src="' + _src + '" /></div>');
|
690 |
-
}
|
691 |
-
|
692 |
-
_this.$el.trigger('onAferAppendSlide.lg', [index]);
|
693 |
-
|
694 |
-
_$img = _this.$slide.eq(index).find('.lg-object');
|
695 |
-
if (_sizes) {
|
696 |
-
_$img.attr('sizes', _sizes);
|
697 |
-
}
|
698 |
-
|
699 |
-
if (_srcset) {
|
700 |
-
_$img.attr('srcset', _srcset);
|
701 |
-
try {
|
702 |
-
picturefill({
|
703 |
-
elements: [_$img[0]]
|
704 |
-
});
|
705 |
-
} catch (e) {
|
706 |
-
console.warn('lightGallery :- If you want srcset to be supported for older browser please include picturefil version 2 javascript library in your document.');
|
707 |
-
}
|
708 |
-
}
|
709 |
-
|
710 |
-
if (this.s.appendSubHtmlTo !== '.lg-sub-html') {
|
711 |
-
_this.addHtml(index);
|
712 |
-
}
|
713 |
-
|
714 |
-
_this.$slide.eq(index).addClass('lg-loaded');
|
715 |
-
}
|
716 |
-
|
717 |
-
_this.$slide.eq(index).find('.lg-object').on('load.lg error.lg', function() {
|
718 |
-
|
719 |
-
// For first time add some delay for displaying the start animation.
|
720 |
-
var _speed = 0;
|
721 |
-
|
722 |
-
// Do not change the delay value because it is required for zoom plugin.
|
723 |
-
// If gallery opened from direct url (hash) speed value should be 0
|
724 |
-
if (delay && !$('body').hasClass('lg-from-hash')) {
|
725 |
-
_speed = delay;
|
726 |
-
}
|
727 |
-
|
728 |
-
setTimeout(function() {
|
729 |
-
_this.$slide.eq(index).addClass('lg-complete');
|
730 |
-
_this.$el.trigger('onSlideItemLoad.lg', [index, delay || 0]);
|
731 |
-
}, _speed);
|
732 |
-
|
733 |
-
});
|
734 |
-
|
735 |
-
// @todo check load state for html5 videos
|
736 |
-
if (_isVideo && _isVideo.html5 && !_hasPoster) {
|
737 |
-
_this.$slide.eq(index).addClass('lg-complete');
|
738 |
-
}
|
739 |
-
|
740 |
-
if (rec === true) {
|
741 |
-
if (!_this.$slide.eq(index).hasClass('lg-complete')) {
|
742 |
-
_this.$slide.eq(index).find('.lg-object').on('load.lg error.lg', function() {
|
743 |
-
_this.preload(index);
|
744 |
-
});
|
745 |
-
} else {
|
746 |
-
_this.preload(index);
|
747 |
-
}
|
748 |
-
}
|
749 |
-
|
750 |
-
//}
|
751 |
-
};
|
752 |
-
|
753 |
-
/**
|
754 |
-
* @desc slide function for lightgallery
|
755 |
-
** Slide() gets call on start
|
756 |
-
** ** Set lg.on true once slide() function gets called.
|
757 |
-
** Call loadContent() on slide() function inside setTimeout
|
758 |
-
** ** On first slide we do not want any animation like slide of fade
|
759 |
-
** ** So on first slide( if lg.on if false that is first slide) loadContent() should start loading immediately
|
760 |
-
** ** Else loadContent() should wait for the transition to complete.
|
761 |
-
** ** So set timeout s.speed + 50
|
762 |
-
<=> ** loadContent() will load slide content in to the particular slide
|
763 |
-
** ** It has recursion (rec) parameter. if rec === true loadContent() will call preload() function.
|
764 |
-
** ** preload will execute only when the previous slide is fully loaded (images iframe)
|
765 |
-
** ** avoid simultaneous image load
|
766 |
-
<=> ** Preload() will check for s.preload value and call loadContent() again accoring to preload value
|
767 |
-
** loadContent() <====> Preload();
|
768 |
-
|
769 |
-
* @param {Number} index - index of the slide
|
770 |
-
* @param {Boolean} fromTouch - true if slide function called via touch event or mouse drag
|
771 |
-
* @param {Boolean} fromThumb - true if slide function called via thumbnail click
|
772 |
-
* @param {String} direction - Direction of the slide(next/prev)
|
773 |
-
*/
|
774 |
-
Plugin.prototype.slide = function(index, fromTouch, fromThumb, direction) {
|
775 |
-
|
776 |
-
var _prevIndex = this.$outer.find('.lg-current').index();
|
777 |
-
var _this = this;
|
778 |
-
|
779 |
-
// Prevent if multiple call
|
780 |
-
// Required for hsh plugin
|
781 |
-
if (_this.lGalleryOn && (_prevIndex === index)) {
|
782 |
-
return;
|
783 |
-
}
|
784 |
-
|
785 |
-
var _length = this.$slide.length;
|
786 |
-
var _time = _this.lGalleryOn ? this.s.speed : 0;
|
787 |
-
|
788 |
-
if (!_this.lgBusy) {
|
789 |
-
|
790 |
-
if (this.s.download) {
|
791 |
-
var _src;
|
792 |
-
if (_this.s.dynamic) {
|
793 |
-
_src = _this.s.dynamicEl[index].downloadUrl !== false && (_this.s.dynamicEl[index].downloadUrl || _this.s.dynamicEl[index].src);
|
794 |
-
} else {
|
795 |
-
_src = _this.$items.eq(index).attr('data-download-url') !== 'false' && (_this.$items.eq(index).attr('data-download-url') || _this.$items.eq(index).attr('href') || _this.$items.eq(index).attr('data-src'));
|
796 |
-
|
797 |
-
}
|
798 |
-
|
799 |
-
if (_src) {
|
800 |
-
$('#lg-download').attr('href', _src);
|
801 |
-
_this.$outer.removeClass('lg-hide-download');
|
802 |
-
} else {
|
803 |
-
_this.$outer.addClass('lg-hide-download');
|
804 |
-
}
|
805 |
-
}
|
806 |
-
|
807 |
-
this.$el.trigger('onBeforeSlide.lg', [_prevIndex, index, fromTouch, fromThumb]);
|
808 |
-
|
809 |
-
_this.lgBusy = true;
|
810 |
-
|
811 |
-
clearTimeout(_this.hideBartimeout);
|
812 |
-
|
813 |
-
// Add title if this.s.appendSubHtmlTo === lg-sub-html
|
814 |
-
if (this.s.appendSubHtmlTo === '.lg-sub-html') {
|
815 |
-
|
816 |
-
// wait for slide animation to complete
|
817 |
-
setTimeout(function() {
|
818 |
-
_this.addHtml(index);
|
819 |
-
}, _time);
|
820 |
-
}
|
821 |
-
|
822 |
-
this.arrowDisable(index);
|
823 |
-
|
824 |
-
if (!direction) {
|
825 |
-
if (index < _prevIndex) {
|
826 |
-
direction = 'prev';
|
827 |
-
} else if (index > _prevIndex) {
|
828 |
-
direction = 'next';
|
829 |
-
}
|
830 |
-
}
|
831 |
-
|
832 |
-
if (!fromTouch) {
|
833 |
-
|
834 |
-
// remove all transitions
|
835 |
-
_this.$outer.addClass('lg-no-trans');
|
836 |
-
|
837 |
-
this.$slide.removeClass('lg-prev-slide lg-next-slide');
|
838 |
-
|
839 |
-
if (direction === 'prev') {
|
840 |
-
|
841 |
-
//prevslide
|
842 |
-
this.$slide.eq(index).addClass('lg-prev-slide');
|
843 |
-
this.$slide.eq(_prevIndex).addClass('lg-next-slide');
|
844 |
-
} else {
|
845 |
-
|
846 |
-
// next slide
|
847 |
-
this.$slide.eq(index).addClass('lg-next-slide');
|
848 |
-
this.$slide.eq(_prevIndex).addClass('lg-prev-slide');
|
849 |
-
}
|
850 |
-
|
851 |
-
// give 50 ms for browser to add/remove class
|
852 |
-
setTimeout(function() {
|
853 |
-
_this.$slide.removeClass('lg-current');
|
854 |
-
|
855 |
-
//_this.$slide.eq(_prevIndex).removeClass('lg-current');
|
856 |
-
_this.$slide.eq(index).addClass('lg-current');
|
857 |
-
|
858 |
-
// reset all transitions
|
859 |
-
_this.$outer.removeClass('lg-no-trans');
|
860 |
-
}, 50);
|
861 |
-
} else {
|
862 |
-
|
863 |
-
this.$slide.removeClass('lg-prev-slide lg-current lg-next-slide');
|
864 |
-
var touchPrev;
|
865 |
-
var touchNext;
|
866 |
-
if (_length > 2) {
|
867 |
-
touchPrev = index - 1;
|
868 |
-
touchNext = index + 1;
|
869 |
-
|
870 |
-
if ((index === 0) && (_prevIndex === _length - 1)) {
|
871 |
-
|
872 |
-
// next slide
|
873 |
-
touchNext = 0;
|
874 |
-
touchPrev = _length - 1;
|
875 |
-
} else if ((index === _length - 1) && (_prevIndex === 0)) {
|
876 |
-
|
877 |
-
// prev slide
|
878 |
-
touchNext = 0;
|
879 |
-
touchPrev = _length - 1;
|
880 |
-
}
|
881 |
-
|
882 |
-
} else {
|
883 |
-
touchPrev = 0;
|
884 |
-
touchNext = 1;
|
885 |
-
}
|
886 |
-
|
887 |
-
if (direction === 'prev') {
|
888 |
-
_this.$slide.eq(touchNext).addClass('lg-next-slide');
|
889 |
-
} else {
|
890 |
-
_this.$slide.eq(touchPrev).addClass('lg-prev-slide');
|
891 |
-
}
|
892 |
-
|
893 |
-
_this.$slide.eq(index).addClass('lg-current');
|
894 |
-
}
|
895 |
-
|
896 |
-
if (_this.lGalleryOn) {
|
897 |
-
setTimeout(function() {
|
898 |
-
_this.loadContent(index, true, 0);
|
899 |
-
}, this.s.speed + 50);
|
900 |
-
|
901 |
-
setTimeout(function() {
|
902 |
-
_this.lgBusy = false;
|
903 |
-
_this.$el.trigger('onAfterSlide.lg', [_prevIndex, index, fromTouch, fromThumb]);
|
904 |
-
}, this.s.speed);
|
905 |
-
|
906 |
-
} else {
|
907 |
-
_this.loadContent(index, true, _this.s.backdropDuration);
|
908 |
-
|
909 |
-
_this.lgBusy = false;
|
910 |
-
_this.$el.trigger('onAfterSlide.lg', [_prevIndex, index, fromTouch, fromThumb]);
|
911 |
-
}
|
912 |
-
|
913 |
-
_this.lGalleryOn = true;
|
914 |
-
|
915 |
-
if (this.s.counter) {
|
916 |
-
$('#lg-counter-current').text(index + 1);
|
917 |
-
}
|
918 |
-
|
919 |
-
}
|
920 |
-
_this.index = index;
|
921 |
-
|
922 |
-
};
|
923 |
-
|
924 |
-
/**
|
925 |
-
* @desc Go to next slide
|
926 |
-
* @param {Boolean} fromTouch - true if slide function called via touch event
|
927 |
-
*/
|
928 |
-
Plugin.prototype.goToNextSlide = function(fromTouch) {
|
929 |
-
var _this = this;
|
930 |
-
var _loop = _this.s.loop;
|
931 |
-
if (fromTouch && _this.$slide.length < 3) {
|
932 |
-
_loop = false;
|
933 |
-
}
|
934 |
-
|
935 |
-
if (!_this.lgBusy) {
|
936 |
-
if ((_this.index + 1) < _this.$slide.length) {
|
937 |
-
_this.index++;
|
938 |
-
_this.$el.trigger('onBeforeNextSlide.lg', [_this.index]);
|
939 |
-
_this.slide(_this.index, fromTouch, false, 'next');
|
940 |
-
} else {
|
941 |
-
if (_loop) {
|
942 |
-
_this.index = 0;
|
943 |
-
_this.$el.trigger('onBeforeNextSlide.lg', [_this.index]);
|
944 |
-
_this.slide(_this.index, fromTouch, false, 'next');
|
945 |
-
} else if (_this.s.slideEndAnimatoin && !fromTouch) {
|
946 |
-
_this.$outer.addClass('lg-right-end');
|
947 |
-
setTimeout(function() {
|
948 |
-
_this.$outer.removeClass('lg-right-end');
|
949 |
-
}, 400);
|
950 |
-
}
|
951 |
-
}
|
952 |
-
}
|
953 |
-
};
|
954 |
-
|
955 |
-
/**
|
956 |
-
* @desc Go to previous slide
|
957 |
-
* @param {Boolean} fromTouch - true if slide function called via touch event
|
958 |
-
*/
|
959 |
-
Plugin.prototype.goToPrevSlide = function(fromTouch) {
|
960 |
-
var _this = this;
|
961 |
-
var _loop = _this.s.loop;
|
962 |
-
if (fromTouch && _this.$slide.length < 3) {
|
963 |
-
_loop = false;
|
964 |
-
}
|
965 |
-
|
966 |
-
if (!_this.lgBusy) {
|
967 |
-
if (_this.index > 0) {
|
968 |
-
_this.index--;
|
969 |
-
_this.$el.trigger('onBeforePrevSlide.lg', [_this.index, fromTouch]);
|
970 |
-
_this.slide(_this.index, fromTouch, false, 'prev');
|
971 |
-
} else {
|
972 |
-
if (_loop) {
|
973 |
-
_this.index = _this.$items.length - 1;
|
974 |
-
_this.$el.trigger('onBeforePrevSlide.lg', [_this.index, fromTouch]);
|
975 |
-
_this.slide(_this.index, fromTouch, false, 'prev');
|
976 |
-
} else if (_this.s.slideEndAnimatoin && !fromTouch) {
|
977 |
-
_this.$outer.addClass('lg-left-end');
|
978 |
-
setTimeout(function() {
|
979 |
-
_this.$outer.removeClass('lg-left-end');
|
980 |
-
}, 400);
|
981 |
-
}
|
982 |
-
}
|
983 |
-
}
|
984 |
-
};
|
985 |
-
|
986 |
-
Plugin.prototype.keyPress = function() {
|
987 |
-
var _this = this;
|
988 |
-
if (this.$items.length > 1) {
|
989 |
-
$(window).on('keyup.lg', function(e) {
|
990 |
-
if (_this.$items.length > 1) {
|
991 |
-
if (e.keyCode === 37) {
|
992 |
-
e.preventDefault();
|
993 |
-
_this.goToPrevSlide();
|
994 |
-
}
|
995 |
-
|
996 |
-
if (e.keyCode === 39) {
|
997 |
-
e.preventDefault();
|
998 |
-
_this.goToNextSlide();
|
999 |
-
}
|
1000 |
-
}
|
1001 |
-
});
|
1002 |
-
}
|
1003 |
-
|
1004 |
-
$(window).on('keydown.lg', function(e) {
|
1005 |
-
if (_this.s.escKey === true && e.keyCode === 27) {
|
1006 |
-
e.preventDefault();
|
1007 |
-
if (!_this.$outer.hasClass('lg-thumb-open')) {
|
1008 |
-
_this.destroy();
|
1009 |
-
} else {
|
1010 |
-
_this.$outer.removeClass('lg-thumb-open');
|
1011 |
-
}
|
1012 |
-
}
|
1013 |
-
});
|
1014 |
-
};
|
1015 |
-
|
1016 |
-
Plugin.prototype.arrow = function() {
|
1017 |
-
var _this = this;
|
1018 |
-
this.$outer.find('.lg-prev').on('click.lg', function() {
|
1019 |
-
_this.goToPrevSlide();
|
1020 |
-
});
|
1021 |
-
|
1022 |
-
this.$outer.find('.lg-next').on('click.lg', function() {
|
1023 |
-
_this.goToNextSlide();
|
1024 |
-
});
|
1025 |
-
};
|
1026 |
-
|
1027 |
-
Plugin.prototype.arrowDisable = function(index) {
|
1028 |
-
|
1029 |
-
// Disable arrows if s.hideControlOnEnd is true
|
1030 |
-
if (!this.s.loop && this.s.hideControlOnEnd) {
|
1031 |
-
if ((index + 1) < this.$slide.length) {
|
1032 |
-
this.$outer.find('.lg-next').removeAttr('disabled').removeClass('disabled');
|
1033 |
-
} else {
|
1034 |
-
this.$outer.find('.lg-next').attr('disabled', 'disabled').addClass('disabled');
|
1035 |
-
}
|
1036 |
-
|
1037 |
-
if (index > 0) {
|
1038 |
-
this.$outer.find('.lg-prev').removeAttr('disabled').removeClass('disabled');
|
1039 |
-
} else {
|
1040 |
-
this.$outer.find('.lg-prev').attr('disabled', 'disabled').addClass('disabled');
|
1041 |
-
}
|
1042 |
-
}
|
1043 |
-
};
|
1044 |
-
|
1045 |
-
Plugin.prototype.setTranslate = function($el, xValue, yValue) {
|
1046 |
-
// jQuery supports Automatic CSS prefixing since jQuery 1.8.0
|
1047 |
-
if (this.s.useLeft) {
|
1048 |
-
$el.css('left', xValue);
|
1049 |
-
} else {
|
1050 |
-
$el.css({
|
1051 |
-
transform: 'translate3d(' + (xValue) + 'px, ' + yValue + 'px, 0px)'
|
1052 |
-
});
|
1053 |
-
}
|
1054 |
-
};
|
1055 |
-
|
1056 |
-
Plugin.prototype.touchMove = function(startCoords, endCoords) {
|
1057 |
-
|
1058 |
-
var distance = endCoords - startCoords;
|
1059 |
-
|
1060 |
-
if (Math.abs(distance) > 15) {
|
1061 |
-
// reset opacity and transition duration
|
1062 |
-
this.$outer.addClass('lg-dragging');
|
1063 |
-
|
1064 |
-
// move current slide
|
1065 |
-
this.setTranslate(this.$slide.eq(this.index), distance, 0);
|
1066 |
-
|
1067 |
-
// move next and prev slide with current slide
|
1068 |
-
this.setTranslate($('.lg-prev-slide'), -this.$slide.eq(this.index).width() + distance, 0);
|
1069 |
-
this.setTranslate($('.lg-next-slide'), this.$slide.eq(this.index).width() + distance, 0);
|
1070 |
-
}
|
1071 |
-
};
|
1072 |
-
|
1073 |
-
Plugin.prototype.touchEnd = function(distance) {
|
1074 |
-
var _this = this;
|
1075 |
-
|
1076 |
-
// keep slide animation for any mode while dragg/swipe
|
1077 |
-
if (_this.s.mode !== 'lg-slide') {
|
1078 |
-
_this.$outer.addClass('lg-slide');
|
1079 |
-
}
|
1080 |
-
|
1081 |
-
this.$slide.not('.lg-current, .lg-prev-slide, .lg-next-slide').css('opacity', '0');
|
1082 |
-
|
1083 |
-
// set transition duration
|
1084 |
-
setTimeout(function() {
|
1085 |
-
_this.$outer.removeClass('lg-dragging');
|
1086 |
-
if ((distance < 0) && (Math.abs(distance) > _this.s.swipeThreshold)) {
|
1087 |
-
_this.goToNextSlide(true);
|
1088 |
-
} else if ((distance > 0) && (Math.abs(distance) > _this.s.swipeThreshold)) {
|
1089 |
-
_this.goToPrevSlide(true);
|
1090 |
-
} else if (Math.abs(distance) < 5) {
|
1091 |
-
|
1092 |
-
// Trigger click if distance is less than 5 pix
|
1093 |
-
_this.$el.trigger('onSlideClick.lg');
|
1094 |
-
}
|
1095 |
-
|
1096 |
-
_this.$slide.removeAttr('style');
|
1097 |
-
});
|
1098 |
-
|
1099 |
-
// remove slide class once drag/swipe is completed if mode is not slide
|
1100 |
-
setTimeout(function() {
|
1101 |
-
if (!_this.$outer.hasClass('lg-dragging') && _this.s.mode !== 'lg-slide') {
|
1102 |
-
_this.$outer.removeClass('lg-slide');
|
1103 |
-
}
|
1104 |
-
}, _this.s.speed + 100);
|
1105 |
-
|
1106 |
-
};
|
1107 |
-
|
1108 |
-
Plugin.prototype.enableSwipe = function() {
|
1109 |
-
var _this = this;
|
1110 |
-
var startCoords = 0;
|
1111 |
-
var endCoords = 0;
|
1112 |
-
var isMoved = false;
|
1113 |
-
|
1114 |
-
if (_this.s.enableSwipe && _this.doCss()) {
|
1115 |
-
|
1116 |
-
_this.$slide.on('touchstart.lg', function(e) {
|
1117 |
-
if (!_this.$outer.hasClass('lg-zoomed') && !_this.lgBusy) {
|
1118 |
-
e.preventDefault();
|
1119 |
-
_this.manageSwipeClass();
|
1120 |
-
startCoords = e.originalEvent.targetTouches[0].pageX;
|
1121 |
-
}
|
1122 |
-
});
|
1123 |
-
|
1124 |
-
_this.$slide.on('touchmove.lg', function(e) {
|
1125 |
-
if (!_this.$outer.hasClass('lg-zoomed')) {
|
1126 |
-
e.preventDefault();
|
1127 |
-
endCoords = e.originalEvent.targetTouches[0].pageX;
|
1128 |
-
_this.touchMove(startCoords, endCoords);
|
1129 |
-
isMoved = true;
|
1130 |
-
}
|
1131 |
-
});
|
1132 |
-
|
1133 |
-
_this.$slide.on('touchend.lg', function() {
|
1134 |
-
if (!_this.$outer.hasClass('lg-zoomed')) {
|
1135 |
-
if (isMoved) {
|
1136 |
-
isMoved = false;
|
1137 |
-
_this.touchEnd(endCoords - startCoords);
|
1138 |
-
} else {
|
1139 |
-
_this.$el.trigger('onSlideClick.lg');
|
1140 |
-
}
|
1141 |
-
}
|
1142 |
-
});
|
1143 |
-
}
|
1144 |
-
|
1145 |
-
};
|
1146 |
-
|
1147 |
-
Plugin.prototype.enableDrag = function() {
|
1148 |
-
var _this = this;
|
1149 |
-
var startCoords = 0;
|
1150 |
-
var endCoords = 0;
|
1151 |
-
var isDraging = false;
|
1152 |
-
var isMoved = false;
|
1153 |
-
if (_this.s.enableDrag && _this.doCss()) {
|
1154 |
-
_this.$slide.on('mousedown.lg', function(e) {
|
1155 |
-
if (!_this.$outer.hasClass('lg-zoomed') && !_this.lgBusy && !$(e.target).text().trim()) {
|
1156 |
-
e.preventDefault();
|
1157 |
-
_this.manageSwipeClass();
|
1158 |
-
startCoords = e.pageX;
|
1159 |
-
isDraging = true;
|
1160 |
-
|
1161 |
-
// ** Fix for webkit cursor issue https://code.google.com/p/chromium/issues/detail?id=26723
|
1162 |
-
_this.$outer.scrollLeft += 1;
|
1163 |
-
_this.$outer.scrollLeft -= 1;
|
1164 |
-
|
1165 |
-
// *
|
1166 |
-
|
1167 |
-
_this.$outer.removeClass('lg-grab').addClass('lg-grabbing');
|
1168 |
-
|
1169 |
-
_this.$el.trigger('onDragstart.lg');
|
1170 |
-
}
|
1171 |
-
});
|
1172 |
-
|
1173 |
-
$(window).on('mousemove.lg', function(e) {
|
1174 |
-
if (isDraging) {
|
1175 |
-
isMoved = true;
|
1176 |
-
endCoords = e.pageX;
|
1177 |
-
_this.touchMove(startCoords, endCoords);
|
1178 |
-
_this.$el.trigger('onDragmove.lg');
|
1179 |
-
}
|
1180 |
-
});
|
1181 |
-
|
1182 |
-
$(window).on('mouseup.lg', function(e) {
|
1183 |
-
if (isMoved) {
|
1184 |
-
isMoved = false;
|
1185 |
-
_this.touchEnd(endCoords - startCoords);
|
1186 |
-
_this.$el.trigger('onDragend.lg');
|
1187 |
-
} else if ($(e.target).hasClass('lg-object') || $(e.target).hasClass('lg-video-play')) {
|
1188 |
-
_this.$el.trigger('onSlideClick.lg');
|
1189 |
-
}
|
1190 |
-
|
1191 |
-
// Prevent execution on click
|
1192 |
-
if (isDraging) {
|
1193 |
-
isDraging = false;
|
1194 |
-
_this.$outer.removeClass('lg-grabbing').addClass('lg-grab');
|
1195 |
-
}
|
1196 |
-
});
|
1197 |
-
|
1198 |
-
}
|
1199 |
-
};
|
1200 |
-
|
1201 |
-
Plugin.prototype.manageSwipeClass = function() {
|
1202 |
-
var _touchNext = this.index + 1;
|
1203 |
-
var _touchPrev = this.index - 1;
|
1204 |
-
if (this.s.loop && this.$slide.length > 2) {
|
1205 |
-
if (this.index === 0) {
|
1206 |
-
_touchPrev = this.$slide.length - 1;
|
1207 |
-
} else if (this.index === this.$slide.length - 1) {
|
1208 |
-
_touchNext = 0;
|
1209 |
-
}
|
1210 |
-
}
|
1211 |
-
|
1212 |
-
this.$slide.removeClass('lg-next-slide lg-prev-slide');
|
1213 |
-
if (_touchPrev > -1) {
|
1214 |
-
this.$slide.eq(_touchPrev).addClass('lg-prev-slide');
|
1215 |
-
}
|
1216 |
-
|
1217 |
-
this.$slide.eq(_touchNext).addClass('lg-next-slide');
|
1218 |
-
};
|
1219 |
-
|
1220 |
-
Plugin.prototype.mousewheel = function() {
|
1221 |
-
var _this = this;
|
1222 |
-
_this.$outer.on('mousewheel.lg', function(e) {
|
1223 |
-
|
1224 |
-
if (!e.deltaY) {
|
1225 |
-
return;
|
1226 |
-
}
|
1227 |
-
|
1228 |
-
if (e.deltaY > 0) {
|
1229 |
-
_this.goToPrevSlide();
|
1230 |
-
} else {
|
1231 |
-
_this.goToNextSlide();
|
1232 |
-
}
|
1233 |
-
|
1234 |
-
e.preventDefault();
|
1235 |
-
});
|
1236 |
-
|
1237 |
-
};
|
1238 |
-
|
1239 |
-
Plugin.prototype.closeGallery = function() {
|
1240 |
-
|
1241 |
-
var _this = this;
|
1242 |
-
var mousedown = false;
|
1243 |
-
this.$outer.find('.lg-close').on('click.lg', function() {
|
1244 |
-
_this.destroy();
|
1245 |
-
});
|
1246 |
-
|
1247 |
-
if (_this.s.closable) {
|
1248 |
-
|
1249 |
-
// If you drag the slide and release outside gallery gets close on chrome
|
1250 |
-
// for preventing this check mousedown and mouseup happened on .lg-item or lg-outer
|
1251 |
-
_this.$outer.on('mousedown.lg', function(e) {
|
1252 |
-
|
1253 |
-
if ($(e.target).is('.lg-outer') || $(e.target).is('.lg-item ') || $(e.target).is('.lg-img-wrap')) {
|
1254 |
-
mousedown = true;
|
1255 |
-
} else {
|
1256 |
-
mousedown = false;
|
1257 |
-
}
|
1258 |
-
|
1259 |
-
});
|
1260 |
-
|
1261 |
-
_this.$outer.on('mousemove.lg', function() {
|
1262 |
-
mousedown = false;
|
1263 |
-
});
|
1264 |
-
|
1265 |
-
_this.$outer.on('mouseup.lg', function(e) {
|
1266 |
-
|
1267 |
-
if ($(e.target).is('.lg-outer') || $(e.target).is('.lg-item ') || $(e.target).is('.lg-img-wrap') && mousedown) {
|
1268 |
-
if (!_this.$outer.hasClass('lg-dragging')) {
|
1269 |
-
_this.destroy();
|
1270 |
-
}
|
1271 |
-
}
|
1272 |
-
|
1273 |
-
});
|
1274 |
-
|
1275 |
-
}
|
1276 |
-
|
1277 |
-
};
|
1278 |
-
|
1279 |
-
Plugin.prototype.destroy = function(d) {
|
1280 |
-
|
1281 |
-
var _this = this;
|
1282 |
-
|
1283 |
-
if (!d) {
|
1284 |
-
_this.$el.trigger('onBeforeClose.lg');
|
1285 |
-
$(window).scrollTop(_this.prevScrollTop);
|
1286 |
-
}
|
1287 |
-
|
1288 |
-
|
1289 |
-
/**
|
1290 |
-
* if d is false or undefined destroy will only close the gallery
|
1291 |
-
* plugins instance remains with the element
|
1292 |
-
*
|
1293 |
-
* if d is true destroy will completely remove the plugin
|
1294 |
-
*/
|
1295 |
-
|
1296 |
-
if (d) {
|
1297 |
-
if (!_this.s.dynamic) {
|
1298 |
-
// only when not using dynamic mode is $items a jquery collection
|
1299 |
-
this.$items.off('click.lg click.lgcustom');
|
1300 |
-
}
|
1301 |
-
|
1302 |
-
$.removeData(_this.el, 'lightGallery');
|
1303 |
-
}
|
1304 |
-
|
1305 |
-
// Unbind all events added by lightGallery
|
1306 |
-
this.$el.off('.lg.tm');
|
1307 |
-
|
1308 |
-
// Distroy all lightGallery modules
|
1309 |
-
$.each($.fn.lightGallery.modules, function(key) {
|
1310 |
-
if (_this.modules[key]) {
|
1311 |
-
_this.modules[key].destroy();
|
1312 |
-
}
|
1313 |
-
});
|
1314 |
-
|
1315 |
-
this.lGalleryOn = false;
|
1316 |
-
|
1317 |
-
clearTimeout(_this.hideBartimeout);
|
1318 |
-
this.hideBartimeout = false;
|
1319 |
-
$(window).off('.lg');
|
1320 |
-
$('body').removeClass('lg-on lg-from-hash');
|
1321 |
-
|
1322 |
-
if (_this.$outer) {
|
1323 |
-
_this.$outer.removeClass('lg-visible');
|
1324 |
-
}
|
1325 |
-
|
1326 |
-
$('.lg-backdrop').removeClass('in');
|
1327 |
-
|
1328 |
-
setTimeout(function() {
|
1329 |
-
if (_this.$outer) {
|
1330 |
-
_this.$outer.remove();
|
1331 |
-
}
|
1332 |
-
|
1333 |
-
$('.lg-backdrop').remove();
|
1334 |
-
|
1335 |
-
if (!d) {
|
1336 |
-
_this.$el.trigger('onCloseAfter.lg');
|
1337 |
-
}
|
1338 |
-
|
1339 |
-
}, _this.s.backdropDuration + 50);
|
1340 |
-
};
|
1341 |
-
|
1342 |
-
$.fn.lightGallery = function(options) {
|
1343 |
-
return this.each(function() {
|
1344 |
-
if (!$.data(this, 'lightGallery')) {
|
1345 |
-
$.data(this, 'lightGallery', new Plugin(this, options));
|
1346 |
-
} else {
|
1347 |
-
try {
|
1348 |
-
$(this).data('lightGallery').init();
|
1349 |
-
} catch (err) {
|
1350 |
-
console.error('lightGallery has not initiated properly');
|
1351 |
-
}
|
1352 |
-
}
|
1353 |
-
});
|
1354 |
-
};
|
1355 |
-
|
1356 |
-
$.fn.lightGallery.modules = {};
|
1357 |
-
|
1358 |
-
})();
|
1359 |
-
|
1360 |
-
|
1361 |
-
}));
|
1362 |
-
|
1363 |
-
/*! lg-autoplay - v1.0.4 - 2017-03-28
|
1364 |
-
* http://sachinchoolur.github.io/lightGallery
|
1365 |
-
* Copyright (c) 2017 Sachin N; Licensed GPLv3 */
|
1366 |
-
|
1367 |
-
(function (root, factory) {
|
1368 |
-
if (typeof define === 'function' && define.amd) {
|
1369 |
-
// AMD. Register as an anonymous module unless amdModuleId is set
|
1370 |
-
define(['jquery'], function (a0) {
|
1371 |
-
return (factory(a0));
|
1372 |
-
});
|
1373 |
-
} else if (typeof exports === 'object') {
|
1374 |
-
// Node. Does not work with strict CommonJS, but
|
1375 |
-
// only CommonJS-like environments that support module.exports,
|
1376 |
-
// like Node.
|
1377 |
-
module.exports = factory(require('jquery'));
|
1378 |
-
} else {
|
1379 |
-
factory(jQuery);
|
1380 |
-
}
|
1381 |
-
}(this, function ($) {
|
1382 |
-
|
1383 |
-
|
1384 |
-
(function() {
|
1385 |
-
|
1386 |
-
'use strict';
|
1387 |
-
|
1388 |
-
var defaults = {
|
1389 |
-
autoplay: false,
|
1390 |
-
pause: 5000,
|
1391 |
-
progressBar: true,
|
1392 |
-
fourceAutoplay: false,
|
1393 |
-
autoplayControls: true,
|
1394 |
-
appendAutoplayControlsTo: '.lg-toolbar'
|
1395 |
-
};
|
1396 |
-
|
1397 |
-
/**
|
1398 |
-
* Creates the autoplay plugin.
|
1399 |
-
* @param {object} element - lightGallery element
|
1400 |
-
*/
|
1401 |
-
var Autoplay = function(element) {
|
1402 |
-
|
1403 |
-
this.core = $(element).data('lightGallery');
|
1404 |
-
|
1405 |
-
this.$el = $(element);
|
1406 |
-
|
1407 |
-
// Execute only if items are above 1
|
1408 |
-
if (this.core.$items.length < 2) {
|
1409 |
-
return false;
|
1410 |
-
}
|
1411 |
-
|
1412 |
-
this.core.s = $.extend({}, defaults, this.core.s);
|
1413 |
-
this.interval = false;
|
1414 |
-
|
1415 |
-
// Identify if slide happened from autoplay
|
1416 |
-
this.fromAuto = true;
|
1417 |
-
|
1418 |
-
// Identify if autoplay canceled from touch/drag
|
1419 |
-
this.canceledOnTouch = false;
|
1420 |
-
|
1421 |
-
// save fourceautoplay value
|
1422 |
-
this.fourceAutoplayTemp = this.core.s.fourceAutoplay;
|
1423 |
-
|
1424 |
-
// do not allow progress bar if browser does not support css3 transitions
|
1425 |
-
if (!this.core.doCss()) {
|
1426 |
-
this.core.s.progressBar = false;
|
1427 |
-
}
|
1428 |
-
|
1429 |
-
this.init();
|
1430 |
-
|
1431 |
-
return this;
|
1432 |
-
};
|
1433 |
-
|
1434 |
-
Autoplay.prototype.init = function() {
|
1435 |
-
var _this = this;
|
1436 |
-
|
1437 |
-
// append autoplay controls
|
1438 |
-
if (_this.core.s.autoplayControls) {
|
1439 |
-
_this.controls();
|
1440 |
-
}
|
1441 |
-
|
1442 |
-
// Create progress bar
|
1443 |
-
if (_this.core.s.progressBar) {
|
1444 |
-
_this.core.$outer.find('.lg').append('<div class="lg-progress-bar"><div class="lg-progress"></div></div>');
|
1445 |
-
}
|
1446 |
-
|
1447 |
-
// set progress
|
1448 |
-
_this.progress();
|
1449 |
-
|
1450 |
-
// Start autoplay
|
1451 |
-
if (_this.core.s.autoplay) {
|
1452 |
-
_this.$el.one('onSlideItemLoad.lg.tm', function() {
|
1453 |
-
_this.startlAuto();
|
1454 |
-
});
|
1455 |
-
}
|
1456 |
-
|
1457 |
-
// cancel interval on touchstart and dragstart
|
1458 |
-
_this.$el.on('onDragstart.lg.tm touchstart.lg.tm', function() {
|
1459 |
-
if (_this.interval) {
|
1460 |
-
_this.cancelAuto();
|
1461 |
-
_this.canceledOnTouch = true;
|
1462 |
-
}
|
1463 |
-
});
|
1464 |
-
|
1465 |
-
// restore autoplay if autoplay canceled from touchstart / dragstart
|
1466 |
-
_this.$el.on('onDragend.lg.tm touchend.lg.tm onSlideClick.lg.tm', function() {
|
1467 |
-
if (!_this.interval && _this.canceledOnTouch) {
|
1468 |
-
_this.startlAuto();
|
1469 |
-
_this.canceledOnTouch = false;
|
1470 |
-
}
|
1471 |
-
});
|
1472 |
-
|
1473 |
-
};
|
1474 |
-
|
1475 |
-
Autoplay.prototype.progress = function() {
|
1476 |
-
|
1477 |
-
var _this = this;
|
1478 |
-
var _$progressBar;
|
1479 |
-
var _$progress;
|
1480 |
-
|
1481 |
-
_this.$el.on('onBeforeSlide.lg.tm', function() {
|
1482 |
-
|
1483 |
-
// start progress bar animation
|
1484 |
-
if (_this.core.s.progressBar && _this.fromAuto) {
|
1485 |
-
_$progressBar = _this.core.$outer.find('.lg-progress-bar');
|
1486 |
-
_$progress = _this.core.$outer.find('.lg-progress');
|
1487 |
-
if (_this.interval) {
|
1488 |
-
_$progress.removeAttr('style');
|
1489 |
-
_$progressBar.removeClass('lg-start');
|
1490 |
-
setTimeout(function() {
|
1491 |
-
_$progress.css('transition', 'width ' + (_this.core.s.speed + _this.core.s.pause) + 'ms ease 0s');
|
1492 |
-
_$progressBar.addClass('lg-start');
|
1493 |
-
}, 20);
|
1494 |
-
}
|
1495 |
-
}
|
1496 |
-
|
1497 |
-
// Remove setinterval if slide is triggered manually and fourceautoplay is false
|
1498 |
-
if (!_this.fromAuto && !_this.core.s.fourceAutoplay) {
|
1499 |
-
_this.cancelAuto();
|
1500 |
-
}
|
1501 |
-
|
1502 |
-
_this.fromAuto = false;
|
1503 |
-
|
1504 |
-
});
|
1505 |
-
};
|
1506 |
-
|
1507 |
-
// Manage autoplay via play/stop buttons
|
1508 |
-
Autoplay.prototype.controls = function() {
|
1509 |
-
var _this = this;
|
1510 |
-
var _html = '<span class="lg-autoplay-button lg-icon"></span>';
|
1511 |
-
|
1512 |
-
// Append autoplay controls
|
1513 |
-
$(this.core.s.appendAutoplayControlsTo).append(_html);
|
1514 |
-
|
1515 |
-
_this.core.$outer.find('.lg-autoplay-button').on('click.lg', function() {
|
1516 |
-
if ($(_this.core.$outer).hasClass('lg-show-autoplay')) {
|
1517 |
-
_this.cancelAuto();
|
1518 |
-
_this.core.s.fourceAutoplay = false;
|
1519 |
-
} else {
|
1520 |
-
if (!_this.interval) {
|
1521 |
-
_this.startlAuto();
|
1522 |
-
_this.core.s.fourceAutoplay =
|
1523 |
-
}
|
1524 |
-
}
|
1525 |
-
});
|
1526 |
-
};
|
1527 |
-
|
1528 |
-
// Autostart gallery
|
1529 |
-
Autoplay.prototype.startlAuto = function() {
|
1530 |
-
var _this = this;
|
1531 |
-
|
1532 |
-
_this.core.$outer.find('.lg-progress').css('transition', 'width ' + (_this.core.s.speed + _this.core.s.pause) + 'ms ease 0s');
|
1533 |
-
_this.core.$outer.addClass('lg-show-autoplay');
|
1534 |
-
_this.core.$outer.find('.lg-progress-bar').addClass('lg-start');
|
1535 |
-
|
1536 |
-
_this.interval = setInterval(function() {
|
1537 |
-
if (_this.core.index + 1 < _this.core.$items.length) {
|
1538 |
-
_this.core.index++;
|
1539 |
-
} else {
|
1540 |
-
_this.core.index = 0;
|
1541 |
-
}
|
1542 |
-
|
1543 |
-
_this.fromAuto = true;
|
1544 |
-
_this.core.slide(_this.core.index, false, false, 'next');
|
1545 |
-
}, _this.core.s.speed + _this.core.s.pause);
|
1546 |
-
};
|
1547 |
-
|
1548 |
-
// cancel Autostart
|
1549 |
-
Autoplay.prototype.cancelAuto = function() {
|
1550 |
-
clearInterval(this.interval);
|
1551 |
-
this.interval = false;
|
1552 |
-
this.core.$outer.find('.lg-progress').removeAttr('style');
|
1553 |
-
this.core.$outer.removeClass('lg-show-autoplay');
|
1554 |
-
this.core.$outer.find('.lg-progress-bar').removeClass('lg-start');
|
1555 |
-
};
|
1556 |
-
|
1557 |
-
Autoplay.prototype.destroy = function() {
|
1558 |
-
|
1559 |
-
this.cancelAuto();
|
1560 |
-
this.core.$outer.find('.lg-progress-bar').remove();
|
1561 |
-
};
|
1562 |
-
|
1563 |
-
$.fn.lightGallery.modules.autoplay = Autoplay;
|
1564 |
-
|
1565 |
-
})();
|
1566 |
-
|
1567 |
-
|
1568 |
-
}));
|
1569 |
-
|
1570 |
-
/*! lg-fullscreen - v1.1.0 - 2019-02-19
|
1571 |
-
* http://sachinchoolur.github.io/lightGallery
|
1572 |
-
* Copyright (c) 2019 Sachin N; Licensed GPLv3 */
|
1573 |
-
|
1574 |
-
(function (root, factory) {
|
1575 |
-
if (typeof define === 'function' && define.amd) {
|
1576 |
-
// AMD. Register as an anonymous module unless amdModuleId is set
|
1577 |
-
define(['jquery'], function (a0) {
|
1578 |
-
return (factory(a0));
|
1579 |
-
});
|
1580 |
-
} else if (typeof module === 'object' && module.exports) {
|
1581 |
-
// Node. Does not work with strict CommonJS, but
|
1582 |
-
// only CommonJS-like environments that support module.exports,
|
1583 |
-
// like Node.
|
1584 |
-
module.exports = factory(require('jquery'));
|
1585 |
-
} else {
|
1586 |
-
factory(root["jQuery"]);
|
1587 |
-
}
|
1588 |
-
}(this, function ($) {
|
1589 |
-
|
1590 |
-
(function() {
|
1591 |
-
|
1592 |
-
'use strict';
|
1593 |
-
|
1594 |
-
var defaults = {
|
1595 |
-
fullScreen: true
|
1596 |
-
};
|
1597 |
-
|
1598 |
-
function isFullScreen() {
|
1599 |
-
return (
|
1600 |
-
document.fullscreenElement ||
|
1601 |
-
document.mozFullScreenElement ||
|
1602 |
-
document.webkitFullscreenElement ||
|
1603 |
-
document.msFullscreenElement
|
1604 |
-
);
|
1605 |
-
}
|
1606 |
-
|
1607 |
-
var Fullscreen = function(element) {
|
1608 |
-
|
1609 |
-
// get lightGallery core plugin data
|
1610 |
-
this.core = $(element).data('lightGallery');
|
1611 |
-
|
1612 |
-
this.$el = $(element);
|
1613 |
-
|
1614 |
-
// extend module defalut settings with lightGallery core settings
|
1615 |
-
this.core.s = $.extend({}, defaults, this.core.s);
|
1616 |
-
|
1617 |
-
this.init();
|
1618 |
-
|
1619 |
-
return this;
|
1620 |
-
};
|
1621 |
-
|
1622 |
-
Fullscreen.prototype.init = function() {
|
1623 |
-
var fullScreen = '';
|
1624 |
-
if (this.core.s.fullScreen) {
|
1625 |
-
|
1626 |
-
// check for fullscreen browser support
|
1627 |
-
if (!document.fullscreenEnabled && !document.webkitFullscreenEnabled &&
|
1628 |
-
!document.mozFullScreenEnabled && !document.msFullscreenEnabled) {
|
1629 |
-
return;
|
1630 |
-
} else {
|
1631 |
-
fullScreen = '<span class="lg-fullscreen lg-icon"></span>';
|
1632 |
-
this.core.$outer.find('.lg-toolbar').append(fullScreen);
|
1633 |
-
this.fullScreen();
|
1634 |
-
}
|
1635 |
-
}
|
1636 |
-
};
|
1637 |
-
|
1638 |
-
Fullscreen.prototype.requestFullscreen = function() {
|
1639 |
-
var el = document.documentElement;
|
1640 |
-
if (el.requestFullscreen) {
|
1641 |
-
el.requestFullscreen();
|
1642 |
-
} else if (el.msRequestFullscreen) {
|
1643 |
-
el.msRequestFullscreen();
|
1644 |
-
} else if (el.mozRequestFullScreen) {
|
1645 |
-
el.mozRequestFullScreen();
|
1646 |
-
} else if (el.webkitRequestFullscreen) {
|
1647 |
-
el.webkitRequestFullscreen();
|
1648 |
-
}
|
1649 |
-
};
|
1650 |
-
|
1651 |
-
Fullscreen.prototype.exitFullscreen = function() {
|
1652 |
-
if (document.exitFullscreen) {
|
1653 |
-
document.exitFullscreen();
|
1654 |
-
} else if (document.msExitFullscreen) {
|
1655 |
-
document.msExitFullscreen();
|
1656 |
-
} else if (document.mozCancelFullScreen) {
|
1657 |
-
document.mozCancelFullScreen();
|
1658 |
-
} else if (document.webkitExitFullscreen) {
|
1659 |
-
document.webkitExitFullscreen();
|
1660 |
-
}
|
1661 |
-
};
|
1662 |
-
|
1663 |
-
// https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Using_full_screen_mode
|
1664 |
-
Fullscreen.prototype.fullScreen = function() {
|
1665 |
-
var _this = this;
|
1666 |
-
|
1667 |
-
$(document).on('fullscreenchange.lg webkitfullscreenchange.lg mozfullscreenchange.lg MSFullscreenChange.lg', function() {
|
1668 |
-
_this.core.$outer.toggleClass('lg-fullscreen-on');
|
1669 |
-
});
|
1670 |
-
|
1671 |
-
this.core.$outer.find('.lg-fullscreen').on('click.lg', function() {
|
1672 |
-
if (isFullScreen()) {
|
1673 |
-
_this.exitFullscreen();
|
1674 |
-
} else {
|
1675 |
-
_this.requestFullscreen();
|
1676 |
-
}
|
1677 |
-
});
|
1678 |
-
|
1679 |
-
};
|
1680 |
-
|
1681 |
-
Fullscreen.prototype.destroy = function() {
|
1682 |
-
|
1683 |
-
// exit from fullscreen if activated
|
1684 |
-
if(isFullScreen()) {
|
1685 |
-
this.exitFullscreen();
|
1686 |
-
}
|
1687 |
-
|
1688 |
-
$(document).off('fullscreenchange.lg webkitfullscreenchange.lg mozfullscreenchange.lg MSFullscreenChange.lg');
|
1689 |
-
};
|
1690 |
-
|
1691 |
-
$.fn.lightGallery.modules.fullscreen = Fullscreen;
|
1692 |
-
|
1693 |
-
})();
|
1694 |
-
|
1695 |
-
}));
|
1696 |
-
|
1697 |
-
/*! lg-zoom - v1.1.0 - 2017-08-08
|
1698 |
-
* http://sachinchoolur.github.io/lightGallery
|
1699 |
-
* Copyright (c) 2017 Sachin N; Licensed GPLv3 */
|
1700 |
-
|
1701 |
-
(function (root, factory) {
|
1702 |
-
if (typeof define === 'function' && define.amd) {
|
1703 |
-
// AMD. Register as an anonymous module unless amdModuleId is set
|
1704 |
-
define(['jquery'], function (a0) {
|
1705 |
-
return (factory(a0));
|
1706 |
-
});
|
1707 |
-
} else if (typeof exports === 'object') {
|
1708 |
-
// Node. Does not work with strict CommonJS, but
|
1709 |
-
// only CommonJS-like environments that support module.exports,
|
1710 |
-
// like Node.
|
1711 |
-
module.exports = factory(require('jquery'));
|
1712 |
-
} else {
|
1713 |
-
factory(jQuery);
|
1714 |
-
}
|
1715 |
-
}(this, function ($) {
|
1716 |
-
|
1717 |
-
(function() {
|
1718 |
-
|
1719 |
-
'use strict';
|
1720 |
-
|
1721 |
-
var getUseLeft = function() {
|
1722 |
-
var useLeft = false;
|
1723 |
-
var isChrome = navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);
|
1724 |
-
if (isChrome && parseInt(isChrome[2], 10) < 54) {
|
1725 |
-
useLeft = true;
|
1726 |
-
}
|
1727 |
-
|
1728 |
-
return useLeft;
|
1729 |
-
};
|
1730 |
-
|
1731 |
-
var defaults = {
|
1732 |
-
scale: 1,
|
1733 |
-
zoom: true,
|
1734 |
-
actualSize: true,
|
1735 |
-
enableZoomAfter: 300,
|
1736 |
-
useLeftForZoom: getUseLeft()
|
1737 |
-
};
|
1738 |
-
|
1739 |
-
var Zoom = function(element) {
|
1740 |
-
|
1741 |
-
this.core = $(element).data('lightGallery');
|
1742 |
-
|
1743 |
-
this.core.s = $.extend({}, defaults, this.core.s);
|
1744 |
-
|
1745 |
-
if (this.core.s.zoom && this.core.doCss()) {
|
1746 |
-
this.init();
|
1747 |
-
|
1748 |
-
// Store the zoomable timeout value just to clear it while closing
|
1749 |
-
this.zoomabletimeout = false;
|
1750 |
-
|
1751 |
-
// Set the initial value center
|
1752 |
-
this.pageX = $(window).width() / 2;
|
1753 |
-
this.pageY = ($(window).height() / 2) + $(window).scrollTop();
|
1754 |
-
}
|
1755 |
-
|
1756 |
-
return this;
|
1757 |
-
};
|
1758 |
-
|
1759 |
-
Zoom.prototype.init = function() {
|
1760 |
-
|
1761 |
-
var _this = this;
|
1762 |
-
var zoomIcons = '<span id="lg-zoom-in" class="lg-icon"></span><span id="lg-zoom-out" class="lg-icon"></span>';
|
1763 |
-
|
1764 |
-
if (_this.core.s.actualSize) {
|
1765 |
-
zoomIcons += '<span id="lg-actual-size" class="lg-icon"></span>';
|
1766 |
-
}
|
1767 |
-
|
1768 |
-
if (_this.core.s.useLeftForZoom) {
|
1769 |
-
_this.core.$outer.addClass('lg-use-left-for-zoom');
|
1770 |
-
} else {
|
1771 |
-
_this.core.$outer.addClass('lg-use-transition-for-zoom');
|
1772 |
-
}
|
1773 |
-
|
1774 |
-
this.core.$outer.find('.lg-toolbar').append(zoomIcons);
|
1775 |
-
|
1776 |
-
// Add zoomable class
|
1777 |
-
_this.core.$el.on('onSlideItemLoad.lg.tm.zoom', function(event, index, delay) {
|
1778 |
-
|
1779 |
-
// delay will be 0 except first time
|
1780 |
-
var _speed = _this.core.s.enableZoomAfter + delay;
|
1781 |
-
|
1782 |
-
// set _speed value 0 if gallery opened from direct url and if it is first slide
|
1783 |
-
if ($('body').hasClass('lg-from-hash') && delay) {
|
1784 |
-
|
1785 |
-
// will execute only once
|
1786 |
-
_speed = 0;
|
1787 |
-
} else {
|
1788 |
-
|
1789 |
-
// Remove lg-from-hash to enable starting animation.
|
1790 |
-
$('body').removeClass('lg-from-hash');
|
1791 |
-
}
|
1792 |
-
|
1793 |
-
_this.zoomabletimeout = setTimeout(function() {
|
1794 |
-
_this.core.$slide.eq(index).addClass('lg-zoomable');
|
1795 |
-
}, _speed + 30);
|
1796 |
-
});
|
1797 |
-
|
1798 |
-
var scale = 1;
|
1799 |
-
/**
|
1800 |
-
* @desc Image zoom
|
1801 |
-
* Translate the wrap and scale the image to get better user experience
|
1802 |
-
*
|
1803 |
-
* @param {String} scaleVal - Zoom decrement/increment value
|
1804 |
-
*/
|
1805 |
-
var zoom = function(scaleVal) {
|
1806 |
-
|
1807 |
-
var $image = _this.core.$outer.find('.lg-current .lg-image');
|
1808 |
-
var _x;
|
1809 |
-
var _y;
|
1810 |
-
|
1811 |
-
// Find offset manually to avoid issue after zoom
|
1812 |
-
var offsetX = ($(window).width() - $image.prop('offsetWidth')) / 2;
|
1813 |
-
var offsetY = (($(window).height() - $image.prop('offsetHeight')) / 2) + $(window).scrollTop();
|
1814 |
-
|
1815 |
-
_x = _this.pageX - offsetX;
|
1816 |
-
_y = _this.pageY - offsetY;
|
1817 |
-
|
1818 |
-
var x = (scaleVal - 1) * (_x);
|
1819 |
-
var y = (scaleVal - 1) * (_y);
|
1820 |
-
|
1821 |
-
$image.css('transform', 'scale3d(' + scaleVal + ', ' + scaleVal + ', 1)').attr('data-scale', scaleVal);
|
1822 |
-
|
1823 |
-
if (_this.core.s.useLeftForZoom) {
|
1824 |
-
$image.parent().css({
|
1825 |
-
left: -x + 'px',
|
1826 |
-
top: -y + 'px'
|
1827 |
-
}).attr('data-x', x).attr('data-y', y);
|
1828 |
-
} else {
|
1829 |
-
$image.parent().css('transform', 'translate3d(-' + x + 'px, -' + y + 'px, 0)').attr('data-x', x).attr('data-y', y);
|
1830 |
-
}
|
1831 |
-
};
|
1832 |
-
|
1833 |
-
var callScale = function() {
|
1834 |
-
if (scale > 1) {
|
1835 |
-
_this.core.$outer.addClass('lg-zoomed');
|
1836 |
-
} else {
|
1837 |
-
_this.resetZoom();
|
1838 |
-
}
|
1839 |
-
|
1840 |
-
if (scale < 1) {
|
1841 |
-
scale = 1;
|
1842 |
-
}
|
1843 |
-
|
1844 |
-
zoom(scale);
|
1845 |
-
};
|
1846 |
-
|
1847 |
-
var actualSize = function(event, $image, index, fromIcon) {
|
1848 |
-
var w = $image.prop('offsetWidth');
|
1849 |
-
var nw;
|
1850 |
-
if (_this.core.s.dynamic) {
|
1851 |
-
nw = _this.core.s.dynamicEl[index].width || $image[0].naturalWidth || w;
|
1852 |
-
} else {
|
1853 |
-
nw = _this.core.$items.eq(index).attr('data-width') || $image[0].naturalWidth || w;
|
1854 |
-
}
|
1855 |
-
|
1856 |
-
var _scale;
|
1857 |
-
|
1858 |
-
if (_this.core.$outer.hasClass('lg-zoomed')) {
|
1859 |
-
scale = 1;
|
1860 |
-
} else {
|
1861 |
-
if (nw > w) {
|
1862 |
-
_scale = nw / w;
|
1863 |
-
scale = _scale || 2;
|
1864 |
-
}
|
1865 |
-
}
|
1866 |
-
|
1867 |
-
if (fromIcon) {
|
1868 |
-
_this.pageX = $(window).width() / 2;
|
1869 |
-
_this.pageY = ($(window).height() / 2) + $(window).scrollTop();
|
1870 |
-
} else {
|
1871 |
-
_this.pageX = event.pageX || event.originalEvent.targetTouches[0].pageX;
|
1872 |
-
_this.pageY = event.pageY || event.originalEvent.targetTouches[0].pageY;
|
1873 |
-
}
|
1874 |
-
|
1875 |
-
callScale();
|
1876 |
-
setTimeout(function() {
|
1877 |
-
_this.core.$outer.removeClass('lg-grabbing').addClass('lg-grab');
|
1878 |
-
}, 10);
|
1879 |
-
};
|
1880 |
-
|
1881 |
-
var tapped = false;
|
1882 |
-
|
1883 |
-
// event triggered after appending slide content
|
1884 |
-
_this.core.$el.on('onAferAppendSlide.lg.tm.zoom', function(event, index) {
|
1885 |
-
|
1886 |
-
// Get the current element
|
1887 |
-
var $image = _this.core.$slide.eq(index).find('.lg-image');
|
1888 |
-
|
1889 |
-
$image.on('dblclick', function(event) {
|
1890 |
-
actualSize(event, $image, index);
|
1891 |
-
});
|
1892 |
-
|
1893 |
-
$image.on('touchstart', function(event) {
|
1894 |
-
if (!tapped) {
|
1895 |
-
tapped = setTimeout(function() {
|
1896 |
-
tapped = null;
|
1897 |
-
}, 300);
|
1898 |
-
} else {
|
1899 |
-
clearTimeout(tapped);
|
1900 |
-
tapped = null;
|
1901 |
-
actualSize(event, $image, index);
|
1902 |
-
}
|
1903 |
-
|
1904 |
-
event.preventDefault();
|
1905 |
-
});
|
1906 |
-
|
1907 |
-
});
|
1908 |
-
|
1909 |
-
// Update zoom on resize and orientationchange
|
1910 |
-
$(window).on('resize.lg.zoom scroll.lg.zoom orientationchange.lg.zoom', function() {
|
1911 |
-
_this.pageX = $(window).width() / 2;
|
1912 |
-
_this.pageY = ($(window).height() / 2) + $(window).scrollTop();
|
1913 |
-
zoom(scale);
|
1914 |
-
});
|
1915 |
-
|
1916 |
-
$('#lg-zoom-out').on('click.lg', function() {
|
1917 |
-
if (_this.core.$outer.find('.lg-current .lg-image').length) {
|
1918 |
-
scale -= _this.core.s.scale;
|
1919 |
-
callScale();
|
1920 |
-
}
|
1921 |
-
});
|
1922 |
-
|
1923 |
-
$('#lg-zoom-in').on('click.lg', function() {
|
1924 |
-
if (_this.core.$outer.find('.lg-current .lg-image').length) {
|
1925 |
-
scale += _this.core.s.scale;
|
1926 |
-
callScale();
|
1927 |
-
}
|
1928 |
-
});
|
1929 |
-
|
1930 |
-
$('#lg-actual-size').on('click.lg', function(event) {
|
1931 |
-
actualSize(event, _this.core.$slide.eq(_this.core.index).find('.lg-image'), _this.core.index, true);
|
1932 |
-
});
|
1933 |
-
|
1934 |
-
// Reset zoom on slide change
|
1935 |
-
_this.core.$el.on('onBeforeSlide.lg.tm', function() {
|
1936 |
-
scale = 1;
|
1937 |
-
_this.resetZoom();
|
1938 |
-
});
|
1939 |
-
|
1940 |
-
// Drag option after zoom
|
1941 |
-
_this.zoomDrag();
|
1942 |
-
|
1943 |
-
_this.zoomSwipe();
|
1944 |
-
|
1945 |
-
};
|
1946 |
-
|
1947 |
-
// Reset zoom effect
|
1948 |
-
Zoom.prototype.resetZoom = function() {
|
1949 |
-
this.core.$outer.removeClass('lg-zoomed');
|
1950 |
-
this.core.$slide.find('.lg-img-wrap').removeAttr('style data-x data-y');
|
1951 |
-
this.core.$slide.find('.lg-image').removeAttr('style data-scale');
|
1952 |
-
|
1953 |
-
// Reset pagx pagy values to center
|
1954 |
-
this.pageX = $(window).width() / 2;
|
1955 |
-
this.pageY = ($(window).height() / 2) + $(window).scrollTop();
|
1956 |
-
};
|
1957 |
-
|
1958 |
-
Zoom.prototype.zoomSwipe = function() {
|
1959 |
-
var _this = this;
|
1960 |
-
var startCoords = {};
|
1961 |
-
var endCoords = {};
|
1962 |
-
var isMoved = false;
|
1963 |
-
|
1964 |
-
// Allow x direction drag
|
1965 |
-
var allowX = false;
|
1966 |
-
|
1967 |
-
// Allow Y direction drag
|
1968 |
-
var allowY = false;
|
1969 |
-
|
1970 |
-
_this.core.$slide.on('touchstart.lg', function(e) {
|
1971 |
-
|
1972 |
-
if (_this.core.$outer.hasClass('lg-zoomed')) {
|
1973 |
-
var $image = _this.core.$slide.eq(_this.core.index).find('.lg-object');
|
1974 |
-
|
1975 |
-
allowY = $image.prop('offsetHeight') * $image.attr('data-scale') > _this.core.$outer.find('.lg').height();
|
1976 |
-
allowX = $image.prop('offsetWidth') * $image.attr('data-scale') > _this.core.$outer.find('.lg').width();
|
1977 |
-
if ((allowX || allowY)) {
|
1978 |
-
e.preventDefault();
|
1979 |
-
startCoords = {
|
1980 |
-
x: e.originalEvent.targetTouches[0].pageX,
|
1981 |
-
y: e.originalEvent.targetTouches[0].pageY
|
1982 |
-
};
|
1983 |
-
}
|
1984 |
-
}
|
1985 |
-
|
1986 |
-
});
|
1987 |
-
|
1988 |
-
_this.core.$slide.on('touchmove.lg', function(e) {
|
1989 |
-
|
1990 |
-
if (_this.core.$outer.hasClass('lg-zoomed')) {
|
1991 |
-
|
1992 |
-
var _$el = _this.core.$slide.eq(_this.core.index).find('.lg-img-wrap');
|
1993 |
-
var distanceX;
|
1994 |
-
var distanceY;
|
1995 |
-
|
1996 |
-
e.preventDefault();
|
1997 |
-
isMoved = true;
|
1998 |
-
|
1999 |
-
endCoords = {
|
2000 |
-
x: e.originalEvent.targetTouches[0].pageX,
|
2001 |
-
y: e.originalEvent.targetTouches[0].pageY
|
2002 |
-
};
|
2003 |
-
|
2004 |
-
// reset opacity and transition duration
|
2005 |
-
_this.core.$outer.addClass('lg-zoom-dragging');
|
2006 |
-
|
2007 |
-
if (allowY) {
|
2008 |
-
distanceY = (-Math.abs(_$el.attr('data-y'))) + (endCoords.y - startCoords.y);
|
2009 |
-
} else {
|
2010 |
-
distanceY = -Math.abs(_$el.attr('data-y'));
|
2011 |
-
}
|
2012 |
-
|
2013 |
-
if (allowX) {
|
2014 |
-
distanceX = (-Math.abs(_$el.attr('data-x'))) + (endCoords.x - startCoords.x);
|
2015 |
-
} else {
|
2016 |
-
distanceX = -Math.abs(_$el.attr('data-x'));
|
2017 |
-
}
|
2018 |
-
|
2019 |
-
if ((Math.abs(endCoords.x - startCoords.x) > 15) || (Math.abs(endCoords.y - startCoords.y) > 15)) {
|
2020 |
-
|
2021 |
-
if (_this.core.s.useLeftForZoom) {
|
2022 |
-
_$el.css({
|
2023 |
-
left: distanceX + 'px',
|
2024 |
-
top: distanceY + 'px'
|
2025 |
-
});
|
2026 |
-
} else {
|
2027 |
-
_$el.css('transform', 'translate3d(' + distanceX + 'px, ' + distanceY + 'px, 0)');
|
2028 |
-
}
|
2029 |
-
}
|
2030 |
-
|
2031 |
-
}
|
2032 |
-
|
2033 |
-
});
|
2034 |
-
|
2035 |
-
_this.core.$slide.on('touchend.lg', function() {
|
2036 |
-
if (_this.core.$outer.hasClass('lg-zoomed')) {
|
2037 |
-
if (isMoved) {
|
2038 |
-
isMoved = false;
|
2039 |
-
_this.core.$outer.removeClass('lg-zoom-dragging');
|
2040 |
-
_this.touchendZoom(startCoords, endCoords, allowX, allowY);
|
2041 |
-
|
2042 |
-
}
|
2043 |
-
}
|
2044 |
-
});
|
2045 |
-
|
2046 |
-
};
|
2047 |
-
|
2048 |
-
Zoom.prototype.zoomDrag = function() {
|
2049 |
-
|
2050 |
-
var _this = this;
|
2051 |
-
var startCoords = {};
|
2052 |
-
var endCoords = {};
|
2053 |
-
var isDraging = false;
|
2054 |
-
var isMoved = false;
|
2055 |
-
|
2056 |
-
// Allow x direction drag
|
2057 |
-
var allowX = false;
|
2058 |
-
|
2059 |
-
// Allow Y direction drag
|
2060 |
-
var allowY = false;
|
2061 |
-
|
2062 |
-
_this.core.$slide.on('mousedown.lg.zoom', function(e) {
|
2063 |
-
|
2064 |
-
// execute only on .lg-object
|
2065 |
-
var $image = _this.core.$slide.eq(_this.core.index).find('.lg-object');
|
2066 |
-
|
2067 |
-
allowY = $image.prop('offsetHeight') * $image.attr('data-scale') > _this.core.$outer.find('.lg').height();
|
2068 |
-
allowX = $image.prop('offsetWidth') * $image.attr('data-scale') > _this.core.$outer.find('.lg').width();
|
2069 |
-
|
2070 |
-
if (_this.core.$outer.hasClass('lg-zoomed')) {
|
2071 |
-
if ($(e.target).hasClass('lg-object') && (allowX || allowY)) {
|
2072 |
-
e.preventDefault();
|
2073 |
-
startCoords = {
|
2074 |
-
x: e.pageX,
|
2075 |
-
y: e.pageY
|
2076 |
-
};
|
2077 |
-
|
2078 |
-
isDraging = true;
|
2079 |
-
|
2080 |
-
// ** Fix for webkit cursor issue https://code.google.com/p/chromium/issues/detail?id=26723
|
2081 |
-
_this.core.$outer.scrollLeft += 1;
|
2082 |
-
_this.core.$outer.scrollLeft -= 1;
|
2083 |
-
|
2084 |
-
_this.core.$outer.removeClass('lg-grab').addClass('lg-grabbing');
|
2085 |
-
}
|
2086 |
-
}
|
2087 |
-
});
|
2088 |
-
|
2089 |
-
$(window).on('mousemove.lg.zoom', function(e) {
|
2090 |
-
if (isDraging) {
|
2091 |
-
var _$el = _this.core.$slide.eq(_this.core.index).find('.lg-img-wrap');
|
2092 |
-
var distanceX;
|
2093 |
-
var distanceY;
|
2094 |
-
|
2095 |
-
isMoved = true;
|
2096 |
-
endCoords = {
|
2097 |
-
x: e.pageX,
|
2098 |
-
y: e.pageY
|
2099 |
-
};
|
2100 |
-
|
2101 |
-
// reset opacity and transition duration
|
2102 |
-
_this.core.$outer.addClass('lg-zoom-dragging');
|
2103 |
-
|
2104 |
-
if (allowY) {
|
2105 |
-
distanceY = (-Math.abs(_$el.attr('data-y'))) + (endCoords.y - startCoords.y);
|
2106 |
-
} else {
|
2107 |
-
distanceY = -Math.abs(_$el.attr('data-y'));
|
2108 |
-
}
|
2109 |
-
|
2110 |
-
if (allowX) {
|
2111 |
-
distanceX = (-Math.abs(_$el.attr('data-x'))) + (endCoords.x - startCoords.x);
|
2112 |
-
} else {
|
2113 |
-
distanceX = -Math.abs(_$el.attr('data-x'));
|
2114 |
-
}
|
2115 |
-
|
2116 |
-
if (_this.core.s.useLeftForZoom) {
|
2117 |
-
_$el.css({
|
2118 |
-
left: distanceX + 'px',
|
2119 |
-
top: distanceY + 'px'
|
2120 |
-
});
|
2121 |
-
} else {
|
2122 |
-
_$el.css('transform', 'translate3d(' + distanceX + 'px, ' + distanceY + 'px, 0)');
|
2123 |
-
}
|
2124 |
-
}
|
2125 |
-
});
|
2126 |
-
|
2127 |
-
$(window).on('mouseup.lg.zoom', function(e) {
|
2128 |
-
|
2129 |
-
if (isDraging) {
|
2130 |
-
isDraging = false;
|
2131 |
-
_this.core.$outer.removeClass('lg-zoom-dragging');
|
2132 |
-
|
2133 |
-
// Fix for chrome mouse move on click
|
2134 |
-
if (isMoved && ((startCoords.x !== endCoords.x) || (startCoords.y !== endCoords.y))) {
|
2135 |
-
endCoords = {
|
2136 |
-
x: e.pageX,
|
2137 |
-
y: e.pageY
|
2138 |
-
};
|
2139 |
-
_this.touchendZoom(startCoords, endCoords, allowX, allowY);
|
2140 |
-
|
2141 |
-
}
|
2142 |
-
|
2143 |
-
isMoved = false;
|
2144 |
-
}
|
2145 |
-
|
2146 |
-
_this.core.$outer.removeClass('lg-grabbing').addClass('lg-grab');
|
2147 |
-
|
2148 |
-
});
|
2149 |
-
};
|
2150 |
-
|
2151 |
-
Zoom.prototype.touchendZoom = function(startCoords, endCoords, allowX, allowY) {
|
2152 |
-
|
2153 |
-
var _this = this;
|
2154 |
-
var _$el = _this.core.$slide.eq(_this.core.index).find('.lg-img-wrap');
|
2155 |
-
var $image = _this.core.$slide.eq(_this.core.index).find('.lg-object');
|
2156 |
-
var distanceX = (-Math.abs(_$el.attr('data-x'))) + (endCoords.x - startCoords.x);
|
2157 |
-
var distanceY = (-Math.abs(_$el.attr('data-y'))) + (endCoords.y - startCoords.y);
|
2158 |
-
var minY = (_this.core.$outer.find('.lg').height() - $image.prop('offsetHeight')) / 2;
|
2159 |
-
var maxY = Math.abs(($image.prop('offsetHeight') * Math.abs($image.attr('data-scale'))) - _this.core.$outer.find('.lg').height() + minY);
|
2160 |
-
var minX = (_this.core.$outer.find('.lg').width() - $image.prop('offsetWidth')) / 2;
|
2161 |
-
var maxX = Math.abs(($image.prop('offsetWidth') * Math.abs($image.attr('data-scale'))) - _this.core.$outer.find('.lg').width() + minX);
|
2162 |
-
|
2163 |
-
if ((Math.abs(endCoords.x - startCoords.x) > 15) || (Math.abs(endCoords.y - startCoords.y) > 15)) {
|
2164 |
-
if (allowY) {
|
2165 |
-
if (distanceY <= -maxY) {
|
2166 |
-
distanceY = -maxY;
|
2167 |
-
} else if (distanceY >= -minY) {
|
2168 |
-
distanceY = -minY;
|
2169 |
-
}
|
2170 |
-
}
|
2171 |
-
|
2172 |
-
if (allowX) {
|
2173 |
-
if (distanceX <= -maxX) {
|
2174 |
-
distanceX = -maxX;
|
2175 |
-
} else if (distanceX >= -minX) {
|
2176 |
-
distanceX = -minX;
|
2177 |
-
}
|
2178 |
-
}
|
2179 |
-
|
2180 |
-
if (allowY) {
|
2181 |
-
_$el.attr('data-y', Math.abs(distanceY));
|
2182 |
-
} else {
|
2183 |
-
distanceY = -Math.abs(_$el.attr('data-y'));
|
2184 |
-
}
|
2185 |
-
|
2186 |
-
if (allowX) {
|
2187 |
-
_$el.attr('data-x', Math.abs(distanceX));
|
2188 |
-
} else {
|
2189 |
-
distanceX = -Math.abs(_$el.attr('data-x'));
|
2190 |
-
}
|
2191 |
-
|
2192 |
-
if (_this.core.s.useLeftForZoom) {
|
2193 |
-
_$el.css({
|
2194 |
-
left: distanceX + 'px',
|
2195 |
-
top: distanceY + 'px'
|
2196 |
-
});
|
2197 |
-
} else {
|
2198 |
-
_$el.css('transform', 'translate3d(' + distanceX + 'px, ' + distanceY + 'px, 0)');
|
2199 |
-
}
|
2200 |
-
|
2201 |
-
}
|
2202 |
-
};
|
2203 |
-
|
2204 |
-
Zoom.prototype.destroy = function() {
|
2205 |
-
|
2206 |
-
var _this = this;
|
2207 |
-
|
2208 |
-
// Unbind all events added by lightGallery zoom plugin
|
2209 |
-
_this.core.$el.off('.lg.zoom');
|
2210 |
-
$(window).off('.lg.zoom');
|
2211 |
-
_this.core.$slide.off('.lg.zoom');
|
2212 |
-
_this.core.$el.off('.lg.tm.zoom');
|
2213 |
-
_this.resetZoom();
|
2214 |
-
clearTimeout(_this.zoomabletimeout);
|
2215 |
-
_this.zoomabletimeout = false;
|
2216 |
-
};
|
2217 |
-
|
2218 |
-
$.fn.lightGallery.modules.zoom = Zoom;
|
2219 |
-
|
2220 |
-
})();
|
2221 |
-
|
2222 |
-
|
2223 |
-
}));
|
2224 |
-
|
2225 |
-
/*! lg-share - v1.1.0 - 2017-10-03
|
2226 |
-
* http://sachinchoolur.github.io/lightGallery
|
2227 |
-
* Copyright (c) 2017 Sachin N; Licensed GPLv3 */
|
2228 |
-
|
2229 |
-
(function (root, factory) {
|
2230 |
-
if (typeof define === 'function' && define.amd) {
|
2231 |
-
// AMD. Register as an anonymous module unless amdModuleId is set
|
2232 |
-
define(['jquery'], function (a0) {
|
2233 |
-
return (factory(a0));
|
2234 |
-
});
|
2235 |
-
} else if (typeof exports === 'object') {
|
2236 |
-
// Node. Does not work with strict CommonJS, but
|
2237 |
-
// only CommonJS-like environments that support module.exports,
|
2238 |
-
// like Node.
|
2239 |
-
module.exports = factory(require('jquery'));
|
2240 |
-
} else {
|
2241 |
-
factory(jQuery);
|
2242 |
-
}
|
2243 |
-
}(this, function ($) {
|
2244 |
-
|
2245 |
-
(function() {
|
2246 |
-
|
2247 |
-
'use strict';
|
2248 |
-
|
2249 |
-
var defaults = {
|
2250 |
-
share: true,
|
2251 |
-
facebook: true,
|
2252 |
-
facebookDropdownText: 'Facebook',
|
2253 |
-
twitter: true,
|
2254 |
-
twitterDropdownText: 'Twitter',
|
2255 |
-
googlePlus: true,
|
2256 |
-
googlePlusDropdownText: 'GooglePlus',
|
2257 |
-
pinterest: true,
|
2258 |
-
pinterestDropdownText: 'Pinterest'
|
2259 |
-
};
|
2260 |
-
|
2261 |
-
var Share = function(element) {
|
2262 |
-
|
2263 |
-
this.core = $(element).data('lightGallery');
|
2264 |
-
|
2265 |
-
this.core.s = $.extend({}, defaults, this.core.s);
|
2266 |
-
if (this.core.s.share) {
|
2267 |
-
this.init();
|
2268 |
-
}
|
2269 |
-
|
2270 |
-
return this;
|
2271 |
-
};
|
2272 |
-
|
2273 |
-
Share.prototype.init = function() {
|
2274 |
-
var _this = this;
|
2275 |
-
var shareHtml = '<span id="lg-share" class="lg-icon">' +
|
2276 |
-
'<ul class="lg-dropdown" style="position: absolute;">';
|
2277 |
-
shareHtml += _this.core.s.facebook ? '<li><a id="lg-share-facebook" target="_blank"><span class="lg-icon"></span><span class="lg-dropdown-text">' + this.core.s.facebookDropdownText + '</span></a></li>' : '';
|
2278 |
-
shareHtml += _this.core.s.twitter ? '<li><a id="lg-share-twitter" target="_blank"><span class="lg-icon"></span><span class="lg-dropdown-text">' + this.core.s.twitterDropdownText + '</span></a></li>' : '';
|
2279 |
-
shareHtml += _this.core.s.googlePlus ? '<li><a id="lg-share-googleplus" target="_blank"><span class="lg-icon"></span><span class="lg-dropdown-text">' + this.core.s.googlePlusDropdownText + '</span></a></li>' : '';
|
2280 |
-
shareHtml += _this.core.s.pinterest ? '<li><a id="lg-share-pinterest" target="_blank"><span class="lg-icon"></span><span class="lg-dropdown-text">' + this.core.s.pinterestDropdownText + '</span></a></li>' : '';
|
2281 |
-
shareHtml += '</ul></span>';
|
2282 |
-
|
2283 |
-
this.core.$outer.find('.lg-toolbar').append(shareHtml);
|
2284 |
-
this.core.$outer.find('.lg').append('<div id="lg-dropdown-overlay"></div>');
|
2285 |
-
$('#lg-share').on('click.lg', function(){
|
2286 |
-
_this.core.$outer.toggleClass('lg-dropdown-active');
|
2287 |
-
});
|
2288 |
-
|
2289 |
-
$('#lg-dropdown-overlay').on('click.lg', function(){
|
2290 |
-
_this.core.$outer.removeClass('lg-dropdown-active');
|
2291 |
-
});
|
2292 |
-
|
2293 |
-
_this.core.$el.on('onAfterSlide.lg.tm', function(event, prevIndex, index) {
|
2294 |
-
|
2295 |
-
setTimeout(function() {
|
2296 |
-
|
2297 |
-
$('#lg-share-facebook').attr('href', 'https://www.facebook.com/sharer/sharer.php?u=' + (encodeURIComponent(_this.getSahreProps(index, 'facebookShareUrl') || window.location.href)));
|
2298 |
-
|
2299 |
-
$('#lg-share-twitter').attr('href', 'https://twitter.com/intent/tweet?text=' + _this.getSahreProps(index, 'tweetText') + '&url=' + (encodeURIComponent(_this.getSahreProps(index, 'twitterShareUrl') || window.location.href)));
|
2300 |
-
|
2301 |
-
$('#lg-share-googleplus').attr('href', 'https://plus.google.com/share?url=' + (encodeURIComponent(_this.getSahreProps(index, 'googleplusShareUrl') || window.location.href)));
|
2302 |
-
|
2303 |
-
$('#lg-share-pinterest').attr('href', 'http://www.pinterest.com/pin/create/button/?url=' + (encodeURIComponent(_this.getSahreProps(index, 'pinterestShareUrl') || window.location.href)) + '&media=' + encodeURIComponent(_this.getSahreProps(index, 'src')) + '&description=' + _this.getSahreProps(index, 'pinterestText'));
|
2304 |
-
|
2305 |
-
}, 100);
|
2306 |
-
});
|
2307 |
-
};
|
2308 |
-
|
2309 |
-
Share.prototype.getSahreProps = function(index, prop){
|
2310 |
-
var shareProp = '';
|
2311 |
-
if(this.core.s.dynamic) {
|
2312 |
-
shareProp = this.core.s.dynamicEl[index][prop];
|
2313 |
-
} else {
|
2314 |
-
var _href = this.core.$items.eq(index).attr('href');
|
2315 |
-
var _prop = this.core.$items.eq(index).data(prop);
|
2316 |
-
shareProp = prop === 'src' ? _href || _prop : _prop;
|
2317 |
-
}
|
2318 |
-
return shareProp;
|
2319 |
-
};
|
2320 |
-
|
2321 |
-
Share.prototype.destroy = function() {
|
2322 |
-
|
2323 |
-
};
|
2324 |
-
|
2325 |
-
$.fn.lightGallery.modules.share = Share;
|
2326 |
-
|
2327 |
-
})();
|
2328 |
-
|
2329 |
-
|
2330 |
-
|
2331 |
-
}));
|
2332 |
-
|
2333 |
-
/*! lg-hash - v1.0.4 - 2017-12-20
|
2334 |
-
* http://sachinchoolur.github.io/lightGallery
|
2335 |
-
* Copyright (c) 2017 Sachin N; Licensed GPLv3 */
|
2336 |
-
|
2337 |
-
(function (root, factory) {
|
2338 |
-
if (typeof define === 'function' && define.amd) {
|
2339 |
-
// AMD. Register as an anonymous module unless amdModuleId is set
|
2340 |
-
define(['jquery'], function (a0) {
|
2341 |
-
return (factory(a0));
|
2342 |
-
});
|
2343 |
-
} else if (typeof exports === 'object') {
|
2344 |
-
// Node. Does not work with strict CommonJS, but
|
2345 |
-
// only CommonJS-like environments that support module.exports,
|
2346 |
-
// like Node.
|
2347 |
-
module.exports = factory(require('jquery'));
|
2348 |
-
} else {
|
2349 |
-
factory(jQuery);
|
2350 |
-
}
|
2351 |
-
}(this, function ($) {
|
2352 |
-
|
2353 |
-
(function() {
|
2354 |
-
|
2355 |
-
'use strict';
|
2356 |
-
|
2357 |
-
var defaults = {
|
2358 |
-
hash: true
|
2359 |
-
};
|
2360 |
-
|
2361 |
-
var Hash = function(element) {
|
2362 |
-
|
2363 |
-
this.core = $(element).data('lightGallery');
|
2364 |
-
|
2365 |
-
this.core.s = $.extend({}, defaults, this.core.s);
|
2366 |
-
|
2367 |
-
if (this.core.s.hash) {
|
2368 |
-
this.oldHash = window.location.hash;
|
2369 |
-
this.init();
|
2370 |
-
}
|
2371 |
-
|
2372 |
-
return this;
|
2373 |
-
};
|
2374 |
-
|
2375 |
-
Hash.prototype.init = function() {
|
2376 |
-
var _this = this;
|
2377 |
-
var _hash;
|
2378 |
-
|
2379 |
-
// Change hash value on after each slide transition
|
2380 |
-
_this.core.$el.on('onAfterSlide.lg.tm', function(event, prevIndex, index) {
|
2381 |
-
if (history.replaceState) {
|
2382 |
-
history.replaceState(null, null, window.location.pathname + window.location.search + '#lg=' + _this.core.s.galleryId + '&slide=' + index);
|
2383 |
-
} else {
|
2384 |
-
window.location.hash = 'lg=' + _this.core.s.galleryId + '&slide=' + index;
|
2385 |
-
}
|
2386 |
-
});
|
2387 |
-
|
2388 |
-
// Listen hash change and change the slide according to slide value
|
2389 |
-
$(window).on('hashchange.lg.hash', function() {
|
2390 |
-
_hash = window.location.hash;
|
2391 |
-
var _idx = parseInt(_hash.split('&slide=')[1], 10);
|
2392 |
-
|
2393 |
-
// it galleryId doesn't exist in the url close the gallery
|
2394 |
-
if ((_hash.indexOf('lg=' + _this.core.s.galleryId) > -1)) {
|
2395 |
-
_this.core.slide(_idx, false, false);
|
2396 |
-
} else if (_this.core.lGalleryOn) {
|
2397 |
-
_this.core.destroy();
|
2398 |
-
}
|
2399 |
-
|
2400 |
-
});
|
2401 |
-
};
|
2402 |
-
|
2403 |
-
Hash.prototype.destroy = function() {
|
2404 |
-
|
2405 |
-
if (!this.core.s.hash) {
|
2406 |
-
return;
|
2407 |
-
}
|
2408 |
-
|
2409 |
-
// Reset to old hash value
|
2410 |
-
if (this.oldHash && this.oldHash.indexOf('lg=' + this.core.s.galleryId) < 0) {
|
2411 |
-
if (history.replaceState) {
|
2412 |
-
history.replaceState(null, null, this.oldHash);
|
2413 |
-
} else {
|
2414 |
-
window.location.hash = this.oldHash;
|
2415 |
-
}
|
2416 |
-
} else {
|
2417 |
-
if (history.replaceState) {
|
2418 |
-
history.replaceState(null, document.title, window.location.pathname + window.location.search);
|
2419 |
-
} else {
|
2420 |
-
window.location.hash = '';
|
2421 |
-
}
|
2422 |
-
}
|
2423 |
-
|
2424 |
-
this.core.$el.off('.lg.hash');
|
2425 |
-
|
2426 |
-
};
|
2427 |
-
|
2428 |
-
$.fn.lightGallery.modules.hash = Hash;
|
2429 |
-
|
2430 |
-
})();
|
2431 |
-
|
2432 |
-
|
2433 |
-
}));
|
2434 |
-
|
2435 |
-
/*! lg-thumbnail - v1.1.0 - 2017-08-08
|
2436 |
-
* http://sachinchoolur.github.io/lightGallery
|
2437 |
-
* Copyright (c) 2017 Sachin N; Licensed GPLv3 */
|
2438 |
-
|
2439 |
-
(function (root, factory) {
|
2440 |
-
if (typeof define === 'function' && define.amd) {
|
2441 |
-
// AMD. Register as an anonymous module unless amdModuleId is set
|
2442 |
-
define(['jquery'], function (a0) {
|
2443 |
-
return (factory(a0));
|
2444 |
-
});
|
2445 |
-
} else if (typeof exports === 'object') {
|
2446 |
-
// Node. Does not work with strict CommonJS, but
|
2447 |
-
// only CommonJS-like environments that support module.exports,
|
2448 |
-
// like Node.
|
2449 |
-
module.exports = factory(require('jquery'));
|
2450 |
-
} else {
|
2451 |
-
factory(jQuery);
|
2452 |
-
}
|
2453 |
-
}(this, function ($) {
|
2454 |
-
|
2455 |
-
(function() {
|
2456 |
-
|
2457 |
-
'use strict';
|
2458 |
-
|
2459 |
-
var defaults = {
|
2460 |
-
thumbnail: true,
|
2461 |
-
|
2462 |
-
animateThumb: true,
|
2463 |
-
currentPagerPosition: 'middle',
|
2464 |
-
|
2465 |
-
thumbWidth: 100,
|
2466 |
-
thumbHeight: '80px',
|
2467 |
-
thumbContHeight: 100,
|
2468 |
-
thumbMargin: 5,
|
2469 |
-
|
2470 |
-
exThumbImage: false,
|
2471 |
-
showThumbByDefault: true,
|
2472 |
-
toogleThumb: true,
|
2473 |
-
pullCaptionUp: true,
|
2474 |
-
|
2475 |
-
enableThumbDrag: true,
|
2476 |
-
enableThumbSwipe: true,
|
2477 |
-
swipeThreshold: 50,
|
2478 |
-
|
2479 |
-
loadYoutubeThumbnail: true,
|
2480 |
-
youtubeThumbSize: 1,
|
2481 |
-
|
2482 |
-
loadVimeoThumbnail: true,
|
2483 |
-
vimeoThumbSize: 'thumbnail_small',
|
2484 |
-
|
2485 |
-
loadDailymotionThumbnail: true
|
2486 |
-
};
|
2487 |
-
|
2488 |
-
var Thumbnail = function(element) {
|
2489 |
-
|
2490 |
-
// get lightGallery core plugin data
|
2491 |
-
this.core = $(element).data('lightGallery');
|
2492 |
-
|
2493 |
-
// extend module default settings with lightGallery core settings
|
2494 |
-
this.core.s = $.extend({}, defaults, this.core.s);
|
2495 |
-
|
2496 |
-
this.$el = $(element);
|
2497 |
-
this.$thumbOuter = null;
|
2498 |
-
this.thumbOuterWidth = 0;
|
2499 |
-
this.thumbTotalWidth = (this.core.$items.length * (this.core.s.thumbWidth + this.core.s.thumbMargin));
|
2500 |
-
this.thumbIndex = this.core.index;
|
2501 |
-
|
2502 |
-
if (this.core.s.animateThumb) {
|
2503 |
-
this.core.s.thumbHeight = '100%';
|
2504 |
-
}
|
2505 |
-
|
2506 |
-
// Thumbnail animation value
|
2507 |
-
this.left = 0;
|
2508 |
-
|
2509 |
-
this.init();
|
2510 |
-
|
2511 |
-
return this;
|
2512 |
-
};
|
2513 |
-
|
2514 |
-
Thumbnail.prototype.init = function() {
|
2515 |
-
var _this = this;
|
2516 |
-
if (this.core.s.thumbnail && this.core.$items.length > 1) {
|
2517 |
-
if (this.core.s.showThumbByDefault) {
|
2518 |
-
setTimeout(function(){
|
2519 |
-
_this.core.$outer.addClass('lg-thumb-open');
|
2520 |
-
}, 700);
|
2521 |
-
}
|
2522 |
-
|
2523 |
-
if (this.core.s.pullCaptionUp) {
|
2524 |
-
this.core.$outer.addClass('lg-pull-caption-up');
|
2525 |
-
}
|
2526 |
-
|
2527 |
-
this.build();
|
2528 |
-
if (this.core.s.animateThumb && this.core.doCss()) {
|
2529 |
-
if (this.core.s.enableThumbDrag) {
|
2530 |
-
this.enableThumbDrag();
|
2531 |
-
}
|
2532 |
-
|
2533 |
-
if (this.core.s.enableThumbSwipe) {
|
2534 |
-
this.enableThumbSwipe();
|
2535 |
-
}
|
2536 |
-
|
2537 |
-
this.thumbClickable = false;
|
2538 |
-
} else {
|
2539 |
-
this.thumbClickable = true;
|
2540 |
-
}
|
2541 |
-
|
2542 |
-
this.toogle();
|
2543 |
-
this.thumbkeyPress();
|
2544 |
-
}
|
2545 |
-
};
|
2546 |
-
|
2547 |
-
Thumbnail.prototype.build = function() {
|
2548 |
-
var _this = this;
|
2549 |
-
var thumbList = '';
|
2550 |
-
var vimeoErrorThumbSize = '';
|
2551 |
-
var $thumb;
|
2552 |
-
var html = '<div class="lg-thumb-outer">' +
|
2553 |
-
'<div class="lg-thumb lg-group">' +
|
2554 |
-
'</div>' +
|
2555 |
-
'</div>';
|
2556 |
-
|
2557 |
-
switch (this.core.s.vimeoThumbSize) {
|
2558 |
-
case 'thumbnail_large':
|
2559 |
-
vimeoErrorThumbSize = '640';
|
2560 |
-
break;
|
2561 |
-
case 'thumbnail_medium':
|
2562 |
-
vimeoErrorThumbSize = '200x150';
|
2563 |
-
break;
|
2564 |
-
case 'thumbnail_small':
|
2565 |
-
vimeoErrorThumbSize = '100x75';
|
2566 |
-
}
|
2567 |
-
|
2568 |
-
_this.core.$outer.addClass('lg-has-thumb');
|
2569 |
-
|
2570 |
-
_this.core.$outer.find('.lg').append(html);
|
2571 |
-
|
2572 |
-
_this.$thumbOuter = _this.core.$outer.find('.lg-thumb-outer');
|
2573 |
-
_this.thumbOuterWidth = _this.$thumbOuter.width();
|
2574 |
-
|
2575 |
-
if (_this.core.s.animateThumb) {
|
2576 |
-
_this.core.$outer.find('.lg-thumb').css({
|
2577 |
-
width: _this.thumbTotalWidth + 'px',
|
2578 |
-
position: 'relative'
|
2579 |
-
});
|
2580 |
-
}
|
2581 |
-
|
2582 |
-
if (this.core.s.animateThumb) {
|
2583 |
-
_this.$thumbOuter.css('height', _this.core.s.thumbContHeight + 'px');
|
2584 |
-
}
|
2585 |
-
|
2586 |
-
function getThumb(src, thumb, index) {
|
2587 |
-
var isVideo = _this.core.isVideo(src, index) || {};
|
2588 |
-
var thumbImg;
|
2589 |
-
var vimeoId = '';
|
2590 |
-
|
2591 |
-
if (isVideo.youtube || isVideo.vimeo || isVideo.dailymotion) {
|
2592 |
-
if (isVideo.youtube) {
|
2593 |
-
if (_this.core.s.loadYoutubeThumbnail) {
|
2594 |
-
thumbImg = '//img.youtube.com/vi/' + isVideo.youtube[1] + '/' + _this.core.s.youtubeThumbSize + '.jpg';
|
2595 |
-
} else {
|
2596 |
-
thumbImg = thumb;
|
2597 |
-
}
|
2598 |
-
} else if (isVideo.vimeo) {
|
2599 |
-
if (_this.core.s.loadVimeoThumbnail) {
|
2600 |
-
thumbImg = '//i.vimeocdn.com/video/error_' + vimeoErrorThumbSize + '.jpg';
|
2601 |
-
vimeoId = isVideo.vimeo[1];
|
2602 |
-
} else {
|
2603 |
-
thumbImg = thumb;
|
2604 |
-
}
|
2605 |
-
} else if (isVideo.dailymotion) {
|
2606 |
-
if (_this.core.s.loadDailymotionThumbnail) {
|
2607 |
-
thumbImg = '//www.dailymotion.com/thumbnail/video/' + isVideo.dailymotion[1];
|
2608 |
-
} else {
|
2609 |
-
thumbImg = thumb;
|
2610 |
-
}
|
2611 |
-
}
|
2612 |
-
} else {
|
2613 |
-
thumbImg = thumb;
|
2614 |
-
}
|
2615 |
-
|
2616 |
-
thumbList += '<div data-vimeo-id="' + vimeoId + '" class="lg-thumb-item" style="width:' + _this.core.s.thumbWidth + 'px; height: ' + _this.core.s.thumbHeight + '; margin-right: ' + _this.core.s.thumbMargin + 'px"><img src="' + thumbImg + '" /></div>';
|
2617 |
-
vimeoId = '';
|
2618 |
-
}
|
2619 |
-
|
2620 |
-
if (_this.core.s.dynamic) {
|
2621 |
-
for (var i = 0; i < _this.core.s.dynamicEl.length; i++) {
|
2622 |
-
getThumb(_this.core.s.dynamicEl[i].src, _this.core.s.dynamicEl[i].thumb, i);
|
2623 |
-
}
|
2624 |
-
} else {
|
2625 |
-
_this.core.$items.each(function(i) {
|
2626 |
-
|
2627 |
-
if (!_this.core.s.exThumbImage) {
|
2628 |
-
getThumb($(this).attr('href') || $(this).attr('data-src'), $(this).find('img').attr('src'), i);
|
2629 |
-
} else {
|
2630 |
-
getThumb($(this).attr('href') || $(this).attr('data-src'), $(this).attr(_this.core.s.exThumbImage), i);
|
2631 |
-
}
|
2632 |
-
|
2633 |
-
});
|
2634 |
-
}
|
2635 |
-
|
2636 |
-
_this.core.$outer.find('.lg-thumb').html(thumbList);
|
2637 |
-
|
2638 |
-
$thumb = _this.core.$outer.find('.lg-thumb-item');
|
2639 |
-
|
2640 |
-
// Load vimeo thumbnails
|
2641 |
-
$thumb.each(function() {
|
2642 |
-
var $this = $(this);
|
2643 |
-
var vimeoVideoId = $this.attr('data-vimeo-id');
|
2644 |
-
|
2645 |
-
if (vimeoVideoId) {
|
2646 |
-
$.getJSON('//www.vimeo.com/api/v2/video/' + vimeoVideoId + '.json?callback=?', {
|
2647 |
-
format: 'json'
|
2648 |
-
}, function(data) {
|
2649 |
-
$this.find('img').attr('src', data[0][_this.core.s.vimeoThumbSize]);
|
2650 |
-
});
|
2651 |
-
}
|
2652 |
-
});
|
2653 |
-
|
2654 |
-
// manage active class for thumbnail
|
2655 |
-
$thumb.eq(_this.core.index).addClass('active');
|
2656 |
-
_this.core.$el.on('onBeforeSlide.lg.tm', function() {
|
2657 |
-
$thumb.removeClass('active');
|
2658 |
-
$thumb.eq(_this.core.index).addClass('active');
|
2659 |
-
});
|
2660 |
-
|
2661 |
-
$thumb.on('click.lg touchend.lg', function() {
|
2662 |
-
var _$this = $(this);
|
2663 |
-
setTimeout(function() {
|
2664 |
-
|
2665 |
-
// In IE9 and bellow touch does not support
|
2666 |
-
// Go to slide if browser does not support css transitions
|
2667 |
-
if ((_this.thumbClickable && !_this.core.lgBusy) || !_this.core.doCss()) {
|
2668 |
-
_this.core.index = _$this.index();
|
2669 |
-
_this.core.slide(_this.core.index, false, true, false);
|
2670 |
-
}
|
2671 |
-
}, 50);
|
2672 |
-
});
|
2673 |
-
|
2674 |
-
_this.core.$el.on('onBeforeSlide.lg.tm', function() {
|
2675 |
-
_this.animateThumb(_this.core.index);
|
2676 |
-
});
|
2677 |
-
|
2678 |
-
$(window).on('resize.lg.thumb orientationchange.lg.thumb', function() {
|
2679 |
-
setTimeout(function() {
|
2680 |
-
_this.animateThumb(_this.core.index);
|
2681 |
-
_this.thumbOuterWidth = _this.$thumbOuter.width();
|
2682 |
-
}, 200);
|
2683 |
-
});
|
2684 |
-
|
2685 |
-
};
|
2686 |
-
|
2687 |
-
Thumbnail.prototype.setTranslate = function(value) {
|
2688 |
-
// jQuery supports Automatic CSS prefixing since jQuery 1.8.0
|
2689 |
-
this.core.$outer.find('.lg-thumb').css({
|
2690 |
-
transform: 'translate3d(-' + (value) + 'px, 0px, 0px)'
|
2691 |
-
});
|
2692 |
-
};
|
2693 |
-
|
2694 |
-
Thumbnail.prototype.animateThumb = function(index) {
|
2695 |
-
var $thumb = this.core.$outer.find('.lg-thumb');
|
2696 |
-
if (this.core.s.animateThumb) {
|
2697 |
-
var position;
|
2698 |
-
switch (this.core.s.currentPagerPosition) {
|
2699 |
-
case 'left':
|
2700 |
-
position = 0;
|
2701 |
-
break;
|
2702 |
-
case 'middle':
|
2703 |
-
position = (this.thumbOuterWidth / 2) - (this.core.s.thumbWidth / 2);
|
2704 |
-
break;
|
2705 |
-
case 'right':
|
2706 |
-
position = this.thumbOuterWidth - this.core.s.thumbWidth;
|
2707 |
-
}
|
2708 |
-
this.left = ((this.core.s.thumbWidth + this.core.s.thumbMargin) * index - 1) - position;
|
2709 |
-
if (this.left > (this.thumbTotalWidth - this.thumbOuterWidth)) {
|
2710 |
-
this.left = this.thumbTotalWidth - this.thumbOuterWidth;
|
2711 |
-
}
|
2712 |
-
|
2713 |
-
if (this.left < 0) {
|
2714 |
-
this.left = 0;
|
2715 |
-
}
|
2716 |
-
|
2717 |
-
if (this.core.lGalleryOn) {
|
2718 |
-
if (!$thumb.hasClass('on')) {
|
2719 |
-
this.core.$outer.find('.lg-thumb').css('transition-duration', this.core.s.speed + 'ms');
|
2720 |
-
}
|
2721 |
-
|
2722 |
-
if (!this.core.doCss()) {
|
2723 |
-
$thumb.animate({
|
2724 |
-
left: -this.left + 'px'
|
2725 |
-
}, this.core.s.speed);
|
2726 |
-
}
|
2727 |
-
} else {
|
2728 |
-
if (!this.core.doCss()) {
|
2729 |
-
$thumb.css('left', -this.left + 'px');
|
2730 |
-
}
|
2731 |
-
}
|
2732 |
-
|
2733 |
-
this.setTranslate(this.left);
|
2734 |
-
|
2735 |
-
}
|
2736 |
-
};
|
2737 |
-
|
2738 |
-
// Enable thumbnail dragging and swiping
|
2739 |
-
Thumbnail.prototype.enableThumbDrag = function() {
|
2740 |
-
|
2741 |
-
var _this = this;
|
2742 |
-
var startCoords = 0;
|
2743 |
-
var endCoords = 0;
|
2744 |
-
var isDraging = false;
|
2745 |
-
var isMoved = false;
|
2746 |
-
var tempLeft = 0;
|
2747 |
-
|
2748 |
-
_this.$thumbOuter.addClass('lg-grab');
|
2749 |
-
|
2750 |
-
_this.core.$outer.find('.lg-thumb').on('mousedown.lg.thumb', function(e) {
|
2751 |
-
if (_this.thumbTotalWidth > _this.thumbOuterWidth) {
|
2752 |
-
// execute only on .lg-object
|
2753 |
-
e.preventDefault();
|
2754 |
-
startCoords = e.pageX;
|
2755 |
-
isDraging = true;
|
2756 |
-
|
2757 |
-
// ** Fix for webkit cursor issue https://code.google.com/p/chromium/issues/detail?id=26723
|
2758 |
-
_this.core.$outer.scrollLeft += 1;
|
2759 |
-
_this.core.$outer.scrollLeft -= 1;
|
2760 |
-
|
2761 |
-
// *
|
2762 |
-
_this.thumbClickable = false;
|
2763 |
-
_this.$thumbOuter.removeClass('lg-grab').addClass('lg-grabbing');
|
2764 |
-
}
|
2765 |
-
});
|
2766 |
-
|
2767 |
-
$(window).on('mousemove.lg.thumb', function(e) {
|
2768 |
-
if (isDraging) {
|
2769 |
-
tempLeft = _this.left;
|
2770 |
-
isMoved = true;
|
2771 |
-
endCoords = e.pageX;
|
2772 |
-
|
2773 |
-
_this.$thumbOuter.addClass('lg-dragging');
|
2774 |
-
|
2775 |
-
tempLeft = tempLeft - (endCoords - startCoords);
|
2776 |
-
|
2777 |
-
if (tempLeft > (_this.thumbTotalWidth - _this.thumbOuterWidth)) {
|
2778 |
-
tempLeft = _this.thumbTotalWidth - _this.thumbOuterWidth;
|
2779 |
-
}
|
2780 |
-
|
2781 |
-
if (tempLeft < 0) {
|
2782 |
-
tempLeft = 0;
|
2783 |
-
}
|
2784 |
-
|
2785 |
-
// move current slide
|
2786 |
-
_this.setTranslate(tempLeft);
|
2787 |
-
|
2788 |
-
}
|
2789 |
-
});
|
2790 |
-
|
2791 |
-
$(window).on('mouseup.lg.thumb', function() {
|
2792 |
-
if (isMoved) {
|
2793 |
-
isMoved = false;
|
2794 |
-
_this.$thumbOuter.removeClass('lg-dragging');
|
2795 |
-
|
2796 |
-
_this.left = tempLeft;
|
2797 |
-
|
2798 |
-
if (Math.abs(endCoords - startCoords) < _this.core.s.swipeThreshold) {
|
2799 |
-
_this.thumbClickable = true;
|
2800 |
-
}
|
2801 |
-
|
2802 |
-
} else {
|
2803 |
-
_this.thumbClickable = true;
|
2804 |
-
}
|
2805 |
-
|
2806 |
-
if (isDraging) {
|
2807 |
-
isDraging = false;
|
2808 |
-
_this.$thumbOuter.removeClass('lg-grabbing').addClass('lg-grab');
|
2809 |
-
}
|
2810 |
-
});
|
2811 |
-
|
2812 |
-
};
|
2813 |
-
|
2814 |
-
Thumbnail.prototype.enableThumbSwipe = function() {
|
2815 |
-
var _this = this;
|
2816 |
-
var startCoords = 0;
|
2817 |
-
var endCoords = 0;
|
2818 |
-
var isMoved = false;
|
2819 |
-
var tempLeft = 0;
|
2820 |
-
|
2821 |
-
_this.core.$outer.find('.lg-thumb').on('touchstart.lg', function(e) {
|
2822 |
-
if (_this.thumbTotalWidth > _this.thumbOuterWidth) {
|
2823 |
-
e.preventDefault();
|
2824 |
-
startCoords = e.originalEvent.targetTouches[0].pageX;
|
2825 |
-
_this.thumbClickable = false;
|
2826 |
-
}
|
2827 |
-
});
|
2828 |
-
|
2829 |
-
_this.core.$outer.find('.lg-thumb').on('touchmove.lg', function(e) {
|
2830 |
-
if (_this.thumbTotalWidth > _this.thumbOuterWidth) {
|
2831 |
-
e.preventDefault();
|
2832 |
-
endCoords = e.originalEvent.targetTouches[0].pageX;
|
2833 |
-
isMoved = true;
|
2834 |
-
|
2835 |
-
_this.$thumbOuter.addClass('lg-dragging');
|
2836 |
-
|
2837 |
-
tempLeft = _this.left;
|
2838 |
-
|
2839 |
-
tempLeft = tempLeft - (endCoords - startCoords);
|
2840 |
-
|
2841 |
-
if (tempLeft > (_this.thumbTotalWidth - _this.thumbOuterWidth)) {
|
2842 |
-
tempLeft = _this.thumbTotalWidth - _this.thumbOuterWidth;
|
2843 |
-
}
|
2844 |
-
|
2845 |
-
if (tempLeft < 0) {
|
2846 |
-
tempLeft = 0;
|
2847 |
-
}
|
2848 |
-
|
2849 |
-
// move current slide
|
2850 |
-
_this.setTranslate(tempLeft);
|
2851 |
-
|
2852 |
-
}
|
2853 |
-
});
|
2854 |
-
|
2855 |
-
_this.core.$outer.find('.lg-thumb').on('touchend.lg', function() {
|
2856 |
-
if (_this.thumbTotalWidth > _this.thumbOuterWidth) {
|
2857 |
-
|
2858 |
-
if (isMoved) {
|
2859 |
-
isMoved = false;
|
2860 |
-
_this.$thumbOuter.removeClass('lg-dragging');
|
2861 |
-
if (Math.abs(endCoords - startCoords) < _this.core.s.swipeThreshold) {
|
2862 |
-
_this.thumbClickable = true;
|
2863 |
-
}
|
2864 |
-
|
2865 |
-
_this.left = tempLeft;
|
2866 |
-
} else {
|
2867 |
-
_this.thumbClickable = true;
|
2868 |
-
}
|
2869 |
-
} else {
|
2870 |
-
_this.thumbClickable = true;
|
2871 |
-
}
|
2872 |
-
});
|
2873 |
-
|
2874 |
-
};
|
2875 |
-
|
2876 |
-
Thumbnail.prototype.toogle = function() {
|
2877 |
-
var _this = this;
|
2878 |
-
if (_this.core.s.toogleThumb) {
|
2879 |
-
_this.core.$outer.addClass('lg-can-toggle');
|
2880 |
-
_this.$thumbOuter.append('<span class="lg-toogle-thumb lg-icon"></span>');
|
2881 |
-
_this.core.$outer.find('.lg-toogle-thumb').on('click.lg', function() {
|
2882 |
-
_this.core.$outer.toggleClass('lg-thumb-open');
|
2883 |
-
});
|
2884 |
-
}
|
2885 |
-
};
|
2886 |
-
|
2887 |
-
Thumbnail.prototype.thumbkeyPress = function() {
|
2888 |
-
var _this = this;
|
2889 |
-
$(window).on('keydown.lg.thumb', function(e) {
|
2890 |
-
if (e.keyCode === 38) {
|
2891 |
-
e.preventDefault();
|
2892 |
-
_this.core.$outer.addClass('lg-thumb-open');
|
2893 |
-
} else if (e.keyCode === 40) {
|
2894 |
-
e.preventDefault();
|
2895 |
-
_this.core.$outer.removeClass('lg-thumb-open');
|
2896 |
-
}
|
2897 |
-
});
|
2898 |
-
};
|
2899 |
-
|
2900 |
-
Thumbnail.prototype.destroy = function() {
|
2901 |
-
if (this.core.s.thumbnail && this.core.$items.length > 1) {
|
2902 |
-
$(window).off('resize.lg.thumb orientationchange.lg.thumb keydown.lg.thumb');
|
2903 |
-
this.$thumbOuter.remove();
|
2904 |
-
this.core.$outer.removeClass('lg-has-thumb');
|
2905 |
-
}
|
2906 |
-
};
|
2907 |
-
|
2908 |
-
$.fn.lightGallery.modules.Thumbnail = Thumbnail;
|
2909 |
-
|
2910 |
-
})();
|
2911 |
-
|
2912 |
-
}));
|
1 |
+
/*! lightgallery - v1.6.12 - 2019-02-19
|
2 |
+
* http://sachinchoolur.github.io/lightGallery/
|
3 |
+
* Copyright (c) 2019 Sachin N; Licensed GPLv3 */
|
4 |
+
(function (root, factory) {
|
5 |
+
if (typeof define === 'function' && define.amd) {
|
6 |
+
// AMD. Register as an anonymous module unless amdModuleId is set
|
7 |
+
define(['jquery'], function (a0) {
|
8 |
+
return (factory(a0));
|
9 |
+
});
|
10 |
+
} else if (typeof module === 'object' && module.exports) {
|
11 |
+
// Node. Does not work with strict CommonJS, but
|
12 |
+
// only CommonJS-like environments that support module.exports,
|
13 |
+
// like Node.
|
14 |
+
module.exports = factory(require('jquery'));
|
15 |
+
} else {
|
16 |
+
factory(root["jQuery"]);
|
17 |
+
}
|
18 |
+
}(this, function ($) {
|
19 |
+
|
20 |
+
(function() {
|
21 |
+
'use strict';
|
22 |
+
|
23 |
+
var defaults = {
|
24 |
+
|
25 |
+
mode: 'lg-slide',
|
26 |
+
|
27 |
+
// Ex : 'ease'
|
28 |
+
cssEasing: 'ease',
|
29 |
+
|
30 |
+
//'for jquery animation'
|
31 |
+
easing: 'linear',
|
32 |
+
speed: 600,
|
33 |
+
height: '100%',
|
34 |
+
width: '100%',
|
35 |
+
addClass: '',
|
36 |
+
startClass: 'lg-start-zoom',
|
37 |
+
backdropDuration: 150,
|
38 |
+
hideBarsDelay: 6000,
|
39 |
+
|
40 |
+
useLeft: false,
|
41 |
+
|
42 |
+
closable: true,
|
43 |
+
loop: true,
|
44 |
+
escKey: true,
|
45 |
+
keyPress: true,
|
46 |
+
controls: true,
|
47 |
+
slideEndAnimatoin: true,
|
48 |
+
hideControlOnEnd: false,
|
49 |
+
mousewheel: true,
|
50 |
+
|
51 |
+
getCaptionFromTitleOrAlt: true,
|
52 |
+
|
53 |
+
// .lg-item || '.lg-sub-html'
|
54 |
+
appendSubHtmlTo: '.lg-sub-html',
|
55 |
+
|
56 |
+
subHtmlSelectorRelative: false,
|
57 |
+
|
58 |
+
/**
|
59 |
+
* @desc number of preload slides
|
60 |
+
* will exicute only after the current slide is fully loaded.
|
61 |
+
*
|
62 |
+
* @ex you clicked on 4th image and if preload = 1 then 3rd slide and 5th
|
63 |
+
* slide will be loaded in the background after the 4th slide is fully loaded..
|
64 |
+
* if preload is 2 then 2nd 3rd 5th 6th slides will be preloaded.. ... ...
|
65 |
+
*
|
66 |
+
*/
|
67 |
+
preload: 1,
|
68 |
+
showAfterLoad: true,
|
69 |
+
selector: '',
|
70 |
+
selectWithin: '',
|
71 |
+
nextHtml: '',
|
72 |
+
prevHtml: '',
|
73 |
+
|
74 |
+
// 0, 1
|
75 |
+
index: false,
|
76 |
+
|
77 |
+
iframeMaxWidth: '100%',
|
78 |
+
|
79 |
+
download: true,
|
80 |
+
counter: true,
|
81 |
+
appendCounterTo: '.lg-toolbar',
|
82 |
+
|
83 |
+
swipeThreshold: 50,
|
84 |
+
enableSwipe: true,
|
85 |
+
enableDrag: true,
|
86 |
+
|
87 |
+
dynamic: false,
|
88 |
+
dynamicEl: [],
|
89 |
+
galleryId: 1
|
90 |
+
};
|
91 |
+
|
92 |
+
function Plugin(element, options) {
|
93 |
+
|
94 |
+
// Current lightGallery element
|
95 |
+
this.el = element;
|
96 |
+
|
97 |
+
// Current jquery element
|
98 |
+
this.$el = $(element);
|
99 |
+
|
100 |
+
// lightGallery settings
|
101 |
+
this.s = $.extend({}, defaults, options);
|
102 |
+
|
103 |
+
// When using dynamic mode, ensure dynamicEl is an array
|
104 |
+
if (this.s.dynamic && this.s.dynamicEl !== 'undefined' && this.s.dynamicEl.constructor === Array && !this.s.dynamicEl.length) {
|
105 |
+
throw ('When using dynamic mode, you must also define dynamicEl as an Array.');
|
106 |
+
}
|
107 |
+
|
108 |
+
// lightGallery modules
|
109 |
+
this.modules = {};
|
110 |
+
|
111 |
+
// false when lightgallery complete first slide;
|
112 |
+
this.lGalleryOn = false;
|
113 |
+
|
114 |
+
this.lgBusy = false;
|
115 |
+
|
116 |
+
// Timeout function for hiding controls;
|
117 |
+
this.hideBartimeout = false;
|
118 |
+
|
119 |
+
// To determine browser supports for touch events;
|
120 |
+
this.isTouch = ('ontouchstart' in document.documentElement);
|
121 |
+
|
122 |
+
// Disable hideControlOnEnd if sildeEndAnimation is true
|
123 |
+
if (this.s.slideEndAnimatoin) {
|
124 |
+
this.s.hideControlOnEnd = false;
|
125 |
+
}
|
126 |
+
|
127 |
+
// Gallery items
|
128 |
+
if (this.s.dynamic) {
|
129 |
+
this.$items = this.s.dynamicEl;
|
130 |
+
} else {
|
131 |
+
if (this.s.selector === 'this') {
|
132 |
+
this.$items = this.$el;
|
133 |
+
} else if (this.s.selector !== '') {
|
134 |
+
if (this.s.selectWithin) {
|
135 |
+
this.$items = $(this.s.selectWithin).find(this.s.selector);
|
136 |
+
} else {
|
137 |
+
this.$items = this.$el.find($(this.s.selector));
|
138 |
+
}
|
139 |
+
} else {
|
140 |
+
this.$items = this.$el.children();
|
141 |
+
}
|
142 |
+
}
|
143 |
+
|
144 |
+
// .lg-item
|
145 |
+
this.$slide = '';
|
146 |
+
|
147 |
+
// .lg-outer
|
148 |
+
this.$outer = '';
|
149 |
+
|
150 |
+
this.init();
|
151 |
+
|
152 |
+
return this;
|
153 |
+
}
|
154 |
+
|
155 |
+
Plugin.prototype.init = function() {
|
156 |
+
|
157 |
+
var _this = this;
|
158 |
+
|
159 |
+
// s.preload should not be more than $item.length
|
160 |
+
if (_this.s.preload > _this.$items.length) {
|
161 |
+
_this.s.preload = _this.$items.length;
|
162 |
+
}
|
163 |
+
|
164 |
+
// if dynamic option is enabled execute immediately
|
165 |
+
var _hash = window.location.hash;
|
166 |
+
if (_hash.indexOf('lg=' + this.s.galleryId) > 0) {
|
167 |
+
|
168 |
+
_this.index = parseInt(_hash.split('&slide=')[1], 10);
|
169 |
+
|
170 |
+
$('body').addClass('lg-from-hash');
|
171 |
+
if (!$('body').hasClass('lg-on')) {
|
172 |
+
setTimeout(function() {
|
173 |
+
_this.build(_this.index);
|
174 |
+
});
|
175 |
+
|
176 |
+
$('body').addClass('lg-on');
|
177 |
+
}
|
178 |
+
}
|
179 |
+
|
180 |
+
if (_this.s.dynamic) {
|
181 |
+
|
182 |
+
_this.$el.trigger('onBeforeOpen.lg');
|
183 |
+
|
184 |
+
_this.index = _this.s.index || 0;
|
185 |
+
|
186 |
+
// prevent accidental double execution
|
187 |
+
if (!$('body').hasClass('lg-on')) {
|
188 |
+
setTimeout(function() {
|
189 |
+
_this.build(_this.index);
|
190 |
+
$('body').addClass('lg-on');
|
191 |
+
});
|
192 |
+
}
|
193 |
+
} else {
|
194 |
+
|
195 |
+
// Using different namespace for click because click event should not unbind if selector is same object('this')
|
196 |
+
_this.$items.on('click.lgcustom', function(event) {
|
197 |
+
|
198 |
+
// For IE8
|
199 |
+
try {
|
200 |
+
event.preventDefault();
|
201 |
+
event.preventDefault();
|
202 |
+
} catch (er) {
|
203 |
+
event.returnValue = false;
|
204 |
+
}
|
205 |
+
|
206 |
+
_this.$el.trigger('onBeforeOpen.lg');
|
207 |
+
|
208 |
+
_this.index = _this.s.index || _this.$items.index(this);
|
209 |
+
|
210 |
+
// prevent accidental double execution
|
211 |
+
if (!$('body').hasClass('lg-on')) {
|
212 |
+
_this.build(_this.index);
|
213 |
+
$('body').addClass('lg-on');
|
214 |
+
}
|
215 |
+
});
|
216 |
+
}
|
217 |
+
|
218 |
+
};
|
219 |
+
|
220 |
+
Plugin.prototype.build = function(index) {
|
221 |
+
|
222 |
+
var _this = this;
|
223 |
+
|
224 |
+
_this.structure();
|
225 |
+
|
226 |
+
// module constructor
|
227 |
+
$.each($.fn.lightGallery.modules, function(key) {
|
228 |
+
_this.modules[key] = new $.fn.lightGallery.modules[key](_this.el);
|
229 |
+
});
|
230 |
+
|
231 |
+
// initiate slide function
|
232 |
+
_this.slide(index, false, false, false);
|
233 |
+
|
234 |
+
if (_this.s.keyPress) {
|
235 |
+
_this.keyPress();
|
236 |
+
}
|
237 |
+
|
238 |
+
if (_this.$items.length > 1) {
|
239 |
+
|
240 |
+
_this.arrow();
|
241 |
+
|
242 |
+
setTimeout(function() {
|
243 |
+
_this.enableDrag();
|
244 |
+
_this.enableSwipe();
|
245 |
+
}, 50);
|
246 |
+
|
247 |
+
if (_this.s.mousewheel) {
|
248 |
+
_this.mousewheel();
|
249 |
+
}
|
250 |
+
} else {
|
251 |
+
_this.$slide.on('click.lg', function() {
|
252 |
+
_this.$el.trigger('onSlideClick.lg');
|
253 |
+
});
|
254 |
+
}
|
255 |
+
|
256 |
+
_this.counter();
|
257 |
+
|
258 |
+
_this.closeGallery();
|
259 |
+
|
260 |
+
_this.$el.trigger('onAfterOpen.lg');
|
261 |
+
|
262 |
+
// Hide controllers if mouse doesn't move for some period
|
263 |
+
_this.$outer.on('mousemove.lg click.lg touchstart.lg', function() {
|
264 |
+
|
265 |
+
_this.$outer.removeClass('lg-hide-items');
|
266 |
+
|
267 |
+
clearTimeout(_this.hideBartimeout);
|
268 |
+
|
269 |
+
// Timeout will be cleared on each slide movement also
|
270 |
+
_this.hideBartimeout = setTimeout(function() {
|
271 |
+
_this.$outer.addClass('lg-hide-items');
|
272 |
+
}, _this.s.hideBarsDelay);
|
273 |
+
|
274 |
+
});
|
275 |
+
|
276 |
+
_this.$outer.trigger('mousemove.lg');
|
277 |
+
|
278 |
+
};
|
279 |
+
|
280 |
+
Plugin.prototype.structure = function() {
|
281 |
+
var list = '';
|
282 |
+
var controls = '';
|
283 |
+
var i = 0;
|
284 |
+
var subHtmlCont = '';
|
285 |
+
var template;
|
286 |
+
var _this = this;
|
287 |
+
|
288 |
+
$('body').append('<div class="lg-backdrop"></div>');
|
289 |
+
$('.lg-backdrop').css('transition-duration', this.s.backdropDuration + 'ms');
|
290 |
+
|
291 |
+
// Create gallery items
|
292 |
+
for (i = 0; i < this.$items.length; i++) {
|
293 |
+
list += '<div class="lg-item"></div>';
|
294 |
+
}
|
295 |
+
|
296 |
+
// Create controlls
|
297 |
+
if (this.s.controls && this.$items.length > 1) {
|
298 |
+
controls = '<div class="lg-actions">' +
|
299 |
+
'<button class="lg-prev lg-icon">' + this.s.prevHtml + '</button>' +
|
300 |
+
'<button class="lg-next lg-icon">' + this.s.nextHtml + '</button>' +
|
301 |
+
'</div>';
|
302 |
+
}
|
303 |
+
|
304 |
+
if (this.s.appendSubHtmlTo === '.lg-sub-html') {
|
305 |
+
subHtmlCont = '<div class="lg-sub-html"></div>';
|
306 |
+
}
|
307 |
+
|
308 |
+
template = '<div class="lg-outer ' + this.s.addClass + ' ' + this.s.startClass + '">' +
|
309 |
+
'<div class="lg" style="width:' + this.s.width + '; height:' + this.s.height + '">' +
|
310 |
+
'<div class="lg-inner">' + list + '</div>' +
|
311 |
+
'<div class="lg-toolbar lg-group">' +
|
312 |
+
'<span class="lg-close lg-icon"></span>' +
|
313 |
+
'</div>' +
|
314 |
+
controls +
|
315 |
+
subHtmlCont +
|
316 |
+
'</div>' +
|
317 |
+
'</div>';
|
318 |
+
|
319 |
+
$('body').append(template);
|
320 |
+
this.$outer = $('.lg-outer');
|
321 |
+
this.$slide = this.$outer.find('.lg-item');
|
322 |
+
|
323 |
+
if (this.s.useLeft) {
|
324 |
+
this.$outer.addClass('lg-use-left');
|
325 |
+
|
326 |
+
// Set mode lg-slide if use left is true;
|
327 |
+
this.s.mode = 'lg-slide';
|
328 |
+
} else {
|
329 |
+
this.$outer.addClass('lg-use-css3');
|
330 |
+
}
|
331 |
+
|
332 |
+
// For fixed height gallery
|
333 |
+
_this.setTop();
|
334 |
+
$(window).on('resize.lg orientationchange.lg', function() {
|
335 |
+
setTimeout(function() {
|
336 |
+
_this.setTop();
|
337 |
+
}, 100);
|
338 |
+
});
|
339 |
+
|
340 |
+
// add class lg-current to remove initial transition
|
341 |
+
this.$slide.eq(this.index).addClass('lg-current');
|
342 |
+
|
343 |
+
// add Class for css support and transition mode
|
344 |
+
if (this.doCss()) {
|
345 |
+
this.$outer.addClass('lg-css3');
|
346 |
+
} else {
|
347 |
+
this.$outer.addClass('lg-css');
|
348 |
+
|
349 |
+
// Set speed 0 because no animation will happen if browser doesn't support css3
|
350 |
+
this.s.speed = 0;
|
351 |
+
}
|
352 |
+
|
353 |
+
this.$outer.addClass(this.s.mode);
|
354 |
+
|
355 |
+
if (this.s.enableDrag && this.$items.length > 1) {
|
356 |
+
this.$outer.addClass('lg-grab');
|
357 |
+
}
|
358 |
+
|
359 |
+
if (this.s.showAfterLoad) {
|
360 |
+
this.$outer.addClass('lg-show-after-load');
|
361 |
+
}
|
362 |
+
|
363 |
+
if (this.doCss()) {
|
364 |
+
var $inner = this.$outer.find('.lg-inner');
|
365 |
+
$inner.css('transition-timing-function', this.s.cssEasing);
|
366 |
+
$inner.css('transition-duration', this.s.speed + 'ms');
|
367 |
+
}
|
368 |
+
|
369 |
+
setTimeout(function() {
|
370 |
+
$('.lg-backdrop').addClass('in');
|
371 |
+
});
|
372 |
+
|
373 |
+
setTimeout(function() {
|
374 |
+
_this.$outer.addClass('lg-visible');
|
375 |
+
}, this.s.backdropDuration);
|
376 |
+
|
377 |
+
if (this.s.download) {
|
378 |
+
this.$outer.find('.lg-toolbar').append('<a id="lg-download" target="_blank" download class="lg-download lg-icon"></a>');
|
379 |
+
}
|
380 |
+
|
381 |
+
// Store the current scroll top value to scroll back after closing the gallery..
|
382 |
+
this.prevScrollTop = $(window).scrollTop();
|
383 |
+
|
384 |
+
};
|
385 |
+
|
386 |
+
// For fixed height gallery
|
387 |
+
Plugin.prototype.setTop = function() {
|
388 |
+
if (this.s.height !== '100%') {
|
389 |
+
var wH = $(window).height();
|
390 |
+
var top = (wH - parseInt(this.s.height, 10)) / 2;
|
391 |
+
var $lGallery = this.$outer.find('.lg');
|
392 |
+
if (wH >= parseInt(this.s.height, 10)) {
|
393 |
+
$lGallery.css('top', top + 'px');
|
394 |
+
} else {
|
395 |
+
$lGallery.css('top', '0px');
|
396 |
+
}
|
397 |
+
}
|
398 |
+
};
|
399 |
+
|
400 |
+
// Find css3 support
|
401 |
+
Plugin.prototype.doCss = function() {
|
402 |
+
// check for css animation support
|
403 |
+
var support = function() {
|
404 |
+
var transition = ['transition', 'MozTransition', 'WebkitTransition', 'OTransition', 'msTransition', 'KhtmlTransition'];
|
405 |
+
var root = document.documentElement;
|
406 |
+
var i = 0;
|
407 |
+
for (i = 0; i < transition.length; i++) {
|
408 |
+
if (transition[i] in root.style) {
|
409 |
+
return true;
|
410 |
+
}
|
411 |
+
}
|
412 |
+
};
|
413 |
+
|
414 |
+
if (support()) {
|
415 |
+
return true;
|
416 |
+
}
|
417 |
+
|
418 |
+
return false;
|
419 |
+
};
|
420 |
+
|
421 |
+
/**
|
422 |
+
* @desc Check the given src is video
|
423 |
+
* @param {String} src
|
424 |
+
* @return {Object} video type
|
425 |
+
* Ex:{ youtube : ["//www.youtube.com/watch?v=c0asJgSyxcY", "c0asJgSyxcY"] }
|
426 |
+
*/
|
427 |
+
Plugin.prototype.isVideo = function(src, index) {
|
428 |
+
|
429 |
+
var html;
|
430 |
+
if (this.s.dynamic) {
|
431 |
+
html = this.s.dynamicEl[index].html;
|
432 |
+
} else {
|
433 |
+
html = this.$items.eq(index).attr('data-html');
|
434 |
+
}
|
435 |
+
|
436 |
+
if (!src) {
|
437 |
+
if(html) {
|
438 |
+
return {
|
439 |
+
html5: true
|
440 |
+
};
|
441 |
+
} else {
|
442 |
+
console.error('lightGallery :- data-src is not pvovided on slide item ' + (index + 1) + '. Please make sure the selector property is properly configured. More info - http://sachinchoolur.github.io/lightGallery/demos/html-markup.html');
|
443 |
+
return false;
|
444 |
+
}
|
445 |
+
}
|
446 |
+
|
447 |
+
var youtube = src.match(/\/\/(?:www\.)?youtu(?:\.be|be\.com|be-nocookie\.com)\/(?:watch\?v=|embed\/)?([a-z0-9\-\_\%]+)/i);
|
448 |
+
var vimeo = src.match(/\/\/(?:www\.)?vimeo.com\/([0-9a-z\-_]+)/i);
|
449 |
+
var dailymotion = src.match(/\/\/(?:www\.)?dai.ly\/([0-9a-z\-_]+)/i);
|
450 |
+
var vk = src.match(/\/\/(?:www\.)?(?:vk\.com|vkontakte\.ru)\/(?:video_ext\.php\?)(.*)/i);
|
451 |
+
|
452 |
+
if (youtube) {
|
453 |
+
return {
|
454 |
+
youtube: youtube
|
455 |
+
};
|
456 |
+
} else if (vimeo) {
|
457 |
+
return {
|
458 |
+
vimeo: vimeo
|
459 |
+
};
|
460 |
+
} else if (dailymotion) {
|
461 |
+
return {
|
462 |
+
dailymotion: dailymotion
|
463 |
+
};
|
464 |
+
} else if (vk) {
|
465 |
+
return {
|
466 |
+
vk: vk
|
467 |
+
};
|
468 |
+
}
|
469 |
+
};
|
470 |
+
|
471 |
+
/**
|
472 |
+
* @desc Create image counter
|
473 |
+
* Ex: 1/10
|
474 |
+
*/
|
475 |
+
Plugin.prototype.counter = function() {
|
476 |
+
if (this.s.counter) {
|
477 |
+
$(this.s.appendCounterTo).append('<div id="lg-counter"><span id="lg-counter-current">' + (parseInt(this.index, 10) + 1) + '</span> / <span id="lg-counter-all">' + this.$items.length + '</span></div>');
|
478 |
+
}
|
479 |
+
};
|
480 |
+
|
481 |
+
/**
|
482 |
+
* @desc add sub-html into the slide
|
483 |
+
* @param {Number} index - index of the slide
|
484 |
+
*/
|
485 |
+
Plugin.prototype.addHtml = function(index) {
|
486 |
+
var subHtml = null;
|
487 |
+
var subHtmlUrl;
|
488 |
+
var $currentEle;
|
489 |
+
if (this.s.dynamic) {
|
490 |
+
if (this.s.dynamicEl[index].subHtmlUrl) {
|
491 |
+
subHtmlUrl = this.s.dynamicEl[index].subHtmlUrl;
|
492 |
+
} else {
|
493 |
+
subHtml = this.s.dynamicEl[index].subHtml;
|
494 |
+
}
|
495 |
+
} else {
|
496 |
+
$currentEle = this.$items.eq(index);
|
497 |
+
if ($currentEle.attr('data-sub-html-url')) {
|
498 |
+
subHtmlUrl = $currentEle.attr('data-sub-html-url');
|
499 |
+
} else {
|
500 |
+
subHtml = $currentEle.attr('data-sub-html');
|
501 |
+
if (this.s.getCaptionFromTitleOrAlt && !subHtml) {
|
502 |
+
subHtml = $currentEle.attr('title') || $currentEle.find('img').first().attr('alt');
|
503 |
+
}
|
504 |
+
}
|
505 |
+
}
|
506 |
+
|
507 |
+
if (!subHtmlUrl) {
|
508 |
+
if (typeof subHtml !== 'undefined' && subHtml !== null) {
|
509 |
+
|
510 |
+
// get first letter of subhtml
|
511 |
+
// if first letter starts with . or # get the html form the jQuery object
|
512 |
+
var fL = subHtml.substring(0, 1);
|
513 |
+
if (fL === '.' || fL === '#') {
|
514 |
+
if (this.s.subHtmlSelectorRelative && !this.s.dynamic) {
|
515 |
+
subHtml = $currentEle.find(subHtml).html();
|
516 |
+
} else {
|
517 |
+
subHtml = $(subHtml).html();
|
518 |
+
}
|
519 |
+
}
|
520 |
+
} else {
|
521 |
+
subHtml = '';
|
522 |
+
}
|
523 |
+
}
|
524 |
+
|
525 |
+
if (this.s.appendSubHtmlTo === '.lg-sub-html') {
|
526 |
+
|
527 |
+
if (subHtmlUrl) {
|
528 |
+
this.$outer.find(this.s.appendSubHtmlTo).load(subHtmlUrl);
|
529 |
+
} else {
|
530 |
+
this.$outer.find(this.s.appendSubHtmlTo).html(subHtml);
|
531 |
+
}
|
532 |
+
|
533 |
+
} else {
|
534 |
+
|
535 |
+
if (subHtmlUrl) {
|
536 |
+
this.$slide.eq(index).load(subHtmlUrl);
|
537 |
+
} else {
|
538 |
+
this.$slide.eq(index).append(subHtml);
|
539 |
+
}
|
540 |
+
}
|
541 |
+
|
542 |
+
// Add lg-empty-html class if title doesn't exist
|
543 |
+
if (typeof subHtml !== 'undefined' && subHtml !== null) {
|
544 |
+
if (subHtml === '') {
|
545 |
+
this.$outer.find(this.s.appendSubHtmlTo).addClass('lg-empty-html');
|
546 |
+
} else {
|
547 |
+
this.$outer.find(this.s.appendSubHtmlTo).removeClass('lg-empty-html');
|
548 |
+
}
|
549 |
+
}
|
550 |
+
|
551 |
+
this.$el.trigger('onAfterAppendSubHtml.lg', [index]);
|
552 |
+
};
|
553 |
+
|
554 |
+
/**
|
555 |
+
* @desc Preload slides
|
556 |
+
* @param {Number} index - index of the slide
|
557 |
+
*/
|
558 |
+
Plugin.prototype.preload = function(index) {
|
559 |
+
var i = 1;
|
560 |
+
var j = 1;
|
561 |
+
for (i = 1; i <= this.s.preload; i++) {
|
562 |
+
if (i >= this.$items.length - index) {
|
563 |
+
break;
|
564 |
+
}
|
565 |
+
|
566 |
+
this.loadContent(index + i, false, 0);
|
567 |
+
}
|
568 |
+
|
569 |
+
for (j = 1; j <= this.s.preload; j++) {
|
570 |
+
if (index - j < 0) {
|
571 |
+
break;
|
572 |
+
}
|
573 |
+
|
574 |
+
this.loadContent(index - j, false, 0);
|
575 |
+
}
|
576 |
+
};
|
577 |
+
|
578 |
+
/**
|
579 |
+
* @desc Load slide content into slide.
|
580 |
+
* @param {Number} index - index of the slide.
|
581 |
+
* @param {Boolean} rec - if true call loadcontent() function again.
|
582 |
+
* @param {Boolean} delay - delay for adding complete class. it is 0 except first time.
|
583 |
+
*/
|
584 |
+
Plugin.prototype.loadContent = function(index, rec, delay) {
|
585 |
+
|
586 |
+
var _this = this;
|
587 |
+
var _hasPoster = false;
|
588 |
+
var _$img;
|
589 |
+
var _src;
|
590 |
+
var _poster;
|
591 |
+
var _srcset;
|
592 |
+
var _sizes;
|
593 |
+
var _html;
|
594 |
+
var getResponsiveSrc = function(srcItms) {
|
595 |
+
var rsWidth = [];
|
596 |
+
var rsSrc = [];
|
597 |
+
for (var i = 0; i < srcItms.length; i++) {
|
598 |
+
var __src = srcItms[i].split(' ');
|
599 |
+
|
600 |
+
// Manage empty space
|
601 |
+
if (__src[0] === '') {
|
602 |
+
__src.splice(0, 1);
|
603 |
+
}
|
604 |
+
|
605 |
+
rsSrc.push(__src[0]);
|
606 |
+
rsWidth.push(__src[1]);
|
607 |
+
}
|
608 |
+
|
609 |
+
var wWidth = $(window).width();
|
610 |
+
for (var j = 0; j < rsWidth.length; j++) {
|
611 |
+
if (parseInt(rsWidth[j], 10) > wWidth) {
|
612 |
+
_src = rsSrc[j];
|
613 |
+
break;
|
614 |
+
}
|
615 |
+
}
|
616 |
+
};
|
617 |
+
|
618 |
+
if (_this.s.dynamic) {
|
619 |
+
|
620 |
+
if (_this.s.dynamicEl[index].poster) {
|
621 |
+
_hasPoster = true;
|
622 |
+
_poster = _this.s.dynamicEl[index].poster;
|
623 |
+
}
|
624 |
+
|
625 |
+
_html = _this.s.dynamicEl[index].html;
|
626 |
+
_src = _this.s.dynamicEl[index].src;
|
627 |
+
|
628 |
+
if (_this.s.dynamicEl[index].responsive) {
|
629 |
+
var srcDyItms = _this.s.dynamicEl[index].responsive.split(',');
|
630 |
+
getResponsiveSrc(srcDyItms);
|
631 |
+
}
|
632 |
+
|
633 |
+
_srcset = _this.s.dynamicEl[index].srcset;
|
634 |
+
_sizes = _this.s.dynamicEl[index].sizes;
|
635 |
+
|
636 |
+
} else {
|
637 |
+
|
638 |
+
if (_this.$items.eq(index).attr('data-poster')) {
|
639 |
+
_hasPoster = true;
|
640 |
+
_poster = _this.$items.eq(index).attr('data-poster');
|
641 |
+
}
|
642 |
+
|
643 |
+
_html = _this.$items.eq(index).attr('data-html');
|
644 |
+
_src = _this.$items.eq(index).attr('href') || _this.$items.eq(index).attr('data-src');
|
645 |
+
|
646 |
+
if (_this.$items.eq(index).attr('data-responsive')) {
|
647 |
+
var srcItms = _this.$items.eq(index).attr('data-responsive').split(',');
|
648 |
+
getResponsiveSrc(srcItms);
|
649 |
+
}
|
650 |
+
|
651 |
+
_srcset = _this.$items.eq(index).attr('data-srcset');
|
652 |
+
_sizes = _this.$items.eq(index).attr('data-sizes');
|
653 |
+
|
654 |
+
}
|
655 |
+
|
656 |
+
//if (_src || _srcset || _sizes || _poster) {
|
657 |
+
|
658 |
+
var iframe = false;
|
659 |
+
if (_this.s.dynamic) {
|
660 |
+
if (_this.s.dynamicEl[index].iframe) {
|
661 |
+
iframe = true;
|
662 |
+
}
|
663 |
+
} else {
|
664 |
+
if (_this.$items.eq(index).attr('data-iframe') === 'true') {
|
665 |
+
iframe = true;
|
666 |
+
}
|
667 |
+
}
|
668 |
+
|
669 |
+
var _isVideo = _this.isVideo(_src, index);
|
670 |
+
if (!_this.$slide.eq(index).hasClass('lg-loaded')) {
|
671 |
+
if (iframe) {
|
672 |
+
_this.$slide.eq(index).prepend('<div class="lg-video-cont lg-has-iframe" style="max-width:' + _this.s.iframeMaxWidth + '"><div class="lg-video"><iframe class="lg-object" frameborder="0" src="' + _src + '" allowfullscreen="true"></iframe></div></div>');
|
673 |
+
} else if (_hasPoster) {
|
674 |
+
var videoClass = '';
|
675 |
+
if (_isVideo && _isVideo.youtube) {
|
676 |
+
videoClass = 'lg-has-youtube';
|
677 |
+
} else if (_isVideo && _isVideo.vimeo) {
|
678 |
+
videoClass = 'lg-has-vimeo';
|
679 |
+
} else {
|
680 |
+
videoClass = 'lg-has-html5';
|
681 |
+
}
|
682 |
+
|
683 |
+
_this.$slide.eq(index).prepend('<div class="lg-video-cont ' + videoClass + ' "><div class="lg-video"><span class="lg-video-play"></span><img class="lg-object lg-has-poster" src="' + _poster + '" /></div></div>');
|
684 |
+
|
685 |
+
} else if (_isVideo) {
|
686 |
+
_this.$slide.eq(index).prepend('<div class="lg-video-cont "><div class="lg-video"></div></div>');
|
687 |
+
_this.$el.trigger('hasVideo.lg', [index, _src, _html]);
|
688 |
+
} else {
|
689 |
+
_this.$slide.eq(index).prepend('<div class="lg-img-wrap"><img class="lg-object lg-image" src="' + _src + '" /></div>');
|
690 |
+
}
|
691 |
+
|
692 |
+
_this.$el.trigger('onAferAppendSlide.lg', [index]);
|
693 |
+
|
694 |
+
_$img = _this.$slide.eq(index).find('.lg-object');
|
695 |
+
if (_sizes) {
|
696 |
+
_$img.attr('sizes', _sizes);
|
697 |
+
}
|
698 |
+
|
699 |
+
if (_srcset) {
|
700 |
+
_$img.attr('srcset', _srcset);
|
701 |
+
try {
|
702 |
+
picturefill({
|
703 |
+
elements: [_$img[0]]
|
704 |
+
});
|
705 |
+
} catch (e) {
|
706 |
+
console.warn('lightGallery :- If you want srcset to be supported for older browser please include picturefil version 2 javascript library in your document.');
|
707 |
+
}
|
708 |
+
}
|
709 |
+
|
710 |
+
if (this.s.appendSubHtmlTo !== '.lg-sub-html') {
|
711 |
+
_this.addHtml(index);
|
712 |
+
}
|
713 |
+
|
714 |
+
_this.$slide.eq(index).addClass('lg-loaded');
|
715 |
+
}
|
716 |
+
|
717 |
+
_this.$slide.eq(index).find('.lg-object').on('load.lg error.lg', function() {
|
718 |
+
|
719 |
+
// For first time add some delay for displaying the start animation.
|
720 |
+
var _speed = 0;
|
721 |
+
|
722 |
+
// Do not change the delay value because it is required for zoom plugin.
|
723 |
+
// If gallery opened from direct url (hash) speed value should be 0
|
724 |
+
if (delay && !$('body').hasClass('lg-from-hash')) {
|
725 |
+
_speed = delay;
|
726 |
+
}
|
727 |
+
|
728 |
+
setTimeout(function() {
|
729 |
+
_this.$slide.eq(index).addClass('lg-complete');
|
730 |
+
_this.$el.trigger('onSlideItemLoad.lg', [index, delay || 0]);
|
731 |
+
}, _speed);
|
732 |
+
|
733 |
+
});
|
734 |
+
|
735 |
+
// @todo check load state for html5 videos
|
736 |
+
if (_isVideo && _isVideo.html5 && !_hasPoster) {
|
737 |
+
_this.$slide.eq(index).addClass('lg-complete');
|
738 |
+
}
|
739 |
+
|
740 |
+
if (rec === true) {
|
741 |
+
if (!_this.$slide.eq(index).hasClass('lg-complete')) {
|
742 |
+
_this.$slide.eq(index).find('.lg-object').on('load.lg error.lg', function() {
|
743 |
+
_this.preload(index);
|
744 |
+
});
|
745 |
+
} else {
|
746 |
+
_this.preload(index);
|
747 |
+
}
|
748 |
+
}
|
749 |
+
|
750 |
+
//}
|
751 |
+
};
|
752 |
+
|
753 |
+
/**
|
754 |
+
* @desc slide function for lightgallery
|
755 |
+
** Slide() gets call on start
|
756 |
+
** ** Set lg.on true once slide() function gets called.
|
757 |
+
** Call loadContent() on slide() function inside setTimeout
|
758 |
+
** ** On first slide we do not want any animation like slide of fade
|
759 |
+
** ** So on first slide( if lg.on if false that is first slide) loadContent() should start loading immediately
|
760 |
+
** ** Else loadContent() should wait for the transition to complete.
|
761 |
+
** ** So set timeout s.speed + 50
|
762 |
+
<=> ** loadContent() will load slide content in to the particular slide
|
763 |
+
** ** It has recursion (rec) parameter. if rec === true loadContent() will call preload() function.
|
764 |
+
** ** preload will execute only when the previous slide is fully loaded (images iframe)
|
765 |
+
** ** avoid simultaneous image load
|
766 |
+
<=> ** Preload() will check for s.preload value and call loadContent() again accoring to preload value
|
767 |
+
** loadContent() <====> Preload();
|
768 |
+
|
769 |
+
* @param {Number} index - index of the slide
|
770 |
+
* @param {Boolean} fromTouch - true if slide function called via touch event or mouse drag
|
771 |
+
* @param {Boolean} fromThumb - true if slide function called via thumbnail click
|
772 |
+
* @param {String} direction - Direction of the slide(next/prev)
|
773 |
+
*/
|
774 |
+
Plugin.prototype.slide = function(index, fromTouch, fromThumb, direction) {
|
775 |
+
|
776 |
+
var _prevIndex = this.$outer.find('.lg-current').index();
|
777 |
+
var _this = this;
|
778 |
+
|
779 |
+
// Prevent if multiple call
|
780 |
+
// Required for hsh plugin
|
781 |
+
if (_this.lGalleryOn && (_prevIndex === index)) {
|
782 |
+
return;
|
783 |
+
}
|
784 |
+
|
785 |
+
var _length = this.$slide.length;
|
786 |
+
var _time = _this.lGalleryOn ? this.s.speed : 0;
|
787 |
+
|
788 |
+
if (!_this.lgBusy) {
|
789 |
+
|
790 |
+
if (this.s.download) {
|
791 |
+
var _src;
|
792 |
+
if (_this.s.dynamic) {
|
793 |
+
_src = _this.s.dynamicEl[index].downloadUrl !== false && (_this.s.dynamicEl[index].downloadUrl || _this.s.dynamicEl[index].src);
|
794 |
+
} else {
|
795 |
+
_src = _this.$items.eq(index).attr('data-download-url') !== 'false' && (_this.$items.eq(index).attr('data-download-url') || _this.$items.eq(index).attr('href') || _this.$items.eq(index).attr('data-src'));
|
796 |
+
|
797 |
+
}
|
798 |
+
|
799 |
+
if (_src) {
|
800 |
+
$('#lg-download').attr('href', _src);
|
801 |
+
_this.$outer.removeClass('lg-hide-download');
|
802 |
+
} else {
|
803 |
+
_this.$outer.addClass('lg-hide-download');
|
804 |
+
}
|
805 |
+
}
|
806 |
+
|
807 |
+
this.$el.trigger('onBeforeSlide.lg', [_prevIndex, index, fromTouch, fromThumb]);
|
808 |
+
|
809 |
+
_this.lgBusy = true;
|
810 |
+
|
811 |
+
clearTimeout(_this.hideBartimeout);
|
812 |
+
|
813 |
+
// Add title if this.s.appendSubHtmlTo === lg-sub-html
|
814 |
+
if (this.s.appendSubHtmlTo === '.lg-sub-html') {
|
815 |
+
|
816 |
+
// wait for slide animation to complete
|
817 |
+
setTimeout(function() {
|
818 |
+
_this.addHtml(index);
|
819 |
+
}, _time);
|
820 |
+
}
|
821 |
+
|
822 |
+
this.arrowDisable(index);
|
823 |
+
|
824 |
+
if (!direction) {
|
825 |
+
if (index < _prevIndex) {
|
826 |
+
direction = 'prev';
|
827 |
+
} else if (index > _prevIndex) {
|
828 |
+
direction = 'next';
|
829 |
+
}
|
830 |
+
}
|
831 |
+
|
832 |
+
if (!fromTouch) {
|
833 |
+
|
834 |
+
// remove all transitions
|
835 |
+
_this.$outer.addClass('lg-no-trans');
|
836 |
+
|
837 |
+
this.$slide.removeClass('lg-prev-slide lg-next-slide');
|
838 |
+
|
839 |
+
if (direction === 'prev') {
|
840 |
+
|
841 |
+
//prevslide
|
842 |
+
this.$slide.eq(index).addClass('lg-prev-slide');
|
843 |
+
this.$slide.eq(_prevIndex).addClass('lg-next-slide');
|
844 |
+
} else {
|
845 |
+
|
846 |
+
// next slide
|
847 |
+
this.$slide.eq(index).addClass('lg-next-slide');
|
848 |
+
this.$slide.eq(_prevIndex).addClass('lg-prev-slide');
|
849 |
+
}
|
850 |
+
|
851 |
+
// give 50 ms for browser to add/remove class
|
852 |
+
setTimeout(function() {
|
853 |
+
_this.$slide.removeClass('lg-current');
|
854 |
+
|
855 |
+
//_this.$slide.eq(_prevIndex).removeClass('lg-current');
|
856 |
+
_this.$slide.eq(index).addClass('lg-current');
|
857 |
+
|
858 |
+
// reset all transitions
|
859 |
+
_this.$outer.removeClass('lg-no-trans');
|
860 |
+
}, 50);
|
861 |
+
} else {
|
862 |
+
|
863 |
+
this.$slide.removeClass('lg-prev-slide lg-current lg-next-slide');
|
864 |
+
var touchPrev;
|
865 |
+
var touchNext;
|
866 |
+
if (_length > 2) {
|
867 |
+
touchPrev = index - 1;
|
868 |
+
touchNext = index + 1;
|
869 |
+
|
870 |
+
if ((index === 0) && (_prevIndex === _length - 1)) {
|
871 |
+
|
872 |
+
// next slide
|
873 |
+
touchNext = 0;
|
874 |
+
touchPrev = _length - 1;
|
875 |
+
} else if ((index === _length - 1) && (_prevIndex === 0)) {
|
876 |
+
|
877 |
+
// prev slide
|
878 |
+
touchNext = 0;
|
879 |
+
touchPrev = _length - 1;
|
880 |
+
}
|
881 |
+
|
882 |
+
} else {
|
883 |
+
touchPrev = 0;
|
884 |
+
touchNext = 1;
|
885 |
+
}
|
886 |
+
|
887 |
+
if (direction === 'prev') {
|
888 |
+
_this.$slide.eq(touchNext).addClass('lg-next-slide');
|
889 |
+
} else {
|
890 |
+
_this.$slide.eq(touchPrev).addClass('lg-prev-slide');
|
891 |
+
}
|
892 |
+
|
893 |
+
_this.$slide.eq(index).addClass('lg-current');
|
894 |
+
}
|
895 |
+
|
896 |
+
if (_this.lGalleryOn) {
|
897 |
+
setTimeout(function() {
|
898 |
+
_this.loadContent(index, true, 0);
|
899 |
+
}, this.s.speed + 50);
|
900 |
+
|
901 |
+
setTimeout(function() {
|
902 |
+
_this.lgBusy = false;
|
903 |
+
_this.$el.trigger('onAfterSlide.lg', [_prevIndex, index, fromTouch, fromThumb]);
|
904 |
+
}, this.s.speed);
|
905 |
+
|
906 |
+
} else {
|
907 |
+
_this.loadContent(index, true, _this.s.backdropDuration);
|
908 |
+
|
909 |
+
_this.lgBusy = false;
|
910 |
+
_this.$el.trigger('onAfterSlide.lg', [_prevIndex, index, fromTouch, fromThumb]);
|
911 |
+
}
|
912 |
+
|
913 |
+
_this.lGalleryOn = true;
|
914 |
+
|
915 |
+
if (this.s.counter) {
|
916 |
+
$('#lg-counter-current').text(index + 1);
|
917 |
+
}
|
918 |
+
|
919 |
+
}
|
920 |
+
_this.index = index;
|
921 |
+
|
922 |
+
};
|
923 |
+
|
924 |
+
/**
|
925 |
+
* @desc Go to next slide
|
926 |
+
* @param {Boolean} fromTouch - true if slide function called via touch event
|
927 |
+
*/
|
928 |
+
Plugin.prototype.goToNextSlide = function(fromTouch) {
|
929 |
+
var _this = this;
|
930 |
+
var _loop = _this.s.loop;
|
931 |
+
if (fromTouch && _this.$slide.length < 3) {
|
932 |
+
_loop = false;
|
933 |
+
}
|
934 |
+
|
935 |
+
if (!_this.lgBusy) {
|
936 |
+
if ((_this.index + 1) < _this.$slide.length) {
|
937 |
+
_this.index++;
|
938 |
+
_this.$el.trigger('onBeforeNextSlide.lg', [_this.index]);
|
939 |
+
_this.slide(_this.index, fromTouch, false, 'next');
|
940 |
+
} else {
|
941 |
+
if (_loop) {
|
942 |
+
_this.index = 0;
|
943 |
+
_this.$el.trigger('onBeforeNextSlide.lg', [_this.index]);
|
944 |
+
_this.slide(_this.index, fromTouch, false, 'next');
|
945 |
+
} else if (_this.s.slideEndAnimatoin && !fromTouch) {
|
946 |
+
_this.$outer.addClass('lg-right-end');
|
947 |
+
setTimeout(function() {
|
948 |
+
_this.$outer.removeClass('lg-right-end');
|
949 |
+
}, 400);
|
950 |
+
}
|
951 |
+
}
|
952 |
+
}
|
953 |
+
};
|
954 |
+
|
955 |
+
/**
|
956 |
+
* @desc Go to previous slide
|
957 |
+
* @param {Boolean} fromTouch - true if slide function called via touch event
|
958 |
+
*/
|
959 |
+
Plugin.prototype.goToPrevSlide = function(fromTouch) {
|
960 |
+
var _this = this;
|
961 |
+
var _loop = _this.s.loop;
|
962 |
+
if (fromTouch && _this.$slide.length < 3) {
|
963 |
+
_loop = false;
|
964 |
+
}
|
965 |
+
|
966 |
+
if (!_this.lgBusy) {
|
967 |
+
if (_this.index > 0) {
|
968 |
+
_this.index--;
|
969 |
+
_this.$el.trigger('onBeforePrevSlide.lg', [_this.index, fromTouch]);
|
970 |
+
_this.slide(_this.index, fromTouch, false, 'prev');
|
971 |
+
} else {
|
972 |
+
if (_loop) {
|
973 |
+
_this.index = _this.$items.length - 1;
|
974 |
+
_this.$el.trigger('onBeforePrevSlide.lg', [_this.index, fromTouch]);
|
975 |
+
_this.slide(_this.index, fromTouch, false, 'prev');
|
976 |
+
} else if (_this.s.slideEndAnimatoin && !fromTouch) {
|
977 |
+
_this.$outer.addClass('lg-left-end');
|
978 |
+
setTimeout(function() {
|
979 |
+
_this.$outer.removeClass('lg-left-end');
|
980 |
+
}, 400);
|
981 |
+
}
|
982 |
+
}
|
983 |
+
}
|
984 |
+
};
|
985 |
+
|
986 |
+
Plugin.prototype.keyPress = function() {
|
987 |
+
var _this = this;
|
988 |
+
if (this.$items.length > 1) {
|
989 |
+
$(window).on('keyup.lg', function(e) {
|
990 |
+
if (_this.$items.length > 1) {
|
991 |
+
if (e.keyCode === 37) {
|
992 |
+
e.preventDefault();
|
993 |
+
_this.goToPrevSlide();
|
994 |
+
}
|
995 |
+
|
996 |
+
if (e.keyCode === 39) {
|
997 |
+
e.preventDefault();
|
998 |
+
_this.goToNextSlide();
|
999 |
+
}
|
1000 |
+
}
|
1001 |
+
});
|
1002 |
+
}
|
1003 |
+
|
1004 |
+
$(window).on('keydown.lg', function(e) {
|
1005 |
+
if (_this.s.escKey === true && e.keyCode === 27) {
|
1006 |
+
e.preventDefault();
|
1007 |
+
if (!_this.$outer.hasClass('lg-thumb-open')) {
|
1008 |
+
_this.destroy();
|
1009 |
+
} else {
|
1010 |
+
_this.$outer.removeClass('lg-thumb-open');
|
1011 |
+
}
|
1012 |
+
}
|
1013 |
+
});
|
1014 |
+
};
|
1015 |
+
|
1016 |
+
Plugin.prototype.arrow = function() {
|
1017 |
+
var _this = this;
|
1018 |
+
this.$outer.find('.lg-prev').on('click.lg', function() {
|
1019 |
+
_this.goToPrevSlide();
|
1020 |
+
});
|
1021 |
+
|
1022 |
+
this.$outer.find('.lg-next').on('click.lg', function() {
|
1023 |
+
_this.goToNextSlide();
|
1024 |
+
});
|
1025 |
+
};
|
1026 |
+
|
1027 |
+
Plugin.prototype.arrowDisable = function(index) {
|
1028 |
+
|
1029 |
+
// Disable arrows if s.hideControlOnEnd is true
|
1030 |
+
if (!this.s.loop && this.s.hideControlOnEnd) {
|
1031 |
+
if ((index + 1) < this.$slide.length) {
|
1032 |
+
this.$outer.find('.lg-next').removeAttr('disabled').removeClass('disabled');
|
1033 |
+
} else {
|
1034 |
+
this.$outer.find('.lg-next').attr('disabled', 'disabled').addClass('disabled');
|
1035 |
+
}
|
1036 |
+
|
1037 |
+
if (index > 0) {
|
1038 |
+
this.$outer.find('.lg-prev').removeAttr('disabled').removeClass('disabled');
|
1039 |
+
} else {
|
1040 |
+
this.$outer.find('.lg-prev').attr('disabled', 'disabled').addClass('disabled');
|
1041 |
+
}
|
1042 |
+
}
|
1043 |
+
};
|
1044 |
+
|
1045 |
+
Plugin.prototype.setTranslate = function($el, xValue, yValue) {
|
1046 |
+
// jQuery supports Automatic CSS prefixing since jQuery 1.8.0
|
1047 |
+
if (this.s.useLeft) {
|
1048 |
+
$el.css('left', xValue);
|
1049 |
+
} else {
|
1050 |
+
$el.css({
|
1051 |
+
transform: 'translate3d(' + (xValue) + 'px, ' + yValue + 'px, 0px)'
|
1052 |
+
});
|
1053 |
+
}
|
1054 |
+
};
|
1055 |
+
|
1056 |
+
Plugin.prototype.touchMove = function(startCoords, endCoords) {
|
1057 |
+
|
1058 |
+
var distance = endCoords - startCoords;
|
1059 |
+
|
1060 |
+
if (Math.abs(distance) > 15) {
|
1061 |
+
// reset opacity and transition duration
|
1062 |
+
this.$outer.addClass('lg-dragging');
|
1063 |
+
|
1064 |
+
// move current slide
|
1065 |
+
this.setTranslate(this.$slide.eq(this.index), distance, 0);
|
1066 |
+
|
1067 |
+
// move next and prev slide with current slide
|
1068 |
+
this.setTranslate($('.lg-prev-slide'), -this.$slide.eq(this.index).width() + distance, 0);
|
1069 |
+
this.setTranslate($('.lg-next-slide'), this.$slide.eq(this.index).width() + distance, 0);
|
1070 |
+
}
|
1071 |
+
};
|
1072 |
+
|
1073 |
+
Plugin.prototype.touchEnd = function(distance) {
|
1074 |
+
var _this = this;
|
1075 |
+
|
1076 |
+
// keep slide animation for any mode while dragg/swipe
|
1077 |
+
if (_this.s.mode !== 'lg-slide') {
|
1078 |
+
_this.$outer.addClass('lg-slide');
|
1079 |
+
}
|
1080 |
+
|
1081 |
+
this.$slide.not('.lg-current, .lg-prev-slide, .lg-next-slide').css('opacity', '0');
|
1082 |
+
|
1083 |
+
// set transition duration
|
1084 |
+
setTimeout(function() {
|
1085 |
+
_this.$outer.removeClass('lg-dragging');
|
1086 |
+
if ((distance < 0) && (Math.abs(distance) > _this.s.swipeThreshold)) {
|
1087 |
+
_this.goToNextSlide(true);
|
1088 |
+
} else if ((distance > 0) && (Math.abs(distance) > _this.s.swipeThreshold)) {
|
1089 |
+
_this.goToPrevSlide(true);
|
1090 |
+
} else if (Math.abs(distance) < 5) {
|
1091 |
+
|
1092 |
+
// Trigger click if distance is less than 5 pix
|
1093 |
+
_this.$el.trigger('onSlideClick.lg');
|
1094 |
+
}
|
1095 |
+
|
1096 |
+
_this.$slide.removeAttr('style');
|
1097 |
+
});
|
1098 |
+
|
1099 |
+
// remove slide class once drag/swipe is completed if mode is not slide
|
1100 |
+
setTimeout(function() {
|
1101 |
+
if (!_this.$outer.hasClass('lg-dragging') && _this.s.mode !== 'lg-slide') {
|
1102 |
+
_this.$outer.removeClass('lg-slide');
|
1103 |
+
}
|
1104 |
+
}, _this.s.speed + 100);
|
1105 |
+
|
1106 |
+
};
|
1107 |
+
|
1108 |
+
Plugin.prototype.enableSwipe = function() {
|
1109 |
+
var _this = this;
|
1110 |
+
var startCoords = 0;
|
1111 |
+
var endCoords = 0;
|
1112 |
+
var isMoved = false;
|
1113 |
+
|
1114 |
+
if (_this.s.enableSwipe && _this.doCss()) {
|
1115 |
+
|
1116 |
+
_this.$slide.on('touchstart.lg', function(e) {
|
1117 |
+
if (!_this.$outer.hasClass('lg-zoomed') && !_this.lgBusy) {
|
1118 |
+
e.preventDefault();
|
1119 |
+
_this.manageSwipeClass();
|
1120 |
+
startCoords = e.originalEvent.targetTouches[0].pageX;
|
1121 |
+
}
|
1122 |
+
});
|
1123 |
+
|
1124 |
+
_this.$slide.on('touchmove.lg', function(e) {
|
1125 |
+
if (!_this.$outer.hasClass('lg-zoomed')) {
|
1126 |
+
e.preventDefault();
|
1127 |
+
endCoords = e.originalEvent.targetTouches[0].pageX;
|
1128 |
+
_this.touchMove(startCoords, endCoords);
|
1129 |
+
isMoved = true;
|
1130 |
+
}
|
1131 |
+
});
|
1132 |
+
|
1133 |
+
_this.$slide.on('touchend.lg', function() {
|
1134 |
+
if (!_this.$outer.hasClass('lg-zoomed')) {
|
1135 |
+
if (isMoved) {
|
1136 |
+
isMoved = false;
|
1137 |
+
_this.touchEnd(endCoords - startCoords);
|
1138 |
+
} else {
|
1139 |
+
_this.$el.trigger('onSlideClick.lg');
|
1140 |
+
}
|
1141 |
+
}
|
1142 |
+
});
|
1143 |
+
}
|
1144 |
+
|
1145 |
+
};
|
1146 |
+
|
1147 |
+
Plugin.prototype.enableDrag = function() {
|
1148 |
+
var _this = this;
|
1149 |
+
var startCoords = 0;
|
1150 |
+
var endCoords = 0;
|
1151 |
+
var isDraging = false;
|
1152 |
+
var isMoved = false;
|
1153 |
+
if (_this.s.enableDrag && _this.doCss()) {
|
1154 |
+
_this.$slide.on('mousedown.lg', function(e) {
|
1155 |
+
if (!_this.$outer.hasClass('lg-zoomed') && !_this.lgBusy && !$(e.target).text().trim()) {
|
1156 |
+
e.preventDefault();
|
1157 |
+
_this.manageSwipeClass();
|
1158 |
+
startCoords = e.pageX;
|
1159 |
+
isDraging = true;
|
1160 |
+
|
1161 |
+
// ** Fix for webkit cursor issue https://code.google.com/p/chromium/issues/detail?id=26723
|
1162 |
+
_this.$outer.scrollLeft += 1;
|
1163 |
+
_this.$outer.scrollLeft -= 1;
|
1164 |
+
|
1165 |
+
// *
|
1166 |
+
|
1167 |
+
_this.$outer.removeClass('lg-grab').addClass('lg-grabbing');
|
1168 |
+
|
1169 |
+
_this.$el.trigger('onDragstart.lg');
|
1170 |
+
}
|
1171 |
+
});
|
1172 |
+
|
1173 |
+
$(window).on('mousemove.lg', function(e) {
|
1174 |
+
if (isDraging) {
|
1175 |
+
isMoved = true;
|
1176 |
+
endCoords = e.pageX;
|
1177 |
+
_this.touchMove(startCoords, endCoords);
|
1178 |
+
_this.$el.trigger('onDragmove.lg');
|
1179 |
+
}
|
1180 |
+
});
|
1181 |
+
|
1182 |
+
$(window).on('mouseup.lg', function(e) {
|
1183 |
+
if (isMoved) {
|
1184 |
+
isMoved = false;
|
1185 |
+
_this.touchEnd(endCoords - startCoords);
|
1186 |
+
_this.$el.trigger('onDragend.lg');
|
1187 |
+
} else if ($(e.target).hasClass('lg-object') || $(e.target).hasClass('lg-video-play')) {
|
1188 |
+
_this.$el.trigger('onSlideClick.lg');
|
1189 |
+
}
|
1190 |
+
|
1191 |
+
// Prevent execution on click
|
1192 |
+
if (isDraging) {
|
1193 |
+
isDraging = false;
|
1194 |
+
_this.$outer.removeClass('lg-grabbing').addClass('lg-grab');
|
1195 |
+
}
|
1196 |
+
});
|
1197 |
+
|
1198 |
+
}
|
1199 |
+
};
|
1200 |
+
|
1201 |
+
Plugin.prototype.manageSwipeClass = function() {
|
1202 |
+
var _touchNext = this.index + 1;
|
1203 |
+
var _touchPrev = this.index - 1;
|
1204 |
+
if (this.s.loop && this.$slide.length > 2) {
|
1205 |
+
if (this.index === 0) {
|
1206 |
+
_touchPrev = this.$slide.length - 1;
|
1207 |
+
} else if (this.index === this.$slide.length - 1) {
|
1208 |
+
_touchNext = 0;
|
1209 |
+
}
|
1210 |
+
}
|
1211 |
+
|
1212 |
+
this.$slide.removeClass('lg-next-slide lg-prev-slide');
|
1213 |
+
if (_touchPrev > -1) {
|
1214 |
+
this.$slide.eq(_touchPrev).addClass('lg-prev-slide');
|
1215 |
+
}
|
1216 |
+
|
1217 |
+
this.$slide.eq(_touchNext).addClass('lg-next-slide');
|
1218 |
+
};
|
1219 |
+
|
1220 |
+
Plugin.prototype.mousewheel = function() {
|
1221 |
+
var _this = this;
|
1222 |
+
_this.$outer.on('mousewheel.lg', function(e) {
|
1223 |
+
|
1224 |
+
if (!e.deltaY) {
|
1225 |
+
return;
|
1226 |
+
}
|
1227 |
+
|
1228 |
+
if (e.deltaY > 0) {
|
1229 |
+
_this.goToPrevSlide();
|
1230 |
+
} else {
|
1231 |
+
_this.goToNextSlide();
|
1232 |
+
}
|
1233 |
+
|
1234 |
+
e.preventDefault();
|
1235 |
+
});
|
1236 |
+
|
1237 |
+
};
|
1238 |
+
|
1239 |
+
Plugin.prototype.closeGallery = function() {
|
1240 |
+
|
1241 |
+
var _this = this;
|
1242 |
+
var mousedown = false;
|
1243 |
+
this.$outer.find('.lg-close').on('click.lg', function() {
|
1244 |
+
_this.destroy();
|
1245 |
+
});
|
1246 |
+
|
1247 |
+
if (_this.s.closable) {
|
1248 |
+
|
1249 |
+
// If you drag the slide and release outside gallery gets close on chrome
|
1250 |
+
// for preventing this check mousedown and mouseup happened on .lg-item or lg-outer
|
1251 |
+
_this.$outer.on('mousedown.lg', function(e) {
|
1252 |
+
|
1253 |
+
if ($(e.target).is('.lg-outer') || $(e.target).is('.lg-item ') || $(e.target).is('.lg-img-wrap')) {
|
1254 |
+
mousedown = true;
|
1255 |
+
} else {
|
1256 |
+
mousedown = false;
|
1257 |
+
}
|
1258 |
+
|
1259 |
+
});
|
1260 |
+
|
1261 |
+
_this.$outer.on('mousemove.lg', function() {
|
1262 |
+
mousedown = false;
|
1263 |
+
});
|
1264 |
+
|
1265 |
+
_this.$outer.on('mouseup.lg', function(e) {
|
1266 |
+
|
1267 |
+
if ($(e.target).is('.lg-outer') || $(e.target).is('.lg-item ') || $(e.target).is('.lg-img-wrap') && mousedown) {
|
1268 |
+
if (!_this.$outer.hasClass('lg-dragging')) {
|
1269 |
+
_this.destroy();
|
1270 |
+
}
|
1271 |
+
}
|
1272 |
+
|
1273 |
+
});
|
1274 |
+
|
1275 |
+
}
|
1276 |
+
|
1277 |
+
};
|
1278 |
+
|
1279 |
+
Plugin.prototype.destroy = function(d) {
|
1280 |
+
|
1281 |
+
var _this = this;
|
1282 |
+
|
1283 |
+
if (!d) {
|
1284 |
+
_this.$el.trigger('onBeforeClose.lg');
|
1285 |
+
$(window).scrollTop(_this.prevScrollTop);
|
1286 |
+
}
|
1287 |
+
|
1288 |
+
|
1289 |
+
/**
|
1290 |
+
* if d is false or undefined destroy will only close the gallery
|
1291 |
+
* plugins instance remains with the element
|
1292 |
+
*
|
1293 |
+
* if d is true destroy will completely remove the plugin
|
1294 |
+
*/
|
1295 |
+
|
1296 |
+
if (d) {
|
1297 |
+
if (!_this.s.dynamic) {
|
1298 |
+
// only when not using dynamic mode is $items a jquery collection
|
1299 |
+
this.$items.off('click.lg click.lgcustom');
|
1300 |
+
}
|
1301 |
+
|
1302 |
+
$.removeData(_this.el, 'lightGallery');
|
1303 |
+
}
|
1304 |
+
|
1305 |
+
// Unbind all events added by lightGallery
|
1306 |
+
this.$el.off('.lg.tm');
|
1307 |
+
|
1308 |
+
// Distroy all lightGallery modules
|
1309 |
+
$.each($.fn.lightGallery.modules, function(key) {
|
1310 |
+
if (_this.modules[key]) {
|
1311 |
+
_this.modules[key].destroy();
|
1312 |
+
}
|
1313 |
+
});
|
1314 |
+
|
1315 |
+
this.lGalleryOn = false;
|
1316 |
+
|
1317 |
+
clearTimeout(_this.hideBartimeout);
|
1318 |
+
this.hideBartimeout = false;
|
1319 |
+
$(window).off('.lg');
|
1320 |
+
$('body').removeClass('lg-on lg-from-hash');
|
1321 |
+
|
1322 |
+
if (_this.$outer) {
|
1323 |
+
_this.$outer.removeClass('lg-visible');
|
1324 |
+
}
|
1325 |
+
|
1326 |
+
$('.lg-backdrop').removeClass('in');
|
1327 |
+
|
1328 |
+
setTimeout(function() {
|
1329 |
+
if (_this.$outer) {
|
1330 |
+
_this.$outer.remove();
|
1331 |
+
}
|
1332 |
+
|
1333 |
+
$('.lg-backdrop').remove();
|
1334 |
+
|
1335 |
+
if (!d) {
|
1336 |
+
_this.$el.trigger('onCloseAfter.lg');
|
1337 |
+
}
|
1338 |
+
|
1339 |
+
}, _this.s.backdropDuration + 50);
|
1340 |
+
};
|
1341 |
+
|
1342 |
+
$.fn.lightGallery = function(options) {
|
1343 |
+
return this.each(function() {
|
1344 |
+
if (!$.data(this, 'lightGallery')) {
|
1345 |
+
$.data(this, 'lightGallery', new Plugin(this, options));
|
1346 |
+
} else {
|
1347 |
+
try {
|
1348 |
+
$(this).data('lightGallery').init();
|
1349 |
+
} catch (err) {
|
1350 |
+
console.error('lightGallery has not initiated properly');
|
1351 |
+
}
|
1352 |
+
}
|
1353 |
+
});
|
1354 |
+
};
|
1355 |
+
|
1356 |
+
$.fn.lightGallery.modules = {};
|
1357 |
+
|
1358 |
+
})();
|
1359 |
+
|
1360 |
+
|
1361 |
+
}));
|
1362 |
+
|
1363 |
+
/*! lg-autoplay - v1.0.4 - 2017-03-28
|
1364 |
+
* http://sachinchoolur.github.io/lightGallery
|
1365 |
+
* Copyright (c) 2017 Sachin N; Licensed GPLv3 */
|
1366 |
+
|
1367 |
+
(function (root, factory) {
|
1368 |
+
if (typeof define === 'function' && define.amd) {
|
1369 |
+
// AMD. Register as an anonymous module unless amdModuleId is set
|
1370 |
+
define(['jquery'], function (a0) {
|
1371 |
+
return (factory(a0));
|
1372 |
+
});
|
1373 |
+
} else if (typeof exports === 'object') {
|
1374 |
+
// Node. Does not work with strict CommonJS, but
|
1375 |
+
// only CommonJS-like environments that support module.exports,
|
1376 |
+
// like Node.
|
1377 |
+
module.exports = factory(require('jquery'));
|
1378 |
+
} else {
|
1379 |
+
factory(jQuery);
|
1380 |
+
}
|
1381 |
+
}(this, function ($) {
|
1382 |
+
|
1383 |
+
|
1384 |
+
(function() {
|
1385 |
+
|
1386 |
+
'use strict';
|
1387 |
+
|
1388 |
+
var defaults = {
|
1389 |
+
autoplay: false,
|
1390 |
+
pause: 5000,
|
1391 |
+
progressBar: true,
|
1392 |
+
fourceAutoplay: false,
|
1393 |
+
autoplayControls: true,
|
1394 |
+
appendAutoplayControlsTo: '.lg-toolbar'
|
1395 |
+
};
|
1396 |
+
|
1397 |
+
/**
|
1398 |
+
* Creates the autoplay plugin.
|
1399 |
+
* @param {object} element - lightGallery element
|
1400 |
+
*/
|
1401 |
+
var Autoplay = function(element) {
|
1402 |
+
|
1403 |
+
this.core = $(element).data('lightGallery');
|
1404 |
+
|
1405 |
+
this.$el = $(element);
|
1406 |
+
|
1407 |
+
// Execute only if items are above 1
|
1408 |
+
if (this.core.$items.length < 2) {
|
1409 |
+
return false;
|
1410 |
+
}
|
1411 |
+
|
1412 |
+
this.core.s = $.extend({}, defaults, this.core.s);
|
1413 |
+
this.interval = false;
|
1414 |
+
|
1415 |
+
// Identify if slide happened from autoplay
|
1416 |
+
this.fromAuto = true;
|
1417 |
+
|
1418 |
+
// Identify if autoplay canceled from touch/drag
|
1419 |
+
this.canceledOnTouch = false;
|
1420 |
+
|
1421 |
+
// save fourceautoplay value
|
1422 |
+
this.fourceAutoplayTemp = this.core.s.fourceAutoplay;
|
1423 |
+
|
1424 |
+
// do not allow progress bar if browser does not support css3 transitions
|
1425 |
+
if (!this.core.doCss()) {
|
1426 |
+
this.core.s.progressBar = false;
|
1427 |
+
}
|
1428 |
+
|
1429 |
+
this.init();
|
1430 |
+
|
1431 |
+
return this;
|
1432 |
+
};
|
1433 |
+
|
1434 |
+
Autoplay.prototype.init = function() {
|
1435 |
+
var _this = this;
|
1436 |
+
|
1437 |
+
// append autoplay controls
|
1438 |
+
if (_this.core.s.autoplayControls) {
|
1439 |
+
_this.controls();
|
1440 |
+
}
|
1441 |
+
|
1442 |
+
// Create progress bar
|
1443 |
+
if (_this.core.s.progressBar) {
|
1444 |
+
_this.core.$outer.find('.lg').append('<div class="lg-progress-bar"><div class="lg-progress"></div></div>');
|
1445 |
+
}
|
1446 |
+
|
1447 |
+
// set progress
|
1448 |
+
_this.progress();
|
1449 |
+
|
1450 |
+
// Start autoplay
|
1451 |
+
if (_this.core.s.autoplay) {
|
1452 |
+
_this.$el.one('onSlideItemLoad.lg.tm', function() {
|
1453 |
+
_this.startlAuto();
|
1454 |
+
});
|
1455 |
+
}
|
1456 |
+
|
1457 |
+
// cancel interval on touchstart and dragstart
|
1458 |
+
_this.$el.on('onDragstart.lg.tm touchstart.lg.tm', function() {
|
1459 |
+
if (_this.interval) {
|
1460 |
+
_this.cancelAuto();
|
1461 |
+
_this.canceledOnTouch = true;
|
1462 |
+
}
|
1463 |
+
});
|
1464 |
+
|
1465 |
+
// restore autoplay if autoplay canceled from touchstart / dragstart
|
1466 |
+
_this.$el.on('onDragend.lg.tm touchend.lg.tm onSlideClick.lg.tm', function() {
|
1467 |
+
if (!_this.interval && _this.canceledOnTouch) {
|
1468 |
+
_this.startlAuto();
|
1469 |
+
_this.canceledOnTouch = false;
|
1470 |
+
}
|
1471 |
+
});
|
1472 |
+
|
1473 |
+
};
|
1474 |
+
|
1475 |
+
Autoplay.prototype.progress = function() {
|
1476 |
+
|
1477 |
+
var _this = this;
|
1478 |
+
var _$progressBar;
|
1479 |
+
var _$progress;
|
1480 |
+
|
1481 |
+
_this.$el.on('onBeforeSlide.lg.tm', function() {
|
1482 |
+
|
1483 |
+
// start progress bar animation
|
1484 |
+
if (_this.core.s.progressBar && _this.fromAuto) {
|
1485 |
+
_$progressBar = _this.core.$outer.find('.lg-progress-bar');
|
1486 |
+
_$progress = _this.core.$outer.find('.lg-progress');
|
1487 |
+
if (_this.interval) {
|
1488 |
+
_$progress.removeAttr('style');
|
1489 |
+
_$progressBar.removeClass('lg-start');
|
1490 |
+
setTimeout(function() {
|
1491 |
+
_$progress.css('transition', 'width ' + (_this.core.s.speed + _this.core.s.pause) + 'ms ease 0s');
|
1492 |
+
_$progressBar.addClass('lg-start');
|
1493 |
+
}, 20);
|
1494 |
+
}
|
1495 |
+
}
|
1496 |
+
|
1497 |
+
// Remove setinterval if slide is triggered manually and fourceautoplay is false
|
1498 |
+
if (!_this.fromAuto && !_this.core.s.fourceAutoplay) {
|
1499 |
+
_this.cancelAuto();
|
1500 |
+
}
|
1501 |
+
|
1502 |
+
_this.fromAuto = false;
|
1503 |
+
|
1504 |
+
});
|
1505 |
+
};
|
1506 |
+
|
1507 |
+
// Manage autoplay via play/stop buttons
|
1508 |
+
Autoplay.prototype.controls = function() {
|
1509 |
+
var _this = this;
|
1510 |
+
var _html = '<span class="lg-autoplay-button lg-icon"></span>';
|
1511 |
+
|
1512 |
+
// Append autoplay controls
|
1513 |
+
$(this.core.s.appendAutoplayControlsTo).append(_html);
|
1514 |
+
|
1515 |
+
_this.core.$outer.find('.lg-autoplay-button').on('click.lg', function() {
|
1516 |
+
if ($(_this.core.$outer).hasClass('lg-show-autoplay')) {
|
1517 |
+
_this.cancelAuto();
|
1518 |
+
_this.core.s.fourceAutoplay = false;
|
1519 |
+
} else {
|
1520 |
+
if (!_this.interval) {
|
1521 |
+
_this.startlAuto();
|
1522 |
+
_this.core.s.fourceAutoplay = _thi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|