From ce48e96737038e0162929a22db632102752903f4 Mon Sep 17 00:00:00 2001 From: Sophia Atkinson Date: Tue, 4 Jul 2023 11:21:47 -0700 Subject: [PATCH] init commit --- 404.php | 64 + archive.php | 63 + assets/css/jquery-ui.css | 5 + assets/css/mt-admin-styles.css | 60 + assets/css/mt-customizer-styles.css | 391 ++ assets/css/mt-editor-style.css | 558 +++ assets/css/mt-preloader.css | 56 + assets/css/mt-responsive.css | 722 ++++ assets/images/archive-block-grid.png | Bin 0 -> 1127 bytes assets/images/archive-classic.png | Bin 0 -> 1039 bytes assets/images/archive-masonry.png | Bin 0 -> 1039 bytes assets/images/boxed-layout.png | Bin 0 -> 1011 bytes assets/images/default-layout.jpg | Bin 0 -> 3719 bytes assets/images/default-sidebar.png | Bin 0 -> 1717 bytes assets/images/footer-1.png | Bin 0 -> 1002 bytes assets/images/footer-2.png | Bin 0 -> 1007 bytes assets/images/footer-3.png | Bin 0 -> 1004 bytes assets/images/footer-4.png | Bin 0 -> 1010 bytes assets/images/full-width.png | Bin 0 -> 993 bytes assets/images/left-sidebar.png | Bin 0 -> 2933 bytes assets/images/no-sidebar-center.png | Bin 0 -> 2951 bytes assets/images/no-sidebar.png | Bin 0 -> 2931 bytes assets/images/post-layout-1.jpg | Bin 0 -> 2202 bytes assets/images/post-layout-2.jpg | Bin 0 -> 1983 bytes assets/images/right-sidebar.png | Bin 0 -> 2935 bytes assets/js/customizer.js | 42 + assets/js/mt-admin-scripts.js | 73 + assets/js/mt-combine-scripts.js | 52 + assets/js/mt-custom-scripts.js | 199 + assets/js/mt-customizer-controls.js | 222 + assets/js/navigation.js | 82 + assets/js/skip-link-focus-fix.js | 31 + assets/library/animate/LICENSE | 22 + assets/library/animate/animate.css | 3146 ++++++++++++++ assets/library/animate/animate.min.css | 9 + .../library/imagesloaded/imagesloaded.pkgd.js | 496 +++ .../imagesloaded/imagesloaded.pkgd.min.js | 7 + .../library/lightslider/css/lightslider.css | 395 ++ .../lightslider/css/lightslider.min.css | 3 + assets/library/lightslider/img/controls.png | Bin 0 -> 2241 bytes assets/library/lightslider/js/lightslider.js | 1143 +++++ .../library/lightslider/js/lightslider.min.js | 4 + assets/library/masonry/masonry.pkgd.js | 2502 +++++++++++ assets/library/masonry/masonry.pkgd.min.js | 9 + assets/library/sticky/jquery.sticky.js | 223 + assets/library/sticky/jquery.sticky.min.js | 18 + assets/library/wow/wow.js | 513 +++ assets/library/wow/wow.min.js | 2 + comments.php | 75 + footer.php | 61 + functions.php | 199 + header.php | 122 + inc/custom-header.php | 75 + inc/customizer/mt-callback.php | 176 + ...mt-customizer-additional-panel-options.php | 113 + .../mt-customizer-custom-classes.php | 367 ++ .../mt-customizer-design-panel-options.php | 303 ++ .../mt-customizer-footer-panel-options.php | 156 + .../mt-customizer-front-panel-options.php | 184 + .../mt-customizer-general-panel-options.php | 125 + .../mt-customizer-header-panel-options.php | 327 ++ inc/customizer/mt-customizer-panels.php | 86 + inc/customizer/mt-customizer.php | 103 + inc/customizer/mt-sanitize.php | 47 + inc/hooks/mt-custom-hooks.php | 594 +++ inc/hooks/mt-top-header-hooks.php | 116 + inc/jetpack.php | 60 + inc/metaboxes/mt-post-sidebar-meta.php | 116 + inc/mt-class-breadcrumbs.php | 1237 ++++++ inc/mt-dynamic-styles.php | 51 + inc/template-functions.php | 431 ++ inc/template-tags.php | 264 ++ inc/tgm/class-tgm-plugin-activation.php | 3760 +++++++++++++++++ inc/tgm/mt-recommend-plugins.php | 104 + inc/theme-settings/assets/css/settings.css | 609 +++ .../assets/css/theme-review-notice.css | 42 + inc/theme-settings/assets/images/cross.png | Bin 0 -> 2345 bytes inc/theme-settings/assets/images/tick.png | Bin 0 -> 2779 bytes inc/theme-settings/assets/js/settings.js | 53 + .../assets/js/theme-review-notice.js | 53 + inc/theme-settings/mt-theme-settings.php | 880 ++++ inc/widgets/mt-author-info.php | 168 + inc/widgets/mt-latest-posts.php | 179 + inc/widgets/mt-social-media.php | 128 + inc/widgets/mt-widget-fields.php | 154 + inc/widgets/mt-widget-functions.php | 83 + index.php | 66 + languages/color-blog-dark.pot | 1597 +++++++ languages/readme.txt | 7 + page.php | 37 + rtl.css | 538 +++ screenshot.png | 1 + search.php | 58 + sidebar-footer.php | 54 + sidebar.php | 17 + single.php | 40 + style.css | 3112 ++++++++++++++ template-parts/author/post-author-box.php | 43 + template-parts/content-none.php | 45 + template-parts/content-page.php | 45 + template-parts/content-search.php | 62 + template-parts/content-single.php | 62 + template-parts/content.php | 71 + template-parts/related/content-related.php | 39 + template-parts/related/related-posts.php | 44 + 105 files changed, 28651 insertions(+) create mode 100644 404.php create mode 100644 archive.php create mode 100644 assets/css/jquery-ui.css create mode 100644 assets/css/mt-admin-styles.css create mode 100644 assets/css/mt-customizer-styles.css create mode 100644 assets/css/mt-editor-style.css create mode 100644 assets/css/mt-preloader.css create mode 100644 assets/css/mt-responsive.css create mode 100644 assets/images/archive-block-grid.png create mode 100644 assets/images/archive-classic.png create mode 100644 assets/images/archive-masonry.png create mode 100644 assets/images/boxed-layout.png create mode 100644 assets/images/default-layout.jpg create mode 100644 assets/images/default-sidebar.png create mode 100644 assets/images/footer-1.png create mode 100644 assets/images/footer-2.png create mode 100644 assets/images/footer-3.png create mode 100644 assets/images/footer-4.png create mode 100644 assets/images/full-width.png create mode 100644 assets/images/left-sidebar.png create mode 100644 assets/images/no-sidebar-center.png create mode 100644 assets/images/no-sidebar.png create mode 100644 assets/images/post-layout-1.jpg create mode 100644 assets/images/post-layout-2.jpg create mode 100644 assets/images/right-sidebar.png create mode 100644 assets/js/customizer.js create mode 100644 assets/js/mt-admin-scripts.js create mode 100644 assets/js/mt-combine-scripts.js create mode 100644 assets/js/mt-custom-scripts.js create mode 100644 assets/js/mt-customizer-controls.js create mode 100644 assets/js/navigation.js create mode 100644 assets/js/skip-link-focus-fix.js create mode 100644 assets/library/animate/LICENSE create mode 100644 assets/library/animate/animate.css create mode 100644 assets/library/animate/animate.min.css create mode 100644 assets/library/imagesloaded/imagesloaded.pkgd.js create mode 100644 assets/library/imagesloaded/imagesloaded.pkgd.min.js create mode 100644 assets/library/lightslider/css/lightslider.css create mode 100644 assets/library/lightslider/css/lightslider.min.css create mode 100644 assets/library/lightslider/img/controls.png create mode 100644 assets/library/lightslider/js/lightslider.js create mode 100644 assets/library/lightslider/js/lightslider.min.js create mode 100644 assets/library/masonry/masonry.pkgd.js create mode 100644 assets/library/masonry/masonry.pkgd.min.js create mode 100644 assets/library/sticky/jquery.sticky.js create mode 100644 assets/library/sticky/jquery.sticky.min.js create mode 100644 assets/library/wow/wow.js create mode 100644 assets/library/wow/wow.min.js create mode 100644 comments.php create mode 100644 footer.php create mode 100644 functions.php create mode 100644 header.php create mode 100644 inc/custom-header.php create mode 100644 inc/customizer/mt-callback.php create mode 100644 inc/customizer/mt-customizer-additional-panel-options.php create mode 100644 inc/customizer/mt-customizer-custom-classes.php create mode 100644 inc/customizer/mt-customizer-design-panel-options.php create mode 100644 inc/customizer/mt-customizer-footer-panel-options.php create mode 100644 inc/customizer/mt-customizer-front-panel-options.php create mode 100644 inc/customizer/mt-customizer-general-panel-options.php create mode 100644 inc/customizer/mt-customizer-header-panel-options.php create mode 100644 inc/customizer/mt-customizer-panels.php create mode 100644 inc/customizer/mt-customizer.php create mode 100644 inc/customizer/mt-sanitize.php create mode 100644 inc/hooks/mt-custom-hooks.php create mode 100644 inc/hooks/mt-top-header-hooks.php create mode 100644 inc/jetpack.php create mode 100644 inc/metaboxes/mt-post-sidebar-meta.php create mode 100644 inc/mt-class-breadcrumbs.php create mode 100644 inc/mt-dynamic-styles.php create mode 100644 inc/template-functions.php create mode 100644 inc/template-tags.php create mode 100644 inc/tgm/class-tgm-plugin-activation.php create mode 100644 inc/tgm/mt-recommend-plugins.php create mode 100644 inc/theme-settings/assets/css/settings.css create mode 100644 inc/theme-settings/assets/css/theme-review-notice.css create mode 100644 inc/theme-settings/assets/images/cross.png create mode 100644 inc/theme-settings/assets/images/tick.png create mode 100644 inc/theme-settings/assets/js/settings.js create mode 100644 inc/theme-settings/assets/js/theme-review-notice.js create mode 100644 inc/theme-settings/mt-theme-settings.php create mode 100644 inc/widgets/mt-author-info.php create mode 100644 inc/widgets/mt-latest-posts.php create mode 100644 inc/widgets/mt-social-media.php create mode 100644 inc/widgets/mt-widget-fields.php create mode 100644 inc/widgets/mt-widget-functions.php create mode 100644 index.php create mode 100644 languages/color-blog-dark.pot create mode 100644 languages/readme.txt create mode 100644 page.php create mode 100644 rtl.css create mode 100644 screenshot.png create mode 100644 search.php create mode 100644 sidebar-footer.php create mode 100644 sidebar.php create mode 100644 single.php create mode 100644 style.css create mode 100644 template-parts/author/post-author-box.php create mode 100644 template-parts/content-none.php create mode 100644 template-parts/content-page.php create mode 100644 template-parts/content-search.php create mode 100644 template-parts/content-single.php create mode 100644 template-parts/content.php create mode 100644 template-parts/related/content-related.php create mode 100644 template-parts/related/related-posts.php diff --git a/404.php b/404.php new file mode 100644 index 0000000..eebc7d1 --- /dev/null +++ b/404.php @@ -0,0 +1,64 @@ + + +
+
+ +
+
 
+ +
+

+
+ + +
+ 'post', + 'posts_per_page' => absint( $sophia_after_dark_pnf_latest_post_count ), + 'ignore_sticky_posts' => 1, + ); + $sophia_after_dark_pnf_query = new WP_Query( $sophia_after_dark_pnf_args ); + if ( $sophia_after_dark_pnf_query->have_posts() ) { + echo ''; + } + wp_reset_postdata(); + ?> +
+ + + +
+
+ + +
+
+
+ '; + } + if ( have_posts() ) : + if ( 'mt-archive--masonry-style' === $archive_style ) { + ?> +
+
+ +
+
+ '; + } + ?> +
+
+ + +
+.image { + display: flex; + flex-wrap: wrap; +} + +.customize-control-mt-radio-image label { + position: relative; + display: inline-block; +} + +.customize-control-mt-radio-image label .image-label { + display: none; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: rgba(255, 255, 255, .7); + font-weight: 700; +} + +.customize-control-mt-radio-image label .image-label .inner { + width: 100%; + height: 100%; + text-align: center; + padding: .5em; + vertical-align: middle; +} + +.customize-control-mt-radio-image label:hover .image-label { + display: block; +} + +.customize-control-mt-radio-image input { + display: none; +} + +.customize-control-mt-radio-image input img { + border: 1px solid transparent; +} + +.customize-control-mt-radio-image input:checked+label img { + -webkit-box-shadow: 0 0 5px 2px rgba(0, 0, 0, .25); + box-shadow: 0 0 5px 2px rgba(0, 0, 0, .25); + border: 1px solid #3498db; +} + +.customize-control-mt-radio-image input+label .image-clickable { + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + width: 100%; + height: 100%; +} + +.customize-control-repeater .repeater-fields .repeater-row .repeater-field.repeater-field-radio-image input { + display: none; +} + +.customize-control-repeater .repeater-fields .repeater-row .repeater-field.repeater-field-radio-image input img { + border: 1px solid transparent; +} + +.customize-control-repeater .repeater-fields .repeater-row .repeater-field.repeater-field-radio-image input:checked+label img { + -webkit-box-shadow: 0 0 5px 2px rgba(0, 0, 0, .25); + box-shadow: 0 0 5px 2px rgba(0, 0, 0, .25); + border: 1px solid #3498db; +} + +.customize-control-mt-radio-image input+label .image-clickable { + margin: 0; + border-radius: 0; + border: none; + background: 0 0; +} + +.customize-control-mt-radio-image input+label .image-clickable, +.customize-control-mt-radio-image input:checked+label img { + box-sizing: border-box; + max-width: 100%; + height: auto; + padding: 2px; + border: 3px solid transparent; +} + +.customize-control-mt-radio-image input+label .image-clickable:focus, +.customize-control-mt-radio-image input+label .image-clickable:hover { + border-color: #ddd; +} + +.customize-control-mt-radio-image input:checked+label img { + border-color: #00a0d2; + display: block +} + +.customize-control-mt-radio-image .image label { + margin-right: 10px; +} + +.customize-control-mt-radio-image input:checked+label img { + box-shadow: none; +} + +.customize-control-mt-radio-image>.image { + display: block; +} + +.mt-clearfix:after, +.mt-clearfix:before { + content: ""; + display: table; +} + +.mt-clearfix:after { + clear: both; +} + +.mt-repeater-field-control { + background: #fff; + margin-bottom: 12px; + display: block; +} + +.mt-repeater-footer { + margin-top: 15px; + text-align: right; +} + +.mt-repeater-field-control:first-child .mt-repeater-footer { + display: none; +} + +.mt-repeater-field-title { + padding: 13px 15px; + line-height: 1; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + margin: 0; + font-size: 1em; + border: 1px solid #e5e5e5; + cursor: move; + position: relative; + border-bottom: 0; +} + +.mt-repeater-field-title:after { + content: "\f142"; + font: 400 20px/1 dashicons; + position: absolute; + right: 0; + top: 0; + padding: 1px 2px 1px 0; + margin-top: 10px; + margin-right: 10px; + -webkit-border-radius: 50%; + border-radius: 50%; + cursor: pointer; +} + +.mt-repeater-field-control.expanded .mt-repeater-field-title:after { + content: "\f140" +} + +.mt-repeater-fields { + padding: 0 10px 10px; + border-top: none; + line-height: 16px; + border: 1px solid #e5e5e5; + box-shadow: 0 1px 1px rgba(0, 0, 0, .04); + display: none; +} + +.mt-repeater-fields .customize-control-title { + margin-top: 10px +} + +.mt-repeater-field-control.expanded .mt-repeater-fields { + display: block; +} + +.mt-reapeater-add-control-field { + float: right; +} + +.mt-reapeater-add-add-control-field:before { + content: "\f132"; + display: inline-block; + position: relative; + left: -2px; + top: -1px; + font: 400 18px/1 dashicons; + vertical-align: middle; +} + +.mt-repeater-type-icon { + overflow: hidden; +} + +.mt-repeater-selected-icon { + background: #f6f6f6; + height: 45px; + line-height: 45px; + text-align: center; + border: 1px solid #eee; + position: relative; + margin-right: 45px; + cursor: pointer; + font-size: 28px; +} + +.mt-repeater-selected-icon span { + position: absolute; + background: #f6f6f6; + right: -45px; + top: -1px; + height: 45px; + width: 45px; + border: 1px solid #eee; + font-size: 20px; +} + +.mt-repeater-selected-icon i { + margin-top: 3%; +} + +.mt-repeater-selected-icon span i { + margin-top: 24%; +} + +.mt-repeater-icon-list { + height: 215px; + overflow-y: scroll; + font-size: 18px; + border: 1px solid #eee; + border-right: 0; + border-top: 0; + padding-bottom: 4%; + display: none; + cursor: pointer; + box-sizing: border-box; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; +} + +.mt-repeater-icon-list li { + float: left; + margin: 4% 3% 0; + height: 40px; + width: 16%; + text-align: center; + line-height: 40px; + border: 1px solid #eee; +} + +.mt-repeater-icon-list li:hover { + background: #333; + border: 1px solid #333; + color: #fff; +} + +.mt-repeater-icon-list li.icon-active { + background: #0073aa; + border: 1px solid #0073aa; + color: #fff; +} + +.customize-control-mt-repeater .mt-limit-msg { + display: none; +} + +.customize-control-mt-repeater span.mt-limit-msg:nth-of-type(2) { + display: block; + background: #fff; + padding: 10px 15px; + margin: 10px 0 10px; + border-left: 3px solid #ffb900; +} + +.customize-control textarea { + width: 100%; +} + +/**--------------------------------------------- +Upsell section + ---------------------------------------------*/ + +#customize-controls .control-section-mt-upsell .accordion-section-title:hover, +#customize-controls .control-section-mt-upsell .accordion-section-title:focus { + background-color: #fff; +} + +.control-section-mt-upsell .accordion-section-title .button { + margin-top: -4px; + font-weight: 700; + margin-left: 8px; + background: #00d2ff; + background: -webkit-linear-gradient(to right, #3a7bd5, #00d2ff); + background: linear-gradient(to right, #3a7bd5, #00d2ff); + color: #fff; + border:none; +} + +.control-section-mt-upsell .accordion-section-title .button:hover { + background: #1FA3E8; + background:linear-gradient(#1FA3E8,#1FA3E8); +} \ No newline at end of file diff --git a/assets/css/mt-editor-style.css b/assets/css/mt-editor-style.css new file mode 100644 index 0000000..e085e67 --- /dev/null +++ b/assets/css/mt-editor-style.css @@ -0,0 +1,558 @@ +body { + color: #363b40 +} + +body, +button, +input, +select, +textarea { + font-family: "Libre Franklin", "Helvetica Neue", helvetica, arial, sans-serif; + font-size: 16px; + font-size: 1rem; + font-weight: 400; + line-height: 1.66 +} + +h1, +h2, +h3, +h4, +h5, +h6 { + font-family: Catamaran, helvetica, arial, sans-serif; + color: #16181a; + font-weight: 700; + clear: both; + line-height: 1.4; + margin: 0 0 .75em; + padding: 1.5em 0 0 +} + +h1:first-child, +h2:first-child, +h3:first-child, +h4:first-child, +h5:first-child, +h6:first-child { + padding-top: 0 +} + +h1 { + font-size: 24px; + font-size: 1.5rem; + font-weight: 300 +} + +h2 { + color: #666; + font-size: 20px; + font-size: 1.25rem; + font-weight: 300 +} + +h3 { + color: #333; + font-size: 18px; + font-size: 1.125rem; + font-weight: 300 +} + +h4 { + color: #333; + font-size: 16px; + font-size: 1rem; + font-weight: 800 +} + +h5 { + color: #767676; + font-size: 13px; + font-size: .8125rem; + font-weight: 800; + letter-spacing: .15em; + text-transform: uppercase +} + +h6 { + color: #333; + font-size: 15px; + font-size: .9375rem; + font-weight: 800 +} + +p { + margin: 0 0 1.5em; + padding: 0 +} + +cite, +dfn, +em, +i { + font-style: italic +} + +blockquote { + color: #666; + font-size: 18px; + font-size: 1.125rem; + font-style: italic; + line-height: 1.7; + margin: 0; + overflow: hidden; + padding: 20px 40px; + background: #fff9f5; + text-align: center +} + +blockquote.alignleft, +blockquote.alignright { + font-size: 14px; + font-size: .875rem; + width: 34% +} + +blockquote cite { + position: relative; + display: inline-block; + padding: 0 20px; + font-size: 14px; + margin-top: 20px +} + +blockquote cite::before { + content: ""; + background-color: #363b40; + width: 10px; + height: 1px; + display: block; + position: absolute; + top: 10px; + left: 0 +} + +address { + margin: 0 0 1.5em +} + +pre { + background: #eee; + font-family: "Courier 10 Pitch", Courier, monospace; + font-size: 15px; + font-size: .9375rem; + line-height: 1.6; + margin-bottom: 1.6em; + max-width: 100%; + overflow: auto; + padding: 1.6em +} + +code, +kbd, +tt, +var { + font-family: Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace; + font-size: 15px; + font-size: .9375rem +} + +abbr, +acronym { + border-bottom: 1px dotted #666; + cursor: help +} + +ins, +mark { + background: #eee; + text-decoration: none +} + +big { + font-size: 125% +} + +blockquote, +q { + quotes: """" +} + +blockquote:after, +blockquote:before, +q:after, +q:before { + content: "" +} + +html[lang=th] h1, +html[lang=th] h2, +html[lang=th] h3, +html[lang=th] h4, +html[lang=th] h5, +html[lang=th] h6 { + letter-spacing: 0; + line-height: 1.65 +} + +html[lang=th] body, +html[lang=th] button, +html[lang=th] input, +html[lang=th] select, +html[lang=th] textarea { + line-height: 1.8 +} + +hr { + background-color: #bbb; + border: 0; + height: 1px; + margin-bottom: 1.5em +} + +ol, +ul { + margin: 0 0 1.5em; + padding: 0 +} + +ul { + list-style: disc +} + +ol { + counter-reset: item +} + +ol li { + display: block; + position: relative +} + +ol li:before { + content: counter(item); + counter-increment: item; + font-weight: 800; + left: -1.5em; + position: absolute +} + +li>ol, +li>ul { + margin-bottom: 0; + margin-left: 1.5em +} + +dt { + font-weight: 700 +} + +dd { + margin: 0 1.5em 1.5em +} + +table { + border-collapse: collapse; + margin: 0 0 1.5em; + width: 100% +} + +thead th { + border-bottom: 2px solid #bbb; + padding-bottom: .5em +} + +th { + padding: .4em; + text-align: left +} + +tr { + border-bottom: 1px solid #eee +} + +td { + padding: .4em +} + +td:first-child, +th:first-child { + padding-left: 0 +} + +td:last-child, +th:last-child { + padding-right: 0 +} + +a { + -webkit-box-shadow: inset 0 -1px 0 rgba(15, 15, 15, 1); + box-shadow: inset 0 -1px 0 rgba(15, 15, 15, 1); + color: #222; + text-decoration: none; + -webkit-transition: color 80ms ease-in, -webkit-box-shadow 130ms ease-in-out; + transition: color 80ms ease-in, -webkit-box-shadow 130ms ease-in-out; + transition: color 80ms ease-in, box-shadow 130ms ease-in-out; + transition: color 80ms ease-in, box-shadow 130ms ease-in-out, -webkit-box-shadow 130ms ease-in-out +} + +a:focus { + outline: thin dotted +} + +a:focus, +a:hover { + color: #000; + -webkit-box-shadow: inset 0 0 0 transparent, 0 3px 0 rgba(0, 0, 0, 1); + box-shadow: inset 0 0 0 transparent, 0 3px 0 rgba(0, 0, 0, 1) +} + +a img { + background: #fff; + -webkit-box-shadow: 0 0 0 6px #fff; + box-shadow: 0 0 0 6px #fff +} + +img { + height: auto; + width: inherit; + max-width: 100% +} + +embed, +iframe, +object { + margin-bottom: 1.5em; + max-width: 100% +} + +.wp-caption { + color: #666; + font-size: 13px; + font-size: .8125rem; + font-style: italic; + margin-bottom: 1.5em; + max-width: 100% +} + +.wp-caption img[class*=wp-image-] { + display: block; + margin-left: auto; + margin-right: auto +} + +.wp-caption .wp-caption-text { + margin: .8075em 0 +} + +.gallery { + margin-bottom: 1.5em +} + +.gallery-item { + display: inline-block; + text-align: center; + vertical-align: top; + width: 100% +} + +.gallery-item a, +.gallery-item a:focus, +.gallery-item a:hover { + -webkit-box-shadow: none; + box-shadow: none; + background: 0 0; + display: inline-block +} + +.gallery-columns-2 .gallery-item { + max-width: 50% +} + +.gallery-columns-3 .gallery-item { + max-width: 33.33% +} + +.gallery-columns-4 .gallery-item { + max-width: 25% +} + +.gallery-columns-5 .gallery-item { + max-width: 20% +} + +.gallery-columns-6 .gallery-item { + max-width: 16.66% +} + +.gallery-columns-7 .gallery-item { + max-width: 14.28% +} + +.gallery-columns-8 .gallery-item { + max-width: 12.5% +} + +.gallery-columns-9 .gallery-item { + max-width: 11.11% +} + +.gallery-caption { + display: block +} + +.mejs-container { + margin-bottom: 1.5em +} + +.mejs-controls a.mejs-horizontal-volume-slider, +.mejs-controls a.mejs-horizontal-volume-slider:focus, +.mejs-controls a.mejs-horizontal-volume-slider:hover { + background: 0 0; + border: 0 +} + +.wp-playlist-light { + border-color: #eee; + color: #222 +} + +.wp-playlist-light .wp-playlist-current-item .wp-playlist-item-album { + color: #333 +} + +.wp-playlist-light .wp-playlist-current-item .wp-playlist-item-artist { + color: #767676 +} + +.wp-playlist-light .wp-playlist-item { + border-bottom: 1px dotted #eee; + -webkit-transition: background-color .2s ease-in-out, border-color .2s ease-in-out, color .3s ease-in-out; + transition: background-color .2s ease-in-out, border-color .2s ease-in-out, color .3s ease-in-out +} + +.wp-playlist-light .wp-playlist-item:focus, +.wp-playlist-light .wp-playlist-item:hover { + border-bottom-color: transparent; + background-color: #767676; + color: #fff +} + +.wp-playlist-light .wp-playlist-item:focus a, +.wp-playlist-light .wp-playlist-item:hover a, +.wp-playlist-light a.wp-playlist-caption:hover { + color: #fff +} + +.wp-playlist-dark { + background: #222; + border-color: #333 +} + +.wp-playlist-dark .mejs-container .mejs-controls { + background-color: #333 +} + +.wp-playlist-dark .wp-playlist-caption { + color: #fff +} + +.wp-playlist-dark .wp-playlist-current-item .wp-playlist-item-album { + color: #eee +} + +.wp-playlist-dark .wp-playlist-current-item .wp-playlist-item-artist { + color: #aaa +} + +.wp-playlist-dark .wp-playlist-playing { + background-color: #333 +} + +.wp-playlist-dark .wp-playlist-item { + border-bottom: 1px dotted #555; + -webkit-transition: background-color .2s ease-in-out, border-color .2s ease-in-out, color .3s ease-in-out; + transition: background-color .2s ease-in-out, border-color .2s ease-in-out, color .3s ease-in-out +} + +.wp-playlist-dark .wp-playlist-item:focus, +.wp-playlist-dark .wp-playlist-item:hover { + border-bottom-color: transparent; + background-color: #aaa; + color: #222 +} + +.wp-playlist-dark .wp-playlist-item:focus a, +.wp-playlist-dark .wp-playlist-item:hover a, +.wp-playlist-dark a.wp-playlist-caption:hover { + color: #222 +} + +.wp-playlist { + padding: .625em .625em .3125em +} + +.wp-playlist-current-item .wp-playlist-item-title { + font-weight: 700 +} + +.wp-playlist-current-item .wp-playlist-item-album { + font-style: normal +} + +.wp-playlist-current-item .wp-playlist-item-artist { + font-size: 10px; + font-size: .625rem; + font-weight: 800; + letter-spacing: .1818em; + text-transform: uppercase +} + +.wp-playlist-item { + padding: 0 .3125em; + cursor: pointer +} + +.wp-playlist-item:last-of-type { + border-bottom: none +} + +.wp-playlist-item a { + padding: .3125em 0; + border-bottom: none +} + +.wp-playlist-item a, +.wp-playlist-item a:focus, +.wp-playlist-item a:hover { + -webkit-box-shadow: none; + box-shadow: none; + background: 0 0 +} + +.wp-playlist-item-length { + top: 5px +} + +.rtl th { + text-align: right +} + +.rtl ol { + counter-reset: item +} + +.rtl ol li:before { + left: auto; + right: -1.5em +} + +.rtl li>ol, +.rtl li>ul { + margin-left: 0; + margin-right: 1.5em +} + +.rtl .mejs-offscreen { + right: -10000px +} \ No newline at end of file diff --git a/assets/css/mt-preloader.css b/assets/css/mt-preloader.css new file mode 100644 index 0000000..d820687 --- /dev/null +++ b/assets/css/mt-preloader.css @@ -0,0 +1,56 @@ +#preloader-background { + background: #fff none repeat scroll 0 0; + height: 100%; + left: 0; + position: fixed; + top: 0; + width: 100%; + z-index: 99999 +} + +#preloader-background .preloader-wrapper { + left: 50%; + position: absolute; + top: 50%; + -webkit-transform: translate(-50%, -50%); + -moz-transform: translate(-50%, -50%); + -ms-transform: translate(-50%, -50%); + -o-transform: translate(-50%, -50%); + transform: translate(-50%, -50%) +} + +.sk-spinner-pulse { + width: 40px; + height: 40px; + margin: 40px auto; + background-color: #333; + border-radius: 100%; + -webkit-animation: sk-pulseScaleOut 1s infinite ease-in-out; + animation: sk-pulseScaleOut 1s infinite ease-in-out +} + +@-webkit-keyframes sk-pulseScaleOut { + 0% { + -webkit-transform: scale(0); + transform: scale(0) + } + + 100% { + -webkit-transform: scale(1); + transform: scale(1); + opacity: 0 + } +} + +@keyframes sk-pulseScaleOut { + 0% { + -webkit-transform: scale(0); + transform: scale(0) + } + + 100% { + -webkit-transform: scale(1); + transform: scale(1); + opacity: 0 + } +} \ No newline at end of file diff --git a/assets/css/mt-responsive.css b/assets/css/mt-responsive.css new file mode 100644 index 0000000..900a48a --- /dev/null +++ b/assets/css/mt-responsive.css @@ -0,0 +1,722 @@ +@media (max-width:1400px) { + + .mt-container, + .site-layout--boxed #page { + width: 1200px + } + + .top-featured-post-wrap .entry-header .entry-title { + font-size: 16px + } + + .entry-title { + font-size: 18px + } + + #colophon .widget .widget-title, + #secondary .widget .widget-title, + .mt-related-post-title { + font-size: 17px + } + + .single article .post-thumbnail { + margin-bottom: 0 + } + + .single .mt-related-posts-wrapper .entry-title { + font-size: 19px + } + + .mt-form-close { + font-size: 50px + } +} + +@media (max-width:1200px) { + + .mt-container, + .site-layout--boxed #page { + width: auto; + margin: 0 2% + } + + .site-layout--boxed .mt-container { + padding: 0 10px + } + + #top-header { + position: relative + } + + .mt-follow-title { + display: none + } + + .tags-wrapper { + margin: 0; + background: #212121; + opacity: 0; + position: absolute; + visibility: hidden; + top: 50%; + left: 0; + padding: 4px; + -webkit-transform: translateY(-50%); + -ms-transform: translateY(-50%); + -o-transform: translateY(-50%); + transform: translateY(-50%); + -webkit-transition: all .8s; + -o-transition: all .8s; + transition: all .8s; + width: 100% + } + + .trending-wrapper:hover .tags-wrapper { + opacity: 1; + visibility: visible; + left: 30% + } + + .top-featured-post-wrap .post-thumbnail .post-number { + width: 20px; + height: 20px; + line-height: 21px; + font-size: 12px + } + + .top-featured-post-wrap .post-thumbnail { + width: 30% + } + + .top-featured-post-wrap .mt-post-content { + width: 66% + } + + .top-featured-post-wrap .entry-header .entry-title { + font-size: 14px + } + + .posted-on a::before { + width: 18px; + right: -24px + } + + .posted-on a { + margin-right: 28px + } + + #mt-scrollup { + right: 10px + } + + #colophon .widget .widget-title, + #secondary .widget .widget-title, + .mt-related-post-title { + font-size: 14px + } + + #colophon .widget .widget-title::before, + #secondary .widget .widget-title::before, + .features-post-title::before, + .mt-related-post-title::before { + height: 2px; + top: 7px + } + + .custom-header .entry-title, + .custom-header .page-title { + font-size: 32px + } + + .single .entry-title { + font-size: 25px + } + + .single.post-cat, + .single.post-cats-list { + margin-bottom: 0 + } + + .mt-menu-search .mt-form-wrap .search-form .search-field { + height: 54px; + font-size: 20px + } + + .error-num { + font-size: 70px; + line-height: 90px + } + + .error-num span { + font-size: 36px + } + + h1 { + font-size: 28px + } + + #footer-menu li a { + padding: 0 10px + } + + .widget { + padding: 14px + } + + .custom-header { + padding: 54px 0 + } +} + +@media (max-width:979px) { + .top-header-nav { + float: none; + display: block; + text-align: center + } + + .site-branding { + float: none; + text-align: center; + display: block; + margin-bottom: 20px; + margin-top: 0 + } + + .logo-ads-wrap { + padding: 20px 0 30px + } + + .menu-toggle { + display: block + } + + .mt-social-menu-wrapper { + position: relative + } + + .header-widget-wrapper { + text-align: center; + float: none + } + + #site-navigation { + display: none; + position: absolute; + top: 90%; + left: 0; + width: 100%; + background: #0B0B0B; + float: none; + z-index: 9999 + } + + #site-navigation .mt-container { + border: none; + padding: 0 + } + + #site-navigation ul { + display: block + } + + #masthead #site-navigation ul li { + border-bottom: none; + display: block + } + + #site-navigation ul#primary-menu>li.menu-item-has-children>a, + #site-navigation #primary-menu ul>li.page_item_has_children>a { + padding-right: 0; + } + + #site-navigation ul li .sub-menu li a, + #site-navigation ul li .children li a { + padding: 10px 0; + } + + .trending-wrapper .wrap-label { + width: 100%; + text-align: center; + float: none; + margin: 0; + } + + #site-navigation ul li a, + .is-sticky #site-navigation ul li a { + line-height: 44px; + padding: 0; + border-bottom: 1px solid rgba(255,255,255,0.3); + } + + #site-navigation ul li a::after { + display: none + } + + #site-navigation ul li .children, + #site-navigation ul li .sub-menu { + position: static; + min-width: 100%; + opacity: 1; + top: 0; + left: 0; + visibility: visible; + display: none; + background: 0 0; + -webkit-transition: none; + -moz-transition: none; + -ms-transition: none; + -o-transition: none; + box-shadow: none; + transform: scaley(1); + -webkit-transform: scaley(1); + -ms-transform: scaley(1); + transform-origin: 0 0; + -webkit-transform-origin: 0 0; + -ms-transform-origin: 0 0 + } + + #site-navigation ul>li:hover>.children, + #site-navigation ul>li:hover>.sub-menu { + top: 0 + } + + #site-navigation ul li a.sub-toggle, + #site-navigation ul li a.sub-toggle:hover { + background: #fff none repeat scroll 0 0; + color: #333; + cursor: pointer; + display: block !important; + height: 24px; + line-height: 25px; + position: absolute !important; + right: 15px; + text-align: center; + top: 12px; + width: 24px; + padding: 0 !important; + } + + #site-navigation ul li .sub-menu li a.sub-toggle, + #site-navigation ul li .children li a.sub-toggle { + padding: 0; + line-height: 25px; + } + + #site-navigation ul>li.current-menu-ancestor .sub-toggle, + #site-navigation ul>li.current-menu-item .sub-toggle, + #site-navigation ul>li:hover>.sub-toggle { + background: #666 + } + + #site-navigation li.current-menu-item>.sub-toggle { + background: #fff none repeat scroll 0 0 + } + + #site-navigation li.current-menu-item>.sub-toggle i { + color: #d40234 + } + + #site-navigation li.menu-item-has-children>a::after, + #site-navigation li.page_item_has_children>a::after { + display: none + } + + #site-navigation ul.children li, + #site-navigation ul.sub-menu li { + text-align: center + } + + #site-navigation .menu-item-description, + #site-navigation .menu-item-description::after, + #site-navigation li.menu-item-has-children>a::before, + #site-navigation li.page_item_has_children>a::before { + display: none + } + + .mt-archive--block-grid-style article, + .mt-archive--masonry-style #mt-masonry article { + width: 97% + } + + .no-sidebar.mt-archive--block-grid-style article, + .no-sidebar.mt-archive--masonry-style #mt-masonry article { + width: 47% + } + + #bottom-footer { + font-size: 12px; + text-align: center + } + + #footer-navigation { + float: none; + width: 100%; + display: block; + text-align: center + } + + .navigation.pagination .nav-links .page-numbers.current, + .navigation.pagination .nav-links a.page-numbers, + .navigation.pagination .nav-links a.page-numbers:hover { + padding: 8px 12px + } + + .bttn, + .navigation .nav-links a, + button, + input[type=button], + input[type=reset], + input[type=submit] { + padding: 10px; + font-size: 12px + } + + .mt-author-bio { + font-size: 13px + } + + .single .mt-related-posts-wrapper .entry-title { + font-size: 15px + } + + input[type=email], + input[type=password], + input[type=search], + input[type=text], + input[type=url] { + height: 28px + } + + #respond, + .widget_archive a, + .widget_categories a, + .widget_meta a, + .widget_nav_menu li a, + .widget_pages li a, + .widget_recent_comments li, + .widget_recent_entries a, + .widget_rss li { + font-size: 13px + } + + .error-404.not-found { + width: 80% + } + + .entry-content { + font-size: 13px + } + + .entry-meta a { + font-size: 12px + } + + .posted-on a::before { + width: 14px; + right: -20px; + top: 8px + } +} + +@media (max-width:839px) { + + .front-slider-block, + .top-featured-post-main-wrapper { + width: 100%; + float: none + } + + .front-slider-wrapper { + margin: 0 0 40px 0 + } + + .front-slider-block { + width: 100%; + float: none; + margin-bottom: 40px + } + + .top-featured-post-wrap { + overflow: auto; + margin-right: -3% + } + + .top-featured-post-wrap .mt-single-post-wrap { + width: 47%; + float: left; + margin-bottom: 3%; + margin-right: 3% + } + + #top-footer.footer-column-four .mt-footer-widget { + width: 47% + } +} + +@media (max-width:768px) { + .entry-meta { + line-height: 1.5 + } + + .entry-meta a { + font-size: 12px + } + + .entry-header { + margin-top: 5px + } + + .posted-on a::before { + width: 11px; + right: -16px + } + + .posted-on a { + margin-right: 16px + } + + #primary, + #secondary, + .home.blog #primary, + .home.blog #secondary { + width: 100% + } + + .right-sidebar #primary .thumb-cat-wrap .wp-post-image { + width: 100% + } + + .mt-menu-search .mt-form-wrap .search-form .search-submit { + padding: 16px 46px + } + + .mt-menu-search .mt-form-wrap .search-form .search-field { + height: 48px; + font-size: 18px + } + + .mt-form-close { + font-size: 40px + } + + .trending-wrapper { + width: 100%; + position: relative; + margin-bottom: 10px + } + + .error-num { + font-size: 50px; + line-height: 70px + } + + .error-num span { + font-size: 30px + } + + h1 { + font-size: 20px + } + + .error404 h1 { + font-size: 20px + } + + .error404 .page-content { + font-size: 12px + } + + .error404 #primary { + padding: 20px 0 + } + + .slider-post-wrap { + height: 450px + } + + .mt-live-link { + float: none; + margin: 0 auto; + display: block; + text-align: center; + } +} + +@media (max-width:600px) { + .logged-in #page { + padding-top: 40px; + } + + body.logged-in { + margin-top: -50px; + } + + .logged-in .is-sticky .mt-social-menu-wrapper { + top: 0 !important; + } + + .top-featured-post-wrap { + margin-right: 0 + } + + .top-featured-post-wrap .mt-single-post-wrap { + width: 100%; + margin-right: 0 + } + + .archive-grid-post-wrapper, + .mt-archive--masonry-style .sophia-after-dark-content-masonry { + margin-left: 0 + } + + .mt-archive--block-grid-style article, + .mt-archive--masonry-style #mt-masonry article, + .no-sidebar.mt-archive--block-grid-style article, + .no-sidebar.mt-archive--masonry-style #mt-masonry article { + width: 100%; + margin-left: 0 + } + + .single .entry-title { + font-size: 18px + } + + .breadcrumbs .trail-items { + font-size: 12px + } + + .custom-header { + padding: 28px 0 + } + + .mt-related-posts-wrapper { + margin-left: 0 + } + + .mt-related-posts-wrapper article { + margin-left: 0; + margin-right: 0; + width: 100% + } + + .mt-related-posts-wrapper .post-cats-list a { + margin-top: 10px + } + + .head-tags-links a { + display: block + } + + .tags-wrapper { + position: static; + opacity: 1; + visibility: visible; + text-align: center; + width: 100%; + padding: 0; + transform: translate(0); + } + + .tags-wrapper a { + display: inline-block; + padding: 10px 0 5px; + } + + blockquote { + font-size: 14px + } + + .custom-header .entry-title, + .custom-header .page-title { + font-size: 28px + } + + #top-footer.footer-column-three .mt-footer-widget { + width: 97% + } +} + +@media (max-width:480px) { + .mt-social-icon-wrap li { + margin-right: 8px + } + + .menu-toggle { + padding: 9px 0 + } + + .single .post-info-wrap { + margin-top: 10px + } + + .mt-social-wrapper { + margin: 12px 0 12px + } + + .mt-search-icon { + font-size: 14px; + margin: 12px 0 12px 8px + } + + .single .post-cat, + .single .post-cats-list { + margin-bottom: 0 + } + + .single .mt-author-box .mt-author-info .mt-author-name { + font-size: 18px + } + + .mt-author-bio { + font-size: 12px + } + + .mt-author-meta { + font-size: 13px + } + + .comment-form-cookies-consent label { + margin-left: 0 + } + + .custom-header .entry-title, + .custom-header .page-title { + font-size: 18px + } + + p { + font-size: 13px + } + + .search-no-results #primary .search-submit { + margin-top: 18px; + font-size: 18px + } + + .error404 #primary { + padding: 0 + } + + .error-404.not-found { + width: 100%; + padding: 18px 0 18px 0 + } + + .error404 .page-title { + font-size: 16px + } + + .slider-post-wrap { + height: 360px + } + + .front-slider-block .post-info-wrap .entry-title { + font-size: 20px + } + + #top-footer.footer-column-four .mt-footer-widget, + #top-footer.footer-column-two .mt-footer-widget { + width: 97% + } +} \ No newline at end of file diff --git a/assets/images/archive-block-grid.png b/assets/images/archive-block-grid.png new file mode 100644 index 0000000000000000000000000000000000000000..352534bdb1f68ca1ca9d1f43610bbc88a633e492 GIT binary patch literal 1127 zcma)5TWHfz7>>$7heO?)7bHdoE!bRoTN~EtY+7wKvvx&0pOz(OYpBVI$?2L-2Rhi; z9(=OCjSVMLylkLD5PX=TAU>$C7|G zMi3kJsF^Ivibr`FYP95FXj?Ndn;_cu+lD0P0U~=rzp6*5PY)I-QdJ_<$$-d;Mik`K z!-FR18tlx-gLyfuQ2X1-Hk-!+8bA_hYo~RKw&gbF0JR9b@0J-*2IGU;S@o6Ex77OnpR1P77 zXP9EKNEdxHH2WDY91b(Am+^W%7~!!>I+ARUZtblq2*8p})j%rLNk>uYg#{F$u+vHk zno*P0t+g`Yf-$yaFdWS~DOG`@_;0AD)zB77gWrDtDr{v+24K>_f(28?7uUDf31#q6 z6G#Y}83<2TtC-3`1g#u2$Y_*wom6!N7A^NGTon0)ZXrpRK|+X7Sb$blg%1V;aV{Q= z2RI?Xaj{S++9AYa@mR?3XMMg{w8|BrT+o1ys$8YUZDs3nolejU99aOSIslZo2{m#x zV_vQA1skd7rNUL}dI`qrav5xfaqjhxd#)bg=5dy_uEm>L-vb>tyNSD+8eQi+ujPc$ zk+I)=T)xxvnB00`k?3ytI`wq2;Sx2r>EYeQ?;=0-WwU7|bF)MKt7APU-u--8np`T( z4yoMxiPp(i?)>a6xMKg9n_p?zvgdaDPx;B*eCoxuG80Oc4~{ptB(DhLY1i>-!CiJ8 zZ){1HT_csl=9$#=xwDT>Ep&amze2B^*>&&r%%ya4rhKtKe3||acKh(>(UDhN?^3tx u`tuLBZn|f7{&i9TI)o_-?MDa;-08U6+O6M4A+ literal 0 HcmV?d00001 diff --git a/assets/images/archive-classic.png b/assets/images/archive-classic.png new file mode 100644 index 0000000000000000000000000000000000000000..879f097ccc5971ae57507213798c98220744a6f1 GIT binary patch literal 1039 zcmaJ=PiWIn94_-R%X$=a7oXWc2R47xXwoT#+W^7$?6%>{xZ)@0+mnE+@tp{az zncK;O$Pk9R>OAPdgNP!?(8JJ!2Nl7SFdXi*i!kt|Ydc}q2g!TC$M=1|zi)AD^kO93 z8xDm+k=%%sC;JfjlB7f#ei z3wnK47Yu6nJQ(stB49zR0pFUlJ<(554PB9(gKLHY4G5l1QTss^)iIDoE(AQyM|GA< zfTTckJeL^c&Vm@r#ThovaPcS?6Inszc+gxF@#Y%SVqQ|3zKE5g${0H$!&IwPx*DgE zJHv2-ATVr5%p>|*8HgL^|cfv=;^NMU=!IOP}EAOf>RWUbUy{lY0KJPvrMF5 zjITKiN3%gnEugCYA8J``w1@NXAl`opdxe?u1v}qcmEGy|uLJ^W|QsFo`nU%MS;w`R(^oj*-+~OJs+;m57FbS4JJWJ3uuR}v|kp&tVi)QCok{$J$T%&U= zgB`gH35E&!`d6P@S7dmCV|!|e(Vlx~lVNwsR9|~~^*wnJw{udu;D6cv%7tHpo(tm> z^*fh$ZgN}v_SC}xDKQGa> zXOHWBYyQ#V$ImNE-I2pE=yk5uq7``-fX&4 z8AI{zP1#|>P9mrvI1hrJh8Mkfn4lLy1;xqmG?>10Yd6IDgXI0;`@Y}zd++yd=dy$C zZ7178p-_8fNXgT&kACUH`|1D8`SE!=oFJ(p8O9}2(OeXY8+ZbNjHOMYJkpHn%qpUc z1D$4}NQ&xJS;rQu1sK-19LlDG{l25=Q;2{GG-=u~=Ew6F3^0utGb*UO>LgLw9GY{{ z@LaZ_&rRu)!Sr7NeZEWuEJQTmThq2D`!S}jE7N(f%`u=3AyYAC+f-4_fh2Yj5Lh9s z^RNf>N-Pv$j|eY;2oIwiALU>)3?nix$xr}0!O(23QIhjYdM6iM#h5Z7j?8hDN`BW`0f>e&2bdg4|Tflg_ zaf-PzCfF-u2PBi=!l-E*xZ-u!;i@WUY>#NRjxtJ&p#rRF8nPlqlz6Yii;0v3VM*f0ITgN`m9KZ8)arNtTa`4>PKE LNoAFXiShYA34c?& literal 0 HcmV?d00001 diff --git a/assets/images/boxed-layout.png b/assets/images/boxed-layout.png new file mode 100644 index 0000000000000000000000000000000000000000..6b944a1603995d12297a7b14d5d8f28c67b33e4e GIT binary patch literal 1011 zcmb7D&ui0A9FGb*h6DAcm%U{N6>MH!+pJAo9BtCLf*GYNtjA@^Ya6%Z#pHEOdr@`} z1pfiS!@LgJKOjSQ^q`*f;Dm{YUPQrvKwrAH^I!!ZB<}~G&*%I3e&6>!s4U%_n!Gg0 zaokjSQLnOjo_)r|N%o(7vi?mdy%cMa&R*1QRL)I`TdsY)yvE_8{yu^%gYR0YA zY2Cb~*u)d81S7;=z}QT1Ar35i9aFG|o35|&Kb}43f$OOJie!prpy8Ig*bDJ;Z>eVY z)@|A07jA(0SYZMlrWT034L?$1mGA2+Y@HlK9`qq}UFDBV)y)dfNQi+XNGV%HS&)+j zB%y2`T?1(mWuTaWD3d~IMU)jJfx+New9siNRoxiGVmp;@Q5q-^b~+uQlMzVRgh-ZU zD5haLonnYo)b*(qr~GJksG#G>4&8vd#0QC@wMN=h<(bo?6ue+0>qmn!v4X+a3Lp~1 zB&8wHH2)3tyb(I0RebFCufkES8(>()5ow1uyST<|5-L!%5L=XlH9|IqRjjlKB~gn6 zK-0jL71wu2C%W2)o2F9sBWn3JF6%1K1O(T0lx)rrv(j9#n9CLsD&>n3%IR83G9*pT z&lzaQ)rsBquuq3v=a{RFjO%>sbs5s0q8KoD$C} z2n4F(8rCi-M8F7Qve&SjZ&<>A#2QohY=(fxcjNH_*G|vLpC{mj`169{6bfA1lM}?^ zg@@>@bapjSHlGv5W?A!jT=_IZ*65jq+<0cI0})1 zSjDpbq3l&G`QKtOl4LL|=lcK7c}*o5o|Wa-sg-QL&OJLwGVFZGR4>l}@?T~ZU^Pl^ z4`_J^_!$8G_X7SVkgu`|2ZKNotK|J^_-_}>jQ~s*um(&aAQ%9Kfgmu@@&h1Oa>XG4 z7y|ls`=z91pt2yyy6-@s6@%paRX|_}R7yr#b|U~tfuK@SaxzkXTfZ2j0oZ1lO$v%z zGBt27JUq#WZp|J-?{@dIq#~t1j^HizYiyhuTErc)5`GXA1c5-;cqMQE29?^R;d~j# zkR~HGE8s1wv}6>Qp91S8sexe-7+?W>zSZB?uovdqYGY%2EG)SOrI3&=wd-8hw32Hx zx{oSXP};2SDmNhBnz;%1^;%N?0MToUWGN{J(Fk6lr0!~n@UTG zD5Ld57vxQI76cpbo7h2-TGbnxHGa9+X5Cb+#g9h@)TN&DH-FN zH$K2Q$Y{#~=klF5;&xdXQ5J_zxn~R>g?b9`m31lPQq*yFSC_tvlS^9mFE>T+Kh12R zOP%VZ>YHEADlG1w79*%+_kyAkcUy6s)vnzk=L%rhF!;x%0puoAal}HCMr$RM580%Z z%_rBy+aM|zYn}2gB_^c4=aSR~H&t9?j7F7zPTR2U&!V*T-pY^=tt$Nd!Gsg8QMZA( zI9Z8Ee#2l$8yLJb9=v5NN?=|yJonlR$zR&?SLpSwxzgCE{0YzIkXS+NG%BzR^X~eU zms>+!b`NMy8Al~wEI;qm$KAh_mt6GBRc^eCZIVT#5?b#IN=uW@d%rlkQ#VB$7_%*? z4^oYjnO@Q{uceLUqkSa?N+9%f?-zYM9OndWty=heUsGEEVnF@Ivx(pz@e8z5E zl`+%kXu5Yl9@RcRR*dEnk9Do z=WmZ%av-PW?HgyQ3Gyf*+Unh?D7ERNHd8@(E?4WsV6T2}j_J{hh45;%H|n%|{q729 zaVZ&ML6Hx6{27_Ds2wbM>(Q#|hO~*9!J{GjWG!5xmwC%07GtIcRnpQ1^lZL3|{Q2V4ZOw6HGb>%~y;=wV3Q~Ah*YG`5>RQyc)1MN_=TC~7yC;@TldM~n z)GTHZDK;0*@wLjf(vOT5_|UX$td78a*E=8e!=?;^=%ltJ627ucq+2VvM2j8u;OW>v zsGaqpdKsaiZf^;BS6ni)v~<(tIP^kQ+2WBMzomu=HoIG1v>b}opIAI^zBenqWROIl z@57|vJ1l&N>vEvTM9qx7Es8~_EU13TDJHrpMK>2K7MkC0_&K05ye^@=ZJUjapU8|rRD9H`F=Pc-(2q8qXmAwa4B;ADTi9-!a8OodSw5sMW|TX z;IB9X#YI0Urh~SNcI-ioO(4aT7`TF$iM1E5@uwTstS!PcR6ymOd%p+O4DFku-)V3T zL5>;Ssk4~RB)MmO>_fC=(|4~u;@E`S&jPBa+?M9eRTYSlR zXz4TlI^t*GB)bs=KRrFy`rWvycHYqC(&i^uqK?Zpg-?$N%W3Kb*};q|BWb(O0jC zg>ixpvre}jtCh$|38FpI{#2-~&F1Y2E7+>o_2xxGliu`1&Z^M}bHqM6vgm`%Ve;Jr z>W}QjF2lo|2GG-#U{9Oszkv;w!d(2Rf~>L|BA>})aRHSo*#6XDadXg*{B1OfRhy!{ zXqWXg45;T4rH3=8Jiphi$?A1|nsNWe(B~@b-8*Fl`}~h_NhRv1e;CMNO@!GUMA%52P z_2Qq`h$y+j(!!VLl%wVgV>V1hbRa*(Vu<-AOGvZgt2H`_+}gi<7{_8gf^Kw4KjpfZ zjec0`aN!lPsIT$WtBK3uc_uFM-%ZX}Y@gBL@d(3l)3%1lD}$}kN&AL64OWf(gQJ=A zvyPMUy~pC~%r0czENrOniGtL?pI<-Y_XSAwD?C_#HX^jEe13{#0O{9s+^$rBcBYkA z@GrZ%)#>io`4-@H-3$VWda<>Zr~rzv%$=@WdbYhO^K|JvlQJ@bf8wC-Jy~E`vb6g( z_-d0ARD8Mhr@Jj%+~UpiZ|2BXP5su6i}7m9sW=>H{IJ3T)wB?x6FTjfNSk{(e(sJQ z8{JS+Ii+6zsak3LTH!zqNsT#>o9XkZCZle?LRDTk^*H#!p)6t6!9Gr7WOWTUy8nkv f>F&O?*^c#Q(XQQ%pLr??F=xgngk?*}<-z|0f|~{^ literal 0 HcmV?d00001 diff --git a/assets/images/default-sidebar.png b/assets/images/default-sidebar.png new file mode 100644 index 0000000000000000000000000000000000000000..98c862252578eab9c5a6e4b7ed66d1f408826bdf GIT binary patch literal 1717 zcmeAS@N?(olHy`uVBq!ia0vp^HbCsg!2~4b)f1Y4lw^r(L`iUdT1k0gQ7VIDN`6wR zf@f}GdTLN=VoGJ<$yA^YW~I!Kh>{3jAFJg2T)jk)8oi3#0-$c7f%X*ziOJciB??KY z>6v-9O7C~?S5nAKu~iB;^)>Jbs{}UJ3djZt>nkaMm6T-LDnT3-;TxdfoL`ixV5(=Vn`~fcs9E!^lV%s6w~6GOr}DLN~8i8D@e@YH@N=Wx*A$ZZ2GPaY;}r!o64xE)J_=yk@a7nBro3xGDeq!wkCrKY$Q<>xAZy=;|<+bxzj&4cPq z!R;1DoO<x7lGUH+JbJ9gt!PJZKc3H5Te=2y+_WPaxKkpWw*Veq~ z@4k3fnlxLiFkf3*1`7Ije!o@ z>fh%}-LPvCS8jXY_PJ(!d;OFdE{6wqMeGtkca4>M;{H~-c_H(Tb1jVg`sag;(M02U zdJ{i>@Yai7Q?_;1MwK~Rle6|&C{CYXByfsDeTH8D3E4@7t527_Zf^Ub{N4NKyB$uQ z57e7oTI~Mt7H7u$ww4}9w!QM!;nD2(M(Ka`rl|jjEsgv-{o8IiS8k3Mx!YqZXSNmY zxqa>ZR6RS-xi=rnbZWfiQ`UTNV`A&4Uj<^TL(+Bzw5sLQB>gH2d;9&>I@YJ(i&X<- zFWEfZ`dC=<y$k#y$Cshvr#GSU;`-NR(6WN#&xXMKB?s0OS4TVkiC&uRt`zUo#C<;H#=l;x!sQh&sp7Bn~x?5>@6%Uxfd+l8N0&i z@qRgf_0KzMx8G$Em8p7>aog;>(bMBDj7MstbGClu&Pr9SQaQHu+m^@`&KVYG*zPQx zp~QWv(}j8WwT{@71zRsjto~A>Fz5KN2|^azv^>d zmb-l9>egOR=fMAP*G8}DeG;>8E)dba60OuAk`UmK+pfSC+;v=w$3@F~J)@C?5F tUmt2&Gq3(n3TlExNuMw3P3yP}7=G@*BX+uAp8}{N@pScbS?83{1OT8Ho@)RA literal 0 HcmV?d00001 diff --git a/assets/images/footer-1.png b/assets/images/footer-1.png new file mode 100644 index 0000000000000000000000000000000000000000..a7a31d9660b8d3f473993d16afd4c7bb38fb0617 GIT binary patch literal 1002 zcmah|%Zt-M9F8t5%VPfkMR3So6m1@Tq)lkLZIgDlXiB#&Y()^$WZH&qGBKHM(q0z4 zs2BeTJ&1yWAbU~qD0=bWMfRpAQNf!hVV!i_t_Q0_GB3XG`#tAwy|xisJ+n$tRIIwG zHpsd`es<*~ne)TK9$8M~avL{M7YDirsiKKG5L9iw2OCf~M>pTX97QeBR;!KM+7-z_ zHls%vCbV6`rl{O{=<3D*V$gv-%aQ3HFJ9BYGG%%@t#O*Gz`nIP_F!{dYZ>E#A)54h z9^^ua2-pzoAhdTJUkYVJ~BK60w9)q#RM2+~Y4Zg4yg1cBjGX+hvG zfdt1VSdM%`oKHz`E*f1OXEy8RYd?UKGVhBaw&` zMBE=aSP$clzcy1)p>KGWi!J1UNKx;gA(m<4=}`!_JC}9*X_`pF*id&_p5da9WR`^W`KQvm0; zEyqNGe_?{xG^y(NSa%FqRb`qeFqUOX$z-;aN($MOSXOwxoGEf8t}Is6Y_^nC6)`j8 zs>m4H(7`jVdCV0Ta-&wTU1C{g;E750xp z&#p-KMB91WlEb|5p+maeBW?YBuX&$5iR)Fh*a{E6A3Tdu;M5XVc=_S*uz#*o_`KW_ zFLy5vy4`!bS05NZpWONK>Cxl;Yg_*vuim_u-+lc0?d*wVO8K?2wf``GJ9>T9a!q|& Hx^e3_rhYt& literal 0 HcmV?d00001 diff --git a/assets/images/footer-2.png b/assets/images/footer-2.png new file mode 100644 index 0000000000000000000000000000000000000000..d0603a1cd6ea2cb1b7d1e2ce27c8bbd68bcdcc1a GIT binary patch literal 1007 zcmah|PiWIn91fd@G3{w6OcWlOpaYxarERu`Wq+EqTh)}(cG#nD$y*z?6FjQ0DR>c2-gFo7Ab1c5ie9|<(ypC{s*mLTk@ukj4W4PS6- zby_#CsTOes6vqgW>oYXR&CEqUveqyKE4bl!8h`kFp9hYu@z*n^WcoU8I!l`Yu5OlU z*5;a(wfVVOFcYbaz{M1S$X)kBHPZMFugd1}w#b7{2wl_ouBf_M2095a$Ox&VB|!)j zMS$syqQJ{QmY^(3>{F63t!5Neo&raWXW0UKRjn9>qg-sI@l8s7RTSIpw$M%qBxr~* zo6W`?vYccQ$#BD?C`x+aM32G1p%pkjb%+OIMzlg&RO6Y_ZV9g6r}e_4V`2v;M#vYT zAjKv10!{PZp|0DH4rv7+>m5iO);4@BR&YpKfyFLvbs|pXt9pPDB|(jl_1-C#n}m|E zNqnGJ6>!N!mgB`6lO2RY~aATh3!H>T+k_6bp~izNTt*1!c>9rF%JyV z(#6^Xv~;o4aUFxPA`>IVSNq3R_qLdS;%VQwY|*zq_L$!TX6%L)5Vil_YdDcjGtgJUosx&Zru3|RX{hS literal 0 HcmV?d00001 diff --git a/assets/images/footer-3.png b/assets/images/footer-3.png new file mode 100644 index 0000000000000000000000000000000000000000..7cd09b02d4ffa1c02665b347eb76cecd30a6faf2 GIT binary patch literal 1004 zcmah|O=#0l91qsR7)poVO|8U3W66ef_f4J@v!5VcvTR*h@uyL>DtbN)kpHa`2BwW&v(0AT3eVuG0!l} zLUCQI&~=Ue{M;crFZWh&(&aeGH%Jw=NZ-Ja$ylffLD4bVumTNhaP19DGfafFYYo!S zFDWK+I3vVxf#Xp&!=zUN&oH}?fF^9)uF8IS{*nc@rLy&;F6dqkcI@>bhSg!IW)8ci zY_TiLARQ=Fz=6a7fwSrQN}#eMU4`z$Yn}xo28 zh{d855%mWyF@mV;FHRIR=$qK~h>ctjDjH4HBPvTh-4DU>rn0U-P7_TS9~d4lazYr= z1gPu(hC0p^?UM>T@b|C6er@1Ez5;#J!zL|UYcVwCDLD)cf^ZF?%}Ex^9Ym1dK_19e zC2*#0yB6yEXGeHlSBkDr4A+E3O=YP9XWNz%OJ%j37|$f+d`=YeOL8GAr;>u47X?|$ zXo(3|LuSu`E}3wx18#OEH*5vRqn0&@?d#AgVB~;N$cjDNm()zXG1r>yi#(IdQ)l?F zuzwVKaz(o*+)mq;9;S^CUE1xKwzW@Q|DsP~qo`$S!S3hXrwgxyxx=d`;i+#QBFFIE zqkE~3FCO0b^fmhUQS-`!?d|Uu?hkf$-q-KF-P`)_IM@8~?x+5Yi7;Dtj$Ax_^>QS9 Nf5m)Bdy?I_^&3{;MV0^n literal 0 HcmV?d00001 diff --git a/assets/images/footer-4.png b/assets/images/footer-4.png new file mode 100644 index 0000000000000000000000000000000000000000..b0b05bd3b52bbd5f15755b34b447e87aceb8965a GIT binary patch literal 1010 zcmah|&ui0A9M7D{EcD<(QE~W4MHFq)q-|zH)2&Uqt!PH+D)wlWytbiDUVM4AX)lU5 zuULY+CqdXya3J{7wVem6kL3OM^7(weKi>Dx(K**yxIvd=q*x=Xs7|^DhD_cziqX8?>uzJ_t!Yso~pR%hp zQqwQVCUQ6<#BhP*Q8vS5=L63$TabV?*sxuN{r2J&3v5eaucY;a?y0b8FZVHA?XOhL ze#^{Q?0gPn1DOgqkQg9v+O97L3Omr1={_{`EEqsYOJR3|s_A8*A`C&AOUBKFAOK0? zgj8CRg!4d52qK@LpA;8Ta$1tbIWQb7^@gpwT+tSXzUWC|n}m2W&v(0BuAAf#Zty}T zlL<9MF-{S2zvmJoh`WAlq@Y3H#I{Fl-xho(Sq@T;qd~O z2vZsXb^YH^#~Gu2Qh|H%{#Dqo_B_Z}ppQD(q!(9@g|0kV#n2!KR}pHDs#tC!g8U}( zfVwJyGrD2gZfH0=VCcGBa(!aBCM;X}ixatFGdLdgtU+vFht?uS4j3dY+mmA{Ow=24t;w;d6S+JM zh7YgykEk+`yJE9-g&mUMIVJ#((=_{i?`RL=Xr$0A$9=?Bh_`l=wo2~ob@3p56Ftgi- UE`B(8vk|_+QgKClT)2AcH?NC0y#N3J literal 0 HcmV?d00001 diff --git a/assets/images/full-width.png b/assets/images/full-width.png new file mode 100644 index 0000000000000000000000000000000000000000..328e1c47e39a2201e2e83fea501afe39d59a53d1 GIT binary patch literal 993 zcmb7DO^ee&7_KhJTBujii(?l20Gr9QjZMPFrAb;hU`pwh-Fj=9Oxw^+CMMHuTJW+r zFCw13?cI|HLBX>J{Q<)M07dY!Ab8P9x9xhc!VVauF-0n?vNfG+Y!!GT++qB^zA-wV%wcO`G^@~?WWgi)3)_U zafr{`DTYt{kg=KIRubCI5L3{_eJ@bCAMZYJz;jh@PqYLp)bYUEoP#?n0EwJ0%e&;A}UGf z9w-Q?2!$d<#XKq~f~+7B%m>G!MQ%@N8nt;Wwo|zQrJ(}hcs%CEMV>@`h-6uYLID;E zd4|ZxlYrVuK8QCK3I>jy$P1}Q0+1@&T{5C7$DE#~;D<}uAfA_r6$~bJ2oW!&DJ_7O z^?#`EFVQh=;xoVh6pmYy5W^;p$tZHz#q~DQP@$qn*rp_E5wgFiVq-uki3cPEx(@E_ zd4WsD@!c8RvJ^9jsU0}jG*pfW@Sf)?W%0hQm!yhTE@=o=r3xyGhE%F)lBiXXSX^)o z;*5M8&;{2$<7z9pX(#w0i)`S?JHT!&B0iX9taz)vNGtW`Tz9n>c_kMzGcdi^zwUW) z#F{5vF1wa(mVJ){*6b1M>LcO(EA}FGO{3CEzI^|DA(s)>*Mx)Lw=QdMue{u?6pzhs k&ySyuUc5QiIQevPwUf#IyoA0!{&kc-I28pQT{;C8SW22j5lN*4Svvd(k#-SOIt5u=LMdsMl3YSs zK;TNaD6yCC-@WrZXU@zs=f}+XHA(kO^=K$>Q33#H4D_`vu2}U7y5!fc@@+xq=qsY| z)3*%-fa>PIAOiWXSplFldjN&ryXWN_&I;Xg>w4^_8Tnc;k#k!>Qlc0$1Vnf!=nWHjiszWjJ8$Udkg)d`B@(BmM!jG%7o$$5 zoF!Z5d7B#ZE-`uVY$g1i_jDV6bL6sVMt!UL2-P@B)*tZiNI;3s;cOn4zkaHC}fg~9CVlzbVzX|5a@Owc@9KTu|yp~ z8F!7yqZol^SSq9xXzCJ0p>hQ*K@kaX9&&SC1NX#%v*7d1Nf3oP%?l?2_OE!Dh>9`* z_f3yPZQ!K>szhX>|F+JA}$eK zP8~KEkN!lep5srxe_rK7$~YqRNKU_Z4IdkqaE!jBh;?1qOw&7WrXrkkPTuJ;aK*qy z7}v}h{8P2_UmVGl+)0AG6#mLTL2zGP7CR$WUzP{;57mjnGsMds-H3l13DU!ZI#%%j z9Jcy)eiI@mj`E6G84V^JXk6$O@q;K&gO~mQ+}GxlfDJZk^pOLgU4#^=*J3~JWEJZm z<>*<2fLnz&&I0Br7tD_-8@gwz|BF>WEG&$uu%)R0>{b(h+tUl4I z`O*D#AusF{YC}?xX!Vodbm5s#ByvrL^QMxs%EpQaA&lj``vN+#R$NJ^r&8}i|<7)7Sr(1$zK)K$H=>aDAZTa!-Q zMn43TFd%h0C=^J7A>1xpTKaHfxaq8ZIX4HN+>Ln(MGE3r^De0x!1 zkxqc?i}6k~q}`OH4^M>lDDp8RL1hFn>DLTCyoXINOz2KLw&2|st0<7uzr~w5Fz@c& zK&JFcj9aunZXLDWy)L`XzRq)KPlM?n%DVNDQ-qQAy3)tjSwmEME8rbw7eyZY*YTndXeyObl)7 z{mA)2d>l+o6VDXWmxvHzD_|vKMX&|4*5w+PvQ4J2^}(bRrFV0;^62t>t>7YPk!MU9 zgOpi@Spr$?B9gF*%F@cEN-C=(t07og#eK_&T3sty%e4xMZ`oB=m8g5Wmh6^@3YGGN zN<_IYOyhl|?L`u)ZMSi^8T7q*(Fdoswq9;3H@3zQF&=N4s`w{J`5u7}BXiH5inQil zaJHtXRaO)$L1hhPZ5l0(UU_Pet>yZkz78^_*b*wsIf_hPVmuID6=pA$GsZ}JICxiP z=VZgH^sCIP^mf}7YWK=erR_Scwr5CMtv*9R2SGhV8umJB%W}?gv5c~e*+fnGq*kKR zyM(>CRXh00CpcD4(#6GNAyKY185tlO2^?xWit z$Jr^_mcXs-92<3OP&NG1tu?J>H_9-knWj~R(}?c+U+4jJMKfFd#w;nW7VU$Ma6!1T zAez6{cJF7lXGXL{{Bxm3Mw2i{Tg7R|85#I7fKl06c_|v8tBBmzE4KRPSB zhQ2u@-17isSum-GU_oF4V~!G2l8mBH%-o)YnuMmt>Y~orV=Vn){oF%({IGo#K|E&v^;%gfPN5D2w7JLJ%h* zwUGAL&Q8Og@q9_uP{w)uZkXHCdQpVYV$w>Bu8H30tl{zM|CwIHgWt-QLmJE zs5-CMBG;nPE8%H7JOxL=4IUYBC`pLaDm;GldHHL)c^JVpw^JE{Qj?5$A+&wpTw?YEbnL#Zj&?T^EhFCaqTel#CYfnKG-|v&pHA zY!?VK@kZY79E|R4BJ$p)vZCCGi`ZS5*>g05OWH0sx%`bsv8yvBCD$_ISaO)2&k8Ms zY_KQz4t~j7c=fTOst4mf>N(-Ly}2Y_XiuA6nX{Qg`Nza+x`OJigB!-u7GW=M>Jq4S%6N@EK=C zWMwktIpuL?aMp;|s7u50Eylqc zvme&p6z+-NW-nC4E*`gs{$eIfPZcVuEw&$p`QpFgPnMY%BLf64utTkL!GilWZDwsw z$C`UubI`?vDGmF}h1r9J=MOuAi;l(@^zfu{F{76mCuwxh>uGsuL-926yM=evm6TRB z0xq`C%b=s~qXLC2mv1kJYFU^iBTuJxXRzbB(7T1%dxVvOt#ES0ts>M(Yc$fIPU7-0E_QSr?0wK+9CsOEm+9>&v|LuSZ@03V{B`A z=)+TME@<#5GD{#k{bvK;0iG}I4U+V*{Xp8TlvQf%f5XWj+d}RlWf<3ju6ZVIr2Q-v zI{Clz|E~#2*x_Lgiikk=h2D3cH_;7!&)5&FkF0#V6%!-Leqj004&%004{+008|`004nN004b?008NW002DY000@xb3BE2000U( zX+uL$P-t&-Z*ypGa3D!TLm+T+Z)Rz1WdHz3$DNjUR8-d%htIutdZEoQ0#b(FyTAa_ zdy`&8VVD_UC<6{NG_fI~0ue<-nj%P0#DLLIBvwSR5EN9f2P6n6F&ITuEN@2Ei>|D^ z_ww@lRz|vC zuzLs)$;-`!o*{AqUjza0dRV*yaMRE;fKCVhpQKsoe1Yhg01=zBIT!&C1$=TK@rP|Ibo3vKKm@PqnO#LJhq6%Ij6Hz*<$V$@wQAMN5qJ)hzm2h zoGcOF60t^#FqJFfH{#e-4l@G)6iI9sa9D{VHW4w29}?su;^hF~NC{tY+*d5%WDCTX za!E_i;d2ub1#}&jF5T4HnnCyEWTkKf0>c0%E1Ah>(_PY1)0w;+02c53Su*0<(nUqK zG_|(0G&D0Z{i;y^b@OjZ+}lNZ8Th$p5Uu}MTtq^NHl*T1?CO*}7&0ztZsv2j*bmJyf3G7=Z`5B*PvzoDiKdLpOAxi2$L0#SX*@cY z_n(^h55xYX#km%V()bZjV~l{*bt*u9?FT3d5g^g~#a;iSZ@&02Abxq_DwB(I|L-^b zXThc7C4-yrInE_0gw7K3GZ**7&k~>k0Z0NWkO#^@9q0fwx1%qj zZ=)yBuQ3=54Wo^*!gyjLF-e%Um=erBOdIALW)L%unZshS@>qSW9o8Sq#0s#5*edK% z>{;v(b^`kbN5rY%%y90wC>#%$kE_5P!JWYk;U;klcqzOl-UjcFXXA75rT9jCH~u<) z0>40zCTJ7v2qAyk54cquI@7b&LHdZ`+zlTss6bJ7%PQ)z$cROu4wBhpu-r)01) zS~6}jY?%U?gEALn#wiFzo#H}aQ8rT=DHkadR18&{>P1bW7E`~Y4p3)hWn`DhhRJ5j z*2tcg9i<^OEt(fCg;q*CP8+7ZTcWhYX$fb^_9d-LhL+6BEtPYWVlfKTBusSTASKKb%HuWJzl+By+?gkLq)?+BTu761 zjmyXF)a;mc^>(B7bo*HQ1NNg1st!zt28YLv>W*y3CdWx9U8f|cqfXDAO`Q48?auQq zHZJR2&bcD49Ip>EY~kKEPV6Wm+eXFV)D)_R=tM0@&p?(!V*Qu1PXHG9o^ zTY0bZ?)4%01p8F`JoeS|<@=<@RE7GY07EYX@lwd>4oW|Yi!o+Su@M`;WuSK z8LKk71XR(_RKHM1xJ5XYX`fk>`6eqY>qNG6HZQwBM=xi4&Sb88?zd}EYguc1@>KIS z<&CX#T35dwS|7K*XM_5Nf(;WJJvJWRMA($P>8E^?{IdL4o5MGE7bq2MEEwP7v8AO@ zqL5!WvekBL-8R%V?zVyL=G&{be=K4bT`e{#t|)$A!YaA?jp;X)-+bB;zhj`(vULAW z%ue3U;av{94wp%n<(7@__S@Z2PA@Mif3+uO&y|X06?J#oSi8M;ejj_^(0<4Lt#wLu#dYrva1Y$6_o(k^&}yhSh&h;f@JVA>W8b%o zZ=0JGnu?n~9O4}sJsfnnx7n(>`H13?(iXTy*fM=I`sj`CT)*pTHEgYKqqP+u1IL8N zo_-(u{qS+0<2@%BCt82d{Gqm;(q7a7b>wu+b|!X?c13m#p7cK1({0<`{-e>4hfb-U zsyQuty7Ua;Ou?B?XLHZaol8GAb3Wnxcu!2v{R_`T4=x`(GvqLI{-*2AOSimk zUAw*F_TX^n@STz9kDQ z$NC=!KfXWC8h`dn#xL(D3Z9UkR7|Q&Hcy#Notk!^zVUSB(}`#4&lYA1f0h2V_PNgU zAAWQEt$#LRcH#y9#i!p(Udq2b^lI6wp1FXzN3T;~FU%Lck$-deE#qz9yYP3D3t8{6 z?<+s(e(3(_^YOu_)K8!O1p}D#{JO;G(*OVf32;bRa{vGf6951U69E94oEQKA0Jup+ zK~#8N?bJaEgD?<4(WKW9?|(0C&tXlOii_gTN%{E?B(wdDNqsKMRtEBja~KBG8BAv| zoxyYl(-}->FrC442Gb1}T(@1!LvX`aUh5ju|C#1FrfWW0bOzHIOlL5i!E^@G8BAv| zoxyYl(-}->FrC442Gbc#XE2??bOzHIOxHEI*82G}bqhX+W=8uKLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN{S}1|}gUOHJxc?wV3fxuz+mJ4`!F$IZ;mqRrNsHJd##*D~ju=bP7?-?v~|cv>vB zsJ6IeNwVZxrdjT`yl#bBIa#GxRa#xMMy;K#CDyyGyQdMSxlWT#tDe?p!?5wT$+oGt z8L;Kp2HUQ-ZMJ=3XJQv;x5ci*?vuTfeY$;({XGW_huIFR9a(?@3)XSs8O^N5RyOM=TTmp(3=8^+zpz2r)C z^>JO{deZfso3oq3?Wo(Y?l$ge?uXo;%ru`Vo>?<<(8I_>;8Eq#KMS9gFl*neeosSB zfoHYnBQIkwkyowPu(zdms`p{<7e4kra-ZWq<2*OsGTvEV%s0Td$hXT+!*8Bnh2KMe zBmZRodjHV?r+_5^X9J0WL4jKW`}lf%A-|44I@@LTvf1rHjG(ze6+w@Jt%Bvjts!X0 z?2xS?_ve_-kiKB_KiJlZ$9G`c^=E@oNG)mWWaNo-3TIW8)$Hg0Ub-~8?KhvJ>$ z3*&nim@mj(aCxE5!t{lw7O5^0EIO7zOo&c6l<+|iDySBWCGrz@C5{St!X3hAA}`T4 z(TLbXTq+(;@<=L8dXnssyft|w#WSTW<++3>sgS%(4NTpeI-VAqb|7ssJvzNHgOZVu zaYCvgO_R1~>SyL=cFU|~g|hy|Zi}}s9+d~lYqOB71z9Z$wnC=pR9Yz4DhIM>Wmjgu z&56o6maCpC&F##y%G;1PobR9i?GnNg;gYtchD%p19a!eQtZF&3JaKv33gZ<8D~47E ztUS1iwkmDaPpj=$m#%)jCVEY4fnLGNg2A-`YwHVD3gv};>)hAvT~AmqS>Lr``i7kw zJ{5_It`yrBmlc25DBO7E8;5VoznR>Ww5hAaxn$2~(q`%A-YuS64wkBy=9dm`4cXeX z4c}I@?e+FW+b@^RDBHV(wnMq2zdX3SWv9u`%{xC-q*U}&`cyXV(%rRT*Z6MH?i+i& z_B8C(+grT%{XWUQ+f@NoP1R=AW&26{v-dx)iK^-Nmiuj8txj!m?Z*Ss1N{dh4z}01 z)YTo*JycSU)+_5r4#yw9{+;i4Ee$peRgIj+;v;ZGdF1K$3E%e~4LaI(jC-u%2h$&R z9cLXcYC@Xwnns&bn)_Q~Te?roKGD|d-g^8;+aC{{G(1^(O7m37Y1-+6)01cN&y1aw zoqc{T`P^XJqPBbIW6s}d4{z_f5Om?vMgNQEJG?v2T=KYd^0M3I6IZxbny)%vZR&LD zJpPl@Psh8QyPB@KTx+@RdcC!KX7}kEo;S|j^u2lU7XQ}Oo;f|;z4Ll+_r>@1-xl3| zawq-H%e&ckC+@AhPrP6BKT#_XdT7&;F71j}Joy zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=0000WV@Og>004R=004l4008;_004mL004C`008P>0026e000+nl3&F} z00010!4xV4goGM2Vre#_2PH_BLd7KvpE*YW6*4X%l_8`GH9SPFh$_?~NriFA(!y*h zTSf?74u%*w2Bk)c=*6HxnWNHi3|xYhoP(|{ZioO{Q}o$fLYSp0m?lgBd1@^JGAInP zlnMudEH(vZz(K+AQjkW4=@69;!E`cA<51Zgm;u_1fL7DWGC7HSfvpz0;}UF5<>%*9 z^63<{HVcB;Y&JxtK{Of}%^>RvRC=+2tkU_9G4K(cRIAYF6>1e|VH8W$d3r7ZRr(x5BS_ATUATd>;lBx4`i>>KGAtzd;(~DJ7B%049pac|!LdK!;U}i)R zgUyGTOc;(}1vA6w0zQioL8bFx9)mZA<*TK6N<^g}!^$SGVN+r)lc3a~mHCKPu^y2L zv}z@2?U!@VgNIJvzsvNxY^)#7z`Rkzwy9y7v>HCj{^ii2o{3}?C=;Y9%JqV zO2&juyne?S4)$0lYrP4lr4Ku-3;M@7ILvm!Vr(JQ>1OZl;D~qim|N!uKS;?6BXs-s z1of^eWtM&XoEAth_tS%)aH3i1xYWJ*JyuZS6Rouw| z(PoQL7g|CrP-I~b^aMEeWMyW-Esft-etOs;fA-SOOU{e zrP|W;GQP%WJ7$Zm>3n&3#9H+#=1GZwBIb`k8@%*WHYf;p0bfZI$Pr z@Nn|?-LrhVZ&&`pxZX7~O7Q)FsCf#akX_9&tFtN&$R)1Ev?}q|*s78(onE-T$GO`d z=;`}|4)18>=hn%(Qg#j!jp?E_PO+c3X4Wix;hwtDWeEc3L{}D9b&A&FRxp$1c2*pY zZj11^Ta2A%fWf-JDvMt~^Hrp%pSgSlU5TfaL4?susCK79jU0Z|Lk8*>q^n{fe%1 z@i2~5>eoPQ3@@*wO1XC+)k$_`A@TR!$g#@5Z#G`&dU?4;ekL`OUj#MAr=R}r z%A5Wh`S#3joGH0B4T(=DuRNJVlghc0?&~kyG3xdBy2v~9!Rmx1By9kRqUAH5l9t`5 zGt!=6Ja+9qRYS~at=`wpy%KZx4Oe;6}d} z+mD(S6r88FrxAR;W=+doc;3aD?cp?UsVQrCn^vS)MlcyY&au1e@8lXAnuZ>_S6?&V F`Um9d37`M~ literal 0 HcmV?d00001 diff --git a/assets/images/post-layout-2.jpg b/assets/images/post-layout-2.jpg new file mode 100644 index 0000000000000000000000000000000000000000..3fad38324cae64ebe0c6adc39129c309b76a78be GIT binary patch literal 1983 zcma)5Yfuwc6y7ADD4;|^M6fQ2G)g6#B?*uSVoZQi3?c@kzAz+K{}$fE@nv8@W&ibxTu7IY|D6%j2J6{;W{nS0LtzVAHtT*GZc zCotPjD~|?%z(7~P0vI>LQ-Caplf>u%0$_%Rr2t^)B)Q5kOvQyDrG_q+qEQH4f+`@b zSOvj!1_XHfYE@!M41$4C$R@echw|*)1qvva`cPK0g$$vJkI3X7C#sQEiNPXCVvK|% zrT8uZy|rAeLZv`3F{o94}fp~GyL|spHb5?Hwg~I=bDip>6m}E6rC^BB}JB2kOoeF_M5e*urmLNEsY9y<;d^IA*P_+m} zV@IbLB117$BSTdnpARlrEmum>1kFMdTqxuQDm9o`DM11SJ``MlE|*KWJeG$CpXJ98 zz#eQE_Ve^&vzUCQr=NhijOW2%GDo=rR1&8^l-MX&I?jbBUu35(xM${*7I{@4-+9kSzdzz?(!M14J@`L?##- zfIavVC*j)Tj~|#c*}|MK)s*k8C;$)%BpU!QBM~QCO)(!Okj%^p#7Q%4$<8zEW_g5P zKXaoiEG|1br*yJ?Kg<(T+*zW4EmUS&r3;y0R4^lrGV#HXiSWu9&OC8S{}#Tx;SOMh zUlPeAGT;lm(p8iv<`Ox_nh|L#7=uVU}*8}wBTl{$K?EWPTa37F($)9@j3 z%PA`Aq1~YCnTNYDO(fAWr@vv`(eI=k3@cm2FF7=9v+gkL{YwQWYOd3*y6s(^yB~$g zn{2ut)tcGUtX8;}2Si7U{{RbCL8UPpI%5U1_1&m9kQ9<+S@8yMmboxlopmbhCK9=~;xz|}FTA28C z;YC{$q9)lgQ4w+ST5{Rd!`x#jLVl!3u3xw;^HCZ#J#89oc0MfES5?l6y*}qtT9ubwj+0;Fr+op;r!GxyD9DY8R4Z*_nkcu+nTk; zw>83F)x~Z%x)3&Sg#>>i(LC3285bM2? z-b}N_pW`sMNDFp$0(|U#?+&p;Pj5*Y$1840g~+?Hx5kzviFhSRnf5ylvs_(ojjV6p zobbw2k*qT~c-4S(PUByp+4h1)wpUJ3Sk~i?UHJ~Jhl=aY)?GXilo5S7*XcH6spFi} z;o{=wuYSDN{#`+4bxz}`gF$W?7yWu)#N}6S?B1}}VdtLqz9);7Keg0UF|F;ZJ8s5z z>?qR39vN1(t)L`{VuULSvYKz`G~YCr=bgBm-oRX5+!3hHUBcTRL>It6L(@-D#hm6_ M5$h%E?i5>jXN36XXXR5}!p!6Bp@hLRjY zx&)4dpu`;hyK{5a^Q`^e?2EnE)rx;;q)kQ6Mh*a=($�y{6K&wMcJV&pQJ45!WE| z(Xo6600sTOCIGo_SpXn6c85YAK6LZ;_kQN)?Zc%Dg>w1$dAqtlaRDH34rPXbnQb#E zpDrFl^y83k^u0|PNx4iRiAaVtej#o$TD>^#!dXU>_FI~oMC^S9afHdq$RtJ+Vaf#Z z8Im>b_sNkT;t~eVmqR{yPBouy3}4kxt87*tq3T9R+DIugb)-yWkd$Q*&Rahsd%Jp; z*F@FA$@zQ$Eoq%I_p?i00&o_lq;#LBjpQ332%MlG1#O0TZQ{3M@iaS-92){;6hWJR z+5>%3Bm+=?= z=w0G8fSV$y9C?(W3E<*@!BxLY9?XaUaa{{n9q_pUv|(u}Y5^%F5I2d7z6XdxfPEh? zZy<=u0SsD)7D~VFSJQ3^T_=@OtAyc`*9^BN74appun^@G#OgBNXOMNc;gG8)+7Xn) zDj6u--P1F_WASgdR^n%Yier=ih8J3sW((v+HYXGkRSRYli`g&?`iT zU7N+_lRsff7pEsbzOC?uOWKBO6P^9&7&xh91 zF|3-<`6g@RCLKu@@x()3-|N0Rj(1*J5lH_L2giQ4lWlS)Kj3okh5f z_;&lv`F4s6d)X)mUsnf&7DDcfyzOUyuQCE67&H8tL&#q2yBdddn~7UYx(~Hzhxu1( zWgnWq4y5_*g3aM%MCyH{^bXu}aRiPDaNcB6=A7s=?sgp_x`SG;YDg+!|BiMVJ_C#2?qFj>0OU=2?tWknC$=SP)J8nRkFasNajo&Ero7w2WqHy%Y`p3HbIzW% zB=T>Bx$gHxuc6jD*QD0i*SHU@$x)7Kz8}xbRs>B4JoH%CY1gIKiCwZK)y+TTnl6+U z!fwf=SV5`^(WakFVoT|zpXbUCM>6T^7gfE_m|$~bb~|+!hYO*FUNWW) zkZ0&+@Mo|KiNVUsi^~_wDa?<|2Vp5?kIh1>walf=R?En~XI7Y(qaN;>v6~^v6iZ{v z5vATR)sJD8m+{1wod%u8(2phsHFm4bJzNw{taX9H+@4ewG0($gy7+5`XJ5V$YRbOk zXi8KrFDsOXO6f^i)R`W=aaAQ*&GtQe>u*H1DOi$q6qc~aaBy$s9(%F00Y<{b#8x4$w!Q%#Ih)L%lLXL zaftQeewjdRJJp~?4jB$v%TZ~VF{KZaTK{O#B)Rw4tn#gT^?3Ds;3wwi=GQmeG2G8J zHN+I(D^@g6H0T{38h$@Kl_Qgju> zwvx9jf}2~})@fCts_srTRW+5|D!~|~8&%{_Av!<*LieM~8dyKC&k*CP(O&3K2ZSRt zqM^IGb3eT$J+v|OpG##Ds@PfT3JxoduxDTV7!)2UEaqb0?yH7&A7^fhA>bplBQsK~ zX!^l>UG6Beya{atGXnE0@+dAbUO!?`G)qM^kG*H1uVqco|HRjJIe7d8l~tr2W2zMIGQ>TXD#MJS#^H$iOCX*C z0p+I-2h1wJRs7zqs;nx>ElMt0+6~FIHS{$M8h3i<+eI%yU-9Cd@xk~pP=dTmfFO(y zR}Z(oaefy3lDjooRRQPnyLNU@J*fbr&ZwReQ5CV?Ud8R!_cOJM`*brKn}&6#j(!-n zH8o1&u;Gx{8Ad4(9UE;Cqnhj!2WK0T$dU;dn}9sj--ckT912B%&uHq*5;G zp)@DgDBY;qBkF27Gzmw+b)V?pmKPPOmVNr<+tS6}QS1t8g<>^?Ia{pH)+eYC+i@IS z!c-NMKSsoA{_9ImP!x#S|#5g9Qi8a&HFKrh%1%8CZL79CXFlhEV8P@ zTKIzvJ;NWj4@9)r6L{`Yn3JzZhwjc#@7Wr|#VnWV9sb6k*i{(g6RH_-%vp@DW(4O0 z*V$ve2U>IH-+U>n=)yRUxQ@GSZ!C)BTT^G2XKiFrKc$+T`$Dz!=*!;8Z%v$7*03P1 zDH09Ed}vkr+U!!&j~!N2g?)q_!~Vi#_s19N9j4Eoj_tFDH2;?VIf=7wKD|`w|AsRs zFgKiZopd?ZJ+C`et&T6>KFd7!vaK@m^4;qt94EXa;iX1TW4=#vj4Q)TQ>O0kYE$># z`F4dm2oRx?r858LZO;m?k4Dhi_9@xYDJPY}+>4};%4L#?J1;m89AX}j+{0Y0JhR+$ zYe(xw;~|x?sh!2(3vJvTnzzzQmO*+)uzvTs?TCqV#NkL1DgzZ7Ci-XI9`_y{vgw3f z@}TiPXr%RD9@oStZYnk_Vr>q;`XAQf*6A(2TI7CGu=CpS-%+|spD^xidfSv+jj{2> z><72hhq#_@v**iU7mizkelg*vCiCT$7g~;jy-&MOPnMV#!u$j-v4c&s0RsC~&Bo1k z$7*}(v(SauNmc8s`I&?HR~~Hv1xI7^+NZ?Pkt0`WCn+@0n<+UdgE3SwyZH}PyeH~>5L04QVw!0i3nu3PJR_r0!$IxKMR=Ufd{q&V%(QN=eR zJiqOt5+t~WmSO41#++!BHMv$*|_wp#hDJ#(x3oUEt+n!j6R zxpgEhA2<4cW%oKKXO=#AbE@e;nzQ6Z;^6*~*G2H~yWm~C#Dx!SN=WJ3)aAnk->-)r fh`&?-;PHgODw4XA$)Vr-`dXl?X{1pNv5)vK+oXT2 literal 0 HcmV?d00001 diff --git a/assets/js/customizer.js b/assets/js/customizer.js new file mode 100644 index 0000000..aeccfad --- /dev/null +++ b/assets/js/customizer.js @@ -0,0 +1,42 @@ +/** + * File customizer.js. + * + * Theme Customizer enhancements for a better user experience. + * + * Contains handlers to make Theme Customizer preview reload changes asynchronously. + */ + +( function( $ ) { + + // Site title and description. + wp.customize( 'blogname', function( value ) { + value.bind( function( to ) { + $( '.site-title a' ).text( to ); + } ); + } ); + wp.customize( 'blogdescription', function( value ) { + value.bind( function( to ) { + $( '.site-description' ).text( to ); + } ); + } ); + + // Header text color. + wp.customize( 'header_textcolor', function( value ) { + value.bind( function( to ) { + if ( 'blank' === to ) { + $( '.site-title, .site-description' ).css( { + 'clip': 'rect(1px, 1px, 1px, 1px)', + 'position': 'absolute' + } ); + } else { + $( '.site-title, .site-description' ).css( { + 'clip': 'auto', + 'position': 'relative' + } ); + $( '.site-title a, .site-description' ).css( { + 'color': to + } ); + } + } ); + } ); +} )( jQuery ); \ No newline at end of file diff --git a/assets/js/mt-admin-scripts.js b/assets/js/mt-admin-scripts.js new file mode 100644 index 0000000..7550e0f --- /dev/null +++ b/assets/js/mt-admin-scripts.js @@ -0,0 +1,73 @@ +/** + * Image up-loader functions + */ +var mtSelector; +function upload_media_image(mtSelector){ +// ADD IMAGE LINK + jQuery('body').on( 'click', mtSelector , function( event ){ + event.preventDefault(); + + var imgContainer = jQuery(this).closest('.attachment-media-view').find( '.thumbnail-image'), + placeholder = jQuery(this).closest('.attachment-media-view').find( '.placeholder'), + imgIdInput = jQuery(this).siblings('.upload-id'); + + // Create a new media frame + frame = wp.media({ + title: 'Select or Upload Image', + button: { + text: 'Use Image' + }, + multiple: false // Set to true to allow multiple files to be selected + }); + + // When an image is selected in the media frame... + frame.on( 'select', function() { + + // Get media attachment details from the frame state + var attachment = frame.state().get('selection').first().toJSON(); + + // Send the attachment URL to our custom image input field. + imgContainer.html( '' ); + placeholder.addClass('hidden'); + imgIdInput.val( attachment.url ).trigger('change'); + }); + + // Finally, open the modal on click + frame.open(); + + }); +} + +function delete_media_image(mtSelector){ + // DELETE IMAGE LINK + jQuery('body').on( 'click', mtSelector, function( event ){ + + event.preventDefault(); + var imgContainer = jQuery(this).closest('.attachment-media-view').find( '.thumbnail-image'), + placeholder = jQuery(this).closest('.attachment-media-view').find( '.placeholder'), + imgIdInput = jQuery(this).siblings('.upload-id'); + + // Clear out the preview image + imgContainer.find('img').remove(); + placeholder.removeClass('hidden'); + + // Delete the image id from the hidden input + imgIdInput.val( '' ).trigger('change'); + + }); +} + +jQuery(document).ready(function($){ + "use strict"; + + /** + * Radio Image control in metabox + */ + $( '.mt-meta-options-wrap .buttonset' ).buttonset(); + + /** + * Image up-loader + */ + upload_media_image('.mt-upload-button'); + delete_media_image('.mt-delete-button'); +}); \ No newline at end of file diff --git a/assets/js/mt-combine-scripts.js b/assets/js/mt-combine-scripts.js new file mode 100644 index 0000000..0de5be3 --- /dev/null +++ b/assets/js/mt-combine-scripts.js @@ -0,0 +1,52 @@ +/*! + * imagesLoaded PACKAGED v4.1.4 + * JavaScript is all like "You images are done yet or what?" + * MIT License + */ +!function(e,t){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",t):"object"==typeof module&&module.exports?module.exports=t():e.EvEmitter=t()}("undefined"!=typeof window?window:this,function(){function e(){}var t=e.prototype;return t.on=function(e,t){if(e&&t){var i=this._events=this._events||{},n=i[e]=i[e]||[];return n.indexOf(t)==-1&&n.push(t),this}},t.once=function(e,t){if(e&&t){this.on(e,t);var i=this._onceEvents=this._onceEvents||{},n=i[e]=i[e]||{};return n[t]=!0,this}},t.off=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){var n=i.indexOf(t);return n!=-1&&i.splice(n,1),this}},t.emitEvent=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){i=i.slice(0),t=t||[];for(var n=this._onceEvents&&this._onceEvents[e],o=0;oe;e++){var i=h[e];t[i]=0}return t}function n(t){var e=getComputedStyle(t);return e||a("Style returned "+e+". Are you running this code in a hidden iframe on Firefox? See http://bit.ly/getsizebug1"),e}function o(){if(!d){d=!0;var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style.boxSizing="border-box";var i=document.body||document.documentElement;i.appendChild(e);var o=n(e);r.isBoxSizeOuter=s=200==t(o.width),i.removeChild(e)}}function r(e){if(o(),"string"==typeof e&&(e=document.querySelector(e)),e&&"object"==typeof e&&e.nodeType){var r=n(e);if("none"==r.display)return i();var a={};a.width=e.offsetWidth,a.height=e.offsetHeight;for(var d=a.isBorderBox="border-box"==r.boxSizing,l=0;u>l;l++){var c=h[l],f=r[c],m=parseFloat(f);a[c]=isNaN(m)?0:m}var p=a.paddingLeft+a.paddingRight,g=a.paddingTop+a.paddingBottom,y=a.marginLeft+a.marginRight,v=a.marginTop+a.marginBottom,_=a.borderLeftWidth+a.borderRightWidth,z=a.borderTopWidth+a.borderBottomWidth,E=d&&s,b=t(r.width);b!==!1&&(a.width=b+(E?0:p+_));var x=t(r.height);return x!==!1&&(a.height=x+(E?0:g+z)),a.innerWidth=a.width-(p+_),a.innerHeight=a.height-(g+z),a.outerWidth=a.width+y,a.outerHeight=a.height+v,a}}var s,a="undefined"==typeof console?e:function(t){console.error(t)},h=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],u=h.length,d=!1;return r}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("desandro-matches-selector/matches-selector",e):"object"==typeof module&&module.exports?module.exports=e():t.matchesSelector=e()}(window,function(){"use strict";var t=function(){var t=window.Element.prototype;if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],i=0;is?"round":"floor";r=Math[a](r),this.cols=Math.max(r,1)},n.getContainerWidth=function(){var t=this._getOption("fitWidth"),i=t?this.element.parentNode:this.element,n=e(i);this.containerWidth=n&&n.innerWidth},n._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth%this.columnWidth,i=e&&1>e?"round":"ceil",n=Math[i](t.size.outerWidth/this.columnWidth);n=Math.min(n,this.cols);for(var o=this.options.horizontalOrder?"_getHorizontalColPosition":"_getTopColPosition",r=this[o](n,t),s={x:this.columnWidth*r.col,y:r.y},a=r.y+t.size.outerHeight,h=n+r.col,u=r.col;h>u;u++)this.colYs[u]=a;return s},n._getTopColPosition=function(t){var e=this._getTopColGroup(t),i=Math.min.apply(Math,e);return{col:e.indexOf(i),y:i}},n._getTopColGroup=function(t){if(2>t)return this.colYs;for(var e=[],i=this.cols+1-t,n=0;i>n;n++)e[n]=this._getColGroupY(n,t);return e},n._getColGroupY=function(t,e){if(2>e)return this.colYs[t];var i=this.colYs.slice(t,t+e);return Math.max.apply(Math,i)},n._getHorizontalColPosition=function(t,e){var i=this.horizontalColIndex%this.cols,n=t>1&&i+t>this.cols;i=n?0:i;var o=e.size.outerWidth&&e.size.outerHeight;return this.horizontalColIndex=o?i+t:this.horizontalColIndex,{col:i,y:this._getColGroupY(i,t)}},n._manageStamp=function(t){var i=e(t),n=this._getElementOffset(t),o=this._getOption("originLeft"),r=o?n.left:n.right,s=r+i.outerWidth,a=Math.floor(r/this.columnWidth);a=Math.max(0,a);var h=Math.floor(s/this.columnWidth);h-=s%this.columnWidth?0:1,h=Math.min(this.cols-1,h);for(var u=this._getOption("originTop"),d=(u?n.top:n.bottom)+i.outerHeight,l=a;h>=l;l++)this.colYs[l]=Math.max(d,this.colYs[l])},n._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var t={height:this.maxY};return this._getOption("fitWidth")&&(t.width=this._getContainerFitWidth()),t},n._getContainerFitWidth=function(){for(var t=0,e=this.cols;--e&&0===this.colYs[e];)t++;return(this.cols-t)*this.columnWidth-this.gutter},n.needsResizeLayout=function(){var t=this.containerWidth;return this.getContainerWidth(),t!=this.containerWidth},i}); + +/*! WOW - v1.1.3 - 2016-05-06 +* Copyright (c) 2016 Matthieu Aussaguel;*/(function(){var a,b,c,d,e,f=function(a,b){return function(){return a.apply(b,arguments)}},g=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};b=function(){function a(){}return a.prototype.extend=function(a,b){var c,d;for(c in b)d=b[c],null==a[c]&&(a[c]=d);return a},a.prototype.isMobile=function(a){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(a)},a.prototype.createEvent=function(a,b,c,d){var e;return null==b&&(b=!1),null==c&&(c=!1),null==d&&(d=null),null!=document.createEvent?(e=document.createEvent("CustomEvent"),e.initCustomEvent(a,b,c,d)):null!=document.createEventObject?(e=document.createEventObject(),e.eventType=a):e.eventName=a,e},a.prototype.emitEvent=function(a,b){return null!=a.dispatchEvent?a.dispatchEvent(b):b in(null!=a)?a[b]():"on"+b in(null!=a)?a["on"+b]():void 0},a.prototype.addEvent=function(a,b,c){return null!=a.addEventListener?a.addEventListener(b,c,!1):null!=a.attachEvent?a.attachEvent("on"+b,c):a[b]=c},a.prototype.removeEvent=function(a,b,c){return null!=a.removeEventListener?a.removeEventListener(b,c,!1):null!=a.detachEvent?a.detachEvent("on"+b,c):delete a[b]},a.prototype.innerHeight=function(){return"innerHeight"in window?window.innerHeight:document.documentElement.clientHeight},a}(),c=this.WeakMap||this.MozWeakMap||(c=function(){function a(){this.keys=[],this.values=[]}return a.prototype.get=function(a){var b,c,d,e,f;for(f=this.keys,b=d=0,e=f.length;e>d;b=++d)if(c=f[b],c===a)return this.values[b]},a.prototype.set=function(a,b){var c,d,e,f,g;for(g=this.keys,c=e=0,f=g.length;f>e;c=++e)if(d=g[c],d===a)return void(this.values[c]=b);return this.keys.push(a),this.values.push(b)},a}()),a=this.MutationObserver||this.WebkitMutationObserver||this.MozMutationObserver||(a=function(){function a(){"undefined"!=typeof console&&null!==console&&console.warn("MutationObserver is not supported by your browser."),"undefined"!=typeof console&&null!==console&&console.warn("WOW.js cannot detect dom mutations, please call .sync() after loading new content.")}return a.notSupported=!0,a.prototype.observe=function(){},a}()),d=this.getComputedStyle||function(a,b){return this.getPropertyValue=function(b){var c;return"float"===b&&(b="styleFloat"),e.test(b)&&b.replace(e,function(a,b){return b.toUpperCase()}),(null!=(c=a.currentStyle)?c[b]:void 0)||null},this},e=/(\-([a-z]){1})/g,this.WOW=function(){function e(a){null==a&&(a={}),this.scrollCallback=f(this.scrollCallback,this),this.scrollHandler=f(this.scrollHandler,this),this.resetAnimation=f(this.resetAnimation,this),this.start=f(this.start,this),this.scrolled=!0,this.config=this.util().extend(a,this.defaults),null!=a.scrollContainer&&(this.config.scrollContainer=document.querySelector(a.scrollContainer)),this.animationNameCache=new c,this.wowEvent=this.util().createEvent(this.config.boxClass)}return e.prototype.defaults={boxClass:"wow",animateClass:"animated",offset:0,mobile:!0,live:!0,callback:null,scrollContainer:null},e.prototype.init=function(){var a;return this.element=window.document.documentElement,"interactive"===(a=document.readyState)||"complete"===a?this.start():this.util().addEvent(document,"DOMContentLoaded",this.start),this.finished=[]},e.prototype.start=function(){var b,c,d,e;if(this.stopped=!1,this.boxes=function(){var a,c,d,e;for(d=this.element.querySelectorAll("."+this.config.boxClass),e=[],a=0,c=d.length;c>a;a++)b=d[a],e.push(b);return e}.call(this),this.all=function(){var a,c,d,e;for(d=this.boxes,e=[],a=0,c=d.length;c>a;a++)b=d[a],e.push(b);return e}.call(this),this.boxes.length)if(this.disabled())this.resetStyle();else for(e=this.boxes,c=0,d=e.length;d>c;c++)b=e[c],this.applyStyle(b,!0);return this.disabled()||(this.util().addEvent(this.config.scrollContainer||window,"scroll",this.scrollHandler),this.util().addEvent(window,"resize",this.scrollHandler),this.interval=setInterval(this.scrollCallback,50)),this.config.live?new a(function(a){return function(b){var c,d,e,f,g;for(g=[],c=0,d=b.length;d>c;c++)f=b[c],g.push(function(){var a,b,c,d;for(c=f.addedNodes||[],d=[],a=0,b=c.length;b>a;a++)e=c[a],d.push(this.doSync(e));return d}.call(a));return g}}(this)).observe(document.body,{childList:!0,subtree:!0}):void 0},e.prototype.stop=function(){return this.stopped=!0,this.util().removeEvent(this.config.scrollContainer||window,"scroll",this.scrollHandler),this.util().removeEvent(window,"resize",this.scrollHandler),null!=this.interval?clearInterval(this.interval):void 0},e.prototype.sync=function(b){return a.notSupported?this.doSync(this.element):void 0},e.prototype.doSync=function(a){var b,c,d,e,f;if(null==a&&(a=this.element),1===a.nodeType){for(a=a.parentNode||a,e=a.querySelectorAll("."+this.config.boxClass),f=[],c=0,d=e.length;d>c;c++)b=e[c],g.call(this.all,b)<0?(this.boxes.push(b),this.all.push(b),this.stopped||this.disabled()?this.resetStyle():this.applyStyle(b,!0),f.push(this.scrolled=!0)):f.push(void 0);return f}},e.prototype.show=function(a){return this.applyStyle(a),a.className=a.className+" "+this.config.animateClass,null!=this.config.callback&&this.config.callback(a),this.util().emitEvent(a,this.wowEvent),this.util().addEvent(a,"animationend",this.resetAnimation),this.util().addEvent(a,"oanimationend",this.resetAnimation),this.util().addEvent(a,"webkitAnimationEnd",this.resetAnimation),this.util().addEvent(a,"MSAnimationEnd",this.resetAnimation),a},e.prototype.applyStyle=function(a,b){var c,d,e;return d=a.getAttribute("data-wow-duration"),c=a.getAttribute("data-wow-delay"),e=a.getAttribute("data-wow-iteration"),this.animate(function(f){return function(){return f.customStyle(a,b,d,c,e)}}(this))},e.prototype.animate=function(){return"requestAnimationFrame"in window?function(a){return window.requestAnimationFrame(a)}:function(a){return a()}}(),e.prototype.resetStyle=function(){var a,b,c,d,e;for(d=this.boxes,e=[],b=0,c=d.length;c>b;b++)a=d[b],e.push(a.style.visibility="visible");return e},e.prototype.resetAnimation=function(a){var b;return a.type.toLowerCase().indexOf("animationend")>=0?(b=a.target||a.srcElement,b.className=b.className.replace(this.config.animateClass,"").trim()):void 0},e.prototype.customStyle=function(a,b,c,d,e){return b&&this.cacheAnimationName(a),a.style.visibility=b?"hidden":"visible",c&&this.vendorSet(a.style,{animationDuration:c}),d&&this.vendorSet(a.style,{animationDelay:d}),e&&this.vendorSet(a.style,{animationIterationCount:e}),this.vendorSet(a.style,{animationName:b?"none":this.cachedAnimationName(a)}),a},e.prototype.vendors=["moz","webkit"],e.prototype.vendorSet=function(a,b){var c,d,e,f;d=[];for(c in b)e=b[c],a[""+c]=e,d.push(function(){var b,d,g,h;for(g=this.vendors,h=[],b=0,d=g.length;d>b;b++)f=g[b],h.push(a[""+f+c.charAt(0).toUpperCase()+c.substr(1)]=e);return h}.call(this));return d},e.prototype.vendorCSS=function(a,b){var c,e,f,g,h,i;for(h=d(a),g=h.getPropertyCSSValue(b),f=this.vendors,c=0,e=f.length;e>c;c++)i=f[c],g=g||h.getPropertyCSSValue("-"+i+"-"+b);return g},e.prototype.animationName=function(a){var b;try{b=this.vendorCSS(a,"animation-name").cssText}catch(c){b=d(a).getPropertyValue("animation-name")}return"none"===b?"":b},e.prototype.cacheAnimationName=function(a){return this.animationNameCache.set(a,this.animationName(a))},e.prototype.cachedAnimationName=function(a){return this.animationNameCache.get(a)},e.prototype.scrollHandler=function(){return this.scrolled=!0},e.prototype.scrollCallback=function(){var a;return!this.scrolled||(this.scrolled=!1,this.boxes=function(){var b,c,d,e;for(d=this.boxes,e=[],b=0,c=d.length;c>b;b++)a=d[b],a&&(this.isVisible(a)?this.show(a):e.push(a));return e}.call(this),this.boxes.length||this.config.live)?void 0:this.stop()},e.prototype.offsetTop=function(a){for(var b;void 0===a.offsetTop;)a=a.parentNode;for(b=a.offsetTop;a=a.offsetParent;)b+=a.offsetTop;return b},e.prototype.isVisible=function(a){var b,c,d,e,f;return c=a.getAttribute("data-wow-offset")||this.config.offset,f=this.config.scrollContainer&&this.config.scrollContainer.scrollTop||window.pageYOffset,e=f+Math.min(this.element.clientHeight,this.util().innerHeight())-c,d=this.offsetTop(a),b=d+a.clientHeight,e>=d&&b>=f},e.prototype.util=function(){return null!=this._util?this._util:this._util=new b},e.prototype.disabled=function(){return!this.config.mobile&&this.util().isMobile(navigator.userAgent)},e}()}).call(this); + +/*! + * Theia Sticky Sidebar v1.7.0 + * https://github.com/WeCodePixels/theia-sticky-sidebar + * + * Glues your website's sidebars, making them permanently visible while scrolling. + * + * Copyright 2013-2016 WeCodePixels and other contributors + * Released under the MIT license + */ +!function(i){i.fn.theiaStickySidebar=function(t){function e(t,e){var a=o(t,e);a||(console.log("TSS: Body width smaller than options.minWidth. Init is delayed."),i(document).on("scroll."+t.namespace,function(t,e){return function(a){var n=o(t,e);n&&i(this).unbind(a)}}(t,e)),i(window).on("resize."+t.namespace,function(t,e){return function(a){var n=o(t,e);n&&i(this).unbind(a)}}(t,e)))}function o(t,e){return t.initialized===!0||!(i("body").width().theiaStickySidebar:after {content: ""; display: table; clear: both;}')),e.each(function(){function e(){a.fixedScrollTop=0,a.sidebar.css({"min-height":"1px"}),a.stickySidebar.css({position:"static",width:"",transform:"none"})}function o(t){var e=t.height();return t.children().each(function(){e=Math.max(e,i(this).height())}),e}var a={};if(a.sidebar=i(this),a.options=t||{},a.container=i(a.options.containerSelector),0==a.container.length&&(a.container=a.sidebar.parent()),a.sidebar.parents().css("-webkit-transform","none"),a.sidebar.css({position:a.options.defaultPosition,overflow:"visible","-webkit-box-sizing":"border-box","-moz-box-sizing":"border-box","box-sizing":"border-box"}),a.stickySidebar=a.sidebar.find(".theiaStickySidebar"),0==a.stickySidebar.length){var s=/(?:text|application)\/(?:x-)?(?:javascript|ecmascript)/i;a.sidebar.find("script").filter(function(i,t){return 0===t.type.length||t.type.match(s)}).remove(),a.stickySidebar=i("
").addClass("theiaStickySidebar").append(a.sidebar.children()),a.sidebar.append(a.stickySidebar)}a.marginBottom=parseInt(a.sidebar.css("margin-bottom")),a.paddingTop=parseInt(a.sidebar.css("padding-top")),a.paddingBottom=parseInt(a.sidebar.css("padding-bottom"));var r=a.stickySidebar.offset().top,d=a.stickySidebar.outerHeight();a.stickySidebar.css("padding-top",1),a.stickySidebar.css("padding-bottom",1),r-=a.stickySidebar.offset().top,d=a.stickySidebar.outerHeight()-d-r,0==r?(a.stickySidebar.css("padding-top",0),a.stickySidebarPaddingTop=0):a.stickySidebarPaddingTop=1,0==d?(a.stickySidebar.css("padding-bottom",0),a.stickySidebarPaddingBottom=0):a.stickySidebarPaddingBottom=1,a.previousScrollTop=null,a.fixedScrollTop=0,e(),a.onScroll=function(a){if(a.stickySidebar.is(":visible")){if(i("body").width()a.container.width())return void e()}var r=i(document).scrollTop(),d="static";if(r>=a.sidebar.offset().top+(a.paddingTop-a.options.additionalMarginTop)){var c,p=a.paddingTop+t.additionalMarginTop,b=a.paddingBottom+a.marginBottom+t.additionalMarginBottom,l=a.sidebar.offset().top,f=a.sidebar.offset().top+o(a.container),h=0+t.additionalMarginTop,g=a.stickySidebar.outerHeight()+p+b0?Math.min(y,h):Math.max(y,c-a.stickySidebar.outerHeight()),y=Math.max(y,u),y=Math.min(y,S-a.stickySidebar.outerHeight());var k=a.container.height()==a.stickySidebar.outerHeight();d=(k||y!=h)&&(k||y!=c-a.stickySidebar.outerHeight())?r+y-a.sidebar.offset().top-a.paddingTop<=t.additionalMarginTop?"static":"absolute":"fixed"}if("fixed"==d){var v=i(document).scrollLeft();a.stickySidebar.css({position:"fixed",width:n(a.stickySidebar)+"px",transform:"translateY("+y+"px)",left:a.sidebar.offset().left+parseInt(a.sidebar.css("padding-left"))-v+"px",top:"0px"})}else if("absolute"==d){var x={};"absolute"!=a.stickySidebar.css("position")&&(x.position="absolute",x.transform="translateY("+(r+y-a.sidebar.offset().top-a.stickySidebarPaddingTop-a.stickySidebarPaddingBottom)+"px)",x.top="0px"),x.width=n(a.stickySidebar)+"px",x.left="",a.stickySidebar.css(x)}else"static"==d&&e();"static"!=d&&1==a.options.updateSidebarHeight&&a.sidebar.css({"min-height":a.stickySidebar.outerHeight()+a.stickySidebar.offset().top-a.sidebar.offset().top+a.paddingBottom}),a.previousScrollTop=r}},a.onScroll(a),i(document).on("scroll."+a.options.namespace,function(i){return function(){i.onScroll(i)}}(a)),i(window).on("resize."+a.options.namespace,function(i){return function(){i.stickySidebar.css({position:"static"}),i.onScroll(i)}}(a)),"undefined"!=typeof ResizeSensor&&new ResizeSensor(a.stickySidebar[0],function(i){return function(){i.onScroll(i)}}(a))})}function n(i){var t;try{t=i[0].getBoundingClientRect().width}catch(i){}return"undefined"==typeof t&&(t=i.width()),t}var s={containerSelector:"",additionalMarginTop:0,additionalMarginBottom:0,updateSidebarHeight:!0,minWidth:0,disableOnResponsiveLayouts:!0,sidebarBehavior:"modern",defaultPosition:"relative",namespace:"TSS"};return t=i.extend(s,t),t.additionalMarginTop=parseInt(t.additionalMarginTop)||0,t.additionalMarginBottom=parseInt(t.additionalMarginBottom)||0,e(t,this),this}}(jQuery); + +/** + * Sticky Plugin v1.0.2 for jQuery + * ======================================= + * + * Author: Anthony Garand + * + * Improvements by German M. Bravo (Kronuz) and Ruud Kamphuis (ruudk) + * Improvements by Leonardo C. Daronco (daronco) + * Created: 2/14/2011 + * Date: 16/04/2015 + * Website: http://labs.anthonygarand.com/sticky + * + * Description: Makes an element on the page stick on the screen as you scroll + * It will only set the 'top' and 'position' of your element, you + * might need to adjust the width in some cases. + */ +!function(t){var e=Array.prototype.slice,i=Array.prototype.splice,r={topSpacing:0,bottomSpacing:0,className:"is-sticky",wrapperClassName:"sticky-wrapper",center:!1,getWidthFrom:"",widthFromWrapper:!0,responsiveWidth:!1},n=t(window),s=t(document),o=[],c=n.height(),a=function(){for(var e=n.scrollTop(),i=s.height(),r=i-c,a=e>r?r-e:0,p=0;ph||null===l.currentTop&&h
").attr("id",c).addClass(i.wrapperClassName);e.wrapAll(a);var p=e.parent();i.center&&p.css({width:e.outerWidth(),marginLeft:"auto",marginRight:"auto"}),"right"==e.css("float")&&e.css({float:"none"}).parent().css({float:"right"}),p.css("height",s),i.stickyElement=e,i.stickyWrapper=p,i.currentTop=null,o.push(i)})},update:a,unstick:function(e){return this.each(function(){for(var e=t(this),r=-1,n=o.length;n-- >0;)o[n].stickyElement.get(0)===this&&(i.call(o,n,1),r=n);-1!=r&&(e.unwrap(),e.css({width:"",position:"",top:"",float:""}))})}};window.addEventListener?(window.addEventListener("scroll",a,!1),window.addEventListener("resize",p,!1)):window.attachEvent&&(window.attachEvent("onscroll",a),window.attachEvent("onresize",p)),t.fn.sticky=function(i){return l[i]?l[i].apply(this,e.call(arguments,1)):"object"!=typeof i&&i?void t.error("Method "+i+" does not exist on jQuery.sticky"):l.init.apply(this,arguments)},t.fn.unstick=function(i){return l[i]?l[i].apply(this,e.call(arguments,1)):"object"!=typeof i&&i?void t.error("Method "+i+" does not exist on jQuery.sticky"):l.unstick.apply(this,arguments)},t(function(){setTimeout(a,0)})}(jQuery); + +/*! lightslider - v1.1.6 - 2016-10-25 +* https://github.com/sachinchoolur/lightslider +* Copyright (c) 2016 Sachin N; Licensed MIT */ +!function(a,b){"use strict";var c={item:3,autoWidth:!1,slideMove:1,slideMargin:10,addClass:"",mode:"slide",useCSS:!0,cssEasing:"ease",easing:"linear",speed:400,auto:!1,pauseOnHover:!1,loop:!1,slideEndAnimation:!0,pause:2e3,keyPress:!1,controls:!0,prevHtml:"",nextHtml:"",rtl:!1,adaptiveHeight:!1,vertical:!1,verticalHeight:500,vThumbWidth:100,thumbItem:10,pager:!0,gallery:!1,galleryMargin:5,thumbMargin:5,currentPagerPosition:"middle",enableTouch:!0,enableDrag:!0,freeMove:!0,swipeThreshold:40,responsive:[],onBeforeStart:function(a){},onSliderLoad:function(a){},onBeforeSlide:function(a,b){},onAfterSlide:function(a,b){},onBeforeNextSlide:function(a,b){},onBeforePrevSlide:function(a,b){}};a.fn.lightSlider=function(b){if(0===this.length)return this;if(this.length>1)return this.each(function(){a(this).lightSlider(b)}),this;var d={},e=a.extend(!0,{},c,b),f={},g=this;d.$el=this,"fade"===e.mode&&(e.vertical=!1);var h=g.children(),i=a(window).width(),j=null,k=null,l=0,m=0,n=!1,o=0,p="",q=0,r=e.vertical===!0?"height":"width",s=e.vertical===!0?"margin-bottom":"margin-right",t=0,u=0,v=0,w=0,x=null,y="ontouchstart"in document.documentElement,z={};return z.chbreakpoint=function(){if(i=a(window).width(),e.responsive.length){var b;if(e.autoWidth===!1&&(b=e.item),ie.responsive[0].breakpoint)for(var g in f)f.hasOwnProperty(g)&&(e[g]=f[g]);e.autoWidth===!1&&t>0&&v>0&&b!==e.item&&(q=Math.round(t/((v+e.slideMargin)*e.slideMove)))}},z.calSW=function(){e.autoWidth===!1&&(v=(o-(e.item*e.slideMargin-e.slideMargin))/e.item)},z.calWidth=function(a){var b=a===!0?p.find(".lslide").length:h.length;if(e.autoWidth===!1)m=b*(v+e.slideMargin);else{m=0;for(var c=0;b>c;c++)m+=parseInt(h.eq(c).width())+e.slideMargin}return m},d={doCss:function(){var a=function(){for(var a=["transition","MozTransition","WebkitTransition","OTransition","msTransition","KhtmlTransition"],b=document.documentElement,c=0;c'+e.prevHtml+''+e.nextHtml+""),e.autoWidth?z.calWidth(!1)
'),p=g.parent(".lSSlideWrapper"),e.rtl===!0&&p.parent().addClass("lSrtl"),e.vertical?(p.parent().addClass("vertical"),o=e.verticalHeight,p.css("height",o+"px")):o=g.outerWidth(),h.addClass("lslide"),e.loop===!0&&"slide"===e.mode&&(z.calSW(),z.clone=function(){if(z.calWidth(!0)>o){for(var b=0,c=0,d=0;d=o+e.slideMargin));d++);var f=e.autoWidth===!0?c:e.item;if(fh.length-1-g.find(".clone.right").length;j--)q--,h.eq(j).remove();for(var k=g.find(".clone.right").length;f>k;k++)g.find(".lslide").eq(k).clone().removeClass("lslide").addClass("clone right").appendTo(g),q++;for(var l=g.find(".lslide").length-g.find(".clone.left").length;l>g.find(".lslide").length-f;l--)g.find(".lslide").eq(l-1).clone().removeClass("lslide").addClass("clone left").prependTo(g);h=g.children()}else h.hasClass("clone")&&(g.find(".clone").remove(),a.move(g,0))},z.clone()),z.sSW=function(){l=h.length,e.rtl===!0&&e.vertical===!1&&(s="margin-left"),e.autoWidth===!1&&h.css(r,v+"px"),h.css(s,e.slideMargin+"px"),m=z.calWidth(!1),g.css(r,m+"px"),e.loop===!0&&"slide"===e.mode&&n===!1&&(q=g.find(".clone.left").length)},z.calL=function(){h=g.children(),l=h.length},this.doCss()&&p.addClass("usingCss"),z.calL(),"slide"===e.mode?(z.calSW(),z.sSW(),e.loop===!0&&(t=a.slideValue(),this.move(g,t)),e.vertical===!1&&this.setHeight(g,!1)):(this.setHeight(g,!0),g.addClass("lSFade"),this.doCss()||(h.fadeOut(0),h.eq(q).fadeIn(0))),e.loop===!0&&"slide"===e.mode?h.eq(q).addClass("active"):h.first().addClass("active")},pager:function(){var a=this;if(z.createPager=function(){w=(o-(e.thumbItem*e.thumbMargin-e.thumbMargin))/e.thumbItem;var b=p.find(".lslide"),c=p.find(".lslide").length,d=0,f="",h=0;for(d=0;c>d;d++){"slide"===e.mode&&(e.autoWidth?h+=(parseInt(b.eq(d).width())+e.slideMargin)*e.slideMove:h=d*(v+e.slideMargin)*e.slideMove);var i=b.eq(d*e.slideMove).attr("data-thumb");if(f+=e.gallery===!0?'
  • ':'
  • '+(d+1)+"
  • ","slide"===e.mode&&h>=m-o-e.slideMargin){d+=1;var j=2;e.autoWidth&&(f+='
  • '+(d+1)+"
  • ",j=1),j>d?(f=null,p.parent().addClass("noPager")):p.parent().removeClass("noPager");break}}var k=p.parent();k.find(".lSPager").html(f),e.gallery===!0&&(e.vertical===!0&&k.find(".lSPager").css("width",e.vThumbWidth+"px"),u=d*(e.thumbMargin+w)+.5,k.find(".lSPager").css({property:u+"px","transition-duration":e.speed+"ms"}),e.vertical===!0&&p.parent().css("padding-right",e.vThumbWidth+e.galleryMargin+"px"),k.find(".lSPager").css(r,u+"px"));var l=k.find(".lSPager").find("li");l.first().addClass("active"),l.on("click",function(){return e.loop===!0&&"slide"===e.mode?q+=l.index(this)-k.find(".lSPager").find("li.active").index():q=l.index(this),g.mode(!1),e.gallery===!0&&a.slideThumb(),!1})},e.pager){var b="lSpg";e.gallery&&(b="lSGallery"),p.after('
      ');var c=e.vertical?"margin-left":"margin-top";p.parent().find(".lSPager").css(c,e.galleryMargin+"px"),z.createPager()}setTimeout(function(){z.init()},0)},setHeight:function(a,b){var c=null,d=this;c=e.loop?a.children(".lslide ").first():a.children().first();var f=function(){var d=c.outerHeight(),e=0,f=d;b&&(d=0,e=100*f/o),a.css({height:d+"px","padding-bottom":e+"%"})};f(),c.find("img").length?c.find("img")[0].complete?(f(),x||d.auto()):c.find("img").on("load",function(){setTimeout(function(){f(),x||d.auto()},100)}):x||d.auto()},active:function(a,b){this.doCss()&&"fade"===e.mode&&p.addClass("on");var c=0;if(q*e.slideMove=d&&(c=f)),e.loop===!0&&"slide"===e.mode&&(c=b===!0?q-g.find(".clone.left").length:q*e.slideMove,b===!0&&(d=a.length,f=d-1,c+1===d?c=f:c+1>d&&(c=0))),this.doCss()||"fade"!==e.mode||b!==!1||a.eq(c).fadeIn(e.speed),a.eq(c).addClass("active")}else a.removeClass("active"),a.eq(a.length-1).addClass("active"),this.doCss()||"fade"!==e.mode||b!==!1||(a.fadeOut(e.speed),a.eq(c).fadeIn(e.speed))},move:function(a,b){e.rtl===!0&&(b=-b),this.doCss()?a.css(e.vertical===!0?{transform:"translate3d(0px, "+-b+"px, 0px)","-webkit-transform":"translate3d(0px, "+-b+"px, 0px)"}:{transform:"translate3d("+-b+"px, 0px, 0px)","-webkit-transform":"translate3d("+-b+"px, 0px, 0px)"}):e.vertical===!0?a.css("position","relative").animate({top:-b+"px"},e.speed,e.easing):a.css("position","relative").animate({left:-b+"px"},e.speed,e.easing);var c=p.parent().find(".lSPager").find("li");this.active(c,!0)},fade:function(){this.active(h,!1);var a=p.parent().find(".lSPager").find("li");this.active(a,!0)},slide:function(){var a=this;z.calSlide=function(){m>o&&(t=a.slideValue(),a.active(h,!1),t>m-o-e.slideMargin?t=m-o-e.slideMargin:0>t&&(t=0),a.move(g,t),e.loop===!0&&"slide"===e.mode&&(q>=l-g.find(".clone.left").length/e.slideMove&&a.resetSlide(g.find(".clone.left").length),0===q&&a.resetSlide(p.find(".lslide").length)))},z.calSlide()},resetSlide:function(a){var b=this;p.find(".lSAction a").addClass("disabled"),setTimeout(function(){q=a,p.css("transition-duration","0ms"),t=b.slideValue(),b.active(h,!1),d.move(g,t),setTimeout(function(){p.css("transition-duration",e.speed+"ms"),p.find(".lSAction a").removeClass("disabled")},50)},e.speed+100)},slideValue:function(){var a=0;if(e.autoWidth===!1)a=q*(v+e.slideMargin)*e.slideMove;else{a=0;for(var b=0;q>b;b++)a+=parseInt(h.eq(b).width())+e.slideMargin}return a},slideThumb:function(){var a;switch(e.currentPagerPosition){case"left":a=0;break;case"middle":a=o/2-w/2;break;case"right":a=o-w}var b=q-g.find(".clone.left").length,c=p.parent().find(".lSPager");"slide"===e.mode&&e.loop===!0&&(b>=c.children().length?b=0:0>b&&(b=c.children().length));var d=b*(w+e.thumbMargin)-a;d+o>u&&(d=u-o-e.thumbMargin),0>d&&(d=0),this.move(c,d)},auto:function(){e.auto&&(clearInterval(x),x=setInterval(function(){g.goToNextSlide()},e.pause))},pauseOnHover:function(){var b=this;e.auto&&e.pauseOnHover&&(p.on("mouseenter",function(){a(this).addClass("ls-hover"),g.pause(),e.auto=!0}),p.on("mouseleave",function(){a(this).removeClass("ls-hover"),p.find(".lightSlider").hasClass("lsGrabbing")||b.auto()}))},touchMove:function(a,b){if(p.css("transition-duration","0ms"),"slide"===e.mode){var c=a-b,d=t-c;if(d>=m-o-e.slideMargin)if(e.freeMove===!1)d=m-o-e.slideMargin;else{var f=m-o-e.slideMargin;d=f+(d-f)/5}else 0>d&&(e.freeMove===!1?d=0:d/=5);this.move(g,d)}},touchEnd:function(a){if(p.css("transition-duration",e.speed+"ms"),"slide"===e.mode){var b=!1,c=!0;t-=a,t>m-o-e.slideMargin?(t=m-o-e.slideMargin,e.autoWidth===!1&&(b=!0)):0>t&&(t=0);var d=function(a){var c=0;if(b||a&&(c=1),e.autoWidth)for(var d=0,f=0;f=t));f++);else{var g=t/((v+e.slideMargin)*e.slideMove);q=parseInt(g)+c,t>=m-o-e.slideMargin&&g%1!==0&&q++}};a>=e.swipeThreshold?(d(!1),c=!1):a<=-e.swipeThreshold&&(d(!0),c=!1),g.mode(c),this.slideThumb()}else a>=e.swipeThreshold?g.goToPrevSlide():a<=-e.swipeThreshold&&g.goToNextSlide()},enableDrag:function(){var b=this;if(!y){var c=0,d=0,f=!1;p.find(".lightSlider").addClass("lsGrab"),p.on("mousedown",function(b){return o>m&&0!==m?!1:void("lSPrev"!==a(b.target).attr("class")&&"lSNext"!==a(b.target).attr("class")&&(c=e.vertical===!0?b.pageY:b.pageX,f=!0,b.preventDefault?b.preventDefault():b.returnValue=!1,p.scrollLeft+=1,p.scrollLeft-=1,p.find(".lightSlider").removeClass("lsGrab").addClass("lsGrabbing"),clearInterval(x)))}),a(window).on("mousemove",function(a){f&&(d=e.vertical===!0?a.pageY:a.pageX,b.touchMove(d,c))}),a(window).on("mouseup",function(g){if(f){p.find(".lightSlider").removeClass("lsGrabbing").addClass("lsGrab"),f=!1,d=e.vertical===!0?g.pageY:g.pageX;var h=d-c;Math.abs(h)>=e.swipeThreshold&&a(window).on("click.ls",function(b){b.preventDefault?b.preventDefault():b.returnValue=!1,b.stopImmediatePropagation(),b.stopPropagation(),a(window).off("click.ls")}),b.touchEnd(h)}})}},enableTouch:function(){var a=this;if(y){var b={},c={};p.on("touchstart",function(a){c=a.originalEvent.targetTouches[0],b.pageX=a.originalEvent.targetTouches[0].pageX,b.pageY=a.originalEvent.targetTouches[0].pageY,clearInterval(x)}),p.on("touchmove",function(d){if(o>m&&0!==m)return!1;var f=d.originalEvent;c=f.targetTouches[0];var g=Math.abs(c.pageX-b.pageX),h=Math.abs(c.pageY-b.pageY);e.vertical===!0?(3*h>g&&d.preventDefault(),a.touchMove(c.pageY,b.pageY)):(3*g>h&&d.preventDefault(),a.touchMove(c.pageX,b.pageX))}),p.on("touchend",function(){if(o>m&&0!==m)return!1;var d;d=e.vertical===!0?c.pageY-b.pageY:c.pageX-b.pageX,a.touchEnd(d)})}},build:function(){var b=this;b.initialStyle(),this.doCss()&&(e.enableTouch===!0&&b.enableTouch(),e.enableDrag===!0&&b.enableDrag()),a(window).on("focus",function(){b.auto()}),a(window).on("blur",function(){clearInterval(x)}),b.pager(),b.pauseOnHover(),b.controls(),b.keyPress()}},d.build(),z.init=function(){z.chbreakpoint(),e.vertical===!0?(o=e.item>1?e.verticalHeight:h.outerHeight(),p.css("height",o+"px")):o=p.outerWidth(),e.loop===!0&&"slide"===e.mode&&z.clone(),z.calL(),"slide"===e.mode&&g.removeClass("lSSlide"),"slide"===e.mode&&(z.calSW(),z.sSW()),setTimeout(function(){"slide"===e.mode&&g.addClass("lSSlide")},1e3),e.pager&&z.createPager(),e.adaptiveHeight===!0&&e.vertical===!1&&g.css("height",h.eq(q).outerHeight(!0)),e.adaptiveHeight===!1&&("slide"===e.mode?e.vertical===!1?d.setHeight(g,!1):d.auto():d.setHeight(g,!0)),e.gallery===!0&&d.slideThumb(),"slide"===e.mode&&d.slide(),e.autoWidth===!1?h.length<=e.item?p.find(".lSAction").hide():p.find(".lSAction").show():z.calWidth(!1)0)e.onBeforePrevSlide.call(this,g,q),q--,g.mode(!1),e.gallery===!0&&d.slideThumb();else if(e.loop===!0){if(e.onBeforePrevSlide.call(this,g,q),"fade"===e.mode){var a=l-1;q=parseInt(a/e.slideMove)}g.mode(!1),e.gallery===!0&&d.slideThumb()}else e.slideEndAnimation===!0&&(g.addClass("leftEnd"),setTimeout(function(){g.removeClass("leftEnd")},400))},g.goToNextSlide=function(){var a=!0;if("slide"===e.mode){var b=d.slideValue();a=b=q?b+(q-c):q>=b+c?q-b-c:q-c}return a+1},g.getTotalSlideCount=function(){return p.find(".lslide").length},g.goToSlide=function(a){q=e.loop?a+g.find(".clone.left").length-1:a,g.mode(!1),e.gallery===!0&&d.slideThumb()},g.destroy=function(){g.lightSlider&&(g.goToPrevSlide=function(){},g.goToNextSlide=function(){},g.mode=function(){},g.play=function(){},g.pause=function(){},g.refresh=function(){},g.getCurrentSlideCount=function(){},g.getTotalSlideCount=function(){},g.goToSlide=function(){},g.lightSlider=null,z={init:function(){}},g.parent().parent().find(".lSAction, .lSPager").remove(),g.removeClass("lightSlider lSFade lSSlide lsGrab lsGrabbing leftEnd right").removeAttr("style").unwrap().unwrap(),g.children().removeAttr("style"),h.removeClass("lslide active"),g.find(".clone").remove(),h=null,x=null,n=!1,q=0)},setTimeout(function(){e.onSliderLoad.call(this,g)},10),a(window).on("resize orientationchange",function(a){setTimeout(function(){a.preventDefault?a.preventDefault():a.returnValue=!1,z.init()},200)}),this}}(jQuery); \ No newline at end of file diff --git a/assets/js/mt-custom-scripts.js b/assets/js/mt-custom-scripts.js new file mode 100644 index 0000000..f982d14 --- /dev/null +++ b/assets/js/mt-custom-scripts.js @@ -0,0 +1,199 @@ +jQuery(document).ready(function($) { + + "use strict"; + + /** + * Sophia After Dark Preloader + */ + if($('#preloader-background').length > 0) { + setTimeout(function(){$('#preloader-background').hide();}, 600); + } + + var grid = document.querySelector( + '.sophia-after-dark-content-masonry' + ), + masonry; + + if ( + grid && + typeof Masonry !== undefined && + typeof imagesLoaded !== undefined + ) { + imagesLoaded( grid, function( instance ) { + masonry = new Masonry( grid, { + itemSelector: '.hentry' + } ); + } ); + } + + /** + * Header Search script + */ + $('.mt-menu-search .mt-search-icon').click(function() { + $('.mt-form-wrap').toggleClass('search-activate'); + $('.mt-form-wrap .search-field').focus(); + var element = document.querySelector( '.mt-form-wrap.search-activate' ); + if( element ) { + $(document).on('keydown', function(e) { + var focusable = element.querySelectorAll( 'input, button, [href], select, textarea, [tabindex]:not([tabindex="-1"])'); + var firstFocusable = focusable[0]; + var lastFocusable = focusable[focusable.length - 1]; + sophia_after_dark_focus_trap( firstFocusable, lastFocusable, e ); + }) + } + }); + + /** + * Focus trap in popup. + */ + var KEYCODE_TAB = 9; + function sophia_after_dark_focus_trap( firstFocusable, lastFocusable, e ) { + if (e.key === 'Tab' || e.keyCode === KEYCODE_TAB) { + if ( e.shiftKey ) /* shift + tab */ { + if (document.activeElement === firstFocusable) { + lastFocusable.focus(); + e.preventDefault(); + } + } else /* tab */ { + if ( document.activeElement === lastFocusable ) { + firstFocusable.focus(); + e.preventDefault(); + } + } + } + } + + $('.mt-form-wrap .mt-form-close').click(function() { + $('.mt-form-wrap').toggleClass('search-activate'); + $(this).parents('.mt-menu-search').find('.mt-search-icon a').focus(); + }); + + /** + * Close popups on escape key. + */ + $( document ).on( 'keydown', function( event ) { + if ( event.keyCode === 27 ) { + event.preventDefault(); + //$( '.primary-menu-wrap' ).removeClass( 'menu-active' ); + $( '.mt-menu-search .mt-form-wrap' ).removeClass( 'search-activate' ); + } + }); + + /** + * Settings about WOW animation + */ + var wowOption = sophia_after_darkObject.wow_effect; + if( wowOption === 'on' ) { + new WOW().init(); + } + + /** + * Settings about sticky menu + */ + var stickyOption = sophia_after_darkObject.menu_sticky; + if( stickyOption === 'on' ) { + var windowWidth = $( window ).width(); + if( windowWidth < 500 ) { + var wpAdminBar = 0; + } else { + var wpAdminBar = $('#wpadminbar'); + } + if ( wpAdminBar.length ) { + $(".mt-social-menu-wrapper").sticky({topSpacing:wpAdminBar.height()}); + } else { + $(".mt-social-menu-wrapper").sticky({topSpacing:0}); + } + } + + /** + * Scroll To Top + */ + $(window).scroll(function() { + if ($(this).scrollTop() > 1000) { + $('#mt-scrollup').fadeIn('slow'); + } else { + $('#mt-scrollup').fadeOut('slow'); + } + }); + $('#mt-scrollup').click(function() { + $("html, body").animate({ + scrollTop: 0 + }, 600); + return false; + }); + + /** + * Slider scripts + */ + $('.front-slider').lightSlider({ + pager: false, + auto: false, + loop: true, + item: 1, + controls: true, + slideMargin:0, + rtl:true, + nextHtml: '', + prevHtml: '', + + onSliderLoad: function() { + $('.front-slider').removeClass('cS-hidden'); + } + + }); + + /** + * Slider scripts + */ + $('.mt-gallery-slider').lightSlider({ + pager: false, + auto: false, + loop: true, + item: 1, + controls: true, + }); + + /** + * Responsive menu + */ + + $('.mt-social-menu-wrapper .menu-toggle').click(function(event) { + $('.mt-social-menu-wrapper #site-navigation').toggleClass( 'isActive' ).slideToggle('slow'); + var element = document.querySelector( '.mt-header-menu-wrap' ); + if( element ) { + $(document).on('keydown', function(e) { + if( element.querySelectorAll( '.mt-social-menu-wrapper #site-navigation.isActive' ).length === 1 ) { + var focusable = element.querySelectorAll( 'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'); + var firstFocusable = focusable[0]; + var lastFocusable = focusable[focusable.length - 1]; + sophia_after_dark_focus_trap( firstFocusable, lastFocusable, e ); + } + }) + } + }); + + /** + * responsive sub menu toggle + */ + $('').insertAfter('#site-navigation .menu-item-has-children>a, #site-navigation .page_item_has_children>a'); + + $('#site-navigation .sub-toggle').click(function() { + $(this).parent('.menu-item-has-children').children('ul.sub-menu').first().slideToggle('1000'); + jQuery(this).parent('.page_item_has_children').children('ul.children').first().slideToggle('1000'); + $(this).children('.fa-angle-right').first().toggleClass('fa-angle-down'); + }); + + /** + * Slider Section dynamic height script + */ + $(window).on('load', function() { + if ($(window).width() > 839) { + $(".front-slider-wrapper").each(function() { + var imageHeight = $(this).height(); + $(this).find(".slider-post-wrap").css('height', imageHeight); + $(this).find(".front-slider ").css('height', imageHeight); + }); + } + }); + +}); \ No newline at end of file diff --git a/assets/js/mt-customizer-controls.js b/assets/js/mt-customizer-controls.js new file mode 100644 index 0000000..5f12803 --- /dev/null +++ b/assets/js/mt-customizer-controls.js @@ -0,0 +1,222 @@ +( function( api ) { + + api.sectionConstructor['mt-upsell'] = api.Section.extend( { + + // No events for this type of section. + attachEvents: function () {}, + + // Always make the section active. + isContextuallyActive: function () { + return true; + } + } ); + +} )( wp.customize ); + +wp.customize.controlConstructor['mt-toggle'] = wp.customize.Control.extend({ + ready: function(){ + 'use strict'; + + var control = this, + checkboxValue = control.setting._value; + + // Toggle checkbox + // Save the value + this.container.on( 'change', 'input', function() { + checkboxValue = ( jQuery( this ).is( ':checked' ) ) ? true : false; + control.setting.set( checkboxValue ); + }); + + } +}); + +jQuery(document).ready(function($) { + + "use strict"; + /** + * Function for repeater field + */ + function sophia_after_dark_refresh_repeater_values(){ + $(".mt-repeater-field-control-wrap").each(function(){ + + var values = []; + var $this = $(this); + + $this.find(".mt-repeater-field-control").each(function(){ + var valueToPush = {}; + + $(this).find('[data-name]').each(function(){ + + var dataName = $(this).attr('data-name'); + var dataValue = $(this).val(); + valueToPush[dataName] = dataValue; + }); + + values.push(valueToPush); + }); + + $this.next('.mt-repeater-collector').val(JSON.stringify(values)).trigger('change'); + }); + } + + $('#customize-theme-controls').on('click','.mt-repeater-field-title',function(){ + $(this).next().slideToggle(); + $(this).closest('.mt-repeater-field-control').toggleClass('expanded'); + }); + + $('#customize-theme-controls').on('click', '.mt-repeater-field-close', function(){ + $(this).closest('.mt-repeater-fields').slideUp();; + $(this).closest('.mt-repeater-field-control').toggleClass('expanded'); + }); + + $("body").on("click",'.mt-repeater-add-control-field', function(){ + + var fLimit = $(this).parent().find('.field-limit').val(); + var fCount = $(this).parent().find('.field-count').val(); + if( fCount < fLimit ) { + fCount++; + $(this).parent().find('.field-count').val(fCount); + } else { + $(this).before('Only '+fLimit+' repeater field will be permitted.'); + return; + } + + var $this = $(this).parent(); + if(typeof $this != 'undefined') { + + var field = $this.find(".mt-repeater-field-control:first").clone(); + if(typeof field != 'undefined'){ + + field.find("input[type='text'][data-name]").each(function(){ + var defaultValue = $(this).attr('data-default'); + $(this).val(defaultValue); + }); + + field.find("textarea[data-name]").each(function(){ + var defaultValue = $(this).attr('data-default'); + $(this).val(defaultValue); + }); + + field.find("select[data-name]").each(function(){ + var defaultValue = $(this).attr('data-default'); + $(this).val(defaultValue); + }); + + field.find(".attachment-media-view").each(function(){ + var defaultValue = $(this).find('input[data-name]').attr('data-default'); + $(this).find('input[data-name]').val(defaultValue); + if(defaultValue){ + $(this).find(".thumbnail-image").html('').prev('.placeholder').addClass('hidden'); + }else{ + $(this).find(".thumbnail-image").html('').prev('.placeholder').removeClass('hidden'); + } + }); + + field.find(".mt-repeater-icon-list").each(function(){ + var defaultValue = $(this).next('input[data-name]').attr('data-default'); + $(this).next('input[data-name]').val(defaultValue); + $(this).prev('.mt-repeater-selected-icon').children('i').attr('class','').addClass(defaultValue); + + $(this).find('li').each(function(){ + var icon_class = $(this).find('i').attr('class'); + if(defaultValue == icon_class ){ + $(this).addClass('icon-active'); + }else{ + $(this).removeClass('icon-active'); + } + }); + }); + + field.find('.mt-repeater-fields').show(); + $this.find('.mt-repeater-field-control-wrap').append(field); + field.addClass('expanded').find('.mt-repeater-fields').show(); + $('.accordion-section-content').animate({ scrollTop: $this.height() }, 1000); + sophia_after_dark_refresh_repeater_values(); + } + + } + return false; + }); + + $("#customize-theme-controls").on("click", ".mt-repeater-field-remove",function(){ + if( typeof $(this).parent() != 'undefined'){ + $(this).closest('.mt-repeater-field-control').slideUp('normal', function(){ + $(this).remove(); + sophia_after_dark_refresh_repeater_values(); + }); + } + return false; + }); + + $("#customize-theme-controls").on('keyup change', '[data-name]',function(){ + sophia_after_dark_refresh_repeater_values(); + return false; + }); + + /** + * Drag and drop to change order + */ + $(".mt-repeater-field-control-wrap").sortable({ + orientation: "vertical", + update: function( event, ui ) { + sophia_after_dark_refresh_repeater_values(); + } + }); + + /** + * Image upload + */ + var mtFrame; + + //Add image + $('.customize-control-mt-repeater').on( 'click', '.mt-upload-button', function( event ){ + event.preventDefault(); + + var imgContainer = $(this).closest('.mt-fields-wrap').find( '.thumbnail-image'), + placeholder = $(this).closest('.mt-fields-wrap').find( '.placeholder'), + imgIdInput = $(this).siblings('.upload-id'); + + mtFrame = wp.media({ + title: 'Select or Upload Image', + button: { + text: 'Use Image' + }, + multiple: false // Set to true to allow multiple files to be selected + }); + + mtFrame.on( 'select', function() { + var attachment = frame.state().get('selection').first().toJSON(); + imgContainer.html( '' ); + placeholder.addClass('hidden'); + imgIdInput.val( attachment.url ).trigger('change'); + }); + + mtFrame.open(); + }); + + // DELETE IMAGE LINK + $('.customize-control-mt-repeater').on( 'click', '.mt-delete-button', function( event ){ + event.preventDefault(); + var imgContainer = $(this).closest('.mt-fields-wrap').find( '.thumbnail-image'), + placeholder = $(this).closest('.mt-fields-wrap').find( '.placeholder'), + imgIdInput = $(this).siblings('.upload-id'); + imgContainer.find('img').remove(); + placeholder.removeClass('hidden'); + imgIdInput.val( '' ).trigger('change'); + }); + + /** + * Repeater icon selector + */ + $('body').on('click', '.mt-repeater-icon-list li', function(){ + var icon_class = $(this).find('i').attr('class'); + $(this).addClass('icon-active').siblings().removeClass('icon-active'); + $(this).parent('.mt-repeater-icon-list').prev('.mt-repeater-selected-icon').children('i').attr('class','').addClass(icon_class); + $(this).parent('.mt-repeater-icon-list').next('input').val(icon_class).trigger('change'); + sophia_after_dark_refresh_repeater_values(); + }); + + $('body').on('click', '.mt-repeater-selected-icon', function(){ + $(this).next().slideToggle(); + }); +}); \ No newline at end of file diff --git a/assets/js/navigation.js b/assets/js/navigation.js new file mode 100644 index 0000000..82297e1 --- /dev/null +++ b/assets/js/navigation.js @@ -0,0 +1,82 @@ +/** + * File navigation.js. + * + * Handles toggling the navigation menu for small screens and enables TAB key + * navigation support for dropdown menus. + */ +( function() { + var container, button, menu, links, i, len; + + container = document.getElementById( 'site-navigation' ); + if ( ! container ) { + return; + } + + menu = container.getElementsByTagName( 'ul' )[0]; + menu.setAttribute( 'aria-expanded', 'false' ); + if ( -1 === menu.className.indexOf( 'nav-menu' ) ) { + menu.className += ' nav-menu'; + } + + // Get all the link elements within the menu. + links = menu.getElementsByTagName( 'a' ); + + // Each time a menu link is focused or blurred, toggle focus. + for ( i = 0, len = links.length; i < len; i++ ) { + links[i].addEventListener( 'focus', toggleFocus, true ); + links[i].addEventListener( 'blur', toggleFocus, true ); + } + + /** + * Sets or removes .focus class on an element. + */ + function toggleFocus() { + var self = this; + + // Move up through the ancestors of the current link until we hit .nav-menu. + while ( -1 === self.className.indexOf( 'nav-menu' ) ) { + + // On li elements toggle the class .focus. + if ( 'li' === self.tagName.toLowerCase() ) { + if ( -1 !== self.className.indexOf( 'focus' ) ) { + self.className = self.className.replace( ' focus', '' ); + } else { + self.className += ' focus'; + } + } + + self = self.parentElement; + } + } + + /** + * Toggles `focus` class to allow submenu access on tablets. + */ + ( function( container ) { + var touchStartFn, i, + parentLink = container.querySelectorAll( '.menu-item-has-children > a, .page_item_has_children > a' ); + + if ( 'ontouchstart' in window ) { + touchStartFn = function( e ) { + var menuItem = this.parentNode, i; + + if ( ! menuItem.classList.contains( 'focus' ) ) { + e.preventDefault(); + for ( i = 0; i < menuItem.parentNode.children.length; ++i ) { + if ( menuItem === menuItem.parentNode.children[i] ) { + continue; + } + menuItem.parentNode.children[i].classList.remove( 'focus' ); + } + menuItem.classList.add( 'focus' ); + } else { + menuItem.classList.remove( 'focus' ); + } + }; + + for ( i = 0; i < parentLink.length; ++i ) { + parentLink[i].addEventListener( 'touchstart', touchStartFn, false ); + } + } + }( container ) ); +} )(); \ No newline at end of file diff --git a/assets/js/skip-link-focus-fix.js b/assets/js/skip-link-focus-fix.js new file mode 100644 index 0000000..5f82148 --- /dev/null +++ b/assets/js/skip-link-focus-fix.js @@ -0,0 +1,31 @@ +/** + * File skip-link-focus-fix.js. + * + * Helps with accessibility for keyboard only users. + * + * Learn more: https://git.io/vWdr2 + */ +( function() { + var isIe = /(trident|msie)/i.test( navigator.userAgent ); + + if ( isIe && document.getElementById && window.addEventListener ) { + window.addEventListener( 'hashchange', function() { + var id = location.hash.substring( 1 ), + element; + + if ( ! ( /^[A-z0-9_-]+$/.test( id ) ) ) { + return; + } + + element = document.getElementById( id ); + + if ( element ) { + if ( ! ( /^(?:a|select|input|button|textarea)$/i.test( element.tagName ) ) ) { + element.tabIndex = -1; + } + + element.focus(); + } + }, false ); + } +} )(); \ No newline at end of file diff --git a/assets/library/animate/LICENSE b/assets/library/animate/LICENSE new file mode 100644 index 0000000..a38d2ec --- /dev/null +++ b/assets/library/animate/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2016 Daniel Eden + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/assets/library/animate/animate.css b/assets/library/animate/animate.css new file mode 100644 index 0000000..907061c --- /dev/null +++ b/assets/library/animate/animate.css @@ -0,0 +1,3146 @@ +@charset "UTF-8"; + +/*! + + * animate.css -http://daneden.me/animate + + * Version - 3.5.1 + + * Licensed under the MIT license - http://opensource.org/licenses/MIT + + * + + * Copyright (c) 2016 Daniel Eden + + */ + +.animated { + -webkit-animation-duration: 1s; + animation-duration: 1s; + -webkit-animation-fill-mode: both; + animation-fill-mode: both +} + +.animated.infinite { + -webkit-animation-iteration-count: infinite; + animation-iteration-count: infinite +} + +.animated.hinge { + -webkit-animation-duration: 2s; + animation-duration: 2s +} + +.animated.bounceIn, +.animated.bounceOut, +.animated.flipOutX, +.animated.flipOutY { + -webkit-animation-duration: .75s; + animation-duration: .75s +} + +@-webkit-keyframes bounce { + 20%, + 53%, + 80%, + from, + to { + -webkit-animation-timing-function: cubic-bezier(.215, .61, .355, 1); + animation-timing-function: cubic-bezier(.215, .61, .355, 1); + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0) + } + 40%, + 43% { + -webkit-animation-timing-function: cubic-bezier(.755, .050, .855, .060); + animation-timing-function: cubic-bezier(.755, .050, .855, .060); + -webkit-transform: translate3d(0, -30px, 0); + transform: translate3d(0, -30px, 0) + } + 70% { + -webkit-animation-timing-function: cubic-bezier(.755, .050, .855, .060); + animation-timing-function: cubic-bezier(.755, .050, .855, .060); + -webkit-transform: translate3d(0, -15px, 0); + transform: translate3d(0, -15px, 0) + } + 90% { + -webkit-transform: translate3d(0, -4px, 0); + transform: translate3d(0, -4px, 0) + } +} + +@keyframes bounce { + 20%, + 53%, + 80%, + from, + to { + -webkit-animation-timing-function: cubic-bezier(.215, .61, .355, 1); + animation-timing-function: cubic-bezier(.215, .61, .355, 1); + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0) + } + 40%, + 43% { + -webkit-animation-timing-function: cubic-bezier(.755, .050, .855, .060); + animation-timing-function: cubic-bezier(.755, .050, .855, .060); + -webkit-transform: translate3d(0, -30px, 0); + transform: translate3d(0, -30px, 0) + } + 70% { + -webkit-animation-timing-function: cubic-bezier(.755, .050, .855, .060); + animation-timing-function: cubic-bezier(.755, .050, .855, .060); + -webkit-transform: translate3d(0, -15px, 0); + transform: translate3d(0, -15px, 0) + } + 90% { + -webkit-transform: translate3d(0, -4px, 0); + transform: translate3d(0, -4px, 0) + } +} + +.bounce { + -webkit-animation-name: bounce; + animation-name: bounce; + -webkit-transform-origin: center bottom; + transform-origin: center bottom +} + +@-webkit-keyframes flash { + 50%, + from, + to { + opacity: 1 + } + 25%, + 75% { + opacity: 0 + } +} + +@keyframes flash { + 50%, + from, + to { + opacity: 1 + } + 25%, + 75% { + opacity: 0 + } +} + +.flash { + -webkit-animation-name: flash; + animation-name: flash +} + +@-webkit-keyframes pulse { + from { + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1) + } + 50% { + -webkit-transform: scale3d(1.05, 1.05, 1.05); + transform: scale3d(1.05, 1.05, 1.05) + } + to { + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1) + } +} + +@keyframes pulse { + from { + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1) + } + 50% { + -webkit-transform: scale3d(1.05, 1.05, 1.05); + transform: scale3d(1.05, 1.05, 1.05) + } + to { + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1) + } +} + +.pulse { + -webkit-animation-name: pulse; + animation-name: pulse +} + +@-webkit-keyframes rubberBand { + from { + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1) + } + 30% { + -webkit-transform: scale3d(1.25, .75, 1); + transform: scale3d(1.25, .75, 1) + } + 40% { + -webkit-transform: scale3d(.75, 1.25, 1); + transform: scale3d(.75, 1.25, 1) + } + 50% { + -webkit-transform: scale3d(1.15, .85, 1); + transform: scale3d(1.15, .85, 1) + } + 65% { + -webkit-transform: scale3d(.95, 1.05, 1); + transform: scale3d(.95, 1.05, 1) + } + 75% { + -webkit-transform: scale3d(1.05, .95, 1); + transform: scale3d(1.05, .95, 1) + } + to { + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1) + } +} + +@keyframes rubberBand { + from { + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1) + } + 30% { + -webkit-transform: scale3d(1.25, .75, 1); + transform: scale3d(1.25, .75, 1) + } + 40% { + -webkit-transform: scale3d(.75, 1.25, 1); + transform: scale3d(.75, 1.25, 1) + } + 50% { + -webkit-transform: scale3d(1.15, .85, 1); + transform: scale3d(1.15, .85, 1) + } + 65% { + -webkit-transform: scale3d(.95, 1.05, 1); + transform: scale3d(.95, 1.05, 1) + } + 75% { + -webkit-transform: scale3d(1.05, .95, 1); + transform: scale3d(1.05, .95, 1) + } + to { + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1) + } +} + +.rubberBand { + -webkit-animation-name: rubberBand; + animation-name: rubberBand +} + +@-webkit-keyframes shake { + from, + to { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0) + } + 10%, + 30%, + 50%, + 70%, + 90% { + -webkit-transform: translate3d(-10px, 0, 0); + transform: translate3d(-10px, 0, 0) + } + 20%, + 40%, + 60%, + 80% { + -webkit-transform: translate3d(10px, 0, 0); + transform: translate3d(10px, 0, 0) + } +} + +@keyframes shake { + from, + to { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0) + } + 10%, + 30%, + 50%, + 70%, + 90% { + -webkit-transform: translate3d(-10px, 0, 0); + transform: translate3d(-10px, 0, 0) + } + 20%, + 40%, + 60%, + 80% { + -webkit-transform: translate3d(10px, 0, 0); + transform: translate3d(10px, 0, 0) + } +} + +.shake { + -webkit-animation-name: shake; + animation-name: shake +} + +@-webkit-keyframes headShake { + 0% { + -webkit-transform: translateX(0); + transform: translateX(0) + } + 6.5% { + -webkit-transform: translateX(-6px) rotateY(-9deg); + transform: translateX(-6px) rotateY(-9deg) + } + 18.5% { + -webkit-transform: translateX(5px) rotateY(7deg); + transform: translateX(5px) rotateY(7deg) + } + 31.5% { + -webkit-transform: translateX(-3px) rotateY(-5deg); + transform: translateX(-3px) rotateY(-5deg) + } + 43.5% { + -webkit-transform: translateX(2px) rotateY(3deg); + transform: translateX(2px) rotateY(3deg) + } + 50% { + -webkit-transform: translateX(0); + transform: translateX(0) + } +} + +@keyframes headShake { + 0% { + -webkit-transform: translateX(0); + transform: translateX(0) + } + 6.5% { + -webkit-transform: translateX(-6px) rotateY(-9deg); + transform: translateX(-6px) rotateY(-9deg) + } + 18.5% { + -webkit-transform: translateX(5px) rotateY(7deg); + transform: translateX(5px) rotateY(7deg) + } + 31.5% { + -webkit-transform: translateX(-3px) rotateY(-5deg); + transform: translateX(-3px) rotateY(-5deg) + } + 43.5% { + -webkit-transform: translateX(2px) rotateY(3deg); + transform: translateX(2px) rotateY(3deg) + } + 50% { + -webkit-transform: translateX(0); + transform: translateX(0) + } +} + +.headShake { + -webkit-animation-timing-function: ease-in-out; + animation-timing-function: ease-in-out; + -webkit-animation-name: headShake; + animation-name: headShake +} + +@-webkit-keyframes swing { + 20% { + -webkit-transform: rotate3d(0, 0, 1, 15deg); + transform: rotate3d(0, 0, 1, 15deg) + } + 40% { + -webkit-transform: rotate3d(0, 0, 1, -10deg); + transform: rotate3d(0, 0, 1, -10deg) + } + 60% { + -webkit-transform: rotate3d(0, 0, 1, 5deg); + transform: rotate3d(0, 0, 1, 5deg) + } + 80% { + -webkit-transform: rotate3d(0, 0, 1, -5deg); + transform: rotate3d(0, 0, 1, -5deg) + } + to { + -webkit-transform: rotate3d(0, 0, 1, 0deg); + transform: rotate3d(0, 0, 1, 0deg) + } +} + +@keyframes swing { + 20% { + -webkit-transform: rotate3d(0, 0, 1, 15deg); + transform: rotate3d(0, 0, 1, 15deg) + } + 40% { + -webkit-transform: rotate3d(0, 0, 1, -10deg); + transform: rotate3d(0, 0, 1, -10deg) + } + 60% { + -webkit-transform: rotate3d(0, 0, 1, 5deg); + transform: rotate3d(0, 0, 1, 5deg) + } + 80% { + -webkit-transform: rotate3d(0, 0, 1, -5deg); + transform: rotate3d(0, 0, 1, -5deg) + } + to { + -webkit-transform: rotate3d(0, 0, 1, 0deg); + transform: rotate3d(0, 0, 1, 0deg) + } +} + +.swing { + -webkit-transform-origin: top center; + transform-origin: top center; + -webkit-animation-name: swing; + animation-name: swing +} + +@-webkit-keyframes tada { + from { + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1) + } + 10%, + 20% { + -webkit-transform: scale3d(.9, .9, .9) rotate3d(0, 0, 1, -3deg); + transform: scale3d(.9, .9, .9) rotate3d(0, 0, 1, -3deg) + } + 30%, + 50%, + 70%, + 90% { + -webkit-transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg); + transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg) + } + 40%, + 60%, + 80% { + -webkit-transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg); + transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg) + } + to { + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1) + } +} + +@keyframes tada { + from { + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1) + } + 10%, + 20% { + -webkit-transform: scale3d(.9, .9, .9) rotate3d(0, 0, 1, -3deg); + transform: scale3d(.9, .9, .9) rotate3d(0, 0, 1, -3deg) + } + 30%, + 50%, + 70%, + 90% { + -webkit-transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg); + transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg) + } + 40%, + 60%, + 80% { + -webkit-transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg); + transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg) + } + to { + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1) + } +} + +.tada { + -webkit-animation-name: tada; + animation-name: tada +} + +@-webkit-keyframes wobble { + from { + -webkit-transform: none; + transform: none + } + 15% { + -webkit-transform: translate3d(-25%, 0, 0) rotate3d(0, 0, 1, -5deg); + transform: translate3d(-25%, 0, 0) rotate3d(0, 0, 1, -5deg) + } + 30% { + -webkit-transform: translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg); + transform: translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg) + } + 45% { + -webkit-transform: translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg); + transform: translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg) + } + 60% { + -webkit-transform: translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg); + transform: translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg) + } + 75% { + -webkit-transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg); + transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg) + } + to { + -webkit-transform: none; + transform: none + } +} + +@keyframes wobble { + from { + -webkit-transform: none; + transform: none + } + 15% { + -webkit-transform: translate3d(-25%, 0, 0) rotate3d(0, 0, 1, -5deg); + transform: translate3d(-25%, 0, 0) rotate3d(0, 0, 1, -5deg) + } + 30% { + -webkit-transform: translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg); + transform: translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg) + } + 45% { + -webkit-transform: translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg); + transform: translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg) + } + 60% { + -webkit-transform: translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg); + transform: translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg) + } + 75% { + -webkit-transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg); + transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg) + } + to { + -webkit-transform: none; + transform: none + } +} + +.wobble { + -webkit-animation-name: wobble; + animation-name: wobble +} + +@-webkit-keyframes jello { + 11.1%, + from, + to { + -webkit-transform: none; + transform: none + } + 22.2% { + -webkit-transform: skewX(-12.5deg) skewY(-12.5deg); + transform: skewX(-12.5deg) skewY(-12.5deg) + } + 33.3% { + -webkit-transform: skewX(6.25deg) skewY(6.25deg); + transform: skewX(6.25deg) skewY(6.25deg) + } + 44.4% { + -webkit-transform: skewX(-3.125deg) skewY(-3.125deg); + transform: skewX(-3.125deg) skewY(-3.125deg) + } + 55.5% { + -webkit-transform: skewX(1.5625deg) skewY(1.5625deg); + transform: skewX(1.5625deg) skewY(1.5625deg) + } + 66.6% { + -webkit-transform: skewX(-.78125deg) skewY(-.78125deg); + transform: skewX(-.78125deg) skewY(-.78125deg) + } + 77.7% { + -webkit-transform: skewX(.390625deg) skewY(.390625deg); + transform: skewX(.390625deg) skewY(.390625deg) + } + 88.8% { + -webkit-transform: skewX(-.1953125deg) skewY(-.1953125deg); + transform: skewX(-.1953125deg) skewY(-.1953125deg) + } +} + +@keyframes jello { + 11.1%, + from, + to { + -webkit-transform: none; + transform: none + } + 22.2% { + -webkit-transform: skewX(-12.5deg) skewY(-12.5deg); + transform: skewX(-12.5deg) skewY(-12.5deg) + } + 33.3% { + -webkit-transform: skewX(6.25deg) skewY(6.25deg); + transform: skewX(6.25deg) skewY(6.25deg) + } + 44.4% { + -webkit-transform: skewX(-3.125deg) skewY(-3.125deg); + transform: skewX(-3.125deg) skewY(-3.125deg) + } + 55.5% { + -webkit-transform: skewX(1.5625deg) skewY(1.5625deg); + transform: skewX(1.5625deg) skewY(1.5625deg) + } + 66.6% { + -webkit-transform: skewX(-.78125deg) skewY(-.78125deg); + transform: skewX(-.78125deg) skewY(-.78125deg) + } + 77.7% { + -webkit-transform: skewX(.390625deg) skewY(.390625deg); + transform: skewX(.390625deg) skewY(.390625deg) + } + 88.8% { + -webkit-transform: skewX(-.1953125deg) skewY(-.1953125deg); + transform: skewX(-.1953125deg) skewY(-.1953125deg) + } +} + +.jello { + -webkit-animation-name: jello; + animation-name: jello; + -webkit-transform-origin: center; + transform-origin: center +} + +@-webkit-keyframes bounceIn { + 20%, + 40%, + 60%, + 80%, + from, + to { + -webkit-animation-timing-function: cubic-bezier(.215, .61, .355, 1); + animation-timing-function: cubic-bezier(.215, .61, .355, 1) + } + 0% { + opacity: 0; + -webkit-transform: scale3d(.3, .3, .3); + transform: scale3d(.3, .3, .3) + } + 20% { + -webkit-transform: scale3d(1.1, 1.1, 1.1); + transform: scale3d(1.1, 1.1, 1.1) + } + 40% { + -webkit-transform: scale3d(.9, .9, .9); + transform: scale3d(.9, .9, .9) + } + 60% { + opacity: 1; + -webkit-transform: scale3d(1.03, 1.03, 1.03); + transform: scale3d(1.03, 1.03, 1.03) + } + 80% { + -webkit-transform: scale3d(.97, .97, .97); + transform: scale3d(.97, .97, .97) + } + to { + opacity: 1; + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1) + } +} + +@keyframes bounceIn { + 20%, + 40%, + 60%, + 80%, + from, + to { + -webkit-animation-timing-function: cubic-bezier(.215, .61, .355, 1); + animation-timing-function: cubic-bezier(.215, .61, .355, 1) + } + 0% { + opacity: 0; + -webkit-transform: scale3d(.3, .3, .3); + transform: scale3d(.3, .3, .3) + } + 20% { + -webkit-transform: scale3d(1.1, 1.1, 1.1); + transform: scale3d(1.1, 1.1, 1.1) + } + 40% { + -webkit-transform: scale3d(.9, .9, .9); + transform: scale3d(.9, .9, .9) + } + 60% { + opacity: 1; + -webkit-transform: scale3d(1.03, 1.03, 1.03); + transform: scale3d(1.03, 1.03, 1.03) + } + 80% { + -webkit-transform: scale3d(.97, .97, .97); + transform: scale3d(.97, .97, .97) + } + to { + opacity: 1; + -webkit-transform: scale3d(1, 1, 1); + transform: scale3d(1, 1, 1) + } +} + +.bounceIn { + -webkit-animation-name: bounceIn; + animation-name: bounceIn +} + +@-webkit-keyframes bounceInDown { + 60%, + 75%, + 90%, + from, + to { + -webkit-animation-timing-function: cubic-bezier(.215, .61, .355, 1); + animation-timing-function: cubic-bezier(.215, .61, .355, 1) + } + 0% { + opacity: 0; + -webkit-transform: translate3d(0, -3000px, 0); + transform: translate3d(0, -3000px, 0) + } + 60% { + opacity: 1; + -webkit-transform: translate3d(0, 25px, 0); + transform: translate3d(0, 25px, 0) + } + 75% { + -webkit-transform: translate3d(0, -10px, 0); + transform: translate3d(0, -10px, 0) + } + 90% { + -webkit-transform: translate3d(0, 5px, 0); + transform: translate3d(0, 5px, 0) + } + to { + -webkit-transform: none; + transform: none + } +} + +@keyframes bounceInDown { + 60%, + 75%, + 90%, + from, + to { + -webkit-animation-timing-function: cubic-bezier(.215, .61, .355, 1); + animation-timing-function: cubic-bezier(.215, .61, .355, 1) + } + 0% { + opacity: 0; + -webkit-transform: translate3d(0, -3000px, 0); + transform: translate3d(0, -3000px, 0) + } + 60% { + opacity: 1; + -webkit-transform: translate3d(0, 25px, 0); + transform: translate3d(0, 25px, 0) + } + 75% { + -webkit-transform: translate3d(0, -10px, 0); + transform: translate3d(0, -10px, 0) + } + 90% { + -webkit-transform: translate3d(0, 5px, 0); + transform: translate3d(0, 5px, 0) + } + to { + -webkit-transform: none; + transform: none + } +} + +.bounceInDown { + -webkit-animation-name: bounceInDown; + animation-name: bounceInDown +} + +@-webkit-keyframes bounceInLeft { + 60%, + 75%, + 90%, + from, + to { + -webkit-animation-timing-function: cubic-bezier(.215, .61, .355, 1); + animation-timing-function: cubic-bezier(.215, .61, .355, 1) + } + 0% { + opacity: 0; + -webkit-transform: translate3d(-3000px, 0, 0); + transform: translate3d(-3000px, 0, 0) + } + 60% { + opacity: 1; + -webkit-transform: translate3d(25px, 0, 0); + transform: translate3d(25px, 0, 0) + } + 75% { + -webkit-transform: translate3d(-10px, 0, 0); + transform: translate3d(-10px, 0, 0) + } + 90% { + -webkit-transform: translate3d(5px, 0, 0); + transform: translate3d(5px, 0, 0) + } + to { + -webkit-transform: none; + transform: none + } +} + +@keyframes bounceInLeft { + 60%, + 75%, + 90%, + from, + to { + -webkit-animation-timing-function: cubic-bezier(.215, .61, .355, 1); + animation-timing-function: cubic-bezier(.215, .61, .355, 1) + } + 0% { + opacity: 0; + -webkit-transform: translate3d(-3000px, 0, 0); + transform: translate3d(-3000px, 0, 0) + } + 60% { + opacity: 1; + -webkit-transform: translate3d(25px, 0, 0); + transform: translate3d(25px, 0, 0) + } + 75% { + -webkit-transform: translate3d(-10px, 0, 0); + transform: translate3d(-10px, 0, 0) + } + 90% { + -webkit-transform: translate3d(5px, 0, 0); + transform: translate3d(5px, 0, 0) + } + to { + -webkit-transform: none; + transform: none + } +} + +.bounceInLeft { + -webkit-animation-name: bounceInLeft; + animation-name: bounceInLeft +} + +@-webkit-keyframes bounceInRight { + 60%, + 75%, + 90%, + from, + to { + -webkit-animation-timing-function: cubic-bezier(.215, .61, .355, 1); + animation-timing-function: cubic-bezier(.215, .61, .355, 1) + } + from { + opacity: 0; + -webkit-transform: translate3d(3000px, 0, 0); + transform: translate3d(3000px, 0, 0) + } + 60% { + opacity: 1; + -webkit-transform: translate3d(-25px, 0, 0); + transform: translate3d(-25px, 0, 0) + } + 75% { + -webkit-transform: translate3d(10px, 0, 0); + transform: translate3d(10px, 0, 0) + } + 90% { + -webkit-transform: translate3d(-5px, 0, 0); + transform: translate3d(-5px, 0, 0) + } + to { + -webkit-transform: none; + transform: none + } +} + +@keyframes bounceInRight { + 60%, + 75%, + 90%, + from, + to { + -webkit-animation-timing-function: cubic-bezier(.215, .61, .355, 1); + animation-timing-function: cubic-bezier(.215, .61, .355, 1) + } + from { + opacity: 0; + -webkit-transform: translate3d(3000px, 0, 0); + transform: translate3d(3000px, 0, 0) + } + 60% { + opacity: 1; + -webkit-transform: translate3d(-25px, 0, 0); + transform: translate3d(-25px, 0, 0) + } + 75% { + -webkit-transform: translate3d(10px, 0, 0); + transform: translate3d(10px, 0, 0) + } + 90% { + -webkit-transform: translate3d(-5px, 0, 0); + transform: translate3d(-5px, 0, 0) + } + to { + -webkit-transform: none; + transform: none + } +} + +.bounceInRight { + -webkit-animation-name: bounceInRight; + animation-name: bounceInRight +} + +@-webkit-keyframes bounceInUp { + 60%, + 75%, + 90%, + from, + to { + -webkit-animation-timing-function: cubic-bezier(.215, .61, .355, 1); + animation-timing-function: cubic-bezier(.215, .61, .355, 1) + } + from { + opacity: 0; + -webkit-transform: translate3d(0, 3000px, 0); + transform: translate3d(0, 3000px, 0) + } + 60% { + opacity: 1; + -webkit-transform: translate3d(0, -20px, 0); + transform: translate3d(0, -20px, 0) + } + 75% { + -webkit-transform: translate3d(0, 10px, 0); + transform: translate3d(0, 10px, 0) + } + 90% { + -webkit-transform: translate3d(0, -5px, 0); + transform: translate3d(0, -5px, 0) + } + to { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0) + } +} + +@keyframes bounceInUp { + 60%, + 75%, + 90%, + from, + to { + -webkit-animation-timing-function: cubic-bezier(.215, .61, .355, 1); + animation-timing-function: cubic-bezier(.215, .61, .355, 1) + } + from { + opacity: 0; + -webkit-transform: translate3d(0, 3000px, 0); + transform: translate3d(0, 3000px, 0) + } + 60% { + opacity: 1; + -webkit-transform: translate3d(0, -20px, 0); + transform: translate3d(0, -20px, 0) + } + 75% { + -webkit-transform: translate3d(0, 10px, 0); + transform: translate3d(0, 10px, 0) + } + 90% { + -webkit-transform: translate3d(0, -5px, 0); + transform: translate3d(0, -5px, 0) + } + to { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0) + } +} + +.bounceInUp { + -webkit-animation-name: bounceInUp; + animation-name: bounceInUp +} + +@-webkit-keyframes bounceOut { + 20% { + -webkit-transform: scale3d(.9, .9, .9); + transform: scale3d(.9, .9, .9) + } + 50%, + 55% { + opacity: 1; + -webkit-transform: scale3d(1.1, 1.1, 1.1); + transform: scale3d(1.1, 1.1, 1.1) + } + to { + opacity: 0; + -webkit-transform: scale3d(.3, .3, .3); + transform: scale3d(.3, .3, .3) + } +} + +@keyframes bounceOut { + 20% { + -webkit-transform: scale3d(.9, .9, .9); + transform: scale3d(.9, .9, .9) + } + 50%, + 55% { + opacity: 1; + -webkit-transform: scale3d(1.1, 1.1, 1.1); + transform: scale3d(1.1, 1.1, 1.1) + } + to { + opacity: 0; + -webkit-transform: scale3d(.3, .3, .3); + transform: scale3d(.3, .3, .3) + } +} + +.bounceOut { + -webkit-animation-name: bounceOut; + animation-name: bounceOut +} + +@-webkit-keyframes bounceOutDown { + 20% { + -webkit-transform: translate3d(0, 10px, 0); + transform: translate3d(0, 10px, 0) + } + 40%, + 45% { + opacity: 1; + -webkit-transform: translate3d(0, -20px, 0); + transform: translate3d(0, -20px, 0) + } + to { + opacity: 0; + -webkit-transform: translate3d(0, 2000px, 0); + transform: translate3d(0, 2000px, 0) + } +} + +@keyframes bounceOutDown { + 20% { + -webkit-transform: translate3d(0, 10px, 0); + transform: translate3d(0, 10px, 0) + } + 40%, + 45% { + opacity: 1; + -webkit-transform: translate3d(0, -20px, 0); + transform: translate3d(0, -20px, 0) + } + to { + opacity: 0; + -webkit-transform: translate3d(0, 2000px, 0); + transform: translate3d(0, 2000px, 0) + } +} + +.bounceOutDown { + -webkit-animation-name: bounceOutDown; + animation-name: bounceOutDown +} + +@-webkit-keyframes bounceOutLeft { + 20% { + opacity: 1; + -webkit-transform: translate3d(20px, 0, 0); + transform: translate3d(20px, 0, 0) + } + to { + opacity: 0; + -webkit-transform: translate3d(-2000px, 0, 0); + transform: translate3d(-2000px, 0, 0) + } +} + +@keyframes bounceOutLeft { + 20% { + opacity: 1; + -webkit-transform: translate3d(20px, 0, 0); + transform: translate3d(20px, 0, 0) + } + to { + opacity: 0; + -webkit-transform: translate3d(-2000px, 0, 0); + transform: translate3d(-2000px, 0, 0) + } +} + +.bounceOutLeft { + -webkit-animation-name: bounceOutLeft; + animation-name: bounceOutLeft +} + +@-webkit-keyframes bounceOutRight { + 20% { + opacity: 1; + -webkit-transform: translate3d(-20px, 0, 0); + transform: translate3d(-20px, 0, 0) + } + to { + opacity: 0; + -webkit-transform: translate3d(2000px, 0, 0); + transform: translate3d(2000px, 0, 0) + } +} + +@keyframes bounceOutRight { + 20% { + opacity: 1; + -webkit-transform: translate3d(-20px, 0, 0); + transform: translate3d(-20px, 0, 0) + } + to { + opacity: 0; + -webkit-transform: translate3d(2000px, 0, 0); + transform: translate3d(2000px, 0, 0) + } +} + +.bounceOutRight { + -webkit-animation-name: bounceOutRight; + animation-name: bounceOutRight +} + +@-webkit-keyframes bounceOutUp { + 20% { + -webkit-transform: translate3d(0, -10px, 0); + transform: translate3d(0, -10px, 0) + } + 40%, + 45% { + opacity: 1; + -webkit-transform: translate3d(0, 20px, 0); + transform: translate3d(0, 20px, 0) + } + to { + opacity: 0; + -webkit-transform: translate3d(0, -2000px, 0); + transform: translate3d(0, -2000px, 0) + } +} + +@keyframes bounceOutUp { + 20% { + -webkit-transform: translate3d(0, -10px, 0); + transform: translate3d(0, -10px, 0) + } + 40%, + 45% { + opacity: 1; + -webkit-transform: translate3d(0, 20px, 0); + transform: translate3d(0, 20px, 0) + } + to { + opacity: 0; + -webkit-transform: translate3d(0, -2000px, 0); + transform: translate3d(0, -2000px, 0) + } +} + +.bounceOutUp { + -webkit-animation-name: bounceOutUp; + animation-name: bounceOutUp +} + +@-webkit-keyframes fadeIn { + from { + opacity: 0 + } + to { + opacity: 1 + } +} + +@keyframes fadeIn { + from { + opacity: 0 + } + to { + opacity: 1 + } +} + +.fadeIn { + -webkit-animation-name: fadeIn; + animation-name: fadeIn +} + +@-webkit-keyframes fadeInDown { + from { + opacity: 0; + -webkit-transform: translate3d(0, -75px, 0); + transform: translate3d(0, -75px, 0) + } + to { + opacity: 1; + -webkit-transform: none; + transform: none + } +} + +@keyframes fadeInDown { + from { + opacity: 0; + -webkit-transform: translate3d(0, -75px, 0); + transform: translate3d(0, -75px, 0) + } + to { + opacity: 1; + -webkit-transform: none; + transform: none + } +} + +.fadeInDown { + -webkit-animation-name: fadeInDown; + animation-name: fadeInDown +} + +@-webkit-keyframes fadeInDownBig { + from { + opacity: 0; + -webkit-transform: translate3d(0, -2000px, 0); + transform: translate3d(0, -2000px, 0) + } + to { + opacity: 1; + -webkit-transform: none; + transform: none + } +} + +@keyframes fadeInDownBig { + from { + opacity: 0; + -webkit-transform: translate3d(0, -2000px, 0); + transform: translate3d(0, -2000px, 0) + } + to { + opacity: 1; + -webkit-transform: none; + transform: none + } +} + +.fadeInDownBig { + -webkit-animation-name: fadeInDownBig; + animation-name: fadeInDownBig +} + +@-webkit-keyframes fadeInLeft { + from { + opacity: 0; + -webkit-transform: translate3d(-75px, 0, 0); + transform: translate3d(-75px, 0, 0) + } + to { + opacity: 1; + -webkit-transform: none; + transform: none + } +} + +@keyframes fadeInLeft { + from { + opacity: 0; + -webkit-transform: translate3d(-75px, 0, 0); + transform: translate3d(-75px, 0, 0) + } + to { + opacity: 1; + -webkit-transform: none; + transform: none + } +} + +.fadeInLeft { + -webkit-animation-name: fadeInLeft; + animation-name: fadeInLeft +} + +@-webkit-keyframes fadeInLeftBig { + from { + opacity: 0; + -webkit-transform: translate3d(-2000px, 0, 0); + transform: translate3d(-2000px, 0, 0) + } + to { + opacity: 1; + -webkit-transform: none; + transform: none + } +} + +@keyframes fadeInLeftBig { + from { + opacity: 0; + -webkit-transform: translate3d(-2000px, 0, 0); + transform: translate3d(-2000px, 0, 0) + } + to { + opacity: 1; + -webkit-transform: none; + transform: none + } +} + +.fadeInLeftBig { + -webkit-animation-name: fadeInLeftBig; + animation-name: fadeInLeftBig +} + +@-webkit-keyframes fadeInRight { + from { + opacity: 0; + -webkit-transform: translate3d(100%, 0, 0); + transform: translate3d(100%, 0, 0) + } + to { + opacity: 1; + -webkit-transform: none; + transform: none + } +} + +@keyframes fadeInRight { + from { + opacity: 0; + -webkit-transform: translate3d(100%, 0, 0); + transform: translate3d(100%, 0, 0) + } + to { + opacity: 1; + -webkit-transform: none; + transform: none + } +} + +.fadeInRight { + -webkit-animation-name: fadeInRight; + animation-name: fadeInRight +} + +@-webkit-keyframes fadeInRightBig { + from { + opacity: 0; + -webkit-transform: translate3d(2000px, 0, 0); + transform: translate3d(2000px, 0, 0) + } + to { + opacity: 1; + -webkit-transform: none; + transform: none + } +} + +@keyframes fadeInRightBig { + from { + opacity: 0; + -webkit-transform: translate3d(2000px, 0, 0); + transform: translate3d(2000px, 0, 0) + } + to { + opacity: 1; + -webkit-transform: none; + transform: none + } +} + +.fadeInRightBig { + -webkit-animation-name: fadeInRightBig; + animation-name: fadeInRightBig +} + +@-webkit-keyframes fadeInUp { + from { + opacity: 0; + -webkit-transform: translate3d(0, 75px, 0); + transform: translate3d(0, 75px, 0) + } + to { + opacity: 1; + -webkit-transform: none; + transform: none + } +} + +@keyframes fadeInUp { + from { + opacity: 0; + -webkit-transform: translate3d(0, 75px, 0); + transform: translate3d(0, 75px, 0) + } + to { + opacity: 1; + -webkit-transform: none; + transform: none + } +} + +.fadeInUp { + -webkit-animation-name: fadeInUp; + animation-name: fadeInUp +} + +@-webkit-keyframes fadeInUpBig { + from { + opacity: 0; + -webkit-transform: translate3d(0, 2000px, 0); + transform: translate3d(0, 2000px, 0) + } + to { + opacity: 1; + -webkit-transform: none; + transform: none + } +} + +@keyframes fadeInUpBig { + from { + opacity: 0; + -webkit-transform: translate3d(0, 2000px, 0); + transform: translate3d(0, 2000px, 0) + } + to { + opacity: 1; + -webkit-transform: none; + transform: none + } +} + +.fadeInUpBig { + -webkit-animation-name: fadeInUpBig; + animation-name: fadeInUpBig +} + +@-webkit-keyframes fadeOut { + from { + opacity: 1 + } + to { + opacity: 0 + } +} + +@keyframes fadeOut { + from { + opacity: 1 + } + to { + opacity: 0 + } +} + +.fadeOut { + -webkit-animation-name: fadeOut; + animation-name: fadeOut +} + +@-webkit-keyframes fadeOutDown { + from { + opacity: 1 + } + to { + opacity: 0; + -webkit-transform: translate3d(0, 100%, 0); + transform: translate3d(0, 100%, 0) + } +} + +@keyframes fadeOutDown { + from { + opacity: 1 + } + to { + opacity: 0; + -webkit-transform: translate3d(0, 100%, 0); + transform: translate3d(0, 100%, 0) + } +} + +.fadeOutDown { + -webkit-animation-name: fadeOutDown; + animation-name: fadeOutDown +} + +@-webkit-keyframes fadeOutDownBig { + from { + opacity: 1 + } + to { + opacity: 0; + -webkit-transform: translate3d(0, 2000px, 0); + transform: translate3d(0, 2000px, 0) + } +} + +@keyframes fadeOutDownBig { + from { + opacity: 1 + } + to { + opacity: 0; + -webkit-transform: translate3d(0, 2000px, 0); + transform: translate3d(0, 2000px, 0) + } +} + +.fadeOutDownBig { + -webkit-animation-name: fadeOutDownBig; + animation-name: fadeOutDownBig +} + +@-webkit-keyframes fadeOutLeft { + from { + opacity: 1 + } + to { + opacity: 0; + -webkit-transform: translate3d(-100%, 0, 0); + transform: translate3d(-100%, 0, 0) + } +} + +@keyframes fadeOutLeft { + from { + opacity: 1 + } + to { + opacity: 0; + -webkit-transform: translate3d(-100%, 0, 0); + transform: translate3d(-100%, 0, 0) + } +} + +.fadeOutLeft { + -webkit-animation-name: fadeOutLeft; + animation-name: fadeOutLeft +} + +@-webkit-keyframes fadeOutLeftBig { + from { + opacity: 1 + } + to { + opacity: 0; + -webkit-transform: translate3d(-2000px, 0, 0); + transform: translate3d(-2000px, 0, 0) + } +} + +@keyframes fadeOutLeftBig { + from { + opacity: 1 + } + to { + opacity: 0; + -webkit-transform: translate3d(-2000px, 0, 0); + transform: translate3d(-2000px, 0, 0) + } +} + +.fadeOutLeftBig { + -webkit-animation-name: fadeOutLeftBig; + animation-name: fadeOutLeftBig +} + +@-webkit-keyframes fadeOutRight { + from { + opacity: 1 + } + to { + opacity: 0; + -webkit-transform: translate3d(100%, 0, 0); + transform: translate3d(100%, 0, 0) + } +} + +@keyframes fadeOutRight { + from { + opacity: 1 + } + to { + opacity: 0; + -webkit-transform: translate3d(100%, 0, 0); + transform: translate3d(100%, 0, 0) + } +} + +.fadeOutRight { + -webkit-animation-name: fadeOutRight; + animation-name: fadeOutRight +} + +@-webkit-keyframes fadeOutRightBig { + from { + opacity: 1 + } + to { + opacity: 0; + -webkit-transform: translate3d(2000px, 0, 0); + transform: translate3d(2000px, 0, 0) + } +} + +@keyframes fadeOutRightBig { + from { + opacity: 1 + } + to { + opacity: 0; + -webkit-transform: translate3d(2000px, 0, 0); + transform: translate3d(2000px, 0, 0) + } +} + +.fadeOutRightBig { + -webkit-animation-name: fadeOutRightBig; + animation-name: fadeOutRightBig +} + +@-webkit-keyframes fadeOutUp { + from { + opacity: 1 + } + to { + opacity: 0; + -webkit-transform: translate3d(0, -100%, 0); + transform: translate3d(0, -100%, 0) + } +} + +@keyframes fadeOutUp { + from { + opacity: 1 + } + to { + opacity: 0; + -webkit-transform: translate3d(0, -100%, 0); + transform: translate3d(0, -100%, 0) + } +} + +.fadeOutUp { + -webkit-animation-name: fadeOutUp; + animation-name: fadeOutUp +} + +@-webkit-keyframes fadeOutUpBig { + from { + opacity: 1 + } + to { + opacity: 0; + -webkit-transform: translate3d(0, -2000px, 0); + transform: translate3d(0, -2000px, 0) + } +} + +@keyframes fadeOutUpBig { + from { + opacity: 1 + } + to { + opacity: 0; + -webkit-transform: translate3d(0, -2000px, 0); + transform: translate3d(0, -2000px, 0) + } +} + +.fadeOutUpBig { + -webkit-animation-name: fadeOutUpBig; + animation-name: fadeOutUpBig +} + +@-webkit-keyframes flip { + from { + -webkit-transform: perspective(400px) rotate3d(0, 1, 0, -360deg); + transform: perspective(400px) rotate3d(0, 1, 0, -360deg); + -webkit-animation-timing-function: ease-out; + animation-timing-function: ease-out + } + 40% { + -webkit-transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -190deg); + transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -190deg); + -webkit-animation-timing-function: ease-out; + animation-timing-function: ease-out + } + 50% { + -webkit-transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -170deg); + transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -170deg); + -webkit-animation-timing-function: ease-in; + animation-timing-function: ease-in + } + 80% { + -webkit-transform: perspective(400px) scale3d(.95, .95, .95); + transform: perspective(400px) scale3d(.95, .95, .95); + -webkit-animation-timing-function: ease-in; + animation-timing-function: ease-in + } + to { + -webkit-transform: perspective(400px); + transform: perspective(400px); + -webkit-animation-timing-function: ease-in; + animation-timing-function: ease-in + } +} + +@keyframes flip { + from { + -webkit-transform: perspective(400px) rotate3d(0, 1, 0, -360deg); + transform: perspective(400px) rotate3d(0, 1, 0, -360deg); + -webkit-animation-timing-function: ease-out; + animation-timing-function: ease-out + } + 40% { + -webkit-transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -190deg); + transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -190deg); + -webkit-animation-timing-function: ease-out; + animation-timing-function: ease-out + } + 50% { + -webkit-transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -170deg); + transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -170deg); + -webkit-animation-timing-function: ease-in; + animation-timing-function: ease-in + } + 80% { + -webkit-transform: perspective(400px) scale3d(.95, .95, .95); + transform: perspective(400px) scale3d(.95, .95, .95); + -webkit-animation-timing-function: ease-in; + animation-timing-function: ease-in + } + to { + -webkit-transform: perspective(400px); + transform: perspective(400px); + -webkit-animation-timing-function: ease-in; + animation-timing-function: ease-in + } +} + +.animated.flip { + -webkit-backface-visibility: visible; + backface-visibility: visible; + -webkit-animation-name: flip; + animation-name: flip +} + +@-webkit-keyframes flipInX { + from { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 90deg); + transform: perspective(400px) rotate3d(1, 0, 0, 90deg); + -webkit-animation-timing-function: ease-in; + animation-timing-function: ease-in; + opacity: 0 + } + 40% { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -20deg); + transform: perspective(400px) rotate3d(1, 0, 0, -20deg); + -webkit-animation-timing-function: ease-in; + animation-timing-function: ease-in + } + 60% { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 10deg); + transform: perspective(400px) rotate3d(1, 0, 0, 10deg); + opacity: 1 + } + 80% { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -5deg); + transform: perspective(400px) rotate3d(1, 0, 0, -5deg) + } + to { + -webkit-transform: perspective(400px); + transform: perspective(400px) + } +} + +@keyframes flipInX { + from { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 90deg); + transform: perspective(400px) rotate3d(1, 0, 0, 90deg); + -webkit-animation-timing-function: ease-in; + animation-timing-function: ease-in; + opacity: 0 + } + 40% { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -20deg); + transform: perspective(400px) rotate3d(1, 0, 0, -20deg); + -webkit-animation-timing-function: ease-in; + animation-timing-function: ease-in + } + 60% { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 10deg); + transform: perspective(400px) rotate3d(1, 0, 0, 10deg); + opacity: 1 + } + 80% { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -5deg); + transform: perspective(400px) rotate3d(1, 0, 0, -5deg) + } + to { + -webkit-transform: perspective(400px); + transform: perspective(400px) + } +} + +.flipInX { + -webkit-backface-visibility: visible!important; + backface-visibility: visible!important; + -webkit-animation-name: flipInX; + animation-name: flipInX +} + +@-webkit-keyframes flipInY { + from { + -webkit-transform: perspective(400px) rotate3d(0, 1, 0, 90deg); + transform: perspective(400px) rotate3d(0, 1, 0, 90deg); + -webkit-animation-timing-function: ease-in; + animation-timing-function: ease-in; + opacity: 0 + } + 40% { + -webkit-transform: perspective(400px) rotate3d(0, 1, 0, -20deg); + transform: perspective(400px) rotate3d(0, 1, 0, -20deg); + -webkit-animation-timing-function: ease-in; + animation-timing-function: ease-in + } + 60% { + -webkit-transform: perspective(400px) rotate3d(0, 1, 0, 10deg); + transform: perspective(400px) rotate3d(0, 1, 0, 10deg); + opacity: 1 + } + 80% { + -webkit-transform: perspective(400px) rotate3d(0, 1, 0, -5deg); + transform: perspective(400px) rotate3d(0, 1, 0, -5deg) + } + to { + -webkit-transform: perspective(400px); + transform: perspective(400px) + } +} + +@keyframes flipInY { + from { + -webkit-transform: perspective(400px) rotate3d(0, 1, 0, 90deg); + transform: perspective(400px) rotate3d(0, 1, 0, 90deg); + -webkit-animation-timing-function: ease-in; + animation-timing-function: ease-in; + opacity: 0 + } + 40% { + -webkit-transform: perspective(400px) rotate3d(0, 1, 0, -20deg); + transform: perspective(400px) rotate3d(0, 1, 0, -20deg); + -webkit-animation-timing-function: ease-in; + animation-timing-function: ease-in + } + 60% { + -webkit-transform: perspective(400px) rotate3d(0, 1, 0, 10deg); + transform: perspective(400px) rotate3d(0, 1, 0, 10deg); + opacity: 1 + } + 80% { + -webkit-transform: perspective(400px) rotate3d(0, 1, 0, -5deg); + transform: perspective(400px) rotate3d(0, 1, 0, -5deg) + } + to { + -webkit-transform: perspective(400px); + transform: perspective(400px) + } +} + +.flipInY { + -webkit-backface-visibility: visible!important; + backface-visibility: visible!important; + -webkit-animation-name: flipInY; + animation-name: flipInY +} + +@-webkit-keyframes flipOutX { + from { + -webkit-transform: perspective(400px); + transform: perspective(400px) + } + 30% { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -20deg); + transform: perspective(400px) rotate3d(1, 0, 0, -20deg); + opacity: 1 + } + to { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 90deg); + transform: perspective(400px) rotate3d(1, 0, 0, 90deg); + opacity: 0 + } +} + +@keyframes flipOutX { + from { + -webkit-transform: perspective(400px); + transform: perspective(400px) + } + 30% { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -20deg); + transform: perspective(400px) rotate3d(1, 0, 0, -20deg); + opacity: 1 + } + to { + -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 90deg); + transform: perspective(400px) rotate3d(1, 0, 0, 90deg); + opacity: 0 + } +} + +.flipOutX { + -webkit-animation-name: flipOutX; + animation-name: flipOutX; + -webkit-backface-visibility: visible!important; + backface-visibility: visible!important +} + +@-webkit-keyframes flipOutY { + from { + -webkit-transform: perspective(400px); + transform: perspective(400px) + } + 30% { + -webkit-transform: perspective(400px) rotate3d(0, 1, 0, -15deg); + transform: perspective(400px) rotate3d(0, 1, 0, -15deg); + opacity: 1 + } + to { + -webkit-transform: perspective(400px) rotate3d(0, 1, 0, 90deg); + transform: perspective(400px) rotate3d(0, 1, 0, 90deg); + opacity: 0 + } +} + +@keyframes flipOutY { + from { + -webkit-transform: perspective(400px); + transform: perspective(400px) + } + 30% { + -webkit-transform: perspective(400px) rotate3d(0, 1, 0, -15deg); + transform: perspective(400px) rotate3d(0, 1, 0, -15deg); + opacity: 1 + } + to { + -webkit-transform: perspective(400px) rotate3d(0, 1, 0, 90deg); + transform: perspective(400px) rotate3d(0, 1, 0, 90deg); + opacity: 0 + } +} + +.flipOutY { + -webkit-backface-visibility: visible!important; + backface-visibility: visible!important; + -webkit-animation-name: flipOutY; + animation-name: flipOutY +} + +@-webkit-keyframes lightSpeedIn { + from { + -webkit-transform: translate3d(100%, 0, 0) skewX(-30deg); + transform: translate3d(100%, 0, 0) skewX(-30deg); + opacity: 0 + } + 60% { + -webkit-transform: skewX(20deg); + transform: skewX(20deg); + opacity: 1 + } + 80% { + -webkit-transform: skewX(-5deg); + transform: skewX(-5deg); + opacity: 1 + } + to { + -webkit-transform: none; + transform: none; + opacity: 1 + } +} + +@keyframes lightSpeedIn { + from { + -webkit-transform: translate3d(100%, 0, 0) skewX(-30deg); + transform: translate3d(100%, 0, 0) skewX(-30deg); + opacity: 0 + } + 60% { + -webkit-transform: skewX(20deg); + transform: skewX(20deg); + opacity: 1 + } + 80% { + -webkit-transform: skewX(-5deg); + transform: skewX(-5deg); + opacity: 1 + } + to { + -webkit-transform: none; + transform: none; + opacity: 1 + } +} + +.lightSpeedIn { + -webkit-animation-name: lightSpeedIn; + animation-name: lightSpeedIn; + -webkit-animation-timing-function: ease-out; + animation-timing-function: ease-out +} + +@-webkit-keyframes lightSpeedOut { + from { + opacity: 1 + } + to { + -webkit-transform: translate3d(100%, 0, 0) skewX(30deg); + transform: translate3d(100%, 0, 0) skewX(30deg); + opacity: 0 + } +} + +@keyframes lightSpeedOut { + from { + opacity: 1 + } + to { + -webkit-transform: translate3d(100%, 0, 0) skewX(30deg); + transform: translate3d(100%, 0, 0) skewX(30deg); + opacity: 0 + } +} + +.lightSpeedOut { + -webkit-animation-name: lightSpeedOut; + animation-name: lightSpeedOut; + -webkit-animation-timing-function: ease-in; + animation-timing-function: ease-in +} + +@-webkit-keyframes rotateIn { + from { + -webkit-transform-origin: center; + transform-origin: center; + -webkit-transform: rotate3d(0, 0, 1, -200deg); + transform: rotate3d(0, 0, 1, -200deg); + opacity: 0 + } + to { + -webkit-transform-origin: center; + transform-origin: center; + -webkit-transform: none; + transform: none; + opacity: 1 + } +} + +@keyframes rotateIn { + from { + -webkit-transform-origin: center; + transform-origin: center; + -webkit-transform: rotate3d(0, 0, 1, -200deg); + transform: rotate3d(0, 0, 1, -200deg); + opacity: 0 + } + to { + -webkit-transform-origin: center; + transform-origin: center; + -webkit-transform: none; + transform: none; + opacity: 1 + } +} + +.rotateIn { + -webkit-animation-name: rotateIn; + animation-name: rotateIn +} + +@-webkit-keyframes rotateInDownLeft { + from { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate3d(0, 0, 1, -45deg); + transform: rotate3d(0, 0, 1, -45deg); + opacity: 0 + } + to { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: none; + transform: none; + opacity: 1 + } +} + +@keyframes rotateInDownLeft { + from { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate3d(0, 0, 1, -45deg); + transform: rotate3d(0, 0, 1, -45deg); + opacity: 0 + } + to { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: none; + transform: none; + opacity: 1 + } +} + +.rotateInDownLeft { + -webkit-animation-name: rotateInDownLeft; + animation-name: rotateInDownLeft +} + +@-webkit-keyframes rotateInDownRight { + from { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate3d(0, 0, 1, 45deg); + transform: rotate3d(0, 0, 1, 45deg); + opacity: 0 + } + to { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: none; + transform: none; + opacity: 1 + } +} + +@keyframes rotateInDownRight { + from { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate3d(0, 0, 1, 45deg); + transform: rotate3d(0, 0, 1, 45deg); + opacity: 0 + } + to { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: none; + transform: none; + opacity: 1 + } +} + +.rotateInDownRight { + -webkit-animation-name: rotateInDownRight; + animation-name: rotateInDownRight +} + +@-webkit-keyframes rotateInUpLeft { + from { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate3d(0, 0, 1, 45deg); + transform: rotate3d(0, 0, 1, 45deg); + opacity: 0 + } + to { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: none; + transform: none; + opacity: 1 + } +} + +@keyframes rotateInUpLeft { + from { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate3d(0, 0, 1, 45deg); + transform: rotate3d(0, 0, 1, 45deg); + opacity: 0 + } + to { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: none; + transform: none; + opacity: 1 + } +} + +.rotateInUpLeft { + -webkit-animation-name: rotateInUpLeft; + animation-name: rotateInUpLeft +} + +@-webkit-keyframes rotateInUpRight { + from { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate3d(0, 0, 1, -90deg); + transform: rotate3d(0, 0, 1, -90deg); + opacity: 0 + } + to { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: none; + transform: none; + opacity: 1 + } +} + +@keyframes rotateInUpRight { + from { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate3d(0, 0, 1, -90deg); + transform: rotate3d(0, 0, 1, -90deg); + opacity: 0 + } + to { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: none; + transform: none; + opacity: 1 + } +} + +.rotateInUpRight { + -webkit-animation-name: rotateInUpRight; + animation-name: rotateInUpRight +} + +@-webkit-keyframes rotateOut { + from { + -webkit-transform-origin: center; + transform-origin: center; + opacity: 1 + } + to { + -webkit-transform-origin: center; + transform-origin: center; + -webkit-transform: rotate3d(0, 0, 1, 200deg); + transform: rotate3d(0, 0, 1, 200deg); + opacity: 0 + } +} + +@keyframes rotateOut { + from { + -webkit-transform-origin: center; + transform-origin: center; + opacity: 1 + } + to { + -webkit-transform-origin: center; + transform-origin: center; + -webkit-transform: rotate3d(0, 0, 1, 200deg); + transform: rotate3d(0, 0, 1, 200deg); + opacity: 0 + } +} + +.rotateOut { + -webkit-animation-name: rotateOut; + animation-name: rotateOut +} + +@-webkit-keyframes rotateOutDownLeft { + from { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + opacity: 1 + } + to { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate3d(0, 0, 1, 45deg); + transform: rotate3d(0, 0, 1, 45deg); + opacity: 0 + } +} + +@keyframes rotateOutDownLeft { + from { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + opacity: 1 + } + to { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate3d(0, 0, 1, 45deg); + transform: rotate3d(0, 0, 1, 45deg); + opacity: 0 + } +} + +.rotateOutDownLeft { + -webkit-animation-name: rotateOutDownLeft; + animation-name: rotateOutDownLeft +} + +@-webkit-keyframes rotateOutDownRight { + from { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + opacity: 1 + } + to { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate3d(0, 0, 1, -45deg); + transform: rotate3d(0, 0, 1, -45deg); + opacity: 0 + } +} + +@keyframes rotateOutDownRight { + from { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + opacity: 1 + } + to { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate3d(0, 0, 1, -45deg); + transform: rotate3d(0, 0, 1, -45deg); + opacity: 0 + } +} + +.rotateOutDownRight { + -webkit-animation-name: rotateOutDownRight; + animation-name: rotateOutDownRight +} + +@-webkit-keyframes rotateOutUpLeft { + from { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + opacity: 1 + } + to { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate3d(0, 0, 1, -45deg); + transform: rotate3d(0, 0, 1, -45deg); + opacity: 0 + } +} + +@keyframes rotateOutUpLeft { + from { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + opacity: 1 + } + to { + -webkit-transform-origin: left bottom; + transform-origin: left bottom; + -webkit-transform: rotate3d(0, 0, 1, -45deg); + transform: rotate3d(0, 0, 1, -45deg); + opacity: 0 + } +} + +.rotateOutUpLeft { + -webkit-animation-name: rotateOutUpLeft; + animation-name: rotateOutUpLeft +} + +@-webkit-keyframes rotateOutUpRight { + from { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + opacity: 1 + } + to { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate3d(0, 0, 1, 90deg); + transform: rotate3d(0, 0, 1, 90deg); + opacity: 0 + } +} + +@keyframes rotateOutUpRight { + from { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + opacity: 1 + } + to { + -webkit-transform-origin: right bottom; + transform-origin: right bottom; + -webkit-transform: rotate3d(0, 0, 1, 90deg); + transform: rotate3d(0, 0, 1, 90deg); + opacity: 0 + } +} + +.rotateOutUpRight { + -webkit-animation-name: rotateOutUpRight; + animation-name: rotateOutUpRight +} + +@-webkit-keyframes hinge { + 0% { + -webkit-transform-origin: top left; + transform-origin: top left; + -webkit-animation-timing-function: ease-in-out; + animation-timing-function: ease-in-out + } + 20%, + 60% { + -webkit-transform: rotate3d(0, 0, 1, 80deg); + transform: rotate3d(0, 0, 1, 80deg); + -webkit-transform-origin: top left; + transform-origin: top left; + -webkit-animation-timing-function: ease-in-out; + animation-timing-function: ease-in-out + } + 40%, + 80% { + -webkit-transform: rotate3d(0, 0, 1, 60deg); + transform: rotate3d(0, 0, 1, 60deg); + -webkit-transform-origin: top left; + transform-origin: top left; + -webkit-animation-timing-function: ease-in-out; + animation-timing-function: ease-in-out; + opacity: 1 + } + to { + -webkit-transform: translate3d(0, 700px, 0); + transform: translate3d(0, 700px, 0); + opacity: 0 + } +} + +@keyframes hinge { + 0% { + -webkit-transform-origin: top left; + transform-origin: top left; + -webkit-animation-timing-function: ease-in-out; + animation-timing-function: ease-in-out + } + 20%, + 60% { + -webkit-transform: rotate3d(0, 0, 1, 80deg); + transform: rotate3d(0, 0, 1, 80deg); + -webkit-transform-origin: top left; + transform-origin: top left; + -webkit-animation-timing-function: ease-in-out; + animation-timing-function: ease-in-out + } + 40%, + 80% { + -webkit-transform: rotate3d(0, 0, 1, 60deg); + transform: rotate3d(0, 0, 1, 60deg); + -webkit-transform-origin: top left; + transform-origin: top left; + -webkit-animation-timing-function: ease-in-out; + animation-timing-function: ease-in-out; + opacity: 1 + } + to { + -webkit-transform: translate3d(0, 700px, 0); + transform: translate3d(0, 700px, 0); + opacity: 0 + } +} + +.hinge { + -webkit-animation-name: hinge; + animation-name: hinge +} + +@-webkit-keyframes rollIn { + from { + opacity: 0; + -webkit-transform: translate3d(-100%, 0, 0) rotate3d(0, 0, 1, -120deg); + transform: translate3d(-100%, 0, 0) rotate3d(0, 0, 1, -120deg) + } + to { + opacity: 1; + -webkit-transform: none; + transform: none + } +} + +@keyframes rollIn { + from { + opacity: 0; + -webkit-transform: translate3d(-100%, 0, 0) rotate3d(0, 0, 1, -120deg); + transform: translate3d(-100%, 0, 0) rotate3d(0, 0, 1, -120deg) + } + to { + opacity: 1; + -webkit-transform: none; + transform: none + } +} + +.rollIn { + -webkit-animation-name: rollIn; + animation-name: rollIn +} + +@-webkit-keyframes rollOut { + from { + opacity: 1 + } + to { + opacity: 0; + -webkit-transform: translate3d(100%, 0, 0) rotate3d(0, 0, 1, 120deg); + transform: translate3d(100%, 0, 0) rotate3d(0, 0, 1, 120deg) + } +} + +@keyframes rollOut { + from { + opacity: 1 + } + to { + opacity: 0; + -webkit-transform: translate3d(100%, 0, 0) rotate3d(0, 0, 1, 120deg); + transform: translate3d(100%, 0, 0) rotate3d(0, 0, 1, 120deg) + } +} + +.rollOut { + -webkit-animation-name: rollOut; + animation-name: rollOut +} + +@-webkit-keyframes zoomIn { + from { + opacity: 0; + -webkit-transform: scale3d(.3, .3, .3); + transform: scale3d(.3, .3, .3) + } + 50% { + opacity: 1 + } +} + +@keyframes zoomIn { + from { + opacity: 0; + -webkit-transform: scale3d(.3, .3, .3); + transform: scale3d(.3, .3, .3) + } + 50% { + opacity: 1 + } +} + +.zoomIn { + -webkit-animation-name: zoomIn; + animation-name: zoomIn +} + +@-webkit-keyframes zoomInDown { + from { + opacity: 0; + -webkit-transform: scale3d(.1, .1, .1) translate3d(0, -1000px, 0); + transform: scale3d(.1, .1, .1) translate3d(0, -1000px, 0); + -webkit-animation-timing-function: cubic-bezier(.55, .055, .675, .19); + animation-timing-function: cubic-bezier(.55, .055, .675, .19) + } + 60% { + opacity: 1; + -webkit-transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0); + transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0); + -webkit-animation-timing-function: cubic-bezier(.175, .885, .32, 1); + animation-timing-function: cubic-bezier(.175, .885, .32, 1) + } +} + +@keyframes zoomInDown { + from { + opacity: 0; + -webkit-transform: scale3d(.1, .1, .1) translate3d(0, -1000px, 0); + transform: scale3d(.1, .1, .1) translate3d(0, -1000px, 0); + -webkit-animation-timing-function: cubic-bezier(.55, .055, .675, .19); + animation-timing-function: cubic-bezier(.55, .055, .675, .19) + } + 60% { + opacity: 1; + -webkit-transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0); + transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0); + -webkit-animation-timing-function: cubic-bezier(.175, .885, .32, 1); + animation-timing-function: cubic-bezier(.175, .885, .32, 1) + } +} + +.zoomInDown { + -webkit-animation-name: zoomInDown; + animation-name: zoomInDown +} + +@-webkit-keyframes zoomInLeft { + from { + opacity: 0; + -webkit-transform: scale3d(.1, .1, .1) translate3d(-1000px, 0, 0); + transform: scale3d(.1, .1, .1) translate3d(-1000px, 0, 0); + -webkit-animation-timing-function: cubic-bezier(.55, .055, .675, .19); + animation-timing-function: cubic-bezier(.55, .055, .675, .19) + } + 60% { + opacity: 1; + -webkit-transform: scale3d(.475, .475, .475) translate3d(10px, 0, 0); + transform: scale3d(.475, .475, .475) translate3d(10px, 0, 0); + -webkit-animation-timing-function: cubic-bezier(.175, .885, .32, 1); + animation-timing-function: cubic-bezier(.175, .885, .32, 1) + } +} + +@keyframes zoomInLeft { + from { + opacity: 0; + -webkit-transform: scale3d(.1, .1, .1) translate3d(-1000px, 0, 0); + transform: scale3d(.1, .1, .1) translate3d(-1000px, 0, 0); + -webkit-animation-timing-function: cubic-bezier(.55, .055, .675, .19); + animation-timing-function: cubic-bezier(.55, .055, .675, .19) + } + 60% { + opacity: 1; + -webkit-transform: scale3d(.475, .475, .475) translate3d(10px, 0, 0); + transform: scale3d(.475, .475, .475) translate3d(10px, 0, 0); + -webkit-animation-timing-function: cubic-bezier(.175, .885, .32, 1); + animation-timing-function: cubic-bezier(.175, .885, .32, 1) + } +} + +.zoomInLeft { + -webkit-animation-name: zoomInLeft; + animation-name: zoomInLeft +} + +@-webkit-keyframes zoomInRight { + from { + opacity: 0; + -webkit-transform: scale3d(.1, .1, .1) translate3d(1000px, 0, 0); + transform: scale3d(.1, .1, .1) translate3d(1000px, 0, 0); + -webkit-animation-timing-function: cubic-bezier(.55, .055, .675, .19); + animation-timing-function: cubic-bezier(.55, .055, .675, .19) + } + 60% { + opacity: 1; + -webkit-transform: scale3d(.475, .475, .475) translate3d(-10px, 0, 0); + transform: scale3d(.475, .475, .475) translate3d(-10px, 0, 0); + -webkit-animation-timing-function: cubic-bezier(.175, .885, .32, 1); + animation-timing-function: cubic-bezier(.175, .885, .32, 1) + } +} + +@keyframes zoomInRight { + from { + opacity: 0; + -webkit-transform: scale3d(.1, .1, .1) translate3d(1000px, 0, 0); + transform: scale3d(.1, .1, .1) translate3d(1000px, 0, 0); + -webkit-animation-timing-function: cubic-bezier(.55, .055, .675, .19); + animation-timing-function: cubic-bezier(.55, .055, .675, .19) + } + 60% { + opacity: 1; + -webkit-transform: scale3d(.475, .475, .475) translate3d(-10px, 0, 0); + transform: scale3d(.475, .475, .475) translate3d(-10px, 0, 0); + -webkit-animation-timing-function: cubic-bezier(.175, .885, .32, 1); + animation-timing-function: cubic-bezier(.175, .885, .32, 1) + } +} + +.zoomInRight { + -webkit-animation-name: zoomInRight; + animation-name: zoomInRight +} + +@-webkit-keyframes zoomInUp { + from { + opacity: 0; + -webkit-transform: scale3d(.1, .1, .1) translate3d(0, 1000px, 0); + transform: scale3d(.1, .1, .1) translate3d(0, 1000px, 0); + -webkit-animation-timing-function: cubic-bezier(.55, .055, .675, .19); + animation-timing-function: cubic-bezier(.55, .055, .675, .19) + } + 60% { + opacity: 1; + -webkit-transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0); + transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0); + -webkit-animation-timing-function: cubic-bezier(.175, .885, .32, 1); + animation-timing-function: cubic-bezier(.175, .885, .32, 1) + } +} + +@keyframes zoomInUp { + from { + opacity: 0; + -webkit-transform: scale3d(.1, .1, .1) translate3d(0, 1000px, 0); + transform: scale3d(.1, .1, .1) translate3d(0, 1000px, 0); + -webkit-animation-timing-function: cubic-bezier(.55, .055, .675, .19); + animation-timing-function: cubic-bezier(.55, .055, .675, .19) + } + 60% { + opacity: 1; + -webkit-transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0); + transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0); + -webkit-animation-timing-function: cubic-bezier(.175, .885, .32, 1); + animation-timing-function: cubic-bezier(.175, .885, .32, 1) + } +} + +.zoomInUp { + -webkit-animation-name: zoomInUp; + animation-name: zoomInUp +} + +@-webkit-keyframes zoomOut { + from { + opacity: 1 + } + 50% { + opacity: 0; + -webkit-transform: scale3d(.3, .3, .3); + transform: scale3d(.3, .3, .3) + } + to { + opacity: 0 + } +} + +@keyframes zoomOut { + from { + opacity: 1 + } + 50% { + opacity: 0; + -webkit-transform: scale3d(.3, .3, .3); + transform: scale3d(.3, .3, .3) + } + to { + opacity: 0 + } +} + +.zoomOut { + -webkit-animation-name: zoomOut; + animation-name: zoomOut +} + +@-webkit-keyframes zoomOutDown { + 40% { + opacity: 1; + -webkit-transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0); + transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0); + -webkit-animation-timing-function: cubic-bezier(.55, .055, .675, .19); + animation-timing-function: cubic-bezier(.55, .055, .675, .19) + } + to { + opacity: 0; + -webkit-transform: scale3d(.1, .1, .1) translate3d(0, 2000px, 0); + transform: scale3d(.1, .1, .1) translate3d(0, 2000px, 0); + -webkit-transform-origin: center bottom; + transform-origin: center bottom; + -webkit-animation-timing-function: cubic-bezier(.175, .885, .32, 1); + animation-timing-function: cubic-bezier(.175, .885, .32, 1) + } +} + +@keyframes zoomOutDown { + 40% { + opacity: 1; + -webkit-transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0); + transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0); + -webkit-animation-timing-function: cubic-bezier(.55, .055, .675, .19); + animation-timing-function: cubic-bezier(.55, .055, .675, .19) + } + to { + opacity: 0; + -webkit-transform: scale3d(.1, .1, .1) translate3d(0, 2000px, 0); + transform: scale3d(.1, .1, .1) translate3d(0, 2000px, 0); + -webkit-transform-origin: center bottom; + transform-origin: center bottom; + -webkit-animation-timing-function: cubic-bezier(.175, .885, .32, 1); + animation-timing-function: cubic-bezier(.175, .885, .32, 1) + } +} + +.zoomOutDown { + -webkit-animation-name: zoomOutDown; + animation-name: zoomOutDown +} + +@-webkit-keyframes zoomOutLeft { + 40% { + opacity: 1; + -webkit-transform: scale3d(.475, .475, .475) translate3d(42px, 0, 0); + transform: scale3d(.475, .475, .475) translate3d(42px, 0, 0) + } + to { + opacity: 0; + -webkit-transform: scale(.1) translate3d(-2000px, 0, 0); + transform: scale(.1) translate3d(-2000px, 0, 0); + -webkit-transform-origin: left center; + transform-origin: left center + } +} + +@keyframes zoomOutLeft { + 40% { + opacity: 1; + -webkit-transform: scale3d(.475, .475, .475) translate3d(42px, 0, 0); + transform: scale3d(.475, .475, .475) translate3d(42px, 0, 0) + } + to { + opacity: 0; + -webkit-transform: scale(.1) translate3d(-2000px, 0, 0); + transform: scale(.1) translate3d(-2000px, 0, 0); + -webkit-transform-origin: left center; + transform-origin: left center + } +} + +.zoomOutLeft { + -webkit-animation-name: zoomOutLeft; + animation-name: zoomOutLeft +} + +@-webkit-keyframes zoomOutRight { + 40% { + opacity: 1; + -webkit-transform: scale3d(.475, .475, .475) translate3d(-42px, 0, 0); + transform: scale3d(.475, .475, .475) translate3d(-42px, 0, 0) + } + to { + opacity: 0; + -webkit-transform: scale(.1) translate3d(2000px, 0, 0); + transform: scale(.1) translate3d(2000px, 0, 0); + -webkit-transform-origin: right center; + transform-origin: right center + } +} + +@keyframes zoomOutRight { + 40% { + opacity: 1; + -webkit-transform: scale3d(.475, .475, .475) translate3d(-42px, 0, 0); + transform: scale3d(.475, .475, .475) translate3d(-42px, 0, 0) + } + to { + opacity: 0; + -webkit-transform: scale(.1) translate3d(2000px, 0, 0); + transform: scale(.1) translate3d(2000px, 0, 0); + -webkit-transform-origin: right center; + transform-origin: right center + } +} + +.zoomOutRight { + -webkit-animation-name: zoomOutRight; + animation-name: zoomOutRight +} + +@-webkit-keyframes zoomOutUp { + 40% { + opacity: 1; + -webkit-transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0); + transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0); + -webkit-animation-timing-function: cubic-bezier(.55, .055, .675, .19); + animation-timing-function: cubic-bezier(.55, .055, .675, .19) + } + to { + opacity: 0; + -webkit-transform: scale3d(.1, .1, .1) translate3d(0, -2000px, 0); + transform: scale3d(.1, .1, .1) translate3d(0, -2000px, 0); + -webkit-transform-origin: center bottom; + transform-origin: center bottom; + -webkit-animation-timing-function: cubic-bezier(.175, .885, .32, 1); + animation-timing-function: cubic-bezier(.175, .885, .32, 1) + } +} + +@keyframes zoomOutUp { + 40% { + opacity: 1; + -webkit-transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0); + transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0); + -webkit-animation-timing-function: cubic-bezier(.55, .055, .675, .19); + animation-timing-function: cubic-bezier(.55, .055, .675, .19) + } + to { + opacity: 0; + -webkit-transform: scale3d(.1, .1, .1) translate3d(0, -2000px, 0); + transform: scale3d(.1, .1, .1) translate3d(0, -2000px, 0); + -webkit-transform-origin: center bottom; + transform-origin: center bottom; + -webkit-animation-timing-function: cubic-bezier(.175, .885, .32, 1); + animation-timing-function: cubic-bezier(.175, .885, .32, 1) + } +} + +.zoomOutUp { + -webkit-animation-name: zoomOutUp; + animation-name: zoomOutUp +} + +@-webkit-keyframes slideInDown { + from { + -webkit-transform: translate3d(0, -100%, 0); + transform: translate3d(0, -100%, 0); + visibility: visible + } + to { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0) + } +} + +@keyframes slideInDown { + from { + -webkit-transform: translate3d(0, -100%, 0); + transform: translate3d(0, -100%, 0); + visibility: visible + } + to { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0) + } +} + +.slideInDown { + -webkit-animation-name: slideInDown; + animation-name: slideInDown +} + +@-webkit-keyframes slideInLeft { + from { + -webkit-transform: translate3d(-75px, 0, 0); + transform: translate3d(-75px, 0, 0); + visibility: visible + } + to { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0) + } +} + +@keyframes slideInLeft { + from { + -webkit-transform: translate3d(-75px, 0, 0); + transform: translate3d(-75px, 0, 0); + visibility: visible + } + to { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0) + } +} + +.slideInLeft { + -webkit-animation-name: slideInLeft; + animation-name: slideInLeft +} + +@-webkit-keyframes slideInRight { + from { + -webkit-transform: translate3d(75px, 0, 0); + transform: translate3d(75px, 0, 0); + visibility: visible + } + to { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0) + } +} + +@keyframes slideInRight { + from { + -webkit-transform: translate3d(75px, 0, 0); + transform: translate3d(75px, 0, 0); + visibility: visible + } + to { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0) + } +} + +.slideInRight { + -webkit-animation-name: slideInRight; + animation-name: slideInRight +} + +@-webkit-keyframes slideInUp { + from { + -webkit-transform: translate3d(0, 100%, 0); + transform: translate3d(0, 100%, 0); + visibility: visible + } + to { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0) + } +} + +@keyframes slideInUp { + from { + -webkit-transform: translate3d(0, 100%, 0); + transform: translate3d(0, 100%, 0); + visibility: visible + } + to { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0) + } +} + +.slideInUp { + -webkit-animation-name: slideInUp; + animation-name: slideInUp +} + +@-webkit-keyframes slideOutDown { + from { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0) + } + to { + visibility: hidden; + -webkit-transform: translate3d(0, 100%, 0); + transform: translate3d(0, 100%, 0) + } +} + +@keyframes slideOutDown { + from { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0) + } + to { + visibility: hidden; + -webkit-transform: translate3d(0, 100%, 0); + transform: translate3d(0, 100%, 0) + } +} + +.slideOutDown { + -webkit-animation-name: slideOutDown; + animation-name: slideOutDown +} + +@-webkit-keyframes slideOutLeft { + from { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0) + } + to { + visibility: hidden; + -webkit-transform: translate3d(-100%, 0, 0); + transform: translate3d(-100%, 0, 0) + } +} + +@keyframes slideOutLeft { + from { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0) + } + to { + visibility: hidden; + -webkit-transform: translate3d(-100%, 0, 0); + transform: translate3d(-100%, 0, 0) + } +} + +.slideOutLeft { + -webkit-animation-name: slideOutLeft; + animation-name: slideOutLeft +} + +@-webkit-keyframes slideOutRight { + from { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0) + } + to { + visibility: hidden; + -webkit-transform: translate3d(100%, 0, 0); + transform: translate3d(100%, 0, 0) + } +} + +@keyframes slideOutRight { + from { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0) + } + to { + visibility: hidden; + -webkit-transform: translate3d(100%, 0, 0); + transform: translate3d(100%, 0, 0) + } +} + +.slideOutRight { + -webkit-animation-name: slideOutRight; + animation-name: slideOutRight +} + +@-webkit-keyframes slideOutUp { + from { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0) + } + to { + visibility: hidden; + -webkit-transform: translate3d(0, -100%, 0); + transform: translate3d(0, -100%, 0) + } +} + +@keyframes slideOutUp { + from { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0) + } + to { + visibility: hidden; + -webkit-transform: translate3d(0, -100%, 0); + transform: translate3d(0, -100%, 0) + } +} + +.slideOutUp { + -webkit-animation-name: slideOutUp; + animation-name: slideOutUp +} \ No newline at end of file diff --git a/assets/library/animate/animate.min.css b/assets/library/animate/animate.min.css new file mode 100644 index 0000000..9df1622 --- /dev/null +++ b/assets/library/animate/animate.min.css @@ -0,0 +1,9 @@ +@charset "UTF-8"; +/*! + * animate.css -http://daneden.me/animate + * Version - 3.5.1 + * Licensed under the MIT license - http://opensource.org/licenses/MIT + * + * Copyright (c) 2016 Daniel Eden + */ +.animated{-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-fill-mode:both;animation-fill-mode:both}.animated.infinite{-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.animated.hinge{-webkit-animation-duration:2s;animation-duration:2s}.animated.bounceIn,.animated.bounceOut,.animated.flipOutX,.animated.flipOutY{-webkit-animation-duration:.75s;animation-duration:.75s}@-webkit-keyframes bounce{20%,53%,80%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1);-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}40%,43%{-webkit-animation-timing-function:cubic-bezier(.755,.050,.855,.060);animation-timing-function:cubic-bezier(.755,.050,.855,.060);-webkit-transform:translate3d(0,-30px,0);transform:translate3d(0,-30px,0)}70%{-webkit-animation-timing-function:cubic-bezier(.755,.050,.855,.060);animation-timing-function:cubic-bezier(.755,.050,.855,.060);-webkit-transform:translate3d(0,-15px,0);transform:translate3d(0,-15px,0)}90%{-webkit-transform:translate3d(0,-4px,0);transform:translate3d(0,-4px,0)}}@keyframes bounce{20%,53%,80%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1);-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}40%,43%{-webkit-animation-timing-function:cubic-bezier(.755,.050,.855,.060);animation-timing-function:cubic-bezier(.755,.050,.855,.060);-webkit-transform:translate3d(0,-30px,0);transform:translate3d(0,-30px,0)}70%{-webkit-animation-timing-function:cubic-bezier(.755,.050,.855,.060);animation-timing-function:cubic-bezier(.755,.050,.855,.060);-webkit-transform:translate3d(0,-15px,0);transform:translate3d(0,-15px,0)}90%{-webkit-transform:translate3d(0,-4px,0);transform:translate3d(0,-4px,0)}}.bounce{-webkit-animation-name:bounce;animation-name:bounce;-webkit-transform-origin:center bottom;transform-origin:center bottom}@-webkit-keyframes flash{50%,from,to{opacity:1}25%,75%{opacity:0}}@keyframes flash{50%,from,to{opacity:1}25%,75%{opacity:0}}.flash{-webkit-animation-name:flash;animation-name:flash}@-webkit-keyframes pulse{from,to{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}50%{-webkit-transform:scale3d(1.05,1.05,1.05);transform:scale3d(1.05,1.05,1.05)}}@keyframes pulse{from,to{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}50%{-webkit-transform:scale3d(1.05,1.05,1.05);transform:scale3d(1.05,1.05,1.05)}}.pulse{-webkit-animation-name:pulse;animation-name:pulse}@-webkit-keyframes rubberBand{from,to{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}30%{-webkit-transform:scale3d(1.25,.75,1);transform:scale3d(1.25,.75,1)}40%{-webkit-transform:scale3d(.75,1.25,1);transform:scale3d(.75,1.25,1)}50%{-webkit-transform:scale3d(1.15,.85,1);transform:scale3d(1.15,.85,1)}65%{-webkit-transform:scale3d(.95,1.05,1);transform:scale3d(.95,1.05,1)}75%{-webkit-transform:scale3d(1.05,.95,1);transform:scale3d(1.05,.95,1)}}@keyframes rubberBand{from,to{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}30%{-webkit-transform:scale3d(1.25,.75,1);transform:scale3d(1.25,.75,1)}40%{-webkit-transform:scale3d(.75,1.25,1);transform:scale3d(.75,1.25,1)}50%{-webkit-transform:scale3d(1.15,.85,1);transform:scale3d(1.15,.85,1)}65%{-webkit-transform:scale3d(.95,1.05,1);transform:scale3d(.95,1.05,1)}75%{-webkit-transform:scale3d(1.05,.95,1);transform:scale3d(1.05,.95,1)}}.rubberBand{-webkit-animation-name:rubberBand;animation-name:rubberBand}@-webkit-keyframes shake{from,to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}20%,40%,60%,80%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}}@keyframes shake{from,to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}20%,40%,60%,80%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}}.shake{-webkit-animation-name:shake;animation-name:shake}@-webkit-keyframes headShake{0%{-webkit-transform:translateX(0);transform:translateX(0)}6.5%{-webkit-transform:translateX(-6px) rotateY(-9deg);transform:translateX(-6px) rotateY(-9deg)}18.5%{-webkit-transform:translateX(5px) rotateY(7deg);transform:translateX(5px) rotateY(7deg)}31.5%{-webkit-transform:translateX(-3px) rotateY(-5deg);transform:translateX(-3px) rotateY(-5deg)}43.5%{-webkit-transform:translateX(2px) rotateY(3deg);transform:translateX(2px) rotateY(3deg)}50%{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes headShake{0%{-webkit-transform:translateX(0);transform:translateX(0)}6.5%{-webkit-transform:translateX(-6px) rotateY(-9deg);transform:translateX(-6px) rotateY(-9deg)}18.5%{-webkit-transform:translateX(5px) rotateY(7deg);transform:translateX(5px) rotateY(7deg)}31.5%{-webkit-transform:translateX(-3px) rotateY(-5deg);transform:translateX(-3px) rotateY(-5deg)}43.5%{-webkit-transform:translateX(2px) rotateY(3deg);transform:translateX(2px) rotateY(3deg)}50%{-webkit-transform:translateX(0);transform:translateX(0)}}.headShake{-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;-webkit-animation-name:headShake;animation-name:headShake}@-webkit-keyframes swing{20%{-webkit-transform:rotate3d(0,0,1,15deg);transform:rotate3d(0,0,1,15deg)}40%{-webkit-transform:rotate3d(0,0,1,-10deg);transform:rotate3d(0,0,1,-10deg)}60%{-webkit-transform:rotate3d(0,0,1,5deg);transform:rotate3d(0,0,1,5deg)}80%{-webkit-transform:rotate3d(0,0,1,-5deg);transform:rotate3d(0,0,1,-5deg)}to{-webkit-transform:rotate3d(0,0,1,0deg);transform:rotate3d(0,0,1,0deg)}}@keyframes swing{20%{-webkit-transform:rotate3d(0,0,1,15deg);transform:rotate3d(0,0,1,15deg)}40%{-webkit-transform:rotate3d(0,0,1,-10deg);transform:rotate3d(0,0,1,-10deg)}60%{-webkit-transform:rotate3d(0,0,1,5deg);transform:rotate3d(0,0,1,5deg)}80%{-webkit-transform:rotate3d(0,0,1,-5deg);transform:rotate3d(0,0,1,-5deg)}to{-webkit-transform:rotate3d(0,0,1,0deg);transform:rotate3d(0,0,1,0deg)}}.swing{-webkit-transform-origin:top center;transform-origin:top center;-webkit-animation-name:swing;animation-name:swing}@-webkit-keyframes tada{from,to{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}10%,20%{-webkit-transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg);transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg)}30%,50%,70%,90%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg);transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg)}40%,60%,80%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg);transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg)}}@keyframes tada{from,to{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}10%,20%{-webkit-transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg);transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg)}30%,50%,70%,90%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg);transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg)}40%,60%,80%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg);transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg)}}.tada{-webkit-animation-name:tada;animation-name:tada}@-webkit-keyframes wobble{from,to{-webkit-transform:none;transform:none}15%{-webkit-transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg);transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg)}30%{-webkit-transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg);transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg)}45%{-webkit-transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg);transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg)}60%{-webkit-transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg);transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg)}75%{-webkit-transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg);transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg)}}@keyframes wobble{from,to{-webkit-transform:none;transform:none}15%{-webkit-transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg);transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg)}30%{-webkit-transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg);transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg)}45%{-webkit-transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg);transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg)}60%{-webkit-transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg);transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg)}75%{-webkit-transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg);transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg)}}.wobble{-webkit-animation-name:wobble;animation-name:wobble}@-webkit-keyframes jello{11.1%,from,to{-webkit-transform:none;transform:none}22.2%{-webkit-transform:skewX(-12.5deg) skewY(-12.5deg);transform:skewX(-12.5deg) skewY(-12.5deg)}33.3%{-webkit-transform:skewX(6.25deg) skewY(6.25deg);transform:skewX(6.25deg) skewY(6.25deg)}44.4%{-webkit-transform:skewX(-3.125deg) skewY(-3.125deg);transform:skewX(-3.125deg) skewY(-3.125deg)}55.5%{-webkit-transform:skewX(1.5625deg) skewY(1.5625deg);transform:skewX(1.5625deg) skewY(1.5625deg)}66.6%{-webkit-transform:skewX(-.78125deg) skewY(-.78125deg);transform:skewX(-.78125deg) skewY(-.78125deg)}77.7%{-webkit-transform:skewX(.390625deg) skewY(.390625deg);transform:skewX(.390625deg) skewY(.390625deg)}88.8%{-webkit-transform:skewX(-.1953125deg) skewY(-.1953125deg);transform:skewX(-.1953125deg) skewY(-.1953125deg)}}@keyframes jello{11.1%,from,to{-webkit-transform:none;transform:none}22.2%{-webkit-transform:skewX(-12.5deg) skewY(-12.5deg);transform:skewX(-12.5deg) skewY(-12.5deg)}33.3%{-webkit-transform:skewX(6.25deg) skewY(6.25deg);transform:skewX(6.25deg) skewY(6.25deg)}44.4%{-webkit-transform:skewX(-3.125deg) skewY(-3.125deg);transform:skewX(-3.125deg) skewY(-3.125deg)}55.5%{-webkit-transform:skewX(1.5625deg) skewY(1.5625deg);transform:skewX(1.5625deg) skewY(1.5625deg)}66.6%{-webkit-transform:skewX(-.78125deg) skewY(-.78125deg);transform:skewX(-.78125deg) skewY(-.78125deg)}77.7%{-webkit-transform:skewX(.390625deg) skewY(.390625deg);transform:skewX(.390625deg) skewY(.390625deg)}88.8%{-webkit-transform:skewX(-.1953125deg) skewY(-.1953125deg);transform:skewX(-.1953125deg) skewY(-.1953125deg)}}.jello{-webkit-animation-name:jello;animation-name:jello;-webkit-transform-origin:center;transform-origin:center}@-webkit-keyframes bounceIn{20%,40%,60%,80%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}to{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@keyframes bounceIn{20%,40%,60%,80%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}to{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}.bounceIn{-webkit-animation-name:bounceIn;animation-name:bounceIn}@-webkit-keyframes bounceInDown{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,-3000px,0);transform:translate3d(0,-3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,25px,0);transform:translate3d(0,25px,0)}75%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}90%{-webkit-transform:translate3d(0,5px,0);transform:translate3d(0,5px,0)}to{-webkit-transform:none;transform:none}}@keyframes bounceInDown{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,-3000px,0);transform:translate3d(0,-3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,25px,0);transform:translate3d(0,25px,0)}75%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}90%{-webkit-transform:translate3d(0,5px,0);transform:translate3d(0,5px,0)}to{-webkit-transform:none;transform:none}}.bounceInDown{-webkit-animation-name:bounceInDown;animation-name:bounceInDown}@-webkit-keyframes bounceInLeft{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(-3000px,0,0);transform:translate3d(-3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(25px,0,0);transform:translate3d(25px,0,0)}75%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}90%{-webkit-transform:translate3d(5px,0,0);transform:translate3d(5px,0,0)}to{-webkit-transform:none;transform:none}}@keyframes bounceInLeft{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(-3000px,0,0);transform:translate3d(-3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(25px,0,0);transform:translate3d(25px,0,0)}75%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}90%{-webkit-transform:translate3d(5px,0,0);transform:translate3d(5px,0,0)}to{-webkit-transform:none;transform:none}}.bounceInLeft{-webkit-animation-name:bounceInLeft;animation-name:bounceInLeft}@-webkit-keyframes bounceInRight{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}from{opacity:0;-webkit-transform:translate3d(3000px,0,0);transform:translate3d(3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(-25px,0,0);transform:translate3d(-25px,0,0)}75%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}90%{-webkit-transform:translate3d(-5px,0,0);transform:translate3d(-5px,0,0)}to{-webkit-transform:none;transform:none}}@keyframes bounceInRight{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}from{opacity:0;-webkit-transform:translate3d(3000px,0,0);transform:translate3d(3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(-25px,0,0);transform:translate3d(-25px,0,0)}75%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}90%{-webkit-transform:translate3d(-5px,0,0);transform:translate3d(-5px,0,0)}to{-webkit-transform:none;transform:none}}.bounceInRight{-webkit-animation-name:bounceInRight;animation-name:bounceInRight}@-webkit-keyframes bounceInUp{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}from{opacity:0;-webkit-transform:translate3d(0,3000px,0);transform:translate3d(0,3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}75%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}90%{-webkit-transform:translate3d(0,-5px,0);transform:translate3d(0,-5px,0)}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes bounceInUp{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}from{opacity:0;-webkit-transform:translate3d(0,3000px,0);transform:translate3d(0,3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}75%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}90%{-webkit-transform:translate3d(0,-5px,0);transform:translate3d(0,-5px,0)}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.bounceInUp{-webkit-animation-name:bounceInUp;animation-name:bounceInUp}@-webkit-keyframes bounceOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}to{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}@keyframes bounceOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}to{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}.bounceOut{-webkit-animation-name:bounceOut;animation-name:bounceOut}@-webkit-keyframes bounceOutDown{20%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}@keyframes bounceOutDown{20%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}.bounceOutDown{-webkit-animation-name:bounceOutDown;animation-name:bounceOutDown}@-webkit-keyframes bounceOutLeft{20%{opacity:1;-webkit-transform:translate3d(20px,0,0);transform:translate3d(20px,0,0)}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}@keyframes bounceOutLeft{20%{opacity:1;-webkit-transform:translate3d(20px,0,0);transform:translate3d(20px,0,0)}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}.bounceOutLeft{-webkit-animation-name:bounceOutLeft;animation-name:bounceOutLeft}@-webkit-keyframes bounceOutRight{20%{opacity:1;-webkit-transform:translate3d(-20px,0,0);transform:translate3d(-20px,0,0)}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}@keyframes bounceOutRight{20%{opacity:1;-webkit-transform:translate3d(-20px,0,0);transform:translate3d(-20px,0,0)}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}.bounceOutRight{-webkit-animation-name:bounceOutRight;animation-name:bounceOutRight}@-webkit-keyframes bounceOutUp{20%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,20px,0);transform:translate3d(0,20px,0)}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}@keyframes bounceOutUp{20%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,20px,0);transform:translate3d(0,20px,0)}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}.bounceOutUp{-webkit-animation-name:bounceOutUp;animation-name:bounceOutUp}@-webkit-keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}.fadeIn{-webkit-animation-name:fadeIn;animation-name:fadeIn}@-webkit-keyframes fadeInDown{from{opacity:0;-webkit-transform:translate3d(0,-75px,0);transform:translate3d(0,-75px,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInDown{from{opacity:0;-webkit-transform:translate3d(0,-75px,0);transform:translate3d(0,-75px,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInDown{-webkit-animation-name:fadeInDown;animation-name:fadeInDown}@-webkit-keyframes fadeInDownBig{from{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInDownBig{from{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInDownBig{-webkit-animation-name:fadeInDownBig;animation-name:fadeInDownBig}@-webkit-keyframes fadeInLeft{from{opacity:0;-webkit-transform:translate3d(-75px,0,0);transform:translate3d(-75px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInLeft{from{opacity:0;-webkit-transform:translate3d(-75px,0,0);transform:translate3d(-75px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInLeft{-webkit-animation-name:fadeInLeft;animation-name:fadeInLeft}@-webkit-keyframes fadeInLeftBig{from{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInLeftBig{from{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInLeftBig{-webkit-animation-name:fadeInLeftBig;animation-name:fadeInLeftBig}@-webkit-keyframes fadeInRight{from{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInRight{from{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInRight{-webkit-animation-name:fadeInRight;animation-name:fadeInRight}@-webkit-keyframes fadeInRightBig{from{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInRightBig{from{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInRightBig{-webkit-animation-name:fadeInRightBig;animation-name:fadeInRightBig}@-webkit-keyframes fadeInUp{from{opacity:0;-webkit-transform:translate3d(0,75px,0);transform:translate3d(0,75px,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInUp{from{opacity:0;-webkit-transform:translate3d(0,75px,0);transform:translate3d(0,75px,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInUp{-webkit-animation-name:fadeInUp;animation-name:fadeInUp}@-webkit-keyframes fadeInUpBig{from{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInUpBig{from{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInUpBig{-webkit-animation-name:fadeInUpBig;animation-name:fadeInUpBig}@-webkit-keyframes fadeOut{from{opacity:1}to{opacity:0}}@keyframes fadeOut{from{opacity:1}to{opacity:0}}.fadeOut{-webkit-animation-name:fadeOut;animation-name:fadeOut}@-webkit-keyframes fadeOutDown{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes fadeOutDown{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}.fadeOutDown{-webkit-animation-name:fadeOutDown;animation-name:fadeOutDown}@-webkit-keyframes fadeOutDownBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}@keyframes fadeOutDownBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}.fadeOutDownBig{-webkit-animation-name:fadeOutDownBig;animation-name:fadeOutDownBig}@-webkit-keyframes fadeOutLeft{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@keyframes fadeOutLeft{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}.fadeOutLeft{-webkit-animation-name:fadeOutLeft;animation-name:fadeOutLeft}@-webkit-keyframes fadeOutLeftBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}@keyframes fadeOutLeftBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}.fadeOutLeftBig{-webkit-animation-name:fadeOutLeftBig;animation-name:fadeOutLeftBig}@-webkit-keyframes fadeOutRight{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@keyframes fadeOutRight{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}.fadeOutRight{-webkit-animation-name:fadeOutRight;animation-name:fadeOutRight}@-webkit-keyframes fadeOutRightBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}@keyframes fadeOutRightBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}.fadeOutRightBig{-webkit-animation-name:fadeOutRightBig;animation-name:fadeOutRightBig}@-webkit-keyframes fadeOutUp{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@keyframes fadeOutUp{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}.fadeOutUp{-webkit-animation-name:fadeOutUp;animation-name:fadeOutUp}@-webkit-keyframes fadeOutUpBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}@keyframes fadeOutUpBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}.fadeOutUpBig{-webkit-animation-name:fadeOutUpBig;animation-name:fadeOutUpBig}@-webkit-keyframes flip{from{-webkit-transform:perspective(400px) rotate3d(0,1,0,-360deg);transform:perspective(400px) rotate3d(0,1,0,-360deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}40%{-webkit-transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-190deg);transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-190deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}50%{-webkit-transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-170deg);transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-170deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}80%{-webkit-transform:perspective(400px) scale3d(.95,.95,.95);transform:perspective(400px) scale3d(.95,.95,.95);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}to{-webkit-transform:perspective(400px);transform:perspective(400px);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}}@keyframes flip{from{-webkit-transform:perspective(400px) rotate3d(0,1,0,-360deg);transform:perspective(400px) rotate3d(0,1,0,-360deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}40%{-webkit-transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-190deg);transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-190deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}50%{-webkit-transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-170deg);transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-170deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}80%{-webkit-transform:perspective(400px) scale3d(.95,.95,.95);transform:perspective(400px) scale3d(.95,.95,.95);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}to{-webkit-transform:perspective(400px);transform:perspective(400px);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}}.animated.flip{-webkit-backface-visibility:visible;backface-visibility:visible;-webkit-animation-name:flip;animation-name:flip}@-webkit-keyframes flipInX{from{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(1,0,0,10deg);transform:perspective(400px) rotate3d(1,0,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-5deg);transform:perspective(400px) rotate3d(1,0,0,-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes flipInX{from{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(1,0,0,10deg);transform:perspective(400px) rotate3d(1,0,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-5deg);transform:perspective(400px) rotate3d(1,0,0,-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}.flipInX{-webkit-backface-visibility:visible!important;backface-visibility:visible!important;-webkit-animation-name:flipInX;animation-name:flipInX}.flipInY,.flipOutX{-webkit-backface-visibility:visible!important}@-webkit-keyframes flipInY{from{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-20deg);transform:perspective(400px) rotate3d(0,1,0,-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(0,1,0,10deg);transform:perspective(400px) rotate3d(0,1,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-5deg);transform:perspective(400px) rotate3d(0,1,0,-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes flipInY{from{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-20deg);transform:perspective(400px) rotate3d(0,1,0,-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(0,1,0,10deg);transform:perspective(400px) rotate3d(0,1,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-5deg);transform:perspective(400px) rotate3d(0,1,0,-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}.flipInY{backface-visibility:visible!important;-webkit-animation-name:flipInY;animation-name:flipInY}@-webkit-keyframes flipOutX{from{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);opacity:1}to{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);opacity:0}}@keyframes flipOutX{from{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);opacity:1}to{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);opacity:0}}.flipOutX{-webkit-animation-name:flipOutX;animation-name:flipOutX;backface-visibility:visible!important}@-webkit-keyframes flipOutY{from{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-15deg);transform:perspective(400px) rotate3d(0,1,0,-15deg);opacity:1}to{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);opacity:0}}@keyframes flipOutY{from{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-15deg);transform:perspective(400px) rotate3d(0,1,0,-15deg);opacity:1}to{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);opacity:0}}.flipOutY{-webkit-backface-visibility:visible!important;backface-visibility:visible!important;-webkit-animation-name:flipOutY;animation-name:flipOutY}@-webkit-keyframes lightSpeedIn{from{-webkit-transform:translate3d(100%,0,0) skewX(-30deg);transform:translate3d(100%,0,0) skewX(-30deg);opacity:0}60%{-webkit-transform:skewX(20deg);transform:skewX(20deg);opacity:1}80%{-webkit-transform:skewX(-5deg);transform:skewX(-5deg);opacity:1}to{-webkit-transform:none;transform:none;opacity:1}}@keyframes lightSpeedIn{from{-webkit-transform:translate3d(100%,0,0) skewX(-30deg);transform:translate3d(100%,0,0) skewX(-30deg);opacity:0}60%{-webkit-transform:skewX(20deg);transform:skewX(20deg);opacity:1}80%{-webkit-transform:skewX(-5deg);transform:skewX(-5deg);opacity:1}to{-webkit-transform:none;transform:none;opacity:1}}.lightSpeedIn{-webkit-animation-name:lightSpeedIn;animation-name:lightSpeedIn;-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}@-webkit-keyframes lightSpeedOut{from{opacity:1}to{-webkit-transform:translate3d(100%,0,0) skewX(30deg);transform:translate3d(100%,0,0) skewX(30deg);opacity:0}}@keyframes lightSpeedOut{from{opacity:1}to{-webkit-transform:translate3d(100%,0,0) skewX(30deg);transform:translate3d(100%,0,0) skewX(30deg);opacity:0}}.lightSpeedOut{-webkit-animation-name:lightSpeedOut;animation-name:lightSpeedOut;-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}@-webkit-keyframes rotateIn{from{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:rotate3d(0,0,1,-200deg);transform:rotate3d(0,0,1,-200deg);opacity:0}to{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateIn{from{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:rotate3d(0,0,1,-200deg);transform:rotate3d(0,0,1,-200deg);opacity:0}to{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:none;transform:none;opacity:1}}.rotateIn{-webkit-animation-name:rotateIn;animation-name:rotateIn}@-webkit-keyframes rotateInDownLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateInDownLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:none;transform:none;opacity:1}}.rotateInDownLeft{-webkit-animation-name:rotateInDownLeft;animation-name:rotateInDownLeft}@-webkit-keyframes rotateInDownRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateInDownRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:none;transform:none;opacity:1}}.rotateInDownRight{-webkit-animation-name:rotateInDownRight;animation-name:rotateInDownRight}@-webkit-keyframes rotateInUpLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateInUpLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:none;transform:none;opacity:1}}.rotateInUpLeft{-webkit-animation-name:rotateInUpLeft;animation-name:rotateInUpLeft}@-webkit-keyframes rotateInUpRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,-90deg);transform:rotate3d(0,0,1,-90deg);opacity:0}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateInUpRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,-90deg);transform:rotate3d(0,0,1,-90deg);opacity:0}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:none;transform:none;opacity:1}}.rotateInUpRight{-webkit-animation-name:rotateInUpRight;animation-name:rotateInUpRight}@-webkit-keyframes rotateOut{from{-webkit-transform-origin:center;transform-origin:center;opacity:1}to{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:rotate3d(0,0,1,200deg);transform:rotate3d(0,0,1,200deg);opacity:0}}@keyframes rotateOut{from{-webkit-transform-origin:center;transform-origin:center;opacity:1}to{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:rotate3d(0,0,1,200deg);transform:rotate3d(0,0,1,200deg);opacity:0}}.rotateOut{-webkit-animation-name:rotateOut;animation-name:rotateOut}@-webkit-keyframes rotateOutDownLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;opacity:1}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}}@keyframes rotateOutDownLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;opacity:1}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}}.rotateOutDownLeft{-webkit-animation-name:rotateOutDownLeft;animation-name:rotateOutDownLeft}@-webkit-keyframes rotateOutDownRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;opacity:1}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}@keyframes rotateOutDownRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;opacity:1}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}.rotateOutDownRight{-webkit-animation-name:rotateOutDownRight;animation-name:rotateOutDownRight}@-webkit-keyframes rotateOutUpLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;opacity:1}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}@keyframes rotateOutUpLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;opacity:1}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}.rotateOutUpLeft{-webkit-animation-name:rotateOutUpLeft;animation-name:rotateOutUpLeft}@-webkit-keyframes rotateOutUpRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;opacity:1}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,90deg);transform:rotate3d(0,0,1,90deg);opacity:0}}@keyframes rotateOutUpRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;opacity:1}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,90deg);transform:rotate3d(0,0,1,90deg);opacity:0}}.rotateOutUpRight{-webkit-animation-name:rotateOutUpRight;animation-name:rotateOutUpRight}@-webkit-keyframes hinge{0%{-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}20%,60%{-webkit-transform:rotate3d(0,0,1,80deg);transform:rotate3d(0,0,1,80deg);-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}40%,80%{-webkit-transform:rotate3d(0,0,1,60deg);transform:rotate3d(0,0,1,60deg);-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;opacity:1}to{-webkit-transform:translate3d(0,700px,0);transform:translate3d(0,700px,0);opacity:0}}@keyframes hinge{0%{-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}20%,60%{-webkit-transform:rotate3d(0,0,1,80deg);transform:rotate3d(0,0,1,80deg);-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}40%,80%{-webkit-transform:rotate3d(0,0,1,60deg);transform:rotate3d(0,0,1,60deg);-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;opacity:1}to{-webkit-transform:translate3d(0,700px,0);transform:translate3d(0,700px,0);opacity:0}}.hinge{-webkit-animation-name:hinge;animation-name:hinge}@-webkit-keyframes rollIn{from{opacity:0;-webkit-transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg);transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes rollIn{from{opacity:0;-webkit-transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg);transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg)}to{opacity:1;-webkit-transform:none;transform:none}}.rollIn{-webkit-animation-name:rollIn;animation-name:rollIn}@-webkit-keyframes rollOut{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg);transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg)}}@keyframes rollOut{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg);transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg)}}.rollOut{-webkit-animation-name:rollOut;animation-name:rollOut}@-webkit-keyframes zoomIn{from{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes zoomIn{from{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%{opacity:1}}.zoomIn{-webkit-animation-name:zoomIn;animation-name:zoomIn}@-webkit-keyframes zoomInDown{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInDown{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomInDown{-webkit-animation-name:zoomInDown;animation-name:zoomInDown}@-webkit-keyframes zoomInLeft{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(10px,0,0);transform:scale3d(.475,.475,.475) translate3d(10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInLeft{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(10px,0,0);transform:scale3d(.475,.475,.475) translate3d(10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomInLeft{-webkit-animation-name:zoomInLeft;animation-name:zoomInLeft}@-webkit-keyframes zoomInRight{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInRight{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomInRight{-webkit-animation-name:zoomInRight;animation-name:zoomInRight}@-webkit-keyframes zoomInUp{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInUp{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomInUp{-webkit-animation-name:zoomInUp;animation-name:zoomInUp}@-webkit-keyframes zoomOut{from{opacity:1}50%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}to{opacity:0}}@keyframes zoomOut{from{opacity:1}50%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}to{opacity:0}}.zoomOut{-webkit-animation-name:zoomOut;animation-name:zoomOut}@-webkit-keyframes zoomOutDown{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomOutDown{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomOutDown{-webkit-animation-name:zoomOutDown;animation-name:zoomOutDown}@-webkit-keyframes zoomOutLeft{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(42px,0,0);transform:scale3d(.475,.475,.475) translate3d(42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(-2000px,0,0);transform:scale(.1) translate3d(-2000px,0,0);-webkit-transform-origin:left center;transform-origin:left center}}@keyframes zoomOutLeft{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(42px,0,0);transform:scale3d(.475,.475,.475) translate3d(42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(-2000px,0,0);transform:scale(.1) translate3d(-2000px,0,0);-webkit-transform-origin:left center;transform-origin:left center}}.zoomOutLeft{-webkit-animation-name:zoomOutLeft;animation-name:zoomOutLeft}@-webkit-keyframes zoomOutRight{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-42px,0,0);transform:scale3d(.475,.475,.475) translate3d(-42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(2000px,0,0);transform:scale(.1) translate3d(2000px,0,0);-webkit-transform-origin:right center;transform-origin:right center}}@keyframes zoomOutRight{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-42px,0,0);transform:scale3d(.475,.475,.475) translate3d(-42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(2000px,0,0);transform:scale(.1) translate3d(2000px,0,0);-webkit-transform-origin:right center;transform-origin:right center}}.zoomOutRight{-webkit-animation-name:zoomOutRight;animation-name:zoomOutRight}@-webkit-keyframes zoomOutUp{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomOutUp{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomOutUp{-webkit-animation-name:zoomOutUp;animation-name:zoomOutUp}@-webkit-keyframes slideInDown{from{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes slideInDown{from{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.slideInDown{-webkit-animation-name:slideInDown;animation-name:slideInDown}@-webkit-keyframes slideInLeft{from{-webkit-transform:translate3d(-75px,0,0);transform:translate3d(-75px,0,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes slideInLeft{from{-webkit-transform:translate3d(-75px,0,0);transform:translate3d(-75px,0,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.slideInLeft{-webkit-animation-name:slideInLeft;animation-name:slideInLeft}@-webkit-keyframes slideInRight{from{-webkit-transform:translate3d(75px,0,0);transform:translate3d(75px,0,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes slideInRight{from{-webkit-transform:translate3d(75px,0,0);transform:translate3d(75px,0,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.slideInRight{-webkit-animation-name:slideInRight;animation-name:slideInRight}@-webkit-keyframes slideInUp{from{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes slideInUp{from{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.slideInUp{-webkit-animation-name:slideInUp;animation-name:slideInUp}@-webkit-keyframes slideOutDown{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes slideOutDown{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}.slideOutDown{-webkit-animation-name:slideOutDown;animation-name:slideOutDown}@-webkit-keyframes slideOutLeft{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@keyframes slideOutLeft{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}.slideOutLeft{-webkit-animation-name:slideOutLeft;animation-name:slideOutLeft}@-webkit-keyframes slideOutRight{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@keyframes slideOutRight{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}.slideOutRight{-webkit-animation-name:slideOutRight;animation-name:slideOutRight}@-webkit-keyframes slideOutUp{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@keyframes slideOutUp{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}.slideOutUp{-webkit-animation-name:slideOutUp;animation-name:slideOutUp} \ No newline at end of file diff --git a/assets/library/imagesloaded/imagesloaded.pkgd.js b/assets/library/imagesloaded/imagesloaded.pkgd.js new file mode 100644 index 0000000..f6ac95c --- /dev/null +++ b/assets/library/imagesloaded/imagesloaded.pkgd.js @@ -0,0 +1,496 @@ +/*! + * imagesLoaded PACKAGED v4.1.4 + * JavaScript is all like "You images are done yet or what?" + * MIT License + */ + +/** + * EvEmitter v1.1.0 + * Lil' event emitter + * MIT License + */ + +/* jshint unused: true, undef: true, strict: true */ + +( function( global, factory ) { + // universal module definition + /* jshint strict: false */ /* globals define, module, window */ + if ( typeof define == 'function' && define.amd ) { + // AMD - RequireJS + define( 'ev-emitter/ev-emitter',factory ); + } else if ( typeof module == 'object' && module.exports ) { + // CommonJS - Browserify, Webpack + module.exports = factory(); + } else { + // Browser globals + global.EvEmitter = factory(); + } + +}( typeof window != 'undefined' ? window : this, function() { + + + +function EvEmitter() {} + +var proto = EvEmitter.prototype; + +proto.on = function( eventName, listener ) { + if ( !eventName || !listener ) { + return; + } + // set events hash + var events = this._events = this._events || {}; + // set listeners array + var listeners = events[ eventName ] = events[ eventName ] || []; + // only add once + if ( listeners.indexOf( listener ) == -1 ) { + listeners.push( listener ); + } + + return this; +}; + +proto.once = function( eventName, listener ) { + if ( !eventName || !listener ) { + return; + } + // add event + this.on( eventName, listener ); + // set once flag + // set onceEvents hash + var onceEvents = this._onceEvents = this._onceEvents || {}; + // set onceListeners object + var onceListeners = onceEvents[ eventName ] = onceEvents[ eventName ] || {}; + // set flag + onceListeners[ listener ] = true; + + return this; +}; + +proto.off = function( eventName, listener ) { + var listeners = this._events && this._events[ eventName ]; + if ( !listeners || !listeners.length ) { + return; + } + var index = listeners.indexOf( listener ); + if ( index != -1 ) { + listeners.splice( index, 1 ); + } + + return this; +}; + +proto.emitEvent = function( eventName, args ) { + var listeners = this._events && this._events[ eventName ]; + if ( !listeners || !listeners.length ) { + return; + } + // copy over to avoid interference if .off() in listener + listeners = listeners.slice(0); + args = args || []; + // once stuff + var onceListeners = this._onceEvents && this._onceEvents[ eventName ]; + + for ( var i=0; i < listeners.length; i++ ) { + var listener = listeners[i] + var isOnce = onceListeners && onceListeners[ listener ]; + if ( isOnce ) { + // remove listener + // remove before trigger to prevent recursion + this.off( eventName, listener ); + // unset once flag + delete onceListeners[ listener ]; + } + // trigger listener + listener.apply( this, args ); + } + + return this; +}; + +proto.allOff = function() { + delete this._events; + delete this._onceEvents; +}; + +return EvEmitter; + +})); + +/*! + * imagesLoaded v4.1.4 + * JavaScript is all like "You images are done yet or what?" + * MIT License + */ + +( function( window, factory ) { 'use strict'; + // universal module definition + + /*global define: false, module: false, require: false */ + + if ( typeof define == 'function' && define.amd ) { + // AMD + define( [ + 'ev-emitter/ev-emitter' + ], function( EvEmitter ) { + return factory( window, EvEmitter ); + }); + } else if ( typeof module == 'object' && module.exports ) { + // CommonJS + module.exports = factory( + window, + require('ev-emitter') + ); + } else { + // browser global + window.imagesLoaded = factory( + window, + window.EvEmitter + ); + } + +})( typeof window !== 'undefined' ? window : this, + +// -------------------------- factory -------------------------- // + +function factory( window, EvEmitter ) { + + + +var $ = window.jQuery; +var console = window.console; + +// -------------------------- helpers -------------------------- // + +// extend objects +function extend( a, b ) { + for ( var prop in b ) { + a[ prop ] = b[ prop ]; + } + return a; +} + +var arraySlice = Array.prototype.slice; + +// turn element or nodeList into an array +function makeArray( obj ) { + if ( Array.isArray( obj ) ) { + // use object if already an array + return obj; + } + + var isArrayLike = typeof obj == 'object' && typeof obj.length == 'number'; + if ( isArrayLike ) { + // convert nodeList to array + return arraySlice.call( obj ); + } + + // array of single index + return [ obj ]; +} + +// -------------------------- imagesLoaded -------------------------- // + +/** + * @param {Array, Element, NodeList, String} elem + * @param {Object or Function} options - if function, use as callback + * @param {Function} onAlways - callback function + */ +function ImagesLoaded( elem, options, onAlways ) { + // coerce ImagesLoaded() without new, to be new ImagesLoaded() + if ( !( this instanceof ImagesLoaded ) ) { + return new ImagesLoaded( elem, options, onAlways ); + } + // use elem as selector string + var queryElem = elem; + if ( typeof elem == 'string' ) { + queryElem = document.querySelectorAll( elem ); + } + // bail if bad element + if ( !queryElem ) { + console.error( 'Bad element for imagesLoaded ' + ( queryElem || elem ) ); + return; + } + + this.elements = makeArray( queryElem ); + this.options = extend( {}, this.options ); + // shift arguments if no options set + if ( typeof options == 'function' ) { + onAlways = options; + } else { + extend( this.options, options ); + } + + if ( onAlways ) { + this.on( 'always', onAlways ); + } + + this.getImages(); + + if ( $ ) { + // add jQuery Deferred object + this.jqDeferred = new $.Deferred(); + } + + // HACK check async to allow time to bind listeners + setTimeout( this.check.bind( this ) ); +} + +ImagesLoaded.prototype = Object.create( EvEmitter.prototype ); + +ImagesLoaded.prototype.options = {}; + +ImagesLoaded.prototype.getImages = function() { + this.images = []; + + // filter & find items if we have an item selector + this.elements.forEach( this.addElementImages, this ); +}; + +/** + * @param {Node} element + */ +ImagesLoaded.prototype.addElementImages = function( elem ) { + // filter siblings + if ( elem.nodeName == 'IMG' ) { + this.addImage( elem ); + } + // get background image on element + if ( this.options.background === true ) { + this.addElementBackgroundImages( elem ); + } + + // find children + // no non-element nodes, #143 + var nodeType = elem.nodeType; + if ( !nodeType || !elementNodeTypes[ nodeType ] ) { + return; + } + var childImgs = elem.querySelectorAll('img'); + // concat childElems to filterFound array + for ( var i=0; i < childImgs.length; i++ ) { + var img = childImgs[i]; + this.addImage( img ); + } + + // get child background images + if ( typeof this.options.background == 'string' ) { + var children = elem.querySelectorAll( this.options.background ); + for ( i=0; i < children.length; i++ ) { + var child = children[i]; + this.addElementBackgroundImages( child ); + } + } +}; + +var elementNodeTypes = { + 1: true, + 9: true, + 11: true +}; + +ImagesLoaded.prototype.addElementBackgroundImages = function( elem ) { + var style = getComputedStyle( elem ); + if ( !style ) { + // Firefox returns null if in a hidden iframe https://bugzil.la/548397 + return; + } + // get url inside url("...") + var reURL = /url\((['"])?(.*?)\1\)/gi; + var matches = reURL.exec( style.backgroundImage ); + while ( matches !== null ) { + var url = matches && matches[2]; + if ( url ) { + this.addBackground( url, elem ); + } + matches = reURL.exec( style.backgroundImage ); + } +}; + +/** + * @param {Image} img + */ +ImagesLoaded.prototype.addImage = function( img ) { + var loadingImage = new LoadingImage( img ); + this.images.push( loadingImage ); +}; + +ImagesLoaded.prototype.addBackground = function( url, elem ) { + var background = new Background( url, elem ); + this.images.push( background ); +}; + +ImagesLoaded.prototype.check = function() { + var _this = this; + this.progressedCount = 0; + this.hasAnyBroken = false; + // complete if no images + if ( !this.images.length ) { + this.complete(); + return; + } + + function onProgress( image, elem, message ) { + // HACK - Chrome triggers event before object properties have changed. #83 + setTimeout( function() { + _this.progress( image, elem, message ); + }); + } + + this.images.forEach( function( loadingImage ) { + loadingImage.once( 'progress', onProgress ); + loadingImage.check(); + }); +}; + +ImagesLoaded.prototype.progress = function( image, elem, message ) { + this.progressedCount++; + this.hasAnyBroken = this.hasAnyBroken || !image.isLoaded; + // progress event + this.emitEvent( 'progress', [ this, image, elem ] ); + if ( this.jqDeferred && this.jqDeferred.notify ) { + this.jqDeferred.notify( this, image ); + } + // check if completed + if ( this.progressedCount == this.images.length ) { + this.complete(); + } + + if ( this.options.debug && console ) { + console.log( 'progress: ' + message, image, elem ); + } +}; + +ImagesLoaded.prototype.complete = function() { + var eventName = this.hasAnyBroken ? 'fail' : 'done'; + this.isComplete = true; + this.emitEvent( eventName, [ this ] ); + this.emitEvent( 'always', [ this ] ); + if ( this.jqDeferred ) { + var jqMethod = this.hasAnyBroken ? 'reject' : 'resolve'; + this.jqDeferred[ jqMethod ]( this ); + } +}; + +// -------------------------- -------------------------- // + +function LoadingImage( img ) { + this.img = img; +} + +LoadingImage.prototype = Object.create( EvEmitter.prototype ); + +LoadingImage.prototype.check = function() { + // If complete is true and browser supports natural sizes, + // try to check for image status manually. + var isComplete = this.getIsImageComplete(); + if ( isComplete ) { + // report based on naturalWidth + this.confirm( this.img.naturalWidth !== 0, 'naturalWidth' ); + return; + } + + // If none of the checks above matched, simulate loading on detached element. + this.proxyImage = new Image(); + this.proxyImage.addEventListener( 'load', this ); + this.proxyImage.addEventListener( 'error', this ); + // bind to image as well for Firefox. #191 + this.img.addEventListener( 'load', this ); + this.img.addEventListener( 'error', this ); + this.proxyImage.src = this.img.src; +}; + +LoadingImage.prototype.getIsImageComplete = function() { + // check for non-zero, non-undefined naturalWidth + // fixes Safari+InfiniteScroll+Masonry bug infinite-scroll#671 + return this.img.complete && this.img.naturalWidth; +}; + +LoadingImage.prototype.confirm = function( isLoaded, message ) { + this.isLoaded = isLoaded; + this.emitEvent( 'progress', [ this, this.img, message ] ); +}; + +// ----- events ----- // + +// trigger specified handler for event type +LoadingImage.prototype.handleEvent = function( event ) { + var method = 'on' + event.type; + if ( this[ method ] ) { + this[ method ]( event ); + } +}; + +LoadingImage.prototype.onload = function() { + this.confirm( true, 'onload' ); + this.unbindEvents(); +}; + +LoadingImage.prototype.onerror = function() { + this.confirm( false, 'onerror' ); + this.unbindEvents(); +}; + +LoadingImage.prototype.unbindEvents = function() { + this.proxyImage.removeEventListener( 'load', this ); + this.proxyImage.removeEventListener( 'error', this ); + this.img.removeEventListener( 'load', this ); + this.img.removeEventListener( 'error', this ); +}; + +// -------------------------- Background -------------------------- // + +function Background( url, element ) { + this.url = url; + this.element = element; + this.img = new Image(); +} + +// inherit LoadingImage prototype +Background.prototype = Object.create( LoadingImage.prototype ); + +Background.prototype.check = function() { + this.img.addEventListener( 'load', this ); + this.img.addEventListener( 'error', this ); + this.img.src = this.url; + // check if image is already complete + var isComplete = this.getIsImageComplete(); + if ( isComplete ) { + this.confirm( this.img.naturalWidth !== 0, 'naturalWidth' ); + this.unbindEvents(); + } +}; + +Background.prototype.unbindEvents = function() { + this.img.removeEventListener( 'load', this ); + this.img.removeEventListener( 'error', this ); +}; + +Background.prototype.confirm = function( isLoaded, message ) { + this.isLoaded = isLoaded; + this.emitEvent( 'progress', [ this, this.element, message ] ); +}; + +// -------------------------- jQuery -------------------------- // + +ImagesLoaded.makeJQueryPlugin = function( jQuery ) { + jQuery = jQuery || window.jQuery; + if ( !jQuery ) { + return; + } + // set local variable + $ = jQuery; + // $().imagesLoaded() + $.fn.imagesLoaded = function( options, callback ) { + var instance = new ImagesLoaded( this, options, callback ); + return instance.jqDeferred.promise( $(this) ); + }; +}; +// try making plugin +ImagesLoaded.makeJQueryPlugin(); + +// -------------------------- -------------------------- // + +return ImagesLoaded; + +}); diff --git a/assets/library/imagesloaded/imagesloaded.pkgd.min.js b/assets/library/imagesloaded/imagesloaded.pkgd.min.js new file mode 100644 index 0000000..e443a77 --- /dev/null +++ b/assets/library/imagesloaded/imagesloaded.pkgd.min.js @@ -0,0 +1,7 @@ +/*! + * imagesLoaded PACKAGED v4.1.4 + * JavaScript is all like "You images are done yet or what?" + * MIT License + */ + +!function(e,t){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",t):"object"==typeof module&&module.exports?module.exports=t():e.EvEmitter=t()}("undefined"!=typeof window?window:this,function(){function e(){}var t=e.prototype;return t.on=function(e,t){if(e&&t){var i=this._events=this._events||{},n=i[e]=i[e]||[];return n.indexOf(t)==-1&&n.push(t),this}},t.once=function(e,t){if(e&&t){this.on(e,t);var i=this._onceEvents=this._onceEvents||{},n=i[e]=i[e]||{};return n[t]=!0,this}},t.off=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){var n=i.indexOf(t);return n!=-1&&i.splice(n,1),this}},t.emitEvent=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){i=i.slice(0),t=t||[];for(var n=this._onceEvents&&this._onceEvents[e],o=0;o .lightSlider:after { + clear: both; +} +.lSSlideWrapper .lSSlide { + -webkit-transform: translate(0px, 0px); + -ms-transform: translate(0px, 0px); + transform: translate(0px, 0px); + -webkit-transition: all 1s; + -webkit-transition-property: -webkit-transform,height; + -moz-transition-property: -moz-transform,height; + transition-property: transform,height; + -webkit-transition-duration: inherit !important; + transition-duration: inherit !important; + -webkit-transition-timing-function: inherit !important; + transition-timing-function: inherit !important; +} +.lSSlideWrapper .lSFade { + position: relative; +} +.lSSlideWrapper .lSFade > * { + position: absolute !important; + top: 0; + left: 0; + z-index: 9; + margin-right: 0; + width: 100%; +} +.lSSlideWrapper.usingCss .lSFade > * { + opacity: 0; + -webkit-transition-delay: 0s; + transition-delay: 0s; + -webkit-transition-duration: inherit !important; + transition-duration: inherit !important; + -webkit-transition-property: opacity; + transition-property: opacity; + -webkit-transition-timing-function: inherit !important; + transition-timing-function: inherit !important; +} +.lSSlideWrapper .lSFade > *.active { + z-index: 10; +} +.lSSlideWrapper.usingCss .lSFade > *.active { + opacity: 1; +} +/** /!!! End of core css Should not edit !!!/**/ + +/* Pager */ +.lSSlideOuter .lSPager.lSpg { + margin: 10px 0 0; + padding: 0; + text-align: center; +} +.lSSlideOuter .lSPager.lSpg > li { + cursor: pointer; + display: inline-block; + padding: 0 5px; +} +.lSSlideOuter .lSPager.lSpg > li a { + background-color: #222222; + border-radius: 30px; + display: inline-block; + height: 8px; + overflow: hidden; + text-indent: -999em; + width: 8px; + position: relative; + z-index: 99; + -webkit-transition: all 0.5s linear 0s; + transition: all 0.5s linear 0s; +} +.lSSlideOuter .lSPager.lSpg > li:hover a, .lSSlideOuter .lSPager.lSpg > li.active a { + background-color: #428bca; +} +.lSSlideOuter .media { + opacity: 0.8; +} +.lSSlideOuter .media.active { + opacity: 1; +} +/* End of pager */ + +/** Gallery */ +.lSSlideOuter .lSPager.lSGallery { + list-style: none outside none; + padding-left: 0; + margin: 0; + overflow: hidden; + transform: translate3d(0px, 0px, 0px); + -moz-transform: translate3d(0px, 0px, 0px); + -ms-transform: translate3d(0px, 0px, 0px); + -webkit-transform: translate3d(0px, 0px, 0px); + -o-transform: translate3d(0px, 0px, 0px); + -webkit-transition-property: -webkit-transform; + -moz-transition-property: -moz-transform; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} +.lSSlideOuter .lSPager.lSGallery li { + overflow: hidden; + -webkit-transition: border-radius 0.12s linear 0s 0.35s linear 0s; + transition: border-radius 0.12s linear 0s 0.35s linear 0s; +} +.lSSlideOuter .lSPager.lSGallery li.active, .lSSlideOuter .lSPager.lSGallery li:hover { + border-radius: 5px; +} +.lSSlideOuter .lSPager.lSGallery img { + display: block; + height: auto; + max-width: 100%; +} +.lSSlideOuter .lSPager.lSGallery:before, .lSSlideOuter .lSPager.lSGallery:after { + content: " "; + display: table; +} +.lSSlideOuter .lSPager.lSGallery:after { + clear: both; +} +/* End of Gallery*/ + +/* slider actions */ +.lSAction > a { + width: 32px; + display: block; + top: 50%; + height: 32px; + cursor: pointer; + position: absolute; + background-image: url('../img/controls.png'); + z-index: 99; + margin-top: -16px; + opacity: 0.5; + -webkit-transition: opacity 0.35s linear 0s; + transition: opacity 0.35s linear 0s; +} +.lSAction > a:hover { + opacity: 1; +} +.lSAction > .lSPrev { + background-position: 0 0; + left: 10px; +} +.lSAction > .lSNext { + background-position: -32px 0; + right: 10px; +} +.lSAction > a.disabled { + pointer-events: none; +} +.cS-hidden { + height: 1px; + opacity: 0; + filter: alpha(opacity=0); + overflow: hidden; +} + + +/* vertical */ +.lSSlideOuter.vertical { + position: relative; +} +.lSSlideOuter.vertical.noPager { + padding-right: 0px !important; +} +.lSSlideOuter.vertical .lSGallery { + position: absolute !important; + right: 0; + top: 0; +} +.lSSlideOuter.vertical .lightSlider > * { + width: 100% !important; + max-width: none !important; +} + +/* vertical controlls */ +.lSSlideOuter.vertical .lSAction > a { + left: 50%; + margin-left: -14px; + margin-top: 0; +} +.lSSlideOuter.vertical .lSAction > .lSNext { + background-position: 31px -31px; + bottom: 10px; + top: auto; +} +.lSSlideOuter.vertical .lSAction > .lSPrev { + background-position: 0 -31px; + bottom: auto; + top: 10px; +} +/* vertical */ + + +/* Rtl */ +.lSSlideOuter.lSrtl { + direction: rtl; +} +.lSSlideOuter .lightSlider, .lSSlideOuter .lSPager { + padding-left: 0; + list-style: none outside none; +} +.lSSlideOuter.lSrtl .lightSlider, .lSSlideOuter.lSrtl .lSPager { + padding-right: 0; +} +.lSSlideOuter .lightSlider > *, .lSSlideOuter .lSGallery li { + float: left; +} +.lSSlideOuter.lSrtl .lightSlider > *, .lSSlideOuter.lSrtl .lSGallery li { + float: right !important; +} +/* Rtl */ + +@-webkit-keyframes rightEnd { + 0% { + left: 0; + } + + 50% { + left: -15px; + } + + 100% { + left: 0; + } +} +@keyframes rightEnd { + 0% { + left: 0; + } + + 50% { + left: -15px; + } + + 100% { + left: 0; + } +} +@-webkit-keyframes topEnd { + 0% { + top: 0; + } + + 50% { + top: -15px; + } + + 100% { + top: 0; + } +} +@keyframes topEnd { + 0% { + top: 0; + } + + 50% { + top: -15px; + } + + 100% { + top: 0; + } +} +@-webkit-keyframes leftEnd { + 0% { + left: 0; + } + + 50% { + left: 15px; + } + + 100% { + left: 0; + } +} +@keyframes leftEnd { + 0% { + left: 0; + } + + 50% { + left: 15px; + } + + 100% { + left: 0; + } +} +@-webkit-keyframes bottomEnd { + 0% { + bottom: 0; + } + + 50% { + bottom: -15px; + } + + 100% { + bottom: 0; + } +} +@keyframes bottomEnd { + 0% { + bottom: 0; + } + + 50% { + bottom: -15px; + } + + 100% { + bottom: 0; + } +} +.lSSlideOuter .rightEnd { + -webkit-animation: rightEnd 0.3s; + animation: rightEnd 0.3s; + position: relative; +} +.lSSlideOuter .leftEnd { + -webkit-animation: leftEnd 0.3s; + animation: leftEnd 0.3s; + position: relative; +} +.lSSlideOuter.vertical .rightEnd { + -webkit-animation: topEnd 0.3s; + animation: topEnd 0.3s; + position: relative; +} +.lSSlideOuter.vertical .leftEnd { + -webkit-animation: bottomEnd 0.3s; + animation: bottomEnd 0.3s; + position: relative; +} +.lSSlideOuter.lSrtl .rightEnd { + -webkit-animation: leftEnd 0.3s; + animation: leftEnd 0.3s; + position: relative; +} +.lSSlideOuter.lSrtl .leftEnd { + -webkit-animation: rightEnd 0.3s; + animation: rightEnd 0.3s; + position: relative; +} +/*/ GRab cursor */ +.lightSlider.lsGrab > * { + cursor: -webkit-grab; + cursor: -moz-grab; + cursor: -o-grab; + cursor: -ms-grab; + cursor: grab; +} +.lightSlider.lsGrabbing > * { + cursor: move; + cursor: -webkit-grabbing; + cursor: -moz-grabbing; + cursor: -o-grabbing; + cursor: -ms-grabbing; + cursor: grabbing; +} \ No newline at end of file diff --git a/assets/library/lightslider/css/lightslider.min.css b/assets/library/lightslider/css/lightslider.min.css new file mode 100644 index 0000000..e5fec29 --- /dev/null +++ b/assets/library/lightslider/css/lightslider.min.css @@ -0,0 +1,3 @@ +/*! lightslider - v1.1.3 - 2015-04-14 +* https://github.com/sachinchoolur/lightslider +* Copyright (c) 2015 Sachin N; Licensed MIT */.lSSlideWrapper,.lSSlideWrapper .lSFade{position:relative}.lSSlideWrapper .lSSlide,.lSSlideWrapper.usingCss .lSFade>*{-webkit-transition-timing-function:inherit!important;transition-timing-function:inherit!important;-webkit-transition-duration:inherit!important;transition-duration:inherit!important}.lSSlideOuter,.lSSlideOuter .lSPager.lSGallery{-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-touch-callout:none;-webkit-user-select:none}.lSSlideOuter .lSPager.lSGallery:after,.lSSlideWrapper>.lightSlider:after{clear:both}.lSSlideOuter{overflow:hidden;user-select:none}.lightSlider:after,.lightSlider:before{content:" ";display:table}.lightSlider{overflow:hidden;margin:0}.lSSlideWrapper{max-width:100%;overflow:hidden}.lSSlideWrapper .lSSlide{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);transform:translate(0,0);-webkit-transition:all 1s;-webkit-transition-property:-webkit-transform,height;-moz-transition-property:-moz-transform,height;transition-property:transform,height}.lSSlideWrapper .lSFade>*{position:absolute!important;top:0;left:0;z-index:9;margin-right:0;width:100%}.lSSlideWrapper.usingCss .lSFade>*{opacity:0;-webkit-transition-delay:0s;transition-delay:0s;-webkit-transition-property:opacity;transition-property:opacity}.lSSlideWrapper .lSFade>.active{z-index:10}.lSSlideWrapper.usingCss .lSFade>.active{opacity:1}.lSSlideOuter .lSPager.lSpg{margin:10px 0 0;padding:0;text-align:center}.lSSlideOuter .lSPager.lSpg>li{cursor:pointer;display:inline-block;padding:0 5px}.lSSlideOuter .lSPager.lSpg>li a{background-color:#222;border-radius:30px;display:inline-block;height:8px;overflow:hidden;text-indent:-999em;width:8px;position:relative;z-index:99;-webkit-transition:all .5s linear 0s;transition:all .5s linear 0s}.lSSlideOuter .lSPager.lSpg>li.active a,.lSSlideOuter .lSPager.lSpg>li:hover a{background-color:#428bca}.lSSlideOuter .media{opacity:.8}.lSSlideOuter .media.active{opacity:1}.lSSlideOuter .lSPager.lSGallery{list-style:none;padding-left:0;margin:0;overflow:hidden;transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0);-webkit-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);-webkit-transition-property:-webkit-transform;-moz-transition-property:-moz-transform;user-select:none}.lSSlideOuter .lSPager.lSGallery li{overflow:hidden;-webkit-transition:border-radius .12s linear 0s .35s linear 0s;transition:border-radius .12s linear 0s .35s linear 0s}.lSSlideOuter .lSPager.lSGallery li.active,.lSSlideOuter .lSPager.lSGallery li:hover{border-radius:5px}.lSSlideOuter .lSPager.lSGallery img{display:block;height:auto;max-width:100%}.lSSlideOuter .lSPager.lSGallery:after,.lSSlideOuter .lSPager.lSGallery:before{content:" ";display:table}.lSAction>a{width:32px;display:block;top:50%;height:32px;background-image:url(../img/controls.png);cursor:pointer;position:absolute;z-index:99;margin-top:-16px;opacity:.5;-webkit-transition:opacity .35s linear 0s;transition:opacity .35s linear 0s}.lSAction>a:hover{opacity:1}.lSAction>.lSPrev{background-position:0 0;left:10px}.lSAction>.lSNext{background-position:-32px 0;right:10px}.lSAction>a.disabled{pointer-events:none}.cS-hidden{height:1px;opacity:0;filter:alpha(opacity=0);overflow:hidden}.lSSlideOuter.vertical{position:relative}.lSSlideOuter.vertical.noPager{padding-right:0!important}.lSSlideOuter.vertical .lSGallery{position:absolute!important;right:0;top:0}.lSSlideOuter.vertical .lightSlider>*{width:100%!important;max-width:none!important}.lSSlideOuter.vertical .lSAction>a{left:50%;margin-left:-14px;margin-top:0}.lSSlideOuter.vertical .lSAction>.lSNext{background-position:31px -31px;bottom:10px;top:auto}.lSSlideOuter.vertical .lSAction>.lSPrev{background-position:0 -31px;bottom:auto;top:10px}.lSSlideOuter.lSrtl{direction:rtl}.lSSlideOuter .lSPager,.lSSlideOuter .lightSlider{padding-left:0;list-style:none}.lSSlideOuter.lSrtl .lSPager,.lSSlideOuter.lSrtl .lightSlider{padding-right:0}.lSSlideOuter .lSGallery li,.lSSlideOuter .lightSlider>*{float:left}.lSSlideOuter.lSrtl .lSGallery li,.lSSlideOuter.lSrtl .lightSlider>*{float:right!important}@-webkit-keyframes rightEnd{0%,100%{left:0}50%{left:-15px}}@keyframes rightEnd{0%,100%{left:0}50%{left:-15px}}@-webkit-keyframes topEnd{0%,100%{top:0}50%{top:-15px}}@keyframes topEnd{0%,100%{top:0}50%{top:-15px}}@-webkit-keyframes leftEnd{0%,100%{left:0}50%{left:15px}}@keyframes leftEnd{0%,100%{left:0}50%{left:15px}}@-webkit-keyframes bottomEnd{0%,100%{bottom:0}50%{bottom:-15px}}@keyframes bottomEnd{0%,100%{bottom:0}50%{bottom:-15px}}.lSSlideOuter .rightEnd{-webkit-animation:rightEnd .3s;animation:rightEnd .3s;position:relative}.lSSlideOuter .leftEnd{-webkit-animation:leftEnd .3s;animation:leftEnd .3s;position:relative}.lSSlideOuter.vertical .rightEnd{-webkit-animation:topEnd .3s;animation:topEnd .3s;position:relative}.lSSlideOuter.vertical .leftEnd{-webkit-animation:bottomEnd .3s;animation:bottomEnd .3s;position:relative}.lSSlideOuter.lSrtl .rightEnd{-webkit-animation:leftEnd .3s;animation:leftEnd .3s;position:relative}.lSSlideOuter.lSrtl .leftEnd{-webkit-animation:rightEnd .3s;animation:rightEnd .3s;position:relative}.lightSlider.lsGrab>*{cursor:-webkit-grab;cursor:-moz-grab;cursor:-o-grab;cursor:-ms-grab;cursor:grab}.lightSlider.lsGrabbing>*{cursor:move;cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:-o-grabbing;cursor:-ms-grabbing;cursor:grabbing} \ No newline at end of file diff --git a/assets/library/lightslider/img/controls.png b/assets/library/lightslider/img/controls.png new file mode 100644 index 0000000000000000000000000000000000000000..03dc4cf27848b4c4a4eb2e98829fa592d85eea27 GIT binary patch literal 2241 zcmaJ@X;c$w7Ok)fiXbSf9b;I8j%1T0BoMYFNPr-l&0U*-;i1bt<;l^JADgRrM|B-uvGB-u?0YB|L1S znW?=g003s}AZ8>y`suzUM)3cPFr^e8X6@O(9tm@ z4xS@nfXTw33@I3u5f;tQ*u|#`(7rw>ZzT;D5P@L7Buj=QC`J?+ zIZw<7*-SbbR=^5{0va{IlMqOx5Sjig0)fEt2=HJqnN${; zK%(GTOagg<%Y^u;B2X+};0pfaZdjD7vw}zhM`nUjVHzk1ltLoZ=aOl{#dEH3P;n7h1jEl}uflX*e|~u_0&|HwR)1rgXBoFQzuOgWd*eAJVQaUu zjdr(v>8;#7TXPUadx#Q)a{Y{4^IV17YpV(8@*GVM;MD5e6=!oHKKoxE4To}bZ7UE7 z2d6f_Qm_nB%Yw18VC-vqEUybOu~KQW9x%K$kQzSjJZdm)gvtxaUsoEix-@>D<%He? z<3NWvF0(4_=C)1>Q1@)d(rJY8%B*X4nA!)Y==FUyW`3AU$6CBEAj)rsS>?1NMhiY< zae??>TbFUQJ5tn|g!7SOMx)!K46YXzmM~V@SWR+HE^ExRJ(AR@$BpS|(tLFJz%pzp zESz)6KVm#iQ3bUdI1-0>g7T$ZNPO+Rvg#`KM!+RowI7mNV7173vr?0{^&M+|3x4iK zdu;fQUY@48b=ncw#!bFh#m&VccFy7*~sp9MevFhR9fsO~#il)pCj%TmyAk=-e`|L@p2Zbw;EuhJqzOA}H z<6rmW880;F#e#5*?Z1q_Ho%ed8}SI0^7!%P2!%@Yrwp(@81ZFelt+U zpSJ^FWfv{f5%tRG^~j^~$dn?#$`?Sx6G~ZCxyrjK z?6A{$EYZBQ$uO(M>TepCex+^E_Btyk>c+Y2C-NN$ziUhCy9RkBLP2pB1?;-_@Z^Ce zqr>)+YkiL9 z2iBZt`&Hg;`tCgFz0)w}5`+}}5Vber5qJ8w(9V2I!tuhk0ILf7^|xml1DdM6M_PMs1WoDdpkQ{tlTN(C{I*eIMB`3lAMF-!f6kN1 zfqJp89&7CI3(NWOTX#0zS<6@UWIp(2ZR6ByGAv*mGpOg@$!^$<_cHGY%WK%sG7|0i zYie!=hH)T9a6HOxrz)VjZu!#O6c@WAqgVeu^X|u_w^yb&xvV*2_WhHa4(8g)6?hJ^ y;q36>v3o|8PDZowoWI%;Q 1) { + this.each(function () { + $(this).lightSlider(options); + }); + return this; + } + + var plugin = {}, + settings = $.extend(true, {}, defaults, options), + settingsTemp = {}, + $el = this; + plugin.$el = this; + + if (settings.mode === 'fade') { + settings.vertical = false; + } + var $children = $el.children(), + windowW = $(window).width(), + breakpoint = null, + resposiveObj = null, + length = 0, + w = 0, + on = false, + elSize = 0, + $slide = '', + scene = 0, + property = (settings.vertical === true) ? 'height' : 'width', + gutter = (settings.vertical === true) ? 'margin-bottom' : 'margin-right', + slideValue = 0, + pagerWidth = 0, + slideWidth = 0, + thumbWidth = 0, + interval = null, + isTouch = ('ontouchstart' in document.documentElement); + var refresh = {}; + + refresh.chbreakpoint = function () { + windowW = $(window).width(); + if (settings.responsive.length) { + var item; + if (settings.autoWidth === false) { + item = settings.item; + } + if (windowW < settings.responsive[0].breakpoint) { + for (var i = 0; i < settings.responsive.length; i++) { + if (windowW < settings.responsive[i].breakpoint) { + breakpoint = settings.responsive[i].breakpoint; + resposiveObj = settings.responsive[i]; + } + } + } + if (typeof resposiveObj !== 'undefined' && resposiveObj !== null) { + for (var j in resposiveObj.settings) { + if (resposiveObj.settings.hasOwnProperty(j)) { + if (typeof settingsTemp[j] === 'undefined' || settingsTemp[j] === null) { + settingsTemp[j] = settings[j]; + } + settings[j] = resposiveObj.settings[j]; + } + } + } + if (!$.isEmptyObject(settingsTemp) && windowW > settings.responsive[0].breakpoint) { + for (var k in settingsTemp) { + if (settingsTemp.hasOwnProperty(k)) { + settings[k] = settingsTemp[k]; + } + } + } + if (settings.autoWidth === false) { + if (slideValue > 0 && slideWidth > 0) { + if (item !== settings.item) { + scene = Math.round(slideValue / ((slideWidth + settings.slideMargin) * settings.slideMove)); + } + } + } + } + }; + + refresh.calSW = function () { + if (settings.autoWidth === false) { + slideWidth = (elSize - ((settings.item * (settings.slideMargin)) - settings.slideMargin)) / settings.item; + } + }; + + refresh.calWidth = function (cln) { + var ln = cln === true ? $slide.find('.lslide').length : $children.length; + if (settings.autoWidth === false) { + w = ln * (slideWidth + settings.slideMargin); + } else { + w = 0; + for (var i = 0; i < ln; i++) { + w += (parseInt($children.eq(i).width()) + settings.slideMargin); + } + } + return w; + }; + plugin = { + doCss: function () { + var support = function () { + var transition = ['transition', 'MozTransition', 'WebkitTransition', 'OTransition', 'msTransition', 'KhtmlTransition']; + var root = document.documentElement; + for (var i = 0; i < transition.length; i++) { + if (transition[i] in root.style) { + return true; + } + } + }; + if (settings.useCSS && support()) { + return true; + } + return false; + }, + keyPress: function () { + if (settings.keyPress) { + $(document).on('keyup.lightslider', function (e) { + if (!$(':focus').is('input, textarea')) { + if (e.preventDefault) { + e.preventDefault(); + } else { + e.returnValue = false; + } + if (e.keyCode === 37) { + $el.goToPrevSlide(); + } else if (e.keyCode === 39) { + $el.goToNextSlide(); + } + } + }); + } + }, + controls: function () { + if (settings.controls) { + $el.after(''); + if (!settings.autoWidth) { + if (length <= settings.item) { + $slide.find('.lSAction').hide(); + } + } else { + if (refresh.calWidth(false) < elSize) { + $slide.find('.lSAction').hide(); + } + } + $slide.find('.lSAction a').on('click', function (e) { + if (e.preventDefault) { + e.preventDefault(); + } else { + e.returnValue = false; + } + if ($(this).attr('class') === 'lSPrev') { + $el.goToPrevSlide(); + } else { + $el.goToNextSlide(); + } + return false; + }); + } + }, + initialStyle: function () { + var $this = this; + if (settings.mode === 'fade') { + settings.autoWidth = false; + settings.slideEndAnimation = false; + } + if (settings.auto) { + settings.slideEndAnimation = false; + } + if (settings.autoWidth) { + settings.slideMove = 1; + settings.item = 1; + } + if (settings.loop) { + settings.slideMove = 1; + settings.freeMove = false; + } + settings.onBeforeStart.call(this, $el); + refresh.chbreakpoint(); + $el.addClass('lightSlider').wrap('
      '); + $slide = $el.parent('.lSSlideWrapper'); + if (settings.rtl === true) { + $slide.parent().addClass('lSrtl'); + } + if (settings.vertical) { + $slide.parent().addClass('vertical'); + elSize = settings.verticalHeight; + $slide.css('height', elSize + 'px'); + } else { + elSize = $el.outerWidth(); + } + $children.addClass('lslide'); + if (settings.loop === true && settings.mode === 'slide') { + refresh.calSW(); + refresh.clone = function () { + if (refresh.calWidth(true) > elSize) { + /**/ + var tWr = 0, + tI = 0; + for (var k = 0; k < $children.length; k++) { + tWr += (parseInt($el.find('.lslide').eq(k).width()) + settings.slideMargin); + tI++; + if (tWr >= (elSize + settings.slideMargin)) { + break; + } + } + var tItem = settings.autoWidth === true ? tI : settings.item; + + /**/ + if (tItem < $el.find('.clone.left').length) { + for (var i = 0; i < $el.find('.clone.left').length - tItem; i++) { + $children.eq(i).remove(); + } + } + if (tItem < $el.find('.clone.right').length) { + for (var j = $children.length - 1; j > ($children.length - 1 - $el.find('.clone.right').length); j--) { + scene--; + $children.eq(j).remove(); + } + } + /**/ + for (var n = $el.find('.clone.right').length; n < tItem; n++) { + $el.find('.lslide').eq(n).clone().removeClass('lslide').addClass('clone right').appendTo($el); + scene++; + } + for (var m = $el.find('.lslide').length - $el.find('.clone.left').length; m > ($el.find('.lslide').length - tItem); m--) { + $el.find('.lslide').eq(m - 1).clone().removeClass('lslide').addClass('clone left').prependTo($el); + } + $children = $el.children(); + } else { + if ($children.hasClass('clone')) { + $el.find('.clone').remove(); + $this.move($el, 0); + } + } + }; + refresh.clone(); + } + refresh.sSW = function () { + length = $children.length; + if (settings.rtl === true && settings.vertical === false) { + gutter = 'margin-left'; + } + if (settings.autoWidth === false) { + $children.css(property, slideWidth + 'px'); + } + $children.css(gutter, settings.slideMargin + 'px'); + w = refresh.calWidth(false); + $el.css(property, w + 'px'); + if (settings.loop === true && settings.mode === 'slide') { + if (on === false) { + scene = $el.find('.clone.left').length; + } + } + }; + refresh.calL = function () { + $children = $el.children(); + length = $children.length; + }; + if (this.doCss()) { + $slide.addClass('usingCss'); + } + refresh.calL(); + if (settings.mode === 'slide') { + refresh.calSW(); + refresh.sSW(); + if (settings.loop === true) { + slideValue = $this.slideValue(); + this.move($el, slideValue); + } + if (settings.vertical === false) { + this.setHeight($el, false); + } + + } else { + this.setHeight($el, true); + $el.addClass('lSFade'); + if (!this.doCss()) { + $children.fadeOut(0); + $children.eq(scene).fadeIn(0); + } + } + if (settings.loop === true && settings.mode === 'slide') { + $children.eq(scene).addClass('active'); + } else { + $children.first().addClass('active'); + } + }, + pager: function () { + var $this = this; + refresh.createPager = function () { + thumbWidth = (elSize - ((settings.thumbItem * (settings.thumbMargin)) - settings.thumbMargin)) / settings.thumbItem; + var $children = $slide.find('.lslide'); + var length = $slide.find('.lslide').length; + var i = 0, + pagers = '', + v = 0; + for (i = 0; i < length; i++) { + if (settings.mode === 'slide') { + // calculate scene * slide value + if (!settings.autoWidth) { + v = i * ((slideWidth + settings.slideMargin) * settings.slideMove); + } else { + v += ((parseInt($children.eq(i).width()) + settings.slideMargin) * settings.slideMove); + } + } + var thumb = $children.eq(i * settings.slideMove).attr('data-thumb'); + if (settings.gallery === true) { + pagers += '
    • '; + } else { + pagers += '
    • ' + (i + 1) + '
    • '; + } + if (settings.mode === 'slide') { + if ((v) >= w - elSize - settings.slideMargin) { + i = i + 1; + var minPgr = 2; + if (settings.autoWidth) { + pagers += '
    • ' + (i + 1) + '
    • '; + minPgr = 1; + } + if (i < minPgr) { + pagers = null; + $slide.parent().addClass('noPager'); + } else { + $slide.parent().removeClass('noPager'); + } + break; + } + } + } + var $cSouter = $slide.parent(); + $cSouter.find('.lSPager').html(pagers); + if (settings.gallery === true) { + if (settings.vertical === true) { + // set Gallery thumbnail width + $cSouter.find('.lSPager').css('width', settings.vThumbWidth + 'px'); + } + pagerWidth = (i * (settings.thumbMargin + thumbWidth)) + 0.5; + $cSouter.find('.lSPager').css({ + property: pagerWidth + 'px', + 'transition-duration': settings.speed + 'ms' + }); + if (settings.vertical === true) { + $slide.parent().css('padding-right', (settings.vThumbWidth + settings.galleryMargin) + 'px'); + } + $cSouter.find('.lSPager').css(property, pagerWidth + 'px'); + } + var $pager = $cSouter.find('.lSPager').find('li'); + $pager.first().addClass('active'); + $pager.on('click', function () { + if (settings.loop === true && settings.mode === 'slide') { + scene = scene + ($pager.index(this) - $cSouter.find('.lSPager').find('li.active').index()); + } else { + scene = $pager.index(this); + } + $el.mode(false); + if (settings.gallery === true) { + $this.slideThumb(); + } + return false; + }); + }; + if (settings.pager) { + var cl = 'lSpg'; + if (settings.gallery) { + cl = 'lSGallery'; + } + $slide.after('
        '); + var gMargin = (settings.vertical) ? 'margin-left' : 'margin-top'; + $slide.parent().find('.lSPager').css(gMargin, settings.galleryMargin + 'px'); + refresh.createPager(); + } + + setTimeout(function () { + refresh.init(); + }, 0); + }, + setHeight: function (ob, fade) { + var obj = null, + $this = this; + if (settings.loop) { + obj = ob.children('.lslide ').first(); + } else { + obj = ob.children().first(); + } + var setCss = function () { + var tH = obj.outerHeight(), + tP = 0, + tHT = tH; + if (fade) { + tH = 0; + tP = ((tHT) * 100) / elSize; + } + ob.css({ + 'height': tH + 'px', + 'padding-bottom': tP + '%' + }); + }; + setCss(); + if (obj.find('img').length) { + if ( obj.find('img')[0].complete) { + setCss(); + if (!interval) { + $this.auto(); + } + }else{ + obj.find('img').on('load', function () { + setTimeout(function () { + setCss(); + if (!interval) { + $this.auto(); + } + }, 100); + }); + } + }else{ + if (!interval) { + $this.auto(); + } + } + }, + active: function (ob, t) { + if (this.doCss() && settings.mode === 'fade') { + $slide.addClass('on'); + } + var sc = 0; + if (scene * settings.slideMove < length) { + ob.removeClass('active'); + if (!this.doCss() && settings.mode === 'fade' && t === false) { + ob.fadeOut(settings.speed); + } + if (t === true) { + sc = scene; + } else { + sc = scene * settings.slideMove; + } + //t === true ? sc = scene : sc = scene * settings.slideMove; + var l, nl; + if (t === true) { + l = ob.length; + nl = l - 1; + if (sc + 1 >= l) { + sc = nl; + } + } + if (settings.loop === true && settings.mode === 'slide') { + //t === true ? sc = scene - $el.find('.clone.left').length : sc = scene * settings.slideMove; + if (t === true) { + sc = scene - $el.find('.clone.left').length; + } else { + sc = scene * settings.slideMove; + } + if (t === true) { + l = ob.length; + nl = l - 1; + if (sc + 1 === l) { + sc = nl; + } else if (sc + 1 > l) { + sc = 0; + } + } + } + + if (!this.doCss() && settings.mode === 'fade' && t === false) { + ob.eq(sc).fadeIn(settings.speed); + } + ob.eq(sc).addClass('active'); + } else { + ob.removeClass('active'); + ob.eq(ob.length - 1).addClass('active'); + if (!this.doCss() && settings.mode === 'fade' && t === false) { + ob.fadeOut(settings.speed); + ob.eq(sc).fadeIn(settings.speed); + } + } + }, + move: function (ob, v) { + if (settings.rtl === true) { + v = -v; + } + if (this.doCss()) { + if (settings.vertical === true) { + ob.css({ + 'transform': 'translate3d(0px, ' + (-v) + 'px, 0px)', + '-webkit-transform': 'translate3d(0px, ' + (-v) + 'px, 0px)' + }); + } else { + ob.css({ + 'transform': 'translate3d(' + (-v) + 'px, 0px, 0px)', + '-webkit-transform': 'translate3d(' + (-v) + 'px, 0px, 0px)', + }); + } + } else { + if (settings.vertical === true) { + ob.css('position', 'relative').animate({ + top: -v + 'px' + }, settings.speed, settings.easing); + } else { + ob.css('position', 'relative').animate({ + left: -v + 'px' + }, settings.speed, settings.easing); + } + } + var $thumb = $slide.parent().find('.lSPager').find('li'); + this.active($thumb, true); + }, + fade: function () { + this.active($children, false); + var $thumb = $slide.parent().find('.lSPager').find('li'); + this.active($thumb, true); + }, + slide: function () { + var $this = this; + refresh.calSlide = function () { + if (w > elSize) { + slideValue = $this.slideValue(); + $this.active($children, false); + if ((slideValue) > w - elSize - settings.slideMargin) { + slideValue = w - elSize - settings.slideMargin; + } else if (slideValue < 0) { + slideValue = 0; + } + $this.move($el, slideValue); + if (settings.loop === true && settings.mode === 'slide') { + if (scene >= (length - ($el.find('.clone.left').length / settings.slideMove))) { + $this.resetSlide($el.find('.clone.left').length); + } + if (scene === 0) { + $this.resetSlide($slide.find('.lslide').length); + } + } + } + }; + refresh.calSlide(); + }, + resetSlide: function (s) { + var $this = this; + $slide.find('.lSAction a').addClass('disabled'); + setTimeout(function () { + scene = s; + $slide.css('transition-duration', '0ms'); + slideValue = $this.slideValue(); + $this.active($children, false); + plugin.move($el, slideValue); + setTimeout(function () { + $slide.css('transition-duration', settings.speed + 'ms'); + $slide.find('.lSAction a').removeClass('disabled'); + }, 50); + }, settings.speed + 100); + }, + slideValue: function () { + var _sV = 0; + if (settings.autoWidth === false) { + _sV = scene * ((slideWidth + settings.slideMargin) * settings.slideMove); + } else { + _sV = 0; + for (var i = 0; i < scene; i++) { + _sV += (parseInt($children.eq(i).width()) + settings.slideMargin); + } + } + return _sV; + }, + slideThumb: function () { + var position; + switch (settings.currentPagerPosition) { + case 'left': + position = 0; + break; + case 'middle': + position = (elSize / 2) - (thumbWidth / 2); + break; + case 'right': + position = elSize - thumbWidth; + } + var sc = scene - $el.find('.clone.left').length; + var $pager = $slide.parent().find('.lSPager'); + if (settings.mode === 'slide' && settings.loop === true) { + if (sc >= $pager.children().length) { + sc = 0; + } else if (sc < 0) { + sc = $pager.children().length; + } + } + var thumbSlide = sc * ((thumbWidth + settings.thumbMargin)) - (position); + if ((thumbSlide + elSize) > pagerWidth) { + thumbSlide = pagerWidth - elSize - settings.thumbMargin; + } + if (thumbSlide < 0) { + thumbSlide = 0; + } + this.move($pager, thumbSlide); + }, + auto: function () { + if (settings.auto) { + clearInterval(interval); + interval = setInterval(function () { + $el.goToNextSlide(); + }, settings.pause); + } + }, + pauseOnHover: function(){ + var $this = this; + if (settings.auto && settings.pauseOnHover) { + $slide.on('mouseenter', function(){ + $(this).addClass('ls-hover'); + $el.pause(); + settings.auto = true; + }); + $slide.on('mouseleave',function(){ + $(this).removeClass('ls-hover'); + if (!$slide.find('.lightSlider').hasClass('lsGrabbing')) { + $this.auto(); + } + }); + } + }, + touchMove: function (endCoords, startCoords) { + $slide.css('transition-duration', '0ms'); + if (settings.mode === 'slide') { + var distance = endCoords - startCoords; + var swipeVal = slideValue - distance; + if ((swipeVal) >= w - elSize - settings.slideMargin) { + if (settings.freeMove === false) { + swipeVal = w - elSize - settings.slideMargin; + } else { + var swipeValT = w - elSize - settings.slideMargin; + swipeVal = swipeValT + ((swipeVal - swipeValT) / 5); + + } + } else if (swipeVal < 0) { + if (settings.freeMove === false) { + swipeVal = 0; + } else { + swipeVal = swipeVal / 5; + } + } + this.move($el, swipeVal); + } + }, + + touchEnd: function (distance) { + $slide.css('transition-duration', settings.speed + 'ms'); + if (settings.mode === 'slide') { + var mxVal = false; + var _next = true; + slideValue = slideValue - distance; + if ((slideValue) > w - elSize - settings.slideMargin) { + slideValue = w - elSize - settings.slideMargin; + if (settings.autoWidth === false) { + mxVal = true; + } + } else if (slideValue < 0) { + slideValue = 0; + } + var gC = function (next) { + var ad = 0; + if (!mxVal) { + if (next) { + ad = 1; + } + } + if (!settings.autoWidth) { + var num = slideValue / ((slideWidth + settings.slideMargin) * settings.slideMove); + scene = parseInt(num) + ad; + if (slideValue >= (w - elSize - settings.slideMargin)) { + if (num % 1 !== 0) { + scene++; + } + } + } else { + var tW = 0; + for (var i = 0; i < $children.length; i++) { + tW += (parseInt($children.eq(i).width()) + settings.slideMargin); + scene = i + ad; + if (tW >= slideValue) { + break; + } + } + } + }; + if (distance >= settings.swipeThreshold) { + gC(false); + _next = false; + } else if (distance <= -settings.swipeThreshold) { + gC(true); + _next = false; + } + $el.mode(_next); + this.slideThumb(); + } else { + if (distance >= settings.swipeThreshold) { + $el.goToPrevSlide(); + } else if (distance <= -settings.swipeThreshold) { + $el.goToNextSlide(); + } + } + }, + + + + enableDrag: function () { + var $this = this; + if (!isTouch) { + var startCoords = 0, + endCoords = 0, + isDraging = false; + $slide.find('.lightSlider').addClass('lsGrab'); + $slide.on('mousedown', function (e) { + if (w < elSize) { + if (w !== 0) { + return false; + } + } + if ($(e.target).attr('class') !== ('lSPrev') && $(e.target).attr('class') !== ('lSNext')) { + startCoords = (settings.vertical === true) ? e.pageY : e.pageX; + isDraging = true; + if (e.preventDefault) { + e.preventDefault(); + } else { + e.returnValue = false; + } + // ** Fix for webkit cursor issue https://code.google.com/p/chromium/issues/detail?id=26723 + $slide.scrollLeft += 1; + $slide.scrollLeft -= 1; + // * + $slide.find('.lightSlider').removeClass('lsGrab').addClass('lsGrabbing'); + clearInterval(interval); + } + }); + $(window).on('mousemove', function (e) { + if (isDraging) { + endCoords = (settings.vertical === true) ? e.pageY : e.pageX; + $this.touchMove(endCoords, startCoords); + } + }); + $(window).on('mouseup', function (e) { + if (isDraging) { + $slide.find('.lightSlider').removeClass('lsGrabbing').addClass('lsGrab'); + isDraging = false; + endCoords = (settings.vertical === true) ? e.pageY : e.pageX; + var distance = endCoords - startCoords; + if (Math.abs(distance) >= settings.swipeThreshold) { + $(window).on('click.ls', function (e) { + if (e.preventDefault) { + e.preventDefault(); + } else { + e.returnValue = false; + } + e.stopImmediatePropagation(); + e.stopPropagation(); + $(window).off('click.ls'); + }); + } + + $this.touchEnd(distance); + + } + }); + } + }, + + + + + enableTouch: function () { + var $this = this; + if (isTouch) { + var startCoords = {}, + endCoords = {}; + $slide.on('touchstart', function (e) { + endCoords = e.originalEvent.targetTouches[0]; + startCoords.pageX = e.originalEvent.targetTouches[0].pageX; + startCoords.pageY = e.originalEvent.targetTouches[0].pageY; + clearInterval(interval); + }); + $slide.on('touchmove', function (e) { + if (w < elSize) { + if (w !== 0) { + return false; + } + } + var orig = e.originalEvent; + endCoords = orig.targetTouches[0]; + var xMovement = Math.abs(endCoords.pageX - startCoords.pageX); + var yMovement = Math.abs(endCoords.pageY - startCoords.pageY); + if (settings.vertical === true) { + if ((yMovement * 3) > xMovement) { + e.preventDefault(); + } + $this.touchMove(endCoords.pageY, startCoords.pageY); + } else { + if ((xMovement * 3) > yMovement) { + e.preventDefault(); + } + $this.touchMove(endCoords.pageX, startCoords.pageX); + } + + }); + $slide.on('touchend', function () { + if (w < elSize) { + if (w !== 0) { + return false; + } + } + var distance; + if (settings.vertical === true) { + distance = endCoords.pageY - startCoords.pageY; + } else { + distance = endCoords.pageX - startCoords.pageX; + } + $this.touchEnd(distance); + }); + } + }, + build: function () { + var $this = this; + $this.initialStyle(); + if (this.doCss()) { + + if (settings.enableTouch === true) { + $this.enableTouch(); + } + if (settings.enableDrag === true) { + $this.enableDrag(); + } + } + + $(window).on('focus', function(){ + $this.auto(); + }); + + $(window).on('blur', function(){ + clearInterval(interval); + }); + + $this.pager(); + $this.pauseOnHover(); + $this.controls(); + $this.keyPress(); + } + }; + plugin.build(); + refresh.init = function () { + refresh.chbreakpoint(); + if (settings.vertical === true) { + if (settings.item > 1) { + elSize = settings.verticalHeight; + } else { + elSize = $children.outerHeight(); + } + $slide.css('height', elSize + 'px'); + } else { + elSize = $slide.outerWidth(); + } + if (settings.loop === true && settings.mode === 'slide') { + refresh.clone(); + } + refresh.calL(); + if (settings.mode === 'slide') { + $el.removeClass('lSSlide'); + } + if (settings.mode === 'slide') { + refresh.calSW(); + refresh.sSW(); + } + setTimeout(function () { + if (settings.mode === 'slide') { + $el.addClass('lSSlide'); + } + }, 1000); + if (settings.pager) { + refresh.createPager(); + } + if (settings.adaptiveHeight === true && settings.vertical === false) { + $el.css('height', $children.eq(scene).outerHeight(true)); + } + if (settings.adaptiveHeight === false) { + if (settings.mode === 'slide') { + if (settings.vertical === false) { + plugin.setHeight($el, false); + }else{ + plugin.auto(); + } + } else { + plugin.setHeight($el, true); + } + } + if (settings.gallery === true) { + plugin.slideThumb(); + } + if (settings.mode === 'slide') { + plugin.slide(); + } + if (settings.autoWidth === false) { + if ($children.length <= settings.item) { + $slide.find('.lSAction').hide(); + } else { + $slide.find('.lSAction').show(); + } + } else { + if ((refresh.calWidth(false) < elSize) && (w !== 0)) { + $slide.find('.lSAction').hide(); + } else { + $slide.find('.lSAction').show(); + } + } + }; + $el.goToPrevSlide = function () { + if (scene > 0) { + settings.onBeforePrevSlide.call(this, $el, scene); + scene--; + $el.mode(false); + if (settings.gallery === true) { + plugin.slideThumb(); + } + } else { + if (settings.loop === true) { + settings.onBeforePrevSlide.call(this, $el, scene); + if (settings.mode === 'fade') { + var l = (length - 1); + scene = parseInt(l / settings.slideMove); + } + $el.mode(false); + if (settings.gallery === true) { + plugin.slideThumb(); + } + } else if (settings.slideEndAnimation === true) { + $el.addClass('leftEnd'); + setTimeout(function () { + $el.removeClass('leftEnd'); + }, 400); + } + } + }; + $el.goToNextSlide = function () { + var nextI = true; + if (settings.mode === 'slide') { + var _slideValue = plugin.slideValue(); + nextI = _slideValue < w - elSize - settings.slideMargin; + } + if (((scene * settings.slideMove) < length - settings.slideMove) && nextI) { + settings.onBeforeNextSlide.call(this, $el, scene); + scene++; + $el.mode(false); + if (settings.gallery === true) { + plugin.slideThumb(); + } + } else { + if (settings.loop === true) { + settings.onBeforeNextSlide.call(this, $el, scene); + scene = 0; + $el.mode(false); + if (settings.gallery === true) { + plugin.slideThumb(); + } + } else if (settings.slideEndAnimation === true) { + $el.addClass('rightEnd'); + setTimeout(function () { + $el.removeClass('rightEnd'); + }, 400); + } + } + }; + $el.mode = function (_touch) { + if (settings.adaptiveHeight === true && settings.vertical === false) { + $el.css('height', $children.eq(scene).outerHeight(true)); + } + if (on === false) { + if (settings.mode === 'slide') { + if (plugin.doCss()) { + $el.addClass('lSSlide'); + if (settings.speed !== '') { + $slide.css('transition-duration', settings.speed + 'ms'); + } + if (settings.cssEasing !== '') { + $slide.css('transition-timing-function', settings.cssEasing); + } + } + } else { + if (plugin.doCss()) { + if (settings.speed !== '') { + $el.css('transition-duration', settings.speed + 'ms'); + } + if (settings.cssEasing !== '') { + $el.css('transition-timing-function', settings.cssEasing); + } + } + } + } + if (!_touch) { + settings.onBeforeSlide.call(this, $el, scene); + } + if (settings.mode === 'slide') { + plugin.slide(); + } else { + plugin.fade(); + } + if (!$slide.hasClass('ls-hover')) { + plugin.auto(); + } + setTimeout(function () { + if (!_touch) { + settings.onAfterSlide.call(this, $el, scene); + } + }, settings.speed); + on = true; + }; + $el.play = function () { + $el.goToNextSlide(); + settings.auto = true; + plugin.auto(); + }; + $el.pause = function () { + settings.auto = false; + clearInterval(interval); + }; + $el.refresh = function () { + refresh.init(); + }; + $el.getCurrentSlideCount = function () { + var sc = scene; + if (settings.loop) { + var ln = $slide.find('.lslide').length, + cl = $el.find('.clone.left').length; + if (scene <= cl - 1) { + sc = ln + (scene - cl); + } else if (scene >= (ln + cl)) { + sc = scene - ln - cl; + } else { + sc = scene - cl; + } + } + return sc + 1; + }; + $el.getTotalSlideCount = function () { + return $slide.find('.lslide').length; + }; + $el.goToSlide = function (s) { + if (settings.loop) { + scene = (s + $el.find('.clone.left').length - 1); + } else { + scene = s; + } + $el.mode(false); + if (settings.gallery === true) { + plugin.slideThumb(); + } + }; + $el.destroy = function () { + if ($el.lightSlider) { + $el.goToPrevSlide = function(){}; + $el.goToNextSlide = function(){}; + $el.mode = function(){}; + $el.play = function(){}; + $el.pause = function(){}; + $el.refresh = function(){}; + $el.getCurrentSlideCount = function(){}; + $el.getTotalSlideCount = function(){}; + $el.goToSlide = function(){}; + $el.lightSlider = null; + refresh = { + init : function(){} + }; + $el.parent().parent().find('.lSAction, .lSPager').remove(); + $el.removeClass('lightSlider lSFade lSSlide lsGrab lsGrabbing leftEnd right').removeAttr('style').unwrap().unwrap(); + $el.children().removeAttr('style'); + $children.removeClass('lslide active'); + $el.find('.clone').remove(); + $children = null; + interval = null; + on = false; + scene = 0; + } + + }; + setTimeout(function () { + settings.onSliderLoad.call(this, $el); + }, 10); + $(window).on('resize orientationchange', function (e) { + setTimeout(function () { + if (e.preventDefault) { + e.preventDefault(); + } else { + e.returnValue = false; + } + refresh.init(); + }, 200); + }); + return this; + }; +}(jQuery)); diff --git a/assets/library/lightslider/js/lightslider.min.js b/assets/library/lightslider/js/lightslider.min.js new file mode 100644 index 0000000..ea16d58 --- /dev/null +++ b/assets/library/lightslider/js/lightslider.min.js @@ -0,0 +1,4 @@ +/*! lightslider - v1.1.6 - 2016-10-25 +* https://github.com/sachinchoolur/lightslider +* Copyright (c) 2016 Sachin N; Licensed MIT */ +!function(a,b){"use strict";var c={item:3,autoWidth:!1,slideMove:1,slideMargin:10,addClass:"",mode:"slide",useCSS:!0,cssEasing:"ease",easing:"linear",speed:400,auto:!1,pauseOnHover:!1,loop:!1,slideEndAnimation:!0,pause:2e3,keyPress:!1,controls:!0,prevHtml:"",nextHtml:"",rtl:!1,adaptiveHeight:!1,vertical:!1,verticalHeight:500,vThumbWidth:100,thumbItem:10,pager:!0,gallery:!1,galleryMargin:5,thumbMargin:5,currentPagerPosition:"middle",enableTouch:!0,enableDrag:!0,freeMove:!0,swipeThreshold:40,responsive:[],onBeforeStart:function(a){},onSliderLoad:function(a){},onBeforeSlide:function(a,b){},onAfterSlide:function(a,b){},onBeforeNextSlide:function(a,b){},onBeforePrevSlide:function(a,b){}};a.fn.lightSlider=function(b){if(0===this.length)return this;if(this.length>1)return this.each(function(){a(this).lightSlider(b)}),this;var d={},e=a.extend(!0,{},c,b),f={},g=this;d.$el=this,"fade"===e.mode&&(e.vertical=!1);var h=g.children(),i=a(window).width(),j=null,k=null,l=0,m=0,n=!1,o=0,p="",q=0,r=e.vertical===!0?"height":"width",s=e.vertical===!0?"margin-bottom":"margin-right",t=0,u=0,v=0,w=0,x=null,y="ontouchstart"in document.documentElement,z={};return z.chbreakpoint=function(){if(i=a(window).width(),e.responsive.length){var b;if(e.autoWidth===!1&&(b=e.item),ie.responsive[0].breakpoint)for(var g in f)f.hasOwnProperty(g)&&(e[g]=f[g]);e.autoWidth===!1&&t>0&&v>0&&b!==e.item&&(q=Math.round(t/((v+e.slideMargin)*e.slideMove)))}},z.calSW=function(){e.autoWidth===!1&&(v=(o-(e.item*e.slideMargin-e.slideMargin))/e.item)},z.calWidth=function(a){var b=a===!0?p.find(".lslide").length:h.length;if(e.autoWidth===!1)m=b*(v+e.slideMargin);else{m=0;for(var c=0;b>c;c++)m+=parseInt(h.eq(c).width())+e.slideMargin}return m},d={doCss:function(){var a=function(){for(var a=["transition","MozTransition","WebkitTransition","OTransition","msTransition","KhtmlTransition"],b=document.documentElement,c=0;c'+e.prevHtml+''+e.nextHtml+""),e.autoWidth?z.calWidth(!1)
        '),p=g.parent(".lSSlideWrapper"),e.rtl===!0&&p.parent().addClass("lSrtl"),e.vertical?(p.parent().addClass("vertical"),o=e.verticalHeight,p.css("height",o+"px")):o=g.outerWidth(),h.addClass("lslide"),e.loop===!0&&"slide"===e.mode&&(z.calSW(),z.clone=function(){if(z.calWidth(!0)>o){for(var b=0,c=0,d=0;d=o+e.slideMargin));d++);var f=e.autoWidth===!0?c:e.item;if(fh.length-1-g.find(".clone.right").length;j--)q--,h.eq(j).remove();for(var k=g.find(".clone.right").length;f>k;k++)g.find(".lslide").eq(k).clone().removeClass("lslide").addClass("clone right").appendTo(g),q++;for(var l=g.find(".lslide").length-g.find(".clone.left").length;l>g.find(".lslide").length-f;l--)g.find(".lslide").eq(l-1).clone().removeClass("lslide").addClass("clone left").prependTo(g);h=g.children()}else h.hasClass("clone")&&(g.find(".clone").remove(),a.move(g,0))},z.clone()),z.sSW=function(){l=h.length,e.rtl===!0&&e.vertical===!1&&(s="margin-left"),e.autoWidth===!1&&h.css(r,v+"px"),h.css(s,e.slideMargin+"px"),m=z.calWidth(!1),g.css(r,m+"px"),e.loop===!0&&"slide"===e.mode&&n===!1&&(q=g.find(".clone.left").length)},z.calL=function(){h=g.children(),l=h.length},this.doCss()&&p.addClass("usingCss"),z.calL(),"slide"===e.mode?(z.calSW(),z.sSW(),e.loop===!0&&(t=a.slideValue(),this.move(g,t)),e.vertical===!1&&this.setHeight(g,!1)):(this.setHeight(g,!0),g.addClass("lSFade"),this.doCss()||(h.fadeOut(0),h.eq(q).fadeIn(0))),e.loop===!0&&"slide"===e.mode?h.eq(q).addClass("active"):h.first().addClass("active")},pager:function(){var a=this;if(z.createPager=function(){w=(o-(e.thumbItem*e.thumbMargin-e.thumbMargin))/e.thumbItem;var b=p.find(".lslide"),c=p.find(".lslide").length,d=0,f="",h=0;for(d=0;c>d;d++){"slide"===e.mode&&(e.autoWidth?h+=(parseInt(b.eq(d).width())+e.slideMargin)*e.slideMove:h=d*(v+e.slideMargin)*e.slideMove);var i=b.eq(d*e.slideMove).attr("data-thumb");if(f+=e.gallery===!0?'
      • ':'
      • '+(d+1)+"
      • ","slide"===e.mode&&h>=m-o-e.slideMargin){d+=1;var j=2;e.autoWidth&&(f+='
      • '+(d+1)+"
      • ",j=1),j>d?(f=null,p.parent().addClass("noPager")):p.parent().removeClass("noPager");break}}var k=p.parent();k.find(".lSPager").html(f),e.gallery===!0&&(e.vertical===!0&&k.find(".lSPager").css("width",e.vThumbWidth+"px"),u=d*(e.thumbMargin+w)+.5,k.find(".lSPager").css({property:u+"px","transition-duration":e.speed+"ms"}),e.vertical===!0&&p.parent().css("padding-right",e.vThumbWidth+e.galleryMargin+"px"),k.find(".lSPager").css(r,u+"px"));var l=k.find(".lSPager").find("li");l.first().addClass("active"),l.on("click",function(){return e.loop===!0&&"slide"===e.mode?q+=l.index(this)-k.find(".lSPager").find("li.active").index():q=l.index(this),g.mode(!1),e.gallery===!0&&a.slideThumb(),!1})},e.pager){var b="lSpg";e.gallery&&(b="lSGallery"),p.after('
          ');var c=e.vertical?"margin-left":"margin-top";p.parent().find(".lSPager").css(c,e.galleryMargin+"px"),z.createPager()}setTimeout(function(){z.init()},0)},setHeight:function(a,b){var c=null,d=this;c=e.loop?a.children(".lslide ").first():a.children().first();var f=function(){var d=c.outerHeight(),e=0,f=d;b&&(d=0,e=100*f/o),a.css({height:d+"px","padding-bottom":e+"%"})};f(),c.find("img").length?c.find("img")[0].complete?(f(),x||d.auto()):c.find("img").on("load",function(){setTimeout(function(){f(),x||d.auto()},100)}):x||d.auto()},active:function(a,b){this.doCss()&&"fade"===e.mode&&p.addClass("on");var c=0;if(q*e.slideMove=d&&(c=f)),e.loop===!0&&"slide"===e.mode&&(c=b===!0?q-g.find(".clone.left").length:q*e.slideMove,b===!0&&(d=a.length,f=d-1,c+1===d?c=f:c+1>d&&(c=0))),this.doCss()||"fade"!==e.mode||b!==!1||a.eq(c).fadeIn(e.speed),a.eq(c).addClass("active")}else a.removeClass("active"),a.eq(a.length-1).addClass("active"),this.doCss()||"fade"!==e.mode||b!==!1||(a.fadeOut(e.speed),a.eq(c).fadeIn(e.speed))},move:function(a,b){e.rtl===!0&&(b=-b),this.doCss()?a.css(e.vertical===!0?{transform:"translate3d(0px, "+-b+"px, 0px)","-webkit-transform":"translate3d(0px, "+-b+"px, 0px)"}:{transform:"translate3d("+-b+"px, 0px, 0px)","-webkit-transform":"translate3d("+-b+"px, 0px, 0px)"}):e.vertical===!0?a.css("position","relative").animate({top:-b+"px"},e.speed,e.easing):a.css("position","relative").animate({left:-b+"px"},e.speed,e.easing);var c=p.parent().find(".lSPager").find("li");this.active(c,!0)},fade:function(){this.active(h,!1);var a=p.parent().find(".lSPager").find("li");this.active(a,!0)},slide:function(){var a=this;z.calSlide=function(){m>o&&(t=a.slideValue(),a.active(h,!1),t>m-o-e.slideMargin?t=m-o-e.slideMargin:0>t&&(t=0),a.move(g,t),e.loop===!0&&"slide"===e.mode&&(q>=l-g.find(".clone.left").length/e.slideMove&&a.resetSlide(g.find(".clone.left").length),0===q&&a.resetSlide(p.find(".lslide").length)))},z.calSlide()},resetSlide:function(a){var b=this;p.find(".lSAction a").addClass("disabled"),setTimeout(function(){q=a,p.css("transition-duration","0ms"),t=b.slideValue(),b.active(h,!1),d.move(g,t),setTimeout(function(){p.css("transition-duration",e.speed+"ms"),p.find(".lSAction a").removeClass("disabled")},50)},e.speed+100)},slideValue:function(){var a=0;if(e.autoWidth===!1)a=q*(v+e.slideMargin)*e.slideMove;else{a=0;for(var b=0;q>b;b++)a+=parseInt(h.eq(b).width())+e.slideMargin}return a},slideThumb:function(){var a;switch(e.currentPagerPosition){case"left":a=0;break;case"middle":a=o/2-w/2;break;case"right":a=o-w}var b=q-g.find(".clone.left").length,c=p.parent().find(".lSPager");"slide"===e.mode&&e.loop===!0&&(b>=c.children().length?b=0:0>b&&(b=c.children().length));var d=b*(w+e.thumbMargin)-a;d+o>u&&(d=u-o-e.thumbMargin),0>d&&(d=0),this.move(c,d)},auto:function(){e.auto&&(clearInterval(x),x=setInterval(function(){g.goToNextSlide()},e.pause))},pauseOnHover:function(){var b=this;e.auto&&e.pauseOnHover&&(p.on("mouseenter",function(){a(this).addClass("ls-hover"),g.pause(),e.auto=!0}),p.on("mouseleave",function(){a(this).removeClass("ls-hover"),p.find(".lightSlider").hasClass("lsGrabbing")||b.auto()}))},touchMove:function(a,b){if(p.css("transition-duration","0ms"),"slide"===e.mode){var c=a-b,d=t-c;if(d>=m-o-e.slideMargin)if(e.freeMove===!1)d=m-o-e.slideMargin;else{var f=m-o-e.slideMargin;d=f+(d-f)/5}else 0>d&&(e.freeMove===!1?d=0:d/=5);this.move(g,d)}},touchEnd:function(a){if(p.css("transition-duration",e.speed+"ms"),"slide"===e.mode){var b=!1,c=!0;t-=a,t>m-o-e.slideMargin?(t=m-o-e.slideMargin,e.autoWidth===!1&&(b=!0)):0>t&&(t=0);var d=function(a){var c=0;if(b||a&&(c=1),e.autoWidth)for(var d=0,f=0;f=t));f++);else{var g=t/((v+e.slideMargin)*e.slideMove);q=parseInt(g)+c,t>=m-o-e.slideMargin&&g%1!==0&&q++}};a>=e.swipeThreshold?(d(!1),c=!1):a<=-e.swipeThreshold&&(d(!0),c=!1),g.mode(c),this.slideThumb()}else a>=e.swipeThreshold?g.goToPrevSlide():a<=-e.swipeThreshold&&g.goToNextSlide()},enableDrag:function(){var b=this;if(!y){var c=0,d=0,f=!1;p.find(".lightSlider").addClass("lsGrab"),p.on("mousedown",function(b){return o>m&&0!==m?!1:void("lSPrev"!==a(b.target).attr("class")&&"lSNext"!==a(b.target).attr("class")&&(c=e.vertical===!0?b.pageY:b.pageX,f=!0,b.preventDefault?b.preventDefault():b.returnValue=!1,p.scrollLeft+=1,p.scrollLeft-=1,p.find(".lightSlider").removeClass("lsGrab").addClass("lsGrabbing"),clearInterval(x)))}),a(window).on("mousemove",function(a){f&&(d=e.vertical===!0?a.pageY:a.pageX,b.touchMove(d,c))}),a(window).on("mouseup",function(g){if(f){p.find(".lightSlider").removeClass("lsGrabbing").addClass("lsGrab"),f=!1,d=e.vertical===!0?g.pageY:g.pageX;var h=d-c;Math.abs(h)>=e.swipeThreshold&&a(window).on("click.ls",function(b){b.preventDefault?b.preventDefault():b.returnValue=!1,b.stopImmediatePropagation(),b.stopPropagation(),a(window).off("click.ls")}),b.touchEnd(h)}})}},enableTouch:function(){var a=this;if(y){var b={},c={};p.on("touchstart",function(a){c=a.originalEvent.targetTouches[0],b.pageX=a.originalEvent.targetTouches[0].pageX,b.pageY=a.originalEvent.targetTouches[0].pageY,clearInterval(x)}),p.on("touchmove",function(d){if(o>m&&0!==m)return!1;var f=d.originalEvent;c=f.targetTouches[0];var g=Math.abs(c.pageX-b.pageX),h=Math.abs(c.pageY-b.pageY);e.vertical===!0?(3*h>g&&d.preventDefault(),a.touchMove(c.pageY,b.pageY)):(3*g>h&&d.preventDefault(),a.touchMove(c.pageX,b.pageX))}),p.on("touchend",function(){if(o>m&&0!==m)return!1;var d;d=e.vertical===!0?c.pageY-b.pageY:c.pageX-b.pageX,a.touchEnd(d)})}},build:function(){var b=this;b.initialStyle(),this.doCss()&&(e.enableTouch===!0&&b.enableTouch(),e.enableDrag===!0&&b.enableDrag()),a(window).on("focus",function(){b.auto()}),a(window).on("blur",function(){clearInterval(x)}),b.pager(),b.pauseOnHover(),b.controls(),b.keyPress()}},d.build(),z.init=function(){z.chbreakpoint(),e.vertical===!0?(o=e.item>1?e.verticalHeight:h.outerHeight(),p.css("height",o+"px")):o=p.outerWidth(),e.loop===!0&&"slide"===e.mode&&z.clone(),z.calL(),"slide"===e.mode&&g.removeClass("lSSlide"),"slide"===e.mode&&(z.calSW(),z.sSW()),setTimeout(function(){"slide"===e.mode&&g.addClass("lSSlide")},1e3),e.pager&&z.createPager(),e.adaptiveHeight===!0&&e.vertical===!1&&g.css("height",h.eq(q).outerHeight(!0)),e.adaptiveHeight===!1&&("slide"===e.mode?e.vertical===!1?d.setHeight(g,!1):d.auto():d.setHeight(g,!0)),e.gallery===!0&&d.slideThumb(),"slide"===e.mode&&d.slide(),e.autoWidth===!1?h.length<=e.item?p.find(".lSAction").hide():p.find(".lSAction").show():z.calWidth(!1)0)e.onBeforePrevSlide.call(this,g,q),q--,g.mode(!1),e.gallery===!0&&d.slideThumb();else if(e.loop===!0){if(e.onBeforePrevSlide.call(this,g,q),"fade"===e.mode){var a=l-1;q=parseInt(a/e.slideMove)}g.mode(!1),e.gallery===!0&&d.slideThumb()}else e.slideEndAnimation===!0&&(g.addClass("leftEnd"),setTimeout(function(){g.removeClass("leftEnd")},400))},g.goToNextSlide=function(){var a=!0;if("slide"===e.mode){var b=d.slideValue();a=b=q?b+(q-c):q>=b+c?q-b-c:q-c}return a+1},g.getTotalSlideCount=function(){return p.find(".lslide").length},g.goToSlide=function(a){q=e.loop?a+g.find(".clone.left").length-1:a,g.mode(!1),e.gallery===!0&&d.slideThumb()},g.destroy=function(){g.lightSlider&&(g.goToPrevSlide=function(){},g.goToNextSlide=function(){},g.mode=function(){},g.play=function(){},g.pause=function(){},g.refresh=function(){},g.getCurrentSlideCount=function(){},g.getTotalSlideCount=function(){},g.goToSlide=function(){},g.lightSlider=null,z={init:function(){}},g.parent().parent().find(".lSAction, .lSPager").remove(),g.removeClass("lightSlider lSFade lSSlide lsGrab lsGrabbing leftEnd right").removeAttr("style").unwrap().unwrap(),g.children().removeAttr("style"),h.removeClass("lslide active"),g.find(".clone").remove(),h=null,x=null,n=!1,q=0)},setTimeout(function(){e.onSliderLoad.call(this,g)},10),a(window).on("resize orientationchange",function(a){setTimeout(function(){a.preventDefault?a.preventDefault():a.returnValue=!1,z.init()},200)}),this}}(jQuery); \ No newline at end of file diff --git a/assets/library/masonry/masonry.pkgd.js b/assets/library/masonry/masonry.pkgd.js new file mode 100644 index 0000000..10524bc --- /dev/null +++ b/assets/library/masonry/masonry.pkgd.js @@ -0,0 +1,2502 @@ +/*! + * Masonry PACKAGED v4.2.1 + * Cascading grid layout library + * https://masonry.desandro.com + * MIT License + * by David DeSandro + */ + +/** + * Bridget makes jQuery widgets + * v2.0.1 + * MIT license + */ + +/* jshint browser: true, strict: true, undef: true, unused: true */ + +( function( window, factory ) { + // universal module definition + /*jshint strict: false */ /* globals define, module, require */ + if ( typeof define == 'function' && define.amd ) { + // AMD + define( 'jquery-bridget/jquery-bridget',[ 'jquery' ], function( jQuery ) { + return factory( window, jQuery ); + }); + } else if ( typeof module == 'object' && module.exports ) { + // CommonJS + module.exports = factory( + window, + require('jquery') + ); + } else { + // browser global + window.jQueryBridget = factory( + window, + window.jQuery + ); + } + +}( window, function factory( window, jQuery ) { +'use strict'; + +// ----- utils ----- // + +var arraySlice = Array.prototype.slice; + +// helper function for logging errors +// $.error breaks jQuery chaining +var console = window.console; +var logError = typeof console == 'undefined' ? function() {} : + function( message ) { + console.error( message ); + }; + +// ----- jQueryBridget ----- // + +function jQueryBridget( namespace, PluginClass, $ ) { + $ = $ || jQuery || window.jQuery; + if ( !$ ) { + return; + } + + // add option method -> $().plugin('option', {...}) + if ( !PluginClass.prototype.option ) { + // option setter + PluginClass.prototype.option = function( opts ) { + // bail out if not an object + if ( !$.isPlainObject( opts ) ){ + return; + } + this.options = $.extend( true, this.options, opts ); + }; + } + + // make jQuery plugin + $.fn[ namespace ] = function( arg0 /*, arg1 */ ) { + if ( typeof arg0 == 'string' ) { + // method call $().plugin( 'methodName', { options } ) + // shift arguments by 1 + var args = arraySlice.call( arguments, 1 ); + return methodCall( this, arg0, args ); + } + // just $().plugin({ options }) + plainCall( this, arg0 ); + return this; + }; + + // $().plugin('methodName') + function methodCall( $elems, methodName, args ) { + var returnValue; + var pluginMethodStr = '$().' + namespace + '("' + methodName + '")'; + + $elems.each( function( i, elem ) { + // get instance + var instance = $.data( elem, namespace ); + if ( !instance ) { + logError( namespace + ' not initialized. Cannot call methods, i.e. ' + + pluginMethodStr ); + return; + } + + var method = instance[ methodName ]; + if ( !method || methodName.charAt(0) == '_' ) { + logError( pluginMethodStr + ' is not a valid method' ); + return; + } + + // apply method, get return value + var value = method.apply( instance, args ); + // set return value if value is returned, use only first value + returnValue = returnValue === undefined ? value : returnValue; + }); + + return returnValue !== undefined ? returnValue : $elems; + } + + function plainCall( $elems, options ) { + $elems.each( function( i, elem ) { + var instance = $.data( elem, namespace ); + if ( instance ) { + // set options & init + instance.option( options ); + instance._init(); + } else { + // initialize new instance + instance = new PluginClass( elem, options ); + $.data( elem, namespace, instance ); + } + }); + } + + updateJQuery( $ ); + +} + +// ----- updateJQuery ----- // + +// set $.bridget for v1 backwards compatibility +function updateJQuery( $ ) { + if ( !$ || ( $ && $.bridget ) ) { + return; + } + $.bridget = jQueryBridget; +} + +updateJQuery( jQuery || window.jQuery ); + +// ----- ----- // + +return jQueryBridget; + +})); + +/** + * EvEmitter v1.1.0 + * Lil' event emitter + * MIT License + */ + +/* jshint unused: true, undef: true, strict: true */ + +( function( global, factory ) { + // universal module definition + /* jshint strict: false */ /* globals define, module, window */ + if ( typeof define == 'function' && define.amd ) { + // AMD - RequireJS + define( 'ev-emitter/ev-emitter',factory ); + } else if ( typeof module == 'object' && module.exports ) { + // CommonJS - Browserify, Webpack + module.exports = factory(); + } else { + // Browser globals + global.EvEmitter = factory(); + } + +}( typeof window != 'undefined' ? window : this, function() { + + + +function EvEmitter() {} + +var proto = EvEmitter.prototype; + +proto.on = function( eventName, listener ) { + if ( !eventName || !listener ) { + return; + } + // set events hash + var events = this._events = this._events || {}; + // set listeners array + var listeners = events[ eventName ] = events[ eventName ] || []; + // only add once + if ( listeners.indexOf( listener ) == -1 ) { + listeners.push( listener ); + } + + return this; +}; + +proto.once = function( eventName, listener ) { + if ( !eventName || !listener ) { + return; + } + // add event + this.on( eventName, listener ); + // set once flag + // set onceEvents hash + var onceEvents = this._onceEvents = this._onceEvents || {}; + // set onceListeners object + var onceListeners = onceEvents[ eventName ] = onceEvents[ eventName ] || {}; + // set flag + onceListeners[ listener ] = true; + + return this; +}; + +proto.off = function( eventName, listener ) { + var listeners = this._events && this._events[ eventName ]; + if ( !listeners || !listeners.length ) { + return; + } + var index = listeners.indexOf( listener ); + if ( index != -1 ) { + listeners.splice( index, 1 ); + } + + return this; +}; + +proto.emitEvent = function( eventName, args ) { + var listeners = this._events && this._events[ eventName ]; + if ( !listeners || !listeners.length ) { + return; + } + // copy over to avoid interference if .off() in listener + listeners = listeners.slice(0); + args = args || []; + // once stuff + var onceListeners = this._onceEvents && this._onceEvents[ eventName ]; + + for ( var i=0; i < listeners.length; i++ ) { + var listener = listeners[i] + var isOnce = onceListeners && onceListeners[ listener ]; + if ( isOnce ) { + // remove listener + // remove before trigger to prevent recursion + this.off( eventName, listener ); + // unset once flag + delete onceListeners[ listener ]; + } + // trigger listener + listener.apply( this, args ); + } + + return this; +}; + +proto.allOff = function() { + delete this._events; + delete this._onceEvents; +}; + +return EvEmitter; + +})); + +/*! + * getSize v2.0.2 + * measure size of elements + * MIT license + */ + +/*jshint browser: true, strict: true, undef: true, unused: true */ +/*global define: false, module: false, console: false */ + +( function( window, factory ) { + 'use strict'; + + if ( typeof define == 'function' && define.amd ) { + // AMD + define( 'get-size/get-size',[],function() { + return factory(); + }); + } else if ( typeof module == 'object' && module.exports ) { + // CommonJS + module.exports = factory(); + } else { + // browser global + window.getSize = factory(); + } + +})( window, function factory() { +'use strict'; + +// -------------------------- helpers -------------------------- // + +// get a number from a string, not a percentage +function getStyleSize( value ) { + var num = parseFloat( value ); + // not a percent like '100%', and a number + var isValid = value.indexOf('%') == -1 && !isNaN( num ); + return isValid && num; +} + +function noop() {} + +var logError = typeof console == 'undefined' ? noop : + function( message ) { + console.error( message ); + }; + +// -------------------------- measurements -------------------------- // + +var measurements = [ + 'paddingLeft', + 'paddingRight', + 'paddingTop', + 'paddingBottom', + 'marginLeft', + 'marginRight', + 'marginTop', + 'marginBottom', + 'borderLeftWidth', + 'borderRightWidth', + 'borderTopWidth', + 'borderBottomWidth' +]; + +var measurementsLength = measurements.length; + +function getZeroSize() { + var size = { + width: 0, + height: 0, + innerWidth: 0, + innerHeight: 0, + outerWidth: 0, + outerHeight: 0 + }; + for ( var i=0; i < measurementsLength; i++ ) { + var measurement = measurements[i]; + size[ measurement ] = 0; + } + return size; +} + +// -------------------------- getStyle -------------------------- // + +/** + * getStyle, get style of element, check for Firefox bug + * https://bugzilla.mozilla.org/show_bug.cgi?id=548397 + */ +function getStyle( elem ) { + var style = getComputedStyle( elem ); + if ( !style ) { + logError( 'Style returned ' + style + + '. Are you running this code in a hidden iframe on Firefox? ' + + 'See http://bit.ly/getsizebug1' ); + } + return style; +} + +// -------------------------- setup -------------------------- // + +var isSetup = false; + +var isBoxSizeOuter; + +/** + * setup + * check isBoxSizerOuter + * do on first getSize() rather than on page load for Firefox bug + */ +function setup() { + // setup once + if ( isSetup ) { + return; + } + isSetup = true; + + // -------------------------- box sizing -------------------------- // + + /** + * WebKit measures the outer-width on style.width on border-box elems + * IE & Firefox<29 measures the inner-width + */ + var div = document.createElement('div'); + div.style.width = '200px'; + div.style.padding = '1px 2px 3px 4px'; + div.style.borderStyle = 'solid'; + div.style.borderWidth = '1px 2px 3px 4px'; + div.style.boxSizing = 'border-box'; + + var body = document.body || document.documentElement; + body.appendChild( div ); + var style = getStyle( div ); + + getSize.isBoxSizeOuter = isBoxSizeOuter = getStyleSize( style.width ) == 200; + body.removeChild( div ); + +} + +// -------------------------- getSize -------------------------- // + +function getSize( elem ) { + setup(); + + // use querySeletor if elem is string + if ( typeof elem == 'string' ) { + elem = document.querySelector( elem ); + } + + // do not proceed on non-objects + if ( !elem || typeof elem != 'object' || !elem.nodeType ) { + return; + } + + var style = getStyle( elem ); + + // if hidden, everything is 0 + if ( style.display == 'none' ) { + return getZeroSize(); + } + + var size = {}; + size.width = elem.offsetWidth; + size.height = elem.offsetHeight; + + var isBorderBox = size.isBorderBox = style.boxSizing == 'border-box'; + + // get all measurements + for ( var i=0; i < measurementsLength; i++ ) { + var measurement = measurements[i]; + var value = style[ measurement ]; + var num = parseFloat( value ); + // any 'auto', 'medium' value will be 0 + size[ measurement ] = !isNaN( num ) ? num : 0; + } + + var paddingWidth = size.paddingLeft + size.paddingRight; + var paddingHeight = size.paddingTop + size.paddingBottom; + var marginWidth = size.marginLeft + size.marginRight; + var marginHeight = size.marginTop + size.marginBottom; + var borderWidth = size.borderLeftWidth + size.borderRightWidth; + var borderHeight = size.borderTopWidth + size.borderBottomWidth; + + var isBorderBoxSizeOuter = isBorderBox && isBoxSizeOuter; + + // overwrite width and height if we can get it from style + var styleWidth = getStyleSize( style.width ); + if ( styleWidth !== false ) { + size.width = styleWidth + + // add padding and border unless it's already including it + ( isBorderBoxSizeOuter ? 0 : paddingWidth + borderWidth ); + } + + var styleHeight = getStyleSize( style.height ); + if ( styleHeight !== false ) { + size.height = styleHeight + + // add padding and border unless it's already including it + ( isBorderBoxSizeOuter ? 0 : paddingHeight + borderHeight ); + } + + size.innerWidth = size.width - ( paddingWidth + borderWidth ); + size.innerHeight = size.height - ( paddingHeight + borderHeight ); + + size.outerWidth = size.width + marginWidth; + size.outerHeight = size.height + marginHeight; + + return size; +} + +return getSize; + +}); + +/** + * matchesSelector v2.0.2 + * matchesSelector( element, '.selector' ) + * MIT license + */ + +/*jshint browser: true, strict: true, undef: true, unused: true */ + +( function( window, factory ) { + /*global define: false, module: false */ + 'use strict'; + // universal module definition + if ( typeof define == 'function' && define.amd ) { + // AMD + define( 'desandro-matches-selector/matches-selector',factory ); + } else if ( typeof module == 'object' && module.exports ) { + // CommonJS + module.exports = factory(); + } else { + // browser global + window.matchesSelector = factory(); + } + +}( window, function factory() { + 'use strict'; + + var matchesMethod = ( function() { + var ElemProto = window.Element.prototype; + // check for the standard method name first + if ( ElemProto.matches ) { + return 'matches'; + } + // check un-prefixed + if ( ElemProto.matchesSelector ) { + return 'matchesSelector'; + } + // check vendor prefixes + var prefixes = [ 'webkit', 'moz', 'ms', 'o' ]; + + for ( var i=0; i < prefixes.length; i++ ) { + var prefix = prefixes[i]; + var method = prefix + 'MatchesSelector'; + if ( ElemProto[ method ] ) { + return method; + } + } + })(); + + return function matchesSelector( elem, selector ) { + return elem[ matchesMethod ]( selector ); + }; + +})); + +/** + * Fizzy UI utils v2.0.5 + * MIT license + */ + +/*jshint browser: true, undef: true, unused: true, strict: true */ + +( function( window, factory ) { + // universal module definition + /*jshint strict: false */ /*globals define, module, require */ + + if ( typeof define == 'function' && define.amd ) { + // AMD + define( 'fizzy-ui-utils/utils',[ + 'desandro-matches-selector/matches-selector' + ], function( matchesSelector ) { + return factory( window, matchesSelector ); + }); + } else if ( typeof module == 'object' && module.exports ) { + // CommonJS + module.exports = factory( + window, + require('desandro-matches-selector') + ); + } else { + // browser global + window.fizzyUIUtils = factory( + window, + window.matchesSelector + ); + } + +}( window, function factory( window, matchesSelector ) { + + + +var utils = {}; + +// ----- extend ----- // + +// extends objects +utils.extend = function( a, b ) { + for ( var prop in b ) { + a[ prop ] = b[ prop ]; + } + return a; +}; + +// ----- modulo ----- // + +utils.modulo = function( num, div ) { + return ( ( num % div ) + div ) % div; +}; + +// ----- makeArray ----- // + +// turn element or nodeList into an array +utils.makeArray = function( obj ) { + var ary = []; + if ( Array.isArray( obj ) ) { + // use object if already an array + ary = obj; + } else if ( obj && typeof obj == 'object' && + typeof obj.length == 'number' ) { + // convert nodeList to array + for ( var i=0; i < obj.length; i++ ) { + ary.push( obj[i] ); + } + } else { + // array of single index + ary.push( obj ); + } + return ary; +}; + +// ----- removeFrom ----- // + +utils.removeFrom = function( ary, obj ) { + var index = ary.indexOf( obj ); + if ( index != -1 ) { + ary.splice( index, 1 ); + } +}; + +// ----- getParent ----- // + +utils.getParent = function( elem, selector ) { + while ( elem.parentNode && elem != document.body ) { + elem = elem.parentNode; + if ( matchesSelector( elem, selector ) ) { + return elem; + } + } +}; + +// ----- getQueryElement ----- // + +// use element as selector string +utils.getQueryElement = function( elem ) { + if ( typeof elem == 'string' ) { + return document.querySelector( elem ); + } + return elem; +}; + +// ----- handleEvent ----- // + +// enable .ontype to trigger from .addEventListener( elem, 'type' ) +utils.handleEvent = function( event ) { + var method = 'on' + event.type; + if ( this[ method ] ) { + this[ method ]( event ); + } +}; + +// ----- filterFindElements ----- // + +utils.filterFindElements = function( elems, selector ) { + // make array of elems + elems = utils.makeArray( elems ); + var ffElems = []; + + elems.forEach( function( elem ) { + // check that elem is an actual element + if ( !( elem instanceof HTMLElement ) ) { + return; + } + // add elem if no selector + if ( !selector ) { + ffElems.push( elem ); + return; + } + // filter & find items if we have a selector + // filter + if ( matchesSelector( elem, selector ) ) { + ffElems.push( elem ); + } + // find children + var childElems = elem.querySelectorAll( selector ); + // concat childElems to filterFound array + for ( var i=0; i < childElems.length; i++ ) { + ffElems.push( childElems[i] ); + } + }); + + return ffElems; +}; + +// ----- debounceMethod ----- // + +utils.debounceMethod = function( _class, methodName, threshold ) { + // original method + var method = _class.prototype[ methodName ]; + var timeoutName = methodName + 'Timeout'; + + _class.prototype[ methodName ] = function() { + var timeout = this[ timeoutName ]; + if ( timeout ) { + clearTimeout( timeout ); + } + var args = arguments; + + var _this = this; + this[ timeoutName ] = setTimeout( function() { + method.apply( _this, args ); + delete _this[ timeoutName ]; + }, threshold || 100 ); + }; +}; + +// ----- docReady ----- // + +utils.docReady = function( callback ) { + var readyState = document.readyState; + if ( readyState == 'complete' || readyState == 'interactive' ) { + // do async to allow for other scripts to run. metafizzy/flickity#441 + setTimeout( callback ); + } else { + document.addEventListener( 'DOMContentLoaded', callback ); + } +}; + +// ----- htmlInit ----- // + +// http://jamesroberts.name/blog/2010/02/22/string-functions-for-javascript-trim-to-camel-case-to-dashed-and-to-underscore/ +utils.toDashed = function( str ) { + return str.replace( /(.)([A-Z])/g, function( match, $1, $2 ) { + return $1 + '-' + $2; + }).toLowerCase(); +}; + +var console = window.console; +/** + * allow user to initialize classes via [data-namespace] or .js-namespace class + * htmlInit( Widget, 'widgetName' ) + * options are parsed from data-namespace-options + */ +utils.htmlInit = function( WidgetClass, namespace ) { + utils.docReady( function() { + var dashedNamespace = utils.toDashed( namespace ); + var dataAttr = 'data-' + dashedNamespace; + var dataAttrElems = document.querySelectorAll( '[' + dataAttr + ']' ); + var jsDashElems = document.querySelectorAll( '.js-' + dashedNamespace ); + var elems = utils.makeArray( dataAttrElems ) + .concat( utils.makeArray( jsDashElems ) ); + var dataOptionsAttr = dataAttr + '-options'; + var jQuery = window.jQuery; + + elems.forEach( function( elem ) { + var attr = elem.getAttribute( dataAttr ) || + elem.getAttribute( dataOptionsAttr ); + var options; + try { + options = attr && JSON.parse( attr ); + } catch ( error ) { + // log error, do not initialize + if ( console ) { + console.error( 'Error parsing ' + dataAttr + ' on ' + elem.className + + ': ' + error ); + } + return; + } + // initialize + var instance = new WidgetClass( elem, options ); + // make available via $().data('namespace') + if ( jQuery ) { + jQuery.data( elem, namespace, instance ); + } + }); + + }); +}; + +// ----- ----- // + +return utils; + +})); + +/** + * Outlayer Item + */ + +( function( window, factory ) { + // universal module definition + /* jshint strict: false */ /* globals define, module, require */ + if ( typeof define == 'function' && define.amd ) { + // AMD - RequireJS + define( 'outlayer/item',[ + 'ev-emitter/ev-emitter', + 'get-size/get-size' + ], + factory + ); + } else if ( typeof module == 'object' && module.exports ) { + // CommonJS - Browserify, Webpack + module.exports = factory( + require('ev-emitter'), + require('get-size') + ); + } else { + // browser global + window.Outlayer = {}; + window.Outlayer.Item = factory( + window.EvEmitter, + window.getSize + ); + } + +}( window, function factory( EvEmitter, getSize ) { +'use strict'; + +// ----- helpers ----- // + +function isEmptyObj( obj ) { + for ( var prop in obj ) { + return false; + } + prop = null; + return true; +} + +// -------------------------- CSS3 support -------------------------- // + + +var docElemStyle = document.documentElement.style; + +var transitionProperty = typeof docElemStyle.transition == 'string' ? + 'transition' : 'WebkitTransition'; +var transformProperty = typeof docElemStyle.transform == 'string' ? + 'transform' : 'WebkitTransform'; + +var transitionEndEvent = { + WebkitTransition: 'webkitTransitionEnd', + transition: 'transitionend' +}[ transitionProperty ]; + +// cache all vendor properties that could have vendor prefix +var vendorProperties = { + transform: transformProperty, + transition: transitionProperty, + transitionDuration: transitionProperty + 'Duration', + transitionProperty: transitionProperty + 'Property', + transitionDelay: transitionProperty + 'Delay' +}; + +// -------------------------- Item -------------------------- // + +function Item( element, layout ) { + if ( !element ) { + return; + } + + this.element = element; + // parent layout class, i.e. Masonry, Isotope, or Packery + this.layout = layout; + this.position = { + x: 0, + y: 0 + }; + + this._create(); +} + +// inherit EvEmitter +var proto = Item.prototype = Object.create( EvEmitter.prototype ); +proto.constructor = Item; + +proto._create = function() { + // transition objects + this._transn = { + ingProperties: {}, + clean: {}, + onEnd: {} + }; + + this.css({ + position: 'absolute' + }); +}; + +// trigger specified handler for event type +proto.handleEvent = function( event ) { + var method = 'on' + event.type; + if ( this[ method ] ) { + this[ method ]( event ); + } +}; + +proto.getSize = function() { + this.size = getSize( this.element ); +}; + +/** + * apply CSS styles to element + * @param {Object} style + */ +proto.css = function( style ) { + var elemStyle = this.element.style; + + for ( var prop in style ) { + // use vendor property if available + var supportedProp = vendorProperties[ prop ] || prop; + elemStyle[ supportedProp ] = style[ prop ]; + } +}; + + // measure position, and sets it +proto.getPosition = function() { + var style = getComputedStyle( this.element ); + var isOriginLeft = this.layout._getOption('originLeft'); + var isOriginTop = this.layout._getOption('originTop'); + var xValue = style[ isOriginLeft ? 'left' : 'right' ]; + var yValue = style[ isOriginTop ? 'top' : 'bottom' ]; + // convert percent to pixels + var layoutSize = this.layout.size; + var x = xValue.indexOf('%') != -1 ? + ( parseFloat( xValue ) / 100 ) * layoutSize.width : parseInt( xValue, 10 ); + var y = yValue.indexOf('%') != -1 ? + ( parseFloat( yValue ) / 100 ) * layoutSize.height : parseInt( yValue, 10 ); + + // clean up 'auto' or other non-integer values + x = isNaN( x ) ? 0 : x; + y = isNaN( y ) ? 0 : y; + // remove padding from measurement + x -= isOriginLeft ? layoutSize.paddingLeft : layoutSize.paddingRight; + y -= isOriginTop ? layoutSize.paddingTop : layoutSize.paddingBottom; + + this.position.x = x; + this.position.y = y; +}; + +// set settled position, apply padding +proto.layoutPosition = function() { + var layoutSize = this.layout.size; + var style = {}; + var isOriginLeft = this.layout._getOption('originLeft'); + var isOriginTop = this.layout._getOption('originTop'); + + // x + var xPadding = isOriginLeft ? 'paddingLeft' : 'paddingRight'; + var xProperty = isOriginLeft ? 'left' : 'right'; + var xResetProperty = isOriginLeft ? 'right' : 'left'; + + var x = this.position.x + layoutSize[ xPadding ]; + // set in percentage or pixels + style[ xProperty ] = this.getXValue( x ); + // reset other property + style[ xResetProperty ] = ''; + + // y + var yPadding = isOriginTop ? 'paddingTop' : 'paddingBottom'; + var yProperty = isOriginTop ? 'top' : 'bottom'; + var yResetProperty = isOriginTop ? 'bottom' : 'top'; + + var y = this.position.y + layoutSize[ yPadding ]; + // set in percentage or pixels + style[ yProperty ] = this.getYValue( y ); + // reset other property + style[ yResetProperty ] = ''; + + this.css( style ); + this.emitEvent( 'layout', [ this ] ); +}; + +proto.getXValue = function( x ) { + var isHorizontal = this.layout._getOption('horizontal'); + return this.layout.options.percentPosition && !isHorizontal ? + ( ( x / this.layout.size.width ) * 100 ) + '%' : x + 'px'; +}; + +proto.getYValue = function( y ) { + var isHorizontal = this.layout._getOption('horizontal'); + return this.layout.options.percentPosition && isHorizontal ? + ( ( y / this.layout.size.height ) * 100 ) + '%' : y + 'px'; +}; + +proto._transitionTo = function( x, y ) { + this.getPosition(); + // get current x & y from top/left + var curX = this.position.x; + var curY = this.position.y; + + var compareX = parseInt( x, 10 ); + var compareY = parseInt( y, 10 ); + var didNotMove = compareX === this.position.x && compareY === this.position.y; + + // save end position + this.setPosition( x, y ); + + // if did not move and not transitioning, just go to layout + if ( didNotMove && !this.isTransitioning ) { + this.layoutPosition(); + return; + } + + var transX = x - curX; + var transY = y - curY; + var transitionStyle = {}; + transitionStyle.transform = this.getTranslate( transX, transY ); + + this.transition({ + to: transitionStyle, + onTransitionEnd: { + transform: this.layoutPosition + }, + isCleaning: true + }); +}; + +proto.getTranslate = function( x, y ) { + // flip cooridinates if origin on right or bottom + var isOriginLeft = this.layout._getOption('originLeft'); + var isOriginTop = this.layout._getOption('originTop'); + x = isOriginLeft ? x : -x; + y = isOriginTop ? y : -y; + return 'translate3d(' + x + 'px, ' + y + 'px, 0)'; +}; + +// non transition + transform support +proto.goTo = function( x, y ) { + this.setPosition( x, y ); + this.layoutPosition(); +}; + +proto.moveTo = proto._transitionTo; + +proto.setPosition = function( x, y ) { + this.position.x = parseInt( x, 10 ); + this.position.y = parseInt( y, 10 ); +}; + +// ----- transition ----- // + +/** + * @param {Object} style - CSS + * @param {Function} onTransitionEnd + */ + +// non transition, just trigger callback +proto._nonTransition = function( args ) { + this.css( args.to ); + if ( args.isCleaning ) { + this._removeStyles( args.to ); + } + for ( var prop in args.onTransitionEnd ) { + args.onTransitionEnd[ prop ].call( this ); + } +}; + +/** + * proper transition + * @param {Object} args - arguments + * @param {Object} to - style to transition to + * @param {Object} from - style to start transition from + * @param {Boolean} isCleaning - removes transition styles after transition + * @param {Function} onTransitionEnd - callback + */ +proto.transition = function( args ) { + // redirect to nonTransition if no transition duration + if ( !parseFloat( this.layout.options.transitionDuration ) ) { + this._nonTransition( args ); + return; + } + + var _transition = this._transn; + // keep track of onTransitionEnd callback by css property + for ( var prop in args.onTransitionEnd ) { + _transition.onEnd[ prop ] = args.onTransitionEnd[ prop ]; + } + // keep track of properties that are transitioning + for ( prop in args.to ) { + _transition.ingProperties[ prop ] = true; + // keep track of properties to clean up when transition is done + if ( args.isCleaning ) { + _transition.clean[ prop ] = true; + } + } + + // set from styles + if ( args.from ) { + this.css( args.from ); + // force redraw. http://blog.alexmaccaw.com/css-transitions + var h = this.element.offsetHeight; + // hack for JSHint to hush about unused var + h = null; + } + // enable transition + this.enableTransition( args.to ); + // set styles that are transitioning + this.css( args.to ); + + this.isTransitioning = true; + +}; + +// dash before all cap letters, including first for +// WebkitTransform => -webkit-transform +function toDashedAll( str ) { + return str.replace( /([A-Z])/g, function( $1 ) { + return '-' + $1.toLowerCase(); + }); +} + +var transitionProps = 'opacity,' + toDashedAll( transformProperty ); + +proto.enableTransition = function(/* style */) { + // HACK changing transitionProperty during a transition + // will cause transition to jump + if ( this.isTransitioning ) { + return; + } + + // make `transition: foo, bar, baz` from style object + // HACK un-comment this when enableTransition can work + // while a transition is happening + // var transitionValues = []; + // for ( var prop in style ) { + // // dash-ify camelCased properties like WebkitTransition + // prop = vendorProperties[ prop ] || prop; + // transitionValues.push( toDashedAll( prop ) ); + // } + // munge number to millisecond, to match stagger + var duration = this.layout.options.transitionDuration; + duration = typeof duration == 'number' ? duration + 'ms' : duration; + // enable transition styles + this.css({ + transitionProperty: transitionProps, + transitionDuration: duration, + transitionDelay: this.staggerDelay || 0 + }); + // listen for transition end event + this.element.addEventListener( transitionEndEvent, this, false ); +}; + +// ----- events ----- // + +proto.onwebkitTransitionEnd = function( event ) { + this.ontransitionend( event ); +}; + +proto.onotransitionend = function( event ) { + this.ontransitionend( event ); +}; + +// properties that I munge to make my life easier +var dashedVendorProperties = { + '-webkit-transform': 'transform' +}; + +proto.ontransitionend = function( event ) { + // disregard bubbled events from children + if ( event.target !== this.element ) { + return; + } + var _transition = this._transn; + // get property name of transitioned property, convert to prefix-free + var propertyName = dashedVendorProperties[ event.propertyName ] || event.propertyName; + + // remove property that has completed transitioning + delete _transition.ingProperties[ propertyName ]; + // check if any properties are still transitioning + if ( isEmptyObj( _transition.ingProperties ) ) { + // all properties have completed transitioning + this.disableTransition(); + } + // clean style + if ( propertyName in _transition.clean ) { + // clean up style + this.element.style[ event.propertyName ] = ''; + delete _transition.clean[ propertyName ]; + } + // trigger onTransitionEnd callback + if ( propertyName in _transition.onEnd ) { + var onTransitionEnd = _transition.onEnd[ propertyName ]; + onTransitionEnd.call( this ); + delete _transition.onEnd[ propertyName ]; + } + + this.emitEvent( 'transitionEnd', [ this ] ); +}; + +proto.disableTransition = function() { + this.removeTransitionStyles(); + this.element.removeEventListener( transitionEndEvent, this, false ); + this.isTransitioning = false; +}; + +/** + * removes style property from element + * @param {Object} style +**/ +proto._removeStyles = function( style ) { + // clean up transition styles + var cleanStyle = {}; + for ( var prop in style ) { + cleanStyle[ prop ] = ''; + } + this.css( cleanStyle ); +}; + +var cleanTransitionStyle = { + transitionProperty: '', + transitionDuration: '', + transitionDelay: '' +}; + +proto.removeTransitionStyles = function() { + // remove transition + this.css( cleanTransitionStyle ); +}; + +// ----- stagger ----- // + +proto.stagger = function( delay ) { + delay = isNaN( delay ) ? 0 : delay; + this.staggerDelay = delay + 'ms'; +}; + +// ----- show/hide/remove ----- // + +// remove element from DOM +proto.removeElem = function() { + this.element.parentNode.removeChild( this.element ); + // remove display: none + this.css({ display: '' }); + this.emitEvent( 'remove', [ this ] ); +}; + +proto.remove = function() { + // just remove element if no transition support or no transition + if ( !transitionProperty || !parseFloat( this.layout.options.transitionDuration ) ) { + this.removeElem(); + return; + } + + // start transition + this.once( 'transitionEnd', function() { + this.removeElem(); + }); + this.hide(); +}; + +proto.reveal = function() { + delete this.isHidden; + // remove display: none + this.css({ display: '' }); + + var options = this.layout.options; + + var onTransitionEnd = {}; + var transitionEndProperty = this.getHideRevealTransitionEndProperty('visibleStyle'); + onTransitionEnd[ transitionEndProperty ] = this.onRevealTransitionEnd; + + this.transition({ + from: options.hiddenStyle, + to: options.visibleStyle, + isCleaning: true, + onTransitionEnd: onTransitionEnd + }); +}; + +proto.onRevealTransitionEnd = function() { + // check if still visible + // during transition, item may have been hidden + if ( !this.isHidden ) { + this.emitEvent('reveal'); + } +}; + +/** + * get style property use for hide/reveal transition end + * @param {String} styleProperty - hiddenStyle/visibleStyle + * @returns {String} + */ +proto.getHideRevealTransitionEndProperty = function( styleProperty ) { + var optionStyle = this.layout.options[ styleProperty ]; + // use opacity + if ( optionStyle.opacity ) { + return 'opacity'; + } + // get first property + for ( var prop in optionStyle ) { + return prop; + } +}; + +proto.hide = function() { + // set flag + this.isHidden = true; + // remove display: none + this.css({ display: '' }); + + var options = this.layout.options; + + var onTransitionEnd = {}; + var transitionEndProperty = this.getHideRevealTransitionEndProperty('hiddenStyle'); + onTransitionEnd[ transitionEndProperty ] = this.onHideTransitionEnd; + + this.transition({ + from: options.visibleStyle, + to: options.hiddenStyle, + // keep hidden stuff hidden + isCleaning: true, + onTransitionEnd: onTransitionEnd + }); +}; + +proto.onHideTransitionEnd = function() { + // check if still hidden + // during transition, item may have been un-hidden + if ( this.isHidden ) { + this.css({ display: 'none' }); + this.emitEvent('hide'); + } +}; + +proto.destroy = function() { + this.css({ + position: '', + left: '', + right: '', + top: '', + bottom: '', + transition: '', + transform: '' + }); +}; + +return Item; + +})); + +/*! + * Outlayer v2.1.0 + * the brains and guts of a layout library + * MIT license + */ + +( function( window, factory ) { + 'use strict'; + // universal module definition + /* jshint strict: false */ /* globals define, module, require */ + if ( typeof define == 'function' && define.amd ) { + // AMD - RequireJS + define( 'outlayer/outlayer',[ + 'ev-emitter/ev-emitter', + 'get-size/get-size', + 'fizzy-ui-utils/utils', + './item' + ], + function( EvEmitter, getSize, utils, Item ) { + return factory( window, EvEmitter, getSize, utils, Item); + } + ); + } else if ( typeof module == 'object' && module.exports ) { + // CommonJS - Browserify, Webpack + module.exports = factory( + window, + require('ev-emitter'), + require('get-size'), + require('fizzy-ui-utils'), + require('./item') + ); + } else { + // browser global + window.Outlayer = factory( + window, + window.EvEmitter, + window.getSize, + window.fizzyUIUtils, + window.Outlayer.Item + ); + } + +}( window, function factory( window, EvEmitter, getSize, utils, Item ) { +'use strict'; + +// ----- vars ----- // + +var console = window.console; +var jQuery = window.jQuery; +var noop = function() {}; + +// -------------------------- Outlayer -------------------------- // + +// globally unique identifiers +var GUID = 0; +// internal store of all Outlayer intances +var instances = {}; + + +/** + * @param {Element, String} element + * @param {Object} options + * @constructor + */ +function Outlayer( element, options ) { + var queryElement = utils.getQueryElement( element ); + if ( !queryElement ) { + if ( console ) { + console.error( 'Bad element for ' + this.constructor.namespace + + ': ' + ( queryElement || element ) ); + } + return; + } + this.element = queryElement; + // add jQuery + if ( jQuery ) { + this.$element = jQuery( this.element ); + } + + // options + this.options = utils.extend( {}, this.constructor.defaults ); + this.option( options ); + + // add id for Outlayer.getFromElement + var id = ++GUID; + this.element.outlayerGUID = id; // expando + instances[ id ] = this; // associate via id + + // kick it off + this._create(); + + var isInitLayout = this._getOption('initLayout'); + if ( isInitLayout ) { + this.layout(); + } +} + +// settings are for internal use only +Outlayer.namespace = 'outlayer'; +Outlayer.Item = Item; + +// default options +Outlayer.defaults = { + containerStyle: { + position: 'relative' + }, + initLayout: true, + originLeft: true, + originTop: true, + resize: true, + resizeContainer: true, + // item options + transitionDuration: '0.4s', + hiddenStyle: { + opacity: 0, + transform: 'scale(0.001)' + }, + visibleStyle: { + opacity: 1, + transform: 'scale(1)' + } +}; + +var proto = Outlayer.prototype; +// inherit EvEmitter +utils.extend( proto, EvEmitter.prototype ); + +/** + * set options + * @param {Object} opts + */ +proto.option = function( opts ) { + utils.extend( this.options, opts ); +}; + +/** + * get backwards compatible option value, check old name + */ +proto._getOption = function( option ) { + var oldOption = this.constructor.compatOptions[ option ]; + return oldOption && this.options[ oldOption ] !== undefined ? + this.options[ oldOption ] : this.options[ option ]; +}; + +Outlayer.compatOptions = { + // currentName: oldName + initLayout: 'isInitLayout', + horizontal: 'isHorizontal', + layoutInstant: 'isLayoutInstant', + originLeft: 'isOriginLeft', + originTop: 'isOriginTop', + resize: 'isResizeBound', + resizeContainer: 'isResizingContainer' +}; + +proto._create = function() { + // get items from children + this.reloadItems(); + // elements that affect layout, but are not laid out + this.stamps = []; + this.stamp( this.options.stamp ); + // set container style + utils.extend( this.element.style, this.options.containerStyle ); + + // bind resize method + var canBindResize = this._getOption('resize'); + if ( canBindResize ) { + this.bindResize(); + } +}; + +// goes through all children again and gets bricks in proper order +proto.reloadItems = function() { + // collection of item elements + this.items = this._itemize( this.element.children ); +}; + + +/** + * turn elements into Outlayer.Items to be used in layout + * @param {Array or NodeList or HTMLElement} elems + * @returns {Array} items - collection of new Outlayer Items + */ +proto._itemize = function( elems ) { + + var itemElems = this._filterFindItemElements( elems ); + var Item = this.constructor.Item; + + // create new Outlayer Items for collection + var items = []; + for ( var i=0; i < itemElems.length; i++ ) { + var elem = itemElems[i]; + var item = new Item( elem, this ); + items.push( item ); + } + + return items; +}; + +/** + * get item elements to be used in layout + * @param {Array or NodeList or HTMLElement} elems + * @returns {Array} items - item elements + */ +proto._filterFindItemElements = function( elems ) { + return utils.filterFindElements( elems, this.options.itemSelector ); +}; + +/** + * getter method for getting item elements + * @returns {Array} elems - collection of item elements + */ +proto.getItemElements = function() { + return this.items.map( function( item ) { + return item.element; + }); +}; + +// ----- init & layout ----- // + +/** + * lays out all items + */ +proto.layout = function() { + this._resetLayout(); + this._manageStamps(); + + // don't animate first layout + var layoutInstant = this._getOption('layoutInstant'); + var isInstant = layoutInstant !== undefined ? + layoutInstant : !this._isLayoutInited; + this.layoutItems( this.items, isInstant ); + + // flag for initalized + this._isLayoutInited = true; +}; + +// _init is alias for layout +proto._init = proto.layout; + +/** + * logic before any new layout + */ +proto._resetLayout = function() { + this.getSize(); +}; + + +proto.getSize = function() { + this.size = getSize( this.element ); +}; + +/** + * get measurement from option, for columnWidth, rowHeight, gutter + * if option is String -> get element from selector string, & get size of element + * if option is Element -> get size of element + * else use option as a number + * + * @param {String} measurement + * @param {String} size - width or height + * @private + */ +proto._getMeasurement = function( measurement, size ) { + var option = this.options[ measurement ]; + var elem; + if ( !option ) { + // default to 0 + this[ measurement ] = 0; + } else { + // use option as an element + if ( typeof option == 'string' ) { + elem = this.element.querySelector( option ); + } else if ( option instanceof HTMLElement ) { + elem = option; + } + // use size of element, if element + this[ measurement ] = elem ? getSize( elem )[ size ] : option; + } +}; + +/** + * layout a collection of item elements + * @api public + */ +proto.layoutItems = function( items, isInstant ) { + items = this._getItemsForLayout( items ); + + this._layoutItems( items, isInstant ); + + this._postLayout(); +}; + +/** + * get the items to be laid out + * you may want to skip over some items + * @param {Array} items + * @returns {Array} items + */ +proto._getItemsForLayout = function( items ) { + return items.filter( function( item ) { + return !item.isIgnored; + }); +}; + +/** + * layout items + * @param {Array} items + * @param {Boolean} isInstant + */ +proto._layoutItems = function( items, isInstant ) { + this._emitCompleteOnItems( 'layout', items ); + + if ( !items || !items.length ) { + // no items, emit event with empty array + return; + } + + var queue = []; + + items.forEach( function( item ) { + // get x/y object from method + var position = this._getItemLayoutPosition( item ); + // enqueue + position.item = item; + position.isInstant = isInstant || item.isLayoutInstant; + queue.push( position ); + }, this ); + + this._processLayoutQueue( queue ); +}; + +/** + * get item layout position + * @param {Outlayer.Item} item + * @returns {Object} x and y position + */ +proto._getItemLayoutPosition = function( /* item */ ) { + return { + x: 0, + y: 0 + }; +}; + +/** + * iterate over array and position each item + * Reason being - separating this logic prevents 'layout invalidation' + * thx @paul_irish + * @param {Array} queue + */ +proto._processLayoutQueue = function( queue ) { + this.updateStagger(); + queue.forEach( function( obj, i ) { + this._positionItem( obj.item, obj.x, obj.y, obj.isInstant, i ); + }, this ); +}; + +// set stagger from option in milliseconds number +proto.updateStagger = function() { + var stagger = this.options.stagger; + if ( stagger === null || stagger === undefined ) { + this.stagger = 0; + return; + } + this.stagger = getMilliseconds( stagger ); + return this.stagger; +}; + +/** + * Sets position of item in DOM + * @param {Outlayer.Item} item + * @param {Number} x - horizontal position + * @param {Number} y - vertical position + * @param {Boolean} isInstant - disables transitions + */ +proto._positionItem = function( item, x, y, isInstant, i ) { + if ( isInstant ) { + // if not transition, just set CSS + item.goTo( x, y ); + } else { + item.stagger( i * this.stagger ); + item.moveTo( x, y ); + } +}; + +/** + * Any logic you want to do after each layout, + * i.e. size the container + */ +proto._postLayout = function() { + this.resizeContainer(); +}; + +proto.resizeContainer = function() { + var isResizingContainer = this._getOption('resizeContainer'); + if ( !isResizingContainer ) { + return; + } + var size = this._getContainerSize(); + if ( size ) { + this._setContainerMeasure( size.width, true ); + this._setContainerMeasure( size.height, false ); + } +}; + +/** + * Sets width or height of container if returned + * @returns {Object} size + * @param {Number} width + * @param {Number} height + */ +proto._getContainerSize = noop; + +/** + * @param {Number} measure - size of width or height + * @param {Boolean} isWidth + */ +proto._setContainerMeasure = function( measure, isWidth ) { + if ( measure === undefined ) { + return; + } + + var elemSize = this.size; + // add padding and border width if border box + if ( elemSize.isBorderBox ) { + measure += isWidth ? elemSize.paddingLeft + elemSize.paddingRight + + elemSize.borderLeftWidth + elemSize.borderRightWidth : + elemSize.paddingBottom + elemSize.paddingTop + + elemSize.borderTopWidth + elemSize.borderBottomWidth; + } + + measure = Math.max( measure, 0 ); + this.element.style[ isWidth ? 'width' : 'height' ] = measure + 'px'; +}; + +/** + * emit eventComplete on a collection of items events + * @param {String} eventName + * @param {Array} items - Outlayer.Items + */ +proto._emitCompleteOnItems = function( eventName, items ) { + var _this = this; + function onComplete() { + _this.dispatchEvent( eventName + 'Complete', null, [ items ] ); + } + + var count = items.length; + if ( !items || !count ) { + onComplete(); + return; + } + + var doneCount = 0; + function tick() { + doneCount++; + if ( doneCount == count ) { + onComplete(); + } + } + + // bind callback + items.forEach( function( item ) { + item.once( eventName, tick ); + }); +}; + +/** + * emits events via EvEmitter and jQuery events + * @param {String} type - name of event + * @param {Event} event - original event + * @param {Array} args - extra arguments + */ +proto.dispatchEvent = function( type, event, args ) { + // add original event to arguments + var emitArgs = event ? [ event ].concat( args ) : args; + this.emitEvent( type, emitArgs ); + + if ( jQuery ) { + // set this.$element + this.$element = this.$element || jQuery( this.element ); + if ( event ) { + // create jQuery event + var $event = jQuery.Event( event ); + $event.type = type; + this.$element.trigger( $event, args ); + } else { + // just trigger with type if no event available + this.$element.trigger( type, args ); + } + } +}; + +// -------------------------- ignore & stamps -------------------------- // + + +/** + * keep item in collection, but do not lay it out + * ignored items do not get skipped in layout + * @param {Element} elem + */ +proto.ignore = function( elem ) { + var item = this.getItem( elem ); + if ( item ) { + item.isIgnored = true; + } +}; + +/** + * return item to layout collection + * @param {Element} elem + */ +proto.unignore = function( elem ) { + var item = this.getItem( elem ); + if ( item ) { + delete item.isIgnored; + } +}; + +/** + * adds elements to stamps + * @param {NodeList, Array, Element, or String} elems + */ +proto.stamp = function( elems ) { + elems = this._find( elems ); + if ( !elems ) { + return; + } + + this.stamps = this.stamps.concat( elems ); + // ignore + elems.forEach( this.ignore, this ); +}; + +/** + * removes elements to stamps + * @param {NodeList, Array, or Element} elems + */ +proto.unstamp = function( elems ) { + elems = this._find( elems ); + if ( !elems ){ + return; + } + + elems.forEach( function( elem ) { + // filter out removed stamp elements + utils.removeFrom( this.stamps, elem ); + this.unignore( elem ); + }, this ); +}; + +/** + * finds child elements + * @param {NodeList, Array, Element, or String} elems + * @returns {Array} elems + */ +proto._find = function( elems ) { + if ( !elems ) { + return; + } + // if string, use argument as selector string + if ( typeof elems == 'string' ) { + elems = this.element.querySelectorAll( elems ); + } + elems = utils.makeArray( elems ); + return elems; +}; + +proto._manageStamps = function() { + if ( !this.stamps || !this.stamps.length ) { + return; + } + + this._getBoundingRect(); + + this.stamps.forEach( this._manageStamp, this ); +}; + +// update boundingLeft / Top +proto._getBoundingRect = function() { + // get bounding rect for container element + var boundingRect = this.element.getBoundingClientRect(); + var size = this.size; + this._boundingRect = { + left: boundingRect.left + size.paddingLeft + size.borderLeftWidth, + top: boundingRect.top + size.paddingTop + size.borderTopWidth, + right: boundingRect.right - ( size.paddingRight + size.borderRightWidth ), + bottom: boundingRect.bottom - ( size.paddingBottom + size.borderBottomWidth ) + }; +}; + +/** + * @param {Element} stamp +**/ +proto._manageStamp = noop; + +/** + * get x/y position of element relative to container element + * @param {Element} elem + * @returns {Object} offset - has left, top, right, bottom + */ +proto._getElementOffset = function( elem ) { + var boundingRect = elem.getBoundingClientRect(); + var thisRect = this._boundingRect; + var size = getSize( elem ); + var offset = { + left: boundingRect.left - thisRect.left - size.marginLeft, + top: boundingRect.top - thisRect.top - size.marginTop, + right: thisRect.right - boundingRect.right - size.marginRight, + bottom: thisRect.bottom - boundingRect.bottom - size.marginBottom + }; + return offset; +}; + +// -------------------------- resize -------------------------- // + +// enable event handlers for listeners +// i.e. resize -> onresize +proto.handleEvent = utils.handleEvent; + +/** + * Bind layout to window resizing + */ +proto.bindResize = function() { + window.addEventListener( 'resize', this ); + this.isResizeBound = true; +}; + +/** + * Unbind layout to window resizing + */ +proto.unbindResize = function() { + window.removeEventListener( 'resize', this ); + this.isResizeBound = false; +}; + +proto.onresize = function() { + this.resize(); +}; + +utils.debounceMethod( Outlayer, 'onresize', 100 ); + +proto.resize = function() { + // don't trigger if size did not change + // or if resize was unbound. See #9 + if ( !this.isResizeBound || !this.needsResizeLayout() ) { + return; + } + + this.layout(); +}; + +/** + * check if layout is needed post layout + * @returns Boolean + */ +proto.needsResizeLayout = function() { + var size = getSize( this.element ); + // check that this.size and size are there + // IE8 triggers resize on body size change, so they might not be + var hasSizes = this.size && size; + return hasSizes && size.innerWidth !== this.size.innerWidth; +}; + +// -------------------------- methods -------------------------- // + +/** + * add items to Outlayer instance + * @param {Array or NodeList or Element} elems + * @returns {Array} items - Outlayer.Items +**/ +proto.addItems = function( elems ) { + var items = this._itemize( elems ); + // add items to collection + if ( items.length ) { + this.items = this.items.concat( items ); + } + return items; +}; + +/** + * Layout newly-appended item elements + * @param {Array or NodeList or Element} elems + */ +proto.appended = function( elems ) { + var items = this.addItems( elems ); + if ( !items.length ) { + return; + } + // layout and reveal just the new items + this.layoutItems( items, true ); + this.reveal( items ); +}; + +/** + * Layout prepended elements + * @param {Array or NodeList or Element} elems + */ +proto.prepended = function( elems ) { + var items = this._itemize( elems ); + if ( !items.length ) { + return; + } + // add items to beginning of collection + var previousItems = this.items.slice(0); + this.items = items.concat( previousItems ); + // start new layout + this._resetLayout(); + this._manageStamps(); + // layout new stuff without transition + this.layoutItems( items, true ); + this.reveal( items ); + // layout previous items + this.layoutItems( previousItems ); +}; + +/** + * reveal a collection of items + * @param {Array of Outlayer.Items} items + */ +proto.reveal = function( items ) { + this._emitCompleteOnItems( 'reveal', items ); + if ( !items || !items.length ) { + return; + } + var stagger = this.updateStagger(); + items.forEach( function( item, i ) { + item.stagger( i * stagger ); + item.reveal(); + }); +}; + +/** + * hide a collection of items + * @param {Array of Outlayer.Items} items + */ +proto.hide = function( items ) { + this._emitCompleteOnItems( 'hide', items ); + if ( !items || !items.length ) { + return; + } + var stagger = this.updateStagger(); + items.forEach( function( item, i ) { + item.stagger( i * stagger ); + item.hide(); + }); +}; + +/** + * reveal item elements + * @param {Array}, {Element}, {NodeList} items + */ +proto.revealItemElements = function( elems ) { + var items = this.getItems( elems ); + this.reveal( items ); +}; + +/** + * hide item elements + * @param {Array}, {Element}, {NodeList} items + */ +proto.hideItemElements = function( elems ) { + var items = this.getItems( elems ); + this.hide( items ); +}; + +/** + * get Outlayer.Item, given an Element + * @param {Element} elem + * @param {Function} callback + * @returns {Outlayer.Item} item + */ +proto.getItem = function( elem ) { + // loop through items to get the one that matches + for ( var i=0; i < this.items.length; i++ ) { + var item = this.items[i]; + if ( item.element == elem ) { + // return item + return item; + } + } +}; + +/** + * get collection of Outlayer.Items, given Elements + * @param {Array} elems + * @returns {Array} items - Outlayer.Items + */ +proto.getItems = function( elems ) { + elems = utils.makeArray( elems ); + var items = []; + elems.forEach( function( elem ) { + var item = this.getItem( elem ); + if ( item ) { + items.push( item ); + } + }, this ); + + return items; +}; + +/** + * remove element(s) from instance and DOM + * @param {Array or NodeList or Element} elems + */ +proto.remove = function( elems ) { + var removeItems = this.getItems( elems ); + + this._emitCompleteOnItems( 'remove', removeItems ); + + // bail if no items to remove + if ( !removeItems || !removeItems.length ) { + return; + } + + removeItems.forEach( function( item ) { + item.remove(); + // remove item from collection + utils.removeFrom( this.items, item ); + }, this ); +}; + +// ----- destroy ----- // + +// remove and disable Outlayer instance +proto.destroy = function() { + // clean up dynamic styles + var style = this.element.style; + style.height = ''; + style.position = ''; + style.width = ''; + // destroy items + this.items.forEach( function( item ) { + item.destroy(); + }); + + this.unbindResize(); + + var id = this.element.outlayerGUID; + delete instances[ id ]; // remove reference to instance by id + delete this.element.outlayerGUID; + // remove data for jQuery + if ( jQuery ) { + jQuery.removeData( this.element, this.constructor.namespace ); + } + +}; + +// -------------------------- data -------------------------- // + +/** + * get Outlayer instance from element + * @param {Element} elem + * @returns {Outlayer} + */ +Outlayer.data = function( elem ) { + elem = utils.getQueryElement( elem ); + var id = elem && elem.outlayerGUID; + return id && instances[ id ]; +}; + + +// -------------------------- create Outlayer class -------------------------- // + +/** + * create a layout class + * @param {String} namespace + */ +Outlayer.create = function( namespace, options ) { + // sub-class Outlayer + var Layout = subclass( Outlayer ); + // apply new options and compatOptions + Layout.defaults = utils.extend( {}, Outlayer.defaults ); + utils.extend( Layout.defaults, options ); + Layout.compatOptions = utils.extend( {}, Outlayer.compatOptions ); + + Layout.namespace = namespace; + + Layout.data = Outlayer.data; + + // sub-class Item + Layout.Item = subclass( Item ); + + // -------------------------- declarative -------------------------- // + + utils.htmlInit( Layout, namespace ); + + // -------------------------- jQuery bridge -------------------------- // + + // make into jQuery plugin + if ( jQuery && jQuery.bridget ) { + jQuery.bridget( namespace, Layout ); + } + + return Layout; +}; + +function subclass( Parent ) { + function SubClass() { + Parent.apply( this, arguments ); + } + + SubClass.prototype = Object.create( Parent.prototype ); + SubClass.prototype.constructor = SubClass; + + return SubClass; +} + +// ----- helpers ----- // + +// how many milliseconds are in each unit +var msUnits = { + ms: 1, + s: 1000 +}; + +// munge time-like parameter into millisecond number +// '0.4s' -> 40 +function getMilliseconds( time ) { + if ( typeof time == 'number' ) { + return time; + } + var matches = time.match( /(^\d*\.?\d*)(\w*)/ ); + var num = matches && matches[1]; + var unit = matches && matches[2]; + if ( !num.length ) { + return 0; + } + num = parseFloat( num ); + var mult = msUnits[ unit ] || 1; + return num * mult; +} + +// ----- fin ----- // + +// back in global +Outlayer.Item = Item; + +return Outlayer; + +})); + +/*! + * Masonry v4.2.1 + * Cascading grid layout library + * https://masonry.desandro.com + * MIT License + * by David DeSandro + */ + +( function( window, factory ) { + // universal module definition + /* jshint strict: false */ /*globals define, module, require */ + if ( typeof define == 'function' && define.amd ) { + // AMD + define( [ + 'outlayer/outlayer', + 'get-size/get-size' + ], + factory ); + } else if ( typeof module == 'object' && module.exports ) { + // CommonJS + module.exports = factory( + require('outlayer'), + require('get-size') + ); + } else { + // browser global + window.Masonry = factory( + window.Outlayer, + window.getSize + ); + } + +}( window, function factory( Outlayer, getSize ) { + + + +// -------------------------- masonryDefinition -------------------------- // + + // create an Outlayer layout class + var Masonry = Outlayer.create('masonry'); + // isFitWidth -> fitWidth + Masonry.compatOptions.fitWidth = 'isFitWidth'; + + var proto = Masonry.prototype; + + proto._resetLayout = function() { + this.getSize(); + this._getMeasurement( 'columnWidth', 'outerWidth' ); + this._getMeasurement( 'gutter', 'outerWidth' ); + this.measureColumns(); + + // reset column Y + this.colYs = []; + for ( var i=0; i < this.cols; i++ ) { + this.colYs.push( 0 ); + } + + this.maxY = 0; + this.horizontalColIndex = 0; + }; + + proto.measureColumns = function() { + this.getContainerWidth(); + // if columnWidth is 0, default to outerWidth of first item + if ( !this.columnWidth ) { + var firstItem = this.items[0]; + var firstItemElem = firstItem && firstItem.element; + // columnWidth fall back to item of first element + this.columnWidth = firstItemElem && getSize( firstItemElem ).outerWidth || + // if first elem has no width, default to size of container + this.containerWidth; + } + + var columnWidth = this.columnWidth += this.gutter; + + // calculate columns + var containerWidth = this.containerWidth + this.gutter; + var cols = containerWidth / columnWidth; + // fix rounding errors, typically with gutters + var excess = columnWidth - containerWidth % columnWidth; + // if overshoot is less than a pixel, round up, otherwise floor it + var mathMethod = excess && excess < 1 ? 'round' : 'floor'; + cols = Math[ mathMethod ]( cols ); + this.cols = Math.max( cols, 1 ); + }; + + proto.getContainerWidth = function() { + // container is parent if fit width + var isFitWidth = this._getOption('fitWidth'); + var container = isFitWidth ? this.element.parentNode : this.element; + // check that this.size and size are there + // IE8 triggers resize on body size change, so they might not be + var size = getSize( container ); + this.containerWidth = size && size.innerWidth; + }; + + proto._getItemLayoutPosition = function( item ) { + item.getSize(); + // how many columns does this brick span + var remainder = item.size.outerWidth % this.columnWidth; + var mathMethod = remainder && remainder < 1 ? 'round' : 'ceil'; + // round if off by 1 pixel, otherwise use ceil + var colSpan = Math[ mathMethod ]( item.size.outerWidth / this.columnWidth ); + colSpan = Math.min( colSpan, this.cols ); + // use horizontal or top column position + var colPosMethod = this.options.horizontalOrder ? + '_getHorizontalColPosition' : '_getTopColPosition'; + var colPosition = this[ colPosMethod ]( colSpan, item ); + // position the brick + var position = { + x: this.columnWidth * colPosition.col, + y: colPosition.y + }; + // apply setHeight to necessary columns + var setHeight = colPosition.y + item.size.outerHeight; + var setMax = colSpan + colPosition.col; + for ( var i = colPosition.col; i < setMax; i++ ) { + this.colYs[i] = setHeight; + } + + return position; + }; + + proto._getTopColPosition = function( colSpan ) { + var colGroup = this._getTopColGroup( colSpan ); + // get the minimum Y value from the columns + var minimumY = Math.min.apply( Math, colGroup ); + + return { + col: colGroup.indexOf( minimumY ), + y: minimumY, + }; + }; + + /** + * @param {Number} colSpan - number of columns the element spans + * @returns {Array} colGroup + */ + proto._getTopColGroup = function( colSpan ) { + if ( colSpan < 2 ) { + // if brick spans only one column, use all the column Ys + return this.colYs; + } + + var colGroup = []; + // how many different places could this brick fit horizontally + var groupCount = this.cols + 1 - colSpan; + // for each group potential horizontal position + for ( var i = 0; i < groupCount; i++ ) { + colGroup[i] = this._getColGroupY( i, colSpan ); + } + return colGroup; + }; + + proto._getColGroupY = function( col, colSpan ) { + if ( colSpan < 2 ) { + return this.colYs[ col ]; + } + // make an array of colY values for that one group + var groupColYs = this.colYs.slice( col, col + colSpan ); + // and get the max value of the array + return Math.max.apply( Math, groupColYs ); + }; + + // get column position based on horizontal index. #873 + proto._getHorizontalColPosition = function( colSpan, item ) { + var col = this.horizontalColIndex % this.cols; + var isOver = colSpan > 1 && col + colSpan > this.cols; + // shift to next row if item can't fit on current row + col = isOver ? 0 : col; + // don't let zero-size items take up space + var hasSize = item.size.outerWidth && item.size.outerHeight; + this.horizontalColIndex = hasSize ? col + colSpan : this.horizontalColIndex; + + return { + col: col, + y: this._getColGroupY( col, colSpan ), + }; + }; + + proto._manageStamp = function( stamp ) { + var stampSize = getSize( stamp ); + var offset = this._getElementOffset( stamp ); + // get the columns that this stamp affects + var isOriginLeft = this._getOption('originLeft'); + var firstX = isOriginLeft ? offset.left : offset.right; + var lastX = firstX + stampSize.outerWidth; + var firstCol = Math.floor( firstX / this.columnWidth ); + firstCol = Math.max( 0, firstCol ); + var lastCol = Math.floor( lastX / this.columnWidth ); + // lastCol should not go over if multiple of columnWidth #425 + lastCol -= lastX % this.columnWidth ? 0 : 1; + lastCol = Math.min( this.cols - 1, lastCol ); + // set colYs to bottom of the stamp + + var isOriginTop = this._getOption('originTop'); + var stampMaxY = ( isOriginTop ? offset.top : offset.bottom ) + + stampSize.outerHeight; + for ( var i = firstCol; i <= lastCol; i++ ) { + this.colYs[i] = Math.max( stampMaxY, this.colYs[i] ); + } + }; + + proto._getContainerSize = function() { + this.maxY = Math.max.apply( Math, this.colYs ); + var size = { + height: this.maxY + }; + + if ( this._getOption('fitWidth') ) { + size.width = this._getContainerFitWidth(); + } + + return size; + }; + + proto._getContainerFitWidth = function() { + var unusedCols = 0; + // count unused columns + var i = this.cols; + while ( --i ) { + if ( this.colYs[i] !== 0 ) { + break; + } + unusedCols++; + } + // fit container to columns that have been used + return ( this.cols - unusedCols ) * this.columnWidth - this.gutter; + }; + + proto.needsResizeLayout = function() { + var previousWidth = this.containerWidth; + this.getContainerWidth(); + return previousWidth != this.containerWidth; + }; + + return Masonry; + +})); + diff --git a/assets/library/masonry/masonry.pkgd.min.js b/assets/library/masonry/masonry.pkgd.min.js new file mode 100644 index 0000000..d7f84ef --- /dev/null +++ b/assets/library/masonry/masonry.pkgd.min.js @@ -0,0 +1,9 @@ +/*! + * Masonry PACKAGED v4.2.1 + * Cascading grid layout library + * https://masonry.desandro.com + * MIT License + * by David DeSandro + */ + +!function(t,e){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("jquery")):t.jQueryBridget=e(t,t.jQuery)}(window,function(t,e){"use strict";function i(i,r,a){function h(t,e,n){var o,r="$()."+i+'("'+e+'")';return t.each(function(t,h){var u=a.data(h,i);if(!u)return void s(i+" not initialized. Cannot call methods, i.e. "+r);var d=u[e];if(!d||"_"==e.charAt(0))return void s(r+" is not a valid method");var l=d.apply(u,n);o=void 0===o?l:o}),void 0!==o?o:t}function u(t,e){t.each(function(t,n){var o=a.data(n,i);o?(o.option(e),o._init()):(o=new r(n,e),a.data(n,i,o))})}a=a||e||t.jQuery,a&&(r.prototype.option||(r.prototype.option=function(t){a.isPlainObject(t)&&(this.options=a.extend(!0,this.options,t))}),a.fn[i]=function(t){if("string"==typeof t){var e=o.call(arguments,1);return h(this,t,e)}return u(this,t),this},n(a))}function n(t){!t||t&&t.bridget||(t.bridget=i)}var o=Array.prototype.slice,r=t.console,s="undefined"==typeof r?function(){}:function(t){r.error(t)};return n(e||t.jQuery),i}),function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},n=i[t]=i[t]||[];return-1==n.indexOf(e)&&n.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{},n=i[t]=i[t]||{};return n[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=i.indexOf(e);return-1!=n&&i.splice(n,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){i=i.slice(0),e=e||[];for(var n=this._onceEvents&&this._onceEvents[t],o=0;oe;e++){var i=h[e];t[i]=0}return t}function n(t){var e=getComputedStyle(t);return e||a("Style returned "+e+". Are you running this code in a hidden iframe on Firefox? See http://bit.ly/getsizebug1"),e}function o(){if(!d){d=!0;var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style.boxSizing="border-box";var i=document.body||document.documentElement;i.appendChild(e);var o=n(e);r.isBoxSizeOuter=s=200==t(o.width),i.removeChild(e)}}function r(e){if(o(),"string"==typeof e&&(e=document.querySelector(e)),e&&"object"==typeof e&&e.nodeType){var r=n(e);if("none"==r.display)return i();var a={};a.width=e.offsetWidth,a.height=e.offsetHeight;for(var d=a.isBorderBox="border-box"==r.boxSizing,l=0;u>l;l++){var c=h[l],f=r[c],m=parseFloat(f);a[c]=isNaN(m)?0:m}var p=a.paddingLeft+a.paddingRight,g=a.paddingTop+a.paddingBottom,y=a.marginLeft+a.marginRight,v=a.marginTop+a.marginBottom,_=a.borderLeftWidth+a.borderRightWidth,z=a.borderTopWidth+a.borderBottomWidth,E=d&&s,b=t(r.width);b!==!1&&(a.width=b+(E?0:p+_));var x=t(r.height);return x!==!1&&(a.height=x+(E?0:g+z)),a.innerWidth=a.width-(p+_),a.innerHeight=a.height-(g+z),a.outerWidth=a.width+y,a.outerHeight=a.height+v,a}}var s,a="undefined"==typeof console?e:function(t){console.error(t)},h=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],u=h.length,d=!1;return r}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("desandro-matches-selector/matches-selector",e):"object"==typeof module&&module.exports?module.exports=e():t.matchesSelector=e()}(window,function(){"use strict";var t=function(){var t=window.Element.prototype;if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],i=0;is?"round":"floor";r=Math[a](r),this.cols=Math.max(r,1)},n.getContainerWidth=function(){var t=this._getOption("fitWidth"),i=t?this.element.parentNode:this.element,n=e(i);this.containerWidth=n&&n.innerWidth},n._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth%this.columnWidth,i=e&&1>e?"round":"ceil",n=Math[i](t.size.outerWidth/this.columnWidth);n=Math.min(n,this.cols);for(var o=this.options.horizontalOrder?"_getHorizontalColPosition":"_getTopColPosition",r=this[o](n,t),s={x:this.columnWidth*r.col,y:r.y},a=r.y+t.size.outerHeight,h=n+r.col,u=r.col;h>u;u++)this.colYs[u]=a;return s},n._getTopColPosition=function(t){var e=this._getTopColGroup(t),i=Math.min.apply(Math,e);return{col:e.indexOf(i),y:i}},n._getTopColGroup=function(t){if(2>t)return this.colYs;for(var e=[],i=this.cols+1-t,n=0;i>n;n++)e[n]=this._getColGroupY(n,t);return e},n._getColGroupY=function(t,e){if(2>e)return this.colYs[t];var i=this.colYs.slice(t,t+e);return Math.max.apply(Math,i)},n._getHorizontalColPosition=function(t,e){var i=this.horizontalColIndex%this.cols,n=t>1&&i+t>this.cols;i=n?0:i;var o=e.size.outerWidth&&e.size.outerHeight;return this.horizontalColIndex=o?i+t:this.horizontalColIndex,{col:i,y:this._getColGroupY(i,t)}},n._manageStamp=function(t){var i=e(t),n=this._getElementOffset(t),o=this._getOption("originLeft"),r=o?n.left:n.right,s=r+i.outerWidth,a=Math.floor(r/this.columnWidth);a=Math.max(0,a);var h=Math.floor(s/this.columnWidth);h-=s%this.columnWidth?0:1,h=Math.min(this.cols-1,h);for(var u=this._getOption("originTop"),d=(u?n.top:n.bottom)+i.outerHeight,l=a;h>=l;l++)this.colYs[l]=Math.max(d,this.colYs[l])},n._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var t={height:this.maxY};return this._getOption("fitWidth")&&(t.width=this._getContainerFitWidth()),t},n._getContainerFitWidth=function(){for(var t=0,e=this.cols;--e&&0===this.colYs[e];)t++;return(this.cols-t)*this.columnWidth-this.gutter},n.needsResizeLayout=function(){var t=this.containerWidth;return this.getContainerWidth(),t!=this.containerWidth},i}); \ No newline at end of file diff --git a/assets/library/sticky/jquery.sticky.js b/assets/library/sticky/jquery.sticky.js new file mode 100644 index 0000000..0191310 --- /dev/null +++ b/assets/library/sticky/jquery.sticky.js @@ -0,0 +1,223 @@ +/** + * Sticky Plugin v1.0.2 for jQuery + * ======================================= + * + * Author: Anthony Garand + * + * Improvements by German M. Bravo (Kronuz) and Ruud Kamphuis (ruudk) + * Improvements by Leonardo C. Daronco (daronco) + * Created: 2/14/2011 + * Date: 16/04/2015 + * Website: http://labs.anthonygarand.com/sticky + * + * Description: Makes an element on the page stick on the screen as you scroll + * It will only set the 'top' and 'position' of your element, you + * might need to adjust the width in some cases. + */ + +(function($) { + var slice = Array.prototype.slice; // save ref to original slice() + var splice = Array.prototype.splice; // save ref to original slice() + +var defaults = { + topSpacing: 0, + bottomSpacing: 0, + className: 'is-sticky', + wrapperClassName: 'sticky-wrapper', + center: false, + getWidthFrom: '', + widthFromWrapper: true, // works only when .getWidthFrom is empty + responsiveWidth: false + }, + $window = $(window), + $document = $(document), + sticked = [], + windowHeight = $window.height(), + scroller = function() { + var scrollTop = $window.scrollTop(), + documentHeight = $document.height(), + dwh = documentHeight - windowHeight, + extra = (scrollTop > dwh) ? dwh - scrollTop : 0; + + for (var i = 0; i < sticked.length; i++) { + var s = sticked[i], + elementTop = s.stickyWrapper.offset().top, + etse = elementTop - s.topSpacing - extra; + + if (scrollTop <= etse) { + if (s.currentTop !== null) { + s.stickyElement + .css({ + 'width': '', + 'position': '', + 'top': '' + }); + s.stickyElement.parent().removeClass(s.className); + s.stickyElement.trigger('sticky-end', [s]); + s.currentTop = null; + } + } + else { + var newTop = documentHeight - s.stickyElement.outerHeight() + - s.topSpacing - s.bottomSpacing - scrollTop - extra; + if (newTop < 0) { + newTop = newTop + s.topSpacing; + } else { + newTop = s.topSpacing; + } + if (s.currentTop != newTop) { + var newWidth; + if ( s.getWidthFrom ) { + newWidth = $(s.getWidthFrom).width() || null; + } + else if(s.widthFromWrapper) { + newWidth = s.stickyWrapper.width(); + } + if ( newWidth == null ) { + newWidth = s.stickyElement.width(); + } + s.stickyElement + .css('width', newWidth) + .css('position', 'fixed') + .css('top', newTop); + + s.stickyElement.parent().addClass(s.className); + + if (s.currentTop === null) { + s.stickyElement.trigger('sticky-start', [s]); + } else { + // sticky is started but it have to be repositioned + s.stickyElement.trigger('sticky-update', [s]); + } + + if (s.currentTop === s.topSpacing && s.currentTop > newTop || s.currentTop === null && newTop < s.topSpacing) { + // just reached bottom || just started to stick but bottom is already reached + s.stickyElement.trigger('sticky-bottom-reached', [s]); + } else if(s.currentTop !== null && newTop === s.topSpacing && s.currentTop < newTop) { + // sticky is started && sticked at topSpacing && overflowing from top just finished + s.stickyElement.trigger('sticky-bottom-unreached', [s]); + } + + s.currentTop = newTop; + } + } + } + }, + resizer = function() { + windowHeight = $window.height(); + + for (var i = 0; i < sticked.length; i++) { + var s = sticked[i]; + var newWidth = null; + if ( s.getWidthFrom ) { + if ( s.responsiveWidth === true ) { + newWidth = $(s.getWidthFrom).width(); + } + } + else if(s.widthFromWrapper) { + newWidth = s.stickyWrapper.width(); + } + if ( newWidth != null ) { + s.stickyElement.css('width', newWidth); + } + } + }, + methods = { + init: function(options) { + var o = $.extend({}, defaults, options); + return this.each(function() { + var stickyElement = $(this); + + var stickyId = stickyElement.attr('id'); + var stickyHeight = stickyElement.outerHeight(); + var wrapperId = stickyId ? stickyId + '-' + defaults.wrapperClassName : defaults.wrapperClassName + var wrapper = $('
          ') + .attr('id', wrapperId) + .addClass(o.wrapperClassName); + + stickyElement.wrapAll(wrapper); + + var stickyWrapper = stickyElement.parent(); + + if (o.center) { + stickyWrapper.css({width:stickyElement.outerWidth(),marginLeft:"auto",marginRight:"auto"}); + } + + if (stickyElement.css("float") == "right") { + stickyElement.css({"float":"none"}).parent().css({"float":"right"}); + } + + stickyWrapper.css('height', stickyHeight); + + o.stickyElement = stickyElement; + o.stickyWrapper = stickyWrapper; + o.currentTop = null; + + sticked.push(o); + }); + }, + update: scroller, + unstick: function(options) { + return this.each(function() { + var that = this; + var unstickyElement = $(that); + + var removeIdx = -1; + var i = sticked.length; + while ( i-- > 0 ) + { + if (sticked[i].stickyElement.get(0) === that) + { + splice.call(sticked,i,1); + removeIdx = i; + } + } + if(removeIdx != -1) + { + unstickyElement.unwrap(); + unstickyElement + .css({ + 'width': '', + 'position': '', + 'top': '', + 'float': '' + }) + ; + } + }); + } + }; + +// should be more efficient than using $window.scroll(scroller) and $window.resize(resizer): +if (window.addEventListener) { + window.addEventListener('scroll', scroller, false); + window.addEventListener('resize', resizer, false); +} else if (window.attachEvent) { + window.attachEvent('onscroll', scroller); + window.attachEvent('onresize', resizer); +} + +$.fn.sticky = function(method) { + if (methods[method]) { + return methods[method].apply(this, slice.call(arguments, 1)); + } else if (typeof method === 'object' || !method ) { + return methods.init.apply( this, arguments ); + } else { + $.error('Method ' + method + ' does not exist on jQuery.sticky'); + } +}; + +$.fn.unstick = function(method) { + if (methods[method]) { + return methods[method].apply(this, slice.call(arguments, 1)); + } else if (typeof method === 'object' || !method ) { + return methods.unstick.apply( this, arguments ); + } else { + $.error('Method ' + method + ' does not exist on jQuery.sticky'); + } + +}; +$(function() { + setTimeout(scroller, 0); +}); +})(jQuery); diff --git a/assets/library/sticky/jquery.sticky.min.js b/assets/library/sticky/jquery.sticky.min.js new file mode 100644 index 0000000..62e2188 --- /dev/null +++ b/assets/library/sticky/jquery.sticky.min.js @@ -0,0 +1,18 @@ +/** + * Sticky Plugin v1.0.2 for jQuery + ======================================= + * + * Author: Anthony Garand + * + * Improvements by German M. Bravo (Kronuz) and Ruud Kamphuis (ruudk) + * Improvements by Leonardo C. Daronco (daronco) + * Created: 2/14/2011 + * Date: 16/04/2015 + * Website: http://labs.anthonygarand.com/sticky + * + * Description: Makes an element on the page stick on the screen as you scroll + * It will only set the 'top' and 'position' of your element, you + * might need to adjust the width in some cases. + */ + +!function(t){var e=Array.prototype.slice,i=Array.prototype.splice,r={topSpacing:0,bottomSpacing:0,className:"is-sticky",wrapperClassName:"sticky-wrapper",center:!1,getWidthFrom:"",widthFromWrapper:!0,responsiveWidth:!1},n=t(window),s=t(document),o=[],c=n.height(),a=function(){for(var e=n.scrollTop(),i=s.height(),r=i-c,a=e>r?r-e:0,p=0;ph||null===l.currentTop&&h").attr("id",c).addClass(i.wrapperClassName);e.wrapAll(a);var p=e.parent();i.center&&p.css({width:e.outerWidth(),marginLeft:"auto",marginRight:"auto"}),"right"==e.css("float")&&e.css({float:"none"}).parent().css({float:"right"}),p.css("height",s),i.stickyElement=e,i.stickyWrapper=p,i.currentTop=null,o.push(i)})},update:a,unstick:function(e){return this.each(function(){for(var e=t(this),r=-1,n=o.length;n-- >0;)o[n].stickyElement.get(0)===this&&(i.call(o,n,1),r=n);-1!=r&&(e.unwrap(),e.css({width:"",position:"",top:"",float:""}))})}};window.addEventListener?(window.addEventListener("scroll",a,!1),window.addEventListener("resize",p,!1)):window.attachEvent&&(window.attachEvent("onscroll",a),window.attachEvent("onresize",p)),t.fn.sticky=function(i){return l[i]?l[i].apply(this,e.call(arguments,1)):"object"!=typeof i&&i?void t.error("Method "+i+" does not exist on jQuery.sticky"):l.init.apply(this,arguments)},t.fn.unstick=function(i){return l[i]?l[i].apply(this,e.call(arguments,1)):"object"!=typeof i&&i?void t.error("Method "+i+" does not exist on jQuery.sticky"):l.unstick.apply(this,arguments)},t(function(){setTimeout(a,0)})}(jQuery); \ No newline at end of file diff --git a/assets/library/wow/wow.js b/assets/library/wow/wow.js new file mode 100644 index 0000000..1db78ea --- /dev/null +++ b/assets/library/wow/wow.js @@ -0,0 +1,513 @@ +(function() { + var MutationObserver, Util, WeakMap, getComputedStyle, getComputedStyleRX, + bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; + + Util = (function() { + function Util() {} + + Util.prototype.extend = function(custom, defaults) { + var key, value; + for (key in defaults) { + value = defaults[key]; + if (custom[key] == null) { + custom[key] = value; + } + } + return custom; + }; + + Util.prototype.isMobile = function(agent) { + return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(agent); + }; + + Util.prototype.createEvent = function(event, bubble, cancel, detail) { + var customEvent; + if (bubble == null) { + bubble = false; + } + if (cancel == null) { + cancel = false; + } + if (detail == null) { + detail = null; + } + if (document.createEvent != null) { + customEvent = document.createEvent('CustomEvent'); + customEvent.initCustomEvent(event, bubble, cancel, detail); + } else if (document.createEventObject != null) { + customEvent = document.createEventObject(); + customEvent.eventType = event; + } else { + customEvent.eventName = event; + } + return customEvent; + }; + + Util.prototype.emitEvent = function(elem, event) { + if (elem.dispatchEvent != null) { + return elem.dispatchEvent(event); + } else if (event in (elem != null)) { + return elem[event](); + } else if (("on" + event) in (elem != null)) { + return elem["on" + event](); + } + }; + + Util.prototype.addEvent = function(elem, event, fn) { + if (elem.addEventListener != null) { + return elem.addEventListener(event, fn, false); + } else if (elem.attachEvent != null) { + return elem.attachEvent("on" + event, fn); + } else { + return elem[event] = fn; + } + }; + + Util.prototype.removeEvent = function(elem, event, fn) { + if (elem.removeEventListener != null) { + return elem.removeEventListener(event, fn, false); + } else if (elem.detachEvent != null) { + return elem.detachEvent("on" + event, fn); + } else { + return delete elem[event]; + } + }; + + Util.prototype.innerHeight = function() { + if ('innerHeight' in window) { + return window.innerHeight; + } else { + return document.documentElement.clientHeight; + } + }; + + return Util; + + })(); + + WeakMap = this.WeakMap || this.MozWeakMap || (WeakMap = (function() { + function WeakMap() { + this.keys = []; + this.values = []; + } + + WeakMap.prototype.get = function(key) { + var i, item, j, len, ref; + ref = this.keys; + for (i = j = 0, len = ref.length; j < len; i = ++j) { + item = ref[i]; + if (item === key) { + return this.values[i]; + } + } + }; + + WeakMap.prototype.set = function(key, value) { + var i, item, j, len, ref; + ref = this.keys; + for (i = j = 0, len = ref.length; j < len; i = ++j) { + item = ref[i]; + if (item === key) { + this.values[i] = value; + return; + } + } + this.keys.push(key); + return this.values.push(value); + }; + + return WeakMap; + + })()); + + MutationObserver = this.MutationObserver || this.WebkitMutationObserver || this.MozMutationObserver || (MutationObserver = (function() { + function MutationObserver() { + if (typeof console !== "undefined" && console !== null) { + console.warn('MutationObserver is not supported by your browser.'); + } + if (typeof console !== "undefined" && console !== null) { + console.warn('WOW.js cannot detect dom mutations, please call .sync() after loading new content.'); + } + } + + MutationObserver.notSupported = true; + + MutationObserver.prototype.observe = function() {}; + + return MutationObserver; + + })()); + + getComputedStyle = this.getComputedStyle || function(el, pseudo) { + this.getPropertyValue = function(prop) { + var ref; + if (prop === 'float') { + prop = 'styleFloat'; + } + if (getComputedStyleRX.test(prop)) { + prop.replace(getComputedStyleRX, function(_, _char) { + return _char.toUpperCase(); + }); + } + return ((ref = el.currentStyle) != null ? ref[prop] : void 0) || null; + }; + return this; + }; + + getComputedStyleRX = /(\-([a-z]){1})/g; + + this.WOW = (function() { + WOW.prototype.defaults = { + boxClass: 'wow', + animateClass: 'animated', + offset: 0, + mobile: true, + live: true, + callback: null, + scrollContainer: null + }; + + function WOW(options) { + if (options == null) { + options = {}; + } + this.scrollCallback = bind(this.scrollCallback, this); + this.scrollHandler = bind(this.scrollHandler, this); + this.resetAnimation = bind(this.resetAnimation, this); + this.start = bind(this.start, this); + this.scrolled = true; + this.config = this.util().extend(options, this.defaults); + if (options.scrollContainer != null) { + this.config.scrollContainer = document.querySelector(options.scrollContainer); + } + this.animationNameCache = new WeakMap(); + this.wowEvent = this.util().createEvent(this.config.boxClass); + } + + WOW.prototype.init = function() { + var ref; + this.element = window.document.documentElement; + if ((ref = document.readyState) === "interactive" || ref === "complete") { + this.start(); + } else { + this.util().addEvent(document, 'DOMContentLoaded', this.start); + } + return this.finished = []; + }; + + WOW.prototype.start = function() { + var box, j, len, ref; + this.stopped = false; + this.boxes = (function() { + var j, len, ref, results; + ref = this.element.querySelectorAll("." + this.config.boxClass); + results = []; + for (j = 0, len = ref.length; j < len; j++) { + box = ref[j]; + results.push(box); + } + return results; + }).call(this); + this.all = (function() { + var j, len, ref, results; + ref = this.boxes; + results = []; + for (j = 0, len = ref.length; j < len; j++) { + box = ref[j]; + results.push(box); + } + return results; + }).call(this); + if (this.boxes.length) { + if (this.disabled()) { + this.resetStyle(); + } else { + ref = this.boxes; + for (j = 0, len = ref.length; j < len; j++) { + box = ref[j]; + this.applyStyle(box, true); + } + } + } + if (!this.disabled()) { + this.util().addEvent(this.config.scrollContainer || window, 'scroll', this.scrollHandler); + this.util().addEvent(window, 'resize', this.scrollHandler); + this.interval = setInterval(this.scrollCallback, 50); + } + if (this.config.live) { + return new MutationObserver((function(_this) { + return function(records) { + var k, len1, node, record, results; + results = []; + for (k = 0, len1 = records.length; k < len1; k++) { + record = records[k]; + results.push((function() { + var l, len2, ref1, results1; + ref1 = record.addedNodes || []; + results1 = []; + for (l = 0, len2 = ref1.length; l < len2; l++) { + node = ref1[l]; + results1.push(this.doSync(node)); + } + return results1; + }).call(_this)); + } + return results; + }; + })(this)).observe(document.body, { + childList: true, + subtree: true + }); + } + }; + + WOW.prototype.stop = function() { + this.stopped = true; + this.util().removeEvent(this.config.scrollContainer || window, 'scroll', this.scrollHandler); + this.util().removeEvent(window, 'resize', this.scrollHandler); + if (this.interval != null) { + return clearInterval(this.interval); + } + }; + + WOW.prototype.sync = function(element) { + if (MutationObserver.notSupported) { + return this.doSync(this.element); + } + }; + + WOW.prototype.doSync = function(element) { + var box, j, len, ref, results; + if (element == null) { + element = this.element; + } + if (element.nodeType !== 1) { + return; + } + element = element.parentNode || element; + ref = element.querySelectorAll("." + this.config.boxClass); + results = []; + for (j = 0, len = ref.length; j < len; j++) { + box = ref[j]; + if (indexOf.call(this.all, box) < 0) { + this.boxes.push(box); + this.all.push(box); + if (this.stopped || this.disabled()) { + this.resetStyle(); + } else { + this.applyStyle(box, true); + } + results.push(this.scrolled = true); + } else { + results.push(void 0); + } + } + return results; + }; + + WOW.prototype.show = function(box) { + this.applyStyle(box); + box.className = box.className + " " + this.config.animateClass; + if (this.config.callback != null) { + this.config.callback(box); + } + this.util().emitEvent(box, this.wowEvent); + this.util().addEvent(box, 'animationend', this.resetAnimation); + this.util().addEvent(box, 'oanimationend', this.resetAnimation); + this.util().addEvent(box, 'webkitAnimationEnd', this.resetAnimation); + this.util().addEvent(box, 'MSAnimationEnd', this.resetAnimation); + return box; + }; + + WOW.prototype.applyStyle = function(box, hidden) { + var delay, duration, iteration; + duration = box.getAttribute('data-wow-duration'); + delay = box.getAttribute('data-wow-delay'); + iteration = box.getAttribute('data-wow-iteration'); + return this.animate((function(_this) { + return function() { + return _this.customStyle(box, hidden, duration, delay, iteration); + }; + })(this)); + }; + + WOW.prototype.animate = (function() { + if ('requestAnimationFrame' in window) { + return function(callback) { + return window.requestAnimationFrame(callback); + }; + } else { + return function(callback) { + return callback(); + }; + } + })(); + + WOW.prototype.resetStyle = function() { + var box, j, len, ref, results; + ref = this.boxes; + results = []; + for (j = 0, len = ref.length; j < len; j++) { + box = ref[j]; + results.push(box.style.visibility = 'visible'); + } + return results; + }; + + WOW.prototype.resetAnimation = function(event) { + var target; + if (event.type.toLowerCase().indexOf('animationend') >= 0) { + target = event.target || event.srcElement; + return target.className = target.className.replace(this.config.animateClass, '').trim(); + } + }; + + WOW.prototype.customStyle = function(box, hidden, duration, delay, iteration) { + if (hidden) { + this.cacheAnimationName(box); + } + box.style.visibility = hidden ? 'hidden' : 'visible'; + if (duration) { + this.vendorSet(box.style, { + animationDuration: duration + }); + } + if (delay) { + this.vendorSet(box.style, { + animationDelay: delay + }); + } + if (iteration) { + this.vendorSet(box.style, { + animationIterationCount: iteration + }); + } + this.vendorSet(box.style, { + animationName: hidden ? 'none' : this.cachedAnimationName(box) + }); + return box; + }; + + WOW.prototype.vendors = ["moz", "webkit"]; + + WOW.prototype.vendorSet = function(elem, properties) { + var name, results, value, vendor; + results = []; + for (name in properties) { + value = properties[name]; + elem["" + name] = value; + results.push((function() { + var j, len, ref, results1; + ref = this.vendors; + results1 = []; + for (j = 0, len = ref.length; j < len; j++) { + vendor = ref[j]; + results1.push(elem["" + vendor + (name.charAt(0).toUpperCase()) + (name.substr(1))] = value); + } + return results1; + }).call(this)); + } + return results; + }; + + WOW.prototype.vendorCSS = function(elem, property) { + var j, len, ref, result, style, vendor; + style = getComputedStyle(elem); + result = style.getPropertyCSSValue(property); + ref = this.vendors; + for (j = 0, len = ref.length; j < len; j++) { + vendor = ref[j]; + result = result || style.getPropertyCSSValue("-" + vendor + "-" + property); + } + return result; + }; + + WOW.prototype.animationName = function(box) { + var animationName, error; + try { + animationName = this.vendorCSS(box, 'animation-name').cssText; + } catch (error) { + animationName = getComputedStyle(box).getPropertyValue('animation-name'); + } + if (animationName === 'none') { + return ''; + } else { + return animationName; + } + }; + + WOW.prototype.cacheAnimationName = function(box) { + return this.animationNameCache.set(box, this.animationName(box)); + }; + + WOW.prototype.cachedAnimationName = function(box) { + return this.animationNameCache.get(box); + }; + + WOW.prototype.scrollHandler = function() { + return this.scrolled = true; + }; + + WOW.prototype.scrollCallback = function() { + var box; + if (this.scrolled) { + this.scrolled = false; + this.boxes = (function() { + var j, len, ref, results; + ref = this.boxes; + results = []; + for (j = 0, len = ref.length; j < len; j++) { + box = ref[j]; + if (!(box)) { + continue; + } + if (this.isVisible(box)) { + this.show(box); + continue; + } + results.push(box); + } + return results; + }).call(this); + if (!(this.boxes.length || this.config.live)) { + return this.stop(); + } + } + }; + + WOW.prototype.offsetTop = function(element) { + var top; + while (element.offsetTop === void 0) { + element = element.parentNode; + } + top = element.offsetTop; + while (element = element.offsetParent) { + top += element.offsetTop; + } + return top; + }; + + WOW.prototype.isVisible = function(box) { + var bottom, offset, top, viewBottom, viewTop; + offset = box.getAttribute('data-wow-offset') || this.config.offset; + viewTop = (this.config.scrollContainer && this.config.scrollContainer.scrollTop) || window.pageYOffset; + viewBottom = viewTop + Math.min(this.element.clientHeight, this.util().innerHeight()) - offset; + top = this.offsetTop(box); + bottom = top + box.clientHeight; + return top <= viewBottom && bottom >= viewTop; + }; + + WOW.prototype.util = function() { + return this._util != null ? this._util : this._util = new Util(); + }; + + WOW.prototype.disabled = function() { + return !this.config.mobile && this.util().isMobile(navigator.userAgent); + }; + + return WOW; + + })(); + +}).call(this); diff --git a/assets/library/wow/wow.min.js b/assets/library/wow/wow.min.js new file mode 100644 index 0000000..0a646f2 --- /dev/null +++ b/assets/library/wow/wow.min.js @@ -0,0 +1,2 @@ +/*! WOW - v1.1.3 - 2016-05-06 +* Copyright (c) 2016 Matthieu Aussaguel;*/(function(){var a,b,c,d,e,f=function(a,b){return function(){return a.apply(b,arguments)}},g=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};b=function(){function a(){}return a.prototype.extend=function(a,b){var c,d;for(c in b)d=b[c],null==a[c]&&(a[c]=d);return a},a.prototype.isMobile=function(a){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(a)},a.prototype.createEvent=function(a,b,c,d){var e;return null==b&&(b=!1),null==c&&(c=!1),null==d&&(d=null),null!=document.createEvent?(e=document.createEvent("CustomEvent"),e.initCustomEvent(a,b,c,d)):null!=document.createEventObject?(e=document.createEventObject(),e.eventType=a):e.eventName=a,e},a.prototype.emitEvent=function(a,b){return null!=a.dispatchEvent?a.dispatchEvent(b):b in(null!=a)?a[b]():"on"+b in(null!=a)?a["on"+b]():void 0},a.prototype.addEvent=function(a,b,c){return null!=a.addEventListener?a.addEventListener(b,c,!1):null!=a.attachEvent?a.attachEvent("on"+b,c):a[b]=c},a.prototype.removeEvent=function(a,b,c){return null!=a.removeEventListener?a.removeEventListener(b,c,!1):null!=a.detachEvent?a.detachEvent("on"+b,c):delete a[b]},a.prototype.innerHeight=function(){return"innerHeight"in window?window.innerHeight:document.documentElement.clientHeight},a}(),c=this.WeakMap||this.MozWeakMap||(c=function(){function a(){this.keys=[],this.values=[]}return a.prototype.get=function(a){var b,c,d,e,f;for(f=this.keys,b=d=0,e=f.length;e>d;b=++d)if(c=f[b],c===a)return this.values[b]},a.prototype.set=function(a,b){var c,d,e,f,g;for(g=this.keys,c=e=0,f=g.length;f>e;c=++e)if(d=g[c],d===a)return void(this.values[c]=b);return this.keys.push(a),this.values.push(b)},a}()),a=this.MutationObserver||this.WebkitMutationObserver||this.MozMutationObserver||(a=function(){function a(){"undefined"!=typeof console&&null!==console&&console.warn("MutationObserver is not supported by your browser."),"undefined"!=typeof console&&null!==console&&console.warn("WOW.js cannot detect dom mutations, please call .sync() after loading new content.")}return a.notSupported=!0,a.prototype.observe=function(){},a}()),d=this.getComputedStyle||function(a,b){return this.getPropertyValue=function(b){var c;return"float"===b&&(b="styleFloat"),e.test(b)&&b.replace(e,function(a,b){return b.toUpperCase()}),(null!=(c=a.currentStyle)?c[b]:void 0)||null},this},e=/(\-([a-z]){1})/g,this.WOW=function(){function e(a){null==a&&(a={}),this.scrollCallback=f(this.scrollCallback,this),this.scrollHandler=f(this.scrollHandler,this),this.resetAnimation=f(this.resetAnimation,this),this.start=f(this.start,this),this.scrolled=!0,this.config=this.util().extend(a,this.defaults),null!=a.scrollContainer&&(this.config.scrollContainer=document.querySelector(a.scrollContainer)),this.animationNameCache=new c,this.wowEvent=this.util().createEvent(this.config.boxClass)}return e.prototype.defaults={boxClass:"wow",animateClass:"animated",offset:0,mobile:!0,live:!0,callback:null,scrollContainer:null},e.prototype.init=function(){var a;return this.element=window.document.documentElement,"interactive"===(a=document.readyState)||"complete"===a?this.start():this.util().addEvent(document,"DOMContentLoaded",this.start),this.finished=[]},e.prototype.start=function(){var b,c,d,e;if(this.stopped=!1,this.boxes=function(){var a,c,d,e;for(d=this.element.querySelectorAll("."+this.config.boxClass),e=[],a=0,c=d.length;c>a;a++)b=d[a],e.push(b);return e}.call(this),this.all=function(){var a,c,d,e;for(d=this.boxes,e=[],a=0,c=d.length;c>a;a++)b=d[a],e.push(b);return e}.call(this),this.boxes.length)if(this.disabled())this.resetStyle();else for(e=this.boxes,c=0,d=e.length;d>c;c++)b=e[c],this.applyStyle(b,!0);return this.disabled()||(this.util().addEvent(this.config.scrollContainer||window,"scroll",this.scrollHandler),this.util().addEvent(window,"resize",this.scrollHandler),this.interval=setInterval(this.scrollCallback,50)),this.config.live?new a(function(a){return function(b){var c,d,e,f,g;for(g=[],c=0,d=b.length;d>c;c++)f=b[c],g.push(function(){var a,b,c,d;for(c=f.addedNodes||[],d=[],a=0,b=c.length;b>a;a++)e=c[a],d.push(this.doSync(e));return d}.call(a));return g}}(this)).observe(document.body,{childList:!0,subtree:!0}):void 0},e.prototype.stop=function(){return this.stopped=!0,this.util().removeEvent(this.config.scrollContainer||window,"scroll",this.scrollHandler),this.util().removeEvent(window,"resize",this.scrollHandler),null!=this.interval?clearInterval(this.interval):void 0},e.prototype.sync=function(b){return a.notSupported?this.doSync(this.element):void 0},e.prototype.doSync=function(a){var b,c,d,e,f;if(null==a&&(a=this.element),1===a.nodeType){for(a=a.parentNode||a,e=a.querySelectorAll("."+this.config.boxClass),f=[],c=0,d=e.length;d>c;c++)b=e[c],g.call(this.all,b)<0?(this.boxes.push(b),this.all.push(b),this.stopped||this.disabled()?this.resetStyle():this.applyStyle(b,!0),f.push(this.scrolled=!0)):f.push(void 0);return f}},e.prototype.show=function(a){return this.applyStyle(a),a.className=a.className+" "+this.config.animateClass,null!=this.config.callback&&this.config.callback(a),this.util().emitEvent(a,this.wowEvent),this.util().addEvent(a,"animationend",this.resetAnimation),this.util().addEvent(a,"oanimationend",this.resetAnimation),this.util().addEvent(a,"webkitAnimationEnd",this.resetAnimation),this.util().addEvent(a,"MSAnimationEnd",this.resetAnimation),a},e.prototype.applyStyle=function(a,b){var c,d,e;return d=a.getAttribute("data-wow-duration"),c=a.getAttribute("data-wow-delay"),e=a.getAttribute("data-wow-iteration"),this.animate(function(f){return function(){return f.customStyle(a,b,d,c,e)}}(this))},e.prototype.animate=function(){return"requestAnimationFrame"in window?function(a){return window.requestAnimationFrame(a)}:function(a){return a()}}(),e.prototype.resetStyle=function(){var a,b,c,d,e;for(d=this.boxes,e=[],b=0,c=d.length;c>b;b++)a=d[b],e.push(a.style.visibility="visible");return e},e.prototype.resetAnimation=function(a){var b;return a.type.toLowerCase().indexOf("animationend")>=0?(b=a.target||a.srcElement,b.className=b.className.replace(this.config.animateClass,"").trim()):void 0},e.prototype.customStyle=function(a,b,c,d,e){return b&&this.cacheAnimationName(a),a.style.visibility=b?"hidden":"visible",c&&this.vendorSet(a.style,{animationDuration:c}),d&&this.vendorSet(a.style,{animationDelay:d}),e&&this.vendorSet(a.style,{animationIterationCount:e}),this.vendorSet(a.style,{animationName:b?"none":this.cachedAnimationName(a)}),a},e.prototype.vendors=["moz","webkit"],e.prototype.vendorSet=function(a,b){var c,d,e,f;d=[];for(c in b)e=b[c],a[""+c]=e,d.push(function(){var b,d,g,h;for(g=this.vendors,h=[],b=0,d=g.length;d>b;b++)f=g[b],h.push(a[""+f+c.charAt(0).toUpperCase()+c.substr(1)]=e);return h}.call(this));return d},e.prototype.vendorCSS=function(a,b){var c,e,f,g,h,i;for(h=d(a),g=h.getPropertyCSSValue(b),f=this.vendors,c=0,e=f.length;e>c;c++)i=f[c],g=g||h.getPropertyCSSValue("-"+i+"-"+b);return g},e.prototype.animationName=function(a){var b;try{b=this.vendorCSS(a,"animation-name").cssText}catch(c){b=d(a).getPropertyValue("animation-name")}return"none"===b?"":b},e.prototype.cacheAnimationName=function(a){return this.animationNameCache.set(a,this.animationName(a))},e.prototype.cachedAnimationName=function(a){return this.animationNameCache.get(a)},e.prototype.scrollHandler=function(){return this.scrolled=!0},e.prototype.scrollCallback=function(){var a;return!this.scrolled||(this.scrolled=!1,this.boxes=function(){var b,c,d,e;for(d=this.boxes,e=[],b=0,c=d.length;c>b;b++)a=d[b],a&&(this.isVisible(a)?this.show(a):e.push(a));return e}.call(this),this.boxes.length||this.config.live)?void 0:this.stop()},e.prototype.offsetTop=function(a){for(var b;void 0===a.offsetTop;)a=a.parentNode;for(b=a.offsetTop;a=a.offsetParent;)b+=a.offsetTop;return b},e.prototype.isVisible=function(a){var b,c,d,e,f;return c=a.getAttribute("data-wow-offset")||this.config.offset,f=this.config.scrollContainer&&this.config.scrollContainer.scrollTop||window.pageYOffset,e=f+Math.min(this.element.clientHeight,this.util().innerHeight())-c,d=this.offsetTop(a),b=d+a.clientHeight,e>=d&&b>=f},e.prototype.util=function(){return null!=this._util?this._util:this._util=new b},e.prototype.disabled=function(){return!this.config.mobile&&this.util().isMobile(navigator.userAgent)},e}()}).call(this); \ No newline at end of file diff --git a/comments.php b/comments.php new file mode 100644 index 0000000..b2566df --- /dev/null +++ b/comments.php @@ -0,0 +1,75 @@ + + +
          + +

          + ' . get_the_title() . '' + ); + } else { + printf( // WPCS: XSS OK. + /* translators: 1: comment count number, 2: title. */ + esc_html( _nx( '%1$s thought on “%2$s”', '%1$s thoughts on “%2$s”', $sophia_after_dark_comment_count, 'comments title', 'sophia-after-dark' ) ), + number_format_i18n( $sophia_after_dark_comment_count ), + '' . get_the_title() . '' + ); + } + ?> +

          + + + +
            + 'ol', + 'short_ping' => true, + ) ); + ?> +
          + + +

          + + +
          \ No newline at end of file diff --git a/footer.php b/footer.php new file mode 100644 index 0000000..acb4c98 --- /dev/null +++ b/footer.php @@ -0,0 +1,61 @@ + + + + + + + + + + + diff --git a/functions.php b/functions.php new file mode 100644 index 0000000..6eed9ab --- /dev/null +++ b/functions.php @@ -0,0 +1,199 @@ + tag in the document head, and expect WordPress to + * provide it for us. + */ + add_theme_support( 'title-tag' ); + + /* + * Enable support for Post Thumbnails on posts and pages. + * + * @link https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/ + */ + add_theme_support( 'post-thumbnails' ); + + set_post_thumbnail_size( 768, 432, true ); + add_image_size( 'sophia-after-dark-full-width', 1160, 653, true ); + add_image_size( 'sophia-after-dark-post', 600, 400, true ); + add_image_size( 'sophia-after-dark-post-auto', 600, 9999, false ); + add_image_size( 'sophia-after-dark-slider-post', 1200, 700, true ); + + // This theme uses wp_nav_menu() in one location. + register_nav_menus( array( + 'top_header_menu' => esc_html__( 'Top Header', 'sophia-after-dark' ), + 'primary_menu' => esc_html__( 'Primary', 'sophia-after-dark' ), + 'footer_menu' => esc_html__( 'Footer', 'sophia-after-dark' ), + ) ); + + /* + * Switch default core markup for search form, comment form, and comments + * to output valid HTML5. + */ + add_theme_support( 'html5', array( + 'search-form', + 'comment-form', + 'comment-list', + 'gallery', + 'caption', + ) ); + + // Set up the WordPress core custom background feature. + add_theme_support( 'custom-background', apply_filters( 'sophia_after_dark_custom_background_args', array( + 'default-color' => 'ffffff', + 'default-image' => '', + ) ) ); + + // Add theme support for selective refresh for widgets. + add_theme_support( 'customize-selective-refresh-widgets' ); + + /** + * Add support for core custom logo. + * + * @link https://codex.wordpress.org/Theme_Logo + */ + add_theme_support( 'custom-logo', array( + 'height' => 250, + 'width' => 250, + 'flex-width' => true, + 'flex-height' => true, + ) ); + + /** + * Registers an editor stylesheet for the theme. + */ + add_editor_style( 'assets/css/mt-editor-style.css' ); + + /** + * Restoring the classic Widgets Editor + * + * @since 1.1.5 + */ + $sophia_after_dark_enable_widgets_editor = get_theme_mod( 'sophia_after_dark_enable_widgets_editor', false ); + if ( false === $sophia_after_dark_enable_widgets_editor ) { + remove_theme_support( 'widgets-block-editor' ); + } + } +endif; +add_action( 'after_setup_theme', 'sophia_after_dark_setup' ); + +/** + * Set the content width in pixels, based on the theme's design and stylesheet. + * + * Priority 0 to make it available to lower priority callbacks. + * + * @global int $content_width + */ +function sophia_after_dark_content_width() { + // This variable is intended to be overruled from themes. + // Open WPCS issue: {@link https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/1043}. + // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound + $GLOBALS['content_width'] = apply_filters( 'sophia_after_dark_content_width', 640 ); +} +add_action( 'after_setup_theme', 'sophia_after_dark_content_width', 0 ); + +/** + * Set the theme version, based on theme stylesheet. + * + * @global string $sophia_after_dark_theme_version + */ +function sophia_after_dark_theme_version_info() { + $sophia_after_dark_theme_info = wp_get_theme(); + $GLOBALS['sophia_after_dark_theme_version'] = $sophia_after_dark_theme_info->get( 'Version' ); +} +add_action( 'after_setup_theme', 'sophia_after_dark_theme_version_info', 0 ); + +/** + * Function for displaying menu item description + * + */ +function sophia_after_dark_nav_description( $item_output, $item, $depth, $menu_args ) { + if ( !empty( $item->description ) ) { + $item_output = str_replace( $menu_args->link_after . '', '' . $item->description . '' . $menu_args->link_after . '', $item_output ); + } + return $item_output; +} +add_filter( 'walker_nav_menu_start_el', 'sophia_after_dark_nav_description', 10, 4 ); + +/** + * Implement the Custom Header feature. + */ +require get_template_directory() . '/inc/custom-header.php'; + +/** + * Custom template tags for this theme. + */ +require get_template_directory() . '/inc/template-tags.php'; + +/** + * Functions which enhance the theme by hooking into WordPress. + */ +require get_template_directory() . '/inc/template-functions.php'; + +/** + * Customizer additions. + */ +require get_template_directory() . '/inc/customizer/mt-customizer.php'; + +/** + * Load Jetpack compatibility file. + */ +if ( defined( 'JETPACK__VERSION' ) ) { + require get_template_directory() . '/inc/jetpack.php'; +} + +/** + * Load custom hook file + */ +require get_template_directory() . '/inc/hooks/mt-custom-hooks.php'; + +/** + * Load custom hook top header file + */ +require get_template_directory() . '/inc/hooks/mt-top-header-hooks.php'; + +/** + * Load widget functions file + */ +require get_template_directory() . '/inc/widgets/mt-widget-functions.php'; + +/** + * Load metaboxes + */ +require get_template_directory() . '/inc/metaboxes/mt-post-sidebar-meta.php'; + +/** + * Load breadcrumbs class + */ +if ( ! function_exists( 'breadcrumb_trail' ) ) { + require get_template_directory() . '/inc/mt-class-breadcrumbs.php'; +} diff --git a/header.php b/header.php new file mode 100644 index 0000000..daceb77 --- /dev/null +++ b/header.php @@ -0,0 +1,122 @@ + section and everything up until
          + * + * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials + * + * @package Sophia After Dark + * @since 1.0.0 + */ + +?> + +> + + + + + + + + + + + + + + + +> + + + +
          + + + +
          +
          diff --git a/inc/custom-header.php b/inc/custom-header.php new file mode 100644 index 0000000..956ee13 --- /dev/null +++ b/inc/custom-header.php @@ -0,0 +1,75 @@ + '', + 'default-text-color' => '000000', + 'width' => 1000, + 'height' => 250, + 'flex-height' => true, + 'flex-width' => true, + 'wp-head-callback' => 'sophia_after_dark_header_style', + ) ) ); +} +add_action( 'after_setup_theme', 'sophia_after_dark_custom_header_setup' ); + +if ( ! function_exists( 'sophia_after_dark_header_style' ) ) : + + /** + * Styles the header image and text displayed on the blog. + * + * @see sophia_after_dark_custom_header_setup(). + */ + function sophia_after_dark_header_style() { + $header_text_color = get_header_textcolor(); + + /* + * If no custom options for text are set, let's bail. + * get_header_textcolor() options: Any hex value, 'blank' to hide text. Default: add_theme_support( 'custom-header' ). + */ + if ( get_theme_support( 'custom-header', 'default-text-color' ) === $header_text_color ) { + return; + } + + // If we get this far, we have custom styles. Let's do this. + ?> + + manager->get_setting( 'sophia_after_dark_enable_top_header' )->value() ) { + return true; + } else { + return false; + } + } + +endif; + +if ( ! function_exists( 'sophia_after_dark_enable_top_header_trending_active_callback' ) ) : + + /** + * Check if top header option and trending section option is enabled. + * + * @since 1.0.0 + * + * @param WP_Customize_Control $control WP_Customize_Control instance. + * + * @return bool Whether the control is active to the current preview. + */ + function sophia_after_dark_enable_top_header_trending_active_callback( $control ) { + if ( false !== $control->manager->get_setting( 'sophia_after_dark_enable_top_header' )->value() && false !== $control->manager->get_setting( 'sophia_after_dark_enable_trending' )->value() ) { + return true; + } else { + return false; + } + } + +endif; + +if ( ! function_exists( 'sophia_after_dark_enable_top_header_live_now_active_callback' ) ) : + + /** + * Check if top header option and trending section option is enabled. + * + * @since 1.0.0 + * + * @param WP_Customize_Control $control WP_Customize_Control instance. + * + * @return bool Whether the control is active to the current preview. + */ + function sophia_after_dark_enable_top_header_live_now_active_callback( $control ) { + if ( false !== $control->manager->get_setting( 'sophia_after_dark_enable_top_header' )->value() && false !== $control->manager->get_setting( 'sophia_after_dark_enable_live_now' )->value() ) { + return true; + } else { + return false; + } + } + +endif; + +if ( ! function_exists( 'sophia_after_dark_section_slider_option_active_callback' ) ) : + + /** + * Check if slider option is enabled. + * + * @since 1.0.0 + * + * @param WP_Customize_Control $control WP_Customize_Control instance. + * + * @return bool Whether the control is active to the current preview. + */ + function sophia_after_dark_section_slider_option_active_callback( $control ) { + if ( false !== $control->manager->get_setting( 'sophia_after_dark_section_slider_option' )->value() ) { + return true; + } else { + return false; + } + } + +endif; + +if ( ! function_exists( 'sophia_after_dark_section_top_featured_posts_option_active_callback' ) ) : + + /** + * Check if top featured posts option is enabled. + * + * @since 1.0.0 + * + * @param WP_Customize_Control $control WP_Customize_Control instance. + * + * @return bool Whether the control is active to the current preview. + */ + function sophia_after_dark_section_top_featured_posts_option_active_callback( $control ) { + if ( false !== $control->manager->get_setting( 'sophia_after_dark_section_top_featured_posts_option' )->value() ) { + return true; + } else { + return false; + } + } + +endif; + +if ( ! function_exists( 'sophia_after_dark_enable_footer_widget_area_active_callback' ) ) : + + /** + * Check if foooter menu option is enabled. + * + * @since 1.0.0 + * + * @param WP_Customize_Control $control WP_Customize_Control instance. + * + * @return bool Whether the control is active to the current preview. + */ + function sophia_after_dark_enable_footer_widget_area_active_callback( $control ) { + if ( false !== $control->manager->get_setting( 'sophia_after_dark_enable_footer_widget_area' )->value() ) { + return true; + } else { + return false; + } + } + +endif; + +if ( ! function_exists( 'sophia_after_dark_enable_footer_menu_active_callback' ) ) : + + /** + * Check if foooter menu option is enabled. + * + * @since 1.0.0 + * + * @param WP_Customize_Control $control WP_Customize_Control instance. + * + * @return bool Whether the control is active to the current preview. + */ + function sophia_after_dark_enable_footer_menu_active_callback( $control ) { + if ( false !== $control->manager->get_setting( 'sophia_after_dark_enable_footer_menu' )->value() ) { + return true; + } else { + return false; + } + } + +endif; + + +if ( ! function_exists( 'sophia_after_dark_enable_pnf_latest_posts_active_callback' ) ) : + + /** + * Check if pnf latest posts option is enabled. + * + * @since 1.0.0 + * + * @param WP_Customize_Control $control WP_Customize_Control instance. + * + * @return bool Whether the control is active to the current preview. + */ + function sophia_after_dark_enable_pnf_latest_posts_active_callback( $control ) { + if ( false !== $control->manager->get_setting( 'sophia_after_dark_enable_pnf_latest_posts' )->value() ) { + return true; + } else { + return false; + } + } + +endif; \ No newline at end of file diff --git a/inc/customizer/mt-customizer-additional-panel-options.php b/inc/customizer/mt-customizer-additional-panel-options.php new file mode 100644 index 0000000..5f458e3 --- /dev/null +++ b/inc/customizer/mt-customizer-additional-panel-options.php @@ -0,0 +1,113 @@ +add_section( 'sophia_after_dark_section_social_icons', + array( + 'title' => esc_html__( 'Social Icons', 'sophia-after-dark' ), + 'panel' => 'sophia_after_dark_additional_panel', + 'capability' => 'edit_theme_options', + 'priority' => 5, + 'theme_supports' => '', + ) + ); + + /** + * Repeater field for social icons + */ + $wp_customize->add_setting( + 'sophia_after_dark_social_icons', + array( + 'capability' => 'edit_theme_options', + 'default' => json_encode( array( + array( + 'social_icon' => 'fa fa-twitter', + 'social_url' => '#', + ), + array( + 'social_icon' => 'fa fa-pinterest', + 'social_url' => '#', + ) + ) + ), + 'sanitize_callback' => 'wp_kses_post' + ) + ); + $wp_customize->add_control( new Sophia_After_Dark_Control_Repeater( + $wp_customize, + 'sophia_after_dark_social_icons', + array( + 'label' => __( 'Social Media', 'sophia-after-dark' ), + 'section' => 'sophia_after_dark_section_social_icons', + 'settings' => 'sophia_after_dark_social_icons', + 'priority' => 5, + 'sophia_after_dark_box_label_text' => __( 'Social Media Icons','sophia-after-dark' ), + 'sophia_after_dark_box_add_control_text' => __( 'Add Icon','sophia-after-dark' ) + ), + array( + 'social_icon' => array( + 'type' => 'social_icon', + 'label' => esc_html__( 'Social Icon', 'sophia-after-dark' ), + 'description' => __( 'Choose social media icon.', 'sophia-after-dark' ) + ), + 'social_url' => array( + 'type' => 'url', + 'label' => esc_html__( 'Social Link URL', 'sophia-after-dark' ), + 'description' => __( 'Enter social media url.', 'sophia-after-dark' ) + ), + ) + ) + ); + + /*------------------------------------------------ Breadcrumbs Section ------------------------------------------------* + /** + * Breadcrumbs + */ + $wp_customize->add_section( 'sophia_after_dark_section_breadcrumbs', + array( + 'title' => esc_html__( 'Breadcrumbs', 'sophia-after-dark' ), + 'panel' => 'sophia_after_dark_additional_panel', + 'capability' => 'edit_theme_options', + 'priority' => 10, + 'theme_supports' => '', + ) + ); + + /** + * Toggle field for Enable/Disable breadcrumbs. + * + */ + $wp_customize->add_setting( 'sophia_after_dark_enable_breadcrumb_option', + array( + 'capability' => 'edit_theme_options', + 'default' => true, + 'sanitize_callback' => 'sophia_after_dark_sanitize_checkbox' + ) + ); + + $wp_customize->add_control( new Sophia_After_Dark_Control_Toggle( + $wp_customize, 'sophia_after_dark_enable_breadcrumb_option', + array( + 'label' => __( 'Enable Breadcrumbs', 'sophia-after-dark' ), + 'section' => 'sophia_after_dark_section_breadcrumbs', + 'settings' => 'sophia_after_dark_enable_breadcrumb_option', + 'priority' => 5, + ) + ) + ); + +} \ No newline at end of file diff --git a/inc/customizer/mt-customizer-custom-classes.php b/inc/customizer/mt-customizer-custom-classes.php new file mode 100644 index 0000000..a76e336 --- /dev/null +++ b/inc/customizer/mt-customizer-custom-classes.php @@ -0,0 +1,367 @@ +default ) ) { + $this->json['default'] = $this->default; + } else{ + $this->json['default'] = $this->setting->default; + } + + $this->json['value'] = $this->value(); + $this->json['link'] = $this->get_link(); + $this->json['id'] = $this->id; + $this->json['tooltip'] = $this->tooltip; + + $this->json['inputAttrs'] = ''; + foreach ( $this->input_attrs as $attr => $value ) { + $this->json['inputAttrs'] .= $attr . '="' . esc_attr( $value ) . '" '; + } + } + + protected function content_template() { + ?> + <# if ( data.tooltip ) { #> + + <# } #> + + default ) ) { + $this->json['default'] = $this->default; + } else { + $this->json['default'] = $this->setting->default; + } + + $this->json['value'] = $this->value(); + $this->json['link'] = $this->get_link(); + $this->json['id'] = $this->id; + $this->json['tooltip'] = $this->tooltip; + $this->json['choices'] = $this->choices; + + $this->json['inputAttrs'] = ''; + foreach ( $this->input_attrs as $attr => $value ) { + $this->json['inputAttrs'] .= $attr . '="' . esc_attr( $value ) . '" '; + } + } + + protected function content_template() { + ?> + + <# if ( data.tooltip ) { #> + + <# } #> + +
          + <# for ( key in data.choices ) { #> + <# dataAlt = ( _.isObject( data.choices[ key ] ) && ! _.isUndefined( data.choices[ key ].alt ) ) ? data.choices[ key ].alt : '' #> + checked="checked"<# } #> data-alt="{{ dataAlt }}"> + + + <# } #> +
          + fields = $fields; + $this->sophia_after_dark_box_label = $args['sophia_after_dark_box_label_text'] ; + $this->sophia_after_dark_box_add_control = $args['sophia_after_dark_box_add_control_text']; + parent::__construct( $manager, $id, $args ); + } + + protected function render_content() { + + $values = json_decode( $this->value() ); + $repeater_id = $this->id; + $field_count = count( $values ); + ?> + label ); ?> + + description ) { ?> + + description ); ?> + + + +
            + sophia_after_dark_get_fields(); ?> +
          + + link(); ?> class="mt-repeater-collector" value="value() ); ?>" /> + + + + fields; + $values = json_decode( $this->value() ); + + if ( is_array( $values ) ) { + foreach( $values as $value ) { + ?> +
        • +

          sophia_after_dark_box_label ); ?>

          +
          + $field ) { + $class = isset( $field['class'] ) ? $field['class'] : ''; + ?> +
          + + + + + $key ) ? $value->$key : ''; + $default = isset( $field['default'] ) ? $field['default'] : ''; + + switch ( $field['type'] ) { + /** + * Text field + */ + case 'text': + echo ''; + break; + + /** + * Textarea field + */ + case 'textarea': + echo ''; + break; + + /** + * URL field + */ + case 'url': + echo ''; + break; + + /** + * Icon field + */ + case 'icon': + $sophia_after_dark_font_awesome_icon_array = sophia_after_dark_font_awesome_icon_array(); + echo '
            '; + foreach ( $sophia_after_dark_font_awesome_icon_array as $sophia_after_dark_font_awesome_icon ) { + $icon_class = $new_value == $sophia_after_dark_font_awesome_icon ? 'icon-active' : ''; + echo '
          • '; + } + echo '
          '; + break; + + /** + * Social Icon field + */ + case 'social_icon': + $sophia_after_dark_font_awesome_social_icon_array = sophia_after_dark_font_awesome_social_icon_array(); + echo '
            '; + foreach ( $sophia_after_dark_font_awesome_social_icon_array as $sophia_after_dark_font_awesome_icon ) { + $icon_class = $new_value == $sophia_after_dark_font_awesome_icon ? 'icon-active' : ''; + echo '
          • '; + } + echo '
          '; + break; + + /** + * Select field + */ + case 'select': + $options = $field['options']; + echo ''; + break; + + /** + * Dropdown field + */ + case 'dropdown_pages': + $show_option_none = esc_html__( '— Select a page —', 'sophia-after-dark' ); + $select_field ='data-default="'.esc_attr( $default ).'" data-name="'.esc_attr( $key ).'"'; + $option_none_value = ''; + $dropdown = wp_dropdown_pages( + array( + 'name' => esc_attr( $key ), + 'echo' => '', + 'show_option_none' => esc_html( $show_option_none ), + 'option_none_value' => esc_attr( $option_none_value ), + 'selected' => esc_attr( $new_value ) + ) + ); + + if ( empty( $dropdown ) ) { + $dropdown = sprintf( ''; + } + + // Hackily add in the data link parameter. + $dropdown = str_replace( '
          '; + esc_html_e( 'No image selected', 'sophia-after-dark' ); + echo '
          '; + break; + default: + break; + } + ?> +
          + + +
        • + + add_section( 'sophia_after_dark_section_archive_settings', + array( + 'title' => esc_html__( 'Archive Settings', 'sophia-after-dark' ), + 'panel' => 'sophia_after_dark_design_panel', + 'capability' => 'edit_theme_options', + 'priority' => 5, + 'theme_supports' => '', + ) + ); + + /* + * Radio Image field for archive/blog sidebar layout. + */ + $wp_customize->add_setting( 'sophia_after_dark_archive_sidebar_layout', + array( + 'default' => 'no-sidebar', + 'sanitize_callback' => 'sanitize_key', + ) + ); + $wp_customize->add_control( new Sophia_After_Dark_Control_Radio_Image( + $wp_customize, 'sophia_after_dark_archive_sidebar_layout', + array( + 'label' => esc_html__( 'Archive/Blog Sidebar Layout', 'sophia-after-dark' ), + 'section' => 'sophia_after_dark_section_archive_settings', + 'settings' => 'sophia_after_dark_archive_sidebar_layout', + 'priority' => 10, + 'choices' => array( + 'left-sidebar' => get_template_directory_uri() . '/assets/images/left-sidebar.png', + 'right-sidebar' => get_template_directory_uri() . '/assets/images/right-sidebar.png', + 'no-sidebar' => get_template_directory_uri() . '/assets/images/no-sidebar.png', + 'no-sidebar-center' => get_template_directory_uri() . '/assets/images/no-sidebar-center.png' + ), + ) + ) + ); + + /* + * Radio Image field for arvhive/blog style. + */ + $wp_customize->add_setting( 'sophia_after_dark_archive_style', + array( + 'default' => 'mt-archive--masonry-style', + 'sanitize_callback' => 'sanitize_key', + ) + ); + $wp_customize->add_control( new Sophia_After_Dark_Control_Radio_Image( + $wp_customize, 'sophia_after_dark_archive_style', + array( + 'label' => esc_html__( 'Archive/Blog Style', 'sophia-after-dark' ), + 'section' => 'sophia_after_dark_section_archive_settings', + 'settings' => 'sophia_after_dark_archive_style', + 'priority' => 10, + 'choices' => array( + 'mt-archive--block-grid-style' => get_template_directory_uri() . '/assets/images/archive-block-grid.png', + 'mt-archive--masonry-style' => get_template_directory_uri() . '/assets/images/archive-masonry.png', + ), + ) + ) + ); + + /* + * Text field for archive read more button. + */ + $wp_customize->add_setting( 'sophia_after_dark_archive_read_more', + array( + 'capability' => 'edit_theme_options', + 'default' => esc_html__( 'Discover', 'sophia-after-dark' ), + 'sanitize_callback' => 'sanitize_text_field' + ) + ); + + $wp_customize->add_control( 'sophia_after_dark_archive_read_more', + array( + 'type' => 'text', + 'label' => esc_html__( 'Read More Button', 'sophia-after-dark' ), + 'section' => 'sophia_after_dark_section_archive_settings', + 'settings' => 'sophia_after_dark_archive_read_more', + 'priority' => 15, + ) + ); + + /** + * Toggle field for Enable/Disable title prefix at category pages. + * + */ + $wp_customize->add_setting( 'sophia_after_dark_enable_archive_title_prefix', + array( + 'capability' => 'edit_theme_options', + 'default' => true, + 'sanitize_callback' => 'sophia_after_dark_sanitize_checkbox' + ) + ); + + $wp_customize->add_control( new Sophia_After_Dark_Control_Toggle( + $wp_customize, 'sophia_after_dark_enable_archive_title_prefix', + array( + 'label' => __( 'Enable Title Prefix', 'sophia-after-dark' ), + 'description' => esc_html__( 'Show/Hide title prefix in archive pages.', 'sophia-after-dark' ), + 'section' => 'sophia_after_dark_section_archive_settings', + 'settings' => 'sophia_after_dark_enable_archive_title_prefix', + 'priority' => 20, + ) + ) + ); + + /*------------------------------------------------------- Post Section ------------------------------------------------------------*/ + /** + * Post Settings + */ + $wp_customize->add_section( 'sophia_after_dark_section_post_settings', + array( + 'title' => esc_html__( 'Post Settings', 'sophia-after-dark' ), + 'panel' => 'sophia_after_dark_design_panel', + 'capability' => 'edit_theme_options', + 'priority' => 10, + 'theme_supports' => '', + ) + ); + /* + * Radio Image field for single posts sidebar layout. + */ + $wp_customize->add_setting( 'sophia_after_dark_posts_sidebar_layout', + array( + 'default' => 'right-sidebar', + 'sanitize_callback' => 'sanitize_key', + ) + ); + $wp_customize->add_control( new Sophia_After_Dark_Control_Radio_Image( + $wp_customize, 'sophia_after_dark_posts_sidebar_layout', + array( + 'label' => esc_html__( 'Posts Sidebar Layout', 'sophia-after-dark' ), + 'section' => 'sophia_after_dark_section_post_settings', + 'settings' => 'sophia_after_dark_posts_sidebar_layout', + 'priority' => 5, + 'choices' => array( + 'left-sidebar' => get_template_directory_uri() . '/assets/images/left-sidebar.png', + 'right-sidebar' => get_template_directory_uri() . '/assets/images/right-sidebar.png', + 'no-sidebar' => get_template_directory_uri() . '/assets/images/no-sidebar.png', + 'no-sidebar-center' => get_template_directory_uri() . '/assets/images/no-sidebar-center.png' + ), + ) + ) + ); + + /* + * Toggle field for Enable/Disable related posts. + */ + $wp_customize->add_setting( 'sophia_after_dark_enable_related_posts', + array( + 'capability' => 'edit_theme_options', + 'default' => true, + 'sanitize_callback' => 'sophia_after_dark_sanitize_checkbox' + ) + ); + + $wp_customize->add_control( new Sophia_After_Dark_Control_Toggle( + $wp_customize, 'sophia_after_dark_enable_related_posts', + array( + 'label' => esc_html__( 'Enable Related Posts', 'sophia-after-dark' ), + 'section' => 'sophia_after_dark_section_post_settings', + 'settings' => 'sophia_after_dark_enable_related_posts', + 'priority' => 15, + ) + ) + ); + + /*------------------------------------------------------- Post Section ------------------------------------------------------------*/ + /** + * Page Setting + */ + $wp_customize->add_section( 'sophia_after_dark_section_page_settings', + array( + 'title' => esc_html__( 'Page Settings', 'sophia-after-dark' ), + 'panel' => 'sophia_after_dark_design_panel', + 'capability' => 'edit_theme_options', + 'priority' => 15, + 'theme_supports' => '', + ) + ); + + /* + * Radio Image field for single page sidebar layout. + */ + $wp_customize->add_setting( 'sophia_after_dark_pages_sidebar_layout', + array( + 'default' => 'right-sidebar', + 'sanitize_callback' => 'sanitize_key', + ) + ); + $wp_customize->add_control( new Sophia_After_Dark_Control_Radio_Image( + $wp_customize, 'sophia_after_dark_pages_sidebar_layout', + array( + 'label' => esc_html__( 'Pages Sidebar Layout', 'sophia-after-dark' ), + 'section' => 'sophia_after_dark_section_page_settings', + 'settings' => 'sophia_after_dark_pages_sidebar_layout', + 'priority' => 5, + 'choices' => array( + 'left-sidebar' => get_template_directory_uri() . '/assets/images/left-sidebar.png', + 'right-sidebar' => get_template_directory_uri() . '/assets/images/right-sidebar.png', + 'no-sidebar' => get_template_directory_uri() . '/assets/images/no-sidebar.png', + 'no-sidebar-center' => get_template_directory_uri() . '/assets/images/no-sidebar-center.png' + ), + ) + ) + ); + + /*-------------------------------------------------------------------- 404 Page Settings Section ----------------------------------------------------------------*/ + /** + * 404 Page Settings + */ + $wp_customize->add_section( 'sophia_after_dark_section_pnf_settings', + array( + 'priority' => 20, + 'panel' => 'sophia_after_dark_design_panel', + 'capability' => 'edit_theme_options', + 'theme_supports' => '', + 'title' => __( '404 Page Settings', 'sophia-after-dark' ) + ) + ); + + /** + * Toggle field for Enable/Disable latest posts section at 404 page + */ + $wp_customize->add_setting( 'sophia_after_dark_enable_pnf_latest_posts', + array( + 'capability' => 'edit_theme_options', + 'default' => true, + 'sanitize_callback' => 'sophia_after_dark_sanitize_checkbox' + ) + ); + + $wp_customize->add_control( new Sophia_After_Dark_Control_Toggle( + $wp_customize, 'sophia_after_dark_enable_pnf_latest_posts', + array( + 'label' => __( 'Enable Latest Posts', 'sophia-after-dark' ), + 'section' => 'sophia_after_dark_section_pnf_settings', + 'settings' => 'sophia_after_dark_enable_pnf_latest_posts', + 'priority' => 40, + ) + ) + ); + + /** + * Text field for latest posts section title + */ + $wp_customize->add_setting( 'sophia_after_dark_pnf_latest_title', + array( + 'capability' => 'edit_theme_options', + 'default' => esc_html__( 'You May Like', 'sophia-after-dark' ), + 'sanitize_callback' => 'sanitize_text_field' + ) + ); + + $wp_customize->add_control( 'sophia_after_dark_pnf_latest_title', + array( + 'type' => 'text', + 'label' => esc_html__( 'Section Title', 'sophia-after-dark' ), + 'section' => 'sophia_after_dark_section_pnf_settings', + 'priority' => 45, + 'active_callback' => 'sophia_after_dark_enable_pnf_latest_posts_active_callback', + ) + ); + + /** + * Text field for latest posts count + */ + $wp_customize->add_setting( 'sophia_after_dark_pnf_latest_post_count', + array( + 'capability' => 'edit_theme_options', + 'default' => 3, + 'sanitize_callback' => 'absint', + ) + ); + + $wp_customize->add_control( 'sophia_after_dark_pnf_latest_post_count', + array( + 'type' => 'number', + 'label' => esc_html__( 'Post count', 'sophia-after-dark' ), + 'section' => 'sophia_after_dark_section_pnf_settings', + 'priority' => 50, + 'active_callback' => 'sophia_after_dark_enable_pnf_latest_posts_active_callback', + ) + ); +} \ No newline at end of file diff --git a/inc/customizer/mt-customizer-footer-panel-options.php b/inc/customizer/mt-customizer-footer-panel-options.php new file mode 100644 index 0000000..bb4a69f --- /dev/null +++ b/inc/customizer/mt-customizer-footer-panel-options.php @@ -0,0 +1,156 @@ +add_section( 'sophia_after_dark_section_footer_widget_area', + array( + 'title' => esc_html__( 'Footer Widget Area', 'sophia-after-dark' ), + 'panel' => 'sophia_after_dark_footer_panel', + 'capability' => 'edit_theme_options', + 'priority' => 5, + 'theme_supports' => '', + ) + ); + + /** + * Toggle field for Enable/Disable footer widget area. + */ + $wp_customize->add_setting( 'sophia_after_dark_enable_footer_widget_area', + array( + 'capability' => 'edit_theme_options', + 'default' => true, + 'sanitize_callback' => 'sophia_after_dark_sanitize_checkbox' + ) + ); + + $wp_customize->add_control( new Sophia_After_Dark_Control_Toggle( + $wp_customize, 'sophia_after_dark_enable_footer_widget_area', + array( + 'label' => esc_html__( 'Enable Footer Widget Area', 'sophia-after-dark' ), + 'section' => 'sophia_after_dark_section_footer_widget_area', + 'settings' => 'sophia_after_dark_enable_footer_widget_area', + 'priority' => 5, + ) + ) + ); + + /** + * Radio Image field for Widget Area layout + */ + $wp_customize->add_setting( 'sophia_after_dark_widget_area_layout', + array( + 'default' => 'column-three', + 'sanitize_callback' => 'sanitize_key', + ) + ); + $wp_customize->add_control( new Sophia_After_Dark_Control_Radio_Image( + $wp_customize, 'sophia_after_dark_widget_area_layout', + array( + 'label' => esc_html__( 'Widget Area Layout', 'sophia-after-dark' ), + 'description' => __( 'Choose widget layout from available layouts', 'sophia-after-dark' ), + 'section' => 'sophia_after_dark_section_footer_widget_area', + 'settings' => 'sophia_after_dark_widget_area_layout', + 'priority' => 15, + 'active_callback' => 'sophia_after_dark_enable_footer_widget_area_active_callback', + 'choices' => array( + 'column-four' => get_template_directory_uri() . '/assets/images/footer-4.png', + 'column-three' => get_template_directory_uri() . '/assets/images/footer-3.png', + 'column-two' => get_template_directory_uri() . '/assets/images/footer-2.png', + 'column-one' => get_template_directory_uri() . '/assets/images/footer-1.png' + ), + ) + ) + ); + + /*------------------------------------------------------- Bottom Footer Section --------------------------------------------------------------------------*/ + /** + * Bottom footer + */ + $wp_customize->add_section( 'sophia_after_dark_section_bottom_footer', + array( + 'title' => esc_html__( 'Bottom Footer', 'sophia-after-dark' ), + 'panel' => 'sophia_after_dark_footer_panel', + 'capability' => 'edit_theme_options', + 'priority' => 10, + 'theme_supports' => '', + ) + ); + + /** + * Toggle field for Enable/Disable footer menu. + */ + $wp_customize->add_setting( 'sophia_after_dark_enable_footer_menu', + array( + 'capability' => 'edit_theme_options', + 'default' => true, + 'sanitize_callback' => 'sophia_after_dark_sanitize_checkbox' + ) + ); + + $wp_customize->add_control( new Sophia_After_Dark_Control_Toggle( + $wp_customize, 'sophia_after_dark_enable_footer_menu', + array( + 'label' => esc_html__( 'Enable Footer Menu', 'sophia-after-dark' ), + 'section' => 'sophia_after_dark_section_bottom_footer', + 'settings' => 'sophia_after_dark_enable_footer_menu', + 'priority' => 5, + ) + ) + ); + + + /** + * Text filed for copyright + */ + $wp_customize->add_setting( 'sophia_after_dark_footer_copyright', + array( + 'capability' => 'edit_theme_options', + 'default' => esc_html__( '©1969 Sophia After Dark', 'sophia-after-dark' ), + 'sanitize_callback' => 'sanitize_text_field' + ) + ); + + $wp_customize->add_control( 'sophia_after_dark_footer_copyright', + array( + 'type' => 'text', + 'label' => esc_html__( 'Copyright Text', 'sophia-after-dark' ), + 'section' => 'sophia_after_dark_section_bottom_footer', + 'priority' => 25, + 'active_callback' => 'sophia_after_dark_enable_footer_menu_active_callback', + ) + ); + /** + * Text filed for disclaimer + */ + $wp_customize->add_setting( 'sophia_after_dark_footer_disclaimer', + array( + 'capability' => 'edit_theme_options', + 'default' => esc_html__( 'All trademarks are property of their respective owners', 'sophia-after-dark' ), + 'sanitize_callback' => 'sanitize_text_field' + ) + ); + + $wp_customize->add_control( 'sophia_after_dark_footer_disclaimer', + array( + 'type' => 'text', + 'label' => esc_html__( 'Disclaimer Text', 'sophia-after-dark' ), + 'section' => 'sophia_after_dark_section_bottom_footer', + 'priority' => 25, + 'active_callback' => 'sophia_after_dark_enable_footer_menu_active_callback', + ) + ); +} \ No newline at end of file diff --git a/inc/customizer/mt-customizer-front-panel-options.php b/inc/customizer/mt-customizer-front-panel-options.php new file mode 100644 index 0000000..75db8c0 --- /dev/null +++ b/inc/customizer/mt-customizer-front-panel-options.php @@ -0,0 +1,184 @@ +add_section( 'sophia_after_dark_section_slider', + array( + 'priority' => 10, + 'panel' => 'sophia_after_dark_front_section_panel', + 'capability' => 'edit_theme_options', + 'theme_supports' => '', + 'title' => __( 'Slider Settings', 'sophia-after-dark' ) + ) + ); + + /** + * Toggle field for slider option + * + */ + $wp_customize->add_setting( 'sophia_after_dark_section_slider_option', + array( + 'capability' => 'edit_theme_options', + 'default' => false, + 'sanitize_callback' => 'sophia_after_dark_sanitize_checkbox' + ) + ); + + $wp_customize->add_control( new Sophia_After_Dark_Control_Toggle( + $wp_customize, 'sophia_after_dark_section_slider_option', + array( + 'label' => __( 'Enable Slider Section', 'sophia-after-dark' ), + 'section' => 'sophia_after_dark_section_slider', + 'settings' => 'sophia_after_dark_section_slider_option', + 'priority' => 5, + ) + ) + ); + + /** + * Select field for slider cat select + * + */ + $wp_customize->add_setting( 'sophia_after_dark_section_slider_cat', + array( + 'capability' => 'edit_theme_options', + 'default' => '', + 'sanitize_callback' => 'sophia_after_dark_sanitize_select', + ) + ); + + $wp_customize->add_control( 'sophia_after_dark_section_slider_cat', + array( + 'type' => 'select', + 'label' => esc_html__( 'Slider category', 'sophia-after-dark' ), + 'description' => esc_html__( 'Choose default post category', 'sophia-after-dark' ), + 'section' => 'sophia_after_dark_section_slider', + 'default' => '', + 'priority' => 30, + 'choices' => sophia_after_dark_select_categories_list(), + 'active_callback' => 'sophia_after_dark_section_slider_option_active_callback', + ) + ); + + /** + * Image field for background image in slider section + */ + $wp_customize->add_setting( 'sophia_after_dark_slider_bg_image', + array( + 'capability' => 'edit_theme_options', + 'default' => '', + 'sanitize_callback' => 'esc_url_raw', + ) + ); + + $wp_customize->add_control( new WP_Customize_Image_Control( + $wp_customize, 'sophia_after_dark_slider_bg_image', + array( + 'label' => __( 'Slider Section Background Image', 'sophia-after-dark' ), + 'section' => 'sophia_after_dark_section_slider', + 'settings' => 'sophia_after_dark_slider_bg_image', + 'priority' => 40, + 'active_callback' => 'sophia_after_dark_section_slider_option_active_callback' + ) + ) + ); + + /*--------------------------------------------------------- Featured Posts Section ------------------------------------------------ */ + /** + * Featured Slider Settings + */ + $wp_customize->add_section( 'sophia_after_dark_section_top_featured_post', + array( + 'priority' => 20, + 'panel' => 'sophia_after_dark_front_section_panel', + 'capability' => 'edit_theme_options', + 'theme_supports' => '', + 'title' => esc_html__( 'Featured Posts Settings', 'sophia-after-dark' ), + ) + ); + + /** + * Toggle field for featured slider option + * + */ + $wp_customize->add_setting( 'sophia_after_dark_section_top_featured_posts_option', + array( + 'capability' => 'edit_theme_options', + 'default' => true, + 'sanitize_callback' => 'sophia_after_dark_sanitize_checkbox' + ) + ); + + $wp_customize->add_control( new Sophia_After_Dark_Control_Toggle( + $wp_customize, 'sophia_after_dark_section_top_featured_posts_option', + array( + 'label' => esc_html__( 'Enable Featured Posts Section', 'sophia-after-dark' ), + 'description' => 'This section is displayed after the slider content at the right side minimizing the slider width.', + 'section' => 'sophia_after_dark_section_top_featured_post', + 'settings' => 'sophia_after_dark_section_top_featured_posts_option', + 'priority' => 5, + ) + ) + ); + + /** + * Text field for Featured Posts Title + */ + $wp_customize->add_setting( 'sophia_after_dark_top_featured_posts_title', + array( + 'capability' => 'edit_theme_options', + 'default' => esc_html__( 'Featured News', 'sophia-after-dark' ), + 'sanitize_callback' => 'sanitize_text_field' + ) + ); + + $wp_customize->add_control( 'sophia_after_dark_top_featured_posts_title', + array( + 'type' => 'text', + 'label' => esc_html__( 'Featured News', 'sophia-after-dark' ), + 'section' => 'sophia_after_dark_section_top_featured_post', + 'priority' => 10, + 'active_callback' => 'sophia_after_dark_section_top_featured_posts_option_active_callback', + ) + ); + + /** + * Select field for featured posts type. + */ + $wp_customize->add_setting( 'sophia_after_dark_top_featured_post_order', + array( + 'capability' => 'edit_theme_options', + 'default' => 'default', + 'sanitize_callback' => 'sophia_after_dark_sanitize_select', + ) + ); + + $wp_customize->add_control( 'sophia_after_dark_top_featured_post_order', + array( + 'type' => 'select', + 'label' => esc_html__( 'Featured Post Order', 'sophia-after-dark' ), + 'section' => 'sophia_after_dark_section_top_featured_post', + 'priority' => 15, + 'choices' => array( + 'default' => __( 'Latest Posts', 'sophia-after-dark' ), + 'random' => __( 'Random Posts', 'sophia-after-dark' ), + ), + 'active_callback' => 'sophia_after_dark_section_top_featured_posts_option_active_callback', + ) + ); +} \ No newline at end of file diff --git a/inc/customizer/mt-customizer-general-panel-options.php b/inc/customizer/mt-customizer-general-panel-options.php new file mode 100644 index 0000000..11370cd --- /dev/null +++ b/inc/customizer/mt-customizer-general-panel-options.php @@ -0,0 +1,125 @@ +add_section( 'sophia_after_dark_section_site', + array( + 'priority' => 40, + 'panel' => 'sophia_after_dark_general_panel', + 'capability' => 'edit_theme_options', + 'theme_supports' => '', + 'title' => __( 'Site Settings', 'sophia-after-dark' ) + + ) + ); + + /** + * Toggle field for Enable/Disable preloader. + * + */ + $wp_customize->add_setting( 'sophia_after_dark_enable_preloader', + array( + 'capability' => 'edit_theme_options', + 'default' => true, + 'sanitize_callback' => 'sophia_after_dark_sanitize_checkbox' + ) + ); + + $wp_customize->add_control( new Sophia_After_Dark_Control_Toggle( + $wp_customize, 'sophia_after_dark_enable_preloader', + array( + 'label' => __( 'Enable Preloader', 'sophia-after-dark' ), + 'section' => 'sophia_after_dark_section_site', + 'settings' => 'sophia_after_dark_enable_preloader', + 'priority' => 5, + ) + ) + ); + + /** + * Toggle field for Enable/Disable wow animation. + * + */ + $wp_customize->add_setting( 'sophia_after_dark_enable_wow_animation', + array( + 'capability' => 'edit_theme_options', + 'default' => true, + 'sanitize_callback' => 'sophia_after_dark_sanitize_checkbox' + ) + ); + + $wp_customize->add_control( new Sophia_After_Dark_Control_Toggle( + $wp_customize, 'sophia_after_dark_enable_wow_animation', + array( + 'label' => __( 'Enable Wow Animation', 'sophia-after-dark' ), + 'section' => 'sophia_after_dark_section_site', + 'settings' => 'sophia_after_dark_enable_wow_animation', + 'priority' => 10, + ) + ) + ); + + /** + * Radio image field for Archive Sidebar + * + * @since 1.0.0 + */ + $wp_customize->add_setting( 'sophia_after_dark_site_layout', + array( + 'default' => 'site-layout--wide', + 'sanitize_callback' => 'sanitize_key', + ) + ); + $wp_customize->add_control( new Sophia_After_Dark_Control_Radio_Image( + $wp_customize, 'sophia_after_dark_site_layout', + array( + 'label' => __( 'Site Layout', 'sophia-after-dark' ), + 'description' => __( 'Choose site layout from available layouts', 'sophia-after-dark' ), + 'section' => 'sophia_after_dark_section_site', + 'settings' => 'sophia_after_dark_site_layout', + 'priority' => 15, + 'choices' => array( + 'site-layout--wide' => get_template_directory_uri() . '/assets/images/full-width.png', + 'site-layout--boxed' => get_template_directory_uri() . '/assets/images/boxed-layout.png' + ), + ) + ) + ); + + /** + * Toggle field for block based widget editor. + */ + $wp_customize->add_setting( 'sophia_after_dark_enable_widgets_editor', + array( + 'capability' => 'edit_theme_options', + 'default' => false, + 'sanitize_callback' => 'sophia_after_dark_sanitize_checkbox' + ) + ); + + $wp_customize->add_control( new Sophia_After_Dark_Control_Toggle( + $wp_customize, 'sophia_after_dark_enable_widgets_editor', + array( + 'label' => __( 'Enable Widgets Editor', 'sophia-after-dark' ), + 'description' => __( 'Enable/disable Block-based Widgets Editor(since WordPress 5.8).', 'sophia-after-dark' ), + 'section' => 'sophia_after_dark_section_site', + 'settings' => 'sophia_after_dark_enable_widgets_editor', + 'priority' => 15, + ) + ) + ); +} \ No newline at end of file diff --git a/inc/customizer/mt-customizer-header-panel-options.php b/inc/customizer/mt-customizer-header-panel-options.php new file mode 100644 index 0000000..7313ece --- /dev/null +++ b/inc/customizer/mt-customizer-header-panel-options.php @@ -0,0 +1,327 @@ +add_section( 'sophia_after_dark_section_top_header', + array( + 'priority' => 10, + 'panel' => 'sophia_after_dark_header_panel', + 'capability' => 'edit_theme_options', + 'theme_supports' => '', + 'title' => __( 'Top Header Settings', 'sophia-after-dark' ) + ) + ); + + /** + * Toggle field for Enable/Disable Top Header section + * + */ + $wp_customize->add_setting( 'sophia_after_dark_enable_top_header', + array( + 'capability' => 'edit_theme_options', + 'default' => true, + 'sanitize_callback' => 'sophia_after_dark_sanitize_checkbox' + ) + ); + + $wp_customize->add_control( new Sophia_After_Dark_Control_Toggle( + $wp_customize, 'sophia_after_dark_enable_top_header', + array( + 'label' => __( 'Enable Top Header', 'sophia-after-dark' ), + 'description' => esc_html__( 'Show/Hide top header section.', 'sophia-after-dark' ), + 'section' => 'sophia_after_dark_section_top_header', + 'settings' => 'sophia_after_dark_enable_top_header', + 'priority' => 10, + ) + ) + ); + + /** + * Toggle field for Enable/Disable trending section. + * + */ + $wp_customize->add_setting( 'sophia_after_dark_enable_trending', + array( + 'capability' => 'edit_theme_options', + 'default' => false, + 'sanitize_callback' => 'sophia_after_dark_sanitize_checkbox' + ) + ); + + $wp_customize->add_control( new Sophia_After_Dark_Control_Toggle( + $wp_customize, 'sophia_after_dark_enable_trending', + array( + 'label' => esc_html__( 'Enable Trending Section', 'sophia-after-dark' ), + 'description' => esc_html__( 'Trending section shows the popular tags.', 'sophia-after-dark' ), + 'section' => 'sophia_after_dark_section_top_header', + 'settings' => 'sophia_after_dark_enable_trending', + 'priority' => 10, + 'active_callback' => 'sophia_after_dark_enable_top_header_active_callback', + ) + ) + ); + + /** + * checkox for before icon in tags. + * + */ + $wp_customize->add_setting( 'sophia_after_dark_enable_trending_tag_before_icon', + array( + 'capability' => 'edit_theme_options', + 'default' => true, + 'sanitize_callback' => 'sophia_after_dark_sanitize_checkbox' + ) + ); + + $wp_customize->add_control( 'sophia_after_dark_enable_trending_tag_before_icon', + array( + 'type' => 'checkbox', + 'label' => esc_html__( 'Add Icon Before Tag', 'sophia-after-dark' ), + 'description' => esc_html__( 'Show/Hide Hash Icon before tag.', 'sophia-after-dark' ), + 'section' => 'sophia_after_dark_section_top_header', + 'priority' => 20, + 'active_callback' => 'sophia_after_dark_enable_top_header_trending_active_callback', + ) + ); + + /** + * Text field for trending label. + * + */ + $wp_customize->add_setting( 'sophia_after_dark_trending_label', + array( + 'capability' => 'edit_theme_options', + 'default' => esc_html__( 'Trending Now', 'sophia-after-dark' ), + 'sanitize_callback' => 'sanitize_text_field' + ) + ); + + $wp_customize->add_control( 'sophia_after_dark_trending_label', + array( + 'type' => 'text', + 'label' => esc_html__( 'Trending Label', 'sophia-after-dark' ), + 'section' => 'sophia_after_dark_section_top_header', + 'priority' => 25, + 'active_callback' => 'sophia_after_dark_enable_top_header_trending_active_callback', + ) + ); + + /** + * Select field of trending tags orderby. + * + */ + $wp_customize->add_setting( 'sophia_after_dark_trending_tags_orderby', + array( + 'capability' => 'edit_theme_options', + 'default' => '', + 'sanitize_callback' => 'sophia_after_dark_sanitize_select', + ) + ); + + $wp_customize->add_control( 'sophia_after_dark_trending_tags_orderby', + array( + 'type' => 'select', + 'label' => esc_html__( 'Tags Orderby', 'sophia-after-dark' ), + 'section' => 'sophia_after_dark_section_top_header', + 'default' => '', + 'priority' => 30, + 'choices' => array( + '' => esc_html__( 'Default', 'sophia-after-dark' ), + 'count' => esc_html__( 'Count', 'sophia-after-dark' ), + ), + 'active_callback' => 'sophia_after_dark_enable_top_header_trending_active_callback', + ) + ); + + /** + * Number field of trending tags count. + * + */ + $wp_customize->add_setting( 'sophia_after_dark_trending_tags_count', + array( + 'capability' => 'edit_theme_options', + 'default' => '5', + 'sanitize_callback' => 'absint', + ) + ); + + $wp_customize->add_control( 'sophia_after_dark_trending_tags_count', + array( + 'type' => 'number', + 'label' => esc_html__( 'Tags Count', 'sophia-after-dark' ), + 'section' => 'sophia_after_dark_section_top_header', + 'priority' => 35, + 'active_callback' => 'sophia_after_dark_enable_top_header_trending_active_callback', + ) + ); + + /** + * Toggle field for Enable/Disable live now button. + * + */ + $wp_customize->add_setting( 'sophia_after_dark_enable_live_now', + array( + 'capability' => 'edit_theme_options', + 'default' => false, + 'sanitize_callback' => 'sophia_after_dark_sanitize_checkbox' + ) + ); + + $wp_customize->add_control( new Sophia_After_Dark_Control_Toggle( + $wp_customize, 'sophia_after_dark_enable_live_now', + array( + 'label' => esc_html__( 'Enable Live Now Button', 'sophia-after-dark' ), + 'section' => 'sophia_after_dark_section_top_header', + 'settings' => 'sophia_after_dark_enable_live_now', + 'priority' => 40, + 'active_callback' => 'sophia_after_dark_enable_top_header_active_callback', + ) + ) + ); + + /** + * Text field for live now button label. + * + */ + $wp_customize->add_setting( 'sophia_after_dark_live_now_label', + array( + 'capability' => 'edit_theme_options', + 'default' => esc_html__( 'Live Now', 'sophia-after-dark' ), + 'sanitize_callback' => 'sanitize_text_field' + ) + ); + + $wp_customize->add_control( 'sophia_after_dark_live_now_label', + array( + 'type' => 'text', + 'label' => esc_html__( 'Button Label', 'sophia-after-dark' ), + 'section' => 'sophia_after_dark_section_top_header', + 'settings' => 'sophia_after_dark_live_now_label', + 'priority' => 45, + 'active_callback' => 'sophia_after_dark_enable_top_header_live_now_active_callback', + ) + ); + + /** + * Text field for live now button link. + * + */ + $wp_customize->add_setting( 'sophia_after_dark_live_now_link', + array( + 'capability' => 'edit_theme_options', + 'sanitize_callback' => 'esc_url_raw' + ) + ); + + $wp_customize->add_control( 'sophia_after_dark_live_now_link', + array( + 'type' => 'text', + 'label' => esc_html__( 'Button Link', 'sophia-after-dark' ), + 'section' => 'sophia_after_dark_section_top_header', + 'settings' => 'sophia_after_dark_live_now_link', + 'priority' => 50, + 'active_callback' => 'sophia_after_dark_enable_top_header_live_now_active_callback', + 'input_attrs' => array( + 'placeholder' => "https://www.youtube.com/channel/UCnGp3UHMB4DH8W_KmSmrCEw" + ) + ) + ); + + /*------------------------------------------ Header: Extra Options ----------------------------------------*/ + /** + * Header Extra Options + */ + $wp_customize->add_section( 'sophia_after_dark_section_header_extra', + array( + 'priority' => 30, + 'panel' => 'sophia_after_dark_header_panel', + 'capability' => 'edit_theme_options', + 'theme_supports' => '', + 'title' => __( 'Extra Options', 'sophia-after-dark' ) + ) + ); + + /** + * Toggle field for Enable/Disable sticky menu. + * + */ + $wp_customize->add_setting( 'sophia_after_dark_enable_sticky_menu', + array( + 'capability' => 'edit_theme_options', + 'default' => true, + 'sanitize_callback' => 'sophia_after_dark_sanitize_checkbox' + ) + ); + + $wp_customize->add_control( new Sophia_After_Dark_Control_Toggle( + $wp_customize, 'sophia_after_dark_enable_sticky_menu', + array( + 'label' => esc_html__( 'Enable Sticky Menu', 'sophia-after-dark' ), + 'section' => 'sophia_after_dark_section_header_extra', + 'settings' => 'sophia_after_dark_enable_sticky_menu', + 'priority' => 5, + ) + ) + ); + + /** + * Toggle field for Enable/Disable social icons. + * + */ + $wp_customize->add_setting( 'sophia_after_dark_enable_header_social_icons', + array( + 'capability' => 'edit_theme_options', + 'default' => false, + 'sanitize_callback' => 'sophia_after_dark_sanitize_checkbox' + ) + ); + + $wp_customize->add_control( new Sophia_After_Dark_Control_Toggle( + $wp_customize, 'sophia_after_dark_enable_header_social_icons', + array( + 'label' => esc_html__( 'Enable Social Icons', 'sophia-after-dark' ), + 'section' => 'sophia_after_dark_section_header_extra', + 'settings' => 'sophia_after_dark_enable_header_social_icons', + 'priority' => 10, + ) + ) + ); + + /** + * Toggle field for Enable/Disable search icon. + * + */ + $wp_customize->add_setting( 'sophia_after_dark_enable_search_icon', + array( + 'capability' => 'edit_theme_options', + 'default' => true, + 'sanitize_callback' => 'sophia_after_dark_sanitize_checkbox' + ) + ); + + $wp_customize->add_control( new Sophia_After_Dark_Control_Toggle( + $wp_customize, 'sophia_after_dark_enable_search_icon', + array( + 'label' => esc_html__( 'Enable Search Icon', 'sophia-after-dark' ), + 'section' => 'sophia_after_dark_section_header_extra', + 'settings' => 'sophia_after_dark_enable_search_icon', + 'priority' => 15, + ) + ) + ); +} \ No newline at end of file diff --git a/inc/customizer/mt-customizer-panels.php b/inc/customizer/mt-customizer-panels.php new file mode 100644 index 0000000..e76238e --- /dev/null +++ b/inc/customizer/mt-customizer-panels.php @@ -0,0 +1,86 @@ +add_panel( 'sophia_after_dark_general_panel', + array( + 'priority' => 10, + 'capability' => 'edit_theme_options', + 'theme_supports' => '', + 'title' => __( 'General Settings', 'sophia-after-dark' ), + ) + ); + + /** + * Header Settings Panel + */ + $wp_customize->add_panel( 'sophia_after_dark_header_panel', + array( + 'priority' => 15, + 'capability' => 'edit_theme_options', + 'theme_supports' => '', + 'title' => __( 'Header Settings', 'sophia-after-dark' ), + ) + ); + + /** + * Front Settings Panel + */ + $wp_customize->add_panel( 'sophia_after_dark_front_section_panel', + array( + 'priority' => 20, + 'capability' => 'edit_theme_options', + 'theme_supports' => '', + 'title' => __( 'Front Sections', 'sophia-after-dark' ), + ) + ); + + /** + * Design Settings Panel + */ + $wp_customize->add_panel( 'sophia_after_dark_design_panel', + array( + 'priority' => 35, + 'capability' => 'edit_theme_options', + 'theme_supports' => '', + 'title' => __( 'Design Settings', 'sophia-after-dark' ), + ) + ); + + /** + * Additional Features Panel + */ + $wp_customize->add_panel( 'sophia_after_dark_additional_panel', + array( + 'priority' => 40, + 'capability' => 'edit_theme_options', + 'theme_supports' => '', + 'title' => __( 'Additional Features', 'sophia-after-dark' ), + ) + ); + + /** + * Footer Settings Panel + */ + $wp_customize->add_panel( 'sophia_after_dark_footer_panel', + array( + 'priority' => 45, + 'capability' => 'edit_theme_options', + 'theme_supports' => '', + 'title' => __( 'Footer Settings', 'sophia-after-dark' ), + ) + ); +} \ No newline at end of file diff --git a/inc/customizer/mt-customizer.php b/inc/customizer/mt-customizer.php new file mode 100644 index 0000000..f27e165 --- /dev/null +++ b/inc/customizer/mt-customizer.php @@ -0,0 +1,103 @@ +get_setting( 'blogname' )->transport = 'postMessage'; + $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; + $wp_customize->get_section( 'title_tagline' )->panel = 'sophia_after_dark_general_panel'; + $wp_customize->get_section( 'title_tagline' )->priority = '5'; $wp_customize->get_section( 'background_image' )->panel = 'sophia_after_dark_general_panel'; + $wp_customize->get_section( 'background_image' )->priority = '15'; + $wp_customize->get_section( 'static_front_page' )->panel = 'sophia_after_dark_general_panel'; + $wp_customize->get_section( 'static_front_page' )->priority = '20'; + + $wp_customize->get_section( 'header_image' )->panel = 'sophia_after_dark_header_panel'; + $wp_customize->get_section( 'header_image' )->priority = '5'; + $wp_customize->get_section( 'header_image' )->description = __( 'Header Image for only Innerpages', 'sophia-after-dark' ); + + if ( isset( $wp_customize->selective_refresh ) ) { + $wp_customize->selective_refresh->add_partial( 'blogname', array( + 'selector' => '.site-title a', + 'render_callback' => 'sophia_after_dark_customize_partial_blogname', + ) ); + $wp_customize->selective_refresh->add_partial( 'blogdescription', array( + 'selector' => '.site-description', + 'render_callback' => 'sophia_after_dark_customize_partial_blogdescription', + ) ); + } + + /** + * Load customizer custom classes. + */ + $wp_customize->register_control_type( 'sophia_after_dark_Control_Toggle' ); + $wp_customize->register_control_type( 'sophia_after_dark_Control_Radio_Image' ); +} +add_action( 'customize_register', 'sophia_after_dark_customize_register' ); + +/** + * Render the site title for the selective refresh partial. + * + * @return void + */ +function sophia_after_dark_customize_partial_blogname() { + bloginfo( 'name' ); +} + +/** + * Render the site tagline for the selective refresh partial. + * + * @return void + */ +function sophia_after_dark_customize_partial_blogdescription() { + bloginfo( 'description' ); +} + +/** + * Binds JS handlers to make Theme Customizer preview reload changes asynchronously. + */ +function sophia_after_dark_customize_preview_js() { + wp_enqueue_script( 'sophia-after-dark-customizer', get_template_directory_uri() . '/assets/js/customizer.js', array( 'customize-preview' ), '20151215', true ); +} +add_action( 'customize_preview_init', 'sophia_after_dark_customize_preview_js' ); + +/*----------------------------------------------------------------------------------------------------------------------------------------*/ +/** + * Enqueue required scripts/styles for customizer panel + * + * @since 1.0.0 + */ +function sophia_after_dark_customize_backend_scripts() { + global $sophia_after_dark_theme_version; + + wp_enqueue_style( 'sophia-after-dark--admin-customizer-style', get_template_directory_uri() . '/assets/css/mt-customizer-styles.css', array(), esc_attr( esc_attr( $sophia_after_dark_theme_version ) ) ); + wp_enqueue_style( 'jquery-ui', esc_url( get_template_directory_uri() . '/assets/css/jquery-ui.css' ) ); + wp_enqueue_style( 'font-awesome-customize', get_template_directory_uri() . '/assets/library/font-awesome/css/font-awesome.min.css', array(), '4.7.0' ); + + wp_enqueue_script( 'sophia-after-dark--admin-customizer-script', get_template_directory_uri() . '/assets/js/mt-customizer-controls.js', array( 'jquery', 'customize-controls' ), esc_attr( $sophia_after_dark_theme_version ), true ); +} +add_action( 'customize_controls_enqueue_scripts', 'sophia_after_dark_customize_backend_scripts', 10 ); + +/** + * Add Kirki required file for custom fields + */ +require get_template_directory() . '/inc/customizer/mt-customizer-custom-classes.php'; +require get_template_directory() . '/inc/customizer/mt-customizer-panels.php'; +require get_template_directory() . '/inc/customizer/mt-sanitize.php'; +require get_template_directory() . '/inc/customizer/mt-callback.php'; + +require get_template_directory() . '/inc/customizer/mt-customizer-general-panel-options.php'; +require get_template_directory() . '/inc/customizer/mt-customizer-header-panel-options.php'; +require get_template_directory() . '/inc/customizer/mt-customizer-front-panel-options.php'; +require get_template_directory() . '/inc/customizer/mt-customizer-additional-panel-options.php'; +require get_template_directory() . '/inc/customizer/mt-customizer-design-panel-options.php'; +require get_template_directory() . '/inc/customizer/mt-customizer-footer-panel-options.php'; \ No newline at end of file diff --git a/inc/customizer/mt-sanitize.php b/inc/customizer/mt-sanitize.php new file mode 100644 index 0000000..a963995 --- /dev/null +++ b/inc/customizer/mt-sanitize.php @@ -0,0 +1,47 @@ +manager->get_control( $setting->id )->choices; + + // If the input is a valid key, return it; otherwise, return the default. + return ( array_key_exists( $input, $choices ) ? $input : $setting->default ); + } + +endif; \ No newline at end of file diff --git a/inc/hooks/mt-custom-hooks.php b/inc/hooks/mt-custom-hooks.php new file mode 100644 index 0000000..381b261 --- /dev/null +++ b/inc/hooks/mt-custom-hooks.php @@ -0,0 +1,594 @@ +'; + echo '
          '; + } + +endif; + +if ( ! function_exists( 'sophia_after_dark_site_branding' ) ) : + + /** + * function to display site branding + */ + function sophia_after_dark_site_branding() { +?> +
          +
          +
          + +

          + +

          + +

          + +
          +
          + +
          +
          +
          +'; + echo '
          '; + } + +endif; + +if ( ! function_exists( 'sophia_after_dark_header_main_menu' ) ) : + + /** + * function to display primary menu + */ + function sophia_after_dark_header_main_menu() { + $sophia_after_dark_menu_toggle_text = apply_filters( 'sophia_after_dark_menu_toggle_text', __( 'Menu', 'sophia-after-dark' ) ); +?> +
          + + +
          +'; + } + +endif; + +if ( ! function_exists( 'sophia_after_dark_menu_social_icons' ) ) : + + /** + * function to display social icons at menu section + */ + function sophia_after_dark_menu_social_icons() { + $sophia_after_dark_enable_header_social_icons = get_theme_mod( 'sophia_after_dark_enable_header_social_icons', false ); + if ( false === $sophia_after_dark_enable_header_social_icons ) { + return; + } + $sophia_after_dark_menu_social_icons_label = apply_filters( 'sophia_after_dark_menu_social_icons_label', __( 'Follow Us: ', 'sophia-after-dark' ) ); +?> +
          + + +
          + + +'; + } + +endif; + +if ( ! function_exists( 'sophia_after_dark_menu_wrapper_end' ) ) : + + /** + * function to end menu wrapper + */ + function sophia_after_dark_menu_wrapper_end() { + echo '
          '; + echo '
          '; + } + +endif; + +if ( ! function_exists( 'sophia_after_dark_main_header_end' ) ) : + + /** + * function to end header section + */ + function sophia_after_dark_main_header_end() { + echo '
          '; + echo ''; + } + +endif; + +/** + * manage functions at sophia_after_dark_main_header hook + */ +add_action( 'sophia_after_dark_main_header', 'sophia_after_dark_main_header_start', 5 ); +add_action( 'sophia_after_dark_main_header', 'sophia_after_dark_site_branding', 10 ); +add_action( 'sophia_after_dark_main_header', 'sophia_after_dark_menu_wrapper_start', 15 ); +add_action( 'sophia_after_dark_main_header', 'sophia_after_dark_header_main_menu', 20 ); +add_action( 'sophia_after_dark_main_header', 'sophia_after_dark_menu_icon_wrapper_start', 25 ); +add_action( 'sophia_after_dark_main_header', 'sophia_after_dark_menu_social_icons', 30 ); +add_action( 'sophia_after_dark_main_header', 'sophia_after_dark_menu_search_icon', 35 ); +add_action( 'sophia_after_dark_main_header', 'sophia_after_dark_menu_icon_wrapper_end', 40 ); +add_action( 'sophia_after_dark_main_header', 'sophia_after_dark_menu_wrapper_end', 45 ); +add_action( 'sophia_after_dark_main_header', 'sophia_after_dark_main_header_end', 50 ); + +/*----------------------------------------------------------------------------------------------------------------------------------*/ +if ( ! function_exists( 'sophia_after_dark_header_categories_lists_content' ) ) : + + /** + * function to display categories lists + */ + function sophia_after_dark_header_categories_lists_content() { + $get_categories = get_categories( array( 'orderby' => 'name', 'order' => 'ASC' ) ); +?> +
          + +
          + +
          +
          +

          +
          +
          + +
          +
          +'. esc_html( $sophia_after_dark_scroll_top_text ) .'
          '; + } + +endif; + +/*----------------------------------------------------------------------------------------------------------------------------------*/ +if ( ! function_exists( 'sophia_after_dark_innerpage_header_start' ) ) : + + /** + * function to manage starting div of section + */ + function sophia_after_dark_innerpage_header_start() { + $inner_header_attribute = ''; + $inner_header_attribute = apply_filters( 'sophia_after_dark_inner_header_style_attribute', $inner_header_attribute ); + if ( !empty( $inner_header_attribute ) ) { + $header_class = 'has-bg-img'; + } else { + $header_class = 'no-bg-img'; + } +?> +
          > +
          +', '' ); + } elseif ( is_archive() ) { + the_archive_title( '

          ', '

          ' ); + the_archive_description( '
          ', '
          ' ); + } elseif ( is_search() ) { + ?> +

          ' . get_search_query() . '' ); ?>

          + '. esc_html( 'Error 404', 'sophia-after-dark' ) .''; + } elseif ( is_home() ) { + $page_for_posts_id = get_option( 'page_for_posts' ); + $page_title = get_the_title( $page_for_posts_id ); + ?> +

          + + + +
          +
          + +
          +
          +
          +
          + esc_attr( $slider_cat_slug ), + 'meta_key' => '_thumbnail_id', + 'posts_per_page' => absint( $slide_post_count ) + ); + $slider_post_query = new WP_Query( $slider_args ); + if ( $slider_post_query->have_posts() ) : + while ( $slider_post_query-> have_posts() ) : + $slider_post_query -> the_post(); + $post_id = get_the_ID(); + $image_url = get_the_post_thumbnail_url( $post_id, 'large' ); + if ( ! empty( $image_url ) ) { + $slider_style = 'style="background:url('. esc_url( $image_url ) .') no-repeat scroll center center; background-size:cover"'; + } else { + $slider_style = ''; + } + ?> +
          > +
          + +
          + +
          + +
          +
          + '; + if ( ! empty( $sophia_after_dark_top_featured_posts_title ) ) { + echo '
          '.esc_html( $sophia_after_dark_top_featured_posts_title ).'
          '; + } + + $sophia_after_dark_top_featured_post_order = get_theme_mod( 'sophia_after_dark_top_featured_post_order', 'default' ); + $featured_posts_per_page = apply_filters( 'sophia_after_dark_featured_post_count', 5 ); + $top_featured_post_args = array( + 'post_type' => 'post', + 'posts_per_page' => absint( $featured_posts_per_page ), + ); + if ( 'random' == $sophia_after_dark_top_featured_post_order ) { + $top_featured_post_args['orderby'] = 'rand'; + } + $top_featured_post_query = new WP_Query( $top_featured_post_args ); + if ( $top_featured_post_query -> have_posts() ) : + echo '
          '; + $featured_post_count = 1; + while ( $top_featured_post_query -> have_posts() ) : $top_featured_post_query -> the_post(); + ?> +
          +
          + +
          +
          +
          +
          + +
          + ', '' ); ?> +
          +
          +
          + '; + endif; + echo '
          '; + } + ?> +
          +
          +'; + } + +endif; + +if ( ! function_exists( 'sophia_after_dark_footer_sidebar' ) ) : + + /** + * function to display footer widget area + */ + function sophia_after_dark_footer_sidebar() { + $sophia_after_dark_footer_widget_option = get_theme_mod( 'sophia_after_dark_enable_footer_widget_area', true ); + if ( true === $sophia_after_dark_footer_widget_option ) { + get_sidebar( 'footer' ); + } + } + +endif; + +if ( ! function_exists( 'sophia_after_dark_bottom_footer' ) ) : + + /** + * function to display bottom footer section + */ + function sophia_after_dark_bottom_footer() { +?> + +'; + } + +endif; + +/** + * manage the function at sophia_after_dark_footer hook + */ +add_action( 'sophia_after_dark_footer', 'sophia_after_dark_footer_start', 5 ); +add_action( 'sophia_after_dark_footer', 'sophia_after_dark_footer_sidebar', 10 ); +add_action( 'sophia_after_dark_footer', 'sophia_after_dark_bottom_footer', 15 ); +add_action( 'sophia_after_dark_footer', 'sophia_after_dark_footer_end', 20 ); \ No newline at end of file diff --git a/inc/hooks/mt-top-header-hooks.php b/inc/hooks/mt-top-header-hooks.php new file mode 100644 index 0000000..135a613 --- /dev/null +++ b/inc/hooks/mt-top-header-hooks.php @@ -0,0 +1,116 @@ +'; + echo '
          '; + } + +endif; + +if ( ! function_exists( 'sophia_after_dark_top_header_end' ) ) : + + /** + * function to end top header section + */ + function sophia_after_dark_top_header_end() { + echo '
          '; + echo '
          '; + } + +endif; + +if ( ! function_exists( 'sophia_after_dark_trending_section' ) ) : + + /** + * function to display the trending tags sections + * + */ + function sophia_after_dark_trending_section() { + $sophia_after_dark_enable_trending = get_theme_mod( 'sophia_after_dark_enable_trending', false ); + if ( false === $sophia_after_dark_enable_trending ){ + return; + } + $sophia_after_dark_enable_trending_tag_before_icon = get_theme_mod( 'sophia_after_dark_enable_trending_tag_before_icon', true ); + if ( $sophia_after_dark_enable_trending_tag_before_icon === true ){ + $before_icon = 'tag-before-icon'; + }else{ + $before_icon = ''; + } + $trending_label = get_theme_mod( 'sophia_after_dark_trending_label', __( 'Trending Now', 'sophia-after-dark' ) ); +?> + + + + +
          + +
          + 'main', + 'render' => 'sophia_after_dark_infinite_scroll_render', + 'footer' => 'page' + ) ); + + // Add theme support for Responsive Videos. + add_theme_support( 'jetpack-responsive-videos' ); + + // Add theme support for Content Options + add_theme_support( 'jetpack-content-options', array( + 'post-details' => array( + 'stylesheet' => 'sophia-after-dark-style', + 'date' => '.posted-on', + 'categories' => '.cat-links', + 'tags' => '.tags-links', + 'author' => '.byline', + 'comment' => '.comments-link', + ), + 'featured-images' => array( + 'archive' => true, + 'post' => true, + 'page' => true, + ), + ) ); +} +add_action( 'after_setup_theme', 'sophia_after_dark_jetpack_setup' ); + +/** + * Custom render function for Infinite Scroll + */ +function sophia_after_dark_infinite_scroll_render() { + while ( have_posts() ) { + the_post(); + if ( is_search() ) : + get_template_part( 'template-parts/content', 'search' ); + else : + get_template_part( 'template-parts/content', get_post_type() ); + endif; + } +} \ No newline at end of file diff --git a/inc/metaboxes/mt-post-sidebar-meta.php b/inc/metaboxes/mt-post-sidebar-meta.php new file mode 100644 index 0000000..4e2200b --- /dev/null +++ b/inc/metaboxes/mt-post-sidebar-meta.php @@ -0,0 +1,116 @@ + array( + 'id' => 'post-default-sidebar', + 'value' => 'layout--default-sidebar', + 'label' => __( 'Default Sidebar', 'sophia-after-dark' ), + 'thumbnail' => get_template_directory_uri() . '/assets/images/default-sidebar.png' + ), + 'left-sidebar' => array( + 'id' => 'post-left-sidebar', + 'value' => 'left-sidebar', + 'label' => __( 'Left sidebar', 'sophia-after-dark' ), + 'thumbnail' => get_template_directory_uri() . '/assets/images/left-sidebar.png' + ), + 'right-sidebar' => array( + 'id' => 'post-right-sidebar', + 'value' => 'right-sidebar', + 'label' => __( 'Right sidebar', 'sophia-after-dark' ), + 'thumbnail' => get_template_directory_uri() . '/assets/images/right-sidebar.png' + ), + 'no-sidebar' => array( + 'id' => 'post-no-sidebar', + 'value' => 'no-sidebar', + 'label' => __( 'No sidebar Full width', 'sophia-after-dark' ), + 'thumbnail' => get_template_directory_uri() . '/assets/images/no-sidebar.png' + ), + 'no-sidebar-center' => array( + 'id' => 'post-no-sidebar-center', + 'value' => 'no-sidebar-center', + 'label' => __( 'No sidebar Content Centered', 'sophia-after-dark' ), + 'thumbnail' => get_template_directory_uri() . '/assets/images/no-sidebar-center.png' + ) + ); + + // Check for previously set. + $post_sidebar_layout = get_post_meta( $post->ID, 'sophia_after_dark_post_sidebar_layout', true ); + + // If it is then we use it otherwise set to default. + $post_sidebar_layout = ( $post_sidebar_layout ) ? $post_sidebar_layout : 'layout--default-sidebar'; + + // Create our nonce field. + wp_nonce_field( 'sophia_after_dark_nonce_' . basename( __FILE__ ) , 'sophia_after_dark_sidebar_layout_nonce' ); + ?> +
          +
          + + /> + + +
          +
          + + * @copyright Copyright (c) 2008 - 2017, Justin Tadlock + * @link https://themehybrid.com/plugins/breadcrumb-trail + * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + */ + +/** + * Shows a breadcrumb for all types of pages. This is a wrapper function for the Breadcrumb_Trail class, + * which should be used in theme templates. + * + * @since 0.1.0 + * @access public + * @param array $args Arguments to pass to Breadcrumb_Trail. + * @return void + */ +function breadcrumb_trail( $args = array() ) { + + $breadcrumb = apply_filters( 'breadcrumb_trail_object', null, $args ); + + if ( ! is_object( $breadcrumb ) ) + $breadcrumb = new Breadcrumb_Trail( $args ); + + return $breadcrumb->trail(); +} + +/** + * Creates a breadcrumbs menu for the site based on the current page that's being viewed by the user. + * + * @since 0.6.0 + * @access public + */ +class Breadcrumb_Trail { + + /** + * Array of items belonging to the current breadcrumb trail. + * + * @since 0.1.0 + * @access public + * @var array + */ + public $items = array(); + + /** + * Arguments used to build the breadcrumb trail. + * + * @since 0.1.0 + * @access public + * @var array + */ + public $args = array(); + + /** + * Array of text labels. + * + * @since 1.0.0 + * @access public + * @var array + */ + public $labels = array(); + + /** + * Array of post types (key) and taxonomies (value) to use for single post views. + * + * @since 1.0.0 + * @access public + * @var array + */ + public $post_taxonomy = array(); + + /* ====== Magic Methods ====== */ + + /** + * Magic method to use in case someone tries to output the layout object as a string. + * We'll just return the trail HTML. + * + * @since 1.0.0 + * @access public + * @return string + */ + public function __toString() { + return $this->trail(); + } + + /** + * Sets up the breadcrumb trail properties. Calls the `Breadcrumb_Trail::add_items()` method + * to creat the array of breadcrumb items. + * + * @since 0.6.0 + * @access public + * @param array $args { + * @type string $container Container HTML element. nav|div + * @type string $before String to output before breadcrumb menu. + * @type string $after String to output after breadcrumb menu. + * @type string $browse_tag The HTML tag to use to wrap the "Browse" header text. + * @type string $list_tag The HTML tag to use for the list wrapper. + * @type string $item_tag The HTML tag to use for the item wrapper. + * @type bool $show_on_front Whether to show when `is_front_page()`. + * @type bool $network Whether to link to the network main site (multisite only). + * @type bool $show_title Whether to show the title (last item) in the trail. + * @type bool $show_browse Whether to show the breadcrumb menu header. + * @type array $labels Text labels. @see Breadcrumb_Trail::set_labels() + * @type array $post_taxonomy Taxonomies to use for post types. @see Breadcrumb_Trail::set_post_taxonomy() + * @type bool $echo Whether to print or return the breadcrumbs. + * } + * @return void + */ + public function __construct( $args = array() ) { + + $defaults = array( + 'container' => 'nav', + 'before' => '', + 'after' => '', + 'browse_tag' => 'h2', + 'list_tag' => 'ul', + 'item_tag' => 'li', + 'show_on_front' => true, + 'network' => false, + 'show_title' => true, + 'show_browse' => true, + 'labels' => array(), + 'post_taxonomy' => array(), + 'echo' => true + ); + + // Parse the arguments with the deaults. + $this->args = apply_filters( 'breadcrumb_trail_args', wp_parse_args( $args, $defaults ) ); + + // Set the labels and post taxonomy properties. + $this->set_labels(); + $this->set_post_taxonomy(); + + // Let's find some items to add to the trail! + $this->add_items(); + } + + /* ====== Public Methods ====== */ + + /** + * Formats the HTML output for the breadcrumb trail. + * + * @since 0.6.0 + * @access public + * @return string + */ + public function trail() { + + // Set up variables that we'll need. + $breadcrumb = ''; + $item_count = count( $this->items ); + $item_position = 0; + + // Connect the breadcrumb trail if there are items in the trail. + if ( 0 < $item_count ) { + + // Add 'browse' label if it should be shown. + if ( true === $this->args['show_browse'] ) { + + $breadcrumb .= sprintf( + '<%1$s class="trail-browse">%2$s', + tag_escape( $this->args['browse_tag'] ), + $this->labels['browse'] + ); + } + + // Open the unordered list. + $breadcrumb .= sprintf( + '<%s class="trail-items" itemscope itemtype="http://schema.org/BreadcrumbList">', + tag_escape( $this->args['list_tag'] ) + ); + + // Add the number of items and item list order schema. + $breadcrumb .= sprintf( '', absint( $item_count ) ); + $breadcrumb .= ''; + + // Loop through the items and add them to the list. + foreach ( $this->items as $item ) { + + // Iterate the item position. + ++$item_position; + + // Check if the item is linked. + preg_match( '/()(.*?)(<\/a>)/i', $item, $matches ); + + // Wrap the item text with appropriate itemprop. + $item = ! empty( $matches ) ? sprintf( '%s%s%s', $matches[1], $matches[2], $matches[3] ) : sprintf( '%s', $item ); + + // Wrap the item with its itemprop. + $item = ! empty( $matches ) + ? preg_replace( '/(/i', '$1$2 itemprop=$2item$2>', $item ) + : sprintf( '%s', $item ); + + // Add list item classes. + $item_class = 'trail-item'; + + if ( 1 === $item_position && 1 < $item_count ) + $item_class .= ' trail-begin'; + + elseif ( $item_count === $item_position ) + $item_class .= ' trail-end'; + + // Create list item attributes. + $attributes = 'itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem" class="' . $item_class . '"'; + + // Build the meta position HTML. + $meta = sprintf( '', absint( $item_position ) ); + + // Build the list item. + $breadcrumb .= sprintf( '<%1$s %2$s>%3$s%4$s', tag_escape( $this->args['item_tag'] ),$attributes, $item, $meta ); + } + + // Close the unordered list. + $breadcrumb .= sprintf( '', tag_escape( $this->args['list_tag'] ) ); + + // Wrap the breadcrumb trail. + $breadcrumb = sprintf( + '<%1$s role="navigation" aria-label="%2$s" class="breadcrumb-trail breadcrumbs" itemprop="breadcrumb">%3$s%4$s%5$s', + tag_escape( $this->args['container'] ), + esc_attr( $this->labels['aria_label'] ), + $this->args['before'], + $breadcrumb, + $this->args['after'] + ); + } + + // Allow developers to filter the breadcrumb trail HTML. + $breadcrumb = apply_filters( 'breadcrumb_trail', $breadcrumb, $this->args ); + + if ( false === $this->args['echo'] ) + return $breadcrumb; + + echo $breadcrumb; + } + + /* ====== Protected Methods ====== */ + + /** + * Sets the labels property. Parses the inputted labels array with the defaults. + * + * @since 1.0.0 + * @access protected + * @return void + */ + protected function set_labels() { + + $defaults = array( + 'browse' => esc_html__( 'Browse:', 'sophia-after-dark' ), + 'aria_label' => esc_attr_x( 'Breadcrumbs', 'breadcrumbs aria label', 'sophia-after-dark' ), + 'home' => esc_html__( 'Home', 'sophia-after-dark' ), + 'error_404' => esc_html__( '404 Not Found', 'sophia-after-dark' ), + 'archives' => esc_html__( 'Archives', 'sophia-after-dark' ), + // Translators: %s is the search query. + 'search' => esc_html__( 'Search results for: %s', 'sophia-after-dark' ), + // Translators: %s is the page number. + 'paged' => esc_html__( 'Page %s', 'sophia-after-dark' ), + // Translators: %s is the page number. + 'paged_comments' => esc_html__( 'Comment Page %s', 'sophia-after-dark' ), + // Translators: Minute archive title. %s is the minute time format. + 'archive_minute' => esc_html__( 'Minute %s', 'sophia-after-dark' ), + // Translators: Weekly archive title. %s is the week date format. + 'archive_week' => esc_html__( 'Week %s', 'sophia-after-dark' ), + + // "%s" is replaced with the translated date/time format. + 'archive_minute_hour' => '%s', + 'archive_hour' => '%s', + 'archive_day' => '%s', + 'archive_month' => '%s', + 'archive_year' => '%s', + ); + + $this->labels = apply_filters( 'breadcrumb_trail_labels', wp_parse_args( $this->args['labels'], $defaults ) ); + } + + /** + * Sets the `$post_taxonomy` property. This is an array of post types (key) and taxonomies (value). + * The taxonomy's terms are shown on the singular post view if set. + * + * @since 1.0.0 + * @access protected + * @return void + */ + protected function set_post_taxonomy() { + + $defaults = array(); + + // If post permalink is set to `%postname%`, use the `category` taxonomy. + if ( '%postname%' === trim( get_option( 'permalink_structure' ), '/' ) ) + $defaults['post'] = 'category'; + + $this->post_taxonomy = apply_filters( 'breadcrumb_trail_post_taxonomy', wp_parse_args( $this->args['post_taxonomy'], $defaults ) ); + } + + /** + * Runs through the various WordPress conditional tags to check the current page being viewed. Once + * a condition is met, a specific method is launched to add items to the `$items` array. + * + * @since 1.0.0 + * @access protected + * @return void + */ + protected function add_items() { + + // If viewing the front page. + if ( is_front_page() ) { + $this->add_front_page_items(); + } + + // If not viewing the front page. + else { + + // Add the network and site home links. + $this->add_network_home_link(); + $this->add_site_home_link(); + + // If viewing the home/blog page. + if ( is_home() ) { + $this->add_blog_items(); + } + + // If viewing a single post. + elseif ( is_singular() ) { + $this->add_singular_items(); + } + + // If viewing an archive page. + elseif ( is_archive() ) { + + if ( is_post_type_archive() ) + $this->add_post_type_archive_items(); + + elseif ( is_category() || is_tag() || is_tax() ) + $this->add_term_archive_items(); + + elseif ( is_author() ) + $this->add_user_archive_items(); + + elseif ( get_query_var( 'minute' ) && get_query_var( 'hour' ) ) + $this->add_minute_hour_archive_items(); + + elseif ( get_query_var( 'minute' ) ) + $this->add_minute_archive_items(); + + elseif ( get_query_var( 'hour' ) ) + $this->add_hour_archive_items(); + + elseif ( is_day() ) + $this->add_day_archive_items(); + + elseif ( get_query_var( 'w' ) ) + $this->add_week_archive_items(); + + elseif ( is_month() ) + $this->add_month_archive_items(); + + elseif ( is_year() ) + $this->add_year_archive_items(); + + else + $this->add_default_archive_items(); + } + + // If viewing a search results page. + elseif ( is_search() ) { + $this->add_search_items(); + } + + // If viewing the 404 page. + elseif ( is_404() ) { + $this->add_404_items(); + } + } + + // Add paged items if they exist. + $this->add_paged_items(); + + // Allow developers to overwrite the items for the breadcrumb trail. + $this->items = array_unique( apply_filters( 'breadcrumb_trail_items', $this->items, $this->args ) ); + } + + /** + * Gets front items based on $wp_rewrite->front. + * + * @since 1.0.0 + * @access protected + * @return void + */ + protected function add_rewrite_front_items() { + global $wp_rewrite; + + if ( $wp_rewrite->front ) + $this->add_path_parents( $wp_rewrite->front ); + } + + /** + * Adds the page/paged number to the items array. + * + * @since 1.0.0 + * @access protected + * @return void + */ + protected function add_paged_items() { + + // If viewing a paged singular post. + if ( is_singular() && 1 < get_query_var( 'page' ) && true === $this->args['show_title'] ) + $this->items[] = sprintf( $this->labels['paged'], number_format_i18n( absint( get_query_var( 'page' ) ) ) ); + + // If viewing a singular post with paged comments. + elseif ( is_singular() && get_option( 'page_comments' ) && 1 < get_query_var( 'cpage' ) ) + $this->items[] = sprintf( $this->labels['paged_comments'], number_format_i18n( absint( get_query_var( 'cpage' ) ) ) ); + + // If viewing a paged archive-type page. + elseif ( is_paged() && true === $this->args['show_title'] ) + $this->items[] = sprintf( $this->labels['paged'], number_format_i18n( absint( get_query_var( 'paged' ) ) ) ); + } + + /** + * Adds the network (all sites) home page link to the items array. + * + * @since 1.0.0 + * @access protected + * @return void + */ + protected function add_network_home_link() { + + if ( is_multisite() && ! is_main_site() && true === $this->args['network'] ) + $this->items[] = sprintf( '%s', esc_url( network_home_url() ), $this->labels['home'] ); + } + + /** + * Adds the current site's home page link to the items array. + * + * @since 1.0.0 + * @access protected + * @return void + */ + protected function add_site_home_link() { + + $network = is_multisite() && ! is_main_site() && true === $this->args['network']; + $label = $network ? get_bloginfo( 'name' ) : $this->labels['home']; + $rel = $network ? '' : ' rel="home"'; + + $this->items[] = sprintf( '%s', esc_url( user_trailingslashit( home_url() ) ), $rel, $label ); + } + + /** + * Adds items for the front page to the items array. + * + * @since 1.0.0 + * @access protected + * @return void + */ + protected function add_front_page_items() { + + // Only show front items if the 'show_on_front' argument is set to 'true'. + if ( true === $this->args['show_on_front'] || is_paged() || ( is_singular() && 1 < get_query_var( 'page' ) ) ) { + + // Add network home link. + $this->add_network_home_link(); + + // If on a paged view, add the site home link. + if ( is_paged() ) + $this->add_site_home_link(); + + // If on the main front page, add the network home title. + elseif ( true === $this->args['show_title'] ) + $this->items[] = is_multisite() && true === $this->args['network'] ? get_bloginfo( 'name' ) : $this->labels['home']; + } + } + + /** + * Adds items for the posts page (i.e., is_home()) to the items array. + * + * @since 1.0.0 + * @access protected + * @return void + */ + protected function add_blog_items() { + + // Get the post ID and post. + $post_id = get_queried_object_id(); + $post = get_post( $post_id ); + + // If the post has parents, add them to the trail. + if ( 0 < $post->post_parent ) + $this->add_post_parents( $post->post_parent ); + + // Get the page title. + $title = get_the_title( $post_id ); + + // Add the posts page item. + if ( is_paged() ) + $this->items[] = sprintf( '%s', esc_url( get_permalink( $post_id ) ), $title ); + + elseif ( $title && true === $this->args['show_title'] ) + $this->items[] = $title; + } + + /** + * Adds singular post items to the items array. + * + * @since 1.0.0 + * @access protected + * @return void + */ + protected function add_singular_items() { + + // Get the queried post. + $post = get_queried_object(); + $post_id = get_queried_object_id(); + + // If the post has a parent, follow the parent trail. + if ( 0 < $post->post_parent ) + $this->add_post_parents( $post->post_parent ); + + // If the post doesn't have a parent, get its hierarchy based off the post type. + else + $this->add_post_hierarchy( $post_id ); + + // Display terms for specific post type taxonomy if requested. + if ( ! empty( $this->post_taxonomy[ $post->post_type ] ) ) + $this->add_post_terms( $post_id, $this->post_taxonomy[ $post->post_type ] ); + + // End with the post title. + if ( $post_title = single_post_title( '', false ) ) { + + if ( ( 1 < get_query_var( 'page' ) || is_paged() ) || ( get_option( 'page_comments' ) && 1 < absint( get_query_var( 'cpage' ) ) ) ) + $this->items[] = sprintf( '%s', esc_url( get_permalink( $post_id ) ), $post_title ); + + elseif ( true === $this->args['show_title'] ) + $this->items[] = $post_title; + } + } + + /** + * Adds the items to the trail items array for taxonomy term archives. + * + * @since 1.0.0 + * @access protected + * @global object $wp_rewrite + * @return void + */ + protected function add_term_archive_items() { + global $wp_rewrite; + + // Get some taxonomy and term variables. + $term = get_queried_object(); + $taxonomy = get_taxonomy( $term->taxonomy ); + $done_post_type = false; + + // If there are rewrite rules for the taxonomy. + if ( false !== $taxonomy->rewrite ) { + + // If 'with_front' is true, dd $wp_rewrite->front to the trail. + if ( $taxonomy->rewrite['with_front'] && $wp_rewrite->front ) + $this->add_rewrite_front_items(); + + // Get parent pages by path if they exist. + $this->add_path_parents( $taxonomy->rewrite['slug'] ); + + // Add post type archive if its 'has_archive' matches the taxonomy rewrite 'slug'. + if ( $taxonomy->rewrite['slug'] ) { + + $slug = trim( $taxonomy->rewrite['slug'], '/' ); + + // Deals with the situation if the slug has a '/' between multiple + // strings. For example, "movies/genres" where "movies" is the post + // type archive. + $matches = explode( '/', $slug ); + + // If matches are found for the path. + if ( isset( $matches ) ) { + + // Reverse the array of matches to search for posts in the proper order. + $matches = array_reverse( $matches ); + + // Loop through each of the path matches. + foreach ( $matches as $match ) { + + // If a match is found. + $slug = $match; + + // Get public post types that match the rewrite slug. + $post_types = $this->get_post_types_by_slug( $match ); + + if ( ! empty( $post_types ) ) { + + $post_type_object = $post_types[0]; + + // Add support for a non-standard label of 'archive_title' (special use case). + $label = ! empty( $post_type_object->labels->archive_title ) ? $post_type_object->labels->archive_title : $post_type_object->labels->name; + + // Core filter hook. + $label = apply_filters( 'post_type_archive_title', $label, $post_type_object->name ); + + // Add the post type archive link to the trail. + $this->items[] = sprintf( '%s', esc_url( get_post_type_archive_link( $post_type_object->name ) ), $label ); + + $done_post_type = true; + + // Break out of the loop. + break; + } + } + } + } + } + + // If there's a single post type for the taxonomy, use it. + if ( false === $done_post_type && 1 === count( $taxonomy->object_type ) && post_type_exists( $taxonomy->object_type[0] ) ) { + + // If the post type is 'post'. + if ( 'post' === $taxonomy->object_type[0] ) { + $post_id = get_option( 'page_for_posts' ); + + if ( 'posts' !== get_option( 'show_on_front' ) && 0 < $post_id ) + $this->items[] = sprintf( '%s', esc_url( get_permalink( $post_id ) ), get_the_title( $post_id ) ); + + // If the post type is not 'post'. + } else { + $post_type_object = get_post_type_object( $taxonomy->object_type[0] ); + + $label = ! empty( $post_type_object->labels->archive_title ) ? $post_type_object->labels->archive_title : $post_type_object->labels->name; + + // Core filter hook. + $label = apply_filters( 'post_type_archive_title', $label, $post_type_object->name ); + + $this->items[] = sprintf( '%s', esc_url( get_post_type_archive_link( $post_type_object->name ) ), $label ); + } + } + + // If the taxonomy is hierarchical, list its parent terms. + if ( is_taxonomy_hierarchical( $term->taxonomy ) && $term->parent ) + $this->add_term_parents( $term->parent, $term->taxonomy ); + + // Add the term name to the trail end. + if ( is_paged() ) + $this->items[] = sprintf( '%s', esc_url( get_term_link( $term, $term->taxonomy ) ), single_term_title( '', false ) ); + + elseif ( true === $this->args['show_title'] ) + $this->items[] = single_term_title( '', false ); + } + + /** + * Adds the items to the trail items array for post type archives. + * + * @since 1.0.0 + * @access protected + * @return void + */ + protected function add_post_type_archive_items() { + + // Get the post type object. + $post_type_object = get_post_type_object( get_query_var( 'post_type' ) ); + + if ( false !== $post_type_object->rewrite ) { + + // If 'with_front' is true, add $wp_rewrite->front to the trail. + if ( $post_type_object->rewrite['with_front'] ) + $this->add_rewrite_front_items(); + + // If there's a rewrite slug, check for parents. + if ( ! empty( $post_type_object->rewrite['slug'] ) ) + $this->add_path_parents( $post_type_object->rewrite['slug'] ); + } + + // Add the post type [plural] name to the trail end. + if ( is_paged() || is_author() ) + $this->items[] = sprintf( '%s', esc_url( get_post_type_archive_link( $post_type_object->name ) ), post_type_archive_title( '', false ) ); + + elseif ( true === $this->args['show_title'] ) + $this->items[] = post_type_archive_title( '', false ); + + // If viewing a post type archive by author. + if ( is_author() ) + $this->add_user_archive_items(); + } + + /** + * Adds the items to the trail items array for user (author) archives. + * + * @since 1.0.0 + * @access protected + * @global object $wp_rewrite + * @return void + */ + protected function add_user_archive_items() { + global $wp_rewrite; + + // Add $wp_rewrite->front to the trail. + $this->add_rewrite_front_items(); + + // Get the user ID. + $user_id = get_query_var( 'author' ); + + // If $author_base exists, check for parent pages. + if ( ! empty( $wp_rewrite->author_base ) && ! is_post_type_archive() ) + $this->add_path_parents( $wp_rewrite->author_base ); + + // Add the author's display name to the trail end. + if ( is_paged() ) + $this->items[] = sprintf( '%s', esc_url( get_author_posts_url( $user_id ) ), get_the_author_meta( 'display_name', $user_id ) ); + + elseif ( true === $this->args['show_title'] ) + $this->items[] = get_the_author_meta( 'display_name', $user_id ); + } + + /** + * Adds the items to the trail items array for minute + hour archives. + * + * @since 1.0.0 + * @access protected + * @return void + */ + protected function add_minute_hour_archive_items() { + + // Add $wp_rewrite->front to the trail. + $this->add_rewrite_front_items(); + + // Add the minute + hour item. + if ( true === $this->args['show_title'] ) + $this->items[] = sprintf( $this->labels['archive_minute_hour'], get_the_time( esc_html_x( 'g:i a', 'minute and hour archives time format', 'sophia-after-dark' ) ) ); + } + + /** + * Adds the items to the trail items array for minute archives. + * + * @since 1.0.0 + * @access protected + * @return void + */ + protected function add_minute_archive_items() { + + // Add $wp_rewrite->front to the trail. + $this->add_rewrite_front_items(); + + // Add the minute item. + if ( true === $this->args['show_title'] ) + $this->items[] = sprintf( $this->labels['archive_minute'], get_the_time( esc_html_x( 'i', 'minute archives time format', 'sophia-after-dark' ) ) ); + } + + /** + * Adds the items to the trail items array for hour archives. + * + * @since 1.0.0 + * @access protected + * @return void + */ + protected function add_hour_archive_items() { + + // Add $wp_rewrite->front to the trail. + $this->add_rewrite_front_items(); + + // Add the hour item. + if ( true === $this->args['show_title'] ) + $this->items[] = sprintf( $this->labels['archive_hour'], get_the_time( esc_html_x( 'g a', 'hour archives time format', 'sophia-after-dark' ) ) ); + } + + /** + * Adds the items to the trail items array for day archives. + * + * @since 1.0.0 + * @access protected + * @return void + */ + protected function add_day_archive_items() { + + // Add $wp_rewrite->front to the trail. + $this->add_rewrite_front_items(); + + // Get year, month, and day. + $year = sprintf( $this->labels['archive_year'], get_the_time( esc_html_x( 'Y', 'yearly archives date format', 'sophia-after-dark' ) ) ); + $month = sprintf( $this->labels['archive_month'], get_the_time( esc_html_x( 'F', 'monthly archives date format', 'sophia-after-dark' ) ) ); + $day = sprintf( $this->labels['archive_day'], get_the_time( esc_html_x( 'j', 'daily archives date format', 'sophia-after-dark' ) ) ); + + // Add the year and month items. + $this->items[] = sprintf( '%s', esc_url( get_year_link( get_the_time( 'Y' ) ) ), $year ); + $this->items[] = sprintf( '%s', esc_url( get_month_link( get_the_time( 'Y' ), get_the_time( 'm' ) ) ), $month ); + + // Add the day item. + if ( is_paged() ) + $this->items[] = sprintf( '%s', esc_url( get_day_link( get_the_time( 'Y' ) ), get_the_time( 'm' ), get_the_time( 'd' ) ), $day ); + + elseif ( true === $this->args['show_title'] ) + $this->items[] = $day; + } + + /** + * Adds the items to the trail items array for week archives. + * + * @since 1.0.0 + * @access protected + * @return void + */ + protected function add_week_archive_items() { + + // Add $wp_rewrite->front to the trail. + $this->add_rewrite_front_items(); + + // Get the year and week. + $year = sprintf( $this->labels['archive_year'], get_the_time( esc_html_x( 'Y', 'yearly archives date format', 'sophia-after-dark' ) ) ); + $week = sprintf( $this->labels['archive_week'], get_the_time( esc_html_x( 'W', 'weekly archives date format', 'sophia-after-dark' ) ) ); + + // Add the year item. + $this->items[] = sprintf( '%s', esc_url( get_year_link( get_the_time( 'Y' ) ) ), $year ); + + // Add the week item. + if ( is_paged() ) + $this->items[] = esc_url( get_archives_link( add_query_arg( array( 'm' => get_the_time( 'Y' ), 'w' => get_the_time( 'W' ) ), home_url() ), $week, false ) ); + + elseif ( true === $this->args['show_title'] ) + $this->items[] = $week; + } + + /** + * Adds the items to the trail items array for month archives. + * + * @since 1.0.0 + * @access protected + * @return void + */ + protected function add_month_archive_items() { + + // Add $wp_rewrite->front to the trail. + $this->add_rewrite_front_items(); + + // Get the year and month. + $year = sprintf( $this->labels['archive_year'], get_the_time( esc_html_x( 'Y', 'yearly archives date format', 'sophia-after-dark' ) ) ); + $month = sprintf( $this->labels['archive_month'], get_the_time( esc_html_x( 'F', 'monthly archives date format', 'sophia-after-dark' ) ) ); + + // Add the year item. + $this->items[] = sprintf( '%s', esc_url( get_year_link( get_the_time( 'Y' ) ) ), $year ); + + // Add the month item. + if ( is_paged() ) + $this->items[] = sprintf( '%s', esc_url( get_month_link( get_the_time( 'Y' ), get_the_time( 'm' ) ) ), $month ); + + elseif ( true === $this->args['show_title'] ) + $this->items[] = $month; + } + + /** + * Adds the items to the trail items array for year archives. + * + * @since 1.0.0 + * @access protected + * @return void + */ + protected function add_year_archive_items() { + + // Add $wp_rewrite->front to the trail. + $this->add_rewrite_front_items(); + + // Get the year. + $year = sprintf( $this->labels['archive_year'], get_the_time( esc_html_x( 'Y', 'yearly archives date format', 'sophia-after-dark' ) ) ); + + // Add the year item. + if ( is_paged() ) + $this->items[] = sprintf( '%s', esc_url( get_year_link( get_the_time( 'Y' ) ) ), $year ); + + elseif ( true === $this->args['show_title'] ) + $this->items[] = $year; + } + + /** + * Adds the items to the trail items array for archives that don't have a more specific method + * defined in this class. + * + * @since 1.0.0 + * @access protected + * @return void + */ + protected function add_default_archive_items() { + + // If this is a date-/time-based archive, add $wp_rewrite->front to the trail. + if ( is_date() || is_time() ) + $this->add_rewrite_front_items(); + + if ( true === $this->args['show_title'] ) + $this->items[] = $this->labels['archives']; + } + + /** + * Adds the items to the trail items array for search results. + * + * @since 1.0.0 + * @access protected + * @return void + */ + protected function add_search_items() { + + if ( is_paged() ) + $this->items[] = sprintf( '%s', esc_url( get_search_link() ), sprintf( $this->labels['search'], get_search_query() ) ); + + elseif ( true === $this->args['show_title'] ) + $this->items[] = sprintf( $this->labels['search'], get_search_query() ); + } + + /** + * Adds the items to the trail items array for 404 pages. + * + * @since 1.0.0 + * @access protected + * @return void + */ + protected function add_404_items() { + + if ( true === $this->args['show_title'] ) + $this->items[] = $this->labels['error_404']; + } + + /** + * Adds a specific post's parents to the items array. + * + * @since 1.0.0 + * @access protected + * @param int $post_id + * @return void + */ + protected function add_post_parents( $post_id ) { + $parents = array(); + + while ( $post_id ) { + + // Get the post by ID. + $post = get_post( $post_id ); + + // If we hit a page that's set as the front page, bail. + if ( 'page' == $post->post_type && 'page' == get_option( 'show_on_front' ) && $post_id == get_option( 'page_on_front' ) ) + break; + + // Add the formatted post link to the array of parents. + $parents[] = sprintf( '%s', esc_url( get_permalink( $post_id ) ), get_the_title( $post_id ) ); + + // If there's no longer a post parent, break out of the loop. + if ( 0 >= $post->post_parent ) + break; + + // Change the post ID to the parent post to continue looping. + $post_id = $post->post_parent; + } + + // Get the post hierarchy based off the final parent post. + $this->add_post_hierarchy( $post_id ); + + // Display terms for specific post type taxonomy if requested. + if ( ! empty( $this->post_taxonomy[ $post->post_type ] ) ) + $this->add_post_terms( $post_id, $this->post_taxonomy[ $post->post_type ] ); + + // Merge the parent items into the items array. + $this->items = array_merge( $this->items, array_reverse( $parents ) ); + } + + /** + * Adds a specific post's hierarchy to the items array. The hierarchy is determined by post type's + * rewrite arguments and whether it has an archive page. + * + * @since 1.0.0 + * @access protected + * @param int $post_id + * @return void + */ + protected function add_post_hierarchy( $post_id ) { + + // Get the post type. + $post_type = get_post_type( $post_id ); + $post_type_object = get_post_type_object( $post_type ); + + // If this is the 'post' post type, get the rewrite front items and map the rewrite tags. + if ( 'post' === $post_type ) { + + // Add $wp_rewrite->front to the trail. + $this->add_rewrite_front_items(); + + // Map the rewrite tags. + $this->map_rewrite_tags( $post_id, get_option( 'permalink_structure' ) ); + } + + // If the post type has rewrite rules. + elseif ( false !== $post_type_object->rewrite ) { + + // If 'with_front' is true, add $wp_rewrite->front to the trail. + if ( $post_type_object->rewrite['with_front'] ) + $this->add_rewrite_front_items(); + + // If there's a path, check for parents. + if ( ! empty( $post_type_object->rewrite['slug'] ) ) + $this->add_path_parents( $post_type_object->rewrite['slug'] ); + } + + // If there's an archive page, add it to the trail. + if ( $post_type_object->has_archive ) { + + // Add support for a non-standard label of 'archive_title' (special use case). + $label = ! empty( $post_type_object->labels->archive_title ) ? $post_type_object->labels->archive_title : $post_type_object->labels->name; + + // Core filter hook. + $label = apply_filters( 'post_type_archive_title', $label, $post_type_object->name ); + + $this->items[] = sprintf( '%s', esc_url( get_post_type_archive_link( $post_type ) ), $label ); + } + + // Map the rewrite tags if there's a `%` in the slug. + if ( 'post' !== $post_type && ! empty( $post_type_object->rewrite['slug'] ) && false !== strpos( $post_type_object->rewrite['slug'], '%' ) ) + $this->map_rewrite_tags( $post_id, $post_type_object->rewrite['slug'] ); + } + + /** + * Gets post types by slug. This is needed because the get_post_types() function doesn't exactly + * match the 'has_archive' argument when it's set as a string instead of a boolean. + * + * @since 0.6.0 + * @access protected + * @param int $slug The post type archive slug to search for. + * @return void + */ + protected function get_post_types_by_slug( $slug ) { + + $return = array(); + + $post_types = get_post_types( array(), 'objects' ); + + foreach ( $post_types as $type ) { + + if ( $slug === $type->has_archive || ( true === $type->has_archive && $slug === $type->rewrite['slug'] ) ) + $return[] = $type; + } + + return $return; + } + + /** + * Adds a post's terms from a specific taxonomy to the items array. + * + * @since 1.0.0 + * @access protected + * @param int $post_id The ID of the post to get the terms for. + * @param string $taxonomy The taxonomy to get the terms from. + * @return void + */ + protected function add_post_terms( $post_id, $taxonomy ) { + + // Get the post type. + $post_type = get_post_type( $post_id ); + + // Get the post categories. + $terms = get_the_terms( $post_id, $taxonomy ); + + // Check that categories were returned. + if ( $terms && ! is_wp_error( $terms ) ) { + + // Sort the terms by ID and get the first category. + if ( function_exists( 'wp_list_sort' ) ) + $terms = wp_list_sort( $terms, 'term_id' ); + + else + usort( $terms, '_usort_terms_by_ID' ); + + $term = get_term( $terms[0], $taxonomy ); + + // If the category has a parent, add the hierarchy to the trail. + if ( 0 < $term->parent ) + $this->add_term_parents( $term->parent, $taxonomy ); + + // Add the category archive link to the trail. + $this->items[] = sprintf( '%s', esc_url( get_term_link( $term, $taxonomy ) ), $term->name ); + } + } + + /** + * Get parent posts by path. Currently, this method only supports getting parents of the 'page' + * post type. The goal of this function is to create a clear path back to home given what would + * normally be a "ghost" directory. If any page matches the given path, it'll be added. + * + * @since 1.0.0 + * @access protected + * @param string $path The path (slug) to search for posts by. + * @return void + */ + function add_path_parents( $path ) { + + // Trim '/' off $path in case we just got a simple '/' instead of a real path. + $path = trim( $path, '/' ); + + // If there's no path, return. + if ( empty( $path ) ) + return; + + // Get parent post by the path. + $post = get_page_by_path( $path ); + + if ( ! empty( $post ) ) { + $this->add_post_parents( $post->ID ); + } + + elseif ( is_null( $post ) ) { + + // Separate post names into separate paths by '/'. + $path = trim( $path, '/' ); + preg_match_all( "/\/.*?\z/", $path, $matches ); + + // If matches are found for the path. + if ( isset( $matches ) ) { + + // Reverse the array of matches to search for posts in the proper order. + $matches = array_reverse( $matches ); + + // Loop through each of the path matches. + foreach ( $matches as $match ) { + + // If a match is found. + if ( isset( $match[0] ) ) { + + // Get the parent post by the given path. + $path = str_replace( $match[0], '', $path ); + $post = get_page_by_path( trim( $path, '/' ) ); + + // If a parent post is found, set the $post_id and break out of the loop. + if ( ! empty( $post ) && 0 < $post->ID ) { + $this->add_post_parents( $post->ID ); + break; + } + } + } + } + } + } + + /** + * Searches for term parents of hierarchical taxonomies. This function is similar to the WordPress + * function get_category_parents() but handles any type of taxonomy. + * + * @since 1.0.0 + * @param int $term_id ID of the term to get the parents of. + * @param string $taxonomy Name of the taxonomy for the given term. + * @return void + */ + function add_term_parents( $term_id, $taxonomy ) { + + // Set up some default arrays. + $parents = array(); + + // While there is a parent ID, add the parent term link to the $parents array. + while ( $term_id ) { + + // Get the parent term. + $term = get_term( $term_id, $taxonomy ); + + // Add the formatted term link to the array of parent terms. + $parents[] = sprintf( '%s', esc_url( get_term_link( $term, $taxonomy ) ), $term->name ); + + // Set the parent term's parent as the parent ID. + $term_id = $term->parent; + } + + // If we have parent terms, reverse the array to put them in the proper order for the trail. + if ( ! empty( $parents ) ) + $this->items = array_merge( $this->items, array_reverse( $parents ) ); + } + + /** + * Turns %tag% from permalink structures into usable links for the breadcrumb trail. This feels kind of + * hackish for now because we're checking for specific %tag% examples and only doing it for the 'post' + * post type. In the future, maybe it'll handle a wider variety of possibilities, especially for custom post + * types. + * + * @since 0.6.0 + * @access protected + * @param int $post_id ID of the post whose parents we want. + * @param string $path Path of a potential parent page. + * @param array $args Mixed arguments for the menu. + * @return array + */ + protected function map_rewrite_tags( $post_id, $path ) { + + $post = get_post( $post_id ); + + // Trim '/' from both sides of the $path. + $path = trim( $path, '/' ); + + // Split the $path into an array of strings. + $matches = explode( '/', $path ); + + // If matches are found for the path. + if ( is_array( $matches ) ) { + + // Loop through each of the matches, adding each to the $trail array. + foreach ( $matches as $match ) { + + // Trim any '/' from the $match. + $tag = trim( $match, '/' ); + + // If using the %year% tag, add a link to the yearly archive. + if ( '%year%' == $tag ) + $this->items[] = sprintf( '%s', esc_url( get_year_link( get_the_time( 'Y', $post_id ) ) ), sprintf( $this->labels['archive_year'], get_the_time( esc_html_x( 'Y', 'yearly archives date format', 'sophia-after-dark' ) ) ) ); + + // If using the %monthnum% tag, add a link to the monthly archive. + elseif ( '%monthnum%' == $tag ) + $this->items[] = sprintf( '%s', esc_url( get_month_link( get_the_time( 'Y', $post_id ), get_the_time( 'm', $post_id ) ) ), sprintf( $this->labels['archive_month'], get_the_time( esc_html_x( 'F', 'monthly archives date format', 'sophia-after-dark' ) ) ) ); + + // If using the %day% tag, add a link to the daily archive. + elseif ( '%day%' == $tag ) + $this->items[] = sprintf( '%s', esc_url( get_day_link( get_the_time( 'Y', $post_id ), get_the_time( 'm', $post_id ), get_the_time( 'd', $post_id ) ) ), sprintf( $this->labels['archive_day'], get_the_time( esc_html_x( 'j', 'daily archives date format', 'sophia-after-dark' ) ) ) ); + + // If using the %author% tag, add a link to the post author archive. + elseif ( '%author%' == $tag ) + $this->items[] = sprintf( '%s', esc_url( get_author_posts_url( $post->post_author ) ), get_the_author_meta( 'display_name', $post->post_author ) ); + + // If using the %category% tag, add a link to the first category archive to match permalinks. + elseif ( taxonomy_exists( trim( $tag, '%' ) ) ) { + + // Force override terms in this post type. + $this->post_taxonomy[ $post->post_type ] = false; + + // Add the post categories. + $this->add_post_terms( $post_id, trim( $tag, '%' ) ); + } + } + } + } +} \ No newline at end of file diff --git a/inc/mt-dynamic-styles.php b/inc/mt-dynamic-styles.php new file mode 100644 index 0000000..485d0f8 --- /dev/null +++ b/inc/mt-dynamic-styles.php @@ -0,0 +1,51 @@ + 1 ) ); + + $output_css = ''; + + foreach ( $get_categories as $category ) { + + $cat_color = get_theme_mod( 'sophia_after_dark_category_color_'.$category->slug, '#3b2d1b' ); + $cat_hover_color = sophia_after_dark_hover_color( $cat_color, '-50' ); + $cat_id = $category->term_id; + + if ( !empty( $cat_color ) ) { + $output_css .= ".category-button.cbd-cat-". esc_attr( $cat_id ) ." a { background: ". esc_attr( $cat_color ) ."}\n"; + $output_css .= ".category-button.cbd-cat-". esc_attr( $cat_id ) ." a:hover { background: ". esc_attr( $cat_hover_color ) ."}\n"; + $output_css .= "#site-navigation ul li.cbd-cat-". esc_attr( $cat_id ) ." .menu-item-description { background: ". esc_attr( $cat_color ) ."}\n"; + $output_css .= "#site-navigation ul li.cbd-cat-". esc_attr( $cat_id ) ." .menu-item-description:after { border-top-color: ". esc_attr( $cat_color ) ."}\n"; + } + } + + $output_css .= "a,a:hover,a:focus,a:active,.entry-cat .cat-links a:hover,.entry-cat a:hover,.entry-footer a:hover,.comment-author .fn .url:hover,.commentmetadata .comment-edit-link, #cancel-comment-reply-link, #cancel-comment-reply-link:before, .logged-in-as a,.widget a:hover, .widget a:hover::before, .widget li:hover::before,.mt-social-icon-wrap li a:hover,.mt-social-icon-wrap li a:focus,#site-navigation ul li:hover>a,#site-navigation ul li.current-menu-item>a,#site-navigation ul li.current_page_ancestor>a,#site-navigation ul li.current-menu-ancestor>a,#site-navigation ul li.current_page_item>a,#site-navigation ul li.current-menu-parent>a,#site-navigation ul li.focus>a,.banner-sub-title,.entry-title a:hover,.cat-links a:hover,.entry-footer .mt-readmore-btn:hover,.btn-wrapper a:hover,.mt-readmore-btn:hover,.navigation.pagination .nav-links .page-numbers.current, .navigation.pagination .nav-links a.page-numbers:hover,#footer-menu li a:hover,.sophia_after_dark_latest_posts .mt-post-title a:hover,#mt-scrollup:hover,.menu-toggle:hover, #top-navigation ul li a:hover,.mt-search-icon:hover, .entry-meta a:hover, .front-slider-block .banner-title a:hover, .post-info-wrap .entry-meta a:hover, .single .mt-single-related-posts .entry-title a:hover, .breadcrumbs .trail-items li a:hover, .wrap-label i,.has-thumbnail .post-info-wrap .entry-title a:hover,.front-slider-block .post-info-wrap .entry-title a:hover,#top-footer a:hover{ color: ". esc_attr( $sophia_after_dark_primary_color ) ."}\n"; + $output_css .= ".widget_search .search-submit,.widget_search .search-submit:hover,.navigation.pagination .nav-links .page-numbers.current, .navigation.pagination .nav-links a.page-numbers:hover, .error-404.not-found, .sophia_after_dark_social_media a:hover, .custom-header,.widget_tag_cloud .tagcloud a:hover,.widget.widget_tag_cloud a:hover { border-color: ". esc_attr( $sophia_after_dark_primary_color ) ."}\n"; + $output_css .= ".front-slider-block .lSAction > a:hover, .top-featured-post-wrap .post-thumbnail .post-number, .post-cats-list a, #site-navigation .menu-item-description, article .post-thumbnail::before, #secondary .widget .widget-title::before, .mt-related-post-title::before, #colophon .widget .widget-title::before, .features-post-title::before, .mt-menu-search .mt-form-wrap .search-form .search-submit,.mt-live-link a,.widget_tag_cloud .tagcloud a:hover,.widget.widget_tag_cloud a:hover { background: ". esc_attr( $sophia_after_dark_primary_color ) ."}\n"; + $output_css .= ".edit-link .post-edit-link,.reply .comment-reply-link,.widget_search .search-submit, .mt-menu-search .mt-form-wrap .search-form .search-submit:hover, article.sticky::before{ background: ". esc_attr( $sophia_after_dark_primary_color ) ."}\n"; + + $output_css .= ".mt-menu-search .mt-form-wrap .search-form .search-field:focus{ outline-color: ". esc_attr( $sophia_after_dark_primary_color ) ."}\n"; + + $slider_bg_image = get_theme_mod( 'sophia_after_dark_slider_bg_image' ); + + if ( !empty( $slider_bg_image ) ) { + $output_css .= ".front-slider-wrapper{background: url(". esc_url( $slider_bg_image ) .") no-repeat fixed center center/cover}\n"; + } + + $refine_output_css = sophia_after_dark_css_strip_whitespace( $output_css ); + wp_add_inline_style( 'sophia-after-dark-style', $refine_output_css ); + } +endif; \ No newline at end of file diff --git a/inc/template-functions.php b/inc/template-functions.php new file mode 100644 index 0000000..f238e8f --- /dev/null +++ b/inc/template-functions.php @@ -0,0 +1,431 @@ +ID, 'sophia_after_dark_post_sidebar_layout', true ); + if ( 'layout--default-sidebar' !== $single_post_sidebar_layout && !empty( $single_post_sidebar_layout ) ) { + $classes[] = esc_attr( $single_post_sidebar_layout ); + } else { + $posts_sidebar_layout = get_theme_mod( 'sophia_after_dark_posts_sidebar_layout', 'right-sidebar' ); + $classes[] = esc_attr( $posts_sidebar_layout ); + } + } elseif ( is_page() ) { + $single_page_sidebar_layout = get_post_meta( $post->ID, 'sophia_after_dark_post_sidebar_layout', true ); + if ( 'layout--default-sidebar' !== $single_page_sidebar_layout && !empty( $single_page_sidebar_layout ) ) { + $classes[] = esc_attr( $single_page_sidebar_layout ); + } else { + $pages_sidebar_layout = get_theme_mod( 'sophia_after_dark_pages_sidebar_layout', 'right-sidebar' ); + $classes[] = esc_attr( $pages_sidebar_layout ); + } + } + return $classes; +} +add_filter( 'body_class', 'sophia_after_dark_body_classes' ); + +/** + * Add a pingback url auto-discovery header for single posts, pages, or attachments. + */ +function sophia_after_dark_pingback_header() { + + if ( is_singular() && pings_open() ) { + echo ''; + } + +} +add_action( 'wp_head', 'sophia_after_dark_pingback_header' ); +/*-----------------------------------------------------------------------------------------------------------------------*/ +if ( ! function_exists( 'sophia_after_dark_fonts_url' ) ) : + + /** + * Register Google fonts for Sophia After Dark. + * + * @return string Google fonts URL for the theme. + * @since 1.0.0 + */ + function sophia_after_dark_fonts_url() { + $fonts_url = ''; + $font_families = array(); + + /* + * Translators: If there are characters in your language that are not supported + * byJosefin Sans translate this to 'off'. Do not translate into your own language. + */ + if ( 'off' !== _x( 'on', 'Josefin Sans font: on or off', 'sophia-after-dark' ) ) { + $font_families[] = 'Josefin Sans:400,700'; + } + + /* + * Translators: If there are characters in your language that are not supported + * by Poppins, translate this to 'off'. Do not translate into your own language. + */ + if ( 'off' !== _x( 'on', 'Poppins font: on or off', 'sophia-after-dark' ) ) { + $font_families[] = 'Poppins:300,400,400i,500,700'; + } + + if ( $font_families ) { + $query_args = array( + 'family' => urlencode( implode( '|', $font_families ) ), + 'subset' => urlencode( 'latin,latin-ext' ), + ); + $fonts_url = add_query_arg( $query_args, 'https://fonts.bunny.net/css' ); + } + return $fonts_url; + } + +endif; + +/*-----------------------------------------------------------------------------------------------------------------------*/ +/** + * Enqueue scripts and styles for only admin + * + * @since 1.0.0 + */ +add_action( 'admin_enqueue_scripts', 'sophia_after_dark_admin_scripts' ); + +function sophia_after_dark_admin_scripts( $hook ) { + global $sophia_after_dark_theme_version; + + if ( 'widgets.php' != $hook && 'customize.php' != $hook && 'edit.php' != $hook && 'post.php' != $hook && 'post-new.php' != $hook ) { + return; + } + + wp_enqueue_script( 'jquery-ui-button' ); + wp_enqueue_script( 'sophia-after-dark--admin-script', get_template_directory_uri() .'/assets/js/mt-admin-scripts.js', array( 'jquery' ), esc_attr( $sophia_after_dark_theme_version ), true ); + wp_enqueue_style( 'sophia-after-dark--admin-style', get_template_directory_uri() . '/assets/css/mt-admin-styles.css', array(), esc_attr( $sophia_after_dark_theme_version ) ); +} +/*----------------------------------------------------------------------------------------------------------------------------------------*/ +/** + * Enqueue scripts and styles. + */ +function sophia_after_dark_scripts() { + global $sophia_after_dark_theme_version; + + wp_enqueue_style( 'sophia-after-dark-fonts', sophia_after_dark_fonts_url(), array(), null ); + wp_enqueue_style( 'lightslider-style', get_template_directory_uri() .'/assets/library/lightslider/css/lightslider.min.css', array(), '' ); + wp_enqueue_style( 'animate', get_template_directory_uri(). '/assets/library/animate/animate.min.css', array(), '3.5.1' ); + wp_enqueue_style( 'preloader', get_template_directory_uri() .'/assets/css/mt-preloader.css', array(), esc_attr( $sophia_after_dark_theme_version ) ); + wp_enqueue_style( 'sophia-after-dark-style', get_stylesheet_uri(), array(), esc_attr( $sophia_after_dark_theme_version) ); + wp_enqueue_style( 'sophia-after-dark-responsive-style', get_template_directory_uri(). '/assets/css/mt-responsive.css', array(), esc_attr( $sophia_after_dark_theme_version ) ); + + wp_enqueue_script( 'sophia-after-dark-combine-scripts', get_template_directory_uri() .'/assets/js/mt-combine-scripts.js', array('jquery'), esc_attr( $sophia_after_dark_theme_version ), true ); + wp_enqueue_script( 'sophia-after-dark-navigation', get_template_directory_uri() . '/assets/js/navigation.js', array(), esc_attr( $sophia_after_dark_theme_version ), true ); + wp_enqueue_script( 'sophia-after-dark-skip-link-focus-fix', get_template_directory_uri() . '/assets/js/skip-link-focus-fix.js', array(), esc_attr( $sophia_after_dark_theme_version ), true ); + wp_enqueue_script( 'sophia-after-dark-custom-scripts', get_template_directory_uri() .'/assets/js/mt-custom-scripts.js', array('jquery'), esc_attr( $sophia_after_dark_theme_version ), true ); + + $sophia_after_dark_enable_sticky_menu = get_theme_mod( 'sophia_after_dark_enable_sticky_menu', true ); + if ( true === $sophia_after_dark_enable_sticky_menu ) { + $sticky_value = 'on'; + } else { + $sticky_value = 'off'; + } + + $sophia_after_dark_enable_wow_animation = get_theme_mod( 'sophia_after_dark_enable_wow_animation', true ); + if ( true === $sophia_after_dark_enable_wow_animation ) { + $wow_value = 'on'; + } else { + $wow_value = 'off'; + } + + wp_localize_script( 'sophia-after-dark-custom-scripts', 'sophia_after_darkObject', array( + 'menu_sticky' => $sticky_value, + 'wow_effect' => $wow_value + ) ); + + if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { + wp_enqueue_script( 'comment-reply' ); + } +} +add_action( 'wp_enqueue_scripts', 'sophia_after_dark_scripts' ); + +/*----------------------------------------------------------------------------------------------------------------------------------------------------------------*/ +if ( ! function_exists( 'sophia_after_dark_preloader' ) ) : + + /** + * preloader function + * + * @since 1.0.0 + */ + function sophia_after_dark_preloader() { + $sophia_after_dark_enable_preloader = get_theme_mod( 'sophia_after_dark_enable_preloader', true ); + if ( false === $sophia_after_dark_enable_preloader ){ + return; + } +?> +
          +
          +
          +
          +
          + 'fa fa-twitter', + 'social_url' => '#', + ), + array( + 'social_icon' => 'fa fa-pinterest', + 'social_url' => '#', + ) + ) + ); + $sophia_after_dark_social_icons = get_theme_mod( 'sophia_after_dark_social_icons', $defaults_icons ); + $social_icons = json_decode( $sophia_after_dark_social_icons ); + + if ( ! empty( $social_icons ) ) { +?> +
            + social_url ) ) { + ?> +
          • + + + +
          • + +
          + 0 ) ); + $sophia_after_dark_categories_list[''] = __( 'Select Category', 'sophia-after-dark' ); + foreach ( $sophia_after_dark_get_categories as $category ) { + $sophia_after_dark_categories_list[esc_attr( $category->slug )] = esc_html( $category->cat_name ); + } + return $sophia_after_dark_categories_list; + } + +endif; +/*----------------------------------------------------------------------------------------------------------------------------------------*/ +if ( ! function_exists( 'sophia_after_dark_is_sidebar_layout' ) ) : + + /** + * Checks if the current page matches the given layout + * + * @return string $layout layout of current page. + */ + function sophia_after_dark_is_sidebar_layout() { + global $post; + $layout = ''; + if ( is_archive() || is_home() ) { + $layout = get_theme_mod( 'sophia_after_dark_archive_sidebar_layout', 'no-sidebar' ); + } elseif ( is_single() ) { + $single_post_layout = get_post_meta( $post->ID, 'sophia_after_dark_post_sidebar_layout', true ); + if ( 'layout--default-sidebar' !== $single_post_layout ) { + $layout = $single_post_layout; + } else { + $layout = get_theme_mod( 'sophia_after_dark_posts_sidebar_layout', 'right-sidebar' ); + } + } elseif ( is_page() ) { + $single_page_layout = get_post_meta( $post->ID, 'sophia_after_dark_post_sidebar_layout', true ); + if ( 'layout--default-sidebar' !== $single_page_layout ) { + $layout = $single_page_layout; + } else { + $layout = get_theme_mod( 'sophia_after_dark_pages_sidebar_layout', 'right-sidebar' ); + } + } + return $layout; + } + +endif; +/*----------------------------------------------------------------------------------------------------------------------------------------*/ +if ( ! function_exists( 'sophia_after_dark_inner_header_bg_image' ) ) : + + /** + * Background image for inner page header + * + * @since 1.0.0 + */ + function sophia_after_dark_inner_header_bg_image( $input ) { + + $image_attr = array(); + + if ( empty( $image_attr ) ) { + + // Fetch from Custom Header Image. + $image = get_header_image(); + if ( ! empty( $image ) ) { + $image_attr['url'] = $image; + $image_attr['width'] = get_custom_header()->width; + $image_attr['height'] = get_custom_header()->height; + } + } + + if ( ! empty( $image_attr ) ) { + $input .= 'background-image:url(' . esc_url( $image_attr['url'] ) . ');'; + $input .= 'background-size:cover;'; + } + + return $input; + } + +endif; +add_filter( 'sophia_after_dark_inner_header_style_attribute', 'sophia_after_dark_inner_header_bg_image' ); +/*-----------------------------------------------------------------------------------------------------------------------*/ +if ( ! function_exists( 'sophia_after_dark_css_strip_whitespace' ) ) : + + /** + * Get minified css and removed space + * + * @since 1.0.0 + */ + + function sophia_after_dark_css_strip_whitespace( $css ){ + $replace = array( + "#/\*.*?\*/#s" => "", // Strip C style comments. + "#\s\s+#" => " ", // Strip excess whitespace. + ); + $search = array_keys( $replace ); + $css = preg_replace( $search, $replace, $css ); + + $replace = array( + ": " => ":", + "; " => ";", + " {" => "{", + " }" => "}", + ", " => ",", + "{ " => "{", + ";}" => "}", // Strip optional semicolons. + ",\n" => ",", // Don't wrap multiple selectors. + "\n}" => "}", // Don't wrap closing braces. + "} " => "}\n", // Put each rule on it's own line. + ); + $search = array_keys( $replace ); + $css = str_replace( $search, $replace, $css ); + + return trim( $css ); + } + +endif; + +/*-----------------------------------------------------------------------------------------------------------------------*/ + +/** + * Archive title prefix + * + */ +$archive_title_prefix_option = get_theme_mod( 'sophia_after_dark_enable_archive_title_prefix', true ); + +if ( false === $archive_title_prefix_option ) { + add_filter( 'get_the_archive_title', 'sophia_after_dark_archive_title_prefix' ); +} + +if ( ! function_exists( 'sophia_after_dark_archive_title_prefix' ) ) : + + function sophia_after_dark_archive_title_prefix( $title ) { + return preg_replace( '/^\w+: /', '', $title ); + } + +endif; \ No newline at end of file diff --git a/inc/template-tags.php b/inc/template-tags.php new file mode 100644 index 0000000..69faaf7 --- /dev/null +++ b/inc/template-tags.php @@ -0,0 +1,264 @@ +%2$s'; + if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) { + $time_string = ''; + } + + $time_string = sprintf( $time_string, + esc_attr( get_the_date( DATE_W3C ) ), + esc_html( get_the_date() ), + esc_attr( get_the_modified_date( DATE_W3C ) ), + esc_html( get_the_modified_date() ) + ); + + $posted_on = sprintf( + '%s', + '' . $time_string . '' + ); + + echo '' . $posted_on . ''; // WPCS: XSS OK. + + } + +endif; + +/*----------------------------------------------------------------------------------------------------------------------------------------*/ + +if ( ! function_exists( 'sophia_after_dark_posted_by' ) ) : + + /** + * Prints HTML with meta information for the current author. + */ + function sophia_after_dark_posted_by() { + + echo ''; // WPCS: XSS OK. + + } + +endif; +/*----------------------------------------------------------------------------------------------------------------------------------------*/ + +if ( ! function_exists( 'sophia_after_dark_posted_comments' ) ) : + + /** + * Show comment count and leave comment link if no comments are posted + */ + function sophia_after_dark_posted_comments() { + if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) { + echo ''; + comments_popup_link( + sprintf( + wp_kses( + /* translators: %s: post title */ + __( 'Leave a Comment on %s', 'sophia-after-dark' ), + array( + 'span' => array( + 'class' => array(), + ), + ) + ), + get_the_title() + ) + ); + echo ''; + } + } + +endif; + +/*----------------------------------------------------------------------------------------------------------------------------------------*/ + +if ( ! function_exists( 'sophia_after_dark_entry_footer' ) ) : + + /** + * Prints HTML with meta information for the categories, tags and comments. + */ + function sophia_after_dark_entry_footer() { + // Hide tag text for pages. + if ( 'post' === get_post_type() ) { + /* translators: used between list items, there is a space after the comma */ + $tags_list = get_the_tag_list( '', esc_html_x( ', ', 'list item separator', 'sophia-after-dark' ) ); + if ( $tags_list ) { + /* translators: 1: list of tags. */ + printf( '' . esc_html__( 'Tagged: %1$s', 'sophia-after-dark' ) . '', $tags_list ); // WPCS: XSS OK. + } + } + + if ( 'post' === get_post_type() && ! is_single() ) { + + $sophia_after_dark_archive_read_more = get_theme_mod( 'sophia_after_dark_archive_read_more', __( 'Discover', 'sophia-after-dark' ) ); + ?> + + %s', 'sophia-after-dark' ), + array( + 'span' => array( + 'class' => array(), + ), + ) + ), + get_the_title() + ), + '', + '' + ); + } + +endif; + +/*----------------------------------------------------------------------------------------------------------------------------------------*/ +if ( ! function_exists( 'sophia_after_dark_widget_entry_footer' ) ) : + + /** + * Prints HTML with meta information for the categories, tags and comments. + */ + function sophia_after_dark_widget_entry_footer() { + // Hide tag text for pages. + if ( 'post' === get_post_type() ) { + /* translators: used between list items, there is a space after the comma */ + $tags_list = get_the_tag_list( '', esc_html_x( ', ', 'list item separator', 'sophia-after-dark' ) ); + if ( $tags_list ) { + /* translators: 1: list of tags. */ + printf( '' . esc_html__( 'Tagged: %1$s', 'sophia-after-dark' ) . '', $tags_list ); // WPCS: XSS OK. + } + } + + edit_post_link( + sprintf( + wp_kses( + /* translators: %s: Name of current post. Only visible to screen readers */ + __( 'Edit %s', 'sophia-after-dark' ), + array( + 'span' => array( + 'class' => array(), + ), + ) + ), + get_the_title() + ), + '', + '' + ); + } + +endif; + +/*----------------------------------------------------------------------------------------------------------------------------------------*/ + +if ( ! function_exists( 'sophia_after_dark_post_thumbnail' ) ) : + + /** + * Displays an optional post thumbnail. + * + * Wraps the post thumbnail in an anchor element on index views, or a div + * element when on single views. + */ + function sophia_after_dark_post_thumbnail() { + + global $wp_query; + $current_post = $wp_query->current_post; + + $thumbnail_size = 'post-thumbnail'; + $archive_style = get_theme_mod( 'sophia_after_dark_archive_style', 'mt-archive--masonry-style' ); + $sidebar_layout = sophia_after_dark_is_sidebar_layout(); + + if ( post_password_required() || is_attachment() || ! has_post_thumbnail() ) { + return; + } + + // define image size in various section + if ( 'mt-archive--masonry-style' === $archive_style ) { + $thumbnail_size = 'sophia-after-dark-post-auto'; + }elseif ( 'mt-archive--block-grid-style' === $archive_style ) { + $thumbnail_size = 'sophia-after-dark-full-width'; + } + + if ( is_singular() ) : + ?> + +
          + +
          + + + + + + ID; + $categories_list = get_the_category( $post_id ); + if ( !empty( $categories_list ) ) { + ?> +
          + name; + $cat_id = $cat_data->term_id; + $cat_link = get_category_link( $cat_id ); + ?> + + +
          object ){ + $category = get_category( $item->object_id ); + $classes[] = 'cbd-cat-' . $category->term_id; + } + return $classes; +} +add_filter( 'nav_menu_css_class', 'sophia_after_dark_category_nav_class', 10, 2 ); \ No newline at end of file diff --git a/inc/tgm/class-tgm-plugin-activation.php b/inc/tgm/class-tgm-plugin-activation.php new file mode 100644 index 0000000..84120e9 --- /dev/null +++ b/inc/tgm/class-tgm-plugin-activation.php @@ -0,0 +1,3760 @@ +wp_version = $GLOBALS['wp_version']; + + // Announce that the class is ready, and pass the object (for advanced use). + do_action_ref_array( 'tgmpa_init', array( $this ) ); + + + + // When the rest of WP has loaded, kick-start the rest of the class. + add_action( 'init', array( $this, 'init' ) ); + } + + /** + * Magic method to (not) set protected properties from outside of this class. + * + * {@internal hackedihack... There is a serious bug in v2.3.2 - 2.3.6 where the `menu` property + * is being assigned rather than tested in a conditional, effectively rendering it useless. + * This 'hack' prevents this from happening.}} + * + * @see https://github.com/TGMPA/TGM-Plugin-Activation/blob/2.3.6/tgm-plugin-activation/class-tgm-plugin-activation.php#L1593 + * + * @since 2.5.2 + * + * @param string $name Name of an inaccessible property. + * @param mixed $value Value to assign to the property. + * @return void Silently fail to set the property when this is tried from outside of this class context. + * (Inside this class context, the __set() method if not used as there is direct access.) + */ + public function __set( $name, $value ) { + return; + } + + /** + * Magic method to get the value of a protected property outside of this class context. + * + * @since 2.5.2 + * + * @param string $name Name of an inaccessible property. + * @return mixed The property value. + */ + public function __get( $name ) { + return $this->{$name}; + } + + /** + * Initialise the interactions between this class and WordPress. + * + * Hooks in three new methods for the class: admin_menu, notices and styles. + * + * @since 2.0.0 + * + * @see TGM_Plugin_Activation::admin_menu() + * @see TGM_Plugin_Activation::notices() + * @see TGM_Plugin_Activation::styles() + */ + public function init() { + /** + * By default TGMPA only loads on the WP back-end and not in an Ajax call. Using this filter + * you can overrule that behaviour. + * + * @since 2.5.0 + * + * @param bool $load Whether or not TGMPA should load. + * Defaults to the return of `is_admin() && ! defined( 'DOING_AJAX' )`. + */ + if ( true !== apply_filters( 'tgmpa_load', ( is_admin() && ! defined( 'DOING_AJAX' ) ) ) ) { + return; + } + + // Load class strings. + $this->strings = array( + 'page_title' => __( 'Install Required Plugins', 'sophia-after-dark' ), + 'menu_title' => __( 'Install Plugins', 'sophia-after-dark' ), + /* translators: %s: plugin name. */ + 'installing' => __( 'Installing Plugin: %s', 'sophia-after-dark' ), + /* translators: %s: plugin name. */ + 'updating' => __( 'Updating Plugin: %s', 'sophia-after-dark' ), + 'oops' => __( 'Something went wrong with the plugin API.', 'sophia-after-dark' ), + 'notice_can_install_required' => _n_noop( + /* translators: 1: plugin name(s). */ + 'This theme requires the following plugin: %1$s.', + 'This theme requires the following plugins: %1$s.', + 'sophia-after-dark' + ), + 'notice_can_install_recommended' => _n_noop( + /* translators: 1: plugin name(s). */ + 'This theme recommends the following plugin: %1$s.', + 'This theme recommends the following plugins: %1$s.', + 'sophia-after-dark' + ), + 'notice_ask_to_update' => _n_noop( + /* translators: 1: plugin name(s). */ + 'The following plugin needs to be updated to its latest version to ensure maximum compatibility with this theme: %1$s.', + 'The following plugins need to be updated to their latest version to ensure maximum compatibility with this theme: %1$s.', + 'sophia-after-dark' + ), + 'notice_ask_to_update_maybe' => _n_noop( + /* translators: 1: plugin name(s). */ + 'There is an update available for: %1$s.', + 'There are updates available for the following plugins: %1$s.', + 'sophia-after-dark' + ), + 'notice_can_activate_required' => _n_noop( + /* translators: 1: plugin name(s). */ + 'The following required plugin is currently inactive: %1$s.', + 'The following required plugins are currently inactive: %1$s.', + 'sophia-after-dark' + ), + 'notice_can_activate_recommended' => _n_noop( + /* translators: 1: plugin name(s). */ + 'The following recommended plugin is currently inactive: %1$s.', + 'The following recommended plugins are currently inactive: %1$s.', + 'sophia-after-dark' + ), + 'install_link' => _n_noop( + 'Begin installing plugin', + 'Begin installing plugins', + 'sophia-after-dark' + ), + 'update_link' => _n_noop( + 'Begin updating plugin', + 'Begin updating plugins', + 'sophia-after-dark' + ), + 'activate_link' => _n_noop( + 'Begin activating plugin', + 'Begin activating plugins', + 'sophia-after-dark' + ), + 'return' => __( 'Return to Required Plugins Installer', 'sophia-after-dark' ), + 'dashboard' => __( 'Return to the Dashboard', 'sophia-after-dark' ), + 'plugin_activated' => __( 'Plugin activated successfully.', 'sophia-after-dark' ), + 'activated_successfully' => __( 'The following plugin was activated successfully:', 'sophia-after-dark' ), + /* translators: 1: plugin name. */ + 'plugin_already_active' => __( 'No action taken. Plugin %1$s was already active.', 'sophia-after-dark' ), + /* translators: 1: plugin name. */ + 'plugin_needs_higher_version' => __( 'Plugin not activated. A higher version of %s is needed for this theme. Please update the plugin.', 'sophia-after-dark' ), + /* translators: 1: dashboard link. */ + 'complete' => __( 'All plugins installed and activated successfully. %1$s', 'sophia-after-dark' ), + 'dismiss' => __( 'Dismiss this notice', 'sophia-after-dark' ), + 'notice_cannot_install_activate' => __( 'There are one or more required or recommended plugins to install, update or activate.', 'sophia-after-dark' ), + 'contact_admin' => __( 'Please contact the administrator of this site for help.', 'sophia-after-dark' ), + ); + + do_action( 'tgmpa_register' ); + + /* After this point, the plugins should be registered and the configuration set. */ + + // Proceed only if we have plugins to handle. + if ( empty( $this->plugins ) || ! is_array( $this->plugins ) ) { + return; + } + + // Set up the menu and notices if we still have outstanding actions. + if ( true !== $this->is_tgmpa_complete() ) { + // Sort the plugins. + array_multisort( $this->sort_order, SORT_ASC, $this->plugins ); + + add_action( 'admin_menu', array( $this, 'admin_menu' ) ); + add_action( 'admin_head', array( $this, 'dismiss' ) ); + + // Prevent the normal links from showing underneath a single install/update page. + add_filter( 'install_plugin_complete_actions', array( $this, 'actions' ) ); + add_filter( 'update_plugin_complete_actions', array( $this, 'actions' ) ); + + if ( $this->has_notices ) { + add_action( 'admin_notices', array( $this, 'notices' ) ); + add_action( 'admin_init', array( $this, 'admin_init' ), 1 ); + add_action( 'admin_enqueue_scripts', array( $this, 'thickbox' ) ); + } + } + + // If needed, filter plugin action links. + add_action( 'load-plugins.php', array( $this, 'add_plugin_action_link_filters' ), 1 ); + + // Make sure things get reset on switch theme. + add_action( 'switch_theme', array( $this, 'flush_plugins_cache' ) ); + + if ( $this->has_notices ) { + add_action( 'switch_theme', array( $this, 'update_dismiss' ) ); + } + + // Setup the force activation hook. + if ( true === $this->has_forced_activation ) { + add_action( 'admin_init', array( $this, 'force_activation' ) ); + } + + // Setup the force deactivation hook. + if ( true === $this->has_forced_deactivation ) { + add_action( 'switch_theme', array( $this, 'force_deactivation' ) ); + } + } + + + + + + + + /** + * Hook in plugin action link filters for the WP native plugins page. + * + * - Prevent activation of plugins which don't meet the minimum version requirements. + * - Prevent deactivation of force-activated plugins. + * - Add update notice if update available. + * + * @since 2.5.0 + */ + public function add_plugin_action_link_filters() { + foreach ( $this->plugins as $slug => $plugin ) { + if ( false === $this->can_plugin_activate( $slug ) ) { + add_filter( 'plugin_action_links_' . $plugin['file_path'], array( $this, 'filter_plugin_action_links_activate' ), 20 ); + } + + if ( true === $plugin['force_activation'] ) { + add_filter( 'plugin_action_links_' . $plugin['file_path'], array( $this, 'filter_plugin_action_links_deactivate' ), 20 ); + } + + if ( false !== $this->does_plugin_require_update( $slug ) ) { + add_filter( 'plugin_action_links_' . $plugin['file_path'], array( $this, 'filter_plugin_action_links_update' ), 20 ); + } + } + } + + /** + * Remove the 'Activate' link on the WP native plugins page if the plugin does not meet the + * minimum version requirements. + * + * @since 2.5.0 + * + * @param array $actions Action links. + * @return array + */ + public function filter_plugin_action_links_activate( $actions ) { + unset( $actions['activate'] ); + + return $actions; + } + + /** + * Remove the 'Deactivate' link on the WP native plugins page if the plugin has been set to force activate. + * + * @since 2.5.0 + * + * @param array $actions Action links. + * @return array + */ + public function filter_plugin_action_links_deactivate( $actions ) { + unset( $actions['deactivate'] ); + + return $actions; + } + + /** + * Add a 'Requires update' link on the WP native plugins page if the plugin does not meet the + * minimum version requirements. + * + * @since 2.5.0 + * + * @param array $actions Action links. + * @return array + */ + public function filter_plugin_action_links_update( $actions ) { + $actions['update'] = sprintf( + '%3$s', + esc_url( $this->get_tgmpa_status_url( 'update' ) ), + esc_attr__( 'This plugin needs to be updated to be compatible with your theme.', 'sophia-after-dark' ), + esc_html__( 'Update Required', 'sophia-after-dark' ) + ); + + return $actions; + } + + /** + * Handles calls to show plugin information via links in the notices. + * + * We get the links in the admin notices to point to the TGMPA page, rather + * than the typical plugin-install.php file, so we can prepare everything + * beforehand. + * + * WP does not make it easy to show the plugin information in the thickbox - + * here we have to require a file that includes a function that does the + * main work of displaying it, enqueue some styles, set up some globals and + * finally call that function before exiting. + * + * Down right easy once you know how... + * + * Returns early if not the TGMPA page. + * + * @since 2.1.0 + * + * @global string $tab Used as iframe div class names, helps with styling + * @global string $body_id Used as the iframe body ID, helps with styling + * + * @return null Returns early if not the TGMPA page. + */ + public function admin_init() { + if ( ! $this->is_tgmpa_page() ) { + return; + } + + if ( isset( $_REQUEST['tab'] ) && 'plugin-information' === $_REQUEST['tab'] ) { + // Needed for install_plugin_information(). + require_once ABSPATH . 'wp-admin/includes/plugin-install.php'; + + wp_enqueue_style( 'plugin-install' ); + + global $tab, $body_id; + $body_id = 'plugin-information'; + // @codingStandardsIgnoreStart + $tab = 'plugin-information'; + // @codingStandardsIgnoreEnd + + install_plugin_information(); + + exit; + } + } + + /** + * Enqueue thickbox scripts/styles for plugin info. + * + * Thickbox is not automatically included on all admin pages, so we must + * manually enqueue it for those pages. + * + * Thickbox is only loaded if the user has not dismissed the admin + * notice or if there are any plugins left to install and activate. + * + * @since 2.1.0 + */ + public function thickbox() { + if ( ! get_user_meta( get_current_user_id(), 'tgmpa_dismissed_notice_' . $this->id, true ) ) { + add_thickbox(); + } + } + + /** + * Adds submenu page if there are plugin actions to take. + * + * This method adds the submenu page letting users know that a required + * plugin needs to be installed. + * + * This page disappears once the plugin has been installed and activated. + * + * @since 1.0.0 + * + * @see TGM_Plugin_Activation::init() + * @see TGM_Plugin_Activation::install_plugins_page() + * + * @return null Return early if user lacks capability to install a plugin. + */ + public function admin_menu() { + // Make sure privileges are correct to see the page. + if ( ! current_user_can( 'install_plugins' ) ) { + return; + } + + $args = apply_filters( + 'tgmpa_admin_menu_args', + array( + 'parent_slug' => $this->parent_slug, // Parent Menu slug. + 'page_title' => $this->strings['page_title'], // Page title. + 'menu_title' => $this->strings['menu_title'], // Menu title. + 'capability' => $this->capability, // Capability. + 'menu_slug' => $this->menu, // Menu slug. + 'function' => array( $this, 'install_plugins_page' ), // Callback. + ) + ); + + $this->add_admin_menu( $args ); + } + + /** + * Add the menu item. + * + * {@internal IMPORTANT! If this function changes, review the regex in the custom TGMPA + * generator on the website.}} + * + * @since 2.5.0 + * + * @param array $args Menu item configuration. + */ + protected function add_admin_menu( array $args ) { + $this->page_hook = add_theme_page( $args['page_title'], $args['menu_title'], $args['capability'], $args['menu_slug'], $args['function'] ); + } + + /** + * Echoes plugin installation form. + * + * This method is the callback for the admin_menu method function. + * This displays the admin page and form area where the user can select to install and activate the plugin. + * Aborts early if we're processing a plugin installation action. + * + * @since 1.0.0 + * + * @return null Aborts early if we're processing a plugin installation action. + */ + public function install_plugins_page() { + // Store new instance of plugin table in object. + $plugin_table = new TGMPA_List_Table; + + // Return early if processing a plugin installation action. + if ( ( ( 'tgmpa-bulk-install' === $plugin_table->current_action() || 'tgmpa-bulk-update' === $plugin_table->current_action() ) && $plugin_table->process_bulk_actions() ) || $this->do_plugin_install() ) { + return; + } + + // Force refresh of available plugin information so we'll know about manual updates/deletes. + wp_clean_plugins_cache( false ); + + ?> +
          +

          + prepare_items(); ?> + + message ) && is_string( $this->message ) ) { + echo wp_kses_post( $this->message ); + } + ?> + views(); ?> + +
          + + + display(); ?> +
          +
          + sanitize_key( urldecode( $_GET['plugin'] ) ); + + if ( ! isset( $this->plugins[ $slug ] ) ) { + return false; + } + + // Was an install or upgrade action link clicked? + if ( ( isset( $_GET['tgmpa-install'] ) && 'install-plugin' === $_GET['tgmpa-install'] ) || ( isset( $_GET['tgmpa-update'] ) && 'update-plugin' === $_GET['tgmpa-update'] ) ) { + + $install_type = 'install'; + if ( isset( $_GET['tgmpa-update'] ) && 'update-plugin' === $_GET['tgmpa-update'] ) { + $install_type = 'update'; + } + + check_admin_referer( 'tgmpa-' . $install_type, 'tgmpa-nonce' ); + + // Pass necessary information via URL if WP_Filesystem is needed. + $url = wp_nonce_url( + add_query_arg( + array( + 'plugin' => urlencode( $slug ), + 'tgmpa-' . $install_type => $install_type . '-plugin', + ), + $this->get_tgmpa_url() + ), + 'tgmpa-' . $install_type, + 'tgmpa-nonce' + ); + + $method = ''; // Leave blank so WP_Filesystem can populate it as necessary. + + if ( false === ( $creds = request_filesystem_credentials( esc_url_raw( $url ), $method, false, false, array() ) ) ) { + return true; + } + + if ( ! WP_Filesystem( $creds ) ) { + request_filesystem_credentials( esc_url_raw( $url ), $method, true, false, array() ); // Setup WP_Filesystem. + return true; + } + + /* If we arrive here, we have the filesystem. */ + + // Prep variables for Plugin_Installer_Skin class. + $extra = array(); + $extra['slug'] = $slug; // Needed for potentially renaming of directory name. + $source = $this->get_download_url( $slug ); + $api = ( 'repo' === $this->plugins[ $slug ]['source_type'] ) ? $this->get_plugins_api( $slug ) : null; + $api = ( false !== $api ) ? $api : null; + + $url = add_query_arg( + array( + 'action' => $install_type . '-plugin', + 'plugin' => urlencode( $slug ), + ), + 'update.php' + ); + + if ( ! class_exists( 'Plugin_Upgrader', false ) ) { + require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; + } + + $title = ( 'update' === $install_type ) ? $this->strings['updating'] : $this->strings['installing']; + $skin_args = array( + 'type' => ( 'bundled' !== $this->plugins[ $slug ]['source_type'] ) ? 'web' : 'upload', + 'title' => sprintf( $title, $this->plugins[ $slug ]['name'] ), + 'url' => esc_url_raw( $url ), + 'nonce' => $install_type . '-plugin_' . $slug, + 'plugin' => '', + 'api' => $api, + 'extra' => $extra, + ); + unset( $title ); + + if ( 'update' === $install_type ) { + $skin_args['plugin'] = $this->plugins[ $slug ]['file_path']; + $skin = new Plugin_Upgrader_Skin( $skin_args ); + } else { + $skin = new Plugin_Installer_Skin( $skin_args ); + } + + // Create a new instance of Plugin_Upgrader. + $upgrader = new Plugin_Upgrader( $skin ); + + // Perform the action and install the plugin from the $source urldecode(). + add_filter( 'upgrader_source_selection', array( $this, 'maybe_adjust_source_dir' ), 1, 3 ); + + if ( 'update' === $install_type ) { + // Inject our info into the update transient. + $to_inject = array( $slug => $this->plugins[ $slug ] ); + $to_inject[ $slug ]['source'] = $source; + $this->inject_update_info( $to_inject ); + + $upgrader->upgrade( $this->plugins[ $slug ]['file_path'] ); + } else { + $upgrader->install( $source ); + } + + remove_filter( 'upgrader_source_selection', array( $this, 'maybe_adjust_source_dir' ), 1 ); + + // Make sure we have the correct file path now the plugin is installed/updated. + $this->populate_file_path( $slug ); + + // Only activate plugins if the config option is set to true and the plugin isn't + // already active (upgrade). + if ( $this->is_automatic && ! $this->is_plugin_active( $slug ) ) { + $plugin_activate = $upgrader->plugin_info(); // Grab the plugin info from the Plugin_Upgrader method. + if ( false === $this->activate_single_plugin( $plugin_activate, $slug, true ) ) { + return true; // Finish execution of the function early as we encountered an error. + } + } + + $this->show_tgmpa_version(); + + // Display message based on if all plugins are now active or not. + if ( $this->is_tgmpa_complete() ) { + echo '

          ', sprintf( esc_html( $this->strings['complete'] ), '' . esc_html__( 'Return to the Dashboard', 'sophia-after-dark' ) . '' ), '

          '; + echo ''; + } else { + echo '

          ', esc_html( $this->strings['return'] ), '

          '; + } + + return true; + } elseif ( isset( $this->plugins[ $slug ]['file_path'], $_GET['tgmpa-activate'] ) && 'activate-plugin' === $_GET['tgmpa-activate'] ) { + // Activate action link was clicked. + check_admin_referer( 'tgmpa-activate', 'tgmpa-nonce' ); + + if ( false === $this->activate_single_plugin( $this->plugins[ $slug ]['file_path'], $slug ) ) { + return true; // Finish execution of the function early as we encountered an error. + } + } + + return false; + } + + /** + * Inject information into the 'update_plugins' site transient as WP checks that before running an update. + * + * @since 2.5.0 + * + * @param array $plugins The plugin information for the plugins which are to be updated. + */ + public function inject_update_info( $plugins ) { + $repo_updates = get_site_transient( 'update_plugins' ); + + if ( ! is_object( $repo_updates ) ) { + $repo_updates = new stdClass; + } + + foreach ( $plugins as $slug => $plugin ) { + $file_path = $plugin['file_path']; + + if ( empty( $repo_updates->response[ $file_path ] ) ) { + $repo_updates->response[ $file_path ] = new stdClass; + } + + // We only really need to set package, but let's do all we can in case WP changes something. + $repo_updates->response[ $file_path ]->slug = $slug; + $repo_updates->response[ $file_path ]->plugin = $file_path; + $repo_updates->response[ $file_path ]->new_version = $plugin['version']; + $repo_updates->response[ $file_path ]->package = $plugin['source']; + if ( empty( $repo_updates->response[ $file_path ]->url ) && ! empty( $plugin['external_url'] ) ) { + $repo_updates->response[ $file_path ]->url = $plugin['external_url']; + } + } + + set_site_transient( 'update_plugins', $repo_updates ); + } + + /** + * Adjust the plugin directory name if necessary. + * + * The final destination directory of a plugin is based on the subdirectory name found in the + * (un)zipped source. In some cases - most notably GitHub repository plugin downloads -, this + * subdirectory name is not the same as the expected slug and the plugin will not be recognized + * as installed. This is fixed by adjusting the temporary unzipped source subdirectory name to + * the expected plugin slug. + * + * @since 2.5.0 + * + * @param string $source Path to upgrade/zip-file-name.tmp/subdirectory/. + * @param string $remote_source Path to upgrade/zip-file-name.tmp. + * @param \WP_Upgrader $upgrader Instance of the upgrader which installs the plugin. + * @return string $source + */ + public function maybe_adjust_source_dir( $source, $remote_source, $upgrader ) { + if ( ! $this->is_tgmpa_page() || ! is_object( $GLOBALS['wp_filesystem'] ) ) { + return $source; + } + + // Check for single file plugins. + $source_files = array_keys( $GLOBALS['wp_filesystem']->dirlist( $remote_source ) ); + if ( 1 === count( $source_files ) && false === $GLOBALS['wp_filesystem']->is_dir( $source ) ) { + return $source; + } + + // Multi-file plugin, let's see if the directory is correctly named. + $desired_slug = ''; + + // Figure out what the slug is supposed to be. + if ( false === $upgrader->bulk && ! empty( $upgrader->skin->options['extra']['slug'] ) ) { + $desired_slug = $upgrader->skin->options['extra']['slug']; + } else { + // Bulk installer contains less info, so fall back on the info registered here. + foreach ( $this->plugins as $slug => $plugin ) { + if ( ! empty( $upgrader->skin->plugin_names[ $upgrader->skin->i ] ) && $plugin['name'] === $upgrader->skin->plugin_names[ $upgrader->skin->i ] ) { + $desired_slug = $slug; + break; + } + } + unset( $slug, $plugin ); + } + + if ( ! empty( $desired_slug ) ) { + $subdir_name = untrailingslashit( str_replace( trailingslashit( $remote_source ), '', $source ) ); + + if ( ! empty( $subdir_name ) && $subdir_name !== $desired_slug ) { + $from_path = untrailingslashit( $source ); + $to_path = trailingslashit( $remote_source ) . $desired_slug; + + if ( true === $GLOBALS['wp_filesystem']->move( $from_path, $to_path ) ) { + return trailingslashit( $to_path ); + } else { + return new WP_Error( 'rename_failed', esc_html__( 'The remote plugin package does not contain a folder with the desired slug and renaming did not work.', 'sophia-after-dark' ) . ' ' . esc_html__( 'Please contact the plugin provider and ask them to package their plugin according to the WordPress guidelines.', 'sophia-after-dark' ), array( 'found' => $subdir_name, 'expected' => $desired_slug ) ); + } + } elseif ( empty( $subdir_name ) ) { + return new WP_Error( 'packaged_wrong', esc_html__( 'The remote plugin package consists of more than one file, but the files are not packaged in a folder.', 'sophia-after-dark' ) . ' ' . esc_html__( 'Please contact the plugin provider and ask them to package their plugin according to the WordPress guidelines.', 'sophia-after-dark' ), array( 'found' => $subdir_name, 'expected' => $desired_slug ) ); + } + } + + return $source; + } + + /** + * Activate a single plugin and send feedback about the result to the screen. + * + * @since 2.5.0 + * + * @param string $file_path Path within wp-plugins/ to main plugin file. + * @param string $slug Plugin slug. + * @param bool $automatic Whether this is an automatic activation after an install. Defaults to false. + * This determines the styling of the output messages. + * @return bool False if an error was encountered, true otherwise. + */ + protected function activate_single_plugin( $file_path, $slug, $automatic = false ) { + if ( $this->can_plugin_activate( $slug ) ) { + $activate = activate_plugin( $file_path ); + + if ( is_wp_error( $activate ) ) { + echo '

          ', wp_kses_post( $activate->get_error_message() ), '

          ', + '

          ', esc_html( $this->strings['return'] ), '

          '; + + return false; // End it here if there is an error with activation. + } else { + if ( ! $automatic ) { + // Make sure message doesn't display again if bulk activation is performed + // immediately after a single activation. + if ( ! isset( $_POST['action'] ) ) { // WPCS: CSRF OK. + echo '

          ', esc_html( $this->strings['activated_successfully'] ), ' ', esc_html( $this->plugins[ $slug ]['name'] ), '.

          '; + } + } else { + // Simpler message layout for use on the plugin install page. + echo '

          ', esc_html( $this->strings['plugin_activated'] ), '

          '; + } + } + } elseif ( $this->is_plugin_active( $slug ) ) { + // No simpler message format provided as this message should never be encountered + // on the plugin install page. + echo '

          ', + sprintf( + esc_html( $this->strings['plugin_already_active'] ), + '' . esc_html( $this->plugins[ $slug ]['name'] ) . '' + ), + '

          '; + } elseif ( $this->does_plugin_require_update( $slug ) ) { + if ( ! $automatic ) { + // Make sure message doesn't display again if bulk activation is performed + // immediately after a single activation. + if ( ! isset( $_POST['action'] ) ) { // WPCS: CSRF OK. + echo '

          ', + sprintf( + esc_html( $this->strings['plugin_needs_higher_version'] ), + '' . esc_html( $this->plugins[ $slug ]['name'] ) . '' + ), + '

          '; + } + } else { + // Simpler message layout for use on the plugin install page. + echo '

          ', sprintf( esc_html( $this->strings['plugin_needs_higher_version'] ), esc_html( $this->plugins[ $slug ]['name'] ) ), '

          '; + } + } + + return true; + } + + /** + * Echoes required plugin notice. + * + * Outputs a message telling users that a specific plugin is required for + * their theme. If appropriate, it includes a link to the form page where + * users can install and activate the plugin. + * + * Returns early if we're on the Install page. + * + * @since 1.0.0 + * + * @global object $current_screen + * + * @return null Returns early if we're on the Install page. + */ + public function notices() { + // Remove nag on the install page / Return early if the nag message has been dismissed or user < author. + if ( ( $this->is_tgmpa_page() || $this->is_core_update_page() ) || get_user_meta( get_current_user_id(), 'tgmpa_dismissed_notice_' . $this->id, true ) || ! current_user_can( apply_filters( 'tgmpa_show_admin_notice_capability', 'publish_posts' ) ) ) { + return; + } + + // Store for the plugin slugs by message type. + $message = array(); + + // Initialize counters used to determine plurality of action link texts. + $install_link_count = 0; + $update_link_count = 0; + $activate_link_count = 0; + $total_required_action_count = 0; + + foreach ( $this->plugins as $slug => $plugin ) { + if ( $this->is_plugin_active( $slug ) && false === $this->does_plugin_have_update( $slug ) ) { + continue; + } + + if ( ! $this->is_plugin_installed( $slug ) ) { + if ( current_user_can( 'install_plugins' ) ) { + $install_link_count++; + + if ( true === $plugin['required'] ) { + $message['notice_can_install_required'][] = $slug; + } else { + $message['notice_can_install_recommended'][] = $slug; + } + } + if ( true === $plugin['required'] ) { + $total_required_action_count++; + } + } else { + if ( ! $this->is_plugin_active( $slug ) && $this->can_plugin_activate( $slug ) ) { + if ( current_user_can( 'activate_plugins' ) ) { + $activate_link_count++; + + if ( true === $plugin['required'] ) { + $message['notice_can_activate_required'][] = $slug; + } else { + $message['notice_can_activate_recommended'][] = $slug; + } + } + if ( true === $plugin['required'] ) { + $total_required_action_count++; + } + } + + if ( $this->does_plugin_require_update( $slug ) || false !== $this->does_plugin_have_update( $slug ) ) { + + if ( current_user_can( 'update_plugins' ) ) { + $update_link_count++; + + if ( $this->does_plugin_require_update( $slug ) ) { + $message['notice_ask_to_update'][] = $slug; + } elseif ( false !== $this->does_plugin_have_update( $slug ) ) { + $message['notice_ask_to_update_maybe'][] = $slug; + } + } + if ( true === $plugin['required'] ) { + $total_required_action_count++; + } + } + } + } + unset( $slug, $plugin ); + + // If we have notices to display, we move forward. + if ( ! empty( $message ) || $total_required_action_count > 0 ) { + krsort( $message ); // Sort messages. + $rendered = ''; + + // As add_settings_error() wraps the final message in a

          and as the final message can't be + // filtered, using

          's in our html would render invalid html output. + $line_template = '%s' . "\n"; + + if ( ! current_user_can( 'activate_plugins' ) && ! current_user_can( 'install_plugins' ) && ! current_user_can( 'update_plugins' ) ) { + $rendered = esc_html( $this->strings['notice_cannot_install_activate'] ) . ' ' . esc_html( $this->strings['contact_admin'] ); + $rendered .= $this->create_user_action_links_for_notice( 0, 0, 0, $line_template ); + } else { + + // If dismissable is false and a message is set, output it now. + if ( ! $this->dismissable && ! empty( $this->dismiss_msg ) ) { + $rendered .= sprintf( $line_template, wp_kses_post( $this->dismiss_msg ) ); + } + + // Render the individual message lines for the notice. + foreach ( $message as $type => $plugin_group ) { + $linked_plugins = array(); + + // Get the external info link for a plugin if one is available. + foreach ( $plugin_group as $plugin_slug ) { + $linked_plugins[] = $this->get_info_link( $plugin_slug ); + } + unset( $plugin_slug ); + + $count = count( $plugin_group ); + $linked_plugins = array_map( array( 'TGMPA_Utils', 'wrap_in_em' ), $linked_plugins ); + $last_plugin = array_pop( $linked_plugins ); // Pop off last name to prep for readability. + $imploded = empty( $linked_plugins ) ? $last_plugin : ( implode( ', ', $linked_plugins ) . ' ' . esc_html_x( 'and', 'plugin A *and* plugin B', 'sophia-after-dark' ) . ' ' . $last_plugin ); + + $rendered .= sprintf( + $line_template, + sprintf( + translate_nooped_plural( $this->strings[ $type ], $count, 'sophia-after-dark' ), + $imploded, + $count + ) + ); + + } + unset( $type, $plugin_group, $linked_plugins, $count, $last_plugin, $imploded ); + + $rendered .= $this->create_user_action_links_for_notice( $install_link_count, $update_link_count, $activate_link_count, $line_template ); + } + + // Register the nag messages and prepare them to be processed. + add_settings_error( 'tgmpa', 'tgmpa', $rendered, $this->get_admin_notice_class() ); + } + + // Admin options pages already output settings_errors, so this is to avoid duplication. + if ( 'options-general' !== $GLOBALS['current_screen']->parent_base ) { + $this->display_settings_errors(); + } + } + + /** + * Generate the user action links for the admin notice. + * + * @since 2.6.0 + * + * @param int $install_count Number of plugins to install. + * @param int $update_count Number of plugins to update. + * @param int $activate_count Number of plugins to activate. + * @param int $line_template Template for the HTML tag to output a line. + * @return string Action links. + */ + protected function create_user_action_links_for_notice( $install_count, $update_count, $activate_count, $line_template ) { + // Setup action links. + $action_links = array( + 'install' => '', + 'update' => '', + 'activate' => '', + 'dismiss' => $this->dismissable ? '' . esc_html( $this->strings['dismiss'] ) . '' : '', + ); + + $link_template = '%1$s'; + + if ( current_user_can( 'install_plugins' ) ) { + if ( $install_count > 0 ) { + $action_links['install'] = sprintf( + $link_template, + translate_nooped_plural( $this->strings['install_link'], $install_count, 'sophia-after-dark' ), + esc_url( $this->get_tgmpa_status_url( 'install' ) ) + ); + } + if ( $update_count > 0 ) { + $action_links['update'] = sprintf( + $link_template, + translate_nooped_plural( $this->strings['update_link'], $update_count, 'sophia-after-dark' ), + esc_url( $this->get_tgmpa_status_url( 'update' ) ) + ); + } + } + + if ( current_user_can( 'activate_plugins' ) && $activate_count > 0 ) { + $action_links['activate'] = sprintf( + $link_template, + translate_nooped_plural( $this->strings['activate_link'], $activate_count, 'sophia-after-dark' ), + esc_url( $this->get_tgmpa_status_url( 'activate' ) ) + ); + } + + $action_links = apply_filters( 'tgmpa_notice_action_links', $action_links ); + + $action_links = array_filter( (array) $action_links ); // Remove any empty array items. + + if ( ! empty( $action_links ) ) { + $action_links = sprintf( $line_template, implode( ' | ', $action_links ) ); + return apply_filters( 'tgmpa_notice_rendered_action_links', $action_links ); + } else { + return ''; + } + } + + /** + * Get admin notice class. + * + * Work around all the changes to the various admin notice classes between WP 4.4 and 3.7 + * (lowest supported version by TGMPA). + * + * @since 2.6.0 + * + * @return string + */ + protected function get_admin_notice_class() { + if ( ! empty( $this->strings['nag_type'] ) ) { + return sanitize_html_class( strtolower( $this->strings['nag_type'] ) ); + } else { + if ( version_compare( $this->wp_version, '4.2', '>=' ) ) { + return 'notice-warning'; + } elseif ( version_compare( $this->wp_version, '4.1', '>=' ) ) { + return 'notice'; + } else { + return 'updated'; + } + } + } + + /** + * Display settings errors and remove those which have been displayed to avoid duplicate messages showing + * + * @since 2.5.0 + */ + protected function display_settings_errors() { + global $wp_settings_errors; + + settings_errors( 'tgmpa' ); + + foreach ( (array) $wp_settings_errors as $key => $details ) { + if ( 'tgmpa' === $details['setting'] ) { + unset( $wp_settings_errors[ $key ] ); + break; + } + } + } + + /** + * Register dismissal of admin notices. + * + * Acts on the dismiss link in the admin nag messages. + * If clicked, the admin notice disappears and will no longer be visible to this user. + * + * @since 2.1.0 + */ + public function dismiss() { + if ( isset( $_GET['tgmpa-dismiss'] ) && check_admin_referer( 'tgmpa-dismiss-' . get_current_user_id() ) ) { + update_user_meta( get_current_user_id(), 'tgmpa_dismissed_notice_' . $this->id, 1 ); + } + } + + /** + * Add individual plugin to our collection of plugins. + * + * If the required keys are not set or the plugin has already + * been registered, the plugin is not added. + * + * @since 2.0.0 + * + * @param array|null $plugin Array of plugin arguments or null if invalid argument. + * @return null Return early if incorrect argument. + */ + public function register( $plugin ) { + if ( empty( $plugin['slug'] ) || empty( $plugin['name'] ) ) { + return; + } + + if ( empty( $plugin['slug'] ) || ! is_string( $plugin['slug'] ) || isset( $this->plugins[ $plugin['slug'] ] ) ) { + return; + } + + $defaults = array( + 'name' => '', // String + 'slug' => '', // String + 'source' => 'repo', // String + 'required' => false, // Boolean + 'version' => '', // String + 'force_activation' => false, // Boolean + 'force_deactivation' => false, // Boolean + 'external_url' => '', // String + 'is_callable' => '', // String|Array. + ); + + // Prepare the received data. + $plugin = wp_parse_args( $plugin, $defaults ); + + // Standardize the received slug. + $plugin['slug'] = $this->sanitize_key( $plugin['slug'] ); + + // Forgive users for using string versions of booleans or floats for version number. + $plugin['version'] = (string) $plugin['version']; + $plugin['source'] = empty( $plugin['source'] ) ? 'repo' : $plugin['source']; + $plugin['required'] = TGMPA_Utils::validate_bool( $plugin['required'] ); + $plugin['force_activation'] = TGMPA_Utils::validate_bool( $plugin['force_activation'] ); + $plugin['force_deactivation'] = TGMPA_Utils::validate_bool( $plugin['force_deactivation'] ); + + // Enrich the received data. + $plugin['file_path'] = $this->_get_plugin_basename_from_slug( $plugin['slug'] ); + $plugin['source_type'] = $this->get_plugin_source_type( $plugin['source'] ); + + // Set the class properties. + $this->plugins[ $plugin['slug'] ] = $plugin; + $this->sort_order[ $plugin['slug'] ] = $plugin['name']; + + // Should we add the force activation hook ? + if ( true === $plugin['force_activation'] ) { + $this->has_forced_activation = true; + } + + // Should we add the force deactivation hook ? + if ( true === $plugin['force_deactivation'] ) { + $this->has_forced_deactivation = true; + } + } + + /** + * Determine what type of source the plugin comes from. + * + * @since 2.5.0 + * + * @param string $source The source of the plugin as provided, either empty (= WP repo), a file path + * (= bundled) or an external URL. + * @return string 'repo', 'external', or 'bundled' + */ + protected function get_plugin_source_type( $source ) { + if ( 'repo' === $source || preg_match( self::WP_REPO_REGEX, $source ) ) { + return 'repo'; + } elseif ( preg_match( self::IS_URL_REGEX, $source ) ) { + return 'external'; + } else { + return 'bundled'; + } + } + + /** + * Sanitizes a string key. + * + * Near duplicate of WP Core `sanitize_key()`. The difference is that uppercase characters *are* + * allowed, so as not to break upgrade paths from non-standard bundled plugins using uppercase + * characters in the plugin directory path/slug. Silly them. + * + * @see https://developer.wordpress.org/reference/hooks/sanitize_key/ + * + * @since 2.5.0 + * + * @param string $key String key. + * @return string Sanitized key + */ + public function sanitize_key( $key ) { + $raw_key = $key; + $key = preg_replace( '`[^A-Za-z0-9_-]`', '', $key ); + + /** + * Filter a sanitized key string. + * + * @since 2.5.0 + * + * @param string $key Sanitized key. + * @param string $raw_key The key prior to sanitization. + */ + return apply_filters( 'tgmpa_sanitize_key', $key, $raw_key ); + } + + /** + * Amend default configuration settings. + * + * @since 2.0.0 + * + * @param array $config Array of config options to pass as class properties. + */ + public function config( $config ) { + $keys = array( + 'id', + 'default_path', + 'has_notices', + 'dismissable', + 'dismiss_msg', + 'menu', + 'parent_slug', + 'capability', + 'is_automatic', + 'message', + 'strings', + ); + + foreach ( $keys as $key ) { + if ( isset( $config[ $key ] ) ) { + if ( is_array( $config[ $key ] ) ) { + $this->$key = array_merge( $this->$key, $config[ $key ] ); + } else { + $this->$key = $config[ $key ]; + } + } + } + } + + /** + * Amend action link after plugin installation. + * + * @since 2.0.0 + * + * @param array $install_actions Existing array of actions. + * @return false|array Amended array of actions. + */ + public function actions( $install_actions ) { + // Remove action links on the TGMPA install page. + if ( $this->is_tgmpa_page() ) { + return false; + } + + return $install_actions; + } + + /** + * Flushes the plugins cache on theme switch to prevent stale entries + * from remaining in the plugin table. + * + * @since 2.4.0 + * + * @param bool $clear_update_cache Optional. Whether to clear the Plugin updates cache. + * Parameter added in v2.5.0. + */ + public function flush_plugins_cache( $clear_update_cache = true ) { + wp_clean_plugins_cache( $clear_update_cache ); + } + + /** + * Set file_path key for each installed plugin. + * + * @since 2.1.0 + * + * @param string $plugin_slug Optional. If set, only (re-)populates the file path for that specific plugin. + * Parameter added in v2.5.0. + */ + public function populate_file_path( $plugin_slug = '' ) { + if ( ! empty( $plugin_slug ) && is_string( $plugin_slug ) && isset( $this->plugins[ $plugin_slug ] ) ) { + $this->plugins[ $plugin_slug ]['file_path'] = $this->_get_plugin_basename_from_slug( $plugin_slug ); + } else { + // Add file_path key for all plugins. + foreach ( $this->plugins as $slug => $values ) { + $this->plugins[ $slug ]['file_path'] = $this->_get_plugin_basename_from_slug( $slug ); + } + } + } + + /** + * Helper function to extract the file path of the plugin file from the + * plugin slug, if the plugin is installed. + * + * @since 2.0.0 + * + * @param string $slug Plugin slug (typically folder name) as provided by the developer. + * @return string Either file path for plugin if installed, or just the plugin slug. + */ + protected function _get_plugin_basename_from_slug( $slug ) { + $keys = array_keys( $this->get_plugins() ); + + foreach ( $keys as $key ) { + if ( preg_match( '|^' . $slug . '/|', $key ) ) { + return $key; + } + } + + return $slug; + } + + /** + * Retrieve plugin data, given the plugin name. + * + * Loops through the registered plugins looking for $name. If it finds it, + * it returns the $data from that plugin. Otherwise, returns false. + * + * @since 2.1.0 + * + * @param string $name Name of the plugin, as it was registered. + * @param string $data Optional. Array key of plugin data to return. Default is slug. + * @return string|boolean Plugin slug if found, false otherwise. + */ + public function _get_plugin_data_from_name( $name, $data = 'slug' ) { + foreach ( $this->plugins as $values ) { + if ( $name === $values['name'] && isset( $values[ $data ] ) ) { + return $values[ $data ]; + } + } + + return false; + } + + /** + * Retrieve the download URL for a package. + * + * @since 2.5.0 + * + * @param string $slug Plugin slug. + * @return string Plugin download URL or path to local file or empty string if undetermined. + */ + public function get_download_url( $slug ) { + $dl_source = ''; + + switch ( $this->plugins[ $slug ]['source_type'] ) { + case 'repo': + return $this->get_wp_repo_download_url( $slug ); + case 'external': + return $this->plugins[ $slug ]['source']; + case 'bundled': + return $this->default_path . $this->plugins[ $slug ]['source']; + } + + return $dl_source; // Should never happen. + } + + /** + * Retrieve the download URL for a WP repo package. + * + * @since 2.5.0 + * + * @param string $slug Plugin slug. + * @return string Plugin download URL. + */ + protected function get_wp_repo_download_url( $slug ) { + $source = ''; + $api = $this->get_plugins_api( $slug ); + + if ( false !== $api && isset( $api->download_link ) ) { + $source = $api->download_link; + } + + return $source; + } + + /** + * Try to grab information from WordPress API. + * + * @since 2.5.0 + * + * @param string $slug Plugin slug. + * @return object Plugins_api response object on success, WP_Error on failure. + */ + protected function get_plugins_api( $slug ) { + static $api = array(); // Cache received responses. + + if ( ! isset( $api[ $slug ] ) ) { + if ( ! function_exists( 'plugins_api' ) ) { + require_once ABSPATH . 'wp-admin/includes/plugin-install.php'; + } + + $response = plugins_api( 'plugin_information', array( 'slug' => $slug, 'fields' => array( 'sections' => false ) ) ); + + $api[ $slug ] = false; + + if ( is_wp_error( $response ) ) { + wp_die( esc_html( $this->strings['oops'] ) ); + } else { + $api[ $slug ] = $response; + } + } + + return $api[ $slug ]; + } + + /** + * Retrieve a link to a plugin information page. + * + * @since 2.5.0 + * + * @param string $slug Plugin slug. + * @return string Fully formed html link to a plugin information page if available + * or the plugin name if not. + */ + public function get_info_link( $slug ) { + if ( ! empty( $this->plugins[ $slug ]['external_url'] ) && preg_match( self::IS_URL_REGEX, $this->plugins[ $slug ]['external_url'] ) ) { + $link = sprintf( + '%2$s', + esc_url( $this->plugins[ $slug ]['external_url'] ), + esc_html( $this->plugins[ $slug ]['name'] ) + ); + } elseif ( 'repo' === $this->plugins[ $slug ]['source_type'] ) { + $url = add_query_arg( + array( + 'tab' => 'plugin-information', + 'plugin' => urlencode( $slug ), + 'TB_iframe' => 'true', + 'width' => '640', + 'height' => '500', + ), + self_admin_url( 'plugin-install.php' ) + ); + + $link = sprintf( + '%2$s', + esc_url( $url ), + esc_html( $this->plugins[ $slug ]['name'] ) + ); + } else { + $link = esc_html( $this->plugins[ $slug ]['name'] ); // No hyperlink. + } + + return $link; + } + + /** + * Determine if we're on the TGMPA Install page. + * + * @since 2.1.0 + * + * @return boolean True when on the TGMPA page, false otherwise. + */ + protected function is_tgmpa_page() { + return isset( $_GET['page'] ) && $this->menu === $_GET['page']; + } + + /** + * Determine if we're on a WP Core installation/upgrade page. + * + * @since 2.6.0 + * + * @return boolean True when on a WP Core installation/upgrade page, false otherwise. + */ + protected function is_core_update_page() { + // Current screen is not always available, most notably on the customizer screen. + if ( ! function_exists( 'get_current_screen' ) ) { + return false; + } + + $screen = get_current_screen(); + + if ( 'update-core' === $screen->base ) { + // Core update screen. + return true; + } elseif ( 'plugins' === $screen->base && ! empty( $_POST['action'] ) ) { // WPCS: CSRF ok. + // Plugins bulk update screen. + return true; + } elseif ( 'update' === $screen->base && ! empty( $_POST['action'] ) ) { // WPCS: CSRF ok. + // Individual updates (ajax call). + return true; + } + + return false; + } + + /** + * Retrieve the URL to the TGMPA Install page. + * + * I.e. depending on the config settings passed something along the lines of: + * http://example.com/wp-admin/themes.php?page=tgmpa-install-plugins + * + * @since 2.5.0 + * + * @return string Properly encoded URL (not escaped). + */ + public function get_tgmpa_url() { + static $url; + + if ( ! isset( $url ) ) { + $parent = $this->parent_slug; + if ( false === strpos( $parent, '.php' ) ) { + $parent = 'admin.php'; + } + $url = add_query_arg( + array( + 'page' => urlencode( $this->menu ), + ), + self_admin_url( $parent ) + ); + } + + return $url; + } + + /** + * Retrieve the URL to the TGMPA Install page for a specific plugin status (view). + * + * I.e. depending on the config settings passed something along the lines of: + * http://example.com/wp-admin/themes.php?page=tgmpa-install-plugins&plugin_status=install + * + * @since 2.5.0 + * + * @param string $status Plugin status - either 'install', 'update' or 'activate'. + * @return string Properly encoded URL (not escaped). + */ + public function get_tgmpa_status_url( $status ) { + return add_query_arg( + array( + 'plugin_status' => urlencode( $status ), + ), + $this->get_tgmpa_url() + ); + } + + /** + * Determine whether there are open actions for plugins registered with TGMPA. + * + * @since 2.5.0 + * + * @return bool True if complete, i.e. no outstanding actions. False otherwise. + */ + public function is_tgmpa_complete() { + $complete = true; + foreach ( $this->plugins as $slug => $plugin ) { + if ( ! $this->is_plugin_active( $slug ) || false !== $this->does_plugin_have_update( $slug ) ) { + $complete = false; + break; + } + } + + return $complete; + } + + /** + * Check if a plugin is installed. Does not take must-use plugins into account. + * + * @since 2.5.0 + * + * @param string $slug Plugin slug. + * @return bool True if installed, false otherwise. + */ + public function is_plugin_installed( $slug ) { + $installed_plugins = $this->get_plugins(); // Retrieve a list of all installed plugins (WP cached). + + return ( ! empty( $installed_plugins[ $this->plugins[ $slug ]['file_path'] ] ) ); + } + + /** + * Check if a plugin is active. + * + * @since 2.5.0 + * + * @param string $slug Plugin slug. + * @return bool True if active, false otherwise. + */ + public function is_plugin_active( $slug ) { + return ( ( ! empty( $this->plugins[ $slug ]['is_callable'] ) && is_callable( $this->plugins[ $slug ]['is_callable'] ) ) || is_plugin_active( $this->plugins[ $slug ]['file_path'] ) ); + } + + /** + * Check if a plugin can be updated, i.e. if we have information on the minimum WP version required + * available, check whether the current install meets them. + * + * @since 2.5.0 + * + * @param string $slug Plugin slug. + * @return bool True if OK to update, false otherwise. + */ + public function can_plugin_update( $slug ) { + // We currently can't get reliable info on non-WP-repo plugins - issue #380. + if ( 'repo' !== $this->plugins[ $slug ]['source_type'] ) { + return true; + } + + $api = $this->get_plugins_api( $slug ); + + if ( false !== $api && isset( $api->requires ) ) { + return version_compare( $this->wp_version, $api->requires, '>=' ); + } + + // No usable info received from the plugins API, presume we can update. + return true; + } + + /** + * Check to see if the plugin is 'updatetable', i.e. installed, with an update available + * and no WP version requirements blocking it. + * + * @since 2.6.0 + * + * @param string $slug Plugin slug. + * @return bool True if OK to proceed with update, false otherwise. + */ + public function is_plugin_updatetable( $slug ) { + if ( ! $this->is_plugin_installed( $slug ) ) { + return false; + } else { + return ( false !== $this->does_plugin_have_update( $slug ) && $this->can_plugin_update( $slug ) ); + } + } + + /** + * Check if a plugin can be activated, i.e. is not currently active and meets the minimum + * plugin version requirements set in TGMPA (if any). + * + * @since 2.5.0 + * + * @param string $slug Plugin slug. + * @return bool True if OK to activate, false otherwise. + */ + public function can_plugin_activate( $slug ) { + return ( ! $this->is_plugin_active( $slug ) && ! $this->does_plugin_require_update( $slug ) ); + } + + /** + * Retrieve the version number of an installed plugin. + * + * @since 2.5.0 + * + * @param string $slug Plugin slug. + * @return string Version number as string or an empty string if the plugin is not installed + * or version unknown (plugins which don't comply with the plugin header standard). + */ + public function get_installed_version( $slug ) { + $installed_plugins = $this->get_plugins(); // Retrieve a list of all installed plugins (WP cached). + + if ( ! empty( $installed_plugins[ $this->plugins[ $slug ]['file_path'] ]['Version'] ) ) { + return $installed_plugins[ $this->plugins[ $slug ]['file_path'] ]['Version']; + } + + return ''; + } + + /** + * Check whether a plugin complies with the minimum version requirements. + * + * @since 2.5.0 + * + * @param string $slug Plugin slug. + * @return bool True when a plugin needs to be updated, otherwise false. + */ + public function does_plugin_require_update( $slug ) { + $installed_version = $this->get_installed_version( $slug ); + $minimum_version = $this->plugins[ $slug ]['version']; + + return version_compare( $minimum_version, $installed_version, '>' ); + } + + /** + * Check whether there is an update available for a plugin. + * + * @since 2.5.0 + * + * @param string $slug Plugin slug. + * @return false|string Version number string of the available update or false if no update available. + */ + public function does_plugin_have_update( $slug ) { + // Presume bundled and external plugins will point to a package which meets the minimum required version. + if ( 'repo' !== $this->plugins[ $slug ]['source_type'] ) { + if ( $this->does_plugin_require_update( $slug ) ) { + return $this->plugins[ $slug ]['version']; + } + + return false; + } + + $repo_updates = get_site_transient( 'update_plugins' ); + + if ( isset( $repo_updates->response[ $this->plugins[ $slug ]['file_path'] ]->new_version ) ) { + return $repo_updates->response[ $this->plugins[ $slug ]['file_path'] ]->new_version; + } + + return false; + } + + /** + * Retrieve potential upgrade notice for a plugin. + * + * @since 2.5.0 + * + * @param string $slug Plugin slug. + * @return string The upgrade notice or an empty string if no message was available or provided. + */ + public function get_upgrade_notice( $slug ) { + // We currently can't get reliable info on non-WP-repo plugins - issue #380. + if ( 'repo' !== $this->plugins[ $slug ]['source_type'] ) { + return ''; + } + + $repo_updates = get_site_transient( 'update_plugins' ); + + if ( ! empty( $repo_updates->response[ $this->plugins[ $slug ]['file_path'] ]->upgrade_notice ) ) { + return $repo_updates->response[ $this->plugins[ $slug ]['file_path'] ]->upgrade_notice; + } + + return ''; + } + + /** + * Wrapper around the core WP get_plugins function, making sure it's actually available. + * + * @since 2.5.0 + * + * @param string $plugin_folder Optional. Relative path to single plugin folder. + * @return array Array of installed plugins with plugin information. + */ + public function get_plugins( $plugin_folder = '' ) { + if ( ! function_exists( 'get_plugins' ) ) { + require_once ABSPATH . 'wp-admin/includes/plugin.php'; + } + + return get_plugins( $plugin_folder ); + } + + /** + * Delete dismissable nag option when theme is switched. + * + * This ensures that the user(s) is/are again reminded via nag of required + * and/or recommended plugins if they re-activate the theme. + * + * @since 2.1.1 + */ + public function update_dismiss() { + delete_metadata( 'user', null, 'tgmpa_dismissed_notice_' . $this->id, null, true ); + } + + /** + * Forces plugin activation if the parameter 'force_activation' is + * set to true. + * + * This allows theme authors to specify certain plugins that must be + * active at all times while using the current theme. + * + * Please take special care when using this parameter as it has the + * potential to be harmful if not used correctly. Setting this parameter + * to true will not allow the specified plugin to be deactivated unless + * the user switches themes. + * + * @since 2.2.0 + */ + public function force_activation() { + foreach ( $this->plugins as $slug => $plugin ) { + if ( true === $plugin['force_activation'] ) { + if ( ! $this->is_plugin_installed( $slug ) ) { + // Oops, plugin isn't there so iterate to next condition. + continue; + } elseif ( $this->can_plugin_activate( $slug ) ) { + // There we go, activate the plugin. + activate_plugin( $plugin['file_path'] ); + } + } + } + } + + /** + * Forces plugin deactivation if the parameter 'force_deactivation' + * is set to true and adds the plugin to the 'recently active' plugins list. + * + * This allows theme authors to specify certain plugins that must be + * deactivated upon switching from the current theme to another. + * + * Please take special care when using this parameter as it has the + * potential to be harmful if not used correctly. + * + * @since 2.2.0 + */ + public function force_deactivation() { + $deactivated = array(); + + foreach ( $this->plugins as $slug => $plugin ) { + /* + * Only proceed forward if the parameter is set to true and plugin is active + * as a 'normal' (not must-use) plugin. + */ + if ( true === $plugin['force_deactivation'] && is_plugin_active( $plugin['file_path'] ) ) { + deactivate_plugins( $plugin['file_path'] ); + $deactivated[ $plugin['file_path'] ] = time(); + } + } + + if ( ! empty( $deactivated ) ) { + update_option( 'recently_activated', $deactivated + (array) get_option( 'recently_activated' ) ); + } + } + + /** + * Echo the current TGMPA version number to the page. + * + * @since 2.5.0 + */ + public function show_tgmpa_version() { + echo '

          ', + esc_html( + sprintf( + /* translators: %s: version number */ + __( 'TGMPA v%s', 'sophia-after-dark' ), + self::TGMPA_VERSION + ) + ), + '

          '; + } + + /** + * Returns the singleton instance of the class. + * + * @since 2.4.0 + * + * @return \TGM_Plugin_Activation The TGM_Plugin_Activation object. + */ + public static function get_instance() { + if ( ! isset( self::$instance ) && ! ( self::$instance instanceof self ) ) { + self::$instance = new self(); + } + + return self::$instance; + } + } + + if ( ! function_exists( 'load_tgm_plugin_activation' ) ) { + /** + * Ensure only one instance of the class is ever invoked. + * + * @since 2.5.0 + */ + function load_tgm_plugin_activation() { + $GLOBALS['tgmpa'] = TGM_Plugin_Activation::get_instance(); + } + } + + if ( did_action( 'plugins_loaded' ) ) { + load_tgm_plugin_activation(); + } else { + add_action( 'plugins_loaded', 'load_tgm_plugin_activation' ); + } +} + +if ( ! function_exists( 'tgmpa' ) ) { + /** + * Helper function to register a collection of required plugins. + * + * @since 2.0.0 + * @api + * + * @param array $plugins An array of plugin arrays. + * @param array $config Optional. An array of configuration values. + */ + function tgmpa( $plugins, $config = array() ) { + $instance = call_user_func( array( get_class( $GLOBALS['tgmpa'] ), 'get_instance' ) ); + + foreach ( $plugins as $plugin ) { + call_user_func( array( $instance, 'register' ), $plugin ); + } + + if ( ! empty( $config ) && is_array( $config ) ) { + // Send out notices for deprecated arguments passed. + if ( isset( $config['notices'] ) ) { + _deprecated_argument( __FUNCTION__, '2.2.0', 'The `notices` config parameter was renamed to `has_notices` in TGMPA 2.2.0. Please adjust your configuration.' ); + if ( ! isset( $config['has_notices'] ) ) { + $config['has_notices'] = $config['notices']; + } + } + + if ( isset( $config['parent_menu_slug'] ) ) { + _deprecated_argument( __FUNCTION__, '2.4.0', 'The `parent_menu_slug` config parameter was removed in TGMPA 2.4.0. In TGMPA 2.5.0 an alternative was (re-)introduced. Please adjust your configuration. For more information visit the website: http://tgmpluginactivation.com/configuration/#h-configuration-options.' ); + } + if ( isset( $config['parent_url_slug'] ) ) { + _deprecated_argument( __FUNCTION__, '2.4.0', 'The `parent_url_slug` config parameter was removed in TGMPA 2.4.0. In TGMPA 2.5.0 an alternative was (re-)introduced. Please adjust your configuration. For more information visit the website: http://tgmpluginactivation.com/configuration/#h-configuration-options.' ); + } + + call_user_func( array( $instance, 'config' ), $config ); + } + } +} + +/** + * WP_List_Table isn't always available. If it isn't available, + * we load it here. + * + * @since 2.2.0 + */ +if ( ! class_exists( 'WP_List_Table' ) ) { + require_once ABSPATH . 'wp-admin/includes/class-wp-list-table.php'; +} + +if ( ! class_exists( 'TGMPA_List_Table' ) ) { + + /** + * List table class for handling plugins. + * + * Extends the WP_List_Table class to provide a future-compatible + * way of listing out all required/recommended plugins. + * + * Gives users an interface similar to the Plugin Administration + * area with similar (albeit stripped down) capabilities. + * + * This class also allows for the bulk install of plugins. + * + * @since 2.2.0 + * + * @package TGM-Plugin-Activation + * @author Thomas Griffin + * @author Gary Jones + */ + class TGMPA_List_Table extends WP_List_Table { + /** + * TGMPA instance. + * + * @since 2.5.0 + * + * @var object + */ + protected $tgmpa; + + /** + * The currently chosen view. + * + * @since 2.5.0 + * + * @var string One of: 'all', 'install', 'update', 'activate' + */ + public $view_context = 'all'; + + /** + * The plugin counts for the various views. + * + * @since 2.5.0 + * + * @var array + */ + protected $view_totals = array( + 'all' => 0, + 'install' => 0, + 'update' => 0, + 'activate' => 0, + ); + + /** + * References parent constructor and sets defaults for class. + * + * @since 2.2.0 + */ + public function __construct() { + $this->tgmpa = call_user_func( array( get_class( $GLOBALS['tgmpa'] ), 'get_instance' ) ); + + parent::__construct( + array( + 'singular' => 'plugin', + 'plural' => 'plugins', + 'ajax' => false, + ) + ); + + if ( isset( $_REQUEST['plugin_status'] ) && in_array( $_REQUEST['plugin_status'], array( 'install', 'update', 'activate' ), true ) ) { + $this->view_context = sanitize_key( $_REQUEST['plugin_status'] ); + } + + add_filter( 'tgmpa_table_data_items', array( $this, 'sort_table_items' ) ); + } + + /** + * Get a list of CSS classes for the tag. + * + * Overruled to prevent the 'plural' argument from being added. + * + * @since 2.5.0 + * + * @return array CSS classnames. + */ + public function get_table_classes() { + return array( 'widefat', 'fixed' ); + } + + /** + * Gathers and renames all of our plugin information to be used by WP_List_Table to create our table. + * + * @since 2.2.0 + * + * @return array $table_data Information for use in table. + */ + protected function _gather_plugin_data() { + // Load thickbox for plugin links. + $this->tgmpa->admin_init(); + $this->tgmpa->thickbox(); + + // Categorize the plugins which have open actions. + $plugins = $this->categorize_plugins_to_views(); + + // Set the counts for the view links. + $this->set_view_totals( $plugins ); + + // Prep variables for use and grab list of all installed plugins. + $table_data = array(); + $i = 0; + + // Redirect to the 'all' view if no plugins were found for the selected view context. + if ( empty( $plugins[ $this->view_context ] ) ) { + $this->view_context = 'all'; + } + + foreach ( $plugins[ $this->view_context ] as $slug => $plugin ) { + $table_data[ $i ]['sanitized_plugin'] = $plugin['name']; + $table_data[ $i ]['slug'] = $slug; + $table_data[ $i ]['plugin'] = '' . $this->tgmpa->get_info_link( $slug ) . ''; + $table_data[ $i ]['source'] = $this->get_plugin_source_type_text( $plugin['source_type'] ); + $table_data[ $i ]['type'] = $this->get_plugin_advise_type_text( $plugin['required'] ); + $table_data[ $i ]['status'] = $this->get_plugin_status_text( $slug ); + $table_data[ $i ]['installed_version'] = $this->tgmpa->get_installed_version( $slug ); + $table_data[ $i ]['minimum_version'] = $plugin['version']; + $table_data[ $i ]['available_version'] = $this->tgmpa->does_plugin_have_update( $slug ); + + // Prep the upgrade notice info. + $upgrade_notice = $this->tgmpa->get_upgrade_notice( $slug ); + if ( ! empty( $upgrade_notice ) ) { + $table_data[ $i ]['upgrade_notice'] = $upgrade_notice; + + add_action( "tgmpa_after_plugin_row_{$slug}", array( $this, 'wp_plugin_update_row' ), 10, 2 ); + } + + $table_data[ $i ] = apply_filters( 'tgmpa_table_data_item', $table_data[ $i ], $plugin ); + + $i++; + } + + return $table_data; + } + + /** + * Categorize the plugins which have open actions into views for the TGMPA page. + * + * @since 2.5.0 + */ + protected function categorize_plugins_to_views() { + $plugins = array( + 'all' => array(), // Meaning: all plugins which still have open actions. + 'install' => array(), + 'update' => array(), + 'activate' => array(), + ); + + foreach ( $this->tgmpa->plugins as $slug => $plugin ) { + if ( $this->tgmpa->is_plugin_active( $slug ) && false === $this->tgmpa->does_plugin_have_update( $slug ) ) { + // No need to display plugins if they are installed, up-to-date and active. + continue; + } else { + $plugins['all'][ $slug ] = $plugin; + + if ( ! $this->tgmpa->is_plugin_installed( $slug ) ) { + $plugins['install'][ $slug ] = $plugin; + } else { + if ( false !== $this->tgmpa->does_plugin_have_update( $slug ) ) { + $plugins['update'][ $slug ] = $plugin; + } + + if ( $this->tgmpa->can_plugin_activate( $slug ) ) { + $plugins['activate'][ $slug ] = $plugin; + } + } + } + } + + return $plugins; + } + + /** + * Set the counts for the view links. + * + * @since 2.5.0 + * + * @param array $plugins Plugins order by view. + */ + protected function set_view_totals( $plugins ) { + foreach ( $plugins as $type => $list ) { + $this->view_totals[ $type ] = count( $list ); + } + } + + /** + * Get the plugin required/recommended text string. + * + * @since 2.5.0 + * + * @param string $required Plugin required setting. + * @return string + */ + protected function get_plugin_advise_type_text( $required ) { + if ( true === $required ) { + return __( 'Required', 'sophia-after-dark' ); + } + + return __( 'Recommended', 'sophia-after-dark' ); + } + + /** + * Get the plugin source type text string. + * + * @since 2.5.0 + * + * @param string $type Plugin type. + * @return string + */ + protected function get_plugin_source_type_text( $type ) { + $string = ''; + + switch ( $type ) { + case 'repo': + $string = __( 'WordPress Repository', 'sophia-after-dark' ); + break; + case 'external': + $string = __( 'External Source', 'sophia-after-dark' ); + break; + case 'bundled': + $string = __( 'Pre-Packaged', 'sophia-after-dark' ); + break; + } + + return $string; + } + + /** + * Determine the plugin status message. + * + * @since 2.5.0 + * + * @param string $slug Plugin slug. + * @return string + */ + protected function get_plugin_status_text( $slug ) { + if ( ! $this->tgmpa->is_plugin_installed( $slug ) ) { + return __( 'Not Installed', 'sophia-after-dark' ); + } + + if ( ! $this->tgmpa->is_plugin_active( $slug ) ) { + $install_status = __( 'Installed But Not Activated', 'sophia-after-dark' ); + } else { + $install_status = __( 'Active', 'sophia-after-dark' ); + } + + $update_status = ''; + + if ( $this->tgmpa->does_plugin_require_update( $slug ) && false === $this->tgmpa->does_plugin_have_update( $slug ) ) { + $update_status = __( 'Required Update not Available', 'sophia-after-dark' ); + + } elseif ( $this->tgmpa->does_plugin_require_update( $slug ) ) { + $update_status = __( 'Requires Update', 'sophia-after-dark' ); + + } elseif ( false !== $this->tgmpa->does_plugin_have_update( $slug ) ) { + $update_status = __( 'Update recommended', 'sophia-after-dark' ); + } + + if ( '' === $update_status ) { + return $install_status; + } + + return sprintf( + /* translators: 1: install status, 2: update status */ + _x( '%1$s, %2$s', 'Install/Update Status', 'sophia-after-dark' ), + $install_status, + $update_status + ); + } + + /** + * Sort plugins by Required/Recommended type and by alphabetical plugin name within each type. + * + * @since 2.5.0 + * + * @param array $items Prepared table items. + * @return array Sorted table items. + */ + public function sort_table_items( $items ) { + $type = array(); + $name = array(); + + foreach ( $items as $i => $plugin ) { + $type[ $i ] = $plugin['type']; // Required / recommended. + $name[ $i ] = $plugin['sanitized_plugin']; + } + + array_multisort( $type, SORT_DESC, $name, SORT_ASC, $items ); + + return $items; + } + + /** + * Get an associative array ( id => link ) of the views available on this table. + * + * @since 2.5.0 + * + * @return array + */ + public function get_views() { + $status_links = array(); + + foreach ( $this->view_totals as $type => $count ) { + if ( $count < 1 ) { + continue; + } + + switch ( $type ) { + case 'all': + /* translators: 1: number of plugins. */ + $text = _nx( 'All (%s)', 'All (%s)', $count, 'plugins', 'sophia-after-dark' ); + break; + case 'install': + /* translators: 1: number of plugins. */ + $text = _n( 'To Install (%s)', 'To Install (%s)', $count, 'sophia-after-dark' ); + break; + case 'update': + /* translators: 1: number of plugins. */ + $text = _n( 'Update Available (%s)', 'Update Available (%s)', $count, 'sophia-after-dark' ); + break; + case 'activate': + /* translators: 1: number of plugins. */ + $text = _n( 'To Activate (%s)', 'To Activate (%s)', $count, 'sophia-after-dark' ); + break; + default: + $text = ''; + break; + } + + if ( ! empty( $text ) ) { + + $status_links[ $type ] = sprintf( + '%s', + esc_url( $this->tgmpa->get_tgmpa_status_url( $type ) ), + ( $type === $this->view_context ) ? ' class="current"' : '', + sprintf( $text, number_format_i18n( $count ) ) + ); + } + } + + return $status_links; + } + + /** + * Create default columns to display important plugin information + * like type, action and status. + * + * @since 2.2.0 + * + * @param array $item Array of item data. + * @param string $column_name The name of the column. + * @return string + */ + public function column_default( $item, $column_name ) { + return $item[ $column_name ]; + } + + /** + * Required for bulk installing. + * + * Adds a checkbox for each plugin. + * + * @since 2.2.0 + * + * @param array $item Array of item data. + * @return string The input checkbox with all necessary info. + */ + public function column_cbd( $item ) { + return sprintf( + '', + esc_attr( $this->_args['singular'] ), + esc_attr( $item['slug'] ), + esc_attr( $item['sanitized_plugin'] ) + ); + } + + /** + * Create default title column along with the action links. + * + * @since 2.2.0 + * + * @param array $item Array of item data. + * @return string The plugin name and action links. + */ + public function column_plugin( $item ) { + return sprintf( + '%1$s %2$s', + $item['plugin'], + $this->row_actions( $this->get_row_actions( $item ), true ) + ); + } + + /** + * Create version information column. + * + * @since 2.5.0 + * + * @param array $item Array of item data. + * @return string HTML-formatted version information. + */ + public function column_version( $item ) { + $output = array(); + + if ( $this->tgmpa->is_plugin_installed( $item['slug'] ) ) { + $installed = ! empty( $item['installed_version'] ) ? $item['installed_version'] : _x( 'unknown', 'as in: "version nr unknown"', 'sophia-after-dark' ); + + $color = ''; + if ( ! empty( $item['minimum_version'] ) && $this->tgmpa->does_plugin_require_update( $item['slug'] ) ) { + $color = ' color: #ff0000; font-weight: bold;'; + } + + $output[] = sprintf( + '

          %2$s' . __( 'Installed version:', 'sophia-after-dark' ) . '

          ', + $color, + $installed + ); + } + + if ( ! empty( $item['minimum_version'] ) ) { + $output[] = sprintf( + '

          %1$s' . __( 'Minimum required version:', 'sophia-after-dark' ) . '

          ', + $item['minimum_version'] + ); + } + + if ( ! empty( $item['available_version'] ) ) { + $color = ''; + if ( ! empty( $item['minimum_version'] ) && version_compare( $item['available_version'], $item['minimum_version'], '>=' ) ) { + $color = ' color: #71C671; font-weight: bold;'; + } + + $output[] = sprintf( + '

          %2$s' . __( 'Available version:', 'sophia-after-dark' ) . '

          ', + $color, + $item['available_version'] + ); + } + + if ( empty( $output ) ) { + return ' '; // Let's not break the table layout. + } else { + return implode( "\n", $output ); + } + } + + /** + * Sets default message within the plugins table if no plugins + * are left for interaction. + * + * Hides the menu item to prevent the user from clicking and + * getting a permissions error. + * + * @since 2.2.0 + */ + public function no_items() { + echo esc_html__( 'No plugins to install, update or activate.', 'sophia-after-dark' ) . ' ' . esc_html__( 'Return to the Dashboard', 'sophia-after-dark' ) . ''; + echo ''; + } + + /** + * Output all the column information within the table. + * + * @since 2.2.0 + * + * @return array $columns The column names. + */ + public function get_columns() { + $columns = array( + 'cbd' => '', + 'plugin' => __( 'Plugin', 'sophia-after-dark' ), + 'source' => __( 'Source', 'sophia-after-dark' ), + 'type' => __( 'Type', 'sophia-after-dark' ), + ); + + if ( 'all' === $this->view_context || 'update' === $this->view_context ) { + $columns['version'] = __( 'Version', 'sophia-after-dark' ); + $columns['status'] = __( 'Status', 'sophia-after-dark' ); + } + + return apply_filters( 'tgmpa_table_columns', $columns ); + } + + /** + * Get name of default primary column + * + * @since 2.5.0 / WP 4.3+ compatibility + * @access protected + * + * @return string + */ + protected function get_default_primary_column_name() { + return 'plugin'; + } + + /** + * Get the name of the primary column. + * + * @since 2.5.0 / WP 4.3+ compatibility + * @access protected + * + * @return string The name of the primary column. + */ + protected function get_primary_column_name() { + if ( method_exists( 'WP_List_Table', 'get_primary_column_name' ) ) { + return parent::get_primary_column_name(); + } else { + return $this->get_default_primary_column_name(); + } + } + + /** + * Get the actions which are relevant for a specific plugin row. + * + * @since 2.5.0 + * + * @param array $item Array of item data. + * @return array Array with relevant action links. + */ + protected function get_row_actions( $item ) { + $actions = array(); + $action_links = array(); + + // Display the 'Install' action link if the plugin is not yet available. + if ( ! $this->tgmpa->is_plugin_installed( $item['slug'] ) ) { + /* translators: %2$s: plugin name in screen reader markup */ + $actions['install'] = __( 'Install %2$s', 'sophia-after-dark' ); + } else { + // Display the 'Update' action link if an update is available and WP complies with plugin minimum. + if ( false !== $this->tgmpa->does_plugin_have_update( $item['slug'] ) && $this->tgmpa->can_plugin_update( $item['slug'] ) ) { + /* translators: %2$s: plugin name in screen reader markup */ + $actions['update'] = __( 'Update %2$s', 'sophia-after-dark' ); + } + + // Display the 'Activate' action link, but only if the plugin meets the minimum version. + if ( $this->tgmpa->can_plugin_activate( $item['slug'] ) ) { + /* translators: %2$s: plugin name in screen reader markup */ + $actions['activate'] = __( 'Activate %2$s', 'sophia-after-dark' ); + } + } + + // Create the actual links. + foreach ( $actions as $action => $text ) { + $nonce_url = wp_nonce_url( + add_query_arg( + array( + 'plugin' => urlencode( $item['slug'] ), + 'tgmpa-' . $action => $action . '-plugin', + ), + $this->tgmpa->get_tgmpa_url() + ), + 'tgmpa-' . $action, + 'tgmpa-nonce' + ); + + $action_links[ $action ] = sprintf( + '' . esc_html( $text ) . '', // $text contains the second placeholder. + esc_url( $nonce_url ), + '' . esc_html( $item['sanitized_plugin'] ) . '' + ); + } + + $prefix = ( defined( 'WP_NETWORK_ADMIN' ) && WP_NETWORK_ADMIN ) ? 'network_admin_' : ''; + return apply_filters( "tgmpa_{$prefix}plugin_action_links", array_filter( $action_links ), $item['slug'], $item, $this->view_context ); + } + + /** + * Generates content for a single row of the table. + * + * @since 2.5.0 + * + * @param object $item The current item. + */ + public function single_row( $item ) { + parent::single_row( $item ); + + /** + * Fires after each specific row in the TGMPA Plugins list table. + * + * The dynamic portion of the hook name, `$item['slug']`, refers to the slug + * for the plugin. + * + * @since 2.5.0 + */ + do_action( "tgmpa_after_plugin_row_{$item['slug']}", $item['slug'], $item, $this->view_context ); + } + + /** + * Show the upgrade notice below a plugin row if there is one. + * + * @since 2.5.0 + * + * @see /wp-admin/includes/update.php + * + * @param string $slug Plugin slug. + * @param array $item The information available in this table row. + * @return null Return early if upgrade notice is empty. + */ + public function wp_plugin_update_row( $slug, $item ) { + if ( empty( $item['upgrade_notice'] ) ) { + return; + } + + echo ' + + + '; + } + + /** + * Extra controls to be displayed between bulk actions and pagination. + * + * @since 2.5.0 + * + * @param string $which 'top' or 'bottom' table navigation. + */ + public function extra_tablenav( $which ) { + if ( 'bottom' === $which ) { + $this->tgmpa->show_tgmpa_version(); + } + } + + /** + * Defines the bulk actions for handling registered plugins. + * + * @since 2.2.0 + * + * @return array $actions The bulk actions for the plugin install table. + */ + public function get_bulk_actions() { + + $actions = array(); + + if ( 'update' !== $this->view_context && 'activate' !== $this->view_context ) { + if ( current_user_can( 'install_plugins' ) ) { + $actions['tgmpa-bulk-install'] = __( 'Install', 'sophia-after-dark' ); + } + } + + if ( 'install' !== $this->view_context ) { + if ( current_user_can( 'update_plugins' ) ) { + $actions['tgmpa-bulk-update'] = __( 'Update', 'sophia-after-dark' ); + } + if ( current_user_can( 'activate_plugins' ) ) { + $actions['tgmpa-bulk-activate'] = __( 'Activate', 'sophia-after-dark' ); + } + } + + return $actions; + } + + /** + * Processes bulk installation and activation actions. + * + * The bulk installation process looks for the $_POST information and passes that + * through if a user has to use WP_Filesystem to enter their credentials. + * + * @since 2.2.0 + */ + public function process_bulk_actions() { + // Bulk installation process. + if ( 'tgmpa-bulk-install' === $this->current_action() || 'tgmpa-bulk-update' === $this->current_action() ) { + + check_admin_referer( 'bulk-' . $this->_args['plural'] ); + + $install_type = 'install'; + if ( 'tgmpa-bulk-update' === $this->current_action() ) { + $install_type = 'update'; + } + + $plugins_to_install = array(); + + // Did user actually select any plugins to install/update ? + if ( empty( $_POST['plugin'] ) ) { + if ( 'install' === $install_type ) { + $message = __( 'No plugins were selected to be installed. No action taken.', 'sophia-after-dark' ); + } else { + $message = __( 'No plugins were selected to be updated. No action taken.', 'sophia-after-dark' ); + } + + echo '

          ', esc_html( $message ), '

          '; + + return false; + } + + if ( is_array( $_POST['plugin'] ) ) { + $plugins_to_install = (array) $_POST['plugin']; + } elseif ( is_string( $_POST['plugin'] ) ) { + // Received via Filesystem page - un-flatten array (WP bug #19643). + $plugins_to_install = explode( ',', $_POST['plugin'] ); + } + + // Sanitize the received input. + $plugins_to_install = array_map( 'urldecode', $plugins_to_install ); + $plugins_to_install = array_map( array( $this->tgmpa, 'sanitize_key' ), $plugins_to_install ); + + // Validate the received input. + foreach ( $plugins_to_install as $key => $slug ) { + // Check if the plugin was registered with TGMPA and remove if not. + if ( ! isset( $this->tgmpa->plugins[ $slug ] ) ) { + unset( $plugins_to_install[ $key ] ); + continue; + } + + // For install: make sure this is a plugin we *can* install and not one already installed. + if ( 'install' === $install_type && true === $this->tgmpa->is_plugin_installed( $slug ) ) { + unset( $plugins_to_install[ $key ] ); + } + + // For updates: make sure this is a plugin we *can* update (update available and WP version ok). + if ( 'update' === $install_type && false === $this->tgmpa->is_plugin_updatetable( $slug ) ) { + unset( $plugins_to_install[ $key ] ); + } + } + + // No need to proceed further if we have no plugins to handle. + if ( empty( $plugins_to_install ) ) { + if ( 'install' === $install_type ) { + $message = __( 'No plugins are available to be installed at this time.', 'sophia-after-dark' ); + } else { + $message = __( 'No plugins are available to be updated at this time.', 'sophia-after-dark' ); + } + + echo '

          ', esc_html( $message ), '

          '; + + return false; + } + + // Pass all necessary information if WP_Filesystem is needed. + $url = wp_nonce_url( + $this->tgmpa->get_tgmpa_url(), + 'bulk-' . $this->_args['plural'] + ); + + // Give validated data back to $_POST which is the only place the filesystem looks for extra fields. + $_POST['plugin'] = implode( ',', $plugins_to_install ); // Work around for WP bug #19643. + + $method = ''; // Leave blank so WP_Filesystem can populate it as necessary. + $fields = array_keys( $_POST ); // Extra fields to pass to WP_Filesystem. + + if ( false === ( $creds = request_filesystem_credentials( esc_url_raw( $url ), $method, false, false, $fields ) ) ) { + return true; // Stop the normal page form from displaying, credential request form will be shown. + } + + // Now we have some credentials, setup WP_Filesystem. + if ( ! WP_Filesystem( $creds ) ) { + // Our credentials were no good, ask the user for them again. + request_filesystem_credentials( esc_url_raw( $url ), $method, true, false, $fields ); + + return true; + } + + /* If we arrive here, we have the filesystem */ + + // Store all information in arrays since we are processing a bulk installation. + $names = array(); + $sources = array(); // Needed for installs. + $file_paths = array(); // Needed for upgrades. + $to_inject = array(); // Information to inject into the update_plugins transient. + + // Prepare the data for validated plugins for the install/upgrade. + foreach ( $plugins_to_install as $slug ) { + $name = $this->tgmpa->plugins[ $slug ]['name']; + $source = $this->tgmpa->get_download_url( $slug ); + + if ( ! empty( $name ) && ! empty( $source ) ) { + $names[] = $name; + + switch ( $install_type ) { + + case 'install': + $sources[] = $source; + break; + + case 'update': + $file_paths[] = $this->tgmpa->plugins[ $slug ]['file_path']; + $to_inject[ $slug ] = $this->tgmpa->plugins[ $slug ]; + $to_inject[ $slug ]['source'] = $source; + break; + } + } + } + unset( $slug, $name, $source ); + + // Create a new instance of TGMPA_Bulk_Installer. + $installer = new TGMPA_Bulk_Installer( + new TGMPA_Bulk_Installer_Skin( + array( + 'url' => esc_url_raw( $this->tgmpa->get_tgmpa_url() ), + 'nonce' => 'bulk-' . $this->_args['plural'], + 'names' => $names, + 'install_type' => $install_type, + ) + ) + ); + + // Wrap the install process with the appropriate HTML. + echo '
          ', + '

          ', esc_html( get_admin_page_title() ), '

          +
          '; + + // Process the bulk installation submissions. + add_filter( 'upgrader_source_selection', array( $this->tgmpa, 'maybe_adjust_source_dir' ), 1, 3 ); + + if ( 'tgmpa-bulk-update' === $this->current_action() ) { + // Inject our info into the update transient. + $this->tgmpa->inject_update_info( $to_inject ); + + $installer->bulk_upgrade( $file_paths ); + } else { + $installer->bulk_install( $sources ); + } + + remove_filter( 'upgrader_source_selection', array( $this->tgmpa, 'maybe_adjust_source_dir' ), 1 ); + + echo '
          '; + + return true; + } + + // Bulk activation process. + if ( 'tgmpa-bulk-activate' === $this->current_action() ) { + check_admin_referer( 'bulk-' . $this->_args['plural'] ); + + // Did user actually select any plugins to activate ? + if ( empty( $_POST['plugin'] ) ) { + echo '

          ', esc_html__( 'No plugins were selected to be activated. No action taken.', 'sophia-after-dark' ), '

          '; + + return false; + } + + // Grab plugin data from $_POST. + $plugins = array(); + if ( isset( $_POST['plugin'] ) ) { + $plugins = array_map( 'urldecode', (array) $_POST['plugin'] ); + $plugins = array_map( array( $this->tgmpa, 'sanitize_key' ), $plugins ); + } + + $plugins_to_activate = array(); + $plugin_names = array(); + + // Grab the file paths for the selected & inactive plugins from the registration array. + foreach ( $plugins as $slug ) { + if ( $this->tgmpa->can_plugin_activate( $slug ) ) { + $plugins_to_activate[] = $this->tgmpa->plugins[ $slug ]['file_path']; + $plugin_names[] = $this->tgmpa->plugins[ $slug ]['name']; + } + } + unset( $slug ); + + // Return early if there are no plugins to activate. + if ( empty( $plugins_to_activate ) ) { + echo '

          ', esc_html__( 'No plugins are available to be activated at this time.', 'sophia-after-dark' ), '

          '; + + return false; + } + + // Now we are good to go - let's start activating plugins. + $activate = activate_plugins( $plugins_to_activate ); + + if ( is_wp_error( $activate ) ) { + echo '

          ', wp_kses_post( $activate->get_error_message() ), '

          '; + } else { + $count = count( $plugin_names ); // Count so we can use _n function. + $plugin_names = array_map( array( 'TGMPA_Utils', 'wrap_in_strong' ), $plugin_names ); + $last_plugin = array_pop( $plugin_names ); // Pop off last name to prep for readability. + $imploded = empty( $plugin_names ) ? $last_plugin : ( implode( ', ', $plugin_names ) . ' ' . esc_html_x( 'and', 'plugin A *and* plugin B', 'sophia-after-dark' ) . ' ' . $last_plugin ); + + printf( // WPCS: xss ok. + '

          %1$s %2$s.

          ', + esc_html( _n( 'The following plugin was activated successfully:', 'The following plugins were activated successfully:', $count, 'sophia-after-dark' ) ), + $imploded + ); + + // Update recently activated plugins option. + $recent = (array) get_option( 'recently_activated' ); + foreach ( $plugins_to_activate as $plugin => $time ) { + if ( isset( $recent[ $plugin ] ) ) { + unset( $recent[ $plugin ] ); + } + } + update_option( 'recently_activated', $recent ); + } + + unset( $_POST ); // Reset the $_POST variable in case user wants to perform one action after another. + + return true; + } + + return false; + } + + /** + * Prepares all of our information to be outputted into a usable table. + * + * @since 2.2.0 + */ + public function prepare_items() { + $columns = $this->get_columns(); // Get all necessary column information. + $hidden = array(); // No columns to hide, but we must set as an array. + $sortable = array(); // No reason to make sortable columns. + $primary = $this->get_primary_column_name(); // Column which has the row actions. + $this->_column_headers = array( $columns, $hidden, $sortable, $primary ); // Get all necessary column headers. + + // Process our bulk activations here. + if ( 'tgmpa-bulk-activate' === $this->current_action() ) { + $this->process_bulk_actions(); + } + + // Store all of our plugin data into $items array so WP_List_Table can use it. + $this->items = apply_filters( 'tgmpa_table_data_items', $this->_gather_plugin_data() ); + } + + /* *********** DEPRECATED METHODS *********** */ + + /** + * Retrieve plugin data, given the plugin name. + * + * @since 2.2.0 + * @deprecated 2.5.0 use {@see TGM_Plugin_Activation::_get_plugin_data_from_name()} instead. + * @see TGM_Plugin_Activation::_get_plugin_data_from_name() + * + * @param string $name Name of the plugin, as it was registered. + * @param string $data Optional. Array key of plugin data to return. Default is slug. + * @return string|boolean Plugin slug if found, false otherwise. + */ + protected function _get_plugin_data_from_name( $name, $data = 'slug' ) { + _deprecated_function( __FUNCTION__, 'TGMPA 2.5.0', 'TGM_Plugin_Activation::_get_plugin_data_from_name()' ); + + return $this->tgmpa->_get_plugin_data_from_name( $name, $data ); + } + } +} + + +if ( ! class_exists( 'TGM_Bulk_Installer' ) ) { + + /** + * Hack: Prevent TGMPA v2.4.1- bulk installer class from being loaded if 2.4.1- is loaded after 2.5+. + * + * @since 2.5.2 + * + * {@internal The TGMPA_Bulk_Installer class was originally called TGM_Bulk_Installer. + * For more information, see that class.}} + */ + class TGM_Bulk_Installer { + } +} +if ( ! class_exists( 'TGM_Bulk_Installer_Skin' ) ) { + + /** + * Hack: Prevent TGMPA v2.4.1- bulk installer skin class from being loaded if 2.4.1- is loaded after 2.5+. + * + * @since 2.5.2 + * + * {@internal The TGMPA_Bulk_Installer_Skin class was originally called TGM_Bulk_Installer_Skin. + * For more information, see that class.}} + */ + class TGM_Bulk_Installer_Skin { + } +} + +/** + * The WP_Upgrader file isn't always available. If it isn't available, + * we load it here. + * + * We check to make sure no action or activation keys are set so that WordPress + * does not try to re-include the class when processing upgrades or installs outside + * of the class. + * + * @since 2.2.0 + */ +add_action( 'admin_init', 'tgmpa_load_bulk_installer' ); +if ( ! function_exists( 'tgmpa_load_bulk_installer' ) ) { + /** + * Load bulk installer + */ + function tgmpa_load_bulk_installer() { + // Silently fail if 2.5+ is loaded *after* an older version. + if ( ! isset( $GLOBALS['tgmpa'] ) ) { + return; + } + + // Get TGMPA class instance. + $tgmpa_instance = call_user_func( array( get_class( $GLOBALS['tgmpa'] ), 'get_instance' ) ); + + if ( isset( $_GET['page'] ) && $tgmpa_instance->menu === $_GET['page'] ) { + if ( ! class_exists( 'Plugin_Upgrader', false ) ) { + require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; + } + + if ( ! class_exists( 'TGMPA_Bulk_Installer' ) ) { + + /** + * Installer class to handle bulk plugin installations. + * + * Extends WP_Upgrader and customizes to suit the installation of multiple + * plugins. + * + * @since 2.2.0 + * + * {@internal Since 2.5.0 the class is an extension of Plugin_Upgrader rather than WP_Upgrader.}} + * {@internal Since 2.5.2 the class has been renamed from TGM_Bulk_Installer to TGMPA_Bulk_Installer. + * This was done to prevent backward compatibility issues with v2.3.6.}} + * + * @package TGM-Plugin-Activation + * @author Thomas Griffin + * @author Gary Jones + */ + class TGMPA_Bulk_Installer extends Plugin_Upgrader { + /** + * Holds result of bulk plugin installation. + * + * @since 2.2.0 + * + * @var string + */ + public $result; + + /** + * Flag to check if bulk installation is occurring or not. + * + * @since 2.2.0 + * + * @var boolean + */ + public $bulk = false; + + /** + * TGMPA instance + * + * @since 2.5.0 + * + * @var object + */ + protected $tgmpa; + + /** + * Whether or not the destination directory needs to be cleared ( = on update). + * + * @since 2.5.0 + * + * @var bool + */ + protected $clear_destination = false; + + /** + * References parent constructor and sets defaults for class. + * + * @since 2.2.0 + * + * @param \Bulk_Upgrader_Skin|null $skin Installer skin. + */ + public function __construct( $skin = null ) { + // Get TGMPA class instance. + $this->tgmpa = call_user_func( array( get_class( $GLOBALS['tgmpa'] ), 'get_instance' ) ); + + parent::__construct( $skin ); + + if ( isset( $this->skin->options['install_type'] ) && 'update' === $this->skin->options['install_type'] ) { + $this->clear_destination = true; + } + + if ( $this->tgmpa->is_automatic ) { + $this->activate_strings(); + } + + add_action( 'upgrader_process_complete', array( $this->tgmpa, 'populate_file_path' ) ); + } + + /** + * Sets the correct activation strings for the installer skin to use. + * + * @since 2.2.0 + */ + public function activate_strings() { + $this->strings['activation_failed'] = __( 'Plugin activation failed.', 'sophia-after-dark' ); + $this->strings['activation_success'] = __( 'Plugin activated successfully.', 'sophia-after-dark' ); + } + + /** + * Performs the actual installation of each plugin. + * + * @since 2.2.0 + * + * @see WP_Upgrader::run() + * + * @param array $options The installation config options. + * @return null|array Return early if error, array of installation data on success. + */ + public function run( $options ) { + $result = parent::run( $options ); + + // Reset the strings in case we changed one during automatic activation. + if ( $this->tgmpa->is_automatic ) { + if ( 'update' === $this->skin->options['install_type'] ) { + $this->upgrade_strings(); + } else { + $this->install_strings(); + } + } + + return $result; + } + + /** + * Processes the bulk installation of plugins. + * + * @since 2.2.0 + * + * {@internal This is basically a near identical copy of the WP Core + * Plugin_Upgrader::bulk_upgrade() method, with minor adjustments to deal with + * new installs instead of upgrades. + * For ease of future synchronizations, the adjustments are clearly commented, but no other + * comments are added. Code style has been made to comply.}} + * + * @see Plugin_Upgrader::bulk_upgrade() + * @see https://core.trac.wordpress.org/browser/tags/4.2.1/src/wp-admin/includes/class-wp-upgrader.php#L838 + * (@internal Last synced: Dec 31st 2015 against https://core.trac.wordpress.org/browser/trunk?rev=36134}} + * + * @param array $plugins The plugin sources needed for installation. + * @param array $args Arbitrary passed extra arguments. + * @return array|false Install confirmation messages on success, false on failure. + */ + public function bulk_install( $plugins, $args = array() ) { + // [TGMPA + ] Hook auto-activation in. + add_filter( 'upgrader_post_install', array( $this, 'auto_activate' ), 10 ); + + $defaults = array( + 'clear_update_cache' => true, + ); + $parsed_args = wp_parse_args( $args, $defaults ); + + $this->init(); + $this->bulk = true; + + $this->install_strings(); // [TGMPA + ] adjusted. + + /* [TGMPA - ] $current = get_site_transient( 'update_plugins' ); */ + + /* [TGMPA - ] add_filter('upgrader_clear_destination', array($this, 'delete_old_plugin'), 10, 4); */ + + $this->skin->header(); + + // Connect to the Filesystem first. + $res = $this->fs_connect( array( WP_CONTENT_DIR, WP_PLUGIN_DIR ) ); + if ( ! $res ) { + $this->skin->footer(); + return false; + } + + $this->skin->bulk_header(); + + /* + * Only start maintenance mode if: + * - running Multisite and there are one or more plugins specified, OR + * - a plugin with an update available is currently active. + * @TODO: For multisite, maintenance mode should only kick in for individual sites if at all possible. + */ + $maintenance = ( is_multisite() && ! empty( $plugins ) ); + + /* + [TGMPA - ] + foreach ( $plugins as $plugin ) + $maintenance = $maintenance || ( is_plugin_active( $plugin ) && isset( $current->response[ $plugin] ) ); + */ + if ( $maintenance ) { + $this->maintenance_mode( true ); + } + + $results = array(); + + $this->update_count = count( $plugins ); + $this->update_current = 0; + foreach ( $plugins as $plugin ) { + $this->update_current++; + + /* + [TGMPA - ] + $this->skin->plugin_info = get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin, false, true); + + if ( !isset( $current->response[ $plugin ] ) ) { + $this->skin->set_result('up_to_date'); + $this->skin->before(); + $this->skin->feedback('up_to_date'); + $this->skin->after(); + $results[$plugin] = true; + continue; + } + + // Get the URL to the zip file. + $r = $current->response[ $plugin ]; + + $this->skin->plugin_active = is_plugin_active($plugin); + */ + + $result = $this->run( + array( + 'package' => $plugin, // [TGMPA + ] adjusted. + 'destination' => WP_PLUGIN_DIR, + 'clear_destination' => false, // [TGMPA + ] adjusted. + 'clear_working' => true, + 'is_multi' => true, + 'hook_extra' => array( + 'plugin' => $plugin, + ), + ) + ); + + $results[ $plugin ] = $this->result; + + // Prevent credentials auth screen from displaying multiple times. + if ( false === $result ) { + break; + } + } //end foreach $plugins + + $this->maintenance_mode( false ); + + /** + * Fires when the bulk upgrader process is complete. + * + * @since WP 3.6.0 / TGMPA 2.5.0 + * + * @param Plugin_Upgrader $this Plugin_Upgrader instance. In other contexts, $this, might + * be a Theme_Upgrader or Core_Upgrade instance. + * @param array $data { + * Array of bulk item update data. + * + * @type string $action Type of action. Default 'update'. + * @type string $type Type of update process. Accepts 'plugin', 'theme', or 'core'. + * @type bool $bulk Whether the update process is a bulk update. Default true. + * @type array $packages Array of plugin, theme, or core packages to update. + * } + */ + do_action( 'upgrader_process_complete', $this, array( + 'action' => 'install', // [TGMPA + ] adjusted. + 'type' => 'plugin', + 'bulk' => true, + 'plugins' => $plugins, + ) ); + + $this->skin->bulk_footer(); + + $this->skin->footer(); + + // Cleanup our hooks, in case something else does a upgrade on this connection. + /* [TGMPA - ] remove_filter('upgrader_clear_destination', array($this, 'delete_old_plugin')); */ + + // [TGMPA + ] Remove our auto-activation hook. + remove_filter( 'upgrader_post_install', array( $this, 'auto_activate' ), 10 ); + + // Force refresh of plugin update information. + wp_clean_plugins_cache( $parsed_args['clear_update_cache'] ); + + return $results; + } + + /** + * Handle a bulk upgrade request. + * + * @since 2.5.0 + * + * @see Plugin_Upgrader::bulk_upgrade() + * + * @param array $plugins The local WP file_path's of the plugins which should be upgraded. + * @param array $args Arbitrary passed extra arguments. + * @return string|bool Install confirmation messages on success, false on failure. + */ + public function bulk_upgrade( $plugins, $args = array() ) { + + add_filter( 'upgrader_post_install', array( $this, 'auto_activate' ), 10 ); + + $result = parent::bulk_upgrade( $plugins, $args ); + + remove_filter( 'upgrader_post_install', array( $this, 'auto_activate' ), 10 ); + + return $result; + } + + /** + * Abuse a filter to auto-activate plugins after installation. + * + * Hooked into the 'upgrader_post_install' filter hook. + * + * @since 2.5.0 + * + * @param bool $bool The value we need to give back (true). + * @return bool + */ + public function auto_activate( $bool ) { + // Only process the activation of installed plugins if the automatic flag is set to true. + if ( $this->tgmpa->is_automatic ) { + // Flush plugins cache so the headers of the newly installed plugins will be read correctly. + wp_clean_plugins_cache(); + + // Get the installed plugin file. + $plugin_info = $this->plugin_info(); + + // Don't try to activate on upgrade of active plugin as WP will do this already. + if ( ! is_plugin_active( $plugin_info ) ) { + $activate = activate_plugin( $plugin_info ); + + // Adjust the success string based on the activation result. + $this->strings['process_success'] = $this->strings['process_success'] . "
          \n"; + + if ( is_wp_error( $activate ) ) { + $this->skin->error( $activate ); + $this->strings['process_success'] .= $this->strings['activation_failed']; + } else { + $this->strings['process_success'] .= $this->strings['activation_success']; + } + } + } + + return $bool; + } + } + } + + if ( ! class_exists( 'TGMPA_Bulk_Installer_Skin' ) ) { + + /** + * Installer skin to set strings for the bulk plugin installations.. + * + * Extends Bulk_Upgrader_Skin and customizes to suit the installation of multiple + * plugins. + * + * @since 2.2.0 + * + * {@internal Since 2.5.2 the class has been renamed from TGM_Bulk_Installer_Skin to + * TGMPA_Bulk_Installer_Skin. + * This was done to prevent backward compatibility issues with v2.3.6.}} + * + * @see https://core.trac.wordpress.org/browser/trunk/src/wp-admin/includes/class-wp-upgrader-skins.php + * + * @package TGM-Plugin-Activation + * @author Thomas Griffin + * @author Gary Jones + */ + class TGMPA_Bulk_Installer_Skin extends Bulk_Upgrader_Skin { + /** + * Holds plugin info for each individual plugin installation. + * + * @since 2.2.0 + * + * @var array + */ + public $plugin_info = array(); + + /** + * Holds names of plugins that are undergoing bulk installations. + * + * @since 2.2.0 + * + * @var array + */ + public $plugin_names = array(); + + /** + * Integer to use for iteration through each plugin installation. + * + * @since 2.2.0 + * + * @var integer + */ + public $i = 0; + + /** + * TGMPA instance + * + * @since 2.5.0 + * + * @var object + */ + protected $tgmpa; + + /** + * Constructor. Parses default args with new ones and extracts them for use. + * + * @since 2.2.0 + * + * @param array $args Arguments to pass for use within the class. + */ + public function __construct( $args = array() ) { + // Get TGMPA class instance. + $this->tgmpa = call_user_func( array( get_class( $GLOBALS['tgmpa'] ), 'get_instance' ) ); + + // Parse default and new args. + $defaults = array( + 'url' => '', + 'nonce' => '', + 'names' => array(), + 'install_type' => 'install', + ); + $args = wp_parse_args( $args, $defaults ); + + // Set plugin names to $this->plugin_names property. + $this->plugin_names = $args['names']; + + // Extract the new args. + parent::__construct( $args ); + } + + /** + * Sets install skin strings for each individual plugin. + * + * Checks to see if the automatic activation flag is set and uses the + * the proper strings accordingly. + * + * @since 2.2.0 + */ + public function add_strings() { + if ( 'update' === $this->options['install_type'] ) { + parent::add_strings(); + /* translators: 1: plugin name, 2: action number 3: total number of actions. */ + $this->upgrader->strings['skin_before_update_header'] = __( 'Updating Plugin %1$s (%2$d/%3$d)', 'sophia-after-dark' ); + } else { + /* translators: 1: plugin name, 2: error message. */ + $this->upgrader->strings['skin_update_failed_error'] = __( 'An error occurred while installing %1$s: %2$s.', 'sophia-after-dark' ); + /* translators: 1: plugin name. */ + $this->upgrader->strings['skin_update_failed'] = __( 'The installation of %1$s failed.', 'sophia-after-dark' ); + + if ( $this->tgmpa->is_automatic ) { + // Automatic activation strings. + $this->upgrader->strings['skin_upgrade_start'] = __( 'The installation and activation process is starting. This process may take a while on some hosts, so please be patient.', 'sophia-after-dark' ); + /* translators: 1: plugin name. */ + $this->upgrader->strings['skin_update_successful'] = __( '%1$s installed and activated successfully.', 'sophia-after-dark' ) . ' ' . esc_html__( 'Show Details', 'sophia-after-dark' ) . '.'; + $this->upgrader->strings['skin_upgrade_end'] = __( 'All installations and activations have been completed.', 'sophia-after-dark' ); + /* translators: 1: plugin name, 2: action number 3: total number of actions. */ + $this->upgrader->strings['skin_before_update_header'] = __( 'Installing and Activating Plugin %1$s (%2$d/%3$d)', 'sophia-after-dark' ); + } else { + // Default installation strings. + $this->upgrader->strings['skin_upgrade_start'] = __( 'The installation process is starting. This process may take a while on some hosts, so please be patient.', 'sophia-after-dark' ); + /* translators: 1: plugin name. */ + $this->upgrader->strings['skin_update_successful'] = esc_html__( '%1$s installed successfully.', 'sophia-after-dark' ) . ' ' . esc_html__( 'Show Details', 'sophia-after-dark' ) . '.'; + $this->upgrader->strings['skin_upgrade_end'] = __( 'All installations have been completed.', 'sophia-after-dark' ); + /* translators: 1: plugin name, 2: action number 3: total number of actions. */ + $this->upgrader->strings['skin_before_update_header'] = __( 'Installing Plugin %1$s (%2$d/%3$d)', 'sophia-after-dark' ); + } + } + } + + /** + * Outputs the header strings and necessary JS before each plugin installation. + * + * @since 2.2.0 + * + * @param string $title Unused in this implementation. + */ + public function before( $title = '' ) { + if ( empty( $title ) ) { + $title = esc_html( $this->plugin_names[ $this->i ] ); + } + parent::before( $title ); + } + + /** + * Outputs the footer strings and necessary JS after each plugin installation. + * + * Checks for any errors and outputs them if they exist, else output + * success strings. + * + * @since 2.2.0 + * + * @param string $title Unused in this implementation. + */ + public function after( $title = '' ) { + if ( empty( $title ) ) { + $title = esc_html( $this->plugin_names[ $this->i ] ); + } + parent::after( $title ); + + $this->i++; + } + + /** + * Outputs links after bulk plugin installation is complete. + * + * @since 2.2.0 + */ + public function bulk_footer() { + // Serve up the string to say installations (and possibly activations) are complete. + parent::bulk_footer(); + + // Flush plugins cache so we can make sure that the installed plugins list is always up to date. + wp_clean_plugins_cache(); + + $this->tgmpa->show_tgmpa_version(); + + // Display message based on if all plugins are now active or not. + $update_actions = array(); + + if ( $this->tgmpa->is_tgmpa_complete() ) { + // All plugins are active, so we display the complete string and hide the menu to protect users. + echo ''; + $update_actions['dashboard'] = sprintf( + esc_html( $this->tgmpa->strings['complete'] ), + '' . esc_html__( 'Return to the Dashboard', 'sophia-after-dark' ) . '' + ); + } else { + $update_actions['tgmpa_page'] = '' . esc_html( $this->tgmpa->strings['return'] ) . ''; + } + + /** + * Filter the list of action links available following bulk plugin installs/updates. + * + * @since 2.5.0 + * + * @param array $update_actions Array of plugin action links. + * @param array $plugin_info Array of information for the last-handled plugin. + */ + $update_actions = apply_filters( 'tgmpa_update_bulk_plugins_complete_actions', $update_actions, $this->plugin_info ); + + if ( ! empty( $update_actions ) ) { + $this->feedback( implode( ' | ', (array) $update_actions ) ); + } + } + + /* *********** DEPRECATED METHODS *********** */ + + /** + * Flush header output buffer. + * + * @since 2.2.0 + * @deprecated 2.5.0 use {@see Bulk_Upgrader_Skin::flush_output()} instead + * @see Bulk_Upgrader_Skin::flush_output() + */ + public function before_flush_output() { + _deprecated_function( __FUNCTION__, 'TGMPA 2.5.0', 'Bulk_Upgrader_Skin::flush_output()' ); + $this->flush_output(); + } + + /** + * Flush footer output buffer and iterate $this->i to make sure the + * installation strings reference the correct plugin. + * + * @since 2.2.0 + * @deprecated 2.5.0 use {@see Bulk_Upgrader_Skin::flush_output()} instead + * @see Bulk_Upgrader_Skin::flush_output() + */ + public function after_flush_output() { + _deprecated_function( __FUNCTION__, 'TGMPA 2.5.0', 'Bulk_Upgrader_Skin::flush_output()' ); + $this->flush_output(); + $this->i++; + } + } + } + } + } +} + +if ( ! class_exists( 'TGMPA_Utils' ) ) { + + /** + * Generic utilities for TGMPA. + * + * All methods are static, poor-dev name-spacing class wrapper. + * + * Class was called TGM_Utils in 2.5.0 but renamed TGMPA_Utils in 2.5.1 as this was conflicting with Soliloquy. + * + * @since 2.5.0 + * + * @package TGM-Plugin-Activation + * @author Juliette Reinders Folmer + */ + class TGMPA_Utils { + /** + * Whether the PHP filter extension is enabled. + * + * @see http://php.net/book.filter + * + * @since 2.5.0 + * + * @static + * + * @var bool $has_filters True is the extension is enabled. + */ + public static $has_filters; + + /** + * Wrap an arbitrary string in tags. Meant to be used in combination with array_map(). + * + * @since 2.5.0 + * + * @static + * + * @param string $string Text to be wrapped. + * @return string + */ + public static function wrap_in_em( $string ) { + return '' . wp_kses_post( $string ) . ''; + } + + /** + * Wrap an arbitrary string in tags. Meant to be used in combination with array_map(). + * + * @since 2.5.0 + * + * @static + * + * @param string $string Text to be wrapped. + * @return string + */ + public static function wrap_in_strong( $string ) { + return '' . wp_kses_post( $string ) . ''; + } + + /** + * Helper function: Validate a value as boolean + * + * @since 2.5.0 + * + * @static + * + * @param mixed $value Arbitrary value. + * @return bool + */ + public static function validate_bool( $value ) { + if ( ! isset( self::$has_filters ) ) { + self::$has_filters = extension_loaded( 'filter' ); + } + + if ( self::$has_filters ) { + return filter_var( $value, FILTER_VALIDATE_BOOLEAN ); + } else { + return self::emulate_filter_bool( $value ); + } + } + + /** + * Helper function: Cast a value to bool + * + * @since 2.5.0 + * + * @static + * + * @param mixed $value Value to cast. + * @return bool + */ + protected static function emulate_filter_bool( $value ) { + // @codingStandardsIgnoreStart + static $true = array( + '1', + 'true', 'True', 'TRUE', + 'y', 'Y', + 'yes', 'Yes', 'YES', + 'on', 'On', 'ON', + ); + static $false = array( + '0', + 'false', 'False', 'FALSE', + 'n', 'N', + 'no', 'No', 'NO', + 'off', 'Off', 'OFF', + ); + // @codingStandardsIgnoreEnd + + if ( is_bool( $value ) ) { + return $value; + } elseif ( is_int( $value ) && ( 0 === $value || 1 === $value ) ) { + return (bool) $value; + } elseif ( ( is_float( $value ) && ! is_nan( $value ) ) && ( (float) 0 === $value || (float) 1 === $value ) ) { + return (bool) $value; + } elseif ( is_string( $value ) ) { + $value = trim( $value ); + if ( in_array( $value, $true, true ) ) { + return true; + } elseif ( in_array( $value, $false, true ) ) { + return false; + } else { + return false; + } + } + + return false; + } + } // End of class TGMPA_Utils +} // End of class_exists wrapper diff --git a/inc/tgm/mt-recommend-plugins.php b/inc/tgm/mt-recommend-plugins.php new file mode 100644 index 0000000..168a392 --- /dev/null +++ b/inc/tgm/mt-recommend-plugins.php @@ -0,0 +1,104 @@ + __( 'WP Blog Post Layouts', 'sophia-after-dark' ), + 'slug' => 'wp-blog-post-layouts', + 'required' => false, + 'force_activation' => false, + 'force_deactivation' => false, + ), + + // recommend maintenance mode + array( + 'name' => __( 'Maintenance Notice', 'sophia-after-dark' ), + 'slug' => 'maintenance-notice', + 'required' => false, + 'force_activation' => false, + 'force_deactivation' => false, + ), + + + ); + + /* + * Array of configuration settings. Amend each line as needed. + * + * TGMPA will start providing localized text strings soon. If you already have translations of our standard + * strings available, please help us make TGMPA even better by giving us access to these translations or by + * sending in a pull-request with .po file(s) with the translations. + * + * Only uncomment the strings in the config array if you want to customize the strings. + */ + $config = array( + 'id' => 'sophia-after-dark', // Unique ID for hashing notices for multiple instances of TGMPA. + 'default_path' => '', // Default absolute path to bundled plugins. + 'menu' => 'tgmpa-install-plugins', // Menu slug. + 'has_notices' => true, // Show admin notices or not. + 'dismissable' => true, // If false, a user cannot dismiss the nag message. + 'dismiss_msg' => '', // If 'dismissable' is false, this message will be output at top of nag. + 'is_automatic' => false, // Automatically activate plugins after installation or not. + 'message' => '', // Message to output right before the plugins table. + ); + + tgmpa( $plugins, $config ); +} diff --git a/inc/theme-settings/assets/css/settings.css b/inc/theme-settings/assets/css/settings.css new file mode 100644 index 0000000..93556a8 --- /dev/null +++ b/inc/theme-settings/assets/css/settings.css @@ -0,0 +1,609 @@ +/*==================================== + About Page Style +====================================*/ + +pre.changelog { + background-color: #f5f5f5; + background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(50%, #f5f5f5), color-stop(50%, #e6e6e6)); + background-image: -webkit-linear-gradient(#f5f5f5 50%, #e6e6e6 50%); + background-image: linear-gradient(#f5f5f5 50%, #e6e6e6 50%); + background-size: 50px 54.35px; + border: 1px solid #d4d4d4; + display: block; + line-height: 19px; + margin-bottom: 10px; + overflow: visible; + overflow-y: hidden; + padding: 0 0 0 4px; + font-size: 16px; + line-height: 1.7; + font-weight: 500; +} + +pre.changelog span { + font-weight: 700; +} + +.return-to-dashboard.sophia-after-dark { + clear: both; + text-align: right; +} + +p.sophia-after-dark-actions a.skip { + opacity: .5; +} + +table { + width: 100%; + border-collapse: collapse; +} + +td { + text-align: center; +} + +.about-wrap { + max-width: 100%; +} + +.about-wrap table td h3 { + margin: 15px 20px; + padding-left: 20px; + text-align: left; + font-size: 16px; + text-align: center; +} + +.mt-nav-content-wrap table th h3 { + margin: 10px 0; + font-weight: 700; +} + +table td { + font-weight: 600; + font-size: 16px; +} + +.wrap table td .dashicons { + font-size: 44px; + text-align: center; + line-height: 20px; + display: block; + width: 100%; +} + +.wrap table { + border: 1px solid #e1e1e1; + border-collapse: collapse; +} + +.wrap table th { + width: 33%; +} + +.wrap table th:first-child { + background-color: rgba(0, 0, 0, 0.03); +} + +.about-wrap table .table-feature-title>h3 { + color: #404040; +} + +.mt-nav-content-wrap table th { + background: #f3f3f3; +} + +tr:nth-child(2n) { + background-color: #f8f8f8; +} + +.wrap table td span { + font-size: 25px; +} + +.wrap table td .dashicons.dashicons-no { + color: #CE2D2D; +} + +.wrap table td .dashicons.dashicons-yes { + color: #24B37E; +} + +table tr .btn-wrapper { + padding: 10px 0; +} + +.theme-browser { + margin-top: 15px; +} + +.theme-browser .theme .theme-actions, +.theme-browser .theme.active .theme-actions { + position: absolute; + bottom: 0; + top: auto; + -webkit-transform: none; + transform: none; + right: 0; + padding: 9px 15px; + box-shadow: inset 0 1px 0 rgba(0, 0, 0, .1); +} + +.author-credit .theme-version { + font-style: italic; +} + +.author-credit .author-link a { + text-decoration: none; +} + +.author-credit .author-link { + margin: 15px 0 25px; + color: #72777c; + font-size: 16px; + font-weight: 400; + line-height: inherit; +} + + +/** + * RTL Ready + */ + +.rtl .about-wrap .about-text { + float: right; +} + +.rtl .theme-browser .theme .theme-name, +.rtl .theme-browser .theme.active .theme-name { + text-align: left; +} + +.rtl .theme-browser .theme.active .theme-name { + padding-left: 5%; +} + +.rtl .theme-browser .theme.active .theme-actions { + left: 90%; +} + +.rtl .theme-browser .theme .theme-actions { + left: 35%; +} + +@media (max-width: 1400px) { + .about-wrap h1 { + font-size: 30px; + } + .about-wrap .about-text { + font-size: 16px; + } +} + +@media (max-width: 1200px) { + .about-wrap .about-text { + font-size: 14px; + } + .about-wrap table td h3, + .about-wrap table td { + font-size: 14px; + } +} + +@media (max-width: 980px) { + .about-wrap h1 { + font-size: 25px; + } + .about-wrap .about-text, + .sophia-after-dark-screenshot { + float: none; + width: 100%; + } +} + + +/* Welcome new css */ + +.mt-clearfix:after { + clear: both; + content: ""; + display: block; +} + +.mt-theme-info { + background: #fff; + padding: 10px 20px; +} + +.mt-welcome-screenshot { + width: 42%; + float: right; + border: 1px solid #e1e1e1; + padding: 10px; + margin: 0; +} + +.welcome-description-wrap { + margin: 0; +} + +.about-wrap .mt-about-title { + display: block; + float: left; + width: auto; + font-size: 24px; + font-weight: 700; + margin: 0; + text-transform: uppercase; + vertical-align: middle; + margin-right: 20px; +} + +.about-wrap .author-credit { + display: block; + font-size: 13px; + float: right; + margin-top: 4px; +} + +.author-credit .author-link { + font-size: 13px; +} + +.about-wrap .about-text { + font-size: 14px; + margin: 10px 0 0; +} + +.about-wrap .mt-nav-tab-content-wrapper .nav-tab-wrapper a { + display: block; + float: none; +} + +.mt-nav-tab-content-wrapper { + display: flex; + flex-wrap: wrap; + margin-top: 30px; +} + +.nav-tab-wrapper { + width: 18%; + padding: 0; + border-bottom: none; +} + +.mt-nav-content-wrap { + width: 82%; + background: #fff; + padding: 0px 40px 30px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + min-height: 500px; +} + +.about-wrap .mt-nav-tab-content-wrapper .nav-tab-wrapper a { + display: block; + float: none; + background: #fff; + border: none; + padding: 20px 20px; + border-top: 1px solid #e1e1e1; + border-left: 5px solid transparent; + margin-left: 0; + font-size: 16px; +} + +.about-wrap .mt-nav-tab-content-wrapper .nav-tab-wrapper a:first-child { + border-top: none; +} + +.about-wrap .mt-nav-tab-content-wrapper .nav-tab-wrapper a.nav-tab.nav-tab-active, +.about-wrap .mt-nav-tab-content-wrapper .nav-tab-wrapper a:hover { + border-left: 5px solid #0071A1; + color: #0071A1; +} + +.about-wrap .mt-nav-tab-content-wrapper .nav-tab-wrapper a .dashicons { + font-size: 26px; + margin: 0 15px 0px 0; + vertical-align: top; + position: relative; + top: 0; +} + +.about-wrap .theme-features-wrap .two-col { + margin-left: -3%; + display: flex; + flex-wrap: wrap; +} + +.about-wrap .theme-features-wrap .two-col .col { + border: 1px solid #e1e1e1; + width: 47%; + margin-left: 3%; + padding: 20px; + margin-right: 0; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +.about-wrap .theme-features-wrap .two-col .col h3 { + margin: 0; +} + +.mt-theme-demos .mt-each-demo { + width: 30.33%; + margin-left: 3%; + margin-top: 3%; + margin-right: 0; + box-shadow: 0 0 8px rgba(0, 0, 0, 0.1); + box-sizing: border-box; + position: relative; +} + +.mt-demo-pro::after { + content: "Premium"; + display: inline-block; + position: absolute; + top: 10px; + right: 0px; + background: #B71C1C; + width: 90px; + color: #fff; + text-align: center; + padding: 8px 0; + font-weight: 600; +} + +.mt-theme-demos .themes { + display: flex; + flex-wrap: wrap; + margin-left: -3%; +} + +.theme-id-container h2 { + font-size: 15px; + font-weight: 600; + height: 18px; + margin: 0; + padding: 15px; + box-shadow: inset 0 1px 0 rgba(0, 0, 0, .1); + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + background: #F6F6F6; + text-align: left; +} + +.theme-id-container .theme-actions { + position: absolute; + bottom: 0; + top: auto; + -webkit-transform: none; + transform: none; + right: 0; + padding: 9px 15px; + box-shadow: inset 0 1px 0 rgba(0, 0, 0, .1); +} + +.theme-id-container .theme-actions a { + display: inline-block; + margin: 0 5px; + float: none; +} + +table tr .btn-wrapper .button { + font-size: 16px; + padding: 5px 50px; + font-weight: 600; +} + +.about-wrap .mt-upgrader-title { + margin: 0 0 10px; + font-size: 22px; + font-weight: 700; +} + +.mt-upgrader-pro { + background: #fff; + padding: 20px; + margin-top: 30px; + display: flex; + flex-wrap: wrap; +} + +.mt-upgrade-title-wrap { + width: 85%; +} + +.mt-upgrader-btn { + width: 15%; +} + +.wp-core-ui .mt-upgrader-btn a { + font-size: 18px; + width: 100%; + display: block; + text-align: center; + padding: 10px 0; + font-weight: 600; +} + +.welcome-panel h4 { + margin-top: 0; +} + +.mt-popup-inner-wrap { + padding: 4px 30px; + margin-top: 30px; +} + +.mt-dashicons-no::before, +.mt-dashicons-yes::before { + display: inline-block; + width: 30px; + height: 30px; + content: ''; + background-image: url(../images/cross.png); + background-size: 30px auto; + position: relative; + top: -6px; +} + +.mt-dashicons-yes::before { + background-image: url(../images/tick.png); +} + +.theme-features-wrap.welcome-panel { + border: none; + padding: 0; +} + +.about-wrap .about-description { + margin-top: 0; + font-weight: 700; + color: #333; +} + +.about-wrap .theme-features-wrap .two-col .col li { + display: inline-block; + width: 48%; + vertical-align: top; + margin: 8px 0; +} + +.about-wrap .changelog { + background-size: 0; + background: #fafafa; + border: none; + padding: 20px 20px; +} + +a.notice-dismiss { + text-decoration: none; +} + +.mt-get-started.updating-message::before { + margin-top: 12px !important; +} + +.configure-msg { + font-weight: 700; + font-size: 20px; + margin-top: 80px; + text-align: center; + display: block; + text-transform: capitalize; +} + +.theme-features-wrap.welcome-panel, +.theme-features-wrap.welcome-panel::before { + background: none; + height: auto; +} + +@media (max-width: 1400px) { + .about-wrap .theme-features-wrap .two-col .col { + border: 1px solid #e1e1e1; + width: 47%; + } + .nav-tab-wrapper { + width: 20%; + } + .mt-nav-content-wrap { + width: 80%; + } + .mt-theme-demos .mt-each-demo { + width: 47%; + } + .mt-upgrade-title-wrap { + width: 75%; + } + .mt-upgrader-btn { + width: 25%; + } + .about-wrap .theme-features-wrap .two-col .col li { + width: 100%; + } +} + +@media (max-width: 1200px) { + .mt-upgrade-title-wrap { + width: 100%; + text-align: center; + } + .mt-upgrader-btn { + margin: 20px auto 0; + width: auto; + } + .wp-core-ui .mt-upgrader-btn a { + padding: 8px 20px; + } + .theme-id-container { + position: relative; + padding: 10px 0px; + background: #F6F6F6; + } + .theme-id-container h2 { + display: block; + text-align: center; + padding: 10px 0; + box-shadow: none; + } + .theme-id-container .theme-actions { + position: static; + text-align: center; + background: #F6F6F6; + box-shadow: none; + } +} + +@media (max-width: 768px) { + .mt-theme-demos .mt-each-demo { + width: 100%; + margin-bottom: 20px; + } + .nav-tab-wrapper { + width: 100%; + } + .mt-nav-content-wrap { + width: 100%; + padding: 0 30px; + } + .about-wrap .mt-nav-tab-content-wrapper .nav-tab-wrapper a { + display: inline-block; + margin-right: -4px; + font-size: 14px; + padding: 12px 10px; + border-top: none; + border-left: none; + border-bottom: 5px solid transparent; + } + .about-wrap .mt-nav-tab-content-wrapper .nav-tab-wrapper a.nav-tab.nav-tab-active, + .about-wrap .mt-nav-tab-content-wrapper .nav-tab-wrapper a:hover { + border-left: none; + border-bottom: 5px solid #0071A1; + } +} + +@media (max-width: 600px) { + .about-wrap .mt-nav-tab-content-wrapper .nav-tab-wrapper a { + font: 0/0 a; + } + .mt-each-demo.theme:focus .more-details, + .mt-each-demo.theme:hover .more-details, + .mt-each-demo.theme:not(.active):focus .theme-actions, + .mt-each-demo.theme:not(.active):hover .theme-actions { + display: block; + } + .about-wrap .mt-nav-tab-content-wrapper .theme-features-wrap .two-col .col { + width: 100%; + margin-bottom: 20px; + } + .wp-core-ui .mt-upgrader-btn a { + padding: 0 20px; + font-size: 16px; + } +} \ No newline at end of file diff --git a/inc/theme-settings/assets/css/theme-review-notice.css b/inc/theme-settings/assets/css/theme-review-notice.css new file mode 100644 index 0000000..ad47239 --- /dev/null +++ b/inc/theme-settings/assets/css/theme-review-notice.css @@ -0,0 +1,42 @@ +.theme-review-notice { + position: relative; +} + +.theme-review-notice .links { + margin: 10px 0; +} + +.theme-review-notice .links a { + height: auto; + padding: 3px 15px; + margin-left: 10px; + text-transform: capitalize; +} + +.theme-review-notice .links a .dashicons { + line-height: 1.5; +} + +.theme-review-notice .links a.button-primary { + margin-left: 0; +} + +.theme-review-notice a.notice-dismiss { + text-decoration: none; +} + +#mt-theme-message { + position: relative; +} + +.sophia-after-dark-message-close .notice-dismiss { + position: absolute; +} + +a.notice-dismiss { + text-decoration: none; +} + +.mt-get-started.updating-message::before { + margin-top: 12px !important; +} \ No newline at end of file diff --git a/inc/theme-settings/assets/images/cross.png b/inc/theme-settings/assets/images/cross.png new file mode 100644 index 0000000000000000000000000000000000000000..68c48365c89fc7e25aebd82474e4b5492d2b2279 GIT binary patch literal 2345 zcmV+^3D)+BP)X{_E@T4G#R@-|z$l@B#wx1_u4)hd5U_kDfw78dkJNB-~b{p#uREG+N?1n>t3@*^bi9Ul6+y8PGI`KG4#hKBmFvHaE5 z{`&g)nws$&8~f7I_j-ErA0PRYl=3Gi`@6gMczN|aQ^Di&+KtS*c3i+s~@e~yJ zkdX9BO7?DU`^d=omzVjXqVq8^{K?4ofr0mPbN=S#@*^Yqs;c|M#Q2es`@X&MA|v>Y zj`w_g@fjKRWMuf1l>4{0_>PYEg@yaj&-QC;^;=u`lausBMDC9 z`?GM8R#)*JAMz(C@-Q*;K|%9GMD}ZI_>z+IJwEd^H1QD< z^05o*P-dyq$hx_%dQzji)r)C$;Fd0YKWr)~*Z=?qe@R3^R9M5k zS$A6#Nf=)tm4p;R3W*YkArO$3P(>h!6s0Lmu~HNS#qMK0Pw&(_uX!c!eBRs5%w*tnCg4;=1t$!gV!5}`E%cZmTx-KcO?=uNKPudn!3+Q@iZ29kV(v(A$DVtPyfGKNI09VFvoKhq zDLh`N9Pexo52xA$X>h@ois7R5PT-AziixZCs|iJS3MhhsR+W5p@70%AZL1dATc+7V z0Pf=ldk@>EXZmNR+aK;d=}5@0npNsk5hnlwaNe0P!8@}<;UNgTXv;@g0rLBQoFVtu z9>obY0@yw#!fOlyC2Hv9JuBs02r`H72oM|XKoPXnSizkf;7kYS4K#Ba9s*CZC7jeU z%e#UR&>Ph8md{wi#l{Sd3fYsqeRniGRByAyYwb38Ds=OB(TIu%o+fKooy!2vo^z>= zr&`eP!l#sHU;EqN-?m2uc%w%4Mot+Wu!>NjT194qkl-dKv{{TvGAiwBoW(+G97*>U2W|;Kl8#6X1=92?Es1 zPp4TXAki5kbQ5;q;6iE;SKm6M6y8bbpj&=fmoX^47yHD#ix)Sd#@opVz@V-eJBe|- zSALo{=4uExm5$|tEzz9D0O`xMfRI~DYR^;#M@t@g(O69ojQTnAA}FZNlE#6fvFHn7 zK$OM$jh@~VAZB^I0ae`e3^pPP`|*qKRR-s^uo=!8%K&%4vuaIce--hMKnlYLAmQz& z>^^3{;Qa_Pm&54 zu<9C*$5jF*-Qe0o17hz&edZi)C0PDCiVUK?Rm7nJXre>!EL*91{R<4o(CstPq1ej) z9bof|Y}Y0B)sl&o4@7=w+h+fKBB^u(%k)d+Y83mSFj6|%#=RED#&{3?8g_ibNKtQ} z(36FeF@QUzDmK8VaZDJ?B-=ni&q{S2tcwh5zcev3f>UctZJPv8&NlaQhJ45h3{TB; z0c)asXlvjzwu4E5u$`vUPcP8Ct9EIjGPd-HaJ#H`luROE6MiyCodyG3OUXD~f z8*NJzPI3`6K~E>a#Zv1q&Q!f)9#-btcDg$>&Rkvkd8pW4dNs_{Wvz1vVd3&_MD<95 zQNKWqTmR7gFD$3o-sV#2k(iz8E%<>;6B-p)ab7Aiy^Sxc+NhL>V+EBSGQx>a(h390 z)KCnfu-X9Bt0yd!9v`U*>KpDt7a6ez`Piil)L%luG-f=ab=kVJ>v zddD+H_t;VtyE@#7nvVS?&q7#d>Iep1+V5$73K-QQ7P1cW=}fT;!V;*J2ia-*c~xz$ zCaiUY>_b-b-XK7(lr!cMNL06c+9c&s#vFen-mzslKvwT=l#+?JRvqcGY={o22cfWH znDlB*MLU#a7DV}*cAX;3o~?K%aND^= z$NK)m$(jDe{+Y>J`|Ax=z!Ge>mN8zeGj7};#&h;SAQwmck{4jfSKht08p>@r^$|Q( zQ2^9E4VK%%mf-AT6)&G1T~%cu5x6fVkFt2a@#n1N9=mq^`cYToi@To^CYyF=uZf42 zUAOOj{^~^frvL;1@yv^ttKagqV)Ag~^~b4qeP8?DO?`a5ad)!J*NT4u`ea4kAA`!4HMQ9gxW`gu@$pz6G7nM7-XAyWM>5_urh)LDcH2tk+?U$1L9Ozm>~1 z*Xy*i+HaZ7Jjdjd%jTMUzXb948V;D);1 zdX~&MsMK1_=AFjllH~Hr(CDSH*=mHt6NSVQ#Nv&8zz=@F44%+Nk;o}~zYOT~(|y1Z zxZHNG*JPc~MwQDttJYt&+i$}@Yu53Sc^zu<(E%Q%wCEuqm!gu@WO z;De0EAgtD3u-Is+)meSO3C81*eZL0W?!3t5mb%?~%jTNY>aC{JRkPY}o6bJRK3QveO!6bK3m0s#Xt{`~|8KC|K6!x!!2(B}HPhcXeIGmF|n%|@5P z9S!~#)Zyp&=Xoq{>w!!mB~t43f~HWZi#iegp^tPx#IR{}8#spU;4Ag^wbk`2@q{D6 z(wI0+@LJjXseabUsM<)}UqpTPO8hlrazi_wWT{zzYpjjKq>ub4Y~G{0{qbSGb<_7a z^~<%(UvZFlXidn!g8%>rYct+!jNu3FEkReM>l zs%_QYeS6w=?Xe%X?cVo$EEAFtbAej-Z(K4H$dE)${o$Qo2+ZU=&oj?=o(q%d|2gaq zM~?gD+gCp}Oy}lKH@tgQ_R^i>aM+It=dhJ-j!x|gB+oM-90q_F$S9b4H+kN63{1Pt zx#~`$K(ouNUj`E$Pwt(j^=J{`T-+xdvpOZ6R^x%H?ZGYZHo=?arE*2eu zmp;}g?kC`)b%D``Zd*ch^kH*9tO?Xb=IC`*^{ zk4nlvkrYn{WW22TJUY_1gvj{H~Wj!UOrUUPTv!r}>*58S~oE~1JXg0!9 zzTx@Q^J^A4ga_D}a}|dlPU-vir;&JHRmNyadWjOn-<|mF7|TTR5e)79pUWU=gU`Ce zgcS)8tHGw0SJ3$p(LG;<(K{8~{4TPuP?I~QOtmb=;0!_j-SdS}Jlp0)R=ER2lpR;D z@3|cU;oW?ZV-(NztP7Wq%p6ME**+#hwi3eMFU}fvB2QOR@d`181GFR{L2+*k%V+wk zNyPC^v@1Nc4#uFufcBj>j929mLkGxbuh>HVCDPPy7|-b!0cH;xlh0%=5Fs8v(`*>; z3!kX?%s5`36%(-k1l$X7*~Lcj>U%}SX%bYdIvtzL>P3gaoiR*kTj2nY;|*GHpZd+e zC@A3G*AAl*_Sr0lIrZ4N34AuI83{;wo){Idqm9N4yz^};HLR5!6!65?h7If$75VmK zzn8*a-ESYs8b98ZCWN*xjT)pNrpUJ~dPWeQpY=dVGlrq~K&ZhCm3CpN=pc*Rh6XUg zurt@8^FLilGUA$K1V;fW%}|YVNs9gS#&14p{<)`0H!eQ?O;GSidK|jW2_FeUWQ|1b z;xjOR;RDZQ0oJ^;fTtLW|CCpjt_AEr!(u^OlnK}?#Vuy4UUKGjFwpW>P-c-n_Z!Ke zI|YPavg{he$?m>*VnDU9!KNInB<45-WKg`#!Lg@6H{%Gn01@f$2IA_JTL zn-8TTe~3SCBEbAIITKlp?PDs@3n?;YJ^h7J@aQwkay0I~1h?TP?_IyeU zNNN-|ZR9~fO6ER43!sFWskmOTnU%I>{lBZwD}9YdaW=MqqLCQsa*uguwM_7i=^k zuR&+Kj3u1cXCS?a5Qvby+6BQ^d-B^ANd?oBDekY&Kd9Bs-4|$7F~wG` zDUPKLdVGT4du6=viI1F*dob4~*p<@M&QGE=coOGaxsjkrc|?6_|G#M&;(Cj!{6o{hutHhNZAl)4kqSfTZRrd*+zNEf2i zhZ5((a4jX}pQ4E}KYy08ZN&2LcDY zlTSXgF^>KS2%ayy^*xA^0xugzh(?+3ZNqE002ovPDHLkV1k$HfK&hg literal 0 HcmV?d00001 diff --git a/inc/theme-settings/assets/js/settings.js b/inc/theme-settings/assets/js/settings.js new file mode 100644 index 0000000..f27eadd --- /dev/null +++ b/inc/theme-settings/assets/js/settings.js @@ -0,0 +1,53 @@ +/** + * Handles event for theme about page. + */ + +jQuery(document).ready(function($) { + var WpAjaxurl = mtaboutObject.ajax_url; + var _wpnonce = mtaboutObject._wpnonce; + var action = mtaboutObject.action; + + /** + * Popup on click demo import if mysterythemes demo importer plugin is not activated. + */ + $( '.mtdi-demo-import' ).addClass( 'disabled' ); + + switch( action ) { + case 'activate' : $( '.mt-activate-demo-import-plugin' ).on( 'click', function() { + var _this = $( this ); + sophia_after_dark_do_plugin( 'activate_demo_importer_plugin', _this ); + }); + break; + case 'install' : $( '.mt-install-demo-import-plugin' ).on( 'click', function() { + var _this = $( this ); + sophia_after_dark_do_plugin( 'install_demo_importer_plugin', _this ); + }); + break; + } + + sophia_after_dark_do_plugin = function ( ajax_action, _this ) { + $.ajax({ + method : "POST", + url : WpAjaxurl, + data : ({ + 'action' : ajax_action, + '_wpnonce' : _wpnonce + }), + beforeSend: function() { + var loadingTxt = _this.data( 'process' ); + _this.addClass( 'updating-message' ).text( loadingTxt ); + }, + success: function( response ) { + if( response.success ) { + var loadedTxt = _this.data( 'done' ); + _this.removeClass( 'updating-message' ).text( loadedTxt ); + console.log( response.data.message ); + } else { + console.log( response.data.message ); + } + location.reload(); + } + }); + } + +}); \ No newline at end of file diff --git a/inc/theme-settings/assets/js/theme-review-notice.js b/inc/theme-settings/assets/js/theme-review-notice.js new file mode 100644 index 0000000..b8d5cb6 --- /dev/null +++ b/inc/theme-settings/assets/js/theme-review-notice.js @@ -0,0 +1,53 @@ +jQuery(document).ready(function($) { + "use strict"; + + var WpAjaxurl = mtaboutObject.ajax_url; + var _wpnonce = mtaboutObject._wpnonce; + var action = mtaboutObject.action; + + switch( action ) { + case 'activate' : + $( '#mt-theme-message .mt-get-started' ).on( 'click', function() { + var _this = $( this ); + sophia_after_dark_do_plugin( 'activate_demo_importer_plugin', _this ); + }); + break; + case 'install' : + $( '#mt-theme-message .mt-get-started' ).on( 'click', function() { + var _this = $( this ); + sophia_after_dark_do_plugin( 'install_demo_importer_plugin', _this ); + }); + break; + case 'redirect' : + $( '#mt-theme-message .mt-get-started' ).on( 'click', function() { + var _this = $( this ); + location.href = _this.data( 'redirect' ); + }); + break; + } + + function sophia_after_dark_do_plugin( ajax_action, _this ) { + $.ajax({ + method : "POST", + url : WpAjaxurl, + data : ({ + 'action' : ajax_action, + '_wpnonce' : _wpnonce + }), + beforeSend: function() { + var loadingTxt = _this.data( 'process' ); + _this.addClass( 'updating-message' ).text( loadingTxt ); + }, + success: function( response ) { + if( response.success ) { + var loadedTxt = _this.data( 'done' ); + _this.removeClass( 'updating-message' ).text( loadedTxt ); + console.log( response.data.message ); + } else { + console.log( response.data.message ); + } + location.href = _this.data( 'redirect' ); + } + }) + } +}) \ No newline at end of file diff --git a/inc/theme-settings/mt-theme-settings.php b/inc/theme-settings/mt-theme-settings.php new file mode 100644 index 0000000..08c5f32 --- /dev/null +++ b/inc/theme-settings/mt-theme-settings.php @@ -0,0 +1,880 @@ +display( 'Name' ).' '.esc_html__( 'Settings', 'sophia-after-dark' ), $theme->display( 'Name' ).' '.' '.esc_html__( 'Settings', 'sophia-after-dark' ), 'activate_plugins', 'sophia-after-dark-settings', array( $this, 'get_started_screen' ) ); + } + + /** + * Enqueue styles. + */ + public function about_theme_styles( $hook ) { + global $sophia_after_dark_theme_version; + wp_enqueue_style( 'mt-theme-review-notice', get_template_directory_uri() . '/inc/theme-settings/assets/css/theme-review-notice.css', array(), esc_attr( $sophia_after_dark_theme_version ) ); + + if ( 'appearance_page_sophia-after-dark-settings' != $hook && 'themes.php' != $hook ) { + return; + } + + wp_enqueue_style( 'mt-theme-settings-style', get_template_directory_uri() . '/inc/theme-settings/assets/css/settings.css', array(), $sophia_after_dark_theme_version ); + } + + /** + * Enqueue scripts. + */ + public function about_theme_scripts( $hook ) { + global $sophia_after_dark_theme_version; + + $theme_notice_option = get_option( 'sophia_after_dark_admin_notice_welcome' ); + if ( $theme_notice_option ) { + wp_enqueue_script( 'mt-theme-review-notice', get_template_directory_uri() . '/inc/theme-settings/assets/js/theme-review-notice.js', array( 'jquery' ), esc_attr( $sophia_after_dark_theme_version ) ); + + $demo_importer_plugin = WP_PLUGIN_DIR . '/mysterythemes-demo-importer/mysterythemes-demo-importer.php'; + if ( file_exists( $demo_importer_plugin ) && !is_plugin_active( 'mysterythemes-demo-importer/mysterythemes-demo-importer.php' ) ) { + $action = 'activate'; + } elseif ( !file_exists( $demo_importer_plugin ) ) { + $action = 'install'; + } else { + $action = 'redirect'; + } + + wp_localize_script( 'mt-theme-review-notice', 'mtaboutObject', array( + 'ajax_url' => esc_url( admin_url( 'admin-ajax.php' ) ), + '_wpnonce' => wp_create_nonce( 'sophia_after_dark_admin_plugin_install_nonce' ), + 'action' => esc_html( $action ) + )); + } + + if ( 'appearance_page_sophia-after-dark-settings' != $hook ) { + return; + } + + $activated_plugins = apply_filters( 'sophia_after_dark_active_plugins', get_option('active_plugins') ); + $demo_import_plugin = in_array( 'mysterythemes-demo-importer/mysterythemes-demo-importer.php', $activated_plugins ); + if ( $demo_import_plugin ) { + return; + } + + wp_enqueue_script( 'mt-theme-settings-script', get_template_directory_uri() . '/inc/theme-settings/assets/js/settings.js', array( 'jquery' ), esc_attr( $sophia_after_dark_theme_version ) ); + + $demo_importer_plugin = WP_PLUGIN_DIR . '/mysterythemes-demo-importer/mysterythemes-demo-importer.php'; + if ( file_exists( $demo_importer_plugin ) && !is_plugin_active( 'mysterythemes-demo-importer/mysterythemes-demo-importer.php' ) ) { + $action = 'activate'; + } else { + $action = 'install'; + } + + wp_localize_script( 'mt-theme-settings-script', 'mtaboutObject', array( + 'ajax_url' => esc_url( admin_url( 'admin-ajax.php' ) ), + '_wpnonce' => wp_create_nonce( 'sophia_after_dark_admin_plugin_install_nonce' ), + 'action' => esc_html( $action ) + )); + } + + /** + * Add admin notice. + */ + public function sophia_after_dark_admin_notice() { + + if ( isset( $_GET['activated'] ) ) { + update_option( 'sophia_after_dark_admin_notice_welcome', true ); + } + + $theme_notice_option = get_option( 'sophia_after_dark_admin_notice_welcome' ); + // Let's bail on theme activation. + if ( $theme_notice_option ) { + add_action( 'admin_notices', array( $this, 'welcome_notice' ) ); + } + } + + /** + * Hide a notice if the GET variable is set. + */ + public static function sophia_after_dark_hide_notices() { + if ( isset( $_GET['sophia-after-dark-hide-notice'] ) && isset( $_GET['_sophia_after_dark_notice_nonce'] ) ) { + if ( ! wp_verify_nonce( $_GET['_sophia_after_dark_notice_nonce'], 'sophia_after_dark_hide_notices_nonce' ) ) { + wp_die( esc_html__( 'Action failed. Please refresh the page and retry.', 'sophia-after-dark' ) ); + } + + if ( ! current_user_can( 'manage_options' ) ) { + wp_die( esc_html__( 'Cheat in ’ huh?', 'sophia-after-dark' ) ); + } + + $hide_notice = sanitize_text_field( $_GET['sophia-after-dark-hide-notice'] ); + update_option( 'sophia_after_dark_admin_notice_' . $hide_notice, false ); + } + } + + /** + * Show welcome notice. + */ + public function welcome_notice() { + $theme = wp_get_theme( get_template() ); + $theme_name = $theme->get( 'Name' ); + ?> +
          + + + +

          +

          + '. esc_html( $theme_name ).'', '', '' ); ?> +

          +

          + ', '' ); ?> +

          +
          + +
          + +
          + get( 'Name' ); + $author_uri = $theme->get( 'AuthorURI' ); + $author_name = $theme->get( 'Author' ); + + // Drop minor version if 0 + ?> +
          +

          +
          + + %2$s', 'sophia-after-dark' ), $author_uri, $author_name ); ?> +
          +
          + +
          +
          +

          +
          +
          +
          +
          + +
          + + { $current_tab . '_screen' }(); + } + + // Fallback to about screen. + return $this->about_screen(); + } + + /** + * Output the about screen. + */ + public function about_screen() { + + $theme = wp_get_theme( get_template() ); + $theme_name = $theme->template; + + $doc_url = 'https://docs.mysterythemes.com/color-blog'; + $pro_theme_url = 'https://mysterythemes.com/wp-themes/color-blog-pro'; + $support_url = 'https://wordpress.org/support/theme/'. $theme_name; + $review_url = 'https://wordpress.org/support/theme/'. $theme_name .'/reviews/?filter=5#new-post'; + ?> +
          + + intro(); ?> +
          +
          +

          +
          +
          +

          +
            +
          • + +
          • +
          • + +
          • +
          • + +
          • +
          • + +
          • +
          • + +
          • +
          • + +
          • +
          • + +
          • +
          • + +
          • +
          +
          + +
          +

          +
            +
          • + +
          • +
          • + +
          • +
          • + +
          • +
          • + +
          • +
          • + +
          • +
          +
          +
          +
          + +
          + + + + | + + +
          +
          +
          +
          + +
          + + intro(); ?> +
          +
          + install_demo_import_plugin_popup(); ?> +
          + + + +
          +
          + +
          +
          + + + +
          +
          +

          +
          + + + + + + + + + + + + + + + + +
          +
          +
          + +
          +
          + +
          +
          +
          +
          + + +
          + + intro(); ?> +
          +

          + + get_contents( $changelog_file ); + $changelog_list = $this->parse_changelog( $changelog ); + echo wp_kses_post( $changelog_list ); + } + ?> +
          +
          + + '; + + foreach ( $changes as $index => $line ) { + $changelog .= wp_kses_post( preg_replace( '~(=\s*(\d+(?:\.\d+)+)\s*=|$)~Uis', '${1}', $line ) ); + } + + $changelog .= ''; + } + + return wp_kses_post( $changelog ); + } + + /** + * Output the free vs pro screen. + */ + public function free_vs_pro_screen() { + ?> +
          + + intro(); ?> +
          +

          +
          +
          ', + esc_html__( 'Upgrade message from the plugin author:', 'sophia-after-dark' ), + ' ', wp_kses_data( $item['upgrade_notice'] ), ' +
          +
          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

          + +
          + + + + ID; + $ignored_notice = get_user_meta( $user_id, 'sophia_after_dark_ignore_theme_review_notice', true ); + $ignored_notice_partially = get_user_meta( $user_id, 'mt_sophia_after_dark_ignore_theme_review_notice_partially', true ); + + /** + * Return from notice display if: + * + * 1. The theme installed is less than 15 days ago. + * 2. If the user has ignored the message partially for 15 days. + * 3. Dismiss always if clicked on 'I Already Did' button. + */ + if ( ( get_option( 'sophia_after_dark_theme_installed_time' ) > strtotime( '- 15 days' ) ) || ( $ignored_notice_partially > time() ) || ( $ignored_notice ) ) { + return; + } + ?> +
          +

          + ' . esc_html( $current_user->display_name ) . '' + ); + ?> +

          + + + + +
          + + ID; + + /* If user clicks to ignore the notice, add that to their user meta */ + if ( isset( $_GET['mt_sophia_after_dark_ignore_theme_review_notice'] ) && '0' == $_GET['mt_sophia_after_dark_ignore_theme_review_notice'] ) { + add_user_meta( $user_id, 'sophia_after_dark_ignore_theme_review_notice', 'true', true ); + } + + } + + /** + * Function to remove the theme review notice partially as requested by the user. + */ + public function sophia_after_dark_ignore_theme_review_notice_partially() { + + global $current_user; + $user_id = $current_user->ID; + + /* If user clicks to ignore the notice, add that to their user meta */ + if ( isset( $_GET['mt_sophia_after_dark_ignore_theme_review_notice_partially'] ) && '0' == $_GET['mt_sophia_after_dark_ignore_theme_review_notice_partially'] ) { + update_user_meta( $user_id, 'mt_sophia_after_dark_ignore_theme_review_notice_partially', strtotime( '+ 7 days' ) ); + } + + } + + /** + * Remove the data set after the theme has been switched to other theme. + */ + public function sophia_after_dark_theme_rating_notice_data_remove() { + + global $current_user; + $user_id = $current_user->ID; + $theme_installed_time = get_option( 'sophia_after_dark_theme_installed_time' ); + $ignored_notice = get_user_meta( $user_id, 'sophia_after_dark_ignore_theme_review_notice', true ); + $ignored_notice_partially = get_user_meta( $user_id, 'mt_sophia_after_dark_ignore_theme_review_notice_partially', true ); + + // Delete options data. + if ( $theme_installed_time ) { + delete_option( 'sophia_after_dark_theme_installed_time' ); + } + + // Delete permanent notice remove data. + if ( $ignored_notice ) { + delete_user_meta( $user_id, 'sophia_after_dark_ignore_theme_review_notice' ); + } + + // Delete partial notice remove data. + if ( $ignored_notice_partially ) { + delete_user_meta( $user_id, 'mt_sophia_after_dark_ignore_theme_review_notice_partially' ); + } + + } + + /** + * Display custom text on theme settings page + * + * @param string $text + */ + public function sophia_after_dark_admin_footer_text( $text ) { + $screen = get_current_screen(); + + if ( 'appearance_page_sophia-after-dark-settings' == $screen->id ) { + + $theme = wp_get_theme( get_template() ); + $theme_name = $theme->get( 'Name' ); + + $text = sprintf( __( 'If you like %1$s please leave us a %2$s rating. A huge thank you from Mystery Themes in advance 😃!', 'sophia-after-dark' ), esc_html( $theme_name ), '★★★★★' ); + + } + return $text; + } + + /** + * Popup alert for mystery themes demo importer plugin install. + * + * @since 1.0.7 + */ + public function install_demo_import_plugin_popup() { + $demo_importer_plugin = WP_PLUGIN_DIR . '/mysterythemes-demo-importer/mysterythemes-demo-importer.php'; + ?> +
          +
          + '.esc_html__( 'You can import available demos now!', 'sophia-after-dark' ).''; + } else { + if ( ! file_exists( $demo_importer_plugin ) ) { + ?> + + + + + + + + + + +
          +
          + false, + 'message' => $result->get_error_message(), + ) + ); + } else { + wp_send_json_success( + array( + 'success' => true, + 'message' => __( 'Plugin Successfully Activated.', 'sophia-after-dark' ), + ) + ); + } + } + + /** + * Activate Demo Importer Plugins Ajax Method + * + * @since 1.0.7 + */ + function install_demo_importer_plugin() { + + if ( ! wp_verify_nonce( $_POST['_wpnonce'], 'sophia_after_dark_admin_plugin_install_nonce' ) ) { + die( 'This action was stopped for security purposes.' ); + } + + if ( ! current_user_can( 'install_plugins' ) ) { + $status['message'] = __( 'Sorry, you are not allowed to install plugins on this site.', 'sophia-after-dark' ); + wp_send_json_error( $status ); + } + + include_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php'; + include_once ABSPATH . 'wp-admin/includes/plugin-install.php'; + + $api = plugins_api( + 'plugin_information', + array( + 'slug' => esc_html( 'mysterythemes-demo-importer' ), + 'fields' => array( + 'sections' => false, + ), + ) + ); + if ( is_wp_error( $api ) ) { + $status['message'] = $api->get_error_message(); + wp_send_json_error( $status ); + } + + $status['pluginName'] = $api->name; + $skin = new WP_Ajax_Upgrader_Skin(); + $upgrader = new Plugin_Upgrader( $skin ); + $result = $upgrader->install( $api->download_link ); + + if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) { + $status['debug'] = $skin->get_upgrade_messages(); + } + + if ( is_wp_error( $result ) ) { + $status['errorCode'] = $result->get_error_code(); + $status['message'] = $result->get_error_message(); + wp_send_json_error( $status ); + } elseif ( is_wp_error( $skin->result ) ) { + $status['errorCode'] = $skin->result->get_error_code(); + $status['message'] = $skin->result->get_error_message(); + wp_send_json_error( $status ); + } elseif ( $skin->get_errors()->get_error_code() ) { + $status['message'] = $skin->get_error_messages(); + wp_send_json_error( $status ); + } elseif ( is_null( $result ) ) { + global $wp_filesystem; + + $status['errorCode'] = 'unable_to_connect_to_filesystem'; + $status['message'] = __( 'Unable to connect to the filesystem. Please confirm your credentials.', 'sophia-after-dark' ); + + // Pass through the error from WP_Filesystem if one was raised. + if ( $wp_filesystem instanceof WP_Filesystem_Base && is_wp_error( $wp_filesystem->errors ) && $wp_filesystem->errors->get_error_code() ) { + $status['message'] = esc_html( $wp_filesystem->errors->get_error_message() ); + } + + wp_send_json_error( $status ); + } + + if ( current_user_can( 'activate_plugin' ) ) { + $result = activate_plugin( '/mysterythemes-demo-importer/mysterythemes-demo-importer.php' ); + if ( is_wp_error( $result ) ) { + $status['errorCode'] = $result->get_error_code(); + $status['message'] = $result->get_error_message(); + wp_send_json_error( $status ); + } + } + $status['message'] = esc_html__( 'Plugin installed successfully', 'sophia-after-dark' ); + wp_send_json_success( $status ); + } + } + +endif; + +return new sophia_after_dark_Settings(); \ No newline at end of file diff --git a/inc/widgets/mt-author-info.php b/inc/widgets/mt-author-info.php new file mode 100644 index 0000000..41d09d6 --- /dev/null +++ b/inc/widgets/mt-author-info.php @@ -0,0 +1,168 @@ + 'sophia_after_dark_author_info', + 'description' => __( 'Select the user to display the author info.', 'sophia-after-dark' ), + 'customize_selective_refresh' => true, + ); + parent::__construct( 'sophia_after_dark_author_info', __( 'MT: Author Info', 'sophia-after-dark' ), $widget_ops ); + } + + /** + * Helper function that holds widget fields + * Array is used in update and form functions + */ + private function widget_fields() { + $fields = array( + + 'widget_title' => array( + 'sophia_after_dark_widgets_name' => 'widget_title', + 'sophia_after_dark_widgets_title' => __( 'Widget title', 'sophia-after-dark' ), + 'sophia_after_dark_widgets_field_type' => 'text' + ), + + 'user_name' => array( + 'sophia_after_dark_widgets_name' => 'user_name', + 'sophia_after_dark_widgets_title' => __( 'User Name', 'sophia-after-dark' ), + 'sophia_after_dark_widgets_field_type' => 'text' + ), + + 'user_id' => array( + 'sophia_after_dark_widgets_name' => 'user_id', + 'sophia_after_dark_widgets_title' => __( 'Select Author', 'sophia-after-dark' ), + 'sophia_after_dark_widgets_default' => '', + 'sophia_after_dark_widgets_field_type' => 'user_dropdown' + ), + + 'user_thumb' => array( + 'sophia_after_dark_widgets_name' => 'user_thumb', + 'sophia_after_dark_widgets_title' => __( 'Author Image', 'sophia-after-dark' ), + 'sophia_after_dark_widgets_field_type' => 'upload' + ), + + ); + return $fields; + } + + /** + * Front-end display of widget. + * + * @see WP_Widget::widget() + * + * @param array $args Widget arguments. + * @param array $instance Saved values from database. + */ + public function widget( $args, $instance ) { + extract( $args ); + + if ( empty( $instance ) ) { + return ; + } + + $sophia_after_dark_widget_title = empty( $instance['widget_title'] ) ? '' : $instance['widget_title']; + $sophia_after_dark_user_name = empty( $instance['user_name'] ) ? '' : $instance['user_name']; + $sophia_after_dark_user_id = empty( $instance['user_id'] ) ? '' : $instance['user_id']; + $sophia_after_dark_user_image = empty( $instance['user_thumb'] ) ? '' : $instance['user_thumb']; + + echo $before_widget; + ?> +
          + +
          +
          + '; + } else { + echo get_avatar( $sophia_after_dark_user_id, '132' ); + } + ?> +
          +

          + +

          +
          +
          + +
          +
          +
          + widget_fields(); + + // Loop through fields + foreach ( $widget_fields as $widget_field ) { + + extract( $widget_field ); + + // Use helper function to get updated field values + $instance[$sophia_after_dark_widgets_name] = sophia_after_dark_widgets_updated_field_value( $widget_field, $new_instance[$sophia_after_dark_widgets_name] ); + } + + return $instance; + } + + /** + * Back-end widget form. + * + * @see WP_Widget::form() + * + * @param array $instance Previously saved values from database. + * + * @uses sophia_after_dark_widgets_show_widget_field() defined in mt-widget-fields.php + */ + public function form( $instance ) { + $widget_fields = $this->widget_fields(); + + // Loop through fields + foreach ( $widget_fields as $widget_field ) { + + // Make array elements available as variables + extract( $widget_field ); + $sophia_after_dark_widgets_field_value = !empty( $instance[$sophia_after_dark_widgets_name] ) ? wp_kses_post( $instance[$sophia_after_dark_widgets_name] ) : ''; + sophia_after_dark_widgets_show_widget_field( $this, $widget_field, $sophia_after_dark_widgets_field_value ); + } + } +} \ No newline at end of file diff --git a/inc/widgets/mt-latest-posts.php b/inc/widgets/mt-latest-posts.php new file mode 100644 index 0000000..409cd85 --- /dev/null +++ b/inc/widgets/mt-latest-posts.php @@ -0,0 +1,179 @@ + 'sophia_after_dark_latest_posts', + 'description' => __( 'A widget to display the latest posts with thumbnail.', 'sophia-after-dark' ), + 'customize_selective_refresh' => true, + ); + parent::__construct( 'sophia_after_dark_latest_posts', __( 'MT: Latest Posts', 'sophia-after-dark' ), $widget_ops ); + } + + /** + * Helper function that holds widget fields + * Array is used in update and form functions + */ + private function widget_fields() { + + $fields = array( + + 'widget_title' => array( + 'sophia_after_dark_widgets_name' => 'widget_title', + 'sophia_after_dark_widgets_title' => __( 'Widget title', 'sophia-after-dark' ), + 'sophia_after_dark_widgets_field_type' => 'text' + ), + + 'widget_post_order' => array( + 'sophia_after_dark_widgets_name' => 'widget_post_order', + 'sophia_after_dark_widgets_title' => __( 'Post Order', 'sophia-after-dark' ), + 'sophia_after_dark_widgets_default' => 'default', + 'sophia_after_dark_widgets_field_type' => 'select', + 'sophia_after_dark_widgets_field_options' => array( + 'default' => __( 'Default Order', 'sophia-after-dark' ), + 'random' => __( 'Random Order', 'sophia-after-dark' ), + ) + ), + + 'widget_post_count' => array( + 'sophia_after_dark_widgets_name' => 'widget_post_count', + 'sophia_after_dark_widgets_title' => __( 'Post Count', 'sophia-after-dark' ), + 'sophia_after_dark_widgets_default' => '5', + 'sophia_after_dark_widgets_field_type' => 'number' + ) + + ); + return $fields; + } + + /** + * Front-end display of widget. + * + * @see WP_Widget::widget() + * + * @param array $args Widget arguments. + * @param array $instance Saved values from database. + */ + public function widget( $args, $instance ) { + extract( $args ); + + if ( empty( $instance ) ) { + return ; + } + + $sophia_after_dark_widget_title = empty( $instance['widget_title'] ) ? '' : $instance['widget_title']; + $sophia_after_dark_post_order = empty( $instance['widget_post_order'] ) ? 'default' : $instance['widget_post_order']; + $sophia_after_dark_post_count = empty( $instance['widget_post_count'] ) ? '5' : $instance['widget_post_count']; + + echo $before_widget; + ?> +
          + +
          + absint( $sophia_after_dark_post_count ), + 'ignore_sticky_posts' => 1, + ); + if ( 'random' === $sophia_after_dark_post_order ) { + $sophia_after_dark_posts_args['orderby'] = 'rand'; + } + $sophia_after_dark_posts_query = new WP_Query( $sophia_after_dark_posts_args ); + if ( $sophia_after_dark_posts_query->have_posts() ) { + while ( $sophia_after_dark_posts_query->have_posts() ) { + $sophia_after_dark_posts_query->the_post(); + ?> +
          + + +
          +
          + +
          +
          +
          + +
          + +
          +
          + +
          +
          + widget_fields(); + + // Loop through fields + foreach ( $widget_fields as $widget_field ) { + + extract( $widget_field ); + + // Use helper function to get updated field values + $instance[$sophia_after_dark_widgets_name] = sophia_after_dark_widgets_updated_field_value( $widget_field, $new_instance[$sophia_after_dark_widgets_name] ); + } + + return $instance; + } + + /** + * Back-end widget form. + * + * @see WP_Widget::form() + * + * @param array $instance Previously saved values from database. + * + * @uses sophia_after_dark_widgets_show_widget_field() defined in mt-widget-fields.php + */ + public function form( $instance ) { + $widget_fields = $this->widget_fields(); + + // Loop through fields + foreach ( $widget_fields as $widget_field ) { + + // Make array elements available as variables + extract( $widget_field ); + $sophia_after_dark_widgets_field_value = !empty( $instance[$sophia_after_dark_widgets_name] ) ? wp_kses_post( $instance[$sophia_after_dark_widgets_name] ) : ''; + sophia_after_dark_widgets_show_widget_field( $this, $widget_field, $sophia_after_dark_widgets_field_value ); + } + } +} \ No newline at end of file diff --git a/inc/widgets/mt-social-media.php b/inc/widgets/mt-social-media.php new file mode 100644 index 0000000..c699dd7 --- /dev/null +++ b/inc/widgets/mt-social-media.php @@ -0,0 +1,128 @@ + 'sophia_after_dark_social_media', + 'description' => __( 'A widget shows the social media icons.', 'sophia-after-dark' ), + 'customize_selective_refresh' => true, + ); + parent::__construct( 'sophia_after_dark_social_media', __( 'MT: Social Media', 'sophia-after-dark' ), $widget_ops ); + } + + /** + * Helper function that holds widget fields + * Array is used in update and form functions + */ + private function widget_fields() { + + $fields = array( + + 'widget_title' => array( + 'sophia_after_dark_widgets_name' => 'widget_title', + 'sophia_after_dark_widgets_title' => __( 'Widget title', 'sophia-after-dark' ), + 'sophia_after_dark_widgets_field_type' => 'text' + ) + ); + return $fields; + } + + /** + * Front-end display of widget. + * + * @see WP_Widget::widget() + * + * @param array $args Widget arguments. + * @param array $instance Saved values from database. + */ + public function widget( $args, $instance ) { + extract( $args ); + + if ( empty( $instance ) ) { + return ; + } + + $sophia_after_dark_widget_title = empty( $instance['widget_title'] ) ? '' : $instance['widget_title']; + + $get_social_media_icons = get_theme_mod( 'social_media_icons', '' ); + $get_decode_social_media = json_decode( $get_social_media_icons ); + + echo $before_widget; + ?> +
          + +
          + +
          +
          + widget_fields(); + + // Loop through fields + foreach ( $widget_fields as $widget_field ) { + + extract( $widget_field ); + + // Use helper function to get updated field values + $instance[$sophia_after_dark_widgets_name] = sophia_after_dark_widgets_updated_field_value( $widget_field, $new_instance[$sophia_after_dark_widgets_name] ); + } + + return $instance; + } + + /** + * Back-end widget form. + * + * @see WP_Widget::form() + * + * @param array $instance Previously saved values from database. + * + * @uses sophia_after_dark_widgets_show_widget_field() defined in mt-widget-fields.php + */ + public function form( $instance ) { + $widget_fields = $this->widget_fields(); + + // Loop through fields + foreach ( $widget_fields as $widget_field ) { + + // Make array elements available as variables + extract( $widget_field ); + $sophia_after_dark_widgets_field_value = !empty( $instance[$sophia_after_dark_widgets_name] ) ? wp_kses_post( $instance[$sophia_after_dark_widgets_name] ) : ''; + sophia_after_dark_widgets_show_widget_field( $this, $widget_field, $sophia_after_dark_widgets_field_value ); + } + } +} \ No newline at end of file diff --git a/inc/widgets/mt-widget-fields.php b/inc/widgets/mt-widget-fields.php new file mode 100644 index 0000000..6350da7 --- /dev/null +++ b/inc/widgets/mt-widget-fields.php @@ -0,0 +1,154 @@ + +

          + + + + +
          + + +

          + +

          + + + + +
          + + +

          + get_field_name( $sophia_after_dark_widgets_name ) ) .'" id="'. esc_attr( $instance->get_field_id( $sophia_after_dark_widgets_name ) ) .'" class="widefat"'; + ?> +

          + + __( '- - Select User - -', 'sophia-after-dark' ), + 'selected' => esc_attr( $sophia_after_dark_widget_field_value ), + ) ); + + $dropdown_args['echo'] = false; + + $dropdown = wp_dropdown_users( $dropdown_args ); + $dropdown = str_replace( ' +

          + +

          + + + + +
          + + +

          + '; + $image_class = ' hidden'; + } + ?> +
          + +
          + +
          + +
          +
          + +
          + +
          + + + + +
          + + +
          + + + +
          + esc_html__( 'Sidebar', 'sophia-after-dark' ), + 'id' => 'sidebar-1', + 'description' => esc_html__( 'Add widgets here.', 'sophia-after-dark' ), + + 'before_widget' => '
          ', + 'after_widget' => '
          ', + 'before_title' => '

          ', + 'after_title' => '

          ', + ) ); + + /** + * Register Header Ads Section + * + * @since 1.0.0 + */ + register_sidebar( array( + 'name' => esc_html__( 'Header Ads Section', 'sophia-after-dark' ), + 'id' => 'header-ads-section', + 'description' => esc_html__( 'Add MT: Ads Banner widgets here.', 'sophia-after-dark' ), + + 'before_widget' => '
          ', + 'after_widget' => '
          ', + 'before_title' => '

          ', + 'after_title' => '

          ', + ) ); + + /** + * Register 4 different footer area + * + * @since 1.0.0 + */ + + register_sidebars( 4 , array( + 'name' => esc_html__( 'Footer %d', 'sophia-after-dark' ), + 'id' => 'footer-sidebar', + 'description' => esc_html__( 'Added widgets are display at Footer Widget Area.', 'sophia-after-dark' ), + 'before_widget' => '
          ', + 'after_widget' => '
          ', + 'before_title' => '

          ', + 'after_title' => '

          ', + ) ); + + // Author Info + register_widget( 'sophia_after_dark_Author_Info' ); + + // Latest Posts + register_widget( 'sophia_after_dark_Latest_Posts' ); + + //Social Media + register_widget( 'sophia_after_dark_Social_Media' ); +} +add_action( 'widgets_init', 'sophia_after_dark_widgets_init' ); + +/*-----------------------------------------------------------------------------------------------------------------------*/ +/** + * Load widget required files + * + * @since 1.0.0 + */ +require get_template_directory() . '/inc/widgets/mt-widget-fields.php'; // Widget fields +require get_template_directory() . '/inc/widgets/mt-author-info.php'; // Author Info +require get_template_directory() . '/inc/widgets/mt-latest-posts.php'; // Latest Posts +require get_template_directory() . '/inc/widgets/mt-social-media.php'; // Social Media \ No newline at end of file diff --git a/index.php b/index.php new file mode 100644 index 0000000..504a883 --- /dev/null +++ b/index.php @@ -0,0 +1,66 @@ + +
          +
          +
          + '; + } + + if ( have_posts() ) : + if ( 'mt-archive--masonry-style' === $archive_style ) { + ?> +
          +
          + +
          +
          + '; + } + ?> +
          +
          + +
          +\n" +"Language-Team: \n" +"Language: \n" +"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Loco https://localise.biz/\n" +"X-Loco-Version: 2.5.2; wp-5.7\n" +"X-Domain: sophia-after-dark" + +#: inc/theme-settings/mt-theme-settings.php:506 +msgid "$59.99" +msgstr "" + +#. 1: plugin name. +#: inc/tgm/class-tgm-plugin-activation.php:3509 +#, php-format +msgid "%1$s installed and activated successfully." +msgstr "" + +#. 1: plugin name. +#: inc/tgm/class-tgm-plugin-activation.php:3517 +#, php-format +msgid "%1$s installed successfully." +msgstr "" + +#: inc/customizer/mt-customizer-custom-classes.php:304 +msgid "— Select a page —" +msgstr "" + +#: inc/widgets/mt-widget-fields.php:70 +msgid "- - Select User - -" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:520 +msgid "1" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:530 +msgid "2" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:521 +msgid "4" +msgstr "" + +#: 404.php:19 +msgid "404" +msgstr "" + +#: inc/mt-class-breadcrumbs.php:267 +msgid "404 Not Found" +msgstr "" + +#: inc/customizer/mt-customizer-design-panel-options.php:236 +msgid "404 Page Settings" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:531 +msgid "600+" +msgstr "" + +#: inc/widgets/mt-social-media.php:19 +msgid "A widget shows the social media icons." +msgstr "" + +#: inc/widgets/mt-latest-posts.php:19 +msgid "A widget to display the latest posts with thumbnail." +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:134 +msgid "Action failed. Please refresh the page and retry." +msgstr "" + +#: inc/tgm/class-tgm-plugin-activation.php:2726 +msgid "Activate" +msgstr "" + +#. %2$s: plugin name in screen reader markup +#: inc/tgm/class-tgm-plugin-activation.php:2614 +#, php-format +msgid "Activate %2$s" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:758 +msgid "Activate Now" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:757 +msgid "Activated" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:757 +msgid "Activating" +msgstr "" + +#: inc/tgm/class-tgm-plugin-activation.php:2321 +msgid "Active" +msgstr "" + +#: inc/customizer/mt-customizer-additional-panel-options.php:59 +msgid "Add Icon" +msgstr "" + +#: inc/customizer/mt-customizer-header-panel-options.php:94 +msgid "Add Icon Before Tag" +msgstr "" + +#: inc/widgets/mt-widget-functions.php:39 +msgid "Add MT: Ads Banner widgets here." +msgstr "" + +#: inc/widgets/mt-widget-functions.php:23 +msgid "Add widgets here." +msgstr "" + +#: inc/widgets/mt-widget-functions.php:56 +msgid "Added widgets are display at Footer Widget Area." +msgstr "" + +#: inc/customizer/mt-customizer-panels.php:71 +msgid "Additional Features" +msgstr "" + +#: inc/tgm/class-tgm-plugin-activation.php:3510 +msgid "All installations and activations have been completed." +msgstr "" + +#: inc/tgm/class-tgm-plugin-activation.php:3518 +msgid "All installations have been completed." +msgstr "" + +#. 1: dashboard link. +#: inc/tgm/class-tgm-plugin-activation.php:394 +#, php-format +msgid "All plugins installed and activated successfully. %1$s" +msgstr "" + +#. 1: plugin name, 2: error message. +#: inc/tgm/class-tgm-plugin-activation.php:3501 +#, php-format +msgid "An error occurred while installing %1$s: %2$s." +msgstr "" + +#: inc/customizer/mt-customizer-design-panel-options.php:22 +msgid "Archive Settings" +msgstr "" + +#: inc/customizer/mt-customizer-design-panel-options.php:42 +msgid "Archive/Blog Sidebar Layout" +msgstr "" + +#: inc/customizer/mt-customizer-design-panel-options.php:68 +msgid "Archive/Blog Style" +msgstr "" + +#: inc/mt-class-breadcrumbs.php:268 +msgid "Archives" +msgstr "" + +#: inc/tgm/class-tgm-plugin-activation.php:2482 +msgctxt "as in: \"version nr unknown\"" +msgid "unknown" +msgstr "" + +#: inc/widgets/mt-author-info.php:53 +msgid "Author Image" +msgstr "" + +#: inc/tgm/class-tgm-plugin-activation.php:2510 +msgid "Available version:" +msgstr "" + +#: inc/hooks/mt-custom-hooks.php:276 +msgid "Back To Top" +msgstr "" + +#: inc/tgm/class-tgm-plugin-activation.php:380 +msgid "Begin activating plugin" +msgid_plural "Begin activating plugins" +msgstr[0] "" +msgstr[1] "" + +#: inc/tgm/class-tgm-plugin-activation.php:370 +msgid "Begin installing plugin" +msgid_plural "Begin installing plugins" +msgstr[0] "" +msgstr[1] "" + +#: inc/tgm/class-tgm-plugin-activation.php:375 +msgid "Begin updating plugin" +msgid_plural "Begin updating plugins" +msgstr[0] "" +msgstr[1] "" + +#: inc/customizer/mt-customizer-footer-panel-options.php:85 +msgid "Bottom Footer" +msgstr "" + +#: inc/customizer/mt-customizer-additional-panel-options.php:82 +msgid "Breadcrumbs" +msgstr "" + +#: inc/mt-class-breadcrumbs.php:265 +msgctxt "breadcrumbs aria label" +msgid "Breadcrumbs" +msgstr "" + +#: inc/mt-class-breadcrumbs.php:264 +msgid "Browse:" +msgstr "" + +#: inc/customizer/mt-customizer-header-panel-options.php:212 +msgid "Button Label" +msgstr "" + +#: inc/customizer/mt-customizer-header-panel-options.php:234 +msgid "Button Link" +msgstr "" + +#: inc/customizer/mt-customizer.php:67 +#: inc/theme-settings/mt-theme-settings.php:390 +msgid "Buy Now" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:567 +msgid "Buy Pro" +msgstr "" + +#: inc/customizer/mt-customizer-additional-panel-options.php:119 +msgid "Categories Color" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:220 +msgid "Changelog" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:138 +msgid "Cheat in ’ huh?" +msgstr "" + +#: inc/customizer/mt-customizer-front-panel-options.php:69 +msgid "Choose default post category" +msgstr "" + +#: inc/customizer/mt-customizer-general-panel-options.php:91 +msgid "Choose site layout from available layouts" +msgstr "" + +#: inc/customizer/mt-customizer-additional-panel-options.php:65 +msgid "Choose social media icon." +msgstr "" + +#: inc/customizer/mt-customizer-footer-panel-options.php:64 +msgid "Choose widget layout from available layouts" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:395 +msgid "Click to import demo" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:162 +#, php-format +msgid "" +"Clicking get started will process to installation of %1$s Mystery Themes " +"Demo Importer %2$s Plugin in your dashboard. After success it will redirect " +"to the theme settings page." +msgstr "" + +#: inc/customizer/mt-customizer-custom-classes.php:353 +msgid "Close" +msgstr "" + +#. Name of the theme +#: inc/customizer/mt-customizer-footer-panel-options.php:122 +#: inc/hooks/mt-custom-hooks.php:558 +#: inc/theme-settings/mt-theme-settings.php:498 +msgid "Sophia After Dark" +msgstr "" + +#. Description of the theme +msgid "" +"Sophia After Dark is a page builder based and colorful free blog style " +"WordPress theme fit for writers and bloggers. With the help of live " +"customizer option makes your site own and present your content in an " +"attractive way. It comes up with an amazing creative blog layouts, fully RTL " +"and translation ready, and also compatible with Gutenberg. The theme works " +"perfectly with Elementor that helps to create a beautiful and unique website " +"faster. As its name suggests, it added staggering variety of color and makes " +"your site attractive and elegant. Check demo here: https://demo." +"mysterythemes.com/color-blog-demos" +msgstr "" + +#: inc/customizer/mt-customizer.php:66 +#: inc/theme-settings/mt-theme-settings.php:499 +msgid "Color Blog Pro" +msgstr "" + +#. %s is the page number. +#: inc/mt-class-breadcrumbs.php:274 +#, php-format +msgid "Comment Page %s" +msgstr "" + +#: comments.php:66 +msgid "Comments are closed." +msgstr "" + +#. 1: comment count number, 2: title. +#: comments.php:41 +#, php-format +msgctxt "comments title" +msgid "%1$s thought on “%2$s”" +msgid_plural "%1$s thoughts on “%2$s”" +msgstr[0] "" +msgstr[1] "" + +#. %s: Name of current post. Only visible to screen readers +#: template-parts/content-search.php:46 template-parts/content-single.php:42 +#: template-parts/content.php:55 +#, php-format +msgid "Continue reading \"%s\"" +msgstr "" + +#: inc/customizer/mt-customizer-footer-panel-options.php:130 +msgid "Copyright Text" +msgstr "" + +#: inc/customizer/mt-customizer-header-panel-options.php:145 +msgid "Count" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:539 +msgid "Custom 404 Page" +msgstr "" + +#: inc/mt-class-breadcrumbs.php:790 inc/mt-class-breadcrumbs.php:1219 +msgctxt "daily archives date format" +msgid "j" +msgstr "" + +#: inc/customizer/mt-customizer-header-panel-options.php:144 +msgid "Default" +msgstr "" + +#: inc/widgets/mt-latest-posts.php:45 +msgid "Default Order" +msgstr "" + +#: inc/metaboxes/mt-post-sidebar-meta.php:43 +msgid "Default Sidebar" +msgstr "" + +#: inc/customizer/mt-customizer-custom-classes.php:352 +msgid "Delete" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:397 +msgid "Demo importer plugin is not installed or activated" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:212 +msgid "Demos" +msgstr "" + +#: inc/customizer/mt-customizer-panels.php:59 +msgid "Design Settings" +msgstr "" + +#: inc/template-tags.php:105 +#: inc/customizer/mt-customizer-design-panel-options.php:86 +msgid "Discover" +msgstr "" + +#: inc/tgm/class-tgm-plugin-activation.php:395 +msgid "Dismiss this notice" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:155 +msgid "Dismiss this notice." +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:295 +msgid "Documentation" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:165 +msgid "Done!" +msgstr "" + +#. %s: Name of current post. Only visible to screen readers +#: inc/template-tags.php:115 inc/template-tags.php:152 +#: template-parts/content-page.php:30 +#, php-format +msgid "Edit %s" +msgstr "" + +#: inc/customizer/mt-customizer-additional-panel-options.php:105 +msgid "Enable Breadcrumbs" +msgstr "" + +#: inc/customizer/mt-customizer-front-panel-options.php:130 +msgid "Enable Featured Posts Section" +msgstr "" + +#: inc/customizer/mt-customizer-footer-panel-options.php:107 +msgid "Enable Footer Menu" +msgstr "" + +#: inc/customizer/mt-customizer-footer-panel-options.php:43 +msgid "Enable Footer Widget Area" +msgstr "" + +#: inc/customizer/mt-customizer-design-panel-options.php:254 +msgid "Enable Latest Posts" +msgstr "" + +#: inc/customizer/mt-customizer-header-panel-options.php:188 +msgid "Enable Live Now Button" +msgstr "" + +#: inc/customizer/mt-customizer-general-panel-options.php:45 +msgid "Enable Preloader" +msgstr "" + +#: inc/customizer/mt-customizer-design-panel-options.php:178 +msgid "Enable Related Posts" +msgstr "" + +#: inc/customizer/mt-customizer-header-panel-options.php:320 +msgid "Enable Search Icon" +msgstr "" + +#: inc/customizer/mt-customizer-front-panel-options.php:45 +msgid "Enable Slider Section" +msgstr "" + +#: inc/customizer/mt-customizer-header-panel-options.php:297 +msgid "Enable Social Icons" +msgstr "" + +#: inc/customizer/mt-customizer-header-panel-options.php:274 +msgid "Enable Sticky Menu" +msgstr "" + +#: inc/customizer/mt-customizer-design-panel-options.php:116 +msgid "Enable Title Prefix" +msgstr "" + +#: inc/customizer/mt-customizer-header-panel-options.php:45 +msgid "Enable Top Header" +msgstr "" + +#: inc/customizer/mt-customizer-header-panel-options.php:69 +msgid "Enable Trending Section" +msgstr "" + +#: inc/customizer/mt-customizer-general-panel-options.php:68 +msgid "Enable Wow Animation" +msgstr "" + +#: inc/customizer/mt-customizer-additional-panel-options.php:70 +msgid "Enter social media url." +msgstr "" + +#: 404.php:19 +msgid "error" +msgstr "" + +#: inc/tgm/class-tgm-plugin-activation.php:2295 +msgid "External Source" +msgstr "" + +#: inc/customizer/mt-customizer-header-panel-options.php:255 +msgid "Extra Options" +msgstr "" + +#: inc/customizer/mt-customizer-front-panel-options.php:145 +#: inc/customizer/mt-customizer-front-panel-options.php:153 +#: inc/hooks/mt-custom-hooks.php:447 +msgid "Featured News" +msgstr "" + +#: inc/customizer/mt-customizer-front-panel-options.php:174 +msgid "Featured Post Order" +msgstr "" + +#: inc/customizer/mt-customizer-front-panel-options.php:111 +msgid "Featured Posts Settings" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:497 +msgid "Features" +msgstr "" + +#: inc/hooks/mt-custom-hooks.php:117 +msgid "Follow Us: " +msgstr "" + +#: functions.php:55 +msgid "Footer" +msgstr "" + +#: inc/widgets/mt-widget-functions.php:54 +#, php-format +msgid "Footer %d" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:549 +msgid "Footer Layout Options" +msgstr "" + +#: inc/customizer/mt-customizer-panels.php:83 +msgid "Footer Settings" +msgstr "" + +#: inc/customizer/mt-customizer-footer-panel-options.php:21 +msgid "Footer Widget Area" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:505 +msgid "Free" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:216 +msgid "Free Vs Pro" +msgstr "" + +#: inc/customizer/mt-customizer-panels.php:47 +msgid "Front Sections" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:559 +msgid "GDPR Compatible" +msgstr "" + +#: inc/customizer/mt-customizer-panels.php:23 +msgid "General Settings" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:208 +msgid "Get Started" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:166 +#, php-format +msgid "Get started with %1$s" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:320 +msgid "Go to Dashboard" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:320 +msgid "Go to Dashboard → Home" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:529 +msgid "Google Fonts" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:646 +msgid "Got theme support question?" +msgstr "" + +#: inc/widgets/mt-widget-functions.php:37 +msgid "Header Ads Section" +msgstr "" + +#: inc/customizer/mt-customizer.php:31 +msgid "Header Image for only Innerpages" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:519 +msgid "Header Layouts" +msgstr "" + +#: inc/customizer/mt-customizer-panels.php:35 +msgid "Header Settings" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:259 +msgid "Here are some useful links for you to get started" +msgstr "" + +#: inc/tgm/class-tgm-plugin-activation.php:3509 +#: inc/tgm/class-tgm-plugin-activation.php:3517 +msgid "Hide Details" +msgstr "" + +#: inc/mt-class-breadcrumbs.php:266 +msgid "Home" +msgstr "" + +#: inc/mt-class-breadcrumbs.php:772 +msgctxt "hour archives time format" +msgid "g a" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:620 +#, php-format +msgid "" +"Howdy, %1$s! It seems that you have been using this theme for more than 15 " +"days. We hope you are happy with everything that the theme has to offer. If " +"you can spare a minute, please help us by leaving a 5-star review on " +"WordPress.org. By spreading the love, we can continue to develop new " +"amazing features in the future, for free!" +msgstr "" + +#. Author URI of the theme +msgid "https://mysterythemes.com" +msgstr "" + +#. URI of the theme +msgid "https://mysterythemes.com/wp-themes/sophia-after-dark" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:641 +msgid "I already did" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:727 +#, php-format +msgid "" +"If you like %1$s please leave us a %2$s rating. A huge " +"thank you from Mystery Themes in advance 😃!" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:401 +msgid "Import" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:400 +#, php-format +msgid "Import %1$s" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:509 +msgid "Import Demo Data" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:381 +msgid "Imported" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:380 +#, php-format +msgid "Imported %1$s" +msgstr "" + +#: inc/tgm/class-tgm-plugin-activation.php:2717 +msgid "Install" +msgstr "" + +#. %2$s: plugin name in screen reader markup +#: inc/tgm/class-tgm-plugin-activation.php:2603 +#, php-format +msgid "Install %2$s" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:751 +msgid "Install and Activate" +msgstr "" + +#: inc/tgm/class-tgm-plugin-activation.php:328 +msgid "Install Plugins" +msgstr "" + +#: inc/tgm/class-tgm-plugin-activation.php:327 +msgid "Install Required Plugins" +msgstr "" + +#. 1: install status, 2: update status +#: inc/tgm/class-tgm-plugin-activation.php:2342 +#, php-format +msgctxt "Install/Update Status" +msgid "%1$s, %2$s" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:750 +msgid "Installed & Activated" +msgstr "" + +#: inc/tgm/class-tgm-plugin-activation.php:2319 +msgid "Installed But Not Activated" +msgstr "" + +#: inc/tgm/class-tgm-plugin-activation.php:2490 +msgid "Installed version:" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:750 +msgid "Installing & Activating" +msgstr "" + +#. 1: plugin name, 2: action number 3: total number of actions. +#: inc/tgm/class-tgm-plugin-activation.php:3512 +#, php-format +msgid "Installing and Activating Plugin %1$s (%2$d/%3$d)" +msgstr "" + +#. 1: plugin name, 2: action number 3: total number of actions. +#: inc/tgm/class-tgm-plugin-activation.php:3520 +#, php-format +msgid "Installing Plugin %1$s (%2$d/%3$d)" +msgstr "" + +#. %s: plugin name. +#: inc/tgm/class-tgm-plugin-activation.php:330 +#, php-format +msgid "Installing Plugin: %s" +msgstr "" + +#: 404.php:24 +msgid "It looks like nothing was found at this location." +msgstr "" + +#: template-parts/content-none.php:39 +msgid "" +"It seems we can’t find what you’re looking for. Perhaps " +"searching can help." +msgstr "" + +#. If there are characters in your language that are not supported +#. byJosefin Sans translate this to 'off'. Do not translate into your own language. +#: inc/template-functions.php:88 +msgctxt "Josefin Sans font: on or off" +msgid "on" +msgstr "" + +#: inc/customizer/mt-customizer-front-panel-options.php:178 +msgid "Latest Posts" +msgstr "" + +#. %s: post title +#: inc/template-tags.php:69 +#, php-format +msgid "Leave a Comment on %s" +msgstr "" + +#: inc/metaboxes/mt-post-sidebar-meta.php:49 +msgid "Left sidebar" +msgstr "" + +#. used between list items, there is a space after the comma +#: inc/template-tags.php:96 inc/template-tags.php:141 +msgctxt "list item separator" +msgid ", " +msgstr "" + +#: inc/customizer/mt-customizer-header-panel-options.php:204 +#: inc/hooks/mt-top-header-hooks.php:88 +msgid "Live Now" +msgstr "" + +#: inc/tgm/mt-recommend-plugins.php:73 +msgid "Maintenance Notice" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:280 +msgid "Manage footer widget area" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:271 +msgid "Manage header section" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:283 +msgid "Manage menus" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:277 +msgid "Manage Social Icons" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:286 +msgid "Manage widgets" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:636 +msgid "Maybe later" +msgstr "" + +#: inc/hooks/mt-custom-hooks.php:78 +msgid "Menu" +msgstr "" + +#: inc/tgm/class-tgm-plugin-activation.php:2498 +msgid "Minimum required version:" +msgstr "" + +#. Minute archive title. %s is the minute time format. +#: inc/mt-class-breadcrumbs.php:276 +#, php-format +msgid "Minute %s" +msgstr "" + +#: inc/mt-class-breadcrumbs.php:738 +msgctxt "minute and hour archives time format" +msgid "g:i a" +msgstr "" + +#: inc/mt-class-breadcrumbs.php:755 +msgctxt "minute archives time format" +msgid "i" +msgstr "" + +#: inc/mt-class-breadcrumbs.php:789 inc/mt-class-breadcrumbs.php:845 +#: inc/mt-class-breadcrumbs.php:1215 +msgctxt "monthly archives date format" +msgid "F" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:292 +msgid "More Actions" +msgstr "" + +#: inc/widgets/mt-author-info.php:22 +msgid "MT: Author Info" +msgstr "" + +#: inc/widgets/mt-latest-posts.php:22 +msgid "MT: Latest Posts" +msgstr "" + +#: inc/widgets/mt-social-media.php:22 +msgid "MT: Social Media" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:524 +msgid "Multiple Layouts" +msgstr "" + +#. Author of the theme +msgid "Mystery Themes" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:756 +msgid "Mystery Themes Demo Importer Plugin is installed but not activated!" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:749 +msgid "Mystery Themes Demo Importer Plugin is not installed!" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:301 +msgid "Need theme support?" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:262 +msgid "Next Steps" +msgstr "" + +#. 1: plugin name. +#: inc/tgm/class-tgm-plugin-activation.php:390 +#, php-format +msgid "No action taken. Plugin %1$s was already active." +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:354 +msgid "No demos are configured for this theme, please contact the theme author" +msgstr "" + +#: inc/customizer/mt-customizer-custom-classes.php:339 +#: inc/widgets/mt-widget-fields.php:119 +msgid "No image selected" +msgstr "" + +#: inc/tgm/class-tgm-plugin-activation.php:2934 +msgid "No plugins are available to be activated at this time." +msgstr "" + +#: inc/tgm/class-tgm-plugin-activation.php:2800 +msgid "No plugins are available to be installed at this time." +msgstr "" + +#: inc/tgm/class-tgm-plugin-activation.php:2802 +msgid "No plugins are available to be updated at this time." +msgstr "" + +#: inc/tgm/class-tgm-plugin-activation.php:2533 +msgid "No plugins to install, update or activate." +msgstr "" + +#: inc/tgm/class-tgm-plugin-activation.php:2908 +msgid "No plugins were selected to be activated. No action taken." +msgstr "" + +#: inc/tgm/class-tgm-plugin-activation.php:2757 +msgid "No plugins were selected to be installed. No action taken." +msgstr "" + +#: inc/tgm/class-tgm-plugin-activation.php:2759 +msgid "No plugins were selected to be updated. No action taken." +msgstr "" + +#: inc/metaboxes/mt-post-sidebar-meta.php:67 +msgid "No sidebar Content Centered" +msgstr "" + +#: inc/metaboxes/mt-post-sidebar-meta.php:61 +msgid "No sidebar Full width" +msgstr "" + +#: inc/tgm/class-tgm-plugin-activation.php:2315 +msgid "Not Installed" +msgstr "" + +#: template-parts/content-none.php:14 +msgid "Nothing Found" +msgstr "" + +#. 1: title. +#: comments.php:35 +#, php-format +msgid "One thought on “%1$s”" +msgstr "" + +#: 404.php:21 +msgid "Oops! That page can’t be found." +msgstr "" + +#. %s is the page number. +#: inc/mt-class-breadcrumbs.php:272 +#, php-format +msgid "Page %s" +msgstr "" + +#: inc/customizer/mt-customizer-design-panel-options.php:192 +msgid "Page Settings" +msgstr "" + +#: inc/customizer/mt-customizer-design-panel-options.php:212 +msgid "Pages Sidebar Layout" +msgstr "" + +#: template-parts/content-page.php:17 template-parts/content-single.php:52 +msgid "Pages:" +msgstr "" + +#: inc/tgm/class-tgm-plugin-activation.php:397 +msgid "Please contact the administrator of this site for help." +msgstr "" + +#: inc/tgm/class-tgm-plugin-activation.php:934 +#: inc/tgm/class-tgm-plugin-activation.php:937 +msgid "" +"Please contact the plugin provider and ask them to package their plugin " +"according to the WordPress guidelines." +msgstr "" + +#: inc/tgm/class-tgm-plugin-activation.php:2547 +msgid "Plugin" +msgstr "" + +#: inc/tgm/class-tgm-plugin-activation.php:1121 +#: inc/tgm/class-tgm-plugin-activation.php:2948 +msgctxt "plugin A *and* plugin B" +msgid "and" +msgstr "" + +#: inc/tgm/class-tgm-plugin-activation.php:387 +#: inc/tgm/class-tgm-plugin-activation.php:3159 +msgid "Plugin activated successfully." +msgstr "" + +#: inc/tgm/class-tgm-plugin-activation.php:3158 +msgid "Plugin activation failed." +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:873 +msgid "Plugin installed successfully" +msgstr "" + +#. 1: plugin name. +#: inc/tgm/class-tgm-plugin-activation.php:392 +#, php-format +msgid "" +"Plugin not activated. A higher version of %s is needed for this theme. " +"Please update the plugin." +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:792 +msgid "Plugin Successfully Activated." +msgstr "" + +#. 1: number of plugins. +#: inc/tgm/class-tgm-plugin-activation.php:2388 +#, php-format +msgctxt "plugins" +msgid "All (%s)" +msgid_plural "All (%s)" +msgstr[0] "" +msgstr[1] "" + +#. If there are characters in your language that are not supported +#. by Poppins, translate this to 'off'. Do not translate into your own language. +#: inc/template-functions.php:96 +msgctxt "Poppins font: on or off" +msgid "on" +msgstr "" + +#: inc/widgets/mt-latest-posts.php:52 +msgid "Post Count" +msgstr "" + +#: inc/customizer/mt-customizer-design-panel-options.php:297 +msgid "Post count" +msgstr "" + +#: inc/widgets/mt-latest-posts.php:41 +msgid "Post Order" +msgstr "" + +#: inc/customizer/mt-customizer-design-panel-options.php:131 +msgid "Post Settings" +msgstr "" + +#: inc/customizer/mt-customizer-design-panel-options.php:150 +msgid "Posts Sidebar Layout" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:514 +msgid "Pre Loaders Layouts" +msgstr "" + +#: inc/tgm/class-tgm-plugin-activation.php:2298 +msgid "Pre-Packaged" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:298 +msgid "Premium version" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:504 +msgid "Price" +msgstr "" + +#: functions.php:54 +msgid "Primary" +msgstr "" + +#: inc/customizer/mt-customizer-general-panel-options.php:117 +msgid "Primary Color" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:165 +msgid "Processing" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:389 +msgid "Purchase Now" +msgstr "" + +#: inc/widgets/mt-latest-posts.php:46 +msgid "Random Order" +msgstr "" + +#: inc/customizer/mt-customizer-front-panel-options.php:179 +msgid "Random Posts" +msgstr "" + +#: inc/customizer/mt-customizer-design-panel-options.php:94 +msgid "Read More Button" +msgstr "" + +#. 1: link to WP admin new post page. +#: template-parts/content-none.php:23 +#, php-format +msgid "" +"Ready to publish your first post? Get started here." +msgstr "" + +#: inc/tgm/class-tgm-plugin-activation.php:2276 +msgid "Recommended" +msgstr "" + +#: template-parts/related/related-posts.php:20 +msgid "Related Posts" +msgstr "" + +#: inc/customizer/mt-customizer-custom-classes.php:334 +#: inc/widgets/mt-widget-fields.php:126 +msgid "Remove" +msgstr "" + +#: inc/tgm/class-tgm-plugin-activation.php:2273 +msgid "Required" +msgstr "" + +#: inc/tgm/class-tgm-plugin-activation.php:2327 +msgid "Required Update not Available" +msgstr "" + +#: inc/tgm/class-tgm-plugin-activation.php:2330 +msgid "Requires Update" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:317 +msgid "Return to Dashboard → Updates" +msgstr "" + +#: inc/tgm/class-tgm-plugin-activation.php:385 +msgid "Return to Required Plugins Installer" +msgstr "" + +#: inc/tgm/class-tgm-plugin-activation.php:386 +#: inc/tgm/class-tgm-plugin-activation.php:827 +#: inc/tgm/class-tgm-plugin-activation.php:2533 +#: inc/tgm/class-tgm-plugin-activation.php:3580 +msgid "Return to the Dashboard" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:317 +msgid "Return to Updates" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:304 +msgid "Review theme" +msgstr "" + +#: inc/metaboxes/mt-post-sidebar-meta.php:55 +msgid "Right sidebar" +msgstr "" + +#: inc/hooks/mt-custom-hooks.php:138 +msgid "Search" +msgstr "" + +#: inc/hooks/mt-custom-hooks.php:317 +#, php-format +msgid "Search Results for: %s" +msgstr "" + +#. %s is the search query. +#: inc/mt-class-breadcrumbs.php:270 +#, php-format +msgid "Search results for: %s" +msgstr "" + +#: inc/customizer/mt-customizer-design-panel-options.php:276 +msgid "Section Title" +msgstr "" + +#: inc/widgets/mt-author-info.php:46 +msgid "Select Author" +msgstr "" + +#: inc/template-functions.php:304 +msgid "Select Category" +msgstr "" + +#: inc/customizer/mt-customizer-custom-classes.php:333 +#: inc/widgets/mt-widget-fields.php:127 +msgid "Select Image" +msgstr "" + +#: inc/widgets/mt-author-info.php:19 +msgid "Select the user to display the author info." +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:265 +msgid "Set site logo" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:43 +msgid "Settings" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:268 +msgid "Setup site layout" +msgstr "" + +#: inc/tgm/class-tgm-plugin-activation.php:3509 +#: inc/tgm/class-tgm-plugin-activation.php:3517 +msgid "Show Details" +msgstr "" + +#: inc/customizer/mt-customizer-header-panel-options.php:95 +msgid "Show/Hide Hash Icon before tag." +msgstr "" + +#: inc/customizer/mt-customizer-design-panel-options.php:117 +msgid "Show/Hide title prefix in archive pages." +msgstr "" + +#: inc/customizer/mt-customizer-header-panel-options.php:46 +msgid "Show/Hide top header section." +msgstr "" + +#: inc/widgets/mt-widget-functions.php:21 +msgid "Sidebar" +msgstr "" + +#: inc/metaboxes/mt-post-sidebar-meta.php:17 +#: inc/metaboxes/mt-post-sidebar-meta.php:26 +msgid "Sidebar Layout" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:274 +msgid "Single page sidebar layouts" +msgstr "" + +#: inc/customizer/mt-customizer-general-panel-options.php:90 +msgid "Site Layout" +msgstr "" + +#: inc/customizer/mt-customizer-general-panel-options.php:25 +msgid "Site Settings" +msgstr "" + +#: header.php:47 +msgid "Skip To Content" +msgstr "" + +#: inc/customizer/mt-customizer-front-panel-options.php:68 +msgid "Slider category" +msgstr "" + +#: inc/customizer/mt-customizer-front-panel-options.php:92 +msgid "Slider Section Background Image" +msgstr "" + +#: inc/customizer/mt-customizer-front-panel-options.php:26 +msgid "Slider Settings" +msgstr "" + +#: inc/customizer/mt-customizer-additional-panel-options.php:64 +msgid "Social Icon" +msgstr "" + +#: inc/customizer/mt-customizer-additional-panel-options.php:21 +msgid "Social Icons" +msgstr "" + +#: inc/customizer/mt-customizer-additional-panel-options.php:69 +msgid "Social Link URL" +msgstr "" + +#: inc/customizer/mt-customizer-additional-panel-options.php:54 +msgid "Social Media" +msgstr "" + +#: inc/customizer/mt-customizer-additional-panel-options.php:58 +msgid "Social Media Icons" +msgstr "" + +#: inc/tgm/class-tgm-plugin-activation.php:333 +msgid "Something went wrong with the plugin API." +msgstr "" + +#: template-parts/content-none.php:34 +msgid "" +"Sorry, but nothing matched your search terms. Please try again with some " +"different keywords." +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:810 +msgid "Sorry, you are not allowed to install plugins on this site." +msgstr "" + +#: inc/tgm/class-tgm-plugin-activation.php:2548 +msgid "Source" +msgstr "" + +#: inc/tgm/class-tgm-plugin-activation.php:2554 +msgid "Status" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:631 +msgid "Sure" +msgstr "" + +#. 1: list of tags. +#: inc/template-tags.php:99 inc/template-tags.php:144 +#, php-format +msgid "Tagged %1$s" +msgstr "" + +#: inc/customizer/mt-customizer-header-panel-options.php:166 +msgid "Tags Count" +msgstr "" + +#: inc/customizer/mt-customizer-header-panel-options.php:139 +msgid "Tags Orderby" +msgstr "" + +#. %s: version number +#: inc/tgm/class-tgm-plugin-activation.php:1982 +#, php-format +msgid "TGMPA v%s" +msgstr "" + +#: inc/tgm/class-tgm-plugin-activation.php:346 +#, php-format +msgid "" +"The following plugin needs to be updated to its latest version to ensure " +"maximum compatibility with this theme: %1$s." +msgid_plural "" +"The following plugins need to be updated to their latest version to ensure " +"maximum compatibility with this theme: %1$s." +msgstr[0] "" +msgstr[1] "" + +#: inc/tgm/class-tgm-plugin-activation.php:388 +#: inc/tgm/class-tgm-plugin-activation.php:2952 +msgid "The following plugin was activated successfully:" +msgstr "" + +#: inc/tgm/class-tgm-plugin-activation.php:364 +#, php-format +msgid "The following recommended plugin is currently inactive: %1$s." +msgid_plural "The following recommended plugins are currently inactive: %1$s." +msgstr[0] "" +msgstr[1] "" + +#: inc/tgm/class-tgm-plugin-activation.php:358 +#, php-format +msgid "The following required plugin is currently inactive: %1$s." +msgid_plural "The following required plugins are currently inactive: %1$s." +msgstr[0] "" +msgstr[1] "" + +#: inc/tgm/class-tgm-plugin-activation.php:3507 +msgid "" +"The installation and activation process is starting. This process may take a " +"while on some hosts, so please be patient." +msgstr "" + +#. 1: plugin name. +#: inc/tgm/class-tgm-plugin-activation.php:3503 +#, php-format +msgid "The installation of %1$s failed." +msgstr "" + +#: inc/tgm/class-tgm-plugin-activation.php:3515 +msgid "" +"The installation process is starting. This process may take a while on some " +"hosts, so please be patient." +msgstr "" + +#: inc/tgm/class-tgm-plugin-activation.php:937 +msgid "" +"The remote plugin package consists of more than one file, but the files are " +"not packaged in a folder." +msgstr "" + +#: inc/tgm/class-tgm-plugin-activation.php:934 +msgid "" +"The remote plugin package does not contain a folder with the desired slug " +"and renaming did not work." +msgstr "" + +#. 1: Theme name, 2: Theme author. +#: inc/hooks/mt-custom-hooks.php:565 +#, php-format +msgid "Theme: %1$s by %2$s." +msgstr "" + +#: inc/tgm/class-tgm-plugin-activation.php:396 +msgid "" +"There are one or more required or recommended plugins to install, update or " +"activate." +msgstr "" + +#: inc/tgm/class-tgm-plugin-activation.php:352 +#, php-format +msgid "There is an update available for: %1$s." +msgid_plural "There are updates available for the following plugins: %1$s." +msgstr[0] "" +msgstr[1] "" + +#: inc/tgm/class-tgm-plugin-activation.php:522 +msgid "This plugin needs to be updated to be compatible with your theme." +msgstr "" + +#: inc/tgm/class-tgm-plugin-activation.php:340 +#, php-format +msgid "This theme recommends the following plugin: %1$s." +msgid_plural "This theme recommends the following plugins: %1$s." +msgstr[0] "" +msgstr[1] "" + +#: inc/tgm/class-tgm-plugin-activation.php:334 +#, php-format +msgid "This theme requires the following plugin: %1$s." +msgid_plural "This theme requires the following plugins: %1$s." +msgstr[0] "" +msgstr[1] "" + +#. 1: number of plugins. +#: inc/tgm/class-tgm-plugin-activation.php:2400 +#, php-format +msgid "To Activate (%s)" +msgid_plural "To Activate (%s)" +msgstr[0] "" +msgstr[1] "" + +#. 1: number of plugins. +#: inc/tgm/class-tgm-plugin-activation.php:2392 +#, php-format +msgid "To Install (%s)" +msgid_plural "To Install (%s)" +msgstr[0] "" +msgstr[1] "" + +#: functions.php:53 +msgid "Top Header" +msgstr "" + +#: inc/customizer/mt-customizer-header-panel-options.php:26 +msgid "Top Header Settings" +msgstr "" + +#: inc/customizer/mt-customizer-header-panel-options.php:117 +msgid "Trending Label" +msgstr "" + +#: inc/customizer/mt-customizer-header-panel-options.php:109 +#: inc/hooks/mt-top-header-hooks.php:50 +msgid "Trending Now" +msgstr "" + +#: inc/customizer/mt-customizer-header-panel-options.php:70 +msgid "Trending section shows the popular tags." +msgstr "" + +#: inc/tgm/class-tgm-plugin-activation.php:2549 +msgid "Type" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:544 +msgid "Typography Options" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:855 +msgid "Unable to connect to the filesystem. Please confirm your credentials." +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:201 +msgid "Unlock Features With Pro" +msgstr "" + +#: inc/tgm/class-tgm-plugin-activation.php:2723 +msgid "Update" +msgstr "" + +#. %2$s: plugin name in screen reader markup +#: inc/tgm/class-tgm-plugin-activation.php:2608 +#, php-format +msgid "Update %2$s" +msgstr "" + +#. 1: number of plugins. +#: inc/tgm/class-tgm-plugin-activation.php:2396 +#, php-format +msgid "Update Available (%s)" +msgid_plural "Update Available (%s)" +msgstr[0] "" +msgstr[1] "" + +#: inc/tgm/class-tgm-plugin-activation.php:2333 +msgid "Update recommended" +msgstr "" + +#: inc/tgm/class-tgm-plugin-activation.php:523 +msgid "Update Required" +msgstr "" + +#. 1: plugin name, 2: action number 3: total number of actions. +#: inc/tgm/class-tgm-plugin-activation.php:3498 +#, php-format +msgid "Updating Plugin %1$s (%2$d/%3$d)" +msgstr "" + +#. %s: plugin name. +#: inc/tgm/class-tgm-plugin-activation.php:332 +#, php-format +msgid "Updating Plugin: %s" +msgstr "" + +#: inc/tgm/class-tgm-plugin-activation.php:2684 +msgid "Upgrade message from the plugin author:" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:198 +msgid "Upgrade to Premium Version" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:199 +msgid "Upgrade to pro version for additional features and better supports." +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:493 +msgid "Upgrade to PRO version for more exciting features." +msgstr "" + +#: inc/widgets/mt-author-info.php:40 +msgid "User Name" +msgstr "" + +#: inc/tgm/class-tgm-plugin-activation.php:2553 +msgid "Version" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:191 +#, php-format +msgid "Version: %1$s" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:441 +msgid "View changelog below:" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:408 +msgid "View Demo" +msgstr "" + +#: template-parts/author/post-author-box.php:37 +msgid "Website" +msgstr "" + +#. Weekly archive title. %s is the week date format. +#: inc/mt-class-breadcrumbs.php:278 +#, php-format +msgid "Week %s" +msgstr "" + +#: inc/mt-class-breadcrumbs.php:818 +msgctxt "weekly archives date format" +msgid "W" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:157 +#, php-format +msgid "Welcome to %s" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:159 +#, php-format +msgid "" +"Welcome! Thank you for choosing %1$s ! To fully take advantage of the best " +"our theme can offer please make sure you visit our %2$s theme settings page " +"%3$s." +msgstr "" + +#: inc/customizer/mt-customizer-footer-panel-options.php:63 +msgid "Widget Area Layout" +msgstr "" + +#: inc/widgets/mt-author-info.php:34 inc/widgets/mt-latest-posts.php:35 +#: inc/widgets/mt-social-media.php:35 +msgid "Widget title" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:554 +msgid "WooCommerce Plugin Compatible" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:534 +msgid "WordPress Page Builder Compatible" +msgstr "" + +#: inc/tgm/class-tgm-plugin-activation.php:2292 +msgid "WordPress Repository" +msgstr "" + +#: inc/tgm/mt-recommend-plugins.php:64 +msgid "WP Blog Post Layouts" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:307 +msgid "WP Tutorials" +msgstr "" + +#: inc/mt-class-breadcrumbs.php:788 inc/mt-class-breadcrumbs.php:817 +#: inc/mt-class-breadcrumbs.php:844 inc/mt-class-breadcrumbs.php:871 +#: inc/mt-class-breadcrumbs.php:1211 +msgctxt "yearly archives date format" +msgid "Y" +msgstr "" + +#: inc/theme-settings/mt-theme-settings.php:745 +msgid "You can import available demos now!" +msgstr "" + +#: 404.php:39 inc/customizer/mt-customizer-design-panel-options.php:268 +msgid "You May Like" +msgstr "" diff --git a/languages/readme.txt b/languages/readme.txt new file mode 100644 index 0000000..4b1570f --- /dev/null +++ b/languages/readme.txt @@ -0,0 +1,7 @@ +Place your theme language files in this directory. + +Please visit the following links to learn more about translating WordPress themes: + +https://make.wordpress.org/polyglots/teams/ +https://developer.wordpress.org/themes/functionality/localization/ +https://developer.wordpress.org/reference/functions/load_theme_textdomain/ diff --git a/page.php b/page.php new file mode 100644 index 0000000..cc1dc02 --- /dev/null +++ b/page.php @@ -0,0 +1,37 @@ + +
          +
          +
          + +
          +
          + +
          +ul, li>ol{ + margin-right: 15px; +} + +textarea{ + padding-right: 3px; +} + +.screen-reader-text:hover, .screen-reader-text:active, .screen-reader-text:focus{ + right: 5px; +} + +.alignleft{ + float: right; + margin-left: 15px; +} + +.alignright{ + float: left; + margin-right: 15px; +} + +.posted-on a { + margin-left: 46px; + margin-right: auto; +} + +.posted-on a::before { + left: -86px; + right: auto; +} + +.comments-link{ + float: left; +} + +.edit-link .post-edit-link:before{ + margin-left: 5px; +} + +article.hentry .entry-footer>span{ + margin-left: 15px; +} + + +.nav-links .nav-next{ + text-align: right; +} + +.nav-links .nav-previous{ + text-align: left; +} + +.nav-links .nav-previous a:before{ + margin-left: 5px; +} + +.nav-links .nav-next a:after{ + margin-right: 5px; +} + +.entry-thumbnail{ + float: right; +} + +.entry-exrecpt{ + float: left; +} + +.short-content+.bttn{ + float: left; +} + +.gallery{ + margin-right: -2%; +} + +.comment-form-cookies-consent label{ + margin-right: 14px; +} + +.comments-area ol.children{ + margin: 0 15px 0 0 ; +} + +.comment-list .comment-body{ + text-align: right; +} + +.comment-author img{ + margin-left: 15px; +} + +.widget_meta a::before, +.widget_nav_menu li a::before { + content: "\f104"; +} + +.comment-metadata{ + padding-right: 50px; +} + +.comment-content{ + padding-right: 50px; +} + +.commentmetadata{ + float: left; +} + +.reply .comment-reply-link{ + background: none repeat scroll right 0 #dd3333; +} + +#cancel-comment-reply-link:before{ + margin: 0 20px 0 5px ; +} + +.mt-column-wrapper{ + margin-right: -3%; +} + +.mt-column-1{ + margin-left: -4px; + margin-right: 3%; +} + +.mt-column-2{ + margin-left: -4px; + margin-right: 3%; +} + +.mt-column-3{ + margin-left: -4px; + margin-right: 3%; +} + +.mt-column-4{ + margin-left: -4px; + margin-right: 3%; +} + +.mt-column-5{ + margin-left: -4px; + margin-right: 3%; +} + +.widget_archive a, .widget_categories a, .widget_recent_entries a, .widget_meta a, .widget_recent_comments li, .widget_rss li, .widget_pages li a, .widget_nav_menu li a{ + padding-right: 22px; +} + +.widget_archive a::before, .widget_categories a::before, .widget_recent_entries a::before, .widget_meta a::before, .widget_recent_comments li::before, .widget_rss li:before, .widget_pages li a:before, .widget_nav_menu li a:before{ + right: 0; +} + +.widget_search .search-field{ + float: right; +} + +.widget_recent_entries .post-date{ + padding-right: 24px; +} + +.widget_nav_menu .sub-menu{ + margin: 10px 10px 0 0 ; +} + +#primary, .home.blog #primary{ + float: right; +} + +#secondary, .home.blog #secondary{ + float: left; +} + +.left-sidebar #primary, .home.left-sidebar #primary{ + float: left; +} + +.left-sidebar #secondary, .home.left-sidebar #secondary{ + float: right; +} + +body.site-layout--boxed{ + background: #f4f4f4 none repeat scroll right 0; +} + +#page{ + background: #fff none repeat scroll right 0; +} + +.trending-wrapper{ + float: right; +} + +.wrap-label{ + float: right; + margin-left: 20px; +} + +.wrap-label i{ + margin-left: 5px; +} + +.tags-wrapper{ + float: right; +} + +.tags-wrapper a{ + margin-left: 16px; +} + +.trending-wrapper.tag-before-icon .tags-wrapper a::before{ + margin-left: 2px; +} + +.top-header-nav{ + float: left; +} + +#top-navigation ul li{ + margin: 0 12px 0 0 ; +} + +.header-widget-wrapper{ + float: left; +} + +.mt-header-social-wrapper, .mt-header-extra-icons{ + float: right; +} + +.mt-social-icon-wrap{ + float: left; +} + +.mt-social-icon-wrap li{ + margin-left: 12px; +} + +.site-branding{ + float: right; +} + +#site-navigation{ + float: right; + margin-left: 20px; +} + +.mt-social-search-wrapper{ + float: left; +} + +.mt-social-wrapper{ + float: right; +} + +.mt-follow-title{ + margin-left: 10px; +} + +.mt-menu-search{ + float: left; +} + +.mt-search-icon{ + margin: 15px 40px 15px 0 ; +} + +.mt-search-icon i{ + margin-right: 5px; +} + +.mt-menu-search .mt-form-wrap{ + right: 0; +} + +.mt-menu-search .mt-form-wrap .search-form{ + right: 50%; + margin-right: -50%; +} + +.mt-form-close{ + left: 40px; +} + +.menu-toggle{ + float: right; +} + +.menu-toggle i{ + margin-left: 7px; +} + +#site-navigation ul#primary-menu > li:first-child a{ + padding-right: 0; +} + +#site-navigation ul#primary-menu > li:first-child ul a{ + padding-right: 30px; +} + +#site-navigation ul li a::after{ + left: 0; +} + +#site-navigation ul li .sub-menu, #site-navigation ul li .children{ + text-align: right; + right: 0; +} + +#site-navigation ul li .sub-menu ul, #site-navigation ul li .children ul{ + right: 100%; +} + +#site-navigation ul li .sub-menu li a, #site-navigation ul li .children li a{ + border-left: none; +} + +#site-navigation .menu-item-description { + left: -20px; + right: auto; +} + +#site-navigation .menu-item-description::after{ + right: 0; + border-width: 3px 0 0 3px ; + border-color: #dd3333 transparent transparent transparent ; +} + +.front-slider-block{ + float: right; +} + +.top-featured-post-main-wrapper{ + float: left; +} + +.post-info-wrap{ + background: linear-gradient(to bottom,rgba(0,0,0,0) 100% 100%); + padding: 140px 30px 20px 30px ; + direction: rtl; +} + +.front-slider-block .posted-on a::before{ + left: -86px; + right: auto; +} + +.slider-post-wrap .post-thumbnail > a{ + right: 0; +} + +.post-categories li{ + margin-left: 5px; +} + +.post-cats-list a{ + margin-left: 5px; +} + +.front-slider-block .lSAction{ + left: 20px; +} + +.front-slider-block .lSAction > a{ + background: rgba(0, 0, 0, 0.7) none repeat scroll right 0; +} + +.features-post-title{ + padding-right: 40px; +} + +.top-featured-post-wrap .post-thumbnail{ + float: right; +} + +.top-featured-post-wrap .mt-post-content{ + float: left; +} + +.top-featured-post-wrap .post-thumbnail .post-number{ + right: 0; +} + +.entry-footer .mt-readmore-btn i, .btn-wrapper a i , .mt-readmore-btn i{ + margin-right: 5px; + -webkit-transform: rotate(180deg); + -ms-transform: rotate(180deg); + -o-transform: rotate(180deg); + transform: rotate(180deg); +} + +.entry-footer .mt-readmore-btn:hover i, .btn-wrapper a:hover i, .mt-readmore-btn:hover i{ + margin-right: 10px; +} + +article.sticky::before{ + right: 20px; +} + +.widget_recent_entries a::before { + content: "\f100"; +} + +.archive-grid-post-wrapper, .mt-archive--masonry-style .sophia-after-dark-content-masonry{ + margin-right: -3%; +} + +.mt-archive--block-grid-style article, .mt-archive--masonry-style #mt-masonry article{ + margin-right: 3%; + margin-left: -4px; +} + +.mt-archive--masonry-style #mt-masonry article{ + margin-left: 0; +} + +#secondary .widget .widget-title, .mt-related-post-title, #colophon .widget .widget-title{ + padding-right: 35px; +} + +#secondary .widget .widget-title::before, .mt-related-post-title:before, #colophon .widget .widget-title:before, .features-post-title:before{ + right: 0; +} + +.mt-author-box{ + text-align: right; +} + +.single .mt-author-box .mt-author__avatar{ + float: right; + margin-left: 2%; +} + +.single .mt-author-box .mt-author-info{ + float: right; +} + +.error-404.not-found{ + padding: 30px 0 40px 0 ; +} + +.error-num span{ + margin-right: 10px; +} + +.error404 .section-title{ + margin-right: 3%; +} + +.breadcrumbs .trail-items li::after { + content: "\f100"; +} + +.breadcrumbs .trail-items li::after{ + left: -10px; +} + +#top-footer .mt-footer-widget-wrapper{ + margin-right: -3%; +} + +#top-footer.footer-column-one .mt-footer-widget, #top-footer.footer-column-two .mt-footer-widget, #top-footer.footer-column-three .mt-footer-widget, #top-footer.footer-column-four .mt-footer-widget{ + margin-right: 3%; + margin-left: -4px; +} + +#footer-navigation{ + float: left; +} + +#footer-menu li a{ + border-right: 1px solid #e1e1e1; +} + +.site-info{ + float: right; +} + +.sophia_after_dark_latest_posts .mt-single-post-wrap > a{ + float: right; +} + +.sophia_after_dark_latest_posts .mt-post-content{ + float: left; +} + +.mt-related-posts-wrapper{ + margin-right: -3%; +} + +.mt-related-posts-wrapper article{ + margin-right: 3%; + margin-left: -4px; +} + +#mt-scrollup{ + left: 40px; + margin-left: 0; +} + +#mt-scrollup::before{ + left: -36px; + padding: 3px 6px 2px 4px ; +} + +.search-no-results #primary input, .search-no-results #primary input[type="text"]:focus, .search-no-results #primary input[type="email"]:focus, .search-no-results #primary input[type="url"]:focus, .search-no-results #primary input[type="password"]:focus, .search-no-results #primary input[type="search"]:focus, .search-no-results #primary textarea:focus{ + border-right: 0px; + border-left: 0px; +} + diff --git a/screenshot.png b/screenshot.png new file mode 100644 index 0000000..f1ad755 --- /dev/null +++ b/screenshot.png @@ -0,0 +1 @@ +‰PNG diff --git a/search.php b/search.php new file mode 100644 index 0000000..3208057 --- /dev/null +++ b/search.php @@ -0,0 +1,58 @@ + +
          +
          +
          + '; + } + if ( have_posts() ) : + if ( 'mt-archive--masonry-style' === $archive_style ) { + ?> +
          +
          + +
          +
          + '; + } + ?> +
          +
          + +
          + + + \ No newline at end of file diff --git a/sidebar.php b/sidebar.php new file mode 100644 index 0000000..ebda445 --- /dev/null +++ b/sidebar.php @@ -0,0 +1,17 @@ + + \ No newline at end of file diff --git a/single.php b/single.php new file mode 100644 index 0000000..26a4adb --- /dev/null +++ b/single.php @@ -0,0 +1,40 @@ + +
          +
          +
          + +
          +
          + +
          +ul, +li>ol { + margin-bottom: 0; + margin-left: 15px; +} + +dt { + font-weight: bold; +} + +dd { + margin: 0 15px 15px; +} + +img { + height: auto; + /* Make sure images are scaled correctly. */ + max-width: 100%; + /* Adhere to container width. */ + vertical-align: middle; +} + +figure { + margin: 0; +} + +table { + margin: 0 0 15px; + width: 100%; + border-collapse: collapse; +} + +th { + font-weight: bold; + border: 1px solid #CCC; + padding: 5px 10px; +} + +td { + border: 1px solid #CCC; + padding: 5px 10px; +} + + + +/*-------------------------------------------------------------- +Forms +--------------------------------------------------------------*/ + +button, +input, +select, +textarea { + font-size: 100%; + /* Corrects font size not being inherited in all browsers */ + margin: 0; + /* Addresses margins set differently in IE6/7, F3/4, S5, Chrome */ + vertical-align: middle; +} + +.navigation .nav-links a, +.bttn, +button, +input[type="button"], +input[type="reset"], +input[type="submit"] { + color: #D1D1D1; + cursor: pointer; + font-size: 14px; + line-height: 13px; + border: none; + padding: 14px 25px; + font-weight: 400; + display: inline-block; + position: relative; + text-shadow: none; + border: 1px solid #e1e1e1; + background: none; +} + +.navigation .nav-links a:hover, +.bttn:hover, +button, +input[type="button"]:hover, +input[type="reset"]:hover, +input[type="submit"]:hover { + color: #666; + border-color: #666; +} + +input[type="checkbox"], +input[type="radio"] { + padding: 0; +} + +button::-moz-focus-inner, +input::-moz-focus-inner { + /* Corrects inner padding and border displayed oddly in FF3/4 www.sitepen.com/blog/2008/05/14/the-devils-in-the-details-fixing-dojos-toolbar-buttons/ */ + border: 0; + padding: 0; +} + +input[type="text"], +input[type="email"], +input[type="url"], +input[type="password"], +input[type="search"] { + color: #666; + border: 1px solid #ccc; + height: 36px; + width: 100%; + -webkit-appearance: none; +} + +input[type="text"]:focus, +input[type="email"]:focus, +input[type="url"]:focus, +input[type="password"]:focus, +input[type="search"]:focus, +textarea:focus { + border: 1px solid #AAA; +} + +.searchform input[type="text"]:focus { + border: none; +} + +input[type="text"], +input[type="email"], +input[type="url"], +input[type="password"], +input[type="search"] { + padding: 3px 6px; +} + +textarea { + overflow: auto; + /* Removes default vertical scrollbar in IE6/7/8/9 */ + padding-left: 3px; + vertical-align: top; + /* Improves readability and alignment in all browsers */ + color: #666; + border: 1px solid #ccc; + height: 160px; + max-width: 100%; + width: 100%; +} + +/*-------------------------------------------------------------- +Links +--------------------------------------------------------------*/ + +a { + color: #dd3333; + text-decoration: none; + transition: all 0.3s ease-in-out; + -webkit-transition: all 0.3s ease-in-out; + -moz-transition: all 0.3s ease-in-out; +} + +a:visited {} + +a:hover, +a:focus, +a:active { + color: #dd3333; +} + +a:focus { + outline: thin dotted; +} + +/*-------------------------------------------------------------- +Accessibility +--------------------------------------------------------------*/ + + +/* Text meant only for screen readers */ + +.screen-reader-text { + clip: rect(1px, 1px, 1px, 1px); + position: absolute !important; +} + +.screen-reader-text:hover, +.screen-reader-text:active, +.screen-reader-text:focus { + background-color: #f1f1f1; + border-radius: 3px; + box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6); + clip: auto !important; + color: #21759b; + display: block; + font-size: 14px; + font-weight: bold; + height: auto; + left: 5px; + line-height: normal; + padding: 15px 23px 14px; + text-decoration: none; + top: 5px; + width: auto; + z-index: 100000; + /* Above WP toolbar */ +} + + + +/*-------------------------------------------------------------- +Alignments +--------------------------------------------------------------*/ + +.alignleft { + display: inline; + float: left; + margin-right: 15px; +} + +.alignright { + display: inline; + float: right; + margin-left: 15px; +} + +.aligncenter { + clear: both; + display: block; + margin: 0 auto; +} + + + +/*-------------------------------------------------------------- +Clearings +--------------------------------------------------------------*/ + +.mt-clearfix:before, +.mt-clearfix:after, +.row:before, +.row:after, +.entry-content:before, +.entry-content:after, +.comment-content:before, +.comment-content:after, +.site-header:before, +.site-header:after, +.site-content:before, +.site-content:after, +.site-footer:before, +.site-footer:after, +.mt-container:after, +.mt-container:before { + content: ''; + display: table; +} + +.mt-clearfix:after, +.row:after, +.entry-content:after, +.comment-content:after, +.site-header:after, +.site-content:after, +.site-footer:after, +.mt-container:after { + clear: both; +} + +.clear { + clear: both; +} + +/*-------------------------------------------------------------- +9.0 Widgets +--------------------------------------------------------------*/ + +.widget-area .widget { + margin: 0 0 40px; +} + +/* Make sure select elements fit in widgets */ + +.widget-area .widget select { + max-width: 100%; +} + +.footer-widgets-wrapper .mt-social-icon-wrap, +.widget-area .mt-social-icon-wrap { + float: none; +} + +.mt-social-icons-wrapper { + overflow: auto; +} + +/*-------------------------------------------------------------- +Posts and pages +--------------------------------------------------------------*/ + +.sticky { + display: block; +} + +h1.entry-title { + color: #353535; + font-weight: 700; + padding-bottom: 0; + text-transform: capitalize; +} + +h1.entry-title a { + color: #3d3d3d; +} + +.hentry { + margin: 0 0 15px; +} + +.single .byline, +.group-blog .byline, +.posted-on, +.blog-author, +.blog-cat { + display: inline; + font-family: 'Poppins', sans-serif; + font-size: 14px; + font-weight: 300; +} + +.entry-cat a { + font-size: 13px; +} + +.posted-on a { + position: relative; + margin-right: 46px; + color: #dfdfdf; +} + +.posted-on a::before { + content: ""; + width: 30px; + height: 1px; + background: #dfdfdf; + position: absolute; + top: 10px; + right: -40px; +} + +.entry-cat .cat-links a, +.entry-meta a { + color: #dfdfdf; +} + +.byline a { + color: #dfdfdf; +} + +.entry-cat .cat-links a:hover, +.entry-cat a:hover, +.byline a:hover, +.posted-on a:hover { + color: #dd3333; +} + +.cat-links { + display: inline-block; +} + +.comments-link { + float: right; +} + +.page-content, +.entry-content, +.entry-summary { + margin: 15px 0 0; +} + +.page-links { + clear: both; + margin: 0 0 15px; +} + +.edit-link .post-edit-link { + background: #dd3333; + padding: 4px 10px; + color: #FFF !important; + line-height: 1; + border-radius: 3px; + font-size: 13px; +} + +.edit-link .post-edit-link:before { + content: "\f044"; + font-family: ForkAwesome; + margin-right: 5px; +} + +#blog-post article.hentry, +.search article.hentry, +.archive article.hentry, +.tag article.hentry, +.category article.hentry, +.blog article.hentry { + margin-bottom: 40px; +} + +.blog article.hentry:first-child { + margin-top: 30px; +} + +article.hentry .edit-link { + display: block; + margin-top: 20px; +} + +article.hentry .entry-footer>span { + color: #999; + font-size: 13px; + margin-right: 15px; +} + +.page-header .page-title { + color: #ffffff; + padding-bottom: 15px; +} + +.updated { + display: none; +} + +.published.updated { + display: inline; +} + +.entry-footer a { + color: #999; +} + +.entry-footer a:hover { + color: #dd3333 +} + +.nav-links .meta-nav { + display: none; +} + +.nav-links::after { + content: ""; + display: block; + clear: both; +} + +.nav-links .nav-previous, +.nav-links .nav-next { + width: 50%; + float: left; +} + +.nav-links .nav-next { + text-align: right; +} + +.nav-links .nav-previous a:before { + content: "\f0d9"; + font-family: ForkAwesome; + font-style: normal; + margin-right: 5px; +} + +.nav-links .nav-next a:after { + content: "\f0da"; + font-family: ForkAwesome; + font-style: normal; + margin-left: 5px; +} + +.entry-thumbnail { + width: 38%; + float: left; +} + +.entry-exrecpt { + width: 60%; + float: right; +} + +.short-content { + margin-bottom: 10px; +} + +.short-content+.bttn { + float: right; +} + +.full-width { + float: none; + width: 100%; +} + + +/*-------------------------------------------------------------- +Galleries +--------------------------------------------------------------*/ + +.gallery { + margin-bottom: 1.5em; + margin-left: -2%; +} + +#top-footer .gallery { + margin-bottom: 0; +} + +.gallery-item { + display: inline-block; + text-align: center; + vertical-align: top; + width: 100%; + margin-bottom: 3%; + margin-left: 2%; +} + +.site-main .gallery a img { + max-width: none; + width: 100%; +} + +.gallery-columns-2 .gallery-item { + max-width: 47%; +} + +.gallery-columns-3 .gallery-item { + max-width: 31.33%; +} + +.gallery-columns-4 .gallery-item { + max-width: 23%; +} + +.gallery-columns-5 .gallery-item { + max-width: 18%; +} + +.gallery-columns-6 .gallery-item { + max-width: 14.66%; +} + +.gallery-columns-7 .gallery-item { + max-width: 12.28%; +} + +.gallery-columns-8 .gallery-item { + max-width: 10.5%; +} + +.gallery-columns-9 .gallery-item { + max-width: 9.11%; +} + +.gallery-caption { + display: block; +} + +/*-------------------------------------------------------------- +Comments +--------------------------------------------------------------*/ + +#comments { + margin-top: 30px; +} + +.comment-content a { + word-wrap: break-word; +} + +.bypostauthor { + display: block; +} + +#comments h2.comments-title { + color: #ffffff; + display: inline-block; + font-size: 22px; + font-style: normal; + font-weight: 700; + margin: 15px 0; + padding: 8px 15px; +} + +#comments h3 { + margin: 0 0 10px; + color: #141414; + font-weight: 600; + display: inline-block; + line-height: 22px; + font-size: 18px; +} + +#commentform label { + display: inline-block; +} + +textarea#comment { + width: 100%; + height: 150px; +} + +.comment-form-cookies-consent label { + margin-left: 14px; +} + +/*Comment Lists*/ + +.comments-area ol { + margin: 0; + padding: 0; + list-style: none; +} + +.comments-area ol.children { + margin: 0 0 0 15px; +} + +.comment-list .comment-body { + padding: 20px; + margin-bottom: 20px; + background: none; + border: 1px solid #e1e1e1; + text-align: left; +} + +.comment-author img { + vertical-align: text-top; + margin-right: 15px; + border: 1px solid #e1e1e1; + padding: 3px; +} + +.comment-author { + float: none; +} + +.comment-metadata { + font-size: 12px; + margin-top: -12px; + padding-left: 50px; +} + +.comment-content { + margin-top: 10px; + padding-left: 50px; +} + +.comment-author .fn { + font-style: normal; + font-size: 16px; + text-transform: capitalize; + font-weight: bold; +} + +.comment-author .fn .url { + color: #ffffff; + padding: 0; + font-size: 16px; +} + +.comment-author .fn .url:hover { + color: #dd3333; +} + +.comment-author .says { + display: none; +} + +.commentmetadata { + float: right; + font-weight: normal; + font-size: 12px; + font-style: italic; + font-weight: 300; +} + +.comment-metadata a { + color: #969696; +} + +.commentmetadata .comment-edit-link { + color: #dd3333; +} + +.commentmetadata+.clear { + margin-bottom: 20px; +} + +.reply .comment-reply-link { + background: none repeat scroll 0 0 #dd3333; + color: #FFFFFF; + font-size: 12px; + line-height: 20px; + padding: 2px 10px; + display: inline-block; +} + +#respond { + padding: 20px; + margin: 20px 0 0; + color: #ffffff; + border: 1px solid rgba(255, 255, 255, 0.5); +} + +#commentform .form-submit { + margin-bottom: 0; +} + +#cancel-comment-reply-link { + font-style: italic; + color: #dd3333; +} + +#cancel-comment-reply-link:before { + font-family: ForkAwesome; + content: "\f057"; + margin: 0 5px 0 20px; + font-style: normal; + color: #dd3333; +} + +.logged-in-as a { + color: #dd3333; +} + + +/*-------------------------------------------------------------- +Infinite scroll +--------------------------------------------------------------*/ + + +/* Globally hidden elements when Infinite Scroll is supported and in use. */ + +.infinite-scroll .paging-navigation, + + + + +/* Older / Newer Posts Navigation (always hidden) */ + +.infinite-scroll.neverending .site-footer { + /* Theme Footer (when set to scrolling) */ + display: none; +} + + + +/* When Infinite Scroll has reached its end we need to re-display elements that were hidden (via .neverending) before */ + +.infinity-end.neverending .site-footer { + display: block; +} + +#infinite-footer { + display: none; +} + + +/*-------------------------------------------------------------- +Media +--------------------------------------------------------------*/ + +.page-content img.wp-smiley, +.entry-content img.wp-smiley, +.comment-content img.wp-smiley { + border: none; + margin-bottom: 0; + margin-top: 0; + padding: 0; +} + +.wp-caption { + border: 1px solid #ccc; + margin-bottom: 15px; + max-width: 100%; +} + +.wp-caption img[class*="wp-image-"] { + display: block; + margin: 1.2% auto 0; + max-width: 98%; +} + +.wp-caption-text { + text-align: center; +} + +.wp-caption .wp-caption-text { + margin: 10px 0; +} + +.site-main .gallery { + margin-bottom: 1.5em; +} + +.gallery-caption {} + +.site-main .gallery a img { + border: none; + height: auto; + max-width: 90%; +} + +.site-main .gallery dd, +.site-main .gallery figcaption { + margin: 0; +} + +.site-main .gallery-columns-4 .gallery-item {} + +.site-main .gallery-columns-4 .gallery-item img {} + + + +/* Make sure embeds and iframes fit their containers */ + +embed, +iframe, +object { + max-width: 100%; +} + + +/*-------------------------------------------------------------- +Grid CSS +--------------------------------------------------------------*/ + +.mt-column-wrapper { + margin-left: -3%; + margin-bottom: -3%; +} + +.mt-column-1 { + display: inline-block; + margin-right: -4px; + vertical-align: top; + width: 97%; + margin-left: 3%; + margin-bottom: 3%; +} + +.mt-column-2 { + display: inline-block; + margin-right: -4px; + vertical-align: top; + width: 47%; + margin-left: 3%; + margin-bottom: 3%; +} + +.mt-column-3 { + display: inline-block; + margin-right: -4px; + vertical-align: top; + width: 30.33%; + margin-left: 3%; + margin-bottom: 3%; +} + +.mt-column-4 { + display: inline-block; + margin-right: -4px; + vertical-align: top; + width: 22%; + margin-left: 3%; + margin-bottom: 3%; +} + +.mt-column-5 { + display: inline-block; + margin-right: -4px; + vertical-align: top; + width: 17%; + margin-left: 3%; + margin-bottom: 3%; +} + +/*-------------------------------------------------------------- +Default widget css +--------------------------------------------------------------*/ + +.widget_archive ul, +.widget_categories ul, +.widget_recent_entries ul, +.widget_meta ul, +.widget_recent_comments ul, +.widget_rss ul, +.widget_pages ul, +.widget_nav_menu ul, +.wp-block-latest-posts, +.wp-block-archives, +.wp-block-categories, +.wp-block-page-list, +.wp-block-latest-comments { + list-style: outside none none; + margin: 0; +} + +.wp-block-page-list ul { + list-style: outside none none; +} + +.widget_archive li, +.widget_categories li, +.widget_recent_entries li, +.widget_meta li, +.widget_recent_comments li, +.widget_rss li, +.widget_pages li, +.widget_nav_menu li, +.wp-block-latest-posts li, +.wp-block-archives li, +.wp-block-categories li, +.wp-block-page-list li, +.wp-block-latest-comments li { + border-bottom: 1px solid rgba(255, 255, 255, 0.1); + margin-bottom: 5px; + padding-bottom: 5px; +} + +.widget_archive li:last-child, +.widget_categories li:last-child, +.widget_recent_entries li:last-child, +.widget_meta li:last-child, +.widget_recent_comments li:last-child, +.widget_rss li:last-child, +.widget_pages li:last-child, +.widget_nav_menu li:last-child, +.wp-block-latest-posts li:last-child, +.wp-block-archives li:last-child, +.wp-block-categories li:last-child, +.wp-block-page-list li:last-child, +.wp-block-latest-comments li:last-child { + border: none; + padding-bottom: 0; + margin-bottom: 0; +} + +.widget_archive a, +.widget_categories a, +.widget_recent_entries a, +.widget_meta a, +.widget_recent_comments li, +.widget_rss li, +.widget_pages li a, +.widget_nav_menu li a, +.wp-block-latest-posts li a, +.wp-block-archives li a, +.wp-block-categories li a, +.wp-block-page-list li a, +.wp-block-latest-comments li{ + color: #ffffff; + font-size: 14px; + line-height: 32px; + padding-left: 22px; + position: relative; + -webkit-transition: color 0.3s ease; + -moz-transition: color 0.3s ease; + -ms-transition: color 0.3s ease; + -o-transition: color 0.3s ease; + transition: color 0.3s ease; + display: inline-block; +} + +.widget a:hover, +.widget a:hover::before, +.widget li:hover::before { + color: #dd3333; +} + +.widget_archive a::before, +.widget_categories a::before, +.widget_recent_entries a::before, +.widget_meta a::before, +.widget_recent_comments li::before, +.widget_rss li:before, +.widget_pages li a:before, +.widget_nav_menu li a:before, +.wp-block-latest-posts li a:before, +.wp-block-archives li a:before, +.wp-block-categories li a:before, +.wp-block-page-list li a:before, +.wp-block-latest-comments li:before { + color: #afb4bd; + content: "\f187"; + font-family: "ForkAwesome"; + font-size: 14px; + left: 0; + position: absolute; + top: 0px; + -webkit-transition: color 0.3s ease; + -moz-transition: color 0.3s ease; + -ms-transition: color 0.3s ease; + -o-transition: color 0.3s ease; + transition: color 0.3s ease; +} + +.widget_categories a::before, +.wp-block-categories li a:before { + content: "\f07b"; +} + +.widget_recent_entries a::before, +.wp-block-latest-posts li a:before { + content: "\f101"; +} + +.widget_meta a::before, +.widget_nav_menu li a:before { + content: "\f105"; +} + +.widget_recent_comments li::before, +.wp-block-latest-comments li:before { + content: "\f086"; + top: 0; +} + +.widget_rss li::before { + content: "\f09e"; + top: 0; +} + +.widget_pages li a:before, +.wp-block-page-list li a:before { + content: "\f1ea"; + top: 0; +} + +.widget_search .search-field { + width: 75%; + float: left; +} + +.widget_search .search-submit { + height: 36px; + width: 25%; + background: #dd3333; + border-color: #dd3333; + color: #ffffff; +} + +.widget_recent_entries .post-date { + color: #8f8f8f; + display: block; + font-size: 11px; + margin-top: -5px; + padding-left: 24px; +} + +.widget_nav_menu .sub-menu { + margin: 10px 0 0 10px; +} + +.widget_nav_menu li::before { + top: 0; +} + +.widget_search::after { + clear: both; + content: ""; + display: table; +} + +.widget_search .search-field { + width: 75%; + float: left; +} + +.widget_search .search-submit, +.widget_search .search-submit:hover { + height: 36px; + width: 25%; + background: #dd3333; + border-color: #dd3333; + color: #ffffff; + padding: 0; +} + +.widget_tag_cloud .tagcloud a, +.widget_tag_cloud a { + color: #909090; + font-size: 14px !important; + border: 1px solid #cfcfcf; + padding: 1px 10px; + display: inline-block; + margin: 0 5px 10px 0; + border-radius: 2px; +} + +.widget_tag_cloud .tagcloud a:hover, +.widget.widget_tag_cloud a:hover { + background: #dd3333; + color: #fff; + border-color: #dd3333; +} + +.wp-block-search__button { + background: #f9f9f9; + border: none; + width: 80px; + margin: 0; + height: 36px; +} + +/*-------------------------------------------------------------- +Sidebar layout css +--------------------------------------------------------------*/ + +#primary, +.home.blog #primary { + float: left; + width: 70%; +} + +#secondary, +.home.blog #secondary { + float: right; + width: 27%; +} + +.home.page-template-template-home #primary, +.home.page-template-template-home #secondary, +.error404 #primary { + float: none; + width: 100%; +} + +.left-sidebar #primary, +.home.left-sidebar #primary { + float: right; +} + +.left-sidebar #secondary, +.home.left-sidebar #secondary { + float: left; +} + +.no-sidebar #primary, +.home.blog.no-sidebar #primary { + float: none; + width: 100%; + margin: 0 auto; +} + +.no-sidebar-center #primary, +.home.blog.no-sidebar-center #primary { + float: none; + width: 80%; + margin: 0 auto; +} + +.no-sidebar #secondary, +.no-sidebar-center #secondary { + display: none; +} + +.home.blog #content #primary article:first-child { + margin-top: 0; +} + +.widget .author, +.widget .posted-on a::before { + display: none; +} + +.no-thumbnail.sticky { + padding-top: 70px !important; +} + +/*-------------------------------------------------------------- +COMMON CSS +--------------------------------------------------------------*/ + +body { + font-weight: 400; + overflow: hidden; + position: relative; + font-family: 'Poppins', sans-serif; + line-height: 1.8; + background: #0B0B0B; +} + +.site-layout--boxed #page { + background-color: #0B0B0B; + margin: 0 auto; + width: 1360px; + -webkit-box-shadow: 0 0 75px 10px rgba(0, 0, 0, .75); + -moz-box-shadow: 0 0 75px 10px rgba(0, 0, 0, .75); + box-shadow: 0 0 75px 10px rgba(0, 0, 0, .75); +} + +body.site-layout--boxed { + background: #000000 none repeat scroll 0 0; +} + +.author-name { + font-size: 20px; + text-align: center; + font-size: 400; + margin-top: 10px; + margin-bottom: 4px; +} + +.author-description { + text-align: center; +} + +.widget .author-social .mt-social-icon-wrap { + float: none; + text-align: center; +} + +#page { + background: #0B0B0B none repeat scroll 0 0; +} + +.mt-container { + width: 1320px; + margin: 0 auto; +} + +.mt-hide { + display: none; +} + +/*-------------------------------------------------------------- +Header CSS +--------------------------------------------------------------*/ + +#top-header { + background: #212121; +} + +.trending-wrapper { + float: left; +} + +.wrap-label { + float: left; + background: #333; + padding: 6px 20px; + color: #fff; + margin-right: 20px; + display: inline-block; + font-weight: 700; +} + +.wrap-label i { + color: #ffd600; + margin-right: 5px; + font-size: 18px; +} + +.tags-wrapper { + float: left; + margin: 7px 0; +} + +.tags-wrapper a { + font-weight: 700; + color: #fff; + margin-right: 16px; + font-size: 13px; +} + +.trending-wrapper.tag-before-icon .tags-wrapper a::before { + content: "#"; + margin-right: 2px; +} + +.top-header-nav { + float: right; + margin: 6px 0; +} + +#top-navigation ul { + list-style: none; + margin: 0; + padding: 0; +} + +#top-navigation ul li { + display: inline-block; + margin: 0 0 0 12px; +} + +#top-navigation ul ul { + display: none; +} + +#top-navigation ul li a { + color: #fff; + font-size: 13px; + display: block; + font-weight: 500; +} + +#top-navigation ul li a:hover { + color: #dd3333; +} + +#masthead .widget { + border: none; + margin: 0; + padding: 0; +} + +.mt-live-link { + float: right; +} + +.mt-live-link a { + color: #fff; + display: inline-block; + background: #D33; + padding: 7px 12px; + font-weight: 700; + font-size: 14px; +} + +.mt-live-link a i { + margin-right: 10px; + font-size: 22px; + position: relative; + top: 2px; +} + +.mt-live-link a:hover, +.mt-live-link a:focus { + color: #ffffff; + box-shadow: 0 0 10px rgba(0, 0, 0, 0.5) inset; +} + +.header-widget-wrapper { + float: right; + margin: 8px 0; +} + +.logo-ads-wrap { + padding: 30px 0 30px; +} + +.site-title { + margin: 0; + font-size: 36px; + font-family: 'Josefin Sans', sans-serif; + line-height: 1.5; + font-weight: 700; +} + +.site-title a { + color: #ffffff; +} + +.site-description { + margin: 0; + font-size: 13px; +} + +.home.blog #masthead { + margin-bottom: 20px; +} + +.mt-header-social-wrapper, +.mt-header-extra-icons { + float: left; + width: 30%; + padding: 30px 0; +} + +.mt-social-icon-wrap { + list-style: none; + margin: 0; + padding: 0; +} + +.mt-social-icon-wrap li { + display: inline-block; + margin-right: 20px; +} + +.mt-social-icon-wrap li a:hover { + color: #dd3333; +} + +.mt-header-extra-icons { + display: none; +} + +.mt-header-extra-icons { + display: none; +} + +.mt-logo-row-wrapper { + background: #0B0B0B; + -webkit-transition: 0.3s ease; + -o-transition: 0.3s ease; + transition: 0.3s ease; +} + +.is-sticky .mt-logo-row-wrapper { + background: #fff; + z-index: 9999; + box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); + padding: 0; +} + +.site-branding { + float: center; + margin: 9px 0; +} + +.mt-social-menu-wrapper { + border-top: 1px solid rgba(255, 255, 255, 0.2); +} + +.is-sticky .mt-social-menu-wrapper { + background: #0B0B0B; + z-index: 9999; + box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); +} + +#site-navigation { + float: left; + margin-right: 20px; +} + +.mt-social-search-wrapper { + float: right; +} + +.mt-social-wrapper { + float: left; + margin: 15px 0 15px; +} + +.mt-follow-title { + font-weight: 700; + color: #ffffff; + font-size: 14px; + display: inline-block; + margin-right: 10px; +} + +.mt-social-icon-wrap { + float: right; + list-style: none; + margin: 0; + padding: 0; +} + +.mt-social-icon-wrap li { + display: inline-block; + margin-right: 12px; +} + +.mt-social-icon-wrap li a { + color: #ffffff; +} + +/*-------------------------------------------------------------- +Search CSS +--------------------------------------------------------------*/ + +.mt-menu-search { + float: right; +} + +.mt-search-icon { + color: #ffffff; + font-size: 14px; + font-weight: 600; + margin: 15px 0 15px 40px; + cursor: pointer; +} + +.mt-search-icon a { + color: #ffffff; +} + +.mt-search-icon:hover { + color: #dd3333; +} + +.mt-search-icon i { + margin-left: 5px; +} + +.mt-menu-search .mt-form-wrap { + display: none; + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: rgba(0, 0, 0, 0.6); + z-index: 9999; + -webkit-transform: scale(0.3); + -ms-transform: scale(0.3); + -o-transform: scale(0.3); + transform: scale(0.3); + -webkit-transition: 0.5s ease; + -o-transition: 0.5s ease; + transition: 0.5s ease; +} + +.mt-menu-search .mt-form-wrap.search-activate { + display: block; + -webkit-transform: scale(1); + -ms-transform: scale(1); + -o-transform: scale(1); + transform: scale(1); + +} + +.mt-menu-search .mt-form-wrap .search-form { + position: absolute; + top: 50%; + left: 50%; + width: 100%; + margin-left: -50%; + -webkit-transform: translateY(-50%); + -ms-transform: translateY(-50%); + -o-transform: translateY(-50%); + transform: translateY(-50%); + text-align: center; +} + +.mt-menu-search .mt-form-wrap .search-form .search-field { + border: none; + border-bottom: 1px solid #ccc; + padding: 20px; + width: 80%; + height: 70px; + display: block; + margin: 0 auto; + border: none; + border-bottom: 1px solid #e1e1e1; + font-size: 26px; +} + +.mt-menu-search .mt-form-wrap .search-form .search-field:focus { + outline: 2px solid #DD3333; +} + +.mt-menu-search .mt-form-wrap .search-form .search-submit { + margin-top: 30px; + padding: 16px 60px; + background: #dd3333; + border: none; + color: #fff; + font-size: 18px; + display: inline-block; + -webkit-transition: 0.3s ease; + -o-transition: 0.3s ease; + transition: 0.3s ease; +} + +.mt-menu-search .mt-form-wrap .search-form .search-submit:hover { + background: #dd3333; + border-radius: 30px; +} + +.mt-form-close { + position: absolute; + right: 40px; + top: 30px; + font-size: 64px; + cursor: pointer; + color: #fff; +} + +.mt-form-close a{ + color: #fff; +} + +.mt-form-close:hover { + color: #dd3333; +} + +/*-------------------------------------------------------------- +Menu CSS +--------------------------------------------------------------*/ +.main-menu-wrapper { + position: relative; +} + +.menu-toggle { + display: none; + text-align: center; + color: #ffffff; + padding: 10px 0; + font-size: 15px; + font-weight: 500; + cursor: pointer; + float: left; +} + +.menu-toggle a { + color: #ffffff; +} + +.menu-toggle:hover { + color: #dd3333; +} + +.menu-toggle i { + margin-right: 7px; +} + +#site-navigation { + text-align: center; +} + +.is-sticky .main-menu-wrapper { + background: #fff; + z-index: 999; + box-shadow: 0 0 6px rgba(0, 0, 0, 0.1); +} + +.is-sticky #site-navigation ul li a { + line-height: 54px; +} + +.is-sticky #site-navigation ul li a::after { + top: 19px; +} + +#site-navigation ul { + margin: 0; + list-style: none; +} + +#site-navigation ul li { + display: inline-block; + position: relative; +} + +#site-navigation ul li a { + color: #ffffff; + font-size: 14px; + text-transform: uppercase; + padding: 0 20px; + display: block; + line-height: 60px; + position: relative; + font-weight: 700; +} + +#site-navigation ul#primary-menu>li:first-child a { + padding-left: 0; +} + +#site-navigation ul#primary-menu>li:first-child ul a { + padding-left: 30px; +} + +#site-navigation ul li a::after { + content: ""; + width: 1px; + position: absolute; + top: 22px; + right: 0; + height: 16px; + background: #e1e1e1; +} + +#site-navigation ul li:last-child a:after { + display: none; +} + +#site-navigation ul li:hover>a, +#site-navigation ul li.current-menu-item>a, +#site-navigation ul li.current_page_ancestor>a, +#site-navigation ul li.current-menu-ancestor>a, +#site-navigation ul li.current_page_item>a, +#site-navigation ul li.current-menu-parent>a, +#site-navigation ul li.focus>a { + color: #dd3333; +} + +#site-navigation ul li .sub-menu, +#site-navigation ul li .children { + background: #0B0B0B; + width: 250px; + text-align: left; + position: absolute; + top: 100%; + left: -9999em; + opacity: 0; + box-shadow: 0 0 5px rgba(0, 0, 0, 0.1); + z-index: 999; + -webkit-transition: opacity 0.15s linear, left 0s 0.15s; + -o-transition: opacity 0.15s linear, left 0s 0.15s; + transition: opacity 0.15s linear, left 0s 0.15s; +} + +#site-navigation ul li:hover>ul.sub-menu, +#site-navigation ul li:hover>ul.children, +#site-navigation ul li.focus>ul.sub-menu, +#site-navigation ul li.focus>ul.children { + left: 0; + opacity: 1; + -webkit-transition: opacity 0.15s linear, right 0s 0.15s; + -o-transition: opacity 0.15s linear, right 0s 0.15s; + transition: opacity 0.15s linear, right 0s 0.15s; +} + +#site-navigation ul.sub-menu li ul, +#site-navigation ul.children li ul { + right: 9999em; + left: auto !important; + top: 0% !important; + -webkit-transition: opacity 0.15s linear, right 0s 0.15s; + -o-transition: opacity 0.15s linear, right 0s 0.15s; + transition: opacity 0.15s linear, right 0s 0.15s; +} + + +#site-navigation ul.sub-menu li:hover>ul, +#site-navigation ul.children li:hover>ul, +#site-navigation ul.sub-menu li.focus>ul, +#site-navigation ul.children li.focus>ul { + right: -100%; + left: auto !important; + top: 0% !important; + -webkit-transition: opacity 0.15s linear, left 0s 0.15s; + -o-transition: opacity 0.15s linear, left 0s 0.15s; + transition: opacity 0.15s linear, left 0s 0.15s; +} + +#site-navigation ul li .sub-menu li, +#site-navigation ul li .children li { + display: block; + padding: 0; +} + +#site-navigation ul li .sub-menu li a, +#site-navigation ul li .children li a { + padding: 10px 20px; + border-bottom: 1px solid rgba(255, 255, 255, 0.3); + border-right: none; + line-height: 30px; +} + +#site-navigation ul li .sub-menu li a:after, +#site-navigation ul li .children li a:after { + display: none; +} + +#site-navigation ul#primary-menu>li.menu-item-has-children>a, +#site-navigation #primary-menu ul>li.page_item_has_children>a { + padding-right: 40px; + position: relative; +} + +#site-navigation li.menu-item-has-children>a::before, +#site-navigation li.page_item_has_children>a::before { + content: "\f107"; + font-family: "ForkAwesome"; + font-weight: 900; + position: absolute; + right: 20px; + top: 0px; + font-size: 15px; +} + +#site-navigation ul ul li.menu-item-has-children>a::before, +#site-navigation ul ul li.page_item_has_children>a::before { + -webkit-transform: rotate(-90deg); + -ms-transform: rotate(-90deg); + -o-transform: rotate(-90deg); + transform: rotate(-90deg); + top: 50%; + margin-top: -14px; +} + +#site-navigation ul li a.sub-toggle { + display: none; +} + +#site-navigation .menu-item-description { + position: absolute; + top: -15px; + right: -20px; + background: #dd3333; + line-height: 24px; + font-size: 12px; + padding: 0 10px; + color: #fff; + font-weight: 400; +} + +#site-navigation .menu-item-description::after { + position: absolute; + bottom: -3px; + left: 0; + content: ''; + width: 0; + height: 0; + border-style: solid; + border-width: 3px 3px 0 0; + border-color: #dd3333 transparent transparent transparent; + -webkit-transition: all 0.3s ease; + -o-transition: all 0.3s ease; + transition: all 0.3s ease; +} + +.is-sticky #site-navigation .menu-item-description, +#site-navigation ul li .sub-menu .menu-item-description { + display: none; +} + +/*-------------------------------------------------------------- +Slider CSS +--------------------------------------------------------------*/ + +.front-slider-wrapper { + padding: 50px 0; + position: relative; + margin-bottom: 50px; +} + +.front-slider-wrapper::before { + position: absolute; + content: ""; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: rgba(0, 0, 0, 0.8); +} + + +.front-slider-wrapper .mt-container { + position: relative; + z-index: 99; +} + +.front-slider-block { + float: left; + width: 66%; +} + +.full-width--slider .front-slider-block { + float: none; + width: 100%; +} + +.slider-post-wrap { + height: 550px; + border-radius: 10px; + position: relative; + overflow: hidden; +} + +.top-featured-post-main-wrapper { + float: right; + width: 31.5%; +} + +.post-cat, +.post-cats-list { + margin-bottom: 10px; + margin-top: 10px; +} + +.post-cats-list a:hover { + color: #fff; +} + +.post-info-wrap { + z-index: 99; + background: -moz-linear-gradient(top, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.8) 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, rgba(0, 0, 0, 0)), color-stop(100%, rgba(0, 0, 0, 0.8))); + background: -webkit-linear-gradient(top, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.8) 100%); + background: -o-linear-gradient(top, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.8) 100%); + background: -ms-linear-gradient(top, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.8) 100%); + background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.8) 100%); + filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=0); + position: absolute; + width: 100%; + bottom: 0; + padding: 140px 30px 20px 30px; + direction: ltr; +} + +.no-thumbnail .post-info-wrap { + position: inherit; + background: none; + padding: 0; +} + +.front-slider-block .post-info-wrap .entry-title { + font-size: 26px; + line-height: 1.5; + margin-top: 5px; +} + +.front-slider-block .posted-on a::before { + content: ""; + width: 30px; + height: 1px; + background: #fff; + position: absolute; + top: 10px; + right: -40px; +} + +.has-thumbnail .post-info-wrap .entry-title a, +.front-slider-block .post-info-wrap .entry-title a { + color: #fff; +} + +.slider-post-wrap .post-thumbnail>a { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; +} + +.post-categories { + list-style: none; + display: block; + margin: 0; +} + +.post-categories li { + display: inline-block; + margin-right: 5px; +} + +.post-cats-list a { + background: #dd3333; + font-size: 12px; + color: #fff; + padding: 1px 10px; + display: inline-block; + margin-right: 5px; +} + +.has-thumbnail .post-info-wrap .entry-meta a, +.front-slider-block .post-info-wrap .entry-meta a { + color: #fff; +} + +.has-thumbnail .post-info-wrap .entry-meta .posted-on a::before, +.front-slider-block .post-info-wrap .entry-meta .posted-on a::before { + background: #dfdfdf; +} + +.has-thumbnail .post-info-wrap .entry-meta .posted-on a::before, +.front-slider-block .post-info-wrap .entry-meta .posted-on a::before { + background: #fff; +} + +.front-slider-block .lSAction { + position: absolute; + right: 20px; + top: 20px; +} + +.front-slider-block .lSAction>a { + background: rgba(0, 0, 0, 0.7) none repeat scroll 0 0; + color: #fff; + display: inline-block; + font-size: 20px; + line-height: 30px; + margin: 0 2px; + opacity: 1; + position: static; + text-align: center; +} + +.front-slider-block .lSAction>a:hover { + background: #dd3333; +} + +.features-post-title { + font-size: 18px; + font-weight: 700; + margin-bottom: 25px; + position: relative; + padding-left: 40px; + font-family: 'Josefin Sans', sans-serif; +} + +.top-featured-post-wrap .mt-single-post-wrap { + margin-bottom: 18px; +} + +.top-featured-post-wrap .mt-single-post-wrap:last-child { + margin-bottom: 0; +} + +.top-featured-post-wrap .post-thumbnail { + float: left; + width: 27%; + border-radius: 5px; + overflow: hidden; + position: relative; +} + +.top-featured-post-wrap .mt-post-content { + float: right; + width: 68%; +} + +.top-featured-post-wrap .entry-header { + padding: 0; +} + +.top-featured-post-wrap .entry-header .entry-title { + font-size: 18px; + margin: 0; +} + +.top-featured-post-wrap .post-thumbnail .post-number { + display: block; + position: absolute; + left: 0; + bottom: 0; + width: 25px; + height: 25px; + line-height: 25px; + color: #fff; + background: #dd3333; + text-align: center; +} + + +/*-------------------------------------------------------------- +Blog Layout design CSS +--------------------------------------------------------------*/ +.home #content { + margin-top: 0; +} + +article { + position: relative; +} + +.entry-header { + margin-top: 15px; +} + +.entry-title { + font-size: 20px; + margin-bottom: 8px; + line-height: 1.3; +} + +.single .entry-title { + font-size: 30px; + margin-top: 10px; +} + +.single .mt-related-posts-wrapper .entry-title { + font-size: 22px; +} + +.entry-title a { + color: #ffffff; +} + +.entry-title a:hover, +.cat-links a:hover { + color: #dd3333; +} + +.entry-meta a { + font-size: 13px; + font-weight: 400; + color: #A6A6A6; +} + +.entry-meta a:hover { + color: #dd3333; +} + +.entry-content { + font-size: 14px; + line-height: 2; + margin: 0; +} + +.entry-content a { + text-decoration: underline; +} + +.entry-footer .mt-readmore-btn, +.btn-wrapper a, +.mt-readmore-btn { + display: inline-block; + padding: 0; + font-size: 14px; + color: #dfdfdf; +} + +.entry-footer .mt-readmore-btn i, +.btn-wrapper a i, +.mt-readmore-btn i { + margin-left: 5px; + -webkit-transition: 0.3s ease; + -o-transition: 0.3s ease; + transition: 0.3s ease; +} + +.entry-footer .mt-readmore-btn:hover, +.btn-wrapper a:hover, +.mt-readmore-btn:hover { + color: #dd3333; +} + +.entry-footer .mt-readmore-btn:hover i, +.btn-wrapper a:hover i, +.mt-readmore-btn:hover i { + margin-left: 10px; +} + +.entry-footer>span.tags-links { + display: block; + margin: 0 0 20px; + font-weight: 500; + color: #cfcfcf !important; +} + +.entry-footer .tags-links a { + margin: 0 3px; + font-weight: 400; +} + +article.sticky.no-thumbnail { + border: 2px solid rgba(255, 255, 255, 0.5); + position: relative; + padding: 20px 30px; +} + +article.sticky::before { + content: "\f08d"; + font-family: ForkAwesome; + position: absolute; + left: 20px; + top: 20px; + display: block; + width: 40px; + height: 40px; + background: #dd3333; + color: #fff; + font-size: 15px; + line-height: 40px; + border-radius: 100%; + z-index: 99; + text-align: center; +} + +article .single-thumb-title-wrapper, +article .post-thumbnail { + position: relative; + display: block; + overflow: hidden; + border-radius: 10px; +} + +.single article .entry-content { + margin-top: 20px; +} + +article .single-thumb-title-wrapper .lSAction>a { + z-index: 9999999; +} + +article .post-thumbnail img { + -webkit-transform: scale(1); + -ms-transform: scale(1); + -o-transform: scale(1); + transform: scale(1); + -webkit-transition: 0.3s ease; + -o-transition: 0.3s ease; + transition: 0.3s ease; + min-width: 100%; +} + +article .post-thumbnail:hover img { + -webkit-transform: scale(1.1); + -ms-transform: scale(1.1); + -o-transform: scale(1.1); + transform: scale(1.1); +} + +article.page .post-thumbnail::before, +.single #content article .post-thumbnail::before { + display: none; +} + +.single .no-thumbnail { + padding-top: 0px !important; +} + +.no-thumbnail { + padding-bottom: 20px !important; + padding-top: 20px !important; +} + +.navigation.pagination { + text-align: center; +} + +.navigation.pagination .nav-links a.page-numbers { + padding: 12px 15px; + display: inline-block; + margin: 0 5px; + vertical-align: top; +} + +.navigation.pagination .nav-links .page-numbers.current, +.navigation.pagination .nav-links a.page-numbers:hover { + border: 1px solid #dd3333; + padding: 12px 15px; + vertical-align: top; + display: inline-block; + margin: 0 5px; + font-size: 14px; + line-height: 13px; + color: #dd3333; +} + +.archive-grid-post-wrapper, +.mt-archive--masonry-style .sophia-after-dark-content-masonry { + margin-left: -3%; +} + +.mt-archive--block-grid-style article, +.mt-archive--masonry-style #mt-masonry article { + display: inline-block; + width: 47%; + margin-left: 3%; + margin-right: -4px; + vertical-align: top; +} + +.no-sidebar.mt-archive--block-grid-style article, +.no-sidebar.mt-archive--masonry-style #mt-masonry article { + width: 30.33%; +} + +.mt-archive--masonry-style #mt-masonry article { + margin-right: 0; + margin-bottom: 25px; +} + +/*-------------------------------------------------------------- +Sidebar CSS +--------------------------------------------------------------*/ +.widget { + border: 1px solid rgba(255, 255, 255, 0.5); + padding: 20px; +} + +#secondary .widget .widget-title, +.mt-related-post-title, +#colophon .widget .widget-title { + margin-bottom: 15px; + font-size: 18px; + text-transform: uppercase; + display: block; + position: relative; + padding-left: 35px; +} + +#secondary .widget .widget-title::before, +.mt-related-post-title:before, +#colophon .widget .widget-title:before, +.features-post-title:before { + position: absolute; + left: 0; + content: ""; + width: 25px; + height: 3px; + background: #dd3333; + top: 10px; +} + +.widget_tag_cloud a { + border: 1px solid #e1e1e1; + color: #a6a6a6; + font-size: 13px !important; + padding: 3px 15px; + display: inline-block; + margin: 5px 5px; +} + +.widget_tag_cloud a:hover { + color: #ffffff; + border-color: #ffffff; +} + +/*-------------------------------------------------------------- +Single CSS +--------------------------------------------------------------*/ + +.mt-author-box { + border: 1px solid rgba(255, 255, 255, 0.5); + padding: 20px; + margin-bottom: 60px; + text-align: left; +} + +.mt-author-box:after { + content: ""; + display: block; + clear: both; +} + +.single .mt-author-box .mt-author__avatar { + float: left; + margin-right: 2%; + width: 18%; +} + +.single .mt-author-box .mt-author-info { + float: left; + width: 80%; +} + +.single .mt-author-box .author-title { + color: #ffffff; + text-transform: capitalize; + font-weight: 700; + display: block; + margin-bottom: 10px; +} + +.single .mt-author-box .mt-author-info .mt-author-name { + text-transform: capitalize; + margin: 0; + font-size: 24px; +} + +.single .mt-author-box .mt-author-info .mt-author-name a { + color: #ffffff; +} + +/*-------------------------------------------------------------- +Error 404 styles +--------------------------------------------------------------*/ +.error404 #primary { + float: none; + width: 100%; + padding: 50px 0; +} + +.error-404.not-found { + text-align: center; + width: 900px; + border: 5px solid #dd3333; + margin: 0 auto; + padding: 30px 0 40px 0; +} + +.error-num { + font-size: 100px; + font-weight: 900; + color: #ffffff; + line-height: 150px; +} + +.error-num span { + font-size: 60px; + text-transform: uppercase; + margin-left: 10px; +} + +.error404 .section-title { + margin-left: 3%; + margin-top: 40px; +} + +/*-------------------------------------------------------------- +Custom Header styles +--------------------------------------------------------------*/ + +.custom-header { + padding: 70px 0; + text-align: center; + background-attachment: fixed; + margin-bottom: 50px; + position: relative; + border-top: 4px solid #dd3333; + background-position: center center; +} + +.custom-header.has-bg-img:before { + background: rgba(0, 0, 0, 0.4); + content: ""; + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; +} + +.custom-header.no-bg-img { + background: #202020; + padding: 30px 0; +} + +.custom-header.has-bg-img .mt-container { + position: relative; + z-index: 99; +} + +.custom-header .entry-title, +.custom-header .page-title { + font-size: 36px; + color: #fff; + margin: 0; +} + +.taxonomy-description { + color: #fff; +} + +.breadcrumbs .trail-items { + list-style: none; + margin: 0; + padding: 0; +} + +.breadcrumbs .trail-items li { + display: inline-block; + margin: 0 10px; + color: #fafafa; +} + +.breadcrumbs .trail-items { + list-style: none; + margin: 0; + padding: 10px 0; +} + +.breadcrumbs .trail-items li::after { + content: "\f101"; + position: relative; + right: -10px; + font-size: 14px; + font-family: ForkAwesome; +} + +.breadcrumbs .trail-items li:last-child:after { + display: none; +} + +#breadcrumb .mt-container { + width: 100%; + padding: 0; +} + +/*-------------------------------------------------------------- +Footer CSS +--------------------------------------------------------------*/ + +#colophon { + margin-top: 40px; + background: #040404; + border-top: 1px solid rgba(255, 255, 255, 0.2); +} + +#top-footer { + padding: 50px 0 0; + color: #fff; +} + +#colophon .author-name { + color: #fff; + margin-top: 20px; +} + +#top-footer .mt-footer-widget-wrapper { + margin-left: -3%; +} + +#top-footer.footer-column-one .mt-footer-widget, +#top-footer.footer-column-two .mt-footer-widget, +#top-footer.footer-column-three .mt-footer-widget, +#top-footer.footer-column-four .mt-footer-widget { + display: inline-block; + margin-left: 2.85%; + width: 29%; + margin-right: -3.85px; + vertical-align: top; + margin-bottom: 3%; +} + +#top-footer.footer-column-one .mt-footer-widget { + width: 97%; +} + +#top-footer.footer-column-two .mt-footer-widget { + width: 47%; +} + +#top-footer.footer-column-four .mt-footer-widget { + width: 22%; +} + +#footer-navigation { + float: right; +} + +#footer-menu { + padding: 0; + margin: 0; + list-style: none; +} + +#footer-menu li { + display: inline-block; +} + +#footer-menu li a { + color: #fff; + border-left: 1px solid #e1e1e1; + display: block; + padding: 0 20px; + line-height: 14px; +} + +#footer-menu li>ul { + display: none; +} + +#footer-menu li:first-child a { + border: none; +} + +#footer-menu li a:hover { + color: #dd3333; +} + +#bottom-footer { + padding: 12px 0; + background: rgba(255, 255, 255, 0.01); + color: #fff; + font-size: 13px; +} + +.site-info { + font-size: 13px; + float: left; +} + +#colophon .widget .widget-title, +#top-footer a { + color: #fff; +} + +#top-footer a:hover { + color: #dd3333; +} + +#top-footer .posted-on a::before { + background: #fff; +} + +#top-footer .widget { + border: 0px; + margin-bottom: 20px; +} + +/*-------------------------------------------------------------- +sophia-after-dark Widget CSS +--------------------------------------------------------------*/ + +.sophia-after-dark_author_info .author-name { + margin: 10px 0; + text-transform: capitalize; +} + +.author-social .mt-social-icon-wrap { + float: none; +} + +.author-social .mt-social-icon-wrap li a { + background: #212121; + width: 40px; + height: 40px; + display: block; + color: #fff; + text-align: center; + line-height: 40px; + border-radius: 100%; +} + +.mt-latest-posts-wrapper .mt-single-post-wrap>a { + float: left; + width: 27%; + display: block; + +} + +.mt-latest-posts-wrapper .mt-post-thumb { + border: 1px solid #e1e1e1; + padding: 6px; +} + +.mt-latest-posts-wrapper .mt-single-post-wrap { + margin-bottom: 20px; +} + +.mt-latest-posts-wrapper .mt-single-post-wrap:last-child { + margin: 0; +} + +.mt-latest-posts-wrapper .mt-single-post-wrap::after { + clear: both; + display: block; + content: ""; +} + +.mt-latest-posts-wrapper .mt-post-content { + float: right; + width: 67%; +} + +.mt-latest-posts-wrapper .mt-post-title a { + font-size: 16px; + color: #ffffff; + display: block; + line-height: 22px; + margin-bottom: -15px; +} + +.mt-latest-posts-wrapper .mt-post-title a:hover { + color: #dd3333; +} + +.mt-latest-posts-wrapper .entry-cat { + padding: 0; +} + +.mt-latest-posts-wrapper .mt-readmore-btn { + margin: 0; + font-size: 13px; +} + +.mt-latest-posts-wrapper .tags-links { + display: none; +} + +.sophia-after-dark_social_media { + text-align: center; +} + +.sophia-after-dark_social_media li { + margin: 0 5px; +} + +.sophia-after-dark_social_media a { + border: 1px solid #333; + display: inline-block; + width: 40px; + height: 40px; + border-radius: 100%; + font-size: 18px !important; + line-height: 40px; +} + +.sophia-after-dark_social_media a:hover { + background: #dd3333; + color: #ffffff !important; + border-color: #dd3333; +} + +.mt-single-related-posts { + margin-top: 40px; +} + +.mt-related-posts-wrapper { + margin-left: -3%; +} + +.mt-related-posts-wrapper article { + display: inline-block; + margin-left: 3%; + margin-right: -4px; + width: 30.33%; + vertical-align: top; +} + +.mt-related-posts-wrapper article.no-thumbnail { + padding: 0 10px !important; +} + +/*-------------------------------------------------------------- +Scroll To Top styles +--------------------------------------------------------------*/ +#mt-scrollup { + position: fixed; + right: 40px; + bottom: 20px; + padding: 8px; + margin-right: 0; + font-size: 13px; + line-height: 1em; + outline: none !important; + -moz-transform-origin: 100% 100%; + -webkit-transform-origin: 100% 100%; + transform-origin: 100% 100%; + -moz-transform: rotate(-90deg) translate(100%, 0); + -webkit-transform: rotate(-90deg) translate(100%, 0); + transform: rotate(-90deg) translate(100%, 0); + cursor: pointer; + -moz-transition: .5s; + -webkit-transition: .5s; + transition: .5s; + z-index: 99; +} + +#mt-scrollup::before { + content: '\f178'; + position: absolute; + top: 3px; + right: -36px; + width: 36px; + padding: 3px 4px 2px 6px; + font-size: 18px; + font-family: 'ForkAwesome'; + line-height: 1; + -moz-transition: .5s; + -webkit-transition: .5s; + transition: .5s; +} + +#mt-scrollup:hover { + color: #dd3333; +} + +.single article .post-thumbnail:hover img { + -webkit-transform: scale(1); + -ms-transform: scale(1); + -o-transform: scale(1); + transform: scale(1); +} + +.single article.hentry .edit-link { + margin-bottom: 20px; +} + +.search .entry-footer { + margin-bottom: 10px; +} + +.search article { + box-shadow: 0px 6px 8px rgba(0, 0, 0, 0.1); +} + +.search article .post-thumbnail { + border-radius: 0px; +} + +.no-results.not-found { + text-align: center; +} + +.search-no-results #primary input, +.search-no-results #primary input[type="text"]:focus, +.search-no-results #primary input[type="email"]:focus, +.search-no-results #primary input[type="url"]:focus, +.search-no-results #primary input[type="password"]:focus, +.search-no-results #primary input[type="search"]:focus, +.search-no-results #primary textarea:focus { + border-top: 0px; + border-left: 0px; + border-right: 0px; +} + +.search-no-results #primary .search-submit { + margin-top: 40px; + border: 0px; + font-size: 20px; + color: #777; +} + +.search-no-results .search-form { + width: 80%; + margin: 0 auto; +} \ No newline at end of file diff --git a/template-parts/author/post-author-box.php b/template-parts/author/post-author-box.php new file mode 100644 index 0000000..e612daf --- /dev/null +++ b/template-parts/author/post-author-box.php @@ -0,0 +1,43 @@ + + +
          + +
          + +
          + + +
          + +
          + + + +
          + +
          + + +
          + +
          + : + +
          + +
          +
          +
          \ No newline at end of file diff --git a/template-parts/content-none.php b/template-parts/content-none.php new file mode 100644 index 0000000..7685298 --- /dev/null +++ b/template-parts/content-none.php @@ -0,0 +1,45 @@ + + +
          + + +
          + ' . wp_kses( + /* translators: 1: link to WP admin new post page. */ + __( 'Ready to publish your first post? Get started here.', 'sophia-after-dark' ), + array( + 'a' => array( + 'href' => array(), + ), + ) + ) . '

          ', + esc_url( admin_url( 'post-new.php' ) ) + ); + elseif ( is_search() ) : + ?> +

          + +

          + +
          +
          \ No newline at end of file diff --git a/template-parts/content-page.php b/template-parts/content-page.php new file mode 100644 index 0000000..de6c469 --- /dev/null +++ b/template-parts/content-page.php @@ -0,0 +1,45 @@ + +
          > + +
          + '', + ) ); + ?> +
          + + +
          + %s', 'sophia-after-dark' ), + array( + 'span' => array( + 'class' => array(), + ), + ) + ), + get_the_title() + ), + '', + '' + ); + ?> +
          + +
          \ No newline at end of file diff --git a/template-parts/content-search.php b/template-parts/content-search.php new file mode 100644 index 0000000..d4b3656 --- /dev/null +++ b/template-parts/content-search.php @@ -0,0 +1,62 @@ + + +
          > + '; + sophia_after_dark_post_thumbnail(); + sophia_after_dark_article_categories_list(); + echo ''; + if ( 'post' === get_post_type() ) { + ?> +
          + +
          + + +
          + ', '' ); ?> +
          + +
          + "%s"', 'sophia-after-dark' ), + array( + 'span' => array( + 'class' => array(), + ), + ) + ), + get_the_title() + ) ); + } + ?> +
          + +
          + +
          +
          \ No newline at end of file diff --git a/template-parts/content-single.php b/template-parts/content-single.php new file mode 100644 index 0000000..52744e0 --- /dev/null +++ b/template-parts/content-single.php @@ -0,0 +1,62 @@ + + +
          > +
          + + +
          + +
          + "%s"', 'sophia-after-dark' ), + array( + 'span' => array( + 'class' => array(), + ), + ) + ), + get_the_title() + ) ); + wp_link_pages( array( + 'before' => '', + ) ); + ?> +
          + +
          + +
          + +
          \ No newline at end of file diff --git a/template-parts/content.php b/template-parts/content.php new file mode 100644 index 0000000..a193c2f --- /dev/null +++ b/template-parts/content.php @@ -0,0 +1,71 @@ +current_post; +$archive_style = get_theme_mod( 'sophia_after_dark_archive_style', 'mt-archive--masonry-style' ); +$post_content_type = apply_filters( 'sophia_after_dark_archive_post_content_type', 'excerpt' ); + +if ( has_post_thumbnail() ) { + $post_class = 'has-thumbnail'; +} else { + $post_class = 'no-thumbnail'; +} +if ( $current_post < 3 && 'mt-archive--masonry-style' === $archive_style ) { + $post_class .= ''; +} else { + $post_class .= ' wow fadeInUp'; +} +?> +
          > + '; + sophia_after_dark_post_thumbnail(); + sophia_after_dark_article_categories_list(); + echo ''; + if ( 'post' === get_post_type() ) { + ?> +
          + +
          + + +
          + ', '' ); ?> +
          + +
          + "%s"', 'sophia-after-dark' ), + array( + 'span' => array( + 'class' => array(), + ), + ) + ), + get_the_title() + ) ); + } + ?> +
          + +
          + +
          +
          \ No newline at end of file diff --git a/template-parts/related/content-related.php b/template-parts/related/content-related.php new file mode 100644 index 0000000..78aa7c3 --- /dev/null +++ b/template-parts/related/content-related.php @@ -0,0 +1,39 @@ + + +
          > + '; + sophia_after_dark_post_thumbnail(); + sophia_after_dark_article_categories_list(); + echo ''; + if ( 'post' === get_post_type() ) { + ?> +
          + +
          + + +
          + ', '' ); ?> +
          + +
          + +
          +
          \ No newline at end of file diff --git a/template-parts/related/related-posts.php b/template-parts/related/related-posts.php new file mode 100644 index 0000000..ddc8046 --- /dev/null +++ b/template-parts/related/related-posts.php @@ -0,0 +1,44 @@ +term_id; + } +} +$related_posts_count = apply_filters( 'sophia_after_dark_related_posts_count', 3 ); +$related_posts_title = apply_filters( 'sophia_after_dark_related_posts_section_title', __( 'Related Posts', 'sophia-after-dark' ) ); + +$related_posts_args = array( + 'posts_per_page' => absint( $related_posts_count ), + 'post__not_in' => array( $related_post_id ), + 'category__in' => $selected_cat, +); +$related_posts_query = new WP_Query( $related_posts_args ); +if ( $related_posts_query->have_posts() ) { +?> + +